From 0aedeb5637932fa827e42be7441e9c967049dd1d Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 21 Jun 2016 13:55:33 +0200 Subject: Add predefined CI variables to GitLab for container registry, pipelines, project name, etc. --- CHANGELOG | 1 + app/models/ci/build.rb | 32 +++++++++++++++++++++--- doc/ci/variables/README.md | 62 ++++++++++++++++++++++++++++------------------ 3 files changed, 67 insertions(+), 28 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 44e6a194745..f651097828e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,7 @@ v 8.9.0 (unreleased) - Reduce number of fog gem dependencies - Add number of merge requests for a given milestone to the milestones view. - Implement a fair usage of shared runners + - Add predefined CI variables to GitLab for container registry, pipelines, project name, etc. - Remove project notification settings associated with deleted projects - Fix 404 page when viewing TODOs that contain milestones or labels in different projects - Add a metric for the number of new Redis connections created by a transaction diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index d618c84e983..d823d67e3ba 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -431,10 +431,34 @@ module Ci def predefined_variables variables = [] - variables << { key: :CI_BUILD_TAG, value: ref, public: true } if tag? - variables << { key: :CI_BUILD_NAME, value: name, public: true } - variables << { key: :CI_BUILD_STAGE, value: stage, public: true } - variables << { key: :CI_BUILD_TRIGGERED, value: 'true', public: true } if trigger_request + variables << { key: 'CI', value: 'true', public: true } + variables << { key: 'GITLAB_CI', value: 'true', public: true } + + variables << { key: 'CI_BUILD_ID', value: id, public: true } + variables << { key: 'CI_BUILD_TOKEN', value: token, public: false } + variables << { key: 'CI_BUILD_REF', value: sha, public: true } + variables << { key: 'CI_BUILD_BEFORE_SHA', value: before_sha, public: true } + variables << { key: 'CI_BUILD_REF_NAME', value: ref, public: true } + variables << { key: 'CI_BUILD_TAG', value: ref, public: true } if tag? + variables << { key: 'CI_BUILD_NAME', value: name, public: true } + variables << { key: 'CI_BUILD_STAGE', value: stage, public: true } + variables << { key: 'CI_BUILD_TRIGGERED', value: 'true', public: true } if trigger_request + + variables << { key: 'CI_PIPELINE_ID', value: pipeline.id, public: true } + + variables << { key: 'CI_PROJECT_ID', value: project_id, public: true } + variables << { key: 'CI_PROJECT_NAME', value: project.path, public: true } + variables << { key: 'CI_PROJECT_PATH', value: project.path_with_namespace, public: true } + variables << { key: 'CI_PROJECT_NAMESPACE', value: project.namespace.path, public: true } + variables << { key: 'CI_PROJECT_URL', value: project.web_url, public: true } + + variables << { key: 'CI_REGISTRY', value: Gitlab.config.registry.host_port, public: true } if Gitlab.config.registry.enabled + variables << { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_repository_url, public: true } if project.container_registry_repository_url + + variables << { key: 'CI_SERVER_NAME', value: 'GitLab', public: true } + variables << { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true } + variables << { key: 'CI_SERVER_REVISION', value: Gitlab::REVISION, public: true } + variables << { key: 'CI_SERVER_URL', value: Gitlab::REVISION, public: true } variables end end diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index 137b080a8f7..3683470b54c 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -18,25 +18,32 @@ The `API_TOKEN` will take the Secure Variable value: `SECURE`. ### Predefined variables (Environment Variables) -| Variable | Runner | Description | -|-------------------------|-----|--------| -| **CI** | 0.4 | Mark that build is executed in CI environment | -| **GITLAB_CI** | all | Mark that build is executed in GitLab CI environment | -| **CI_SERVER** | all | Mark that build is executed in CI environment | -| **CI_SERVER_NAME** | all | CI server that is used to coordinate builds | -| **CI_SERVER_VERSION** | all | Not yet defined | -| **CI_SERVER_REVISION** | all | Not yet defined | -| **CI_BUILD_REF** | all | The commit revision for which project is built | -| **CI_BUILD_TAG** | 0.5 | The commit tag name. Present only when building tags. | -| **CI_BUILD_NAME** | 0.5 | The name of the build as defined in `.gitlab-ci.yml` | -| **CI_BUILD_STAGE** | 0.5 | The name of the stage as defined in `.gitlab-ci.yml` | -| **CI_BUILD_REF_NAME** | all | The branch or tag name for which project is built | -| **CI_BUILD_ID** | all | The unique id of the current build that GitLab CI uses internally | -| **CI_BUILD_REPO** | all | The URL to clone the Git repository | -| **CI_BUILD_TRIGGERED** | 0.5 | The flag to indicate that build was [triggered] | -| **CI_BUILD_TOKEN** | 1.2 | Token used for authenticating with the GitLab Container Registry | -| **CI_PROJECT_ID** | all | The unique id of the current project that GitLab CI uses internally | -| **CI_PROJECT_DIR** | all | The full path where the repository is cloned and where the build is ran | +| Variable | GitLab | Runner | Description | +|-------------------------|--------|--------|-------------| +| **CI** | all | 0.4 | Mark that build is executed in CI environment | +| **GITLAB_CI** | all | all | Mark that build is executed in GitLab CI environment | +| **CI_SERVER** | all | all | Mark that build is executed in CI environment | +| **CI_SERVER_NAME** | all | all | The name of CI server that is used to coordinate builds | +| **CI_SERVER_VERSION** | all | all | GitLab version that is used to schedule builds | +| **CI_SERVER_REVISION** | all | all | GitLab revision that is used to schedule builds | +| **CI_BUILD_ID** | all | all | The unique id of the current build that GitLab CI uses internally | +| **CI_BUILD_REF** | all | all | The commit revision for which project is built | +| **CI_BUILD_TAG** | all | 0.5 | The commit tag name. Present only when building tags. | +| **CI_BUILD_NAME** | all | 0.5 | The name of the build as defined in `.gitlab-ci.yml` | +| **CI_BUILD_STAGE** | all | 0.5 | The name of the stage as defined in `.gitlab-ci.yml` | +| **CI_BUILD_REF_NAME** | all | all | The branch or tag name for which project is built | +| **CI_BUILD_REPO** | all | all | The URL to clone the Git repository | +| **CI_BUILD_TRIGGERED** | all | 0.5 | The flag to indicate that build was [triggered] | +| **CI_BUILD_TOKEN** | all | 1.2 | Token used for authenticating with the GitLab Container Registry | +| **CI_PIPELINE_ID** | 8.9 | 0.5 | The unique id of the current pipeline that GitLab CI uses internally | +| **CI_PROJECT_ID** | all | all | The unique id of the current project that GitLab CI uses internally | +| **CI_PROJECT_NAME** | 8.9 | 0.5 | The project name that is currently build | +| **CI_PROJECT_NAMESPACE**| 8.9 | 0.5 | The project namespace that is currently build | +| **CI_PROJECT_PATH** | 8.9 | 0.5 | The namespace with project name | +| **CI_PROJECT_URL** | 8.9 | 0.5 | The HTTP address to access project | +| **CI_PROJECT_DIR** | all | all | The full path where the repository is cloned and where the build is ran | +| **CI_REGISTRY** | 8.9 | 0.5 | If the Container Registry is enabled it returns address of GitLab's Container Registry | +| **CI_REGISTRY_IMAGE** | 8.9 | 0.5 | If the Container Registry is for project it returns the address of registry tied to specific project | **Some of the variables are only available when using runner with at least defined version.** @@ -46,18 +53,25 @@ Example values: export CI_BUILD_ID="50" export CI_BUILD_REF="1ecfd275763eff1d6b4844ea3168962458c9f27a" export CI_BUILD_REF_NAME="master" -export CI_BUILD_REPO="https://gitlab.com/gitlab-org/gitlab-ce.git" +export CI_BUILD_REPO="https://gitab-ci-token:abcde-1234ABCD5678ef@gitlab.com/gitlab-org/gitlab-ce.git" export CI_BUILD_TAG="1.0.0" export CI_BUILD_NAME="spec:other" export CI_BUILD_STAGE="test" export CI_BUILD_TRIGGERED="true" export CI_BUILD_TOKEN="abcde-1234ABCD5678ef" -export CI_PROJECT_DIR="/builds/gitlab-org/gitlab-ce" +export CI_PIPELINE_ID="1000" export CI_PROJECT_ID="34" +export CI_PROJECT_DIR="/builds/gitlab-org/gitlab-ce" +export CI_PROJECT_NAME="gitlab-ce" +export CI_PROJECT_NAMESPACE="gitlab-org" +export CI_PROJECT_PATH="gitlab-org/gitlab-ce" +export CI_PROJECT_URL="https://gitlab.com/gitlab-org/gitlab-ce.git" +export CI_REGISTRY="registry.gitlab.com" +export CI_REGISTRY_IMAGE="registry.gitlab.com/gitlab-org/gitlab-ce" export CI_SERVER="yes" -export CI_SERVER_NAME="GitLab CI" -export CI_SERVER_REVISION="" -export CI_SERVER_VERSION="" +export CI_SERVER_NAME="GitLab" +export CI_SERVER_REVISION="8.9.0" +export CI_SERVER_VERSION="70606bf" ``` ### YAML-defined variables -- cgit v1.2.1 From a697b3c5c4674ae1de2e4836eda771ab2baa2ddc Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Wed, 29 Jun 2016 16:08:20 +0200 Subject: Speed improvement for builds without DB Now the builds which do not use the DB or Redis won't pull the images from docker, and won't migrate the DB. This _should_ improve the build times slightly but also create a cleaner trace. --- .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff8aa351226..0bd3df4c9e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,5 @@ image: "ruby:2.1" -services: - - mysql:latest - - redis:alpine - cache: key: "ruby21" paths: @@ -34,7 +30,6 @@ stages: - post-test # Prepare and merge knapsack tests - .knapsack-state: &knapsack-state services: [] variables: @@ -70,6 +65,9 @@ update-knapsack: .rspec-knapsack: &rspec-knapsack stage: test + services: + - mysql:latest + - redis:alpine script: - bundle exec rake assets:precompile 2>/dev/null - JOB_NAME=( $CI_BUILD_NAME ) @@ -85,6 +83,9 @@ update-knapsack: .spinach-knapsack: &spinach-knapsack stage: test + services: + - mysql:latest + - redis:alpine script: - bundle exec rake assets:precompile 2>/dev/null - JOB_NAME=( $CI_BUILD_NAME ) @@ -133,6 +134,9 @@ spinach 9 10: *spinach-knapsack # Execute all testing suites against Ruby 2.3 .ruby-23: &ruby-23 image: "ruby:2.3" + services: + - mysql:latest + - redis:alpine only: - master cache: @@ -148,7 +152,7 @@ spinach 9 10: *spinach-knapsack .spinach-knapsack-ruby23: &spinach-knapsack-ruby23 <<: *spinach-knapsack <<: *ruby-23 - + rspec 0 20 ruby23: *rspec-knapsack-ruby23 rspec 1 20 ruby23: *rspec-knapsack-ruby23 rspec 2 20 ruby23: *rspec-knapsack-ruby23 @@ -184,21 +188,43 @@ spinach 9 10 ruby23: *spinach-knapsack-ruby23 # Other generic tests .exec: &exec + variables: + SIMPLECOV: "false" + USE_DB: "false" + USE_BUNDLE_INSTALL: "true" stage: test script: - bundle exec $CI_BUILD_NAME -teaspoon: *exec rubocop: *exec rake scss_lint: *exec rake brakeman: *exec rake flog: *exec rake flay: *exec -rake db:migrate:reset: *exec license_finder: *exec +rake db:migrate:reset: + stage: test + services: + - mysql:latest + - redis:alpine + script: + - rake db:migrate:reset + +teaspoon: + stage: test + services: + - mysql:latest + - redis:alpine + script: + - teaspoon + bundler:audit: stage: test + variables: + SIMPLECOV: "false" + USE_DB: "false" + USE_BUNDLE_INSTALL: "true" only: - master script: -- cgit v1.2.1 From 3bda96215845932ea6dea9e619a94dada1a61ade Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 3 ++- app/services/files/update_service.rb | 1 + app/views/projects/blob/_editor.html.haml | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 7599fec3cdf..4c42be7d710 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + # params[:file_name] stores the new name for the file + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 1960dc7d949..52451d72b57 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + # Need to update file_path with the new filename repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 29c7d45074a..3c64b2f5e96 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,7 +4,11 @@ = icon('code-fork') = ref %span.editor-file-name - = @path + - if current_action?(:edit) && can?(current_user, :push_code, @project) + = text_field_tag 'file_name', params[:file_name], placeholder: @path, + class: 'form-control new-file-name' + - else + = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From f4b38792a5c6f76b92350ef19ab53a351d01bdc4 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 6 +++++- app/services/files/base_service.rb | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index dacb5679dd3..84b4a30c6d5 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -7,7 +7,8 @@ module CreatesCommit commit_params = @commit_params.merge( source_project: @project, source_branch: @ref, - target_branch: @target_branch + target_branch: @target_branch, + file_path: @path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 4c42be7d710..e76d5009855 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,11 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else # params[:file_name] stores the new name for the file - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) + unless params[:file_name] == @path + @path = params[:file_name] + end + + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 0326a8823e9..cd5b45262ac 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 0ffdb567ce893f6957f06087950c35118d5b65f6 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/controllers/projects/blob_controller.rb | 2 +- app/services/files/base_service.rb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index e76d5009855..2bd86a1f126 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,8 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - # params[:file_name] stores the new name for the file unless params[:file_name] == @path + previous_path = @path @path = params[:file_name] end diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index cd5b45262ac..0326a8823e9 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,8 +15,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From e2e588d2a8f6349208de92a8c0818d5a9178ab19 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 3 ++- app/services/files/update_service.rb | 1 + app/views/projects/blob/_editor.html.haml | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 7599fec3cdf..4c42be7d710 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + # params[:file_name] stores the new name for the file + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 1960dc7d949..52451d72b57 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + # Need to update file_path with the new filename repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 29c7d45074a..3c64b2f5e96 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,7 +4,11 @@ = icon('code-fork') = ref %span.editor-file-name - = @path + - if current_action?(:edit) && can?(current_user, :push_code, @project) + = text_field_tag 'file_name', params[:file_name], placeholder: @path, + class: 'form-control new-file-name' + - else + = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From ad799589866ee0aa18a66af2fff453daaf8d9457 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 6 +++++- app/services/files/base_service.rb | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index dacb5679dd3..84b4a30c6d5 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -7,7 +7,8 @@ module CreatesCommit commit_params = @commit_params.merge( source_project: @project, source_branch: @ref, - target_branch: @target_branch + target_branch: @target_branch, + file_path: @path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 4c42be7d710..e76d5009855 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,11 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else # params[:file_name] stores the new name for the file - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) + unless params[:file_name] == @path + @path = params[:file_name] + end + + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 0326a8823e9..cd5b45262ac 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From b95b23f3ed649fc58dc7dbd1ec3703d2d7f75187 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/controllers/projects/blob_controller.rb | 2 +- app/services/files/base_service.rb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index e76d5009855..2bd86a1f126 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,8 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - # params[:file_name] stores the new name for the file unless params[:file_name] == @path + previous_path = @path @path = params[:file_name] end diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index cd5b45262ac..0326a8823e9 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,8 +15,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 6b836637235a36e6fe3b6b4911064cc3421a231a Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 2 +- app/models/repository.rb | 30 +++++++++++++++++++++++++++++ app/services/files/base_service.rb | 1 + app/services/files/update_service.rb | 2 +- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 84b4a30c6d5..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,8 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @path + file_path: @path, + previous_path: @previous_path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 2bd86a1f126..1e96f471483 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,7 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else unless params[:file_name] == @path - previous_path = @path + @previous_path = @path @path = params[:file_name] end diff --git a/app/models/repository.rb b/app/models/repository.rb index 078ca8f4e13..a5fb13eb662 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -741,6 +741,36 @@ class Repository end end + def update_file(user, path, previous_path, content, message, branch, update) + commit_with_hooks(user, branch) do |ref| + committer = user_to_committer(user) + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, + branch: ref, + } + + if previous_path + options[:file] = { + path: previous_path + } + + + Gitlab::Git::Blob.remove(raw_repository, options) + end + + options[:file] = { + content: content, + path: path, + update: update + } + + Gitlab::Git::Blob.commit(raw_repository, options) + end + end + def remove_file(user, path, message, branch) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 0326a8823e9..29bd450bb98 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -9,6 +9,7 @@ module Files @commit_message = params[:commit_message] @file_path = params[:file_path] + @previous_path = params[:previous_path] @file_content = if params[:file_content_encoding] == 'base64' Base64.decode64(params[:file_content]) else diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 52451d72b57..6d015642b91 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,7 +4,7 @@ module Files class UpdateService < Files::BaseService def commit # Need to update file_path with the new filename - repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) + repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end end -- cgit v1.2.1 From 85d1a9708ea31084147911243be248a02e89c56a Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 3 ++- app/services/files/update_service.rb | 1 + app/views/projects/blob/_editor.html.haml | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 7599fec3cdf..4c42be7d710 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + # params[:file_name] stores the new name for the file + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 1960dc7d949..52451d72b57 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + # Need to update file_path with the new filename repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 29c7d45074a..3c64b2f5e96 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,7 +4,11 @@ = icon('code-fork') = ref %span.editor-file-name - = @path + - if current_action?(:edit) && can?(current_user, :push_code, @project) + = text_field_tag 'file_name', params[:file_name], placeholder: @path, + class: 'form-control new-file-name' + - else + = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From dd161e155d7bb2632a522db1c89c352b8374cead Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 6 +++++- app/services/files/base_service.rb | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index dacb5679dd3..84b4a30c6d5 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -7,7 +7,8 @@ module CreatesCommit commit_params = @commit_params.merge( source_project: @project, source_branch: @ref, - target_branch: @target_branch + target_branch: @target_branch, + file_path: @path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 4c42be7d710..e76d5009855 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,11 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else # params[:file_name] stores the new name for the file - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) + unless params[:file_name] == @path + @path = params[:file_name] + end + + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 0326a8823e9..cd5b45262ac 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 6b474d404627b20c86555586d56f0cc3b99845dd Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/controllers/projects/blob_controller.rb | 2 +- app/services/files/base_service.rb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index e76d5009855..2bd86a1f126 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,8 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - # params[:file_name] stores the new name for the file unless params[:file_name] == @path + previous_path = @path @path = params[:file_name] end diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index cd5b45262ac..0326a8823e9 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,8 +15,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 3e97068c64034a29bbf1e33948a56f67cf6635a1 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 16:46:37 +0100 Subject: refactors blob_controller --- Gemfile | 2 +- Gemfile.lock | 17 +++++++++------ app/controllers/concerns/creates_commit.rb | 8 +++++++ app/controllers/projects/blob_controller.rb | 4 ++-- app/models/repository.rb | 33 +++++++++++++++++++++++++++++ app/services/files/update_service.rb | 5 ++++- 6 files changed, 59 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index e409e66aab0..0ba6bbdb4b1 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2' +gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 35c3770d42c..4e976370de4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,12 @@ +PATH + remote: ~/src/Gitlab/gitlab_git + specs: + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + GEM remote: https://rubygems.org/ specs: @@ -276,11 +285,6 @@ GEM posix-spawn (~> 0.3) gitlab_emoji (0.3.1) gemojione (~> 2.2, >= 2.2.1) - gitlab_git (10.2.3) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) gitlab_meta (7.0) gitlab_omniauth-ldap (1.2.1) net-ldap (~> 0.9) @@ -391,6 +395,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) + mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) @@ -863,7 +868,7 @@ DEPENDENCIES github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) gitlab_emoji (~> 0.3.0) - gitlab_git (~> 10.2) + gitlab_git (~> 10.2)! gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 84b4a30c6d5..dc157121106 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -11,8 +11,16 @@ module CreatesCommit file_path: @path ) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + result = service.new(@tree_edit_project, current_user, commit_params).execute + puts "#" * 30 + puts result[:status] + puts "#" * 30 + if result[:status] == :success update_flash_notice(success_notice) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 2bd86a1f126..e2ddda1474b 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,8 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - unless params[:file_name] == @path - previous_path = @path + unless params[:file_name].empty? + @previous_path = @path @path = params[:file_name] end diff --git a/app/models/repository.rb b/app/models/repository.rb index 078ca8f4e13..75071c65efb 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -741,6 +741,39 @@ class Repository end end + def update_file(user, path, previous_path, content, message, branch, update) + commit_with_hooks(user, branch) do |ref| + committer = user_to_committer(user) + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, + branch: ref + } + + options[:file] = { + content: content, + path: path, + update: update + } + + if previous_path + options[:file].merge!(previous_path: previous_path) + + puts "#" * 90 + puts "Hello" + puts "#" * 90 + Gitlab::Git::Blob.rename(raw_repository, options) + else + puts "#" * 90 + puts "World" + puts "#" * 90 + Gitlab::Git::Blob.commit(raw_repository, options) + end + end + end + def remove_file(user, path, message, branch) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 52451d72b57..7b7bce20662 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,7 +4,10 @@ module Files class UpdateService < Files::BaseService def commit # Need to update file_path with the new filename - repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end end -- cgit v1.2.1 From c5630fbf979dfe6b412d2deb8e98480d2c912a63 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 0326a8823e9..cd5b45262ac 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index cd5b45262ac..0326a8823e9 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,8 +15,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 08c15116d197ff1267e0cc1c1403af65e8b41772 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/controllers/concerns/creates_commit.rb | 3 ++- app/models/repository.rb | 16 ++++++++++++++++ app/services/files/base_service.rb | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index dc157121106..a3731b45df0 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,8 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @path + file_path: @path, + previous_path: @previous_path ) puts "#" * 10 diff --git a/app/models/repository.rb b/app/models/repository.rb index 75071c65efb..37455e67328 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -749,15 +749,31 @@ class Repository options[:author] = committer options[:commit] = { message: message, +<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 branch: ref } +======= + branch: ref, + } + + if previous_path + options[:file] = { + path: previous_path + } + + + Gitlab::Git::Blob.remove(raw_repository, options) + end + +>>>>>>> creates the update_file method in repository.rb and applies changes accordingly options[:file] = { content: content, path: path, update: update } +<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 if previous_path options[:file].merge!(previous_path: previous_path) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 0326a8823e9..29bd450bb98 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -9,6 +9,7 @@ module Files @commit_message = params[:commit_message] @file_path = params[:file_path] + @previous_path = params[:previous_path] @file_content = if params[:file_content_encoding] == 'base64' Base64.decode64(params[:file_content]) else -- cgit v1.2.1 From f30d2b7153e135b30135af06848ca4bfa20007bb Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 5 Jul 2016 09:46:48 +0100 Subject: removes debugging prints from code --- Gemfile | 2 +- Gemfile.lock | 7 ++++--- app/controllers/concerns/creates_commit.rb | 8 -------- app/models/repository.rb | 6 ------ app/services/files/update_service.rb | 3 --- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index 0ba6bbdb4b1..5ea2c8c17e0 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 4e976370de4..6d9c9627202 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,7 @@ -PATH - remote: ~/src/Gitlab/gitlab_git +GIT + remote: git@gitlab.com:gitlab-org/gitlab_git.git + revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + branch: commit-blob-rename-action specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -395,7 +397,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) diff --git a/app/models/repository.rb b/app/models/repository.rb index 75071c65efb..bf45f48e61a 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -761,14 +761,8 @@ class Repository if previous_path options[:file].merge!(previous_path: previous_path) - puts "#" * 90 - puts "Hello" - puts "#" * 90 Gitlab::Git::Blob.rename(raw_repository, options) else - puts "#" * 90 - puts "World" - puts "#" * 90 Gitlab::Git::Blob.commit(raw_repository, options) end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 7b7bce20662..6d015642b91 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,9 +4,6 @@ module Files class UpdateService < Files::BaseService def commit # Need to update file_path with the new filename - puts "#" * 10 - puts @previous_path - puts "#" * 10 repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end -- cgit v1.2.1 From a00d574ae921c2a9c1f694c1bf496d8ec28b9e23 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:07:16 +0100 Subject: adds change to CHANGELOG file --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 5b91ee1159c..2c54710be5d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.10.0 (unreleased) + - Add the functionality to be able to rename a file. !5049 (tiagonbotelho) - Fix commit builds API, return all builds for all pipelines for given commit. !4849 - Replace Haml with Hamlit to make view rendering faster. !3666 - Refactor repository paths handling to allow multiple git mount points -- cgit v1.2.1 From 0173b65d2605a6c332152fae2e53e84ba26a0df2 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:25:45 +0100 Subject: refactors to pass values as arguments through options --- app/models/repository.rb | 25 +++++++++++++------------ app/services/files/update_service.rb | 4 +++- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index bf45f48e61a..38ef1b2c57b 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -741,29 +741,30 @@ class Repository end end - def update_file(user, path, previous_path, content, message, branch, update) + # previous_path, message, update + def update_file(user, path, content, branch, options={}) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - options = {} - options[:committer] = committer - options[:author] = committer - options[:commit] = { - message: message, + commit_options = {} + commit_options[:committer] = committer + commit_options[:author] = committer + commit_options[:commit] = { + message: options[:message], branch: ref } - options[:file] = { + commit_options[:file] = { content: content, path: path, - update: update + update: options[:update] } - if previous_path - options[:file].merge!(previous_path: previous_path) + if options[:previous_path] + commit_options[:file].merge!(previous_path: options[:previous_path]) - Gitlab::Git::Blob.rename(raw_repository, options) + Gitlab::Git::Blob.rename(raw_repository, commit_options) else - Gitlab::Git::Blob.commit(raw_repository, options) + Gitlab::Git::Blob.commit(raw_repository, commit_options) end end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 6d015642b91..7835d7eba44 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,7 +4,9 @@ module Files class UpdateService < Files::BaseService def commit # Need to update file_path with the new filename - repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) + repository.update_file(current_user, @file_path, @file_content, + @target_branch, previous_path: @previous_path, + message: @commit_message, update: true) end end end -- cgit v1.2.1 From c98369207917e83d445fe94a350a9fba7f17fd0c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:28:50 +0100 Subject: removes redundant comment --- app/services/files/update_service.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 7835d7eba44..905c7a7c81a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,7 +3,6 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - # Need to update file_path with the new filename repository.update_file(current_user, @file_path, @file_content, @target_branch, previous_path: @previous_path, message: @commit_message, update: true) -- cgit v1.2.1 From 8840dcf679bf40c70e2fb0f1d6823b8138d3fe20 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 13:51:28 +0100 Subject: fixes issues for mr acceptance --- app/models/repository.rb | 2 +- app/views/projects/blob/_editor.html.haml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 38ef1b2c57b..ea7355b3c08 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -760,7 +760,7 @@ class Repository } if options[:previous_path] - commit_options[:file].merge!(previous_path: options[:previous_path]) + commit_options[:file][:previous_path] = options[:previous_path] Gitlab::Git::Blob.rename(raw_repository, commit_options) else diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 3c64b2f5e96..31bd4646d3d 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,11 +4,9 @@ = icon('code-fork') = ref %span.editor-file-name - - if current_action?(:edit) && can?(current_user, :push_code, @project) - = text_field_tag 'file_name', params[:file_name], placeholder: @path, + -if current_action?(:edit) || current_action?(:update) + = text_field_tag 'file_name', (params[:file_name] or @path), class: 'form-control new-file-name' - - else - = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From 7f4959ee4f8d54b42c394db1cfb32929cece419f Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 3 ++- app/services/files/update_service.rb | 1 + app/views/projects/blob/_editor.html.haml | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 7599fec3cdf..4c42be7d710 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + # params[:file_name] stores the new name for the file + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 1960dc7d949..52451d72b57 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + # Need to update file_path with the new filename repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 29c7d45074a..3c64b2f5e96 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,7 +4,11 @@ = icon('code-fork') = ref %span.editor-file-name - = @path + - if current_action?(:edit) && can?(current_user, :push_code, @project) + = text_field_tag 'file_name', params[:file_name], placeholder: @path, + class: 'form-control new-file-name' + - else + = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From 405675117a3bc9a5d2e70890a90b73895d065bae Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 6 +++++- app/services/files/base_service.rb | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index dacb5679dd3..84b4a30c6d5 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -7,7 +7,8 @@ module CreatesCommit commit_params = @commit_params.merge( source_project: @project, source_branch: @ref, - target_branch: @target_branch + target_branch: @target_branch, + file_path: @path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 4c42be7d710..e76d5009855 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,11 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else # params[:file_name] stores the new name for the file - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) + unless params[:file_name] == @path + @path = params[:file_name] + end + + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 4bdb68a3698..def64dabf11 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From ef0f4950af1eb994eaa3ed6f2bfea37e6eff7ce1 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/controllers/projects/blob_controller.rb | 2 +- app/services/files/base_service.rb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index e76d5009855..2bd86a1f126 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,8 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - # params[:file_name] stores the new name for the file unless params[:file_name] == @path + previous_path = @path @path = params[:file_name] end diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index def64dabf11..4bdb68a3698 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,8 +15,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 75e961dc7f51c169c65a9b525a111c4d0713f9a7 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 2bd86a1f126..e2ddda1474b 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,8 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - unless params[:file_name] == @path - previous_path = @path + unless params[:file_name].empty? + @previous_path = @path @path = params[:file_name] end -- cgit v1.2.1 From 7f62a7b8965273a4d826647e76c97a05f9a4b3ad Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 4bdb68a3698..def64dabf11 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 09c77952430cb5dd19baa4b29f9dc8f50a5b60cb Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index def64dabf11..4bdb68a3698 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,8 +15,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 143fa8e7ca9d4c16f5008d2fe123886578bb0015 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/controllers/concerns/creates_commit.rb | 3 ++- app/models/repository.rb | 30 ++++++++++++++++++++++++++++++ app/services/files/base_service.rb | 1 + app/services/files/update_service.rb | 2 +- 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 84b4a30c6d5..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,8 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @path + file_path: @path, + previous_path: @previous_path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/models/repository.rb b/app/models/repository.rb index 078ca8f4e13..a5fb13eb662 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -741,6 +741,36 @@ class Repository end end + def update_file(user, path, previous_path, content, message, branch, update) + commit_with_hooks(user, branch) do |ref| + committer = user_to_committer(user) + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, + branch: ref, + } + + if previous_path + options[:file] = { + path: previous_path + } + + + Gitlab::Git::Blob.remove(raw_repository, options) + end + + options[:file] = { + content: content, + path: path, + update: update + } + + Gitlab::Git::Blob.commit(raw_repository, options) + end + end + def remove_file(user, path, message, branch) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 4bdb68a3698..6e46bcea24c 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -9,6 +9,7 @@ module Files @commit_message = params[:commit_message] @file_path = params[:file_path] + @previous_path = params[:previous_path] @file_content = if params[:file_content_encoding] == 'base64' Base64.decode64(params[:file_content]) else diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 52451d72b57..6d015642b91 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,7 +4,7 @@ module Files class UpdateService < Files::BaseService def commit # Need to update file_path with the new filename - repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) + repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end end -- cgit v1.2.1 From 032a325e0075bbda173d151a0f0c56d0dc6957df Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/services/files/update_service.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 6d015642b91..fefa1d4ef68 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,7 +3,6 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - # Need to update file_path with the new filename repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end -- cgit v1.2.1 From 01e041a6fd63bdbefe84498c9eeef3455762a7ff Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 6e46bcea24c..04bab96869c 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 2da08236773692ac819a6acde0dfab8d26a26e30 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 04bab96869c..6e46bcea24c 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 0a6aedc9db8077147b05ac75f79b1507280ba6e1 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 16:46:37 +0100 Subject: refactors blob_controller --- Gemfile | 2 +- Gemfile.lock | 20 ++++++++++++++++++++ app/controllers/concerns/creates_commit.rb | 8 ++++++++ app/models/repository.rb | 19 ++++++++----------- 4 files changed, 37 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 99ca6608a6f..9eaffc4a94b 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2' +gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index af8fbedc127..96bb7b2e3d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,12 @@ +PATH + remote: ~/src/Gitlab/gitlab_git + specs: + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + GEM remote: https://rubygems.org/ specs: @@ -274,11 +283,16 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) +<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 gitlab_git (10.2.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) rugged (~> 0.24.0) +======= + gitlab_emoji (0.3.1) + gemojione (~> 2.2, >= 2.2.1) +>>>>>>> refactors blob_controller gitlab_meta (7.0) gitlab_omniauth-ldap (1.2.1) net-ldap (~> 0.9) @@ -389,6 +403,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) + mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) @@ -861,7 +876,12 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) +<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 gitlab_git (~> 10.2) +======= + gitlab_emoji (~> 0.3.0) + gitlab_git (~> 10.2)! +>>>>>>> refactors blob_controller gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a3731b45df0 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,8 +12,16 @@ module CreatesCommit previous_path: @previous_path ) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + result = service.new(@tree_edit_project, current_user, commit_params).execute + puts "#" * 30 + puts result[:status] + puts "#" * 30 + if result[:status] == :success update_flash_notice(success_notice) diff --git a/app/models/repository.rb b/app/models/repository.rb index a5fb13eb662..bf45f48e61a 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -749,25 +749,22 @@ class Repository options[:author] = committer options[:commit] = { message: message, - branch: ref, + branch: ref } - if previous_path - options[:file] = { - path: previous_path - } - - - Gitlab::Git::Blob.remove(raw_repository, options) - end - options[:file] = { content: content, path: path, update: update } - Gitlab::Git::Blob.commit(raw_repository, options) + if previous_path + options[:file].merge!(previous_path: previous_path) + + Gitlab::Git::Blob.rename(raw_repository, options) + else + Gitlab::Git::Blob.commit(raw_repository, options) + end end end -- cgit v1.2.1 From 632b360613b72e76c682d4ee20135aae6b3dea25 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 6e46bcea24c..04bab96869c 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From a01facc81ff9ebf6eb25c66cc9d4b7312be9cf27 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 04bab96869c..6e46bcea24c 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From c71254ffd440b6b20b0a9b796d33a0bb5d33de97 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index bf45f48e61a..0e4b85bd5ff 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -749,15 +749,31 @@ class Repository options[:author] = committer options[:commit] = { message: message, +<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 branch: ref } +======= + branch: ref, + } + + if previous_path + options[:file] = { + path: previous_path + } + + + Gitlab::Git::Blob.remove(raw_repository, options) + end + +>>>>>>> creates the update_file method in repository.rb and applies changes accordingly options[:file] = { content: content, path: path, update: update } +<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 if previous_path options[:file].merge!(previous_path: previous_path) -- cgit v1.2.1 From 519e95133a81a68df53114f796b91d96f60c1bbb Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 5 Jul 2016 09:46:48 +0100 Subject: removes debugging prints from code --- Gemfile | 2 +- Gemfile.lock | 7 ++++--- app/controllers/concerns/creates_commit.rb | 8 -------- app/models/repository.rb | 16 ---------------- 4 files changed, 5 insertions(+), 28 deletions(-) diff --git a/Gemfile b/Gemfile index 9eaffc4a94b..37c5c021beb 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 96bb7b2e3d5..51258219628 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,7 @@ -PATH - remote: ~/src/Gitlab/gitlab_git +GIT + remote: git@gitlab.com:gitlab-org/gitlab_git.git + revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + branch: commit-blob-rename-action specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -403,7 +405,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) diff --git a/app/models/repository.rb b/app/models/repository.rb index 0e4b85bd5ff..16988f6df3d 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -749,31 +749,15 @@ class Repository options[:author] = committer options[:commit] = { message: message, -<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 - branch: ref - } - -======= branch: ref, } - if previous_path - options[:file] = { - path: previous_path - } - - - Gitlab::Git::Blob.remove(raw_repository, options) - end - ->>>>>>> creates the update_file method in repository.rb and applies changes accordingly options[:file] = { content: content, path: path, update: update } -<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 if previous_path options[:file].merge!(previous_path: previous_path) -- cgit v1.2.1 From c1c11fa7725443b6c00a45eac0e8ffc986b19a45 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:07:16 +0100 Subject: adds change to CHANGELOG file --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 8ef934bf80d..6c2b02688db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.10.0 (unreleased) + - Add the functionality to be able to rename a file. !5049 (tiagonbotelho) - Fix commit builds API, return all builds for all pipelines for given commit. !4849 - Replace Haml with Hamlit to make view rendering faster. !3666 - Refactor repository paths handling to allow multiple git mount points -- cgit v1.2.1 From 8df419cba35262b827b6d04870da1df3ed79b939 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:25:45 +0100 Subject: refactors to pass values as arguments through options --- app/models/repository.rb | 27 ++++++++++++++------------- app/services/files/update_service.rb | 4 +++- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 16988f6df3d..58ceed6aa3d 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -741,29 +741,30 @@ class Repository end end - def update_file(user, path, previous_path, content, message, branch, update) + # previous_path, message, update + def update_file(user, path, content, branch, options={}) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - options = {} - options[:committer] = committer - options[:author] = committer - options[:commit] = { - message: message, - branch: ref, + commit_options = {} + commit_options[:committer] = committer + commit_options[:author] = committer + commit_options[:commit] = { + message: options[:message], + branch: ref } - options[:file] = { + commit_options[:file] = { content: content, path: path, - update: update + update: options[:update] } - if previous_path - options[:file].merge!(previous_path: previous_path) + if commit_options[:previous_path] + commit_options[:file].merge!(previous_path: commit_options[:previous_path]) - Gitlab::Git::Blob.rename(raw_repository, options) + Gitlab::Git::Blob.rename(raw_repository, commit_options) else - Gitlab::Git::Blob.commit(raw_repository, options) + Gitlab::Git::Blob.commit(raw_repository, commit_options) end end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index fefa1d4ef68..905c7a7c81a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,7 +3,9 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) + repository.update_file(current_user, @file_path, @file_content, + @target_branch, previous_path: @previous_path, + message: @commit_message, update: true) end end end -- cgit v1.2.1 From 510558fbb8b736c0903059bd19f2f095024cabd0 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 13:51:28 +0100 Subject: fixes issues for mr acceptance --- app/models/repository.rb | 4 ++-- app/views/projects/blob/_editor.html.haml | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 58ceed6aa3d..ea7355b3c08 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -759,8 +759,8 @@ class Repository update: options[:update] } - if commit_options[:previous_path] - commit_options[:file].merge!(previous_path: commit_options[:previous_path]) + if options[:previous_path] + commit_options[:file][:previous_path] = options[:previous_path] Gitlab::Git::Blob.rename(raw_repository, commit_options) else diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 3c64b2f5e96..31bd4646d3d 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,11 +4,9 @@ = icon('code-fork') = ref %span.editor-file-name - - if current_action?(:edit) && can?(current_user, :push_code, @project) - = text_field_tag 'file_name', params[:file_name], placeholder: @path, + -if current_action?(:edit) || current_action?(:update) + = text_field_tag 'file_name', (params[:file_name] or @path), class: 'form-control new-file-name' - - else - = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From 2472a0c7dcce4aeda1ccfa71d82641dbc3600f58 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 14:35:56 +0100 Subject: fixes merge conflicts for Gemfile.lock --- Gemfile.lock | 179 ++++++++++++++++++++++++++++------------------------------- 1 file changed, 85 insertions(+), 94 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 51258219628..5c800b2ec5b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + revision: cfb423fb576590525c4a978bc21cc98917c3334c branch: commit-blob-rename-action specs: gitlab_git (10.3.0) @@ -68,14 +68,13 @@ GEM faraday_middleware (~> 0.9) faraday_middleware-multi_json (~> 0.0) oauth2 (~> 1.0) - asciidoctor (1.5.3) - ast (2.2.0) + asciidoctor (1.5.4) + ast (2.3.0) attr_encrypted (3.0.1) encryptor (~> 3.0.0) - attr_required (1.0.0) - autoprefixer-rails (6.2.3) + attr_required (1.0.1) + autoprefixer-rails (6.3.7) execjs - json awesome_print (1.2.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) @@ -99,7 +98,7 @@ GEM babosa (1.0.2) base32 (0.3.2) bcrypt (3.1.11) - benchmark-ips (2.3.0) + benchmark-ips (2.6.1) better_errors (1.0.1) coderay (>= 1.0.0) erubis (>= 2.6.6) @@ -111,13 +110,13 @@ GEM brakeman (3.3.2) browser (2.2.0) builder (3.2.2) - bullet (5.0.0) + bullet (5.1.1) activesupport (>= 3.0.0) - uniform_notifier (~> 1.9.0) + uniform_notifier (~> 1.10.0) bundler-audit (0.5.0) bundler (~> 1.2) thor (~> 0.18) - byebug (8.2.1) + byebug (9.0.5) capybara (2.6.2) addressable mime-types (>= 1.16) @@ -125,7 +124,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - capybara-screenshot (1.0.11) + capybara-screenshot (1.0.13) capybara (>= 1.0, < 3) launchy carrierwave (0.10.0) @@ -137,9 +136,9 @@ GEM charlock_holmes (0.7.3) chronic_duration (0.10.6) numerizer (~> 0.1.1) - chunky_png (1.3.5) + chunky_png (1.3.6) cliver (0.3.2) - coderay (1.1.0) + coderay (1.1.1) coercible (1.0.0) descendants_tracker (~> 0.0.1) coffee-rails (4.1.1) @@ -149,15 +148,15 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - colorize (0.7.7) + colorize (0.8.1) concurrent-ruby (1.0.2) connection_pool (2.2.0) crack (0.4.3) safe_yaml (~> 1.0.0) creole (0.5.0) - css_parser (1.4.1) + css_parser (1.4.5) addressable - d3_rails (3.5.11) + d3_rails (3.5.16) railties (>= 3.1.0) daemons (1.2.3) database_cleaner (1.4.1) @@ -167,7 +166,7 @@ GEM activerecord (>= 3.2.0, < 5.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.1.1) + devise (4.2.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0, < 5.1) @@ -184,7 +183,7 @@ GEM docile (1.1.5) doorkeeper (4.0.0) railties (>= 4.2) - dropzonejs-rails (0.7.2) + dropzonejs-rails (0.7.3) rails (> 3.1) email_reply_parser (0.5.8) email_spec (1.6.0) @@ -194,9 +193,9 @@ GEM equalizer (0.0.11) erubis (2.7.0) escape_utils (1.1.1) - eventmachine (1.0.8) - excon (0.49.0) - execjs (2.6.0) + eventmachine (1.2.0.1) + excon (0.50.1) + execjs (2.7.0) expression_parser (0.9.0) factory_girl (4.5.0) activesupport (>= 3.0.0) @@ -211,18 +210,21 @@ GEM faraday_middleware multi_json ffaker (2.0.0) - ffi (1.9.10) - flay (2.6.1) + ffi (1.9.12) + flay (2.8.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) ruby_parser (~> 3.0) sexp_processor (~> 4.0) - flog (4.3.2) + flog (4.4.0) + path_expander (~> 1.0) ruby_parser (~> 3.1, > 3.1.0) sexp_processor (~> 4.4) flowdock (0.7.1) httparty (~> 0.7) multi_json - fog-aws (0.9.2) - fog-core (~> 1.27) + fog-aws (0.9.4) + fog-core (~> 1.38) fog-json (~> 1.0) fog-xml (~> 0.1) ipaddress (~> 0.8) @@ -231,7 +233,7 @@ GEM fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) - fog-core (1.40.0) + fog-core (1.42.0) builder excon (~> 0.49) formatador (~> 0.2) @@ -244,8 +246,8 @@ GEM multi_json (~> 1.10) fog-local (0.3.0) fog-core (~> 1.27) - fog-openstack (0.1.6) - fog-core (>= 1.39) + fog-openstack (0.1.7) + fog-core (>= 1.40) fog-json (>= 1.0) ipaddress (>= 0.8) fog-rackspace (0.1.1) @@ -256,9 +258,9 @@ GEM fog-xml (0.1.2) fog-core nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.1.0) + font-awesome-rails (4.6.3.1) railties (>= 3.2, < 5.1) - foreman (0.78.0) + foreman (0.82.0) thor (~> 0.19.1) formatador (0.2.5) fuubar (2.0.0) @@ -268,7 +270,7 @@ GEM rugged (~> 0.21) gemojione (2.6.1) json - get_process_mem (0.2.0) + get_process_mem (0.2.1) gherkin-ruby (0.3.2) github-linguist (4.7.6) charlock_holmes (~> 0.7.3) @@ -285,16 +287,6 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) -<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 - gitlab_git (10.2.3) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) -======= - gitlab_emoji (0.3.1) - gemojione (~> 2.2, >= 2.2.1) ->>>>>>> refactors blob_controller gitlab_meta (7.0) gitlab_omniauth-ldap (1.2.1) net-ldap (~> 0.9) @@ -303,7 +295,7 @@ GEM rubyntlm (~> 0.3) globalid (0.3.6) activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.0) + gollum-grit_adapter (1.0.1) gitlab-grit (~> 2.7, >= 2.7.1) gollum-lib (4.1.0) github-markup (~> 1.3.3) @@ -337,10 +329,10 @@ GEM temple (~> 0.7.6) thor tilt - hashie (3.4.3) + hashie (3.4.4) health_check (1.5.1) rails (>= 2.3.0) - hipchat (1.5.2) + hipchat (1.5.3) httparty mimemagic html-pipeline (1.11.0) @@ -351,10 +343,10 @@ GEM httparty (0.13.7) json (~> 1.8) multi_xml (>= 0.5.2) - httpclient (2.7.0.1) + httpclient (2.8.0) i18n (0.7.0) - ice_nine (0.11.1) - influxdb (0.2.3) + ice_nine (0.11.2) + influxdb (0.3.5) cause json ipaddress (0.8.3) @@ -369,12 +361,12 @@ GEM jquery-ui-rails (5.0.5) railties (>= 3.2.16) json (1.8.3) - jwt (1.5.2) + jwt (1.5.4) kaminari (0.17.0) actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.10.0) - knapsack (1.11.0) + knapsack (1.11.1) rake timecop (>= 0.1.0) launchy (2.4.3) @@ -385,7 +377,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - license_finder (2.1.0) + license_finder (2.1.2) bundler httparty rubyzip @@ -393,9 +385,10 @@ GEM xml-simple licensee (8.0.0) rugged (>= 0.24b) - listen (3.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) loofah (2.0.3) nokogiri (>= 1.5.9) macaddr (1.7.1) @@ -405,23 +398,24 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mimemagic (0.3.0) + mime-types-data (3.2016.0521) + mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) - multi_json (1.11.2) + multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.3.20) + mysql2 (0.3.21) nested_form (0.3.2) - net-ldap (0.12.1) - net-ssh (3.0.1) - newrelic_rpm (3.14.1.311) + net-ldap (0.14.0) + net-ssh (3.0.2) + newrelic_rpm (3.16.0.318) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) numerizer (0.1.1) - oauth (0.4.7) + oauth (0.5.1) oauth2 (1.0.0) faraday (>= 0.8, < 0.10) jwt (~> 1.0) @@ -433,7 +427,7 @@ GEM omniauth (1.3.1) hashie (>= 1.2, < 4) rack (>= 1.0, < 3) - omniauth-auth0 (1.4.1) + omniauth-auth0 (1.4.2) omniauth-oauth2 (~> 1.1) omniauth-azure-oauth2 (0.0.6) jwt (~> 1.0) @@ -452,7 +446,7 @@ GEM omniauth-github (1.1.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.1) + omniauth-gitlab (1.0.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.0) omniauth-google-oauth2 (0.2.10) @@ -487,10 +481,11 @@ GEM org-ruby (0.9.12) rubypants (~> 0.2) orm_adapter (0.5.0) - paranoia (2.1.4) + paranoia (2.1.5) activerecord (~> 4.0) - parser (2.3.1.0) + parser (2.3.1.2) ast (~> 2.2) + path_expander (1.0.0) pg (0.18.4) pkg-config (1.1.7) poltergeist (1.9.0) @@ -500,10 +495,10 @@ GEM websocket-driver (>= 0.2.0) posix-spawn (0.3.11) powerpack (0.1.1) - premailer (1.8.6) - css_parser (>= 1.3.6) + premailer (1.8.7) + css_parser (>= 1.4.5) htmlentities (>= 4.0.0) - premailer-rails (1.9.2) + premailer-rails (1.9.4) actionmailer (>= 3, < 6) premailer (~> 1.7, >= 1.7.9) pry (0.10.3) @@ -521,7 +516,7 @@ GEM rack-cors (0.4.0) rack-mount (0.8.3) rack (>= 1.0.0) - rack-oauth2 (1.2.1) + rack-oauth2 (1.2.3) activesupport (>= 2.3) attr_required (>= 0.0.5) httpclient (>= 2.4) @@ -556,19 +551,19 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - raindrops (0.15.0) + raindrops (0.16.0) rake (10.5.0) - rb-fsevent (0.9.6) - rb-inotify (0.9.5) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) ffi (>= 0.5.0) rblineprof (0.3.6) debugger-ruby_core_source (~> 1.3) rdoc (3.12.2) json (~> 1.4) - recaptcha (3.0.0) + recaptcha (3.3.0) json - redcarpet (3.3.3) - redis (3.2.2) + redcarpet (3.3.4) + redis (3.3.0) redis-actionpack (4.0.1) actionpack (~> 4) redis-rack (~> 1.5.0) @@ -587,16 +582,16 @@ GEM redis-store (~> 1.1.0) redis-store (1.1.7) redis (>= 2.2) - request_store (1.3.0) + request_store (1.3.1) rerun (0.11.0) listen (~> 3.0) - responders (2.1.1) + responders (2.2.0) railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (1.11.0) - rqrcode (0.7.0) - chunky_png + rouge (1.11.1) + rqrcode (0.10.1) + chunky_png (~> 1.0) rqrcode-rails3 (0.1.7) rqrcode (>= 0.4.2) rspec (3.5.0) @@ -635,12 +630,13 @@ GEM ruby-progressbar (1.8.1) ruby-saml (1.3.0) nokogiri (>= 1.5.10) + ruby_dep (1.3.1) ruby_parser (3.8.2) sexp_processor (~> 4.1) - rubyntlm (0.5.2) + rubyntlm (0.6.0) rubypants (0.2.0) rubyzip (1.2.0) - rufus-scheduler (3.1.10) + rufus-scheduler (3.2.1) rugged (0.24.0) safe_yaml (1.0.4) sanitize (2.1.0) @@ -664,7 +660,7 @@ GEM seed-fu (2.3.6) activerecord (>= 3.1) activesupport (>= 3.1) - select2-rails (3.5.9.3) + select2-rails (3.5.10) thor (~> 0.14) sentry-raven (1.1.0) faraday (>= 0.7.6) @@ -679,7 +675,7 @@ GEM connection_pool (~> 2.2, >= 2.2.0) redis (~> 3.2, >= 3.2.1) sinatra (>= 1.4.7) - sidekiq-cron (0.4.0) + sidekiq-cron (0.4.2) redis-namespace (>= 1.5.2) rufus-scheduler (>= 2.0.24) sidekiq (>= 4.0.0) @@ -713,7 +709,7 @@ GEM spring (>= 0.9.1) spring-commands-teaspoon (0.0.2) spring (>= 0.9.1) - sprockets (3.6.2) + sprockets (3.6.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) @@ -774,7 +770,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.0.5) + unicode-display_width (1.1.0) unicorn (4.9.0) kgio (~> 2.6) rack @@ -782,7 +778,7 @@ GEM unicorn-worker-killer (0.4.4) get_process_mem (~> 0) unicorn (>= 4, < 6) - uniform_notifier (1.9.0) + uniform_notifier (1.10.0) uuid (2.3.8) macaddr (~> 1.0) version_sorter (2.0.0) @@ -802,7 +798,7 @@ GEM webmock (1.21.0) addressable (>= 2.3.6) crack (>= 0.3.2) - websocket-driver (0.6.3) + websocket-driver (0.6.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) wikicloth (0.8.1) @@ -877,12 +873,7 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) -<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 - gitlab_git (~> 10.2) -======= - gitlab_emoji (~> 0.3.0) gitlab_git (~> 10.2)! ->>>>>>> refactors blob_controller gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) @@ -1007,4 +998,4 @@ DEPENDENCIES wikicloth (= 0.8.1) BUNDLED WITH - 1.12.5 + 1.10.6 -- cgit v1.2.1 From d6664a2b1ea06d1db84e1ad69bb67b58a91abe87 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 18:36:22 +0100 Subject: fixes merge request edit bug where it would generate a cloned file and not remove the previous one --- Gemfile.lock | 1 - app/controllers/projects/blob_controller.rb | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5c800b2ec5b..e0c052fdc57 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -398,7 +398,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index e2ddda1474b..6d3a7fde101 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -38,16 +38,16 @@ class Projects::BlobController < Projects::ApplicationController end def update + unless params[:file_name].empty? + @previous_path = @path + @path = params[:file_name] + end + after_edit_path = if from_merge_request && @target_branch == @ref diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - unless params[:file_name].empty? - @previous_path = @path - @path = params[:file_name] - end - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From 59a2e17994da6988023758b572f82789af3f90dd Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 18:51:02 +0100 Subject: fixes more issues for MR acceptance --- app/models/repository.rb | 24 ++++++++++++------------ app/services/files/update_service.rb | 5 +++-- app/views/projects/blob/_editor.html.haml | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index ea7355b3c08..1aba6ec17b4 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -742,29 +742,29 @@ class Repository end # previous_path, message, update - def update_file(user, path, content, branch, options={}) + def update_file(user, path, content, branch:, previous_path:, message:) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - commit_options = {} - commit_options[:committer] = committer - commit_options[:author] = committer - commit_options[:commit] = { - message: options[:message], + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, branch: ref } - commit_options[:file] = { + options[:file] = { content: content, path: path, - update: options[:update] + update: true } - if options[:previous_path] - commit_options[:file][:previous_path] = options[:previous_path] + if previous_path + options[:file][:previous_path] = previous_path - Gitlab::Git::Blob.rename(raw_repository, commit_options) + Gitlab::Git::Blob.rename(raw_repository, options) else - Gitlab::Git::Blob.commit(raw_repository, commit_options) + Gitlab::Git::Blob.commit(raw_repository, options) end end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 905c7a7c81a..8d2b5083179 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,8 +4,9 @@ module Files class UpdateService < Files::BaseService def commit repository.update_file(current_user, @file_path, @file_content, - @target_branch, previous_path: @previous_path, - message: @commit_message, update: true) + branch: @target_branch, + previous_path: @previous_path, + message: @commit_message) end end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 31bd4646d3d..ad3009f30ab 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,8 +4,8 @@ = icon('code-fork') = ref %span.editor-file-name - -if current_action?(:edit) || current_action?(:update) - = text_field_tag 'file_name', (params[:file_name] or @path), + - if current_action?(:edit) || current_action?(:update) + = text_field_tag 'file_name', (params[:file_name] || @path), class: 'form-control new-file-name' - if current_action?(:new) || current_action?(:create) -- cgit v1.2.1 From 72feec8148cbb8afdc10d07b4fe231d8fb2ebbf2 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 11:07:04 +0100 Subject: removes the git path for the gitlab_git gem corresponding to this MR dependency --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 37c5c021beb..99ca6608a6f 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" +gem "gitlab_git", '~> 10.2' # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes -- cgit v1.2.1 From fb2a663e3bc6cf8f9d76127e54c8266bbe2ff1be Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 11:07:33 +0100 Subject: removes Gemfile.lock --- Gemfile.lock | 1000 ---------------------------------------------------------- 1 file changed, 1000 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index e0c052fdc57..00000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,1000 +0,0 @@ -GIT - remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: cfb423fb576590525c4a978bc21cc98917c3334c - branch: commit-blob-rename-action - specs: - gitlab_git (10.3.0) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) - -GEM - remote: https://rubygems.org/ - specs: - RedCloth (4.3.2) - ace-rails-ap (4.0.2) - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) - globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) - arel (~> 6.0) - activerecord-session_store (1.0.0) - actionpack (>= 4.0, < 5.1) - activerecord (>= 4.0, < 5.1) - multi_json (~> 1.11, >= 1.11.2) - rack (>= 1.5.2, < 3) - railties (>= 4.0, < 5.1) - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - acts-as-taggable-on (3.5.0) - activerecord (>= 3.2, < 5) - addressable (2.3.8) - after_commit_queue (1.3.0) - activerecord (>= 3.0) - akismet (2.0.0) - allocations (1.0.5) - arel (6.0.3) - asana (0.4.0) - faraday (~> 0.9) - faraday_middleware (~> 0.9) - faraday_middleware-multi_json (~> 0.0) - oauth2 (~> 1.0) - asciidoctor (1.5.4) - ast (2.3.0) - attr_encrypted (3.0.1) - encryptor (~> 3.0.0) - attr_required (1.0.1) - autoprefixer-rails (6.3.7) - execjs - awesome_print (1.2.0) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - azure (0.7.5) - addressable (~> 2.3) - azure-core (~> 0.1) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - json (~> 1.8) - mime-types (>= 1, < 3.0) - nokogiri (~> 1.6) - systemu (~> 2.6) - thor (~> 0.19) - uuid (~> 2.0) - azure-core (0.1.2) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - nokogiri (~> 1.6) - babosa (1.0.2) - base32 (0.3.2) - bcrypt (3.1.11) - benchmark-ips (2.6.1) - better_errors (1.0.1) - coderay (>= 1.0.0) - erubis (>= 2.6.6) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - bootstrap-sass (3.3.6) - autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) - brakeman (3.3.2) - browser (2.2.0) - builder (3.2.2) - bullet (5.1.1) - activesupport (>= 3.0.0) - uniform_notifier (~> 1.10.0) - bundler-audit (0.5.0) - bundler (~> 1.2) - thor (~> 0.18) - byebug (9.0.5) - capybara (2.6.2) - addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - capybara-screenshot (1.0.13) - capybara (>= 1.0, < 3) - launchy - carrierwave (0.10.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) - json (>= 1.7) - mime-types (>= 1.16) - cause (0.1) - charlock_holmes (0.7.3) - chronic_duration (0.10.6) - numerizer (~> 0.1.1) - chunky_png (1.3.6) - cliver (0.3.2) - coderay (1.1.1) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (4.1.1) - coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.1.x) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - colorize (0.8.1) - concurrent-ruby (1.0.2) - connection_pool (2.2.0) - crack (0.4.3) - safe_yaml (~> 1.0.0) - creole (0.5.0) - css_parser (1.4.5) - addressable - d3_rails (3.5.16) - railties (>= 3.1.0) - daemons (1.2.3) - database_cleaner (1.4.1) - debug_inspector (0.0.2) - debugger-ruby_core_source (1.3.8) - default_value_for (3.0.1) - activerecord (>= 3.2.0, < 5.0) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.0) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) - responders - warden (~> 1.2.3) - devise-two-factor (3.0.0) - activesupport - attr_encrypted (>= 1.3, < 4, != 2) - devise (~> 4.0) - railties - rotp (~> 2.0) - diff-lcs (1.2.5) - diffy (3.0.7) - docile (1.1.5) - doorkeeper (4.0.0) - railties (>= 4.2) - dropzonejs-rails (0.7.3) - rails (> 3.1) - email_reply_parser (0.5.8) - email_spec (1.6.0) - launchy (~> 2.1) - mail (~> 2.2) - encryptor (3.0.0) - equalizer (0.0.11) - erubis (2.7.0) - escape_utils (1.1.1) - eventmachine (1.2.0.1) - excon (0.50.1) - execjs (2.7.0) - expression_parser (0.9.0) - factory_girl (4.5.0) - activesupport (>= 3.0.0) - factory_girl_rails (4.6.0) - factory_girl (~> 4.5.0) - railties (>= 3.0.0) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - faraday_middleware-multi_json (0.0.6) - faraday_middleware - multi_json - ffaker (2.0.0) - ffi (1.9.12) - flay (2.8.0) - erubis (~> 2.7.0) - path_expander (~> 1.0) - ruby_parser (~> 3.0) - sexp_processor (~> 4.0) - flog (4.4.0) - path_expander (~> 1.0) - ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.4) - flowdock (0.7.1) - httparty (~> 0.7) - multi_json - fog-aws (0.9.4) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-azure (0.0.2) - azure (~> 0.6) - fog-core (~> 1.27) - fog-json (~> 1.0) - fog-xml (~> 0.1) - fog-core (1.42.0) - builder - excon (~> 0.49) - formatador (~> 0.2) - fog-google (0.3.2) - fog-core - fog-json - fog-xml - fog-json (1.0.2) - fog-core (~> 1.0) - multi_json (~> 1.10) - fog-local (0.3.0) - fog-core (~> 1.27) - fog-openstack (0.1.7) - fog-core (>= 1.40) - fog-json (>= 1.0) - ipaddress (>= 0.8) - fog-rackspace (0.1.1) - fog-core (>= 1.35) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.8) - fog-xml (0.1.2) - fog-core - nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.3.1) - railties (>= 3.2, < 5.1) - foreman (0.82.0) - thor (~> 0.19.1) - formatador (0.2.5) - fuubar (2.0.0) - rspec (~> 3.0) - ruby-progressbar (~> 1.4) - gemnasium-gitlab-service (0.2.6) - rugged (~> 0.21) - gemojione (2.6.1) - json - get_process_mem (0.2.1) - gherkin-ruby (0.3.2) - github-linguist (4.7.6) - charlock_holmes (~> 0.7.3) - escape_utils (~> 1.1.0) - mime-types (>= 1.19) - rugged (>= 0.23.0b) - github-markup (1.3.3) - gitlab-flowdock-git-hook (1.0.1) - flowdock (~> 0.7) - gitlab-grit (>= 2.4.1) - multi_json - gitlab-grit (2.8.1) - charlock_holmes (~> 0.6) - diff-lcs (~> 1.1) - mime-types (>= 1.16, < 3) - posix-spawn (~> 0.3) - gitlab_meta (7.0) - gitlab_omniauth-ldap (1.2.1) - net-ldap (~> 0.9) - omniauth (~> 1.0) - pyu-ruby-sasl (~> 0.0.3.1) - rubyntlm (~> 0.3) - globalid (0.3.6) - activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.1) - gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.1.0) - github-markup (~> 1.3.3) - gollum-grit_adapter (~> 1.0) - nokogiri (~> 1.6.4) - rouge (~> 1.9) - sanitize (~> 2.1.0) - stringex (~> 2.5.1) - gollum-rugged_adapter (0.4.2) - mime-types (>= 1.15) - rugged (~> 0.24.0, >= 0.21.3) - gon (6.0.1) - actionpack (>= 3.0) - json - multi_json - request_store (>= 1.0) - grape (0.13.0) - activesupport - builder - hashie (>= 2.1.0) - multi_json (>= 1.3.2) - multi_xml (>= 0.5.2) - rack (>= 1.3.0) - rack-accept - rack-mount - virtus (>= 1.0.0) - grape-entity (0.4.8) - activesupport - multi_json (>= 1.3.2) - hamlit (2.5.0) - temple (~> 0.7.6) - thor - tilt - hashie (3.4.4) - health_check (1.5.1) - rails (>= 2.3.0) - hipchat (1.5.3) - httparty - mimemagic - html-pipeline (1.11.0) - activesupport (>= 2) - nokogiri (~> 1.4) - htmlentities (4.3.4) - http_parser.rb (0.5.3) - httparty (0.13.7) - json (~> 1.8) - multi_xml (>= 0.5.2) - httpclient (2.8.0) - i18n (0.7.0) - ice_nine (0.11.2) - influxdb (0.3.5) - cause - json - ipaddress (0.8.3) - jquery-atwho-rails (1.3.2) - jquery-rails (4.1.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jquery-turbolinks (2.1.0) - railties (>= 3.1.0) - turbolinks - jquery-ui-rails (5.0.5) - railties (>= 3.2.16) - json (1.8.3) - jwt (1.5.4) - kaminari (0.17.0) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - kgio (2.10.0) - knapsack (1.11.1) - rake - timecop (>= 0.1.0) - launchy (2.4.3) - addressable (~> 2.3) - letter_opener (1.4.1) - launchy (~> 2.2) - letter_opener_web (1.3.0) - actionmailer (>= 3.2) - letter_opener (~> 1.0) - railties (>= 3.2) - license_finder (2.1.2) - bundler - httparty - rubyzip - thor - xml-simple - licensee (8.0.0) - rugged (>= 0.24b) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.0.3) - nokogiri (>= 1.5.9) - macaddr (1.7.1) - systemu (~> 2.6.2) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mail_room (0.8.0) - method_source (0.8.2) - mime-types (2.99.2) - mimemagic (0.3.1) - mini_portile2 (2.1.0) - minitest (5.7.0) - mousetrap-rails (1.4.6) - multi_json (1.12.1) - multi_xml (0.5.5) - multipart-post (2.0.0) - mysql2 (0.3.21) - nested_form (0.3.2) - net-ldap (0.14.0) - net-ssh (3.0.2) - newrelic_rpm (3.16.0.318) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - numerizer (0.1.1) - oauth (0.5.1) - oauth2 (1.0.0) - faraday (>= 0.8, < 0.10) - jwt (~> 1.0) - multi_json (~> 1.3) - multi_xml (~> 0.5) - rack (~> 1.2) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) - omniauth (1.3.1) - hashie (>= 1.2, < 4) - rack (>= 1.0, < 3) - omniauth-auth0 (1.4.2) - omniauth-oauth2 (~> 1.1) - omniauth-azure-oauth2 (0.0.6) - jwt (~> 1.0) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-bitbucket (0.0.2) - multi_json (~> 1.7) - omniauth (~> 1.1) - omniauth-oauth (~> 1.0) - omniauth-cas3 (1.1.3) - addressable (~> 2.3) - nokogiri (~> 1.6.6) - omniauth (~> 1.2) - omniauth-facebook (3.0.0) - omniauth-oauth2 (~> 1.2) - omniauth-github (1.1.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.0) - omniauth-google-oauth2 (0.2.10) - addressable (~> 2.3) - jwt (~> 1.0) - multi_json (~> 1.3) - omniauth (>= 1.1.1) - omniauth-oauth2 (~> 1.3.1) - omniauth-kerberos (0.3.0) - omniauth-multipassword - timfel-krb5-auth (~> 0.8) - omniauth-multipassword (0.4.2) - omniauth (~> 1.0) - omniauth-oauth (1.1.0) - oauth - omniauth (~> 1.0) - omniauth-oauth2 (1.3.1) - oauth2 (~> 1.0) - omniauth (~> 1.2) - omniauth-saml (1.6.0) - omniauth (~> 1.3) - ruby-saml (~> 1.3) - omniauth-shibboleth (1.2.1) - omniauth (>= 1.0.0) - omniauth-twitter (1.2.1) - json (~> 1.3) - omniauth-oauth (~> 1.1) - omniauth_crowd (2.2.3) - activesupport - nokogiri (>= 1.4.4) - omniauth (~> 1.0) - org-ruby (0.9.12) - rubypants (~> 0.2) - orm_adapter (0.5.0) - paranoia (2.1.5) - activerecord (~> 4.0) - parser (2.3.1.2) - ast (~> 2.2) - path_expander (1.0.0) - pg (0.18.4) - pkg-config (1.1.7) - poltergeist (1.9.0) - capybara (~> 2.1) - cliver (~> 0.3.1) - multi_json (~> 1.0) - websocket-driver (>= 0.2.0) - posix-spawn (0.3.11) - powerpack (0.1.1) - premailer (1.8.7) - css_parser (>= 1.4.5) - htmlentities (>= 4.0.0) - premailer-rails (1.9.4) - actionmailer (>= 3, < 6) - premailer (~> 1.7, >= 1.7.9) - pry (0.10.3) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-rails (0.3.4) - pry (>= 0.9.10) - pyu-ruby-sasl (0.0.3.3) - rack (1.6.4) - rack-accept (0.4.5) - rack (>= 0.4) - rack-attack (4.3.1) - rack - rack-cors (0.4.0) - rack-mount (0.8.3) - rack (>= 1.0.0) - rack-oauth2 (1.2.3) - activesupport (>= 2.3) - attr_required (>= 0.0.5) - httpclient (>= 2.4) - multi_json (>= 1.3.6) - rack (>= 1.1) - rack-protection (1.5.3) - rack - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) - raindrops (0.16.0) - rake (10.5.0) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - rblineprof (0.3.6) - debugger-ruby_core_source (~> 1.3) - rdoc (3.12.2) - json (~> 1.4) - recaptcha (3.3.0) - json - redcarpet (3.3.4) - redis (3.3.0) - redis-actionpack (4.0.1) - actionpack (~> 4) - redis-rack (~> 1.5.0) - redis-store (~> 1.1.0) - redis-activesupport (4.1.5) - activesupport (>= 3, < 5) - redis-store (~> 1.1.0) - redis-namespace (1.5.2) - redis (~> 3.0, >= 3.0.4) - redis-rack (1.5.0) - rack (~> 1.5) - redis-store (~> 1.1.0) - redis-rails (4.0.0) - redis-actionpack (~> 4) - redis-activesupport (~> 4) - redis-store (~> 1.1.0) - redis-store (1.1.7) - redis (>= 2.2) - request_store (1.3.1) - rerun (0.11.0) - listen (~> 3.0) - responders (2.2.0) - railties (>= 4.2.0, < 5.1) - rinku (2.0.0) - rotp (2.1.2) - rouge (1.11.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) - rqrcode-rails3 (0.1.7) - rqrcode (>= 0.4.2) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.0) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-retry (0.4.5) - rspec-core - rspec-support (3.5.0) - rubocop (0.40.0) - parser (>= 2.3.1.0, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-rspec (1.5.0) - rubocop (>= 0.40.0) - ruby-fogbugz (0.2.1) - crack (~> 0.4) - ruby-progressbar (1.8.1) - ruby-saml (1.3.0) - nokogiri (>= 1.5.10) - ruby_dep (1.3.1) - ruby_parser (3.8.2) - sexp_processor (~> 4.1) - rubyntlm (0.6.0) - rubypants (0.2.0) - rubyzip (1.2.0) - rufus-scheduler (3.2.1) - rugged (0.24.0) - safe_yaml (1.0.4) - sanitize (2.1.0) - nokogiri (>= 1.4.4) - sass (3.4.22) - sass-rails (5.0.5) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) - scss_lint (0.47.1) - rake (>= 0.9, < 11) - sass (~> 3.4.15) - sdoc (0.3.20) - json (>= 1.1.3) - rdoc (~> 3.10) - seed-fu (2.3.6) - activerecord (>= 3.1) - activesupport (>= 3.1) - select2-rails (3.5.10) - thor (~> 0.14) - sentry-raven (1.1.0) - faraday (>= 0.7.6) - settingslogic (2.0.9) - sexp_processor (4.7.0) - sham_rack (1.3.6) - rack - shoulda-matchers (2.8.0) - activesupport (>= 3.0.0) - sidekiq (4.1.4) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.2, >= 2.2.0) - redis (~> 3.2, >= 3.2.1) - sinatra (>= 1.4.7) - sidekiq-cron (0.4.2) - redis-namespace (>= 1.5.2) - rufus-scheduler (>= 2.0.24) - sidekiq (>= 4.0.0) - simple_oauth (0.1.9) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - six (0.2.0) - slack-notifier (1.2.1) - slop (3.6.0) - spinach (0.8.10) - colorize - gherkin-ruby (>= 0.3.2) - json - spinach-rails (0.2.1) - capybara (>= 2.0.0) - railties (>= 3) - spinach (>= 0.4) - spinach-rerun-reporter (0.0.2) - spinach (~> 0.8) - spring (1.7.2) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) - spring-commands-spinach (1.1.0) - spring (>= 0.9.1) - spring-commands-teaspoon (0.0.2) - spring (>= 0.9.1) - sprockets (3.6.3) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.1.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - state_machines (0.4.0) - state_machines-activemodel (0.4.0) - activemodel (>= 4.1, < 5.1) - state_machines (>= 0.4.0) - state_machines-activerecord (0.4.0) - activerecord (>= 4.1, < 5.1) - state_machines-activemodel (>= 0.3.0) - stringex (2.5.2) - sys-filesystem (1.1.6) - ffi - systemu (2.6.5) - task_list (1.0.2) - html-pipeline - teaspoon (1.1.5) - railties (>= 3.2.5, < 6) - teaspoon-jasmine (2.2.0) - teaspoon (>= 1.0.0) - temple (0.7.7) - test_after_commit (0.4.2) - activerecord (>= 3.2) - thin (1.7.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - timecop (0.8.1) - timfel-krb5-auth (0.8.3) - tinder (1.10.1) - eventmachine (~> 1.0) - faraday (~> 0.9.0) - faraday_middleware (~> 0.9) - hashie (>= 1.0) - json (~> 1.8.0) - mime-types - multi_json (~> 1.7) - twitter-stream (~> 0.1) - turbolinks (2.5.3) - coffee-rails - twitter-stream (0.1.16) - eventmachine (>= 0.12.8) - http_parser.rb (~> 0.5.1) - simple_oauth (~> 0.1.4) - tzinfo (1.2.2) - thread_safe (~> 0.1) - u2f (0.2.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - underscore-rails (1.8.3) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.2) - unicode-display_width (1.1.0) - unicorn (4.9.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - unicorn-worker-killer (0.4.4) - get_process_mem (~> 0) - unicorn (>= 4, < 6) - uniform_notifier (1.10.0) - uuid (2.3.8) - macaddr (~> 1.0) - version_sorter (2.0.0) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - vmstat (2.1.0) - warden (1.2.6) - rack (>= 1.0) - web-console (2.3.0) - activemodel (>= 4.0) - binding_of_caller (>= 0.7.2) - railties (>= 4.0) - sprockets-rails (>= 2.0, < 4.0) - webmock (1.21.0) - addressable (>= 2.3.6) - crack (>= 0.3.2) - websocket-driver (0.6.4) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - wikicloth (0.8.1) - builder - expression_parser - rinku - xml-simple (1.1.5) - xpath (2.0.0) - nokogiri (~> 1.3) - -PLATFORMS - ruby - -DEPENDENCIES - RedCloth (~> 4.3.2) - ace-rails-ap (~> 4.0.2) - activerecord-session_store (~> 1.0.0) - acts-as-taggable-on (~> 3.4) - addressable (~> 2.3.8) - after_commit_queue - akismet (~> 2.0) - allocations (~> 1.0) - asana (~> 0.4.0) - asciidoctor (~> 1.5.2) - attr_encrypted (~> 3.0.0) - awesome_print (~> 1.2.0) - babosa (~> 1.0.2) - base32 (~> 0.3.0) - benchmark-ips - better_errors (~> 1.0.1) - binding_of_caller (~> 0.7.2) - bootstrap-sass (~> 3.3.0) - brakeman (~> 3.3.0) - browser (~> 2.2) - bullet - bundler-audit - byebug - capybara (~> 2.6.2) - capybara-screenshot (~> 1.0.0) - carrierwave (~> 0.10.0) - charlock_holmes (~> 0.7.3) - chronic_duration (~> 0.10.6) - coffee-rails (~> 4.1.0) - connection_pool (~> 2.0) - creole (~> 0.5.0) - d3_rails (~> 3.5.0) - database_cleaner (~> 1.4.0) - default_value_for (~> 3.0.0) - devise (~> 4.0) - devise-two-factor (~> 3.0.0) - diffy (~> 3.0.3) - doorkeeper (~> 4.0) - dropzonejs-rails (~> 0.7.1) - email_reply_parser (~> 0.5.8) - email_spec (~> 1.6.0) - factory_girl_rails (~> 4.6.0) - ffaker (~> 2.0.0) - flay - flog - fog-aws (~> 0.9) - fog-azure (~> 0.0) - fog-core (~> 1.40) - fog-google (~> 0.3) - fog-local (~> 0.3) - fog-openstack (~> 0.1) - fog-rackspace (~> 0.1.1) - font-awesome-rails (~> 4.6.1) - foreman - fuubar (~> 2.0.0) - gemnasium-gitlab-service (~> 0.2) - gemojione (~> 2.6) - github-linguist (~> 4.7.0) - github-markup (~> 1.3.1) - gitlab-flowdock-git-hook (~> 1.0.1) - gitlab_git (~> 10.2)! - gitlab_meta (= 7.0) - gitlab_omniauth-ldap (~> 1.2.1) - gollum-lib (~> 4.1.0) - gollum-rugged_adapter (~> 0.4.2) - gon (~> 6.0.1) - grape (~> 0.13.0) - grape-entity (~> 0.4.2) - hamlit (~> 2.5) - health_check (~> 1.5.1) - hipchat (~> 1.5.0) - html-pipeline (~> 1.11.0) - httparty (~> 0.13.3) - influxdb (~> 0.2) - jquery-atwho-rails (~> 1.3.2) - jquery-rails (~> 4.1.0) - jquery-turbolinks (~> 2.1.0) - jquery-ui-rails (~> 5.0.0) - jwt - kaminari (~> 0.17.0) - knapsack - letter_opener_web (~> 1.3.0) - license_finder - licensee (~> 8.0.0) - loofah (~> 2.0.3) - mail_room (~> 0.8) - method_source (~> 0.8) - minitest (~> 5.7.0) - mousetrap-rails (~> 1.4.6) - mysql2 (~> 0.3.16) - nested_form (~> 0.3.2) - net-ssh (~> 3.0.1) - newrelic_rpm (~> 3.14) - nokogiri (~> 1.6.7, >= 1.6.7.2) - oauth2 (~> 1.0.0) - octokit (~> 4.3.0) - omniauth (~> 1.3.1) - omniauth-auth0 (~> 1.4.1) - omniauth-azure-oauth2 (~> 0.0.6) - omniauth-bitbucket (~> 0.0.2) - omniauth-cas3 (~> 1.1.2) - omniauth-facebook (~> 3.0.0) - omniauth-github (~> 1.1.1) - omniauth-gitlab (~> 1.0.0) - omniauth-google-oauth2 (~> 0.2.0) - omniauth-kerberos (~> 0.3.0) - omniauth-saml (~> 1.6.0) - omniauth-shibboleth (~> 1.2.0) - omniauth-twitter (~> 1.2.0) - omniauth_crowd (~> 2.2.0) - org-ruby (~> 0.9.12) - paranoia (~> 2.0) - pg (~> 0.18.2) - poltergeist (~> 1.9.0) - premailer-rails (~> 1.9.0) - pry-rails - rack-attack (~> 4.3.1) - rack-cors (~> 0.4.0) - rack-oauth2 (~> 1.2.1) - rails (= 4.2.6) - rails-deprecated_sanitizer (~> 1.0.3) - rainbow (~> 2.1.0) - rblineprof - rdoc (~> 3.6) - recaptcha (~> 3.0) - redcarpet (~> 3.3.3) - redis (~> 3.2) - redis-namespace - redis-rails (~> 4.0.0) - request_store (~> 1.3.0) - rerun (~> 0.11.0) - responders (~> 2.0) - rouge (~> 1.11) - rqrcode-rails3 (~> 0.1.7) - rspec-rails (~> 3.5.0) - rspec-retry - rubocop (~> 0.40.0) - rubocop-rspec (~> 1.5.0) - ruby-fogbugz (~> 0.2.1) - sanitize (~> 2.0) - sass-rails (~> 5.0.0) - scss_lint (~> 0.47.0) - sdoc (~> 0.3.20) - seed-fu (~> 2.3.5) - select2-rails (~> 3.5.9) - sentry-raven (~> 1.1.0) - settingslogic (~> 2.0.9) - sham_rack - shoulda-matchers (~> 2.8.0) - sidekiq (~> 4.0) - sidekiq-cron (~> 0.4.0) - simplecov (~> 0.11.0) - sinatra (~> 1.4.4) - six (~> 0.2.0) - slack-notifier (~> 1.2.0) - spinach-rails (~> 0.2.1) - spinach-rerun-reporter (~> 0.0.2) - spring (~> 1.7.0) - spring-commands-rspec (~> 1.0.4) - spring-commands-spinach (~> 1.1.0) - spring-commands-teaspoon (~> 0.0.2) - sprockets (~> 3.6.0) - state_machines-activerecord (~> 0.4.0) - sys-filesystem (~> 1.1.6) - task_list (~> 1.0.2) - teaspoon (~> 1.1.0) - teaspoon-jasmine (~> 2.2.0) - test_after_commit (~> 0.4.2) - thin (~> 1.7.0) - tinder (~> 1.10.0) - turbolinks (~> 2.5.0) - u2f (~> 0.2.1) - uglifier (~> 2.7.2) - underscore-rails (~> 1.8.0) - unf (~> 0.1.4) - unicorn (~> 4.9.0) - unicorn-worker-killer (~> 0.4.2) - version_sorter (~> 2.0.0) - virtus (~> 1.0.1) - vmstat (~> 2.1.0) - web-console (~> 2.0) - webmock (~> 1.21.0) - wikicloth (= 0.8.1) - -BUNDLED WITH - 1.10.6 -- cgit v1.2.1 From 08f14ef4488517bd7408eb69ec07f5e1a350d8fa Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 7 Jul 2016 12:18:33 +0100 Subject: Fixed GFM autocomplete not loading on wiki pages Closes #19580 --- CHANGELOG | 1 + app/views/layouts/_init_auto_complete.html.haml | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index bc9bb7747a4..93586ca7a7b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ v 8.10.0 (unreleased) - Let Workhorse serve format-patch diffs - Make images fit to the size of the viewport !4810 - Fix check for New Branch button on Issue page !4630 (winniehell) + - Fix GFM autocomplete not working on wiki pages - Fix MR-auto-close text added to description. !4836 - Fix issue, preventing users w/o push access to sort tags !5105 (redetection) - Add Spring EmojiOne updates. diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml index 12e7ed0e792..79483d629d0 100644 --- a/app/views/layouts/_init_auto_complete.html.haml +++ b/app/views/layouts/_init_auto_complete.html.haml @@ -1,7 +1,7 @@ - project = @target_project || @project +- noteable_class = @noteable.nil? ? nil : @noteable.class -- if @noteable - :javascript - GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: @noteable.class, type_id: params[:id])}" - GitLab.GfmAutoComplete.cachedData = undefined; - GitLab.GfmAutoComplete.setup(); +:javascript + GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: noteable_class, type_id: params[:id])}" + GitLab.GfmAutoComplete.cachedData = undefined; + GitLab.GfmAutoComplete.setup(); -- cgit v1.2.1 From 56e62df5d1631996ebe9b7fef4a078a9548c577f Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 10:40:10 +0100 Subject: adds Gemfile.lock to mr --- Gemfile.lock | 994 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 994 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000000..8809edb0fc9 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,994 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.3.2) + ace-rails-ap (4.0.2) + actionmailer (4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.6) + actionview (= 4.2.6) + activesupport (= 4.2.6) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.6) + activesupport (= 4.2.6) + globalid (>= 0.3.0) + activemodel (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + activerecord (4.2.6) + activemodel (= 4.2.6) + activesupport (= 4.2.6) + arel (~> 6.0) + activerecord-session_store (1.0.0) + actionpack (>= 4.0, < 5.1) + activerecord (>= 4.0, < 5.1) + multi_json (~> 1.11, >= 1.11.2) + rack (>= 1.5.2, < 3) + railties (>= 4.0, < 5.1) + activesupport (4.2.6) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + acts-as-taggable-on (3.5.0) + activerecord (>= 3.2, < 5) + addressable (2.3.8) + after_commit_queue (1.3.0) + activerecord (>= 3.0) + akismet (2.0.0) + allocations (1.0.5) + arel (6.0.3) + asana (0.4.0) + faraday (~> 0.9) + faraday_middleware (~> 0.9) + faraday_middleware-multi_json (~> 0.0) + oauth2 (~> 1.0) + asciidoctor (1.5.4) + ast (2.3.0) + attr_encrypted (3.0.1) + encryptor (~> 3.0.0) + attr_required (1.0.1) + autoprefixer-rails (6.3.7) + execjs + awesome_print (1.2.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + azure (0.7.5) + addressable (~> 2.3) + azure-core (~> 0.1) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + json (~> 1.8) + mime-types (>= 1, < 3.0) + nokogiri (~> 1.6) + systemu (~> 2.6) + thor (~> 0.19) + uuid (~> 2.0) + azure-core (0.1.2) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + nokogiri (~> 1.6) + babosa (1.0.2) + base32 (0.3.2) + bcrypt (3.1.11) + benchmark-ips (2.6.1) + better_errors (1.0.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bootstrap-sass (3.3.6) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + brakeman (3.3.2) + browser (2.2.0) + builder (3.2.2) + bullet (5.1.1) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.10.0) + bundler-audit (0.5.0) + bundler (~> 1.2) + thor (~> 0.18) + byebug (9.0.5) + capybara (2.6.2) + addressable + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + capybara-screenshot (1.0.13) + capybara (>= 1.0, < 3) + launchy + carrierwave (0.10.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + mime-types (>= 1.16) + cause (0.1) + charlock_holmes (0.7.3) + chronic_duration (0.10.6) + numerizer (~> 0.1.1) + chunky_png (1.3.6) + cliver (0.3.2) + coderay (1.1.1) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + coffee-rails (4.1.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.1.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorize (0.8.1) + concurrent-ruby (1.0.2) + connection_pool (2.2.0) + crack (0.4.3) + safe_yaml (~> 1.0.0) + creole (0.5.0) + css_parser (1.4.5) + addressable + d3_rails (3.5.16) + railties (>= 3.1.0) + daemons (1.2.3) + database_cleaner (1.4.1) + debug_inspector (0.0.2) + debugger-ruby_core_source (1.3.8) + default_value_for (3.0.1) + activerecord (>= 3.2.0, < 5.0) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + devise (4.2.0) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 5.1) + responders + warden (~> 1.2.3) + devise-two-factor (3.0.0) + activesupport + attr_encrypted (>= 1.3, < 4, != 2) + devise (~> 4.0) + railties + rotp (~> 2.0) + diff-lcs (1.2.5) + diffy (3.0.7) + docile (1.1.5) + doorkeeper (4.0.0) + railties (>= 4.2) + dropzonejs-rails (0.7.3) + rails (> 3.1) + email_reply_parser (0.5.8) + email_spec (1.6.0) + launchy (~> 2.1) + mail (~> 2.2) + encryptor (3.0.0) + equalizer (0.0.11) + erubis (2.7.0) + escape_utils (1.1.1) + eventmachine (1.2.0.1) + excon (0.50.1) + execjs (2.7.0) + expression_parser (0.9.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.6.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) + faraday_middleware-multi_json (0.0.6) + faraday_middleware + multi_json + ffaker (2.0.0) + ffi (1.9.13) + flay (2.8.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.4.0) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.4) + flowdock (0.7.1) + httparty (~> 0.7) + multi_json + fog-aws (0.9.4) + fog-core (~> 1.38) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-azure (0.0.2) + azure (~> 0.6) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + fog-core (1.42.0) + builder + excon (~> 0.49) + formatador (~> 0.2) + fog-google (0.3.2) + fog-core + fog-json + fog-xml + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-local (0.3.0) + fog-core (~> 1.27) + fog-openstack (0.1.7) + fog-core (>= 1.40) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-rackspace (0.1.1) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-xml (0.1.2) + fog-core + nokogiri (~> 1.5, >= 1.5.11) + font-awesome-rails (4.6.3.1) + railties (>= 3.2, < 5.1) + foreman (0.82.0) + thor (~> 0.19.1) + formatador (0.2.5) + fuubar (2.0.0) + rspec (~> 3.0) + ruby-progressbar (~> 1.4) + gemnasium-gitlab-service (0.2.6) + rugged (~> 0.21) + gemojione (2.6.1) + json + get_process_mem (0.2.1) + gherkin-ruby (0.3.2) + github-linguist (4.7.6) + charlock_holmes (~> 0.7.3) + escape_utils (~> 1.1.0) + mime-types (>= 1.19) + rugged (>= 0.23.0b) + github-markup (1.3.3) + gitlab-flowdock-git-hook (1.0.1) + flowdock (~> 0.7) + gitlab-grit (>= 2.4.1) + multi_json + gitlab-grit (2.8.1) + charlock_holmes (~> 0.6) + diff-lcs (~> 1.1) + mime-types (>= 1.16, < 3) + posix-spawn (~> 0.3) + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + gitlab_meta (7.0) + gitlab_omniauth-ldap (1.2.1) + net-ldap (~> 0.9) + omniauth (~> 1.0) + pyu-ruby-sasl (~> 0.0.3.1) + rubyntlm (~> 0.3) + globalid (0.3.6) + activesupport (>= 4.1.0) + gollum-grit_adapter (1.0.1) + gitlab-grit (~> 2.7, >= 2.7.1) + gollum-lib (4.1.0) + github-markup (~> 1.3.3) + gollum-grit_adapter (~> 1.0) + nokogiri (~> 1.6.4) + rouge (~> 1.9) + sanitize (~> 2.1.0) + stringex (~> 2.5.1) + gollum-rugged_adapter (0.4.2) + mime-types (>= 1.15) + rugged (~> 0.24.0, >= 0.21.3) + gon (6.0.1) + actionpack (>= 3.0) + json + multi_json + request_store (>= 1.0) + grape (0.13.0) + activesupport + builder + hashie (>= 2.1.0) + multi_json (>= 1.3.2) + multi_xml (>= 0.5.2) + rack (>= 1.3.0) + rack-accept + rack-mount + virtus (>= 1.0.0) + grape-entity (0.4.8) + activesupport + multi_json (>= 1.3.2) + hamlit (2.5.0) + temple (~> 0.7.6) + thor + tilt + hashie (3.4.4) + health_check (1.5.1) + rails (>= 2.3.0) + hipchat (1.5.3) + httparty + mimemagic + html-pipeline (1.11.0) + activesupport (>= 2) + nokogiri (~> 1.4) + htmlentities (4.3.4) + http_parser.rb (0.5.3) + httparty (0.13.7) + json (~> 1.8) + multi_xml (>= 0.5.2) + httpclient (2.8.0) + i18n (0.7.0) + ice_nine (0.11.2) + influxdb (0.3.5) + cause + json + ipaddress (0.8.3) + jquery-atwho-rails (1.3.2) + jquery-rails (4.1.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) + json (1.8.3) + jwt (1.5.4) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.10.0) + knapsack (1.11.1) + rake + timecop (>= 0.1.0) + launchy (2.4.3) + addressable (~> 2.3) + letter_opener (1.4.1) + launchy (~> 2.2) + letter_opener_web (1.3.0) + actionmailer (>= 3.2) + letter_opener (~> 1.0) + railties (>= 3.2) + license_finder (2.1.2) + bundler + httparty + rubyzip + thor + xml-simple + licensee (8.0.0) + rugged (>= 0.24b) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.0.3) + nokogiri (>= 1.5.9) + macaddr (1.7.1) + systemu (~> 2.6.2) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mail_room (0.8.0) + method_source (0.8.2) + mime-types (2.99.2) + mimemagic (0.3.1) + mini_portile2 (2.1.0) + minitest (5.7.0) + mousetrap-rails (1.4.6) + multi_json (1.12.1) + multi_xml (0.5.5) + multipart-post (2.0.0) + mysql2 (0.3.21) + nested_form (0.3.2) + net-ldap (0.14.0) + net-ssh (3.0.2) + newrelic_rpm (3.16.0.318) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + numerizer (0.1.1) + oauth (0.5.1) + oauth2 (1.0.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (~> 1.2) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) + omniauth (1.3.1) + hashie (>= 1.2, < 4) + rack (>= 1.0, < 3) + omniauth-auth0 (1.4.2) + omniauth-oauth2 (~> 1.1) + omniauth-azure-oauth2 (0.0.6) + jwt (~> 1.0) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-bitbucket (0.0.2) + multi_json (~> 1.7) + omniauth (~> 1.1) + omniauth-oauth (~> 1.0) + omniauth-cas3 (1.1.3) + addressable (~> 2.3) + nokogiri (~> 1.6.6) + omniauth (~> 1.2) + omniauth-facebook (3.0.0) + omniauth-oauth2 (~> 1.2) + omniauth-github (1.1.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-gitlab (1.0.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.0) + omniauth-google-oauth2 (0.2.10) + addressable (~> 2.3) + jwt (~> 1.0) + multi_json (~> 1.3) + omniauth (>= 1.1.1) + omniauth-oauth2 (~> 1.3.1) + omniauth-kerberos (0.3.0) + omniauth-multipassword + timfel-krb5-auth (~> 0.8) + omniauth-multipassword (0.4.2) + omniauth (~> 1.0) + omniauth-oauth (1.1.0) + oauth + omniauth (~> 1.0) + omniauth-oauth2 (1.3.1) + oauth2 (~> 1.0) + omniauth (~> 1.2) + omniauth-saml (1.6.0) + omniauth (~> 1.3) + ruby-saml (~> 1.3) + omniauth-shibboleth (1.2.1) + omniauth (>= 1.0.0) + omniauth-twitter (1.2.1) + json (~> 1.3) + omniauth-oauth (~> 1.1) + omniauth_crowd (2.2.3) + activesupport + nokogiri (>= 1.4.4) + omniauth (~> 1.0) + org-ruby (0.9.12) + rubypants (~> 0.2) + orm_adapter (0.5.0) + paranoia (2.1.5) + activerecord (~> 4.0) + parser (2.3.1.2) + ast (~> 2.2) + path_expander (1.0.0) + pg (0.18.4) + pkg-config (1.1.7) + poltergeist (1.9.0) + capybara (~> 2.1) + cliver (~> 0.3.1) + multi_json (~> 1.0) + websocket-driver (>= 0.2.0) + posix-spawn (0.3.11) + powerpack (0.1.1) + premailer (1.8.7) + css_parser (>= 1.4.5) + htmlentities (>= 4.0.0) + premailer-rails (1.9.4) + actionmailer (>= 3, < 6) + premailer (~> 1.7, >= 1.7.9) + pry (0.10.3) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.4) + pry (>= 0.9.10) + pyu-ruby-sasl (0.0.3.3) + rack (1.6.4) + rack-accept (0.4.5) + rack (>= 0.4) + rack-attack (4.3.1) + rack + rack-cors (0.4.0) + rack-mount (0.8.3) + rack (>= 1.0.0) + rack-oauth2 (1.2.3) + activesupport (>= 2.3) + attr_required (>= 0.0.5) + httpclient (>= 2.4) + multi_json (>= 1.3.6) + rack (>= 1.1) + rack-protection (1.5.3) + rack + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.6) + actionmailer (= 4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + activemodel (= 4.2.6) + activerecord (= 4.2.6) + activesupport (= 4.2.6) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.6) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (4.2.6) + actionpack (= 4.2.6) + activesupport (= 4.2.6) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rainbow (2.1.0) + raindrops (0.16.0) + rake (10.5.0) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + rblineprof (0.3.6) + debugger-ruby_core_source (~> 1.3) + rdoc (3.12.2) + json (~> 1.4) + recaptcha (3.3.0) + json + redcarpet (3.3.4) + redis (3.3.0) + redis-actionpack (4.0.1) + actionpack (~> 4) + redis-rack (~> 1.5.0) + redis-store (~> 1.1.0) + redis-activesupport (4.1.5) + activesupport (>= 3, < 5) + redis-store (~> 1.1.0) + redis-namespace (1.5.2) + redis (~> 3.0, >= 3.0.4) + redis-rack (1.5.0) + rack (~> 1.5) + redis-store (~> 1.1.0) + redis-rails (4.0.0) + redis-actionpack (~> 4) + redis-activesupport (~> 4) + redis-store (~> 1.1.0) + redis-store (1.1.7) + redis (>= 2.2) + request_store (1.3.1) + rerun (0.11.0) + listen (~> 3.0) + responders (2.2.0) + railties (>= 4.2.0, < 5.1) + rinku (2.0.0) + rotp (2.1.2) + rouge (1.11.1) + rqrcode (0.10.1) + chunky_png (~> 1.0) + rqrcode-rails3 (0.1.7) + rqrcode (>= 0.4.2) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.1) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-retry (0.4.5) + rspec-core + rspec-support (3.5.0) + rubocop (0.40.0) + parser (>= 2.3.1.0, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + rubocop-rspec (1.5.0) + rubocop (>= 0.40.0) + ruby-fogbugz (0.2.1) + crack (~> 0.4) + ruby-progressbar (1.8.1) + ruby-saml (1.3.0) + nokogiri (>= 1.5.10) + ruby_dep (1.3.1) + ruby_parser (3.8.2) + sexp_processor (~> 4.1) + rubyntlm (0.6.0) + rubypants (0.2.0) + rubyzip (1.2.0) + rufus-scheduler (3.2.1) + rugged (0.24.0) + safe_yaml (1.0.4) + sanitize (2.1.0) + nokogiri (>= 1.4.4) + sass (3.4.22) + sass-rails (5.0.5) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) + faraday (~> 0.8, < 0.10) + scss_lint (0.47.1) + rake (>= 0.9, < 11) + sass (~> 3.4.15) + sdoc (0.3.20) + json (>= 1.1.3) + rdoc (~> 3.10) + seed-fu (2.3.6) + activerecord (>= 3.1) + activesupport (>= 3.1) + select2-rails (3.5.10) + thor (~> 0.14) + sentry-raven (1.1.0) + faraday (>= 0.7.6) + settingslogic (2.0.9) + sexp_processor (4.7.0) + sham_rack (1.3.6) + rack + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + sidekiq (4.1.4) + concurrent-ruby (~> 1.0) + connection_pool (~> 2.2, >= 2.2.0) + redis (~> 3.2, >= 3.2.1) + sinatra (>= 1.4.7) + sidekiq-cron (0.4.2) + redis-namespace (>= 1.5.2) + rufus-scheduler (>= 2.0.24) + sidekiq (>= 4.0.0) + simple_oauth (0.1.9) + simplecov (0.11.2) + docile (~> 1.1.0) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + sinatra (1.4.7) + rack (~> 1.5) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + six (0.2.0) + slack-notifier (1.2.1) + slop (3.6.0) + spinach (0.8.10) + colorize + gherkin-ruby (>= 0.3.2) + json + spinach-rails (0.2.1) + capybara (>= 2.0.0) + railties (>= 3) + spinach (>= 0.4) + spinach-rerun-reporter (0.0.2) + spinach (~> 0.8) + spring (1.7.2) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) + spring-commands-spinach (1.1.0) + spring (>= 0.9.1) + spring-commands-teaspoon (0.0.2) + spring (>= 0.9.1) + sprockets (3.6.3) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.1.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + state_machines (0.4.0) + state_machines-activemodel (0.4.0) + activemodel (>= 4.1, < 5.1) + state_machines (>= 0.4.0) + state_machines-activerecord (0.4.0) + activerecord (>= 4.1, < 5.1) + state_machines-activemodel (>= 0.3.0) + stringex (2.5.2) + sys-filesystem (1.1.6) + ffi + systemu (2.6.5) + task_list (1.0.2) + html-pipeline + teaspoon (1.1.5) + railties (>= 3.2.5, < 6) + teaspoon-jasmine (2.2.0) + teaspoon (>= 1.0.0) + temple (0.7.7) + test_after_commit (0.4.2) + activerecord (>= 3.2) + thin (1.7.0) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.5) + timecop (0.8.1) + timfel-krb5-auth (0.8.3) + tinder (1.10.1) + eventmachine (~> 1.0) + faraday (~> 0.9.0) + faraday_middleware (~> 0.9) + hashie (>= 1.0) + json (~> 1.8.0) + mime-types + multi_json (~> 1.7) + twitter-stream (~> 0.1) + turbolinks (2.5.3) + coffee-rails + twitter-stream (0.1.16) + eventmachine (>= 0.12.8) + http_parser.rb (~> 0.5.1) + simple_oauth (~> 0.1.4) + tzinfo (1.2.2) + thread_safe (~> 0.1) + u2f (0.2.1) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + underscore-rails (1.8.3) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + unicode-display_width (1.1.0) + unicorn (4.9.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + unicorn-worker-killer (0.4.4) + get_process_mem (~> 0) + unicorn (>= 4, < 6) + uniform_notifier (1.10.0) + uuid (2.3.8) + macaddr (~> 1.0) + version_sorter (2.0.0) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + vmstat (2.1.0) + warden (1.2.6) + rack (>= 1.0) + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + webmock (1.21.0) + addressable (>= 2.3.6) + crack (>= 0.3.2) + websocket-driver (0.6.4) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + wikicloth (0.8.1) + builder + expression_parser + rinku + xml-simple (1.1.5) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth (~> 4.3.2) + ace-rails-ap (~> 4.0.2) + activerecord-session_store (~> 1.0.0) + acts-as-taggable-on (~> 3.4) + addressable (~> 2.3.8) + after_commit_queue + akismet (~> 2.0) + allocations (~> 1.0) + asana (~> 0.4.0) + asciidoctor (~> 1.5.2) + attr_encrypted (~> 3.0.0) + awesome_print (~> 1.2.0) + babosa (~> 1.0.2) + base32 (~> 0.3.0) + benchmark-ips + better_errors (~> 1.0.1) + binding_of_caller (~> 0.7.2) + bootstrap-sass (~> 3.3.0) + brakeman (~> 3.3.0) + browser (~> 2.2) + bullet + bundler-audit + byebug + capybara (~> 2.6.2) + capybara-screenshot (~> 1.0.0) + carrierwave (~> 0.10.0) + charlock_holmes (~> 0.7.3) + chronic_duration (~> 0.10.6) + coffee-rails (~> 4.1.0) + connection_pool (~> 2.0) + creole (~> 0.5.0) + d3_rails (~> 3.5.0) + database_cleaner (~> 1.4.0) + default_value_for (~> 3.0.0) + devise (~> 4.0) + devise-two-factor (~> 3.0.0) + diffy (~> 3.0.3) + doorkeeper (~> 4.0) + dropzonejs-rails (~> 0.7.1) + email_reply_parser (~> 0.5.8) + email_spec (~> 1.6.0) + factory_girl_rails (~> 4.6.0) + ffaker (~> 2.0.0) + flay + flog + fog-aws (~> 0.9) + fog-azure (~> 0.0) + fog-core (~> 1.40) + fog-google (~> 0.3) + fog-local (~> 0.3) + fog-openstack (~> 0.1) + fog-rackspace (~> 0.1.1) + font-awesome-rails (~> 4.6.1) + foreman + fuubar (~> 2.0.0) + gemnasium-gitlab-service (~> 0.2) + gemojione (~> 2.6) + github-linguist (~> 4.7.0) + github-markup (~> 1.3.1) + gitlab-flowdock-git-hook (~> 1.0.1) + gitlab_git (~> 10.2) + gitlab_meta (= 7.0) + gitlab_omniauth-ldap (~> 1.2.1) + gollum-lib (~> 4.1.0) + gollum-rugged_adapter (~> 0.4.2) + gon (~> 6.0.1) + grape (~> 0.13.0) + grape-entity (~> 0.4.2) + hamlit (~> 2.5) + health_check (~> 1.5.1) + hipchat (~> 1.5.0) + html-pipeline (~> 1.11.0) + httparty (~> 0.13.3) + influxdb (~> 0.2) + jquery-atwho-rails (~> 1.3.2) + jquery-rails (~> 4.1.0) + jquery-turbolinks (~> 2.1.0) + jquery-ui-rails (~> 5.0.0) + jwt + kaminari (~> 0.17.0) + knapsack + letter_opener_web (~> 1.3.0) + license_finder + licensee (~> 8.0.0) + loofah (~> 2.0.3) + mail_room (~> 0.8) + method_source (~> 0.8) + minitest (~> 5.7.0) + mousetrap-rails (~> 1.4.6) + mysql2 (~> 0.3.16) + nested_form (~> 0.3.2) + net-ssh (~> 3.0.1) + newrelic_rpm (~> 3.14) + nokogiri (~> 1.6.7, >= 1.6.7.2) + oauth2 (~> 1.0.0) + octokit (~> 4.3.0) + omniauth (~> 1.3.1) + omniauth-auth0 (~> 1.4.1) + omniauth-azure-oauth2 (~> 0.0.6) + omniauth-bitbucket (~> 0.0.2) + omniauth-cas3 (~> 1.1.2) + omniauth-facebook (~> 3.0.0) + omniauth-github (~> 1.1.1) + omniauth-gitlab (~> 1.0.0) + omniauth-google-oauth2 (~> 0.2.0) + omniauth-kerberos (~> 0.3.0) + omniauth-saml (~> 1.6.0) + omniauth-shibboleth (~> 1.2.0) + omniauth-twitter (~> 1.2.0) + omniauth_crowd (~> 2.2.0) + org-ruby (~> 0.9.12) + paranoia (~> 2.0) + pg (~> 0.18.2) + poltergeist (~> 1.9.0) + premailer-rails (~> 1.9.0) + pry-rails + rack-attack (~> 4.3.1) + rack-cors (~> 0.4.0) + rack-oauth2 (~> 1.2.1) + rails (= 4.2.6) + rails-deprecated_sanitizer (~> 1.0.3) + rainbow (~> 2.1.0) + rblineprof + rdoc (~> 3.6) + recaptcha (~> 3.0) + redcarpet (~> 3.3.3) + redis (~> 3.2) + redis-namespace + redis-rails (~> 4.0.0) + request_store (~> 1.3.0) + rerun (~> 0.11.0) + responders (~> 2.0) + rouge (~> 1.11) + rqrcode-rails3 (~> 0.1.7) + rspec-rails (~> 3.5.0) + rspec-retry + rubocop (~> 0.40.0) + rubocop-rspec (~> 1.5.0) + ruby-fogbugz (~> 0.2.1) + sanitize (~> 2.0) + sass-rails (~> 5.0.0) + scss_lint (~> 0.47.0) + sdoc (~> 0.3.20) + seed-fu (~> 2.3.5) + select2-rails (~> 3.5.9) + sentry-raven (~> 1.1.0) + settingslogic (~> 2.0.9) + sham_rack + shoulda-matchers (~> 2.8.0) + sidekiq (~> 4.0) + sidekiq-cron (~> 0.4.0) + simplecov (~> 0.11.0) + sinatra (~> 1.4.4) + six (~> 0.2.0) + slack-notifier (~> 1.2.0) + spinach-rails (~> 0.2.1) + spinach-rerun-reporter (~> 0.0.2) + spring (~> 1.7.0) + spring-commands-rspec (~> 1.0.4) + spring-commands-spinach (~> 1.1.0) + spring-commands-teaspoon (~> 0.0.2) + sprockets (~> 3.6.0) + state_machines-activerecord (~> 0.4.0) + sys-filesystem (~> 1.1.6) + task_list (~> 1.0.2) + teaspoon (~> 1.1.0) + teaspoon-jasmine (~> 2.2.0) + test_after_commit (~> 0.4.2) + thin (~> 1.7.0) + tinder (~> 1.10.0) + turbolinks (~> 2.5.0) + u2f (~> 0.2.1) + uglifier (~> 2.7.2) + underscore-rails (~> 1.8.0) + unf (~> 0.1.4) + unicorn (~> 4.9.0) + unicorn-worker-killer (~> 0.4.2) + version_sorter (~> 2.0.0) + virtus (~> 1.0.1) + vmstat (~> 2.1.0) + web-console (~> 2.0) + webmock (~> 1.21.0) + wikicloth (= 0.8.1) + +BUNDLED WITH + 1.12.5 -- cgit v1.2.1 From fe40a148fe9608dc9e0c0133f4a3e768ab53e1bf Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 3 ++- app/services/files/update_service.rb | 1 + app/views/projects/blob/_editor.html.haml | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 5356fdf010d..bcd436f2429 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + # params[:file_name] stores the new name for the file + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 1960dc7d949..52451d72b57 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + # Need to update file_path with the new filename repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 29c7d45074a..3c64b2f5e96 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,7 +4,11 @@ = icon('code-fork') = ref %span.editor-file-name - = @path + - if current_action?(:edit) && can?(current_user, :push_code, @project) + = text_field_tag 'file_name', params[:file_name], placeholder: @path, + class: 'form-control new-file-name' + - else + = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From 298abfd3b488c9c783ea59ef57e769da009af125 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 6 +++++- app/services/files/base_service.rb | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index dacb5679dd3..84b4a30c6d5 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -7,7 +7,8 @@ module CreatesCommit commit_params = @commit_params.merge( source_project: @project, source_branch: @ref, - target_branch: @target_branch + target_branch: @target_branch, + file_path: @path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index bcd436f2429..116f184c240 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,11 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else # params[:file_name] stores the new name for the file - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) + unless params[:file_name] == @path + @path = params[:file_name] + end + + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 37c5e321b39..ac5d7ddde02 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,7 @@ module Files params[:file_content] end + # Validate parameters validate # Create new branch if it different from source_branch -- cgit v1.2.1 From abc2f4434ab88e84e8c651089fdbb44b33f1f570 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/controllers/projects/blob_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 116f184c240..cf7f00d3113 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,8 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - # params[:file_name] stores the new name for the file unless params[:file_name] == @path + previous_path = @path @path = params[:file_name] end -- cgit v1.2.1 From 29b3b2832c773356109e09905c9a170235e77a67 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index cf7f00d3113..2b8e76d4638 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -47,7 +47,6 @@ class Projects::BlobController < Projects::ApplicationController previous_path = @path @path = params[:file_name] end - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From ffe07fad954bad4e047412efebae8740e21417cc Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/projects/blob_controller.rb | 1 + app/services/files/base_service.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 2b8e76d4638..cf7f00d3113 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -47,6 +47,7 @@ class Projects::BlobController < Projects::ApplicationController previous_path = @path @path = params[:file_name] end + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index ac5d7ddde02..af7af5213c0 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 06608b4867a96a01fa562327fa3fc1e2cc77ac5b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index af7af5213c0..ac5d7ddde02 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,8 +15,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 2a7806b815a38e6d449e785a3340d0e681e42ea5 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 2 +- app/models/repository.rb | 30 +++++++++++++++++++++++++++++ app/services/files/base_service.rb | 1 + app/services/files/update_service.rb | 2 +- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 84b4a30c6d5..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,8 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @path + file_path: @path, + previous_path: @previous_path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index cf7f00d3113..5f4639d4119 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,7 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else unless params[:file_name] == @path - previous_path = @path + @previous_path = @path @path = params[:file_name] end diff --git a/app/models/repository.rb b/app/models/repository.rb index 5b670cb4b8f..709b5edd31e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -731,6 +731,36 @@ class Repository end end + def update_file(user, path, previous_path, content, message, branch, update) + commit_with_hooks(user, branch) do |ref| + committer = user_to_committer(user) + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, + branch: ref, + } + + if previous_path + options[:file] = { + path: previous_path + } + + + Gitlab::Git::Blob.remove(raw_repository, options) + end + + options[:file] = { + content: content, + path: path, + update: update + } + + Gitlab::Git::Blob.commit(raw_repository, options) + end + end + def remove_file(user, path, message, branch) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index ac5d7ddde02..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -9,6 +9,7 @@ module Files @commit_message = params[:commit_message] @file_path = params[:file_path] + @previous_path = params[:previous_path] @file_content = if params[:file_content_encoding] == 'base64' Base64.decode64(params[:file_content]) else diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 52451d72b57..6d015642b91 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,7 +4,7 @@ module Files class UpdateService < Files::BaseService def commit # Need to update file_path with the new filename - repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) + repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end end -- cgit v1.2.1 From 8230e50dadff14359a9ff5f620dfdb8cf6e62dba Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/services/files/update_service.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 6d015642b91..fefa1d4ef68 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,7 +3,6 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - # Need to update file_path with the new filename repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end -- cgit v1.2.1 From bde24b6938c0b9a68f658c9b6b124cc47d3b3a8c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 9a9ecc313f7963f134247e0815b285b5733e07c7 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 66361f4cee2eb1482c9f9e77df8639ef7fa03a6c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 16:46:37 +0100 Subject: refactors blob_controller --- Gemfile | 2 +- Gemfile.lock | 15 +++++++++++++++ app/controllers/concerns/creates_commit.rb | 8 ++++++++ app/controllers/projects/blob_controller.rb | 2 +- app/models/repository.rb | 19 ++++++++----------- 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index f47084f9d90..6c27999cd18 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2' +gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 055596b056f..e759b22acf4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,12 @@ +PATH + remote: ~/src/Gitlab/gitlab_git + specs: + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + GEM remote: https://rubygems.org/ specs: @@ -274,11 +283,16 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) +<<<<<<< 9a9ecc313f7963f134247e0815b285b5733e07c7 gitlab_git (10.2.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) rugged (~> 0.24.0) +======= + gitlab_emoji (0.3.1) + gemojione (~> 2.2, >= 2.2.1) +>>>>>>> refactors blob_controller gitlab_meta (7.0) gitlab_omniauth-ldap (1.2.1) net-ldap (~> 0.9) @@ -389,6 +403,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) + mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a3731b45df0 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,8 +12,16 @@ module CreatesCommit previous_path: @previous_path ) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + result = service.new(@tree_edit_project, current_user, commit_params).execute + puts "#" * 30 + puts result[:status] + puts "#" * 30 + if result[:status] == :success update_flash_notice(success_notice) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 5f4639d4119..13279cd3d60 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,7 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - unless params[:file_name] == @path + unless params[:file_name].empty? @previous_path = @path @path = params[:file_name] end diff --git a/app/models/repository.rb b/app/models/repository.rb index 709b5edd31e..b63713acdf5 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -739,25 +739,22 @@ class Repository options[:author] = committer options[:commit] = { message: message, - branch: ref, + branch: ref } - if previous_path - options[:file] = { - path: previous_path - } - - - Gitlab::Git::Blob.remove(raw_repository, options) - end - options[:file] = { content: content, path: path, update: update } - Gitlab::Git::Blob.commit(raw_repository, options) + if previous_path + options[:file].merge!(previous_path: previous_path) + + Gitlab::Git::Blob.rename(raw_repository, options) + else + Gitlab::Git::Blob.commit(raw_repository, options) + end end end -- cgit v1.2.1 From 352788f4d82febda0e6561ca6b87efe0a8bf314b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From ec7a787a62ee85fcbe7d189c2a10f046cdc123f0 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From cd6b61427441f15a0c44861eaac00bce0128fa2a Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index b63713acdf5..78854ea41dd 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -739,15 +739,31 @@ class Repository options[:author] = committer options[:commit] = { message: message, +<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 branch: ref } +======= + branch: ref, + } + + if previous_path + options[:file] = { + path: previous_path + } + + + Gitlab::Git::Blob.remove(raw_repository, options) + end + +>>>>>>> creates the update_file method in repository.rb and applies changes accordingly options[:file] = { content: content, path: path, update: update } +<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 if previous_path options[:file].merge!(previous_path: previous_path) -- cgit v1.2.1 From 02e812c9677fb6392eab2fa3ab481bef9babaffc Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 5 Jul 2016 09:46:48 +0100 Subject: removes debugging prints from code --- Gemfile | 2 +- Gemfile.lock | 7 ++++--- app/controllers/concerns/creates_commit.rb | 8 -------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 6c27999cd18..9e9ecbfdf04 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index e759b22acf4..9a7563bcbef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,7 @@ -PATH - remote: ~/src/Gitlab/gitlab_git +GIT + remote: git@gitlab.com:gitlab-org/gitlab_git.git + revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + branch: commit-blob-rename-action specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -403,7 +405,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From 5d32a96009ff777ddb38d9a0064da45211c2d978 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:07:16 +0100 Subject: adds change to CHANGELOG file --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 09f2c44e02c..b0969de7d61 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.10.0 (unreleased) + - Add the functionality to be able to rename a file. !5049 (tiagonbotelho) - Fix commit builds API, return all builds for all pipelines for given commit. !4849 - Replace Haml with Hamlit to make view rendering faster. !3666 - Refactor repository paths handling to allow multiple git mount points -- cgit v1.2.1 From c84786c530dc46111ffc235e4e144975092352b7 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:25:45 +0100 Subject: refactors to pass values as arguments through options --- app/models/repository.rb | 41 ++++++++++++------------------------ app/services/files/update_service.rb | 4 +++- 2 files changed, 16 insertions(+), 29 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 78854ea41dd..d9c5ec817a0 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -731,45 +731,30 @@ class Repository end end - def update_file(user, path, previous_path, content, message, branch, update) + # previous_path, message, update + def update_file(user, path, content, branch, options={}) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - options = {} - options[:committer] = committer - options[:author] = committer - options[:commit] = { - message: message, -<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 + commit_options = {} + commit_options[:committer] = committer + commit_options[:author] = committer + commit_options[:commit] = { + message: options[:message], branch: ref } -======= - branch: ref, - } - - if previous_path - options[:file] = { - path: previous_path - } - - - Gitlab::Git::Blob.remove(raw_repository, options) - end - ->>>>>>> creates the update_file method in repository.rb and applies changes accordingly - options[:file] = { + commit_options[:file] = { content: content, path: path, - update: update + update: options[:update] } -<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 - if previous_path - options[:file].merge!(previous_path: previous_path) + if options[:previous_path] + commit_options[:file].merge!(previous_path: options[:previous_path]) - Gitlab::Git::Blob.rename(raw_repository, options) + Gitlab::Git::Blob.rename(raw_repository, commit_options) else - Gitlab::Git::Blob.commit(raw_repository, options) + Gitlab::Git::Blob.commit(raw_repository, commit_options) end end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index fefa1d4ef68..905c7a7c81a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,7 +3,9 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) + repository.update_file(current_user, @file_path, @file_content, + @target_branch, previous_path: @previous_path, + message: @commit_message, update: true) end end end -- cgit v1.2.1 From 43c5e1a509389a6a51316b5ed3458f14ae480c57 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 13:51:28 +0100 Subject: fixes issues for mr acceptance --- app/models/repository.rb | 2 +- app/views/projects/blob/_editor.html.haml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index d9c5ec817a0..39264726c9c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -750,7 +750,7 @@ class Repository } if options[:previous_path] - commit_options[:file].merge!(previous_path: options[:previous_path]) + commit_options[:file][:previous_path] = options[:previous_path] Gitlab::Git::Blob.rename(raw_repository, commit_options) else diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 3c64b2f5e96..31bd4646d3d 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,11 +4,9 @@ = icon('code-fork') = ref %span.editor-file-name - - if current_action?(:edit) && can?(current_user, :push_code, @project) - = text_field_tag 'file_name', params[:file_name], placeholder: @path, + -if current_action?(:edit) || current_action?(:update) + = text_field_tag 'file_name', (params[:file_name] or @path), class: 'form-control new-file-name' - - else - = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From 8ec10899ee32dcdbeeef40e3416a5dcfbc802e0e Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/views/projects/blob/_editor.html.haml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 31bd4646d3d..b383f9dbee3 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -7,7 +7,6 @@ -if current_action?(:edit) || current_action?(:update) = text_field_tag 'file_name', (params[:file_name] or @path), class: 'form-control new-file-name' - - if current_action?(:new) || current_action?(:create) %span.editor-file-name \/ -- cgit v1.2.1 From 69544e8133fe74fd796bab609ff8843bba4d97ec Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 9e17b7b3a154e5e8743ff41ad704ad5168203b7e Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From e31e1bd5d6b455d3697fa4e8ffcbe07259ac433b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 4791f87627354a6df6b8a8d5944399b0761b5ab8 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 20163de0ae1e8b02ac72347dfc28252d6714d40f Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 39264726c9c..c0138514c0f 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -731,7 +731,6 @@ class Repository end end - # previous_path, message, update def update_file(user, path, content, branch, options={}) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) -- cgit v1.2.1 From 64306128a1786f25354cbf20ec5dc4e4d6f79621 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/services/files/update_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 905c7a7c81a..b0f8377c3d4 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -6,6 +6,7 @@ module Files repository.update_file(current_user, @file_path, @file_content, @target_branch, previous_path: @previous_path, message: @commit_message, update: true) + end end end -- cgit v1.2.1 From fc69780bf60f915280da0a9b54a39af4b4f7e9b9 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From c8a4e2263956a80cb91c12cbbd1e008dcac6ee02 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From dc9027888e3c35d819bbb0b8ee46a40c797ae5b7 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 16:46:37 +0100 Subject: refactors blob_controller --- Gemfile | 2 +- Gemfile.lock | 12 ++++++++---- app/controllers/concerns/creates_commit.rb | 8 ++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 9e9ecbfdf04..6c27999cd18 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" +gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 9a7563bcbef..746171a323a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,5 @@ -GIT - remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 - branch: commit-blob-rename-action +PATH + remote: ~/src/Gitlab/gitlab_git specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -285,7 +283,11 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) +<<<<<<< c8a4e2263956a80cb91c12cbbd1e008dcac6ee02 <<<<<<< 9a9ecc313f7963f134247e0815b285b5733e07c7 +======= +<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 +>>>>>>> refactors blob_controller gitlab_git (10.2.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) @@ -405,6 +407,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) + mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) @@ -878,6 +881,7 @@ DEPENDENCIES github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) gitlab_git (~> 10.2) + gitlab_emoji (~> 0.3.0) gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a3731b45df0 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,8 +12,16 @@ module CreatesCommit previous_path: @previous_path ) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + result = service.new(@tree_edit_project, current_user, commit_params).execute + puts "#" * 30 + puts result[:status] + puts "#" * 30 + if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From 57c1f9e29a508733839656b288da87fa0780c002 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 19d208b4a36b9f710c13478a1e059d1d3f431ca1 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 7893b54df81874b105f49a6cfd0db8a0315c82ac Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index c0138514c0f..882a79eda8e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -750,7 +750,6 @@ class Repository if options[:previous_path] commit_options[:file][:previous_path] = options[:previous_path] - Gitlab::Git::Blob.rename(raw_repository, commit_options) else Gitlab::Git::Blob.commit(raw_repository, commit_options) -- cgit v1.2.1 From 9786f376c327354ae368bc61f261937c19a5d496 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 5 Jul 2016 09:46:48 +0100 Subject: removes debugging prints from code --- Gemfile | 2 +- Gemfile.lock | 7 ++++--- app/controllers/concerns/creates_commit.rb | 8 -------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 6c27999cd18..9e9ecbfdf04 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 746171a323a..0044511007c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,7 @@ -PATH - remote: ~/src/Gitlab/gitlab_git +GIT + remote: git@gitlab.com:gitlab-org/gitlab_git.git + revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + branch: commit-blob-rename-action specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -407,7 +409,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From 4307ac1bd3c80d0ff7b30ef7def0de457aa75f31 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:25:45 +0100 Subject: refactors to pass values as arguments through options --- app/services/files/update_service.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index b0f8377c3d4..905c7a7c81a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -6,7 +6,6 @@ module Files repository.update_file(current_user, @file_path, @file_content, @target_branch, previous_path: @previous_path, message: @commit_message, update: true) - end end end -- cgit v1.2.1 From e36858231db42f64fb69af7d74f3ec6a898d8a70 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 13:51:28 +0100 Subject: fixes issues for mr acceptance --- app/models/repository.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index 882a79eda8e..c0138514c0f 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -750,6 +750,7 @@ class Repository if options[:previous_path] commit_options[:file][:previous_path] = options[:previous_path] + Gitlab::Git::Blob.rename(raw_repository, commit_options) else Gitlab::Git::Blob.commit(raw_repository, commit_options) -- cgit v1.2.1 From 6cd8bc574b14acf9dc6576df4226126812d13f31 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 14:35:56 +0100 Subject: fixes merge conflicts for Gemfile.lock --- Gemfile.lock | 174 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 91 insertions(+), 83 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0044511007c..c2a66c767e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + revision: cfb423fb576590525c4a978bc21cc98917c3334c branch: commit-blob-rename-action specs: gitlab_git (10.3.0) @@ -68,14 +68,13 @@ GEM faraday_middleware (~> 0.9) faraday_middleware-multi_json (~> 0.0) oauth2 (~> 1.0) - asciidoctor (1.5.3) - ast (2.2.0) + asciidoctor (1.5.4) + ast (2.3.0) attr_encrypted (3.0.1) encryptor (~> 3.0.0) - attr_required (1.0.0) - autoprefixer-rails (6.2.3) + attr_required (1.0.1) + autoprefixer-rails (6.3.7) execjs - json awesome_print (1.2.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) @@ -99,7 +98,7 @@ GEM babosa (1.0.2) base32 (0.3.2) bcrypt (3.1.11) - benchmark-ips (2.3.0) + benchmark-ips (2.6.1) better_errors (1.0.1) coderay (>= 1.0.0) erubis (>= 2.6.6) @@ -111,13 +110,13 @@ GEM brakeman (3.3.2) browser (2.2.0) builder (3.2.2) - bullet (5.0.0) + bullet (5.1.1) activesupport (>= 3.0.0) - uniform_notifier (~> 1.9.0) + uniform_notifier (~> 1.10.0) bundler-audit (0.5.0) bundler (~> 1.2) thor (~> 0.18) - byebug (8.2.1) + byebug (9.0.5) capybara (2.6.2) addressable mime-types (>= 1.16) @@ -125,7 +124,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - capybara-screenshot (1.0.11) + capybara-screenshot (1.0.13) capybara (>= 1.0, < 3) launchy carrierwave (0.10.0) @@ -137,9 +136,9 @@ GEM charlock_holmes (0.7.3) chronic_duration (0.10.6) numerizer (~> 0.1.1) - chunky_png (1.3.5) + chunky_png (1.3.6) cliver (0.3.2) - coderay (1.1.0) + coderay (1.1.1) coercible (1.0.0) descendants_tracker (~> 0.0.1) coffee-rails (4.1.1) @@ -149,15 +148,15 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - colorize (0.7.7) + colorize (0.8.1) concurrent-ruby (1.0.2) connection_pool (2.2.0) crack (0.4.3) safe_yaml (~> 1.0.0) creole (0.5.0) - css_parser (1.4.1) + css_parser (1.4.5) addressable - d3_rails (3.5.11) + d3_rails (3.5.16) railties (>= 3.1.0) daemons (1.2.3) database_cleaner (1.4.1) @@ -167,7 +166,7 @@ GEM activerecord (>= 3.2.0, < 5.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.1.1) + devise (4.2.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0, < 5.1) @@ -184,7 +183,7 @@ GEM docile (1.1.5) doorkeeper (4.0.0) railties (>= 4.2) - dropzonejs-rails (0.7.2) + dropzonejs-rails (0.7.3) rails (> 3.1) email_reply_parser (0.5.8) email_spec (1.6.0) @@ -194,9 +193,9 @@ GEM equalizer (0.0.11) erubis (2.7.0) escape_utils (1.1.1) - eventmachine (1.0.8) - excon (0.49.0) - execjs (2.6.0) + eventmachine (1.2.0.1) + excon (0.50.1) + execjs (2.7.0) expression_parser (0.9.0) factory_girl (4.5.0) activesupport (>= 3.0.0) @@ -211,18 +210,21 @@ GEM faraday_middleware multi_json ffaker (2.0.0) - ffi (1.9.10) - flay (2.6.1) + ffi (1.9.12) + flay (2.8.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) ruby_parser (~> 3.0) sexp_processor (~> 4.0) - flog (4.3.2) + flog (4.4.0) + path_expander (~> 1.0) ruby_parser (~> 3.1, > 3.1.0) sexp_processor (~> 4.4) flowdock (0.7.1) httparty (~> 0.7) multi_json - fog-aws (0.9.2) - fog-core (~> 1.27) + fog-aws (0.9.4) + fog-core (~> 1.38) fog-json (~> 1.0) fog-xml (~> 0.1) ipaddress (~> 0.8) @@ -231,7 +233,7 @@ GEM fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) - fog-core (1.40.0) + fog-core (1.42.0) builder excon (~> 0.49) formatador (~> 0.2) @@ -244,8 +246,8 @@ GEM multi_json (~> 1.10) fog-local (0.3.0) fog-core (~> 1.27) - fog-openstack (0.1.6) - fog-core (>= 1.39) + fog-openstack (0.1.7) + fog-core (>= 1.40) fog-json (>= 1.0) ipaddress (>= 0.8) fog-rackspace (0.1.1) @@ -256,9 +258,9 @@ GEM fog-xml (0.1.2) fog-core nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.1.0) + font-awesome-rails (4.6.3.1) railties (>= 3.2, < 5.1) - foreman (0.78.0) + foreman (0.82.0) thor (~> 0.19.1) formatador (0.2.5) fuubar (2.0.0) @@ -268,7 +270,7 @@ GEM rugged (~> 0.21) gemojione (2.6.1) json - get_process_mem (0.2.0) + get_process_mem (0.2.1) gherkin-ruby (0.3.2) github-linguist (4.7.6) charlock_holmes (~> 0.7.3) @@ -285,20 +287,13 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) -<<<<<<< c8a4e2263956a80cb91c12cbbd1e008dcac6ee02 -<<<<<<< 9a9ecc313f7963f134247e0815b285b5733e07c7 -======= -<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 ->>>>>>> refactors blob_controller gitlab_git (10.2.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) rugged (~> 0.24.0) -======= gitlab_emoji (0.3.1) gemojione (~> 2.2, >= 2.2.1) ->>>>>>> refactors blob_controller gitlab_meta (7.0) gitlab_omniauth-ldap (1.2.1) net-ldap (~> 0.9) @@ -307,7 +302,7 @@ GEM rubyntlm (~> 0.3) globalid (0.3.6) activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.0) + gollum-grit_adapter (1.0.1) gitlab-grit (~> 2.7, >= 2.7.1) gollum-lib (4.1.0) github-markup (~> 1.3.3) @@ -341,10 +336,10 @@ GEM temple (~> 0.7.6) thor tilt - hashie (3.4.3) + hashie (3.4.4) health_check (1.5.1) rails (>= 2.3.0) - hipchat (1.5.2) + hipchat (1.5.3) httparty mimemagic html-pipeline (1.11.0) @@ -355,10 +350,10 @@ GEM httparty (0.13.7) json (~> 1.8) multi_xml (>= 0.5.2) - httpclient (2.7.0.1) + httpclient (2.8.0) i18n (0.7.0) - ice_nine (0.11.1) - influxdb (0.2.3) + ice_nine (0.11.2) + influxdb (0.3.5) cause json ipaddress (0.8.3) @@ -378,7 +373,7 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.10.0) - knapsack (1.11.0) + knapsack (1.11.1) rake timecop (>= 0.1.0) launchy (2.4.3) @@ -389,7 +384,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - license_finder (2.1.0) + license_finder (2.1.2) bundler httparty rubyzip @@ -397,9 +392,10 @@ GEM xml-simple licensee (8.0.0) rugged (>= 0.24b) - listen (3.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) loofah (2.0.3) nokogiri (>= 1.5.9) macaddr (1.7.1) @@ -409,24 +405,30 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mimemagic (0.3.0) + mime-types-data (3.2016.0521) + mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.3.20) + mysql2 (0.3.21) nested_form (0.3.2) - net-ldap (0.12.1) - net-ssh (3.0.1) - newrelic_rpm (3.14.1.311) + net-ldap (0.14.0) + net-ssh (3.0.2) + newrelic_rpm (3.16.0.318) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) numerizer (0.1.1) +<<<<<<< e36858231db42f64fb69af7d74f3ec6a898d8a70 oauth (0.4.7) oauth2 (1.2.0) +======= + oauth (0.5.1) + oauth2 (1.0.0) +>>>>>>> fixes merge conflicts for Gemfile.lock faraday (>= 0.8, < 0.10) jwt (~> 1.0) multi_json (~> 1.3) @@ -437,7 +439,7 @@ GEM omniauth (1.3.1) hashie (>= 1.2, < 4) rack (>= 1.0, < 3) - omniauth-auth0 (1.4.1) + omniauth-auth0 (1.4.2) omniauth-oauth2 (~> 1.1) omniauth-azure-oauth2 (0.0.6) jwt (~> 1.0) @@ -456,7 +458,7 @@ GEM omniauth-github (1.1.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.1) + omniauth-gitlab (1.0.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.0) omniauth-google-oauth2 (0.2.10) @@ -491,10 +493,11 @@ GEM org-ruby (0.9.12) rubypants (~> 0.2) orm_adapter (0.5.0) - paranoia (2.1.4) + paranoia (2.1.5) activerecord (~> 4.0) - parser (2.3.1.0) + parser (2.3.1.2) ast (~> 2.2) + path_expander (1.0.0) pg (0.18.4) pkg-config (1.1.7) poltergeist (1.9.0) @@ -504,10 +507,10 @@ GEM websocket-driver (>= 0.2.0) posix-spawn (0.3.11) powerpack (0.1.1) - premailer (1.8.6) - css_parser (>= 1.3.6) + premailer (1.8.7) + css_parser (>= 1.4.5) htmlentities (>= 4.0.0) - premailer-rails (1.9.2) + premailer-rails (1.9.4) actionmailer (>= 3, < 6) premailer (~> 1.7, >= 1.7.9) pry (0.10.3) @@ -525,7 +528,7 @@ GEM rack-cors (0.4.0) rack-mount (0.8.3) rack (>= 1.0.0) - rack-oauth2 (1.2.1) + rack-oauth2 (1.2.3) activesupport (>= 2.3) attr_required (>= 0.0.5) httpclient (>= 2.4) @@ -560,19 +563,19 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - raindrops (0.15.0) + raindrops (0.16.0) rake (10.5.0) - rb-fsevent (0.9.6) - rb-inotify (0.9.5) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) ffi (>= 0.5.0) rblineprof (0.3.6) debugger-ruby_core_source (~> 1.3) rdoc (3.12.2) json (~> 1.4) - recaptcha (3.0.0) + recaptcha (3.3.0) json - redcarpet (3.3.3) - redis (3.2.2) + redcarpet (3.3.4) + redis (3.3.0) redis-actionpack (4.0.1) actionpack (~> 4) redis-rack (~> 1.5.0) @@ -591,16 +594,16 @@ GEM redis-store (~> 1.1.0) redis-store (1.1.7) redis (>= 2.2) - request_store (1.3.0) + request_store (1.3.1) rerun (0.11.0) listen (~> 3.0) - responders (2.1.1) + responders (2.2.0) railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (1.11.0) - rqrcode (0.7.0) - chunky_png + rouge (1.11.1) + rqrcode (0.10.1) + chunky_png (~> 1.0) rqrcode-rails3 (0.1.7) rqrcode (>= 0.4.2) rspec (3.5.0) @@ -639,12 +642,13 @@ GEM ruby-progressbar (1.8.1) ruby-saml (1.3.0) nokogiri (>= 1.5.10) + ruby_dep (1.3.1) ruby_parser (3.8.2) sexp_processor (~> 4.1) - rubyntlm (0.5.2) + rubyntlm (0.6.0) rubypants (0.2.0) rubyzip (1.2.0) - rufus-scheduler (3.1.10) + rufus-scheduler (3.2.1) rugged (0.24.0) safe_yaml (1.0.4) sanitize (2.1.0) @@ -668,7 +672,7 @@ GEM seed-fu (2.3.6) activerecord (>= 3.1) activesupport (>= 3.1) - select2-rails (3.5.9.3) + select2-rails (3.5.10) thor (~> 0.14) sentry-raven (1.1.0) faraday (>= 0.7.6) @@ -683,7 +687,7 @@ GEM connection_pool (~> 2.2, >= 2.2.0) redis (~> 3.2, >= 3.2.1) sinatra (>= 1.4.7) - sidekiq-cron (0.4.0) + sidekiq-cron (0.4.2) redis-namespace (>= 1.5.2) rufus-scheduler (>= 2.0.24) sidekiq (>= 4.0.0) @@ -717,7 +721,7 @@ GEM spring (>= 0.9.1) spring-commands-teaspoon (0.0.2) spring (>= 0.9.1) - sprockets (3.6.2) + sprockets (3.6.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) @@ -778,7 +782,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.0.5) + unicode-display_width (1.1.0) unicorn (4.9.0) kgio (~> 2.6) rack @@ -786,7 +790,7 @@ GEM unicorn-worker-killer (0.4.4) get_process_mem (~> 0) unicorn (>= 4, < 6) - uniform_notifier (1.9.0) + uniform_notifier (1.10.0) uuid (2.3.8) macaddr (~> 1.0) version_sorter (2.0.0) @@ -806,7 +810,7 @@ GEM webmock (1.21.0) addressable (>= 2.3.6) crack (>= 0.3.2) - websocket-driver (0.6.3) + websocket-driver (0.6.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) wikicloth (0.8.1) @@ -881,8 +885,12 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) +<<<<<<< e36858231db42f64fb69af7d74f3ec6a898d8a70 gitlab_git (~> 10.2) gitlab_emoji (~> 0.3.0) +======= + gitlab_git (~> 10.2)! +>>>>>>> fixes merge conflicts for Gemfile.lock gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) @@ -1007,4 +1015,4 @@ DEPENDENCIES wikicloth (= 0.8.1) BUNDLED WITH - 1.12.5 + 1.10.6 -- cgit v1.2.1 From 484567e62b20dcaf9132166ea27ca68fd8d94b39 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 18:36:22 +0100 Subject: fixes merge request edit bug where it would generate a cloned file and not remove the previous one --- Gemfile.lock | 1 - app/controllers/projects/blob_controller.rb | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c2a66c767e4..b9f8dace30c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -405,7 +405,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 13279cd3d60..091b661a09f 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -38,16 +38,16 @@ class Projects::BlobController < Projects::ApplicationController end def update + unless params[:file_name].empty? + @previous_path = @path + @path = params[:file_name] + end + after_edit_path = if from_merge_request && @target_branch == @ref diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - unless params[:file_name].empty? - @previous_path = @path - @path = params[:file_name] - end - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From 89f2e6a7318e991aa0979b7ec5f3ed387af4bc81 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 18:51:02 +0100 Subject: fixes more issues for MR acceptance --- app/models/repository.rb | 24 ++++++++++++------------ app/services/files/update_service.rb | 5 +++-- app/views/projects/blob/_editor.html.haml | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index c0138514c0f..538d91a77d7 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -731,29 +731,29 @@ class Repository end end - def update_file(user, path, content, branch, options={}) + def update_file(user, path, content, branch:, previous_path:, message:) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - commit_options = {} - commit_options[:committer] = committer - commit_options[:author] = committer - commit_options[:commit] = { - message: options[:message], + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, branch: ref } - commit_options[:file] = { + options[:file] = { content: content, path: path, - update: options[:update] + update: true } - if options[:previous_path] - commit_options[:file][:previous_path] = options[:previous_path] + if previous_path + options[:file][:previous_path] = previous_path - Gitlab::Git::Blob.rename(raw_repository, commit_options) + Gitlab::Git::Blob.rename(raw_repository, options) else - Gitlab::Git::Blob.commit(raw_repository, commit_options) + Gitlab::Git::Blob.commit(raw_repository, options) end end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 905c7a7c81a..8d2b5083179 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,8 +4,9 @@ module Files class UpdateService < Files::BaseService def commit repository.update_file(current_user, @file_path, @file_content, - @target_branch, previous_path: @previous_path, - message: @commit_message, update: true) + branch: @target_branch, + previous_path: @previous_path, + message: @commit_message) end end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index b383f9dbee3..8a22e912624 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,8 +4,8 @@ = icon('code-fork') = ref %span.editor-file-name - -if current_action?(:edit) || current_action?(:update) - = text_field_tag 'file_name', (params[:file_name] or @path), + - if current_action?(:edit) || current_action?(:update) + = text_field_tag 'file_name', (params[:file_name] || @path), class: 'form-control new-file-name' - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From f219863862d6345f002462edcbcaa9bc70364621 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 11:07:04 +0100 Subject: removes the git path for the gitlab_git gem corresponding to this MR dependency --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 9e9ecbfdf04..f47084f9d90 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem "browser", '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" +gem "gitlab_git", '~> 10.2' # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes -- cgit v1.2.1 From 1d80c06bbc7f258b2d93f4f2b8a1508b95bc372b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 11:07:33 +0100 Subject: removes Gemfile.lock --- Gemfile.lock | 1017 ---------------------------------------------------------- 1 file changed, 1017 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index b9f8dace30c..00000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,1017 +0,0 @@ -GIT - remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: cfb423fb576590525c4a978bc21cc98917c3334c - branch: commit-blob-rename-action - specs: - gitlab_git (10.3.0) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) - -GEM - remote: https://rubygems.org/ - specs: - RedCloth (4.3.2) - ace-rails-ap (4.0.2) - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) - globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) - arel (~> 6.0) - activerecord-session_store (1.0.0) - actionpack (>= 4.0, < 5.1) - activerecord (>= 4.0, < 5.1) - multi_json (~> 1.11, >= 1.11.2) - rack (>= 1.5.2, < 3) - railties (>= 4.0, < 5.1) - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - acts-as-taggable-on (3.5.0) - activerecord (>= 3.2, < 5) - addressable (2.3.8) - after_commit_queue (1.3.0) - activerecord (>= 3.0) - akismet (2.0.0) - allocations (1.0.5) - arel (6.0.3) - asana (0.4.0) - faraday (~> 0.9) - faraday_middleware (~> 0.9) - faraday_middleware-multi_json (~> 0.0) - oauth2 (~> 1.0) - asciidoctor (1.5.4) - ast (2.3.0) - attr_encrypted (3.0.1) - encryptor (~> 3.0.0) - attr_required (1.0.1) - autoprefixer-rails (6.3.7) - execjs - awesome_print (1.2.0) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - azure (0.7.5) - addressable (~> 2.3) - azure-core (~> 0.1) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - json (~> 1.8) - mime-types (>= 1, < 3.0) - nokogiri (~> 1.6) - systemu (~> 2.6) - thor (~> 0.19) - uuid (~> 2.0) - azure-core (0.1.2) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - nokogiri (~> 1.6) - babosa (1.0.2) - base32 (0.3.2) - bcrypt (3.1.11) - benchmark-ips (2.6.1) - better_errors (1.0.1) - coderay (>= 1.0.0) - erubis (>= 2.6.6) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - bootstrap-sass (3.3.6) - autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) - brakeman (3.3.2) - browser (2.2.0) - builder (3.2.2) - bullet (5.1.1) - activesupport (>= 3.0.0) - uniform_notifier (~> 1.10.0) - bundler-audit (0.5.0) - bundler (~> 1.2) - thor (~> 0.18) - byebug (9.0.5) - capybara (2.6.2) - addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - capybara-screenshot (1.0.13) - capybara (>= 1.0, < 3) - launchy - carrierwave (0.10.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) - json (>= 1.7) - mime-types (>= 1.16) - cause (0.1) - charlock_holmes (0.7.3) - chronic_duration (0.10.6) - numerizer (~> 0.1.1) - chunky_png (1.3.6) - cliver (0.3.2) - coderay (1.1.1) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (4.1.1) - coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.1.x) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - colorize (0.8.1) - concurrent-ruby (1.0.2) - connection_pool (2.2.0) - crack (0.4.3) - safe_yaml (~> 1.0.0) - creole (0.5.0) - css_parser (1.4.5) - addressable - d3_rails (3.5.16) - railties (>= 3.1.0) - daemons (1.2.3) - database_cleaner (1.4.1) - debug_inspector (0.0.2) - debugger-ruby_core_source (1.3.8) - default_value_for (3.0.1) - activerecord (>= 3.2.0, < 5.0) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.0) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) - responders - warden (~> 1.2.3) - devise-two-factor (3.0.0) - activesupport - attr_encrypted (>= 1.3, < 4, != 2) - devise (~> 4.0) - railties - rotp (~> 2.0) - diff-lcs (1.2.5) - diffy (3.0.7) - docile (1.1.5) - doorkeeper (4.0.0) - railties (>= 4.2) - dropzonejs-rails (0.7.3) - rails (> 3.1) - email_reply_parser (0.5.8) - email_spec (1.6.0) - launchy (~> 2.1) - mail (~> 2.2) - encryptor (3.0.0) - equalizer (0.0.11) - erubis (2.7.0) - escape_utils (1.1.1) - eventmachine (1.2.0.1) - excon (0.50.1) - execjs (2.7.0) - expression_parser (0.9.0) - factory_girl (4.5.0) - activesupport (>= 3.0.0) - factory_girl_rails (4.6.0) - factory_girl (~> 4.5.0) - railties (>= 3.0.0) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - faraday_middleware-multi_json (0.0.6) - faraday_middleware - multi_json - ffaker (2.0.0) - ffi (1.9.12) - flay (2.8.0) - erubis (~> 2.7.0) - path_expander (~> 1.0) - ruby_parser (~> 3.0) - sexp_processor (~> 4.0) - flog (4.4.0) - path_expander (~> 1.0) - ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.4) - flowdock (0.7.1) - httparty (~> 0.7) - multi_json - fog-aws (0.9.4) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-azure (0.0.2) - azure (~> 0.6) - fog-core (~> 1.27) - fog-json (~> 1.0) - fog-xml (~> 0.1) - fog-core (1.42.0) - builder - excon (~> 0.49) - formatador (~> 0.2) - fog-google (0.3.2) - fog-core - fog-json - fog-xml - fog-json (1.0.2) - fog-core (~> 1.0) - multi_json (~> 1.10) - fog-local (0.3.0) - fog-core (~> 1.27) - fog-openstack (0.1.7) - fog-core (>= 1.40) - fog-json (>= 1.0) - ipaddress (>= 0.8) - fog-rackspace (0.1.1) - fog-core (>= 1.35) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.8) - fog-xml (0.1.2) - fog-core - nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.3.1) - railties (>= 3.2, < 5.1) - foreman (0.82.0) - thor (~> 0.19.1) - formatador (0.2.5) - fuubar (2.0.0) - rspec (~> 3.0) - ruby-progressbar (~> 1.4) - gemnasium-gitlab-service (0.2.6) - rugged (~> 0.21) - gemojione (2.6.1) - json - get_process_mem (0.2.1) - gherkin-ruby (0.3.2) - github-linguist (4.7.6) - charlock_holmes (~> 0.7.3) - escape_utils (~> 1.1.0) - mime-types (>= 1.19) - rugged (>= 0.23.0b) - github-markup (1.3.3) - gitlab-flowdock-git-hook (1.0.1) - flowdock (~> 0.7) - gitlab-grit (>= 2.4.1) - multi_json - gitlab-grit (2.8.1) - charlock_holmes (~> 0.6) - diff-lcs (~> 1.1) - mime-types (>= 1.16, < 3) - posix-spawn (~> 0.3) - gitlab_git (10.2.3) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) - gitlab_emoji (0.3.1) - gemojione (~> 2.2, >= 2.2.1) - gitlab_meta (7.0) - gitlab_omniauth-ldap (1.2.1) - net-ldap (~> 0.9) - omniauth (~> 1.0) - pyu-ruby-sasl (~> 0.0.3.1) - rubyntlm (~> 0.3) - globalid (0.3.6) - activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.1) - gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.1.0) - github-markup (~> 1.3.3) - gollum-grit_adapter (~> 1.0) - nokogiri (~> 1.6.4) - rouge (~> 1.9) - sanitize (~> 2.1.0) - stringex (~> 2.5.1) - gollum-rugged_adapter (0.4.2) - mime-types (>= 1.15) - rugged (~> 0.24.0, >= 0.21.3) - gon (6.0.1) - actionpack (>= 3.0) - json - multi_json - request_store (>= 1.0) - grape (0.13.0) - activesupport - builder - hashie (>= 2.1.0) - multi_json (>= 1.3.2) - multi_xml (>= 0.5.2) - rack (>= 1.3.0) - rack-accept - rack-mount - virtus (>= 1.0.0) - grape-entity (0.4.8) - activesupport - multi_json (>= 1.3.2) - hamlit (2.5.0) - temple (~> 0.7.6) - thor - tilt - hashie (3.4.4) - health_check (1.5.1) - rails (>= 2.3.0) - hipchat (1.5.3) - httparty - mimemagic - html-pipeline (1.11.0) - activesupport (>= 2) - nokogiri (~> 1.4) - htmlentities (4.3.4) - http_parser.rb (0.5.3) - httparty (0.13.7) - json (~> 1.8) - multi_xml (>= 0.5.2) - httpclient (2.8.0) - i18n (0.7.0) - ice_nine (0.11.2) - influxdb (0.3.5) - cause - json - ipaddress (0.8.3) - jquery-atwho-rails (1.3.2) - jquery-rails (4.1.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jquery-turbolinks (2.1.0) - railties (>= 3.1.0) - turbolinks - jquery-ui-rails (5.0.5) - railties (>= 3.2.16) - json (1.8.3) - jwt (1.5.4) - kaminari (0.17.0) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - kgio (2.10.0) - knapsack (1.11.1) - rake - timecop (>= 0.1.0) - launchy (2.4.3) - addressable (~> 2.3) - letter_opener (1.4.1) - launchy (~> 2.2) - letter_opener_web (1.3.0) - actionmailer (>= 3.2) - letter_opener (~> 1.0) - railties (>= 3.2) - license_finder (2.1.2) - bundler - httparty - rubyzip - thor - xml-simple - licensee (8.0.0) - rugged (>= 0.24b) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.0.3) - nokogiri (>= 1.5.9) - macaddr (1.7.1) - systemu (~> 2.6.2) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mail_room (0.8.0) - method_source (0.8.2) - mime-types (2.99.2) - mimemagic (0.3.1) - mini_portile2 (2.1.0) - minitest (5.7.0) - mousetrap-rails (1.4.6) - multi_json (1.12.1) - multi_xml (0.5.5) - multipart-post (2.0.0) - mysql2 (0.3.21) - nested_form (0.3.2) - net-ldap (0.14.0) - net-ssh (3.0.2) - newrelic_rpm (3.16.0.318) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - numerizer (0.1.1) -<<<<<<< e36858231db42f64fb69af7d74f3ec6a898d8a70 - oauth (0.4.7) - oauth2 (1.2.0) -======= - oauth (0.5.1) - oauth2 (1.0.0) ->>>>>>> fixes merge conflicts for Gemfile.lock - faraday (>= 0.8, < 0.10) - jwt (~> 1.0) - multi_json (~> 1.3) - multi_xml (~> 0.5) - rack (>= 1.2, < 3) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) - omniauth (1.3.1) - hashie (>= 1.2, < 4) - rack (>= 1.0, < 3) - omniauth-auth0 (1.4.2) - omniauth-oauth2 (~> 1.1) - omniauth-azure-oauth2 (0.0.6) - jwt (~> 1.0) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-bitbucket (0.0.2) - multi_json (~> 1.7) - omniauth (~> 1.1) - omniauth-oauth (~> 1.0) - omniauth-cas3 (1.1.3) - addressable (~> 2.3) - nokogiri (~> 1.6.6) - omniauth (~> 1.2) - omniauth-facebook (3.0.0) - omniauth-oauth2 (~> 1.2) - omniauth-github (1.1.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.0) - omniauth-google-oauth2 (0.2.10) - addressable (~> 2.3) - jwt (~> 1.0) - multi_json (~> 1.3) - omniauth (>= 1.1.1) - omniauth-oauth2 (~> 1.3.1) - omniauth-kerberos (0.3.0) - omniauth-multipassword - timfel-krb5-auth (~> 0.8) - omniauth-multipassword (0.4.2) - omniauth (~> 1.0) - omniauth-oauth (1.1.0) - oauth - omniauth (~> 1.0) - omniauth-oauth2 (1.3.1) - oauth2 (~> 1.0) - omniauth (~> 1.2) - omniauth-saml (1.6.0) - omniauth (~> 1.3) - ruby-saml (~> 1.3) - omniauth-shibboleth (1.2.1) - omniauth (>= 1.0.0) - omniauth-twitter (1.2.1) - json (~> 1.3) - omniauth-oauth (~> 1.1) - omniauth_crowd (2.2.3) - activesupport - nokogiri (>= 1.4.4) - omniauth (~> 1.0) - org-ruby (0.9.12) - rubypants (~> 0.2) - orm_adapter (0.5.0) - paranoia (2.1.5) - activerecord (~> 4.0) - parser (2.3.1.2) - ast (~> 2.2) - path_expander (1.0.0) - pg (0.18.4) - pkg-config (1.1.7) - poltergeist (1.9.0) - capybara (~> 2.1) - cliver (~> 0.3.1) - multi_json (~> 1.0) - websocket-driver (>= 0.2.0) - posix-spawn (0.3.11) - powerpack (0.1.1) - premailer (1.8.7) - css_parser (>= 1.4.5) - htmlentities (>= 4.0.0) - premailer-rails (1.9.4) - actionmailer (>= 3, < 6) - premailer (~> 1.7, >= 1.7.9) - pry (0.10.3) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-rails (0.3.4) - pry (>= 0.9.10) - pyu-ruby-sasl (0.0.3.3) - rack (1.6.4) - rack-accept (0.4.5) - rack (>= 0.4) - rack-attack (4.3.1) - rack - rack-cors (0.4.0) - rack-mount (0.8.3) - rack (>= 1.0.0) - rack-oauth2 (1.2.3) - activesupport (>= 2.3) - attr_required (>= 0.0.5) - httpclient (>= 2.4) - multi_json (>= 1.3.6) - rack (>= 1.1) - rack-protection (1.5.3) - rack - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) - raindrops (0.16.0) - rake (10.5.0) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - rblineprof (0.3.6) - debugger-ruby_core_source (~> 1.3) - rdoc (3.12.2) - json (~> 1.4) - recaptcha (3.3.0) - json - redcarpet (3.3.4) - redis (3.3.0) - redis-actionpack (4.0.1) - actionpack (~> 4) - redis-rack (~> 1.5.0) - redis-store (~> 1.1.0) - redis-activesupport (4.1.5) - activesupport (>= 3, < 5) - redis-store (~> 1.1.0) - redis-namespace (1.5.2) - redis (~> 3.0, >= 3.0.4) - redis-rack (1.5.0) - rack (~> 1.5) - redis-store (~> 1.1.0) - redis-rails (4.0.0) - redis-actionpack (~> 4) - redis-activesupport (~> 4) - redis-store (~> 1.1.0) - redis-store (1.1.7) - redis (>= 2.2) - request_store (1.3.1) - rerun (0.11.0) - listen (~> 3.0) - responders (2.2.0) - railties (>= 4.2.0, < 5.1) - rinku (2.0.0) - rotp (2.1.2) - rouge (1.11.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) - rqrcode-rails3 (0.1.7) - rqrcode (>= 0.4.2) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.0) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-retry (0.4.5) - rspec-core - rspec-support (3.5.0) - rubocop (0.40.0) - parser (>= 2.3.1.0, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-rspec (1.5.0) - rubocop (>= 0.40.0) - ruby-fogbugz (0.2.1) - crack (~> 0.4) - ruby-progressbar (1.8.1) - ruby-saml (1.3.0) - nokogiri (>= 1.5.10) - ruby_dep (1.3.1) - ruby_parser (3.8.2) - sexp_processor (~> 4.1) - rubyntlm (0.6.0) - rubypants (0.2.0) - rubyzip (1.2.0) - rufus-scheduler (3.2.1) - rugged (0.24.0) - safe_yaml (1.0.4) - sanitize (2.1.0) - nokogiri (>= 1.4.4) - sass (3.4.22) - sass-rails (5.0.5) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) - scss_lint (0.47.1) - rake (>= 0.9, < 11) - sass (~> 3.4.15) - sdoc (0.3.20) - json (>= 1.1.3) - rdoc (~> 3.10) - seed-fu (2.3.6) - activerecord (>= 3.1) - activesupport (>= 3.1) - select2-rails (3.5.10) - thor (~> 0.14) - sentry-raven (1.1.0) - faraday (>= 0.7.6) - settingslogic (2.0.9) - sexp_processor (4.7.0) - sham_rack (1.3.6) - rack - shoulda-matchers (2.8.0) - activesupport (>= 3.0.0) - sidekiq (4.1.4) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.2, >= 2.2.0) - redis (~> 3.2, >= 3.2.1) - sinatra (>= 1.4.7) - sidekiq-cron (0.4.2) - redis-namespace (>= 1.5.2) - rufus-scheduler (>= 2.0.24) - sidekiq (>= 4.0.0) - simple_oauth (0.1.9) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - six (0.2.0) - slack-notifier (1.2.1) - slop (3.6.0) - spinach (0.8.10) - colorize - gherkin-ruby (>= 0.3.2) - json - spinach-rails (0.2.1) - capybara (>= 2.0.0) - railties (>= 3) - spinach (>= 0.4) - spinach-rerun-reporter (0.0.2) - spinach (~> 0.8) - spring (1.7.2) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) - spring-commands-spinach (1.1.0) - spring (>= 0.9.1) - spring-commands-teaspoon (0.0.2) - spring (>= 0.9.1) - sprockets (3.6.3) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.1.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - state_machines (0.4.0) - state_machines-activemodel (0.4.0) - activemodel (>= 4.1, < 5.1) - state_machines (>= 0.4.0) - state_machines-activerecord (0.4.0) - activerecord (>= 4.1, < 5.1) - state_machines-activemodel (>= 0.3.0) - stringex (2.5.2) - sys-filesystem (1.1.6) - ffi - systemu (2.6.5) - task_list (1.0.2) - html-pipeline - teaspoon (1.1.5) - railties (>= 3.2.5, < 6) - teaspoon-jasmine (2.2.0) - teaspoon (>= 1.0.0) - temple (0.7.7) - test_after_commit (0.4.2) - activerecord (>= 3.2) - thin (1.7.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - timecop (0.8.1) - timfel-krb5-auth (0.8.3) - tinder (1.10.1) - eventmachine (~> 1.0) - faraday (~> 0.9.0) - faraday_middleware (~> 0.9) - hashie (>= 1.0) - json (~> 1.8.0) - mime-types - multi_json (~> 1.7) - twitter-stream (~> 0.1) - turbolinks (2.5.3) - coffee-rails - twitter-stream (0.1.16) - eventmachine (>= 0.12.8) - http_parser.rb (~> 0.5.1) - simple_oauth (~> 0.1.4) - tzinfo (1.2.2) - thread_safe (~> 0.1) - u2f (0.2.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - underscore-rails (1.8.3) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.2) - unicode-display_width (1.1.0) - unicorn (4.9.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - unicorn-worker-killer (0.4.4) - get_process_mem (~> 0) - unicorn (>= 4, < 6) - uniform_notifier (1.10.0) - uuid (2.3.8) - macaddr (~> 1.0) - version_sorter (2.0.0) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - vmstat (2.1.0) - warden (1.2.6) - rack (>= 1.0) - web-console (2.3.0) - activemodel (>= 4.0) - binding_of_caller (>= 0.7.2) - railties (>= 4.0) - sprockets-rails (>= 2.0, < 4.0) - webmock (1.21.0) - addressable (>= 2.3.6) - crack (>= 0.3.2) - websocket-driver (0.6.4) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - wikicloth (0.8.1) - builder - expression_parser - rinku - xml-simple (1.1.5) - xpath (2.0.0) - nokogiri (~> 1.3) - -PLATFORMS - ruby - -DEPENDENCIES - RedCloth (~> 4.3.2) - ace-rails-ap (~> 4.0.2) - activerecord-session_store (~> 1.0.0) - acts-as-taggable-on (~> 3.4) - addressable (~> 2.3.8) - after_commit_queue - akismet (~> 2.0) - allocations (~> 1.0) - asana (~> 0.4.0) - asciidoctor (~> 1.5.2) - attr_encrypted (~> 3.0.0) - awesome_print (~> 1.2.0) - babosa (~> 1.0.2) - base32 (~> 0.3.0) - benchmark-ips - better_errors (~> 1.0.1) - binding_of_caller (~> 0.7.2) - bootstrap-sass (~> 3.3.0) - brakeman (~> 3.3.0) - browser (~> 2.2) - bullet - bundler-audit - byebug - capybara (~> 2.6.2) - capybara-screenshot (~> 1.0.0) - carrierwave (~> 0.10.0) - charlock_holmes (~> 0.7.3) - chronic_duration (~> 0.10.6) - coffee-rails (~> 4.1.0) - connection_pool (~> 2.0) - creole (~> 0.5.0) - d3_rails (~> 3.5.0) - database_cleaner (~> 1.4.0) - default_value_for (~> 3.0.0) - devise (~> 4.0) - devise-two-factor (~> 3.0.0) - diffy (~> 3.0.3) - doorkeeper (~> 4.0) - dropzonejs-rails (~> 0.7.1) - email_reply_parser (~> 0.5.8) - email_spec (~> 1.6.0) - factory_girl_rails (~> 4.6.0) - ffaker (~> 2.0.0) - flay - flog - fog-aws (~> 0.9) - fog-azure (~> 0.0) - fog-core (~> 1.40) - fog-google (~> 0.3) - fog-local (~> 0.3) - fog-openstack (~> 0.1) - fog-rackspace (~> 0.1.1) - font-awesome-rails (~> 4.6.1) - foreman - fuubar (~> 2.0.0) - gemnasium-gitlab-service (~> 0.2) - gemojione (~> 2.6) - github-linguist (~> 4.7.0) - github-markup (~> 1.3.1) - gitlab-flowdock-git-hook (~> 1.0.1) -<<<<<<< e36858231db42f64fb69af7d74f3ec6a898d8a70 - gitlab_git (~> 10.2) - gitlab_emoji (~> 0.3.0) -======= - gitlab_git (~> 10.2)! ->>>>>>> fixes merge conflicts for Gemfile.lock - gitlab_meta (= 7.0) - gitlab_omniauth-ldap (~> 1.2.1) - gollum-lib (~> 4.1.0) - gollum-rugged_adapter (~> 0.4.2) - gon (~> 6.0.1) - grape (~> 0.13.0) - grape-entity (~> 0.4.2) - hamlit (~> 2.5) - health_check (~> 1.5.1) - hipchat (~> 1.5.0) - html-pipeline (~> 1.11.0) - httparty (~> 0.13.3) - influxdb (~> 0.2) - jquery-atwho-rails (~> 1.3.2) - jquery-rails (~> 4.1.0) - jquery-turbolinks (~> 2.1.0) - jquery-ui-rails (~> 5.0.0) - jwt - kaminari (~> 0.17.0) - knapsack - letter_opener_web (~> 1.3.0) - license_finder - licensee (~> 8.0.0) - loofah (~> 2.0.3) - mail_room (~> 0.8) - method_source (~> 0.8) - minitest (~> 5.7.0) - mousetrap-rails (~> 1.4.6) - mysql2 (~> 0.3.16) - nested_form (~> 0.3.2) - net-ssh (~> 3.0.1) - newrelic_rpm (~> 3.14) - nokogiri (~> 1.6.7, >= 1.6.7.2) - oauth2 (~> 1.2.0) - octokit (~> 4.3.0) - omniauth (~> 1.3.1) - omniauth-auth0 (~> 1.4.1) - omniauth-azure-oauth2 (~> 0.0.6) - omniauth-bitbucket (~> 0.0.2) - omniauth-cas3 (~> 1.1.2) - omniauth-facebook (~> 3.0.0) - omniauth-github (~> 1.1.1) - omniauth-gitlab (~> 1.0.0) - omniauth-google-oauth2 (~> 0.2.0) - omniauth-kerberos (~> 0.3.0) - omniauth-saml (~> 1.6.0) - omniauth-shibboleth (~> 1.2.0) - omniauth-twitter (~> 1.2.0) - omniauth_crowd (~> 2.2.0) - org-ruby (~> 0.9.12) - paranoia (~> 2.0) - pg (~> 0.18.2) - poltergeist (~> 1.9.0) - premailer-rails (~> 1.9.0) - pry-rails - rack-attack (~> 4.3.1) - rack-cors (~> 0.4.0) - rack-oauth2 (~> 1.2.1) - rails (= 4.2.6) - rails-deprecated_sanitizer (~> 1.0.3) - rainbow (~> 2.1.0) - rblineprof - rdoc (~> 3.6) - recaptcha (~> 3.0) - redcarpet (~> 3.3.3) - redis (~> 3.2) - redis-namespace - redis-rails (~> 4.0.0) - request_store (~> 1.3.0) - rerun (~> 0.11.0) - responders (~> 2.0) - rouge (~> 1.11) - rqrcode-rails3 (~> 0.1.7) - rspec-rails (~> 3.5.0) - rspec-retry - rubocop (~> 0.40.0) - rubocop-rspec (~> 1.5.0) - ruby-fogbugz (~> 0.2.1) - sanitize (~> 2.0) - sass-rails (~> 5.0.0) - scss_lint (~> 0.47.0) - sdoc (~> 0.3.20) - seed-fu (~> 2.3.5) - select2-rails (~> 3.5.9) - sentry-raven (~> 1.1.0) - settingslogic (~> 2.0.9) - sham_rack - shoulda-matchers (~> 2.8.0) - sidekiq (~> 4.0) - sidekiq-cron (~> 0.4.0) - simplecov (~> 0.11.0) - sinatra (~> 1.4.4) - six (~> 0.2.0) - slack-notifier (~> 1.2.0) - spinach-rails (~> 0.2.1) - spinach-rerun-reporter (~> 0.0.2) - spring (~> 1.7.0) - spring-commands-rspec (~> 1.0.4) - spring-commands-spinach (~> 1.1.0) - spring-commands-teaspoon (~> 0.0.2) - sprockets (~> 3.6.0) - state_machines-activerecord (~> 0.4.0) - sys-filesystem (~> 1.1.6) - task_list (~> 1.0.2) - teaspoon (~> 1.1.0) - teaspoon-jasmine (~> 2.2.0) - test_after_commit (~> 0.4.2) - thin (~> 1.7.0) - tinder (~> 1.10.0) - turbolinks (~> 2.5.0) - u2f (~> 0.2.1) - uglifier (~> 2.7.2) - underscore-rails (~> 1.8.0) - unf (~> 0.1.4) - unicorn (~> 4.9.0) - unicorn-worker-killer (~> 0.4.2) - version_sorter (~> 2.0.0) - virtus (~> 1.0.1) - vmstat (~> 2.1.0) - web-console (~> 2.0) - webmock (~> 1.21.0) - wikicloth (= 0.8.1) - -BUNDLED WITH - 1.10.6 -- cgit v1.2.1 From 595f4584c10716ebe657604a103fecf285cce5b6 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 10:40:10 +0100 Subject: adds Gemfile.lock to mr --- Gemfile.lock | 994 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 994 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000000..8809edb0fc9 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,994 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.3.2) + ace-rails-ap (4.0.2) + actionmailer (4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.6) + actionview (= 4.2.6) + activesupport (= 4.2.6) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.6) + activesupport (= 4.2.6) + globalid (>= 0.3.0) + activemodel (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + activerecord (4.2.6) + activemodel (= 4.2.6) + activesupport (= 4.2.6) + arel (~> 6.0) + activerecord-session_store (1.0.0) + actionpack (>= 4.0, < 5.1) + activerecord (>= 4.0, < 5.1) + multi_json (~> 1.11, >= 1.11.2) + rack (>= 1.5.2, < 3) + railties (>= 4.0, < 5.1) + activesupport (4.2.6) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + acts-as-taggable-on (3.5.0) + activerecord (>= 3.2, < 5) + addressable (2.3.8) + after_commit_queue (1.3.0) + activerecord (>= 3.0) + akismet (2.0.0) + allocations (1.0.5) + arel (6.0.3) + asana (0.4.0) + faraday (~> 0.9) + faraday_middleware (~> 0.9) + faraday_middleware-multi_json (~> 0.0) + oauth2 (~> 1.0) + asciidoctor (1.5.4) + ast (2.3.0) + attr_encrypted (3.0.1) + encryptor (~> 3.0.0) + attr_required (1.0.1) + autoprefixer-rails (6.3.7) + execjs + awesome_print (1.2.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + azure (0.7.5) + addressable (~> 2.3) + azure-core (~> 0.1) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + json (~> 1.8) + mime-types (>= 1, < 3.0) + nokogiri (~> 1.6) + systemu (~> 2.6) + thor (~> 0.19) + uuid (~> 2.0) + azure-core (0.1.2) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + nokogiri (~> 1.6) + babosa (1.0.2) + base32 (0.3.2) + bcrypt (3.1.11) + benchmark-ips (2.6.1) + better_errors (1.0.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bootstrap-sass (3.3.6) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + brakeman (3.3.2) + browser (2.2.0) + builder (3.2.2) + bullet (5.1.1) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.10.0) + bundler-audit (0.5.0) + bundler (~> 1.2) + thor (~> 0.18) + byebug (9.0.5) + capybara (2.6.2) + addressable + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + capybara-screenshot (1.0.13) + capybara (>= 1.0, < 3) + launchy + carrierwave (0.10.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + mime-types (>= 1.16) + cause (0.1) + charlock_holmes (0.7.3) + chronic_duration (0.10.6) + numerizer (~> 0.1.1) + chunky_png (1.3.6) + cliver (0.3.2) + coderay (1.1.1) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + coffee-rails (4.1.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.1.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorize (0.8.1) + concurrent-ruby (1.0.2) + connection_pool (2.2.0) + crack (0.4.3) + safe_yaml (~> 1.0.0) + creole (0.5.0) + css_parser (1.4.5) + addressable + d3_rails (3.5.16) + railties (>= 3.1.0) + daemons (1.2.3) + database_cleaner (1.4.1) + debug_inspector (0.0.2) + debugger-ruby_core_source (1.3.8) + default_value_for (3.0.1) + activerecord (>= 3.2.0, < 5.0) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + devise (4.2.0) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 5.1) + responders + warden (~> 1.2.3) + devise-two-factor (3.0.0) + activesupport + attr_encrypted (>= 1.3, < 4, != 2) + devise (~> 4.0) + railties + rotp (~> 2.0) + diff-lcs (1.2.5) + diffy (3.0.7) + docile (1.1.5) + doorkeeper (4.0.0) + railties (>= 4.2) + dropzonejs-rails (0.7.3) + rails (> 3.1) + email_reply_parser (0.5.8) + email_spec (1.6.0) + launchy (~> 2.1) + mail (~> 2.2) + encryptor (3.0.0) + equalizer (0.0.11) + erubis (2.7.0) + escape_utils (1.1.1) + eventmachine (1.2.0.1) + excon (0.50.1) + execjs (2.7.0) + expression_parser (0.9.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.6.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) + faraday_middleware-multi_json (0.0.6) + faraday_middleware + multi_json + ffaker (2.0.0) + ffi (1.9.13) + flay (2.8.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.4.0) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.4) + flowdock (0.7.1) + httparty (~> 0.7) + multi_json + fog-aws (0.9.4) + fog-core (~> 1.38) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-azure (0.0.2) + azure (~> 0.6) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + fog-core (1.42.0) + builder + excon (~> 0.49) + formatador (~> 0.2) + fog-google (0.3.2) + fog-core + fog-json + fog-xml + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-local (0.3.0) + fog-core (~> 1.27) + fog-openstack (0.1.7) + fog-core (>= 1.40) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-rackspace (0.1.1) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-xml (0.1.2) + fog-core + nokogiri (~> 1.5, >= 1.5.11) + font-awesome-rails (4.6.3.1) + railties (>= 3.2, < 5.1) + foreman (0.82.0) + thor (~> 0.19.1) + formatador (0.2.5) + fuubar (2.0.0) + rspec (~> 3.0) + ruby-progressbar (~> 1.4) + gemnasium-gitlab-service (0.2.6) + rugged (~> 0.21) + gemojione (2.6.1) + json + get_process_mem (0.2.1) + gherkin-ruby (0.3.2) + github-linguist (4.7.6) + charlock_holmes (~> 0.7.3) + escape_utils (~> 1.1.0) + mime-types (>= 1.19) + rugged (>= 0.23.0b) + github-markup (1.3.3) + gitlab-flowdock-git-hook (1.0.1) + flowdock (~> 0.7) + gitlab-grit (>= 2.4.1) + multi_json + gitlab-grit (2.8.1) + charlock_holmes (~> 0.6) + diff-lcs (~> 1.1) + mime-types (>= 1.16, < 3) + posix-spawn (~> 0.3) + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + gitlab_meta (7.0) + gitlab_omniauth-ldap (1.2.1) + net-ldap (~> 0.9) + omniauth (~> 1.0) + pyu-ruby-sasl (~> 0.0.3.1) + rubyntlm (~> 0.3) + globalid (0.3.6) + activesupport (>= 4.1.0) + gollum-grit_adapter (1.0.1) + gitlab-grit (~> 2.7, >= 2.7.1) + gollum-lib (4.1.0) + github-markup (~> 1.3.3) + gollum-grit_adapter (~> 1.0) + nokogiri (~> 1.6.4) + rouge (~> 1.9) + sanitize (~> 2.1.0) + stringex (~> 2.5.1) + gollum-rugged_adapter (0.4.2) + mime-types (>= 1.15) + rugged (~> 0.24.0, >= 0.21.3) + gon (6.0.1) + actionpack (>= 3.0) + json + multi_json + request_store (>= 1.0) + grape (0.13.0) + activesupport + builder + hashie (>= 2.1.0) + multi_json (>= 1.3.2) + multi_xml (>= 0.5.2) + rack (>= 1.3.0) + rack-accept + rack-mount + virtus (>= 1.0.0) + grape-entity (0.4.8) + activesupport + multi_json (>= 1.3.2) + hamlit (2.5.0) + temple (~> 0.7.6) + thor + tilt + hashie (3.4.4) + health_check (1.5.1) + rails (>= 2.3.0) + hipchat (1.5.3) + httparty + mimemagic + html-pipeline (1.11.0) + activesupport (>= 2) + nokogiri (~> 1.4) + htmlentities (4.3.4) + http_parser.rb (0.5.3) + httparty (0.13.7) + json (~> 1.8) + multi_xml (>= 0.5.2) + httpclient (2.8.0) + i18n (0.7.0) + ice_nine (0.11.2) + influxdb (0.3.5) + cause + json + ipaddress (0.8.3) + jquery-atwho-rails (1.3.2) + jquery-rails (4.1.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) + json (1.8.3) + jwt (1.5.4) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.10.0) + knapsack (1.11.1) + rake + timecop (>= 0.1.0) + launchy (2.4.3) + addressable (~> 2.3) + letter_opener (1.4.1) + launchy (~> 2.2) + letter_opener_web (1.3.0) + actionmailer (>= 3.2) + letter_opener (~> 1.0) + railties (>= 3.2) + license_finder (2.1.2) + bundler + httparty + rubyzip + thor + xml-simple + licensee (8.0.0) + rugged (>= 0.24b) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.0.3) + nokogiri (>= 1.5.9) + macaddr (1.7.1) + systemu (~> 2.6.2) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mail_room (0.8.0) + method_source (0.8.2) + mime-types (2.99.2) + mimemagic (0.3.1) + mini_portile2 (2.1.0) + minitest (5.7.0) + mousetrap-rails (1.4.6) + multi_json (1.12.1) + multi_xml (0.5.5) + multipart-post (2.0.0) + mysql2 (0.3.21) + nested_form (0.3.2) + net-ldap (0.14.0) + net-ssh (3.0.2) + newrelic_rpm (3.16.0.318) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + numerizer (0.1.1) + oauth (0.5.1) + oauth2 (1.0.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (~> 1.2) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) + omniauth (1.3.1) + hashie (>= 1.2, < 4) + rack (>= 1.0, < 3) + omniauth-auth0 (1.4.2) + omniauth-oauth2 (~> 1.1) + omniauth-azure-oauth2 (0.0.6) + jwt (~> 1.0) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-bitbucket (0.0.2) + multi_json (~> 1.7) + omniauth (~> 1.1) + omniauth-oauth (~> 1.0) + omniauth-cas3 (1.1.3) + addressable (~> 2.3) + nokogiri (~> 1.6.6) + omniauth (~> 1.2) + omniauth-facebook (3.0.0) + omniauth-oauth2 (~> 1.2) + omniauth-github (1.1.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-gitlab (1.0.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.0) + omniauth-google-oauth2 (0.2.10) + addressable (~> 2.3) + jwt (~> 1.0) + multi_json (~> 1.3) + omniauth (>= 1.1.1) + omniauth-oauth2 (~> 1.3.1) + omniauth-kerberos (0.3.0) + omniauth-multipassword + timfel-krb5-auth (~> 0.8) + omniauth-multipassword (0.4.2) + omniauth (~> 1.0) + omniauth-oauth (1.1.0) + oauth + omniauth (~> 1.0) + omniauth-oauth2 (1.3.1) + oauth2 (~> 1.0) + omniauth (~> 1.2) + omniauth-saml (1.6.0) + omniauth (~> 1.3) + ruby-saml (~> 1.3) + omniauth-shibboleth (1.2.1) + omniauth (>= 1.0.0) + omniauth-twitter (1.2.1) + json (~> 1.3) + omniauth-oauth (~> 1.1) + omniauth_crowd (2.2.3) + activesupport + nokogiri (>= 1.4.4) + omniauth (~> 1.0) + org-ruby (0.9.12) + rubypants (~> 0.2) + orm_adapter (0.5.0) + paranoia (2.1.5) + activerecord (~> 4.0) + parser (2.3.1.2) + ast (~> 2.2) + path_expander (1.0.0) + pg (0.18.4) + pkg-config (1.1.7) + poltergeist (1.9.0) + capybara (~> 2.1) + cliver (~> 0.3.1) + multi_json (~> 1.0) + websocket-driver (>= 0.2.0) + posix-spawn (0.3.11) + powerpack (0.1.1) + premailer (1.8.7) + css_parser (>= 1.4.5) + htmlentities (>= 4.0.0) + premailer-rails (1.9.4) + actionmailer (>= 3, < 6) + premailer (~> 1.7, >= 1.7.9) + pry (0.10.3) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.4) + pry (>= 0.9.10) + pyu-ruby-sasl (0.0.3.3) + rack (1.6.4) + rack-accept (0.4.5) + rack (>= 0.4) + rack-attack (4.3.1) + rack + rack-cors (0.4.0) + rack-mount (0.8.3) + rack (>= 1.0.0) + rack-oauth2 (1.2.3) + activesupport (>= 2.3) + attr_required (>= 0.0.5) + httpclient (>= 2.4) + multi_json (>= 1.3.6) + rack (>= 1.1) + rack-protection (1.5.3) + rack + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.6) + actionmailer (= 4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + activemodel (= 4.2.6) + activerecord (= 4.2.6) + activesupport (= 4.2.6) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.6) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (4.2.6) + actionpack (= 4.2.6) + activesupport (= 4.2.6) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rainbow (2.1.0) + raindrops (0.16.0) + rake (10.5.0) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + rblineprof (0.3.6) + debugger-ruby_core_source (~> 1.3) + rdoc (3.12.2) + json (~> 1.4) + recaptcha (3.3.0) + json + redcarpet (3.3.4) + redis (3.3.0) + redis-actionpack (4.0.1) + actionpack (~> 4) + redis-rack (~> 1.5.0) + redis-store (~> 1.1.0) + redis-activesupport (4.1.5) + activesupport (>= 3, < 5) + redis-store (~> 1.1.0) + redis-namespace (1.5.2) + redis (~> 3.0, >= 3.0.4) + redis-rack (1.5.0) + rack (~> 1.5) + redis-store (~> 1.1.0) + redis-rails (4.0.0) + redis-actionpack (~> 4) + redis-activesupport (~> 4) + redis-store (~> 1.1.0) + redis-store (1.1.7) + redis (>= 2.2) + request_store (1.3.1) + rerun (0.11.0) + listen (~> 3.0) + responders (2.2.0) + railties (>= 4.2.0, < 5.1) + rinku (2.0.0) + rotp (2.1.2) + rouge (1.11.1) + rqrcode (0.10.1) + chunky_png (~> 1.0) + rqrcode-rails3 (0.1.7) + rqrcode (>= 0.4.2) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.1) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-retry (0.4.5) + rspec-core + rspec-support (3.5.0) + rubocop (0.40.0) + parser (>= 2.3.1.0, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + rubocop-rspec (1.5.0) + rubocop (>= 0.40.0) + ruby-fogbugz (0.2.1) + crack (~> 0.4) + ruby-progressbar (1.8.1) + ruby-saml (1.3.0) + nokogiri (>= 1.5.10) + ruby_dep (1.3.1) + ruby_parser (3.8.2) + sexp_processor (~> 4.1) + rubyntlm (0.6.0) + rubypants (0.2.0) + rubyzip (1.2.0) + rufus-scheduler (3.2.1) + rugged (0.24.0) + safe_yaml (1.0.4) + sanitize (2.1.0) + nokogiri (>= 1.4.4) + sass (3.4.22) + sass-rails (5.0.5) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) + faraday (~> 0.8, < 0.10) + scss_lint (0.47.1) + rake (>= 0.9, < 11) + sass (~> 3.4.15) + sdoc (0.3.20) + json (>= 1.1.3) + rdoc (~> 3.10) + seed-fu (2.3.6) + activerecord (>= 3.1) + activesupport (>= 3.1) + select2-rails (3.5.10) + thor (~> 0.14) + sentry-raven (1.1.0) + faraday (>= 0.7.6) + settingslogic (2.0.9) + sexp_processor (4.7.0) + sham_rack (1.3.6) + rack + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + sidekiq (4.1.4) + concurrent-ruby (~> 1.0) + connection_pool (~> 2.2, >= 2.2.0) + redis (~> 3.2, >= 3.2.1) + sinatra (>= 1.4.7) + sidekiq-cron (0.4.2) + redis-namespace (>= 1.5.2) + rufus-scheduler (>= 2.0.24) + sidekiq (>= 4.0.0) + simple_oauth (0.1.9) + simplecov (0.11.2) + docile (~> 1.1.0) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + sinatra (1.4.7) + rack (~> 1.5) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + six (0.2.0) + slack-notifier (1.2.1) + slop (3.6.0) + spinach (0.8.10) + colorize + gherkin-ruby (>= 0.3.2) + json + spinach-rails (0.2.1) + capybara (>= 2.0.0) + railties (>= 3) + spinach (>= 0.4) + spinach-rerun-reporter (0.0.2) + spinach (~> 0.8) + spring (1.7.2) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) + spring-commands-spinach (1.1.0) + spring (>= 0.9.1) + spring-commands-teaspoon (0.0.2) + spring (>= 0.9.1) + sprockets (3.6.3) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.1.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + state_machines (0.4.0) + state_machines-activemodel (0.4.0) + activemodel (>= 4.1, < 5.1) + state_machines (>= 0.4.0) + state_machines-activerecord (0.4.0) + activerecord (>= 4.1, < 5.1) + state_machines-activemodel (>= 0.3.0) + stringex (2.5.2) + sys-filesystem (1.1.6) + ffi + systemu (2.6.5) + task_list (1.0.2) + html-pipeline + teaspoon (1.1.5) + railties (>= 3.2.5, < 6) + teaspoon-jasmine (2.2.0) + teaspoon (>= 1.0.0) + temple (0.7.7) + test_after_commit (0.4.2) + activerecord (>= 3.2) + thin (1.7.0) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.5) + timecop (0.8.1) + timfel-krb5-auth (0.8.3) + tinder (1.10.1) + eventmachine (~> 1.0) + faraday (~> 0.9.0) + faraday_middleware (~> 0.9) + hashie (>= 1.0) + json (~> 1.8.0) + mime-types + multi_json (~> 1.7) + twitter-stream (~> 0.1) + turbolinks (2.5.3) + coffee-rails + twitter-stream (0.1.16) + eventmachine (>= 0.12.8) + http_parser.rb (~> 0.5.1) + simple_oauth (~> 0.1.4) + tzinfo (1.2.2) + thread_safe (~> 0.1) + u2f (0.2.1) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + underscore-rails (1.8.3) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + unicode-display_width (1.1.0) + unicorn (4.9.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + unicorn-worker-killer (0.4.4) + get_process_mem (~> 0) + unicorn (>= 4, < 6) + uniform_notifier (1.10.0) + uuid (2.3.8) + macaddr (~> 1.0) + version_sorter (2.0.0) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + vmstat (2.1.0) + warden (1.2.6) + rack (>= 1.0) + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + webmock (1.21.0) + addressable (>= 2.3.6) + crack (>= 0.3.2) + websocket-driver (0.6.4) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + wikicloth (0.8.1) + builder + expression_parser + rinku + xml-simple (1.1.5) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth (~> 4.3.2) + ace-rails-ap (~> 4.0.2) + activerecord-session_store (~> 1.0.0) + acts-as-taggable-on (~> 3.4) + addressable (~> 2.3.8) + after_commit_queue + akismet (~> 2.0) + allocations (~> 1.0) + asana (~> 0.4.0) + asciidoctor (~> 1.5.2) + attr_encrypted (~> 3.0.0) + awesome_print (~> 1.2.0) + babosa (~> 1.0.2) + base32 (~> 0.3.0) + benchmark-ips + better_errors (~> 1.0.1) + binding_of_caller (~> 0.7.2) + bootstrap-sass (~> 3.3.0) + brakeman (~> 3.3.0) + browser (~> 2.2) + bullet + bundler-audit + byebug + capybara (~> 2.6.2) + capybara-screenshot (~> 1.0.0) + carrierwave (~> 0.10.0) + charlock_holmes (~> 0.7.3) + chronic_duration (~> 0.10.6) + coffee-rails (~> 4.1.0) + connection_pool (~> 2.0) + creole (~> 0.5.0) + d3_rails (~> 3.5.0) + database_cleaner (~> 1.4.0) + default_value_for (~> 3.0.0) + devise (~> 4.0) + devise-two-factor (~> 3.0.0) + diffy (~> 3.0.3) + doorkeeper (~> 4.0) + dropzonejs-rails (~> 0.7.1) + email_reply_parser (~> 0.5.8) + email_spec (~> 1.6.0) + factory_girl_rails (~> 4.6.0) + ffaker (~> 2.0.0) + flay + flog + fog-aws (~> 0.9) + fog-azure (~> 0.0) + fog-core (~> 1.40) + fog-google (~> 0.3) + fog-local (~> 0.3) + fog-openstack (~> 0.1) + fog-rackspace (~> 0.1.1) + font-awesome-rails (~> 4.6.1) + foreman + fuubar (~> 2.0.0) + gemnasium-gitlab-service (~> 0.2) + gemojione (~> 2.6) + github-linguist (~> 4.7.0) + github-markup (~> 1.3.1) + gitlab-flowdock-git-hook (~> 1.0.1) + gitlab_git (~> 10.2) + gitlab_meta (= 7.0) + gitlab_omniauth-ldap (~> 1.2.1) + gollum-lib (~> 4.1.0) + gollum-rugged_adapter (~> 0.4.2) + gon (~> 6.0.1) + grape (~> 0.13.0) + grape-entity (~> 0.4.2) + hamlit (~> 2.5) + health_check (~> 1.5.1) + hipchat (~> 1.5.0) + html-pipeline (~> 1.11.0) + httparty (~> 0.13.3) + influxdb (~> 0.2) + jquery-atwho-rails (~> 1.3.2) + jquery-rails (~> 4.1.0) + jquery-turbolinks (~> 2.1.0) + jquery-ui-rails (~> 5.0.0) + jwt + kaminari (~> 0.17.0) + knapsack + letter_opener_web (~> 1.3.0) + license_finder + licensee (~> 8.0.0) + loofah (~> 2.0.3) + mail_room (~> 0.8) + method_source (~> 0.8) + minitest (~> 5.7.0) + mousetrap-rails (~> 1.4.6) + mysql2 (~> 0.3.16) + nested_form (~> 0.3.2) + net-ssh (~> 3.0.1) + newrelic_rpm (~> 3.14) + nokogiri (~> 1.6.7, >= 1.6.7.2) + oauth2 (~> 1.0.0) + octokit (~> 4.3.0) + omniauth (~> 1.3.1) + omniauth-auth0 (~> 1.4.1) + omniauth-azure-oauth2 (~> 0.0.6) + omniauth-bitbucket (~> 0.0.2) + omniauth-cas3 (~> 1.1.2) + omniauth-facebook (~> 3.0.0) + omniauth-github (~> 1.1.1) + omniauth-gitlab (~> 1.0.0) + omniauth-google-oauth2 (~> 0.2.0) + omniauth-kerberos (~> 0.3.0) + omniauth-saml (~> 1.6.0) + omniauth-shibboleth (~> 1.2.0) + omniauth-twitter (~> 1.2.0) + omniauth_crowd (~> 2.2.0) + org-ruby (~> 0.9.12) + paranoia (~> 2.0) + pg (~> 0.18.2) + poltergeist (~> 1.9.0) + premailer-rails (~> 1.9.0) + pry-rails + rack-attack (~> 4.3.1) + rack-cors (~> 0.4.0) + rack-oauth2 (~> 1.2.1) + rails (= 4.2.6) + rails-deprecated_sanitizer (~> 1.0.3) + rainbow (~> 2.1.0) + rblineprof + rdoc (~> 3.6) + recaptcha (~> 3.0) + redcarpet (~> 3.3.3) + redis (~> 3.2) + redis-namespace + redis-rails (~> 4.0.0) + request_store (~> 1.3.0) + rerun (~> 0.11.0) + responders (~> 2.0) + rouge (~> 1.11) + rqrcode-rails3 (~> 0.1.7) + rspec-rails (~> 3.5.0) + rspec-retry + rubocop (~> 0.40.0) + rubocop-rspec (~> 1.5.0) + ruby-fogbugz (~> 0.2.1) + sanitize (~> 2.0) + sass-rails (~> 5.0.0) + scss_lint (~> 0.47.0) + sdoc (~> 0.3.20) + seed-fu (~> 2.3.5) + select2-rails (~> 3.5.9) + sentry-raven (~> 1.1.0) + settingslogic (~> 2.0.9) + sham_rack + shoulda-matchers (~> 2.8.0) + sidekiq (~> 4.0) + sidekiq-cron (~> 0.4.0) + simplecov (~> 0.11.0) + sinatra (~> 1.4.4) + six (~> 0.2.0) + slack-notifier (~> 1.2.0) + spinach-rails (~> 0.2.1) + spinach-rerun-reporter (~> 0.0.2) + spring (~> 1.7.0) + spring-commands-rspec (~> 1.0.4) + spring-commands-spinach (~> 1.1.0) + spring-commands-teaspoon (~> 0.0.2) + sprockets (~> 3.6.0) + state_machines-activerecord (~> 0.4.0) + sys-filesystem (~> 1.1.6) + task_list (~> 1.0.2) + teaspoon (~> 1.1.0) + teaspoon-jasmine (~> 2.2.0) + test_after_commit (~> 0.4.2) + thin (~> 1.7.0) + tinder (~> 1.10.0) + turbolinks (~> 2.5.0) + u2f (~> 0.2.1) + uglifier (~> 2.7.2) + underscore-rails (~> 1.8.0) + unf (~> 0.1.4) + unicorn (~> 4.9.0) + unicorn-worker-killer (~> 0.4.2) + version_sorter (~> 2.0.0) + virtus (~> 1.0.1) + vmstat (~> 2.1.0) + web-console (~> 2.0) + webmock (~> 1.21.0) + wikicloth (= 0.8.1) + +BUNDLED WITH + 1.12.5 -- cgit v1.2.1 From 50a077b995f7c40bcd4ee6986165c4324ae15a4d Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 13:07:43 +0100 Subject: removes Gemfile.lock from project --- Gemfile.lock | 994 ----------------------------------------------------------- 1 file changed, 994 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 8809edb0fc9..00000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,994 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - RedCloth (4.3.2) - ace-rails-ap (4.0.2) - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) - globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) - arel (~> 6.0) - activerecord-session_store (1.0.0) - actionpack (>= 4.0, < 5.1) - activerecord (>= 4.0, < 5.1) - multi_json (~> 1.11, >= 1.11.2) - rack (>= 1.5.2, < 3) - railties (>= 4.0, < 5.1) - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - acts-as-taggable-on (3.5.0) - activerecord (>= 3.2, < 5) - addressable (2.3.8) - after_commit_queue (1.3.0) - activerecord (>= 3.0) - akismet (2.0.0) - allocations (1.0.5) - arel (6.0.3) - asana (0.4.0) - faraday (~> 0.9) - faraday_middleware (~> 0.9) - faraday_middleware-multi_json (~> 0.0) - oauth2 (~> 1.0) - asciidoctor (1.5.4) - ast (2.3.0) - attr_encrypted (3.0.1) - encryptor (~> 3.0.0) - attr_required (1.0.1) - autoprefixer-rails (6.3.7) - execjs - awesome_print (1.2.0) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - azure (0.7.5) - addressable (~> 2.3) - azure-core (~> 0.1) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - json (~> 1.8) - mime-types (>= 1, < 3.0) - nokogiri (~> 1.6) - systemu (~> 2.6) - thor (~> 0.19) - uuid (~> 2.0) - azure-core (0.1.2) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - nokogiri (~> 1.6) - babosa (1.0.2) - base32 (0.3.2) - bcrypt (3.1.11) - benchmark-ips (2.6.1) - better_errors (1.0.1) - coderay (>= 1.0.0) - erubis (>= 2.6.6) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - bootstrap-sass (3.3.6) - autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) - brakeman (3.3.2) - browser (2.2.0) - builder (3.2.2) - bullet (5.1.1) - activesupport (>= 3.0.0) - uniform_notifier (~> 1.10.0) - bundler-audit (0.5.0) - bundler (~> 1.2) - thor (~> 0.18) - byebug (9.0.5) - capybara (2.6.2) - addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - capybara-screenshot (1.0.13) - capybara (>= 1.0, < 3) - launchy - carrierwave (0.10.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) - json (>= 1.7) - mime-types (>= 1.16) - cause (0.1) - charlock_holmes (0.7.3) - chronic_duration (0.10.6) - numerizer (~> 0.1.1) - chunky_png (1.3.6) - cliver (0.3.2) - coderay (1.1.1) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (4.1.1) - coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.1.x) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - colorize (0.8.1) - concurrent-ruby (1.0.2) - connection_pool (2.2.0) - crack (0.4.3) - safe_yaml (~> 1.0.0) - creole (0.5.0) - css_parser (1.4.5) - addressable - d3_rails (3.5.16) - railties (>= 3.1.0) - daemons (1.2.3) - database_cleaner (1.4.1) - debug_inspector (0.0.2) - debugger-ruby_core_source (1.3.8) - default_value_for (3.0.1) - activerecord (>= 3.2.0, < 5.0) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.0) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) - responders - warden (~> 1.2.3) - devise-two-factor (3.0.0) - activesupport - attr_encrypted (>= 1.3, < 4, != 2) - devise (~> 4.0) - railties - rotp (~> 2.0) - diff-lcs (1.2.5) - diffy (3.0.7) - docile (1.1.5) - doorkeeper (4.0.0) - railties (>= 4.2) - dropzonejs-rails (0.7.3) - rails (> 3.1) - email_reply_parser (0.5.8) - email_spec (1.6.0) - launchy (~> 2.1) - mail (~> 2.2) - encryptor (3.0.0) - equalizer (0.0.11) - erubis (2.7.0) - escape_utils (1.1.1) - eventmachine (1.2.0.1) - excon (0.50.1) - execjs (2.7.0) - expression_parser (0.9.0) - factory_girl (4.5.0) - activesupport (>= 3.0.0) - factory_girl_rails (4.6.0) - factory_girl (~> 4.5.0) - railties (>= 3.0.0) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - faraday_middleware-multi_json (0.0.6) - faraday_middleware - multi_json - ffaker (2.0.0) - ffi (1.9.13) - flay (2.8.0) - erubis (~> 2.7.0) - path_expander (~> 1.0) - ruby_parser (~> 3.0) - sexp_processor (~> 4.0) - flog (4.4.0) - path_expander (~> 1.0) - ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.4) - flowdock (0.7.1) - httparty (~> 0.7) - multi_json - fog-aws (0.9.4) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-azure (0.0.2) - azure (~> 0.6) - fog-core (~> 1.27) - fog-json (~> 1.0) - fog-xml (~> 0.1) - fog-core (1.42.0) - builder - excon (~> 0.49) - formatador (~> 0.2) - fog-google (0.3.2) - fog-core - fog-json - fog-xml - fog-json (1.0.2) - fog-core (~> 1.0) - multi_json (~> 1.10) - fog-local (0.3.0) - fog-core (~> 1.27) - fog-openstack (0.1.7) - fog-core (>= 1.40) - fog-json (>= 1.0) - ipaddress (>= 0.8) - fog-rackspace (0.1.1) - fog-core (>= 1.35) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.8) - fog-xml (0.1.2) - fog-core - nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.3.1) - railties (>= 3.2, < 5.1) - foreman (0.82.0) - thor (~> 0.19.1) - formatador (0.2.5) - fuubar (2.0.0) - rspec (~> 3.0) - ruby-progressbar (~> 1.4) - gemnasium-gitlab-service (0.2.6) - rugged (~> 0.21) - gemojione (2.6.1) - json - get_process_mem (0.2.1) - gherkin-ruby (0.3.2) - github-linguist (4.7.6) - charlock_holmes (~> 0.7.3) - escape_utils (~> 1.1.0) - mime-types (>= 1.19) - rugged (>= 0.23.0b) - github-markup (1.3.3) - gitlab-flowdock-git-hook (1.0.1) - flowdock (~> 0.7) - gitlab-grit (>= 2.4.1) - multi_json - gitlab-grit (2.8.1) - charlock_holmes (~> 0.6) - diff-lcs (~> 1.1) - mime-types (>= 1.16, < 3) - posix-spawn (~> 0.3) - gitlab_git (10.3.0) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) - gitlab_meta (7.0) - gitlab_omniauth-ldap (1.2.1) - net-ldap (~> 0.9) - omniauth (~> 1.0) - pyu-ruby-sasl (~> 0.0.3.1) - rubyntlm (~> 0.3) - globalid (0.3.6) - activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.1) - gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.1.0) - github-markup (~> 1.3.3) - gollum-grit_adapter (~> 1.0) - nokogiri (~> 1.6.4) - rouge (~> 1.9) - sanitize (~> 2.1.0) - stringex (~> 2.5.1) - gollum-rugged_adapter (0.4.2) - mime-types (>= 1.15) - rugged (~> 0.24.0, >= 0.21.3) - gon (6.0.1) - actionpack (>= 3.0) - json - multi_json - request_store (>= 1.0) - grape (0.13.0) - activesupport - builder - hashie (>= 2.1.0) - multi_json (>= 1.3.2) - multi_xml (>= 0.5.2) - rack (>= 1.3.0) - rack-accept - rack-mount - virtus (>= 1.0.0) - grape-entity (0.4.8) - activesupport - multi_json (>= 1.3.2) - hamlit (2.5.0) - temple (~> 0.7.6) - thor - tilt - hashie (3.4.4) - health_check (1.5.1) - rails (>= 2.3.0) - hipchat (1.5.3) - httparty - mimemagic - html-pipeline (1.11.0) - activesupport (>= 2) - nokogiri (~> 1.4) - htmlentities (4.3.4) - http_parser.rb (0.5.3) - httparty (0.13.7) - json (~> 1.8) - multi_xml (>= 0.5.2) - httpclient (2.8.0) - i18n (0.7.0) - ice_nine (0.11.2) - influxdb (0.3.5) - cause - json - ipaddress (0.8.3) - jquery-atwho-rails (1.3.2) - jquery-rails (4.1.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jquery-turbolinks (2.1.0) - railties (>= 3.1.0) - turbolinks - jquery-ui-rails (5.0.5) - railties (>= 3.2.16) - json (1.8.3) - jwt (1.5.4) - kaminari (0.17.0) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - kgio (2.10.0) - knapsack (1.11.1) - rake - timecop (>= 0.1.0) - launchy (2.4.3) - addressable (~> 2.3) - letter_opener (1.4.1) - launchy (~> 2.2) - letter_opener_web (1.3.0) - actionmailer (>= 3.2) - letter_opener (~> 1.0) - railties (>= 3.2) - license_finder (2.1.2) - bundler - httparty - rubyzip - thor - xml-simple - licensee (8.0.0) - rugged (>= 0.24b) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.0.3) - nokogiri (>= 1.5.9) - macaddr (1.7.1) - systemu (~> 2.6.2) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mail_room (0.8.0) - method_source (0.8.2) - mime-types (2.99.2) - mimemagic (0.3.1) - mini_portile2 (2.1.0) - minitest (5.7.0) - mousetrap-rails (1.4.6) - multi_json (1.12.1) - multi_xml (0.5.5) - multipart-post (2.0.0) - mysql2 (0.3.21) - nested_form (0.3.2) - net-ldap (0.14.0) - net-ssh (3.0.2) - newrelic_rpm (3.16.0.318) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - numerizer (0.1.1) - oauth (0.5.1) - oauth2 (1.0.0) - faraday (>= 0.8, < 0.10) - jwt (~> 1.0) - multi_json (~> 1.3) - multi_xml (~> 0.5) - rack (~> 1.2) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) - omniauth (1.3.1) - hashie (>= 1.2, < 4) - rack (>= 1.0, < 3) - omniauth-auth0 (1.4.2) - omniauth-oauth2 (~> 1.1) - omniauth-azure-oauth2 (0.0.6) - jwt (~> 1.0) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-bitbucket (0.0.2) - multi_json (~> 1.7) - omniauth (~> 1.1) - omniauth-oauth (~> 1.0) - omniauth-cas3 (1.1.3) - addressable (~> 2.3) - nokogiri (~> 1.6.6) - omniauth (~> 1.2) - omniauth-facebook (3.0.0) - omniauth-oauth2 (~> 1.2) - omniauth-github (1.1.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.0) - omniauth-google-oauth2 (0.2.10) - addressable (~> 2.3) - jwt (~> 1.0) - multi_json (~> 1.3) - omniauth (>= 1.1.1) - omniauth-oauth2 (~> 1.3.1) - omniauth-kerberos (0.3.0) - omniauth-multipassword - timfel-krb5-auth (~> 0.8) - omniauth-multipassword (0.4.2) - omniauth (~> 1.0) - omniauth-oauth (1.1.0) - oauth - omniauth (~> 1.0) - omniauth-oauth2 (1.3.1) - oauth2 (~> 1.0) - omniauth (~> 1.2) - omniauth-saml (1.6.0) - omniauth (~> 1.3) - ruby-saml (~> 1.3) - omniauth-shibboleth (1.2.1) - omniauth (>= 1.0.0) - omniauth-twitter (1.2.1) - json (~> 1.3) - omniauth-oauth (~> 1.1) - omniauth_crowd (2.2.3) - activesupport - nokogiri (>= 1.4.4) - omniauth (~> 1.0) - org-ruby (0.9.12) - rubypants (~> 0.2) - orm_adapter (0.5.0) - paranoia (2.1.5) - activerecord (~> 4.0) - parser (2.3.1.2) - ast (~> 2.2) - path_expander (1.0.0) - pg (0.18.4) - pkg-config (1.1.7) - poltergeist (1.9.0) - capybara (~> 2.1) - cliver (~> 0.3.1) - multi_json (~> 1.0) - websocket-driver (>= 0.2.0) - posix-spawn (0.3.11) - powerpack (0.1.1) - premailer (1.8.7) - css_parser (>= 1.4.5) - htmlentities (>= 4.0.0) - premailer-rails (1.9.4) - actionmailer (>= 3, < 6) - premailer (~> 1.7, >= 1.7.9) - pry (0.10.3) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-rails (0.3.4) - pry (>= 0.9.10) - pyu-ruby-sasl (0.0.3.3) - rack (1.6.4) - rack-accept (0.4.5) - rack (>= 0.4) - rack-attack (4.3.1) - rack - rack-cors (0.4.0) - rack-mount (0.8.3) - rack (>= 1.0.0) - rack-oauth2 (1.2.3) - activesupport (>= 2.3) - attr_required (>= 0.0.5) - httpclient (>= 2.4) - multi_json (>= 1.3.6) - rack (>= 1.1) - rack-protection (1.5.3) - rack - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) - raindrops (0.16.0) - rake (10.5.0) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - rblineprof (0.3.6) - debugger-ruby_core_source (~> 1.3) - rdoc (3.12.2) - json (~> 1.4) - recaptcha (3.3.0) - json - redcarpet (3.3.4) - redis (3.3.0) - redis-actionpack (4.0.1) - actionpack (~> 4) - redis-rack (~> 1.5.0) - redis-store (~> 1.1.0) - redis-activesupport (4.1.5) - activesupport (>= 3, < 5) - redis-store (~> 1.1.0) - redis-namespace (1.5.2) - redis (~> 3.0, >= 3.0.4) - redis-rack (1.5.0) - rack (~> 1.5) - redis-store (~> 1.1.0) - redis-rails (4.0.0) - redis-actionpack (~> 4) - redis-activesupport (~> 4) - redis-store (~> 1.1.0) - redis-store (1.1.7) - redis (>= 2.2) - request_store (1.3.1) - rerun (0.11.0) - listen (~> 3.0) - responders (2.2.0) - railties (>= 4.2.0, < 5.1) - rinku (2.0.0) - rotp (2.1.2) - rouge (1.11.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) - rqrcode-rails3 (0.1.7) - rqrcode (>= 0.4.2) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.1) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-retry (0.4.5) - rspec-core - rspec-support (3.5.0) - rubocop (0.40.0) - parser (>= 2.3.1.0, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-rspec (1.5.0) - rubocop (>= 0.40.0) - ruby-fogbugz (0.2.1) - crack (~> 0.4) - ruby-progressbar (1.8.1) - ruby-saml (1.3.0) - nokogiri (>= 1.5.10) - ruby_dep (1.3.1) - ruby_parser (3.8.2) - sexp_processor (~> 4.1) - rubyntlm (0.6.0) - rubypants (0.2.0) - rubyzip (1.2.0) - rufus-scheduler (3.2.1) - rugged (0.24.0) - safe_yaml (1.0.4) - sanitize (2.1.0) - nokogiri (>= 1.4.4) - sass (3.4.22) - sass-rails (5.0.5) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) - scss_lint (0.47.1) - rake (>= 0.9, < 11) - sass (~> 3.4.15) - sdoc (0.3.20) - json (>= 1.1.3) - rdoc (~> 3.10) - seed-fu (2.3.6) - activerecord (>= 3.1) - activesupport (>= 3.1) - select2-rails (3.5.10) - thor (~> 0.14) - sentry-raven (1.1.0) - faraday (>= 0.7.6) - settingslogic (2.0.9) - sexp_processor (4.7.0) - sham_rack (1.3.6) - rack - shoulda-matchers (2.8.0) - activesupport (>= 3.0.0) - sidekiq (4.1.4) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.2, >= 2.2.0) - redis (~> 3.2, >= 3.2.1) - sinatra (>= 1.4.7) - sidekiq-cron (0.4.2) - redis-namespace (>= 1.5.2) - rufus-scheduler (>= 2.0.24) - sidekiq (>= 4.0.0) - simple_oauth (0.1.9) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - six (0.2.0) - slack-notifier (1.2.1) - slop (3.6.0) - spinach (0.8.10) - colorize - gherkin-ruby (>= 0.3.2) - json - spinach-rails (0.2.1) - capybara (>= 2.0.0) - railties (>= 3) - spinach (>= 0.4) - spinach-rerun-reporter (0.0.2) - spinach (~> 0.8) - spring (1.7.2) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) - spring-commands-spinach (1.1.0) - spring (>= 0.9.1) - spring-commands-teaspoon (0.0.2) - spring (>= 0.9.1) - sprockets (3.6.3) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.1.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - state_machines (0.4.0) - state_machines-activemodel (0.4.0) - activemodel (>= 4.1, < 5.1) - state_machines (>= 0.4.0) - state_machines-activerecord (0.4.0) - activerecord (>= 4.1, < 5.1) - state_machines-activemodel (>= 0.3.0) - stringex (2.5.2) - sys-filesystem (1.1.6) - ffi - systemu (2.6.5) - task_list (1.0.2) - html-pipeline - teaspoon (1.1.5) - railties (>= 3.2.5, < 6) - teaspoon-jasmine (2.2.0) - teaspoon (>= 1.0.0) - temple (0.7.7) - test_after_commit (0.4.2) - activerecord (>= 3.2) - thin (1.7.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - timecop (0.8.1) - timfel-krb5-auth (0.8.3) - tinder (1.10.1) - eventmachine (~> 1.0) - faraday (~> 0.9.0) - faraday_middleware (~> 0.9) - hashie (>= 1.0) - json (~> 1.8.0) - mime-types - multi_json (~> 1.7) - twitter-stream (~> 0.1) - turbolinks (2.5.3) - coffee-rails - twitter-stream (0.1.16) - eventmachine (>= 0.12.8) - http_parser.rb (~> 0.5.1) - simple_oauth (~> 0.1.4) - tzinfo (1.2.2) - thread_safe (~> 0.1) - u2f (0.2.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - underscore-rails (1.8.3) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.2) - unicode-display_width (1.1.0) - unicorn (4.9.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - unicorn-worker-killer (0.4.4) - get_process_mem (~> 0) - unicorn (>= 4, < 6) - uniform_notifier (1.10.0) - uuid (2.3.8) - macaddr (~> 1.0) - version_sorter (2.0.0) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - vmstat (2.1.0) - warden (1.2.6) - rack (>= 1.0) - web-console (2.3.0) - activemodel (>= 4.0) - binding_of_caller (>= 0.7.2) - railties (>= 4.0) - sprockets-rails (>= 2.0, < 4.0) - webmock (1.21.0) - addressable (>= 2.3.6) - crack (>= 0.3.2) - websocket-driver (0.6.4) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - wikicloth (0.8.1) - builder - expression_parser - rinku - xml-simple (1.1.5) - xpath (2.0.0) - nokogiri (~> 1.3) - -PLATFORMS - ruby - -DEPENDENCIES - RedCloth (~> 4.3.2) - ace-rails-ap (~> 4.0.2) - activerecord-session_store (~> 1.0.0) - acts-as-taggable-on (~> 3.4) - addressable (~> 2.3.8) - after_commit_queue - akismet (~> 2.0) - allocations (~> 1.0) - asana (~> 0.4.0) - asciidoctor (~> 1.5.2) - attr_encrypted (~> 3.0.0) - awesome_print (~> 1.2.0) - babosa (~> 1.0.2) - base32 (~> 0.3.0) - benchmark-ips - better_errors (~> 1.0.1) - binding_of_caller (~> 0.7.2) - bootstrap-sass (~> 3.3.0) - brakeman (~> 3.3.0) - browser (~> 2.2) - bullet - bundler-audit - byebug - capybara (~> 2.6.2) - capybara-screenshot (~> 1.0.0) - carrierwave (~> 0.10.0) - charlock_holmes (~> 0.7.3) - chronic_duration (~> 0.10.6) - coffee-rails (~> 4.1.0) - connection_pool (~> 2.0) - creole (~> 0.5.0) - d3_rails (~> 3.5.0) - database_cleaner (~> 1.4.0) - default_value_for (~> 3.0.0) - devise (~> 4.0) - devise-two-factor (~> 3.0.0) - diffy (~> 3.0.3) - doorkeeper (~> 4.0) - dropzonejs-rails (~> 0.7.1) - email_reply_parser (~> 0.5.8) - email_spec (~> 1.6.0) - factory_girl_rails (~> 4.6.0) - ffaker (~> 2.0.0) - flay - flog - fog-aws (~> 0.9) - fog-azure (~> 0.0) - fog-core (~> 1.40) - fog-google (~> 0.3) - fog-local (~> 0.3) - fog-openstack (~> 0.1) - fog-rackspace (~> 0.1.1) - font-awesome-rails (~> 4.6.1) - foreman - fuubar (~> 2.0.0) - gemnasium-gitlab-service (~> 0.2) - gemojione (~> 2.6) - github-linguist (~> 4.7.0) - github-markup (~> 1.3.1) - gitlab-flowdock-git-hook (~> 1.0.1) - gitlab_git (~> 10.2) - gitlab_meta (= 7.0) - gitlab_omniauth-ldap (~> 1.2.1) - gollum-lib (~> 4.1.0) - gollum-rugged_adapter (~> 0.4.2) - gon (~> 6.0.1) - grape (~> 0.13.0) - grape-entity (~> 0.4.2) - hamlit (~> 2.5) - health_check (~> 1.5.1) - hipchat (~> 1.5.0) - html-pipeline (~> 1.11.0) - httparty (~> 0.13.3) - influxdb (~> 0.2) - jquery-atwho-rails (~> 1.3.2) - jquery-rails (~> 4.1.0) - jquery-turbolinks (~> 2.1.0) - jquery-ui-rails (~> 5.0.0) - jwt - kaminari (~> 0.17.0) - knapsack - letter_opener_web (~> 1.3.0) - license_finder - licensee (~> 8.0.0) - loofah (~> 2.0.3) - mail_room (~> 0.8) - method_source (~> 0.8) - minitest (~> 5.7.0) - mousetrap-rails (~> 1.4.6) - mysql2 (~> 0.3.16) - nested_form (~> 0.3.2) - net-ssh (~> 3.0.1) - newrelic_rpm (~> 3.14) - nokogiri (~> 1.6.7, >= 1.6.7.2) - oauth2 (~> 1.0.0) - octokit (~> 4.3.0) - omniauth (~> 1.3.1) - omniauth-auth0 (~> 1.4.1) - omniauth-azure-oauth2 (~> 0.0.6) - omniauth-bitbucket (~> 0.0.2) - omniauth-cas3 (~> 1.1.2) - omniauth-facebook (~> 3.0.0) - omniauth-github (~> 1.1.1) - omniauth-gitlab (~> 1.0.0) - omniauth-google-oauth2 (~> 0.2.0) - omniauth-kerberos (~> 0.3.0) - omniauth-saml (~> 1.6.0) - omniauth-shibboleth (~> 1.2.0) - omniauth-twitter (~> 1.2.0) - omniauth_crowd (~> 2.2.0) - org-ruby (~> 0.9.12) - paranoia (~> 2.0) - pg (~> 0.18.2) - poltergeist (~> 1.9.0) - premailer-rails (~> 1.9.0) - pry-rails - rack-attack (~> 4.3.1) - rack-cors (~> 0.4.0) - rack-oauth2 (~> 1.2.1) - rails (= 4.2.6) - rails-deprecated_sanitizer (~> 1.0.3) - rainbow (~> 2.1.0) - rblineprof - rdoc (~> 3.6) - recaptcha (~> 3.0) - redcarpet (~> 3.3.3) - redis (~> 3.2) - redis-namespace - redis-rails (~> 4.0.0) - request_store (~> 1.3.0) - rerun (~> 0.11.0) - responders (~> 2.0) - rouge (~> 1.11) - rqrcode-rails3 (~> 0.1.7) - rspec-rails (~> 3.5.0) - rspec-retry - rubocop (~> 0.40.0) - rubocop-rspec (~> 1.5.0) - ruby-fogbugz (~> 0.2.1) - sanitize (~> 2.0) - sass-rails (~> 5.0.0) - scss_lint (~> 0.47.0) - sdoc (~> 0.3.20) - seed-fu (~> 2.3.5) - select2-rails (~> 3.5.9) - sentry-raven (~> 1.1.0) - settingslogic (~> 2.0.9) - sham_rack - shoulda-matchers (~> 2.8.0) - sidekiq (~> 4.0) - sidekiq-cron (~> 0.4.0) - simplecov (~> 0.11.0) - sinatra (~> 1.4.4) - six (~> 0.2.0) - slack-notifier (~> 1.2.0) - spinach-rails (~> 0.2.1) - spinach-rerun-reporter (~> 0.0.2) - spring (~> 1.7.0) - spring-commands-rspec (~> 1.0.4) - spring-commands-spinach (~> 1.1.0) - spring-commands-teaspoon (~> 0.0.2) - sprockets (~> 3.6.0) - state_machines-activerecord (~> 0.4.0) - sys-filesystem (~> 1.1.6) - task_list (~> 1.0.2) - teaspoon (~> 1.1.0) - teaspoon-jasmine (~> 2.2.0) - test_after_commit (~> 0.4.2) - thin (~> 1.7.0) - tinder (~> 1.10.0) - turbolinks (~> 2.5.0) - u2f (~> 0.2.1) - uglifier (~> 2.7.2) - underscore-rails (~> 1.8.0) - unf (~> 0.1.4) - unicorn (~> 4.9.0) - unicorn-worker-killer (~> 0.4.2) - version_sorter (~> 2.0.0) - virtus (~> 1.0.1) - vmstat (~> 2.1.0) - web-console (~> 2.0) - webmock (~> 1.21.0) - wikicloth (= 0.8.1) - -BUNDLED WITH - 1.12.5 -- cgit v1.2.1 From 36dc6638571bf724a02ecdbdc639334efbbda60b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 13:41:26 +0100 Subject: adds Gemfile.lock --- Gemfile.lock | 989 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 989 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000000..055596b056f --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,989 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.3.2) + ace-rails-ap (4.0.2) + actionmailer (4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.6) + actionview (= 4.2.6) + activesupport (= 4.2.6) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.6) + activesupport (= 4.2.6) + globalid (>= 0.3.0) + activemodel (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + activerecord (4.2.6) + activemodel (= 4.2.6) + activesupport (= 4.2.6) + arel (~> 6.0) + activerecord-session_store (1.0.0) + actionpack (>= 4.0, < 5.1) + activerecord (>= 4.0, < 5.1) + multi_json (~> 1.11, >= 1.11.2) + rack (>= 1.5.2, < 3) + railties (>= 4.0, < 5.1) + activesupport (4.2.6) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + acts-as-taggable-on (3.5.0) + activerecord (>= 3.2, < 5) + addressable (2.3.8) + after_commit_queue (1.3.0) + activerecord (>= 3.0) + akismet (2.0.0) + allocations (1.0.5) + arel (6.0.3) + asana (0.4.0) + faraday (~> 0.9) + faraday_middleware (~> 0.9) + faraday_middleware-multi_json (~> 0.0) + oauth2 (~> 1.0) + asciidoctor (1.5.3) + ast (2.2.0) + attr_encrypted (3.0.1) + encryptor (~> 3.0.0) + attr_required (1.0.0) + autoprefixer-rails (6.2.3) + execjs + json + awesome_print (1.2.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + azure (0.7.5) + addressable (~> 2.3) + azure-core (~> 0.1) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + json (~> 1.8) + mime-types (>= 1, < 3.0) + nokogiri (~> 1.6) + systemu (~> 2.6) + thor (~> 0.19) + uuid (~> 2.0) + azure-core (0.1.2) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + nokogiri (~> 1.6) + babosa (1.0.2) + base32 (0.3.2) + bcrypt (3.1.11) + benchmark-ips (2.3.0) + better_errors (1.0.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bootstrap-sass (3.3.6) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + brakeman (3.3.2) + browser (2.2.0) + builder (3.2.2) + bullet (5.0.0) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.9.0) + bundler-audit (0.5.0) + bundler (~> 1.2) + thor (~> 0.18) + byebug (8.2.1) + capybara (2.6.2) + addressable + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + capybara-screenshot (1.0.11) + capybara (>= 1.0, < 3) + launchy + carrierwave (0.10.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + mime-types (>= 1.16) + cause (0.1) + charlock_holmes (0.7.3) + chronic_duration (0.10.6) + numerizer (~> 0.1.1) + chunky_png (1.3.5) + cliver (0.3.2) + coderay (1.1.0) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + coffee-rails (4.1.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.1.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorize (0.7.7) + concurrent-ruby (1.0.2) + connection_pool (2.2.0) + crack (0.4.3) + safe_yaml (~> 1.0.0) + creole (0.5.0) + css_parser (1.4.1) + addressable + d3_rails (3.5.11) + railties (>= 3.1.0) + daemons (1.2.3) + database_cleaner (1.4.1) + debug_inspector (0.0.2) + debugger-ruby_core_source (1.3.8) + default_value_for (3.0.1) + activerecord (>= 3.2.0, < 5.0) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + devise (4.1.1) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 5.1) + responders + warden (~> 1.2.3) + devise-two-factor (3.0.0) + activesupport + attr_encrypted (>= 1.3, < 4, != 2) + devise (~> 4.0) + railties + rotp (~> 2.0) + diff-lcs (1.2.5) + diffy (3.0.7) + docile (1.1.5) + doorkeeper (4.0.0) + railties (>= 4.2) + dropzonejs-rails (0.7.2) + rails (> 3.1) + email_reply_parser (0.5.8) + email_spec (1.6.0) + launchy (~> 2.1) + mail (~> 2.2) + encryptor (3.0.0) + equalizer (0.0.11) + erubis (2.7.0) + escape_utils (1.1.1) + eventmachine (1.0.8) + excon (0.49.0) + execjs (2.6.0) + expression_parser (0.9.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.6.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) + faraday_middleware-multi_json (0.0.6) + faraday_middleware + multi_json + ffaker (2.0.0) + ffi (1.9.10) + flay (2.6.1) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.3.2) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.4) + flowdock (0.7.1) + httparty (~> 0.7) + multi_json + fog-aws (0.9.2) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-azure (0.0.2) + azure (~> 0.6) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + fog-core (1.40.0) + builder + excon (~> 0.49) + formatador (~> 0.2) + fog-google (0.3.2) + fog-core + fog-json + fog-xml + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-local (0.3.0) + fog-core (~> 1.27) + fog-openstack (0.1.6) + fog-core (>= 1.39) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-rackspace (0.1.1) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-xml (0.1.2) + fog-core + nokogiri (~> 1.5, >= 1.5.11) + font-awesome-rails (4.6.1.0) + railties (>= 3.2, < 5.1) + foreman (0.78.0) + thor (~> 0.19.1) + formatador (0.2.5) + fuubar (2.0.0) + rspec (~> 3.0) + ruby-progressbar (~> 1.4) + gemnasium-gitlab-service (0.2.6) + rugged (~> 0.21) + gemojione (2.6.1) + json + get_process_mem (0.2.0) + gherkin-ruby (0.3.2) + github-linguist (4.7.6) + charlock_holmes (~> 0.7.3) + escape_utils (~> 1.1.0) + mime-types (>= 1.19) + rugged (>= 0.23.0b) + github-markup (1.3.3) + gitlab-flowdock-git-hook (1.0.1) + flowdock (~> 0.7) + gitlab-grit (>= 2.4.1) + multi_json + gitlab-grit (2.8.1) + charlock_holmes (~> 0.6) + diff-lcs (~> 1.1) + mime-types (>= 1.16, < 3) + posix-spawn (~> 0.3) + gitlab_git (10.2.3) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + gitlab_meta (7.0) + gitlab_omniauth-ldap (1.2.1) + net-ldap (~> 0.9) + omniauth (~> 1.0) + pyu-ruby-sasl (~> 0.0.3.1) + rubyntlm (~> 0.3) + globalid (0.3.6) + activesupport (>= 4.1.0) + gollum-grit_adapter (1.0.0) + gitlab-grit (~> 2.7, >= 2.7.1) + gollum-lib (4.1.0) + github-markup (~> 1.3.3) + gollum-grit_adapter (~> 1.0) + nokogiri (~> 1.6.4) + rouge (~> 1.9) + sanitize (~> 2.1.0) + stringex (~> 2.5.1) + gollum-rugged_adapter (0.4.2) + mime-types (>= 1.15) + rugged (~> 0.24.0, >= 0.21.3) + gon (6.0.1) + actionpack (>= 3.0) + json + multi_json + request_store (>= 1.0) + grape (0.13.0) + activesupport + builder + hashie (>= 2.1.0) + multi_json (>= 1.3.2) + multi_xml (>= 0.5.2) + rack (>= 1.3.0) + rack-accept + rack-mount + virtus (>= 1.0.0) + grape-entity (0.4.8) + activesupport + multi_json (>= 1.3.2) + hamlit (2.5.0) + temple (~> 0.7.6) + thor + tilt + hashie (3.4.3) + health_check (1.5.1) + rails (>= 2.3.0) + hipchat (1.5.2) + httparty + mimemagic + html-pipeline (1.11.0) + activesupport (>= 2) + nokogiri (~> 1.4) + htmlentities (4.3.4) + http_parser.rb (0.5.3) + httparty (0.13.7) + json (~> 1.8) + multi_xml (>= 0.5.2) + httpclient (2.7.0.1) + i18n (0.7.0) + ice_nine (0.11.1) + influxdb (0.2.3) + cause + json + ipaddress (0.8.3) + jquery-atwho-rails (1.3.2) + jquery-rails (4.1.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) + json (1.8.3) + jwt (1.5.4) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.10.0) + knapsack (1.11.0) + rake + timecop (>= 0.1.0) + launchy (2.4.3) + addressable (~> 2.3) + letter_opener (1.4.1) + launchy (~> 2.2) + letter_opener_web (1.3.0) + actionmailer (>= 3.2) + letter_opener (~> 1.0) + railties (>= 3.2) + license_finder (2.1.0) + bundler + httparty + rubyzip + thor + xml-simple + licensee (8.0.0) + rugged (>= 0.24b) + listen (3.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + loofah (2.0.3) + nokogiri (>= 1.5.9) + macaddr (1.7.1) + systemu (~> 2.6.2) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mail_room (0.8.0) + method_source (0.8.2) + mime-types (2.99.2) + mimemagic (0.3.0) + mini_portile2 (2.1.0) + minitest (5.7.0) + mousetrap-rails (1.4.6) + multi_json (1.12.1) + multi_xml (0.5.5) + multipart-post (2.0.0) + mysql2 (0.3.20) + nested_form (0.3.2) + net-ldap (0.12.1) + net-ssh (3.0.1) + newrelic_rpm (3.14.1.311) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + numerizer (0.1.1) + oauth (0.4.7) + oauth2 (1.2.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (>= 1.2, < 3) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) + omniauth (1.3.1) + hashie (>= 1.2, < 4) + rack (>= 1.0, < 3) + omniauth-auth0 (1.4.1) + omniauth-oauth2 (~> 1.1) + omniauth-azure-oauth2 (0.0.6) + jwt (~> 1.0) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-bitbucket (0.0.2) + multi_json (~> 1.7) + omniauth (~> 1.1) + omniauth-oauth (~> 1.0) + omniauth-cas3 (1.1.3) + addressable (~> 2.3) + nokogiri (~> 1.6.6) + omniauth (~> 1.2) + omniauth-facebook (3.0.0) + omniauth-oauth2 (~> 1.2) + omniauth-github (1.1.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-gitlab (1.0.1) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.0) + omniauth-google-oauth2 (0.2.10) + addressable (~> 2.3) + jwt (~> 1.0) + multi_json (~> 1.3) + omniauth (>= 1.1.1) + omniauth-oauth2 (~> 1.3.1) + omniauth-kerberos (0.3.0) + omniauth-multipassword + timfel-krb5-auth (~> 0.8) + omniauth-multipassword (0.4.2) + omniauth (~> 1.0) + omniauth-oauth (1.1.0) + oauth + omniauth (~> 1.0) + omniauth-oauth2 (1.3.1) + oauth2 (~> 1.0) + omniauth (~> 1.2) + omniauth-saml (1.6.0) + omniauth (~> 1.3) + ruby-saml (~> 1.3) + omniauth-shibboleth (1.2.1) + omniauth (>= 1.0.0) + omniauth-twitter (1.2.1) + json (~> 1.3) + omniauth-oauth (~> 1.1) + omniauth_crowd (2.2.3) + activesupport + nokogiri (>= 1.4.4) + omniauth (~> 1.0) + org-ruby (0.9.12) + rubypants (~> 0.2) + orm_adapter (0.5.0) + paranoia (2.1.4) + activerecord (~> 4.0) + parser (2.3.1.0) + ast (~> 2.2) + pg (0.18.4) + pkg-config (1.1.7) + poltergeist (1.9.0) + capybara (~> 2.1) + cliver (~> 0.3.1) + multi_json (~> 1.0) + websocket-driver (>= 0.2.0) + posix-spawn (0.3.11) + powerpack (0.1.1) + premailer (1.8.6) + css_parser (>= 1.3.6) + htmlentities (>= 4.0.0) + premailer-rails (1.9.2) + actionmailer (>= 3, < 6) + premailer (~> 1.7, >= 1.7.9) + pry (0.10.3) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.4) + pry (>= 0.9.10) + pyu-ruby-sasl (0.0.3.3) + rack (1.6.4) + rack-accept (0.4.5) + rack (>= 0.4) + rack-attack (4.3.1) + rack + rack-cors (0.4.0) + rack-mount (0.8.3) + rack (>= 1.0.0) + rack-oauth2 (1.2.1) + activesupport (>= 2.3) + attr_required (>= 0.0.5) + httpclient (>= 2.4) + multi_json (>= 1.3.6) + rack (>= 1.1) + rack-protection (1.5.3) + rack + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.6) + actionmailer (= 4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + activemodel (= 4.2.6) + activerecord (= 4.2.6) + activesupport (= 4.2.6) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.6) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (4.2.6) + actionpack (= 4.2.6) + activesupport (= 4.2.6) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rainbow (2.1.0) + raindrops (0.15.0) + rake (10.5.0) + rb-fsevent (0.9.6) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rblineprof (0.3.6) + debugger-ruby_core_source (~> 1.3) + rdoc (3.12.2) + json (~> 1.4) + recaptcha (3.0.0) + json + redcarpet (3.3.3) + redis (3.2.2) + redis-actionpack (4.0.1) + actionpack (~> 4) + redis-rack (~> 1.5.0) + redis-store (~> 1.1.0) + redis-activesupport (4.1.5) + activesupport (>= 3, < 5) + redis-store (~> 1.1.0) + redis-namespace (1.5.2) + redis (~> 3.0, >= 3.0.4) + redis-rack (1.5.0) + rack (~> 1.5) + redis-store (~> 1.1.0) + redis-rails (4.0.0) + redis-actionpack (~> 4) + redis-activesupport (~> 4) + redis-store (~> 1.1.0) + redis-store (1.1.7) + redis (>= 2.2) + request_store (1.3.0) + rerun (0.11.0) + listen (~> 3.0) + responders (2.1.1) + railties (>= 4.2.0, < 5.1) + rinku (2.0.0) + rotp (2.1.2) + rouge (1.11.0) + rqrcode (0.7.0) + chunky_png + rqrcode-rails3 (0.1.7) + rqrcode (>= 0.4.2) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.0) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-retry (0.4.5) + rspec-core + rspec-support (3.5.0) + rubocop (0.40.0) + parser (>= 2.3.1.0, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + rubocop-rspec (1.5.0) + rubocop (>= 0.40.0) + ruby-fogbugz (0.2.1) + crack (~> 0.4) + ruby-progressbar (1.8.1) + ruby-saml (1.3.0) + nokogiri (>= 1.5.10) + ruby_parser (3.8.2) + sexp_processor (~> 4.1) + rubyntlm (0.5.2) + rubypants (0.2.0) + rubyzip (1.2.0) + rufus-scheduler (3.1.10) + rugged (0.24.0) + safe_yaml (1.0.4) + sanitize (2.1.0) + nokogiri (>= 1.4.4) + sass (3.4.22) + sass-rails (5.0.5) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) + faraday (~> 0.8, < 0.10) + scss_lint (0.47.1) + rake (>= 0.9, < 11) + sass (~> 3.4.15) + sdoc (0.3.20) + json (>= 1.1.3) + rdoc (~> 3.10) + seed-fu (2.3.6) + activerecord (>= 3.1) + activesupport (>= 3.1) + select2-rails (3.5.9.3) + thor (~> 0.14) + sentry-raven (1.1.0) + faraday (>= 0.7.6) + settingslogic (2.0.9) + sexp_processor (4.7.0) + sham_rack (1.3.6) + rack + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + sidekiq (4.1.4) + concurrent-ruby (~> 1.0) + connection_pool (~> 2.2, >= 2.2.0) + redis (~> 3.2, >= 3.2.1) + sinatra (>= 1.4.7) + sidekiq-cron (0.4.0) + redis-namespace (>= 1.5.2) + rufus-scheduler (>= 2.0.24) + sidekiq (>= 4.0.0) + simple_oauth (0.1.9) + simplecov (0.11.2) + docile (~> 1.1.0) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + sinatra (1.4.7) + rack (~> 1.5) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + six (0.2.0) + slack-notifier (1.2.1) + slop (3.6.0) + spinach (0.8.10) + colorize + gherkin-ruby (>= 0.3.2) + json + spinach-rails (0.2.1) + capybara (>= 2.0.0) + railties (>= 3) + spinach (>= 0.4) + spinach-rerun-reporter (0.0.2) + spinach (~> 0.8) + spring (1.7.2) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) + spring-commands-spinach (1.1.0) + spring (>= 0.9.1) + spring-commands-teaspoon (0.0.2) + spring (>= 0.9.1) + sprockets (3.6.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.1.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + state_machines (0.4.0) + state_machines-activemodel (0.4.0) + activemodel (>= 4.1, < 5.1) + state_machines (>= 0.4.0) + state_machines-activerecord (0.4.0) + activerecord (>= 4.1, < 5.1) + state_machines-activemodel (>= 0.3.0) + stringex (2.5.2) + sys-filesystem (1.1.6) + ffi + systemu (2.6.5) + task_list (1.0.2) + html-pipeline + teaspoon (1.1.5) + railties (>= 3.2.5, < 6) + teaspoon-jasmine (2.2.0) + teaspoon (>= 1.0.0) + temple (0.7.7) + test_after_commit (0.4.2) + activerecord (>= 3.2) + thin (1.7.0) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.5) + timecop (0.8.1) + timfel-krb5-auth (0.8.3) + tinder (1.10.1) + eventmachine (~> 1.0) + faraday (~> 0.9.0) + faraday_middleware (~> 0.9) + hashie (>= 1.0) + json (~> 1.8.0) + mime-types + multi_json (~> 1.7) + twitter-stream (~> 0.1) + turbolinks (2.5.3) + coffee-rails + twitter-stream (0.1.16) + eventmachine (>= 0.12.8) + http_parser.rb (~> 0.5.1) + simple_oauth (~> 0.1.4) + tzinfo (1.2.2) + thread_safe (~> 0.1) + u2f (0.2.1) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + underscore-rails (1.8.3) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + unicode-display_width (1.0.5) + unicorn (4.9.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + unicorn-worker-killer (0.4.4) + get_process_mem (~> 0) + unicorn (>= 4, < 6) + uniform_notifier (1.9.0) + uuid (2.3.8) + macaddr (~> 1.0) + version_sorter (2.0.0) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + vmstat (2.1.0) + warden (1.2.6) + rack (>= 1.0) + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + webmock (1.21.0) + addressable (>= 2.3.6) + crack (>= 0.3.2) + websocket-driver (0.6.3) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + wikicloth (0.8.1) + builder + expression_parser + rinku + xml-simple (1.1.5) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth (~> 4.3.2) + ace-rails-ap (~> 4.0.2) + activerecord-session_store (~> 1.0.0) + acts-as-taggable-on (~> 3.4) + addressable (~> 2.3.8) + after_commit_queue + akismet (~> 2.0) + allocations (~> 1.0) + asana (~> 0.4.0) + asciidoctor (~> 1.5.2) + attr_encrypted (~> 3.0.0) + awesome_print (~> 1.2.0) + babosa (~> 1.0.2) + base32 (~> 0.3.0) + benchmark-ips + better_errors (~> 1.0.1) + binding_of_caller (~> 0.7.2) + bootstrap-sass (~> 3.3.0) + brakeman (~> 3.3.0) + browser (~> 2.2) + bullet + bundler-audit + byebug + capybara (~> 2.6.2) + capybara-screenshot (~> 1.0.0) + carrierwave (~> 0.10.0) + charlock_holmes (~> 0.7.3) + chronic_duration (~> 0.10.6) + coffee-rails (~> 4.1.0) + connection_pool (~> 2.0) + creole (~> 0.5.0) + d3_rails (~> 3.5.0) + database_cleaner (~> 1.4.0) + default_value_for (~> 3.0.0) + devise (~> 4.0) + devise-two-factor (~> 3.0.0) + diffy (~> 3.0.3) + doorkeeper (~> 4.0) + dropzonejs-rails (~> 0.7.1) + email_reply_parser (~> 0.5.8) + email_spec (~> 1.6.0) + factory_girl_rails (~> 4.6.0) + ffaker (~> 2.0.0) + flay + flog + fog-aws (~> 0.9) + fog-azure (~> 0.0) + fog-core (~> 1.40) + fog-google (~> 0.3) + fog-local (~> 0.3) + fog-openstack (~> 0.1) + fog-rackspace (~> 0.1.1) + font-awesome-rails (~> 4.6.1) + foreman + fuubar (~> 2.0.0) + gemnasium-gitlab-service (~> 0.2) + gemojione (~> 2.6) + github-linguist (~> 4.7.0) + github-markup (~> 1.3.1) + gitlab-flowdock-git-hook (~> 1.0.1) + gitlab_git (~> 10.2) + gitlab_meta (= 7.0) + gitlab_omniauth-ldap (~> 1.2.1) + gollum-lib (~> 4.1.0) + gollum-rugged_adapter (~> 0.4.2) + gon (~> 6.0.1) + grape (~> 0.13.0) + grape-entity (~> 0.4.2) + hamlit (~> 2.5) + health_check (~> 1.5.1) + hipchat (~> 1.5.0) + html-pipeline (~> 1.11.0) + httparty (~> 0.13.3) + influxdb (~> 0.2) + jquery-atwho-rails (~> 1.3.2) + jquery-rails (~> 4.1.0) + jquery-turbolinks (~> 2.1.0) + jquery-ui-rails (~> 5.0.0) + jwt + kaminari (~> 0.17.0) + knapsack + letter_opener_web (~> 1.3.0) + license_finder + licensee (~> 8.0.0) + loofah (~> 2.0.3) + mail_room (~> 0.8) + method_source (~> 0.8) + minitest (~> 5.7.0) + mousetrap-rails (~> 1.4.6) + mysql2 (~> 0.3.16) + nested_form (~> 0.3.2) + net-ssh (~> 3.0.1) + newrelic_rpm (~> 3.14) + nokogiri (~> 1.6.7, >= 1.6.7.2) + oauth2 (~> 1.2.0) + octokit (~> 4.3.0) + omniauth (~> 1.3.1) + omniauth-auth0 (~> 1.4.1) + omniauth-azure-oauth2 (~> 0.0.6) + omniauth-bitbucket (~> 0.0.2) + omniauth-cas3 (~> 1.1.2) + omniauth-facebook (~> 3.0.0) + omniauth-github (~> 1.1.1) + omniauth-gitlab (~> 1.0.0) + omniauth-google-oauth2 (~> 0.2.0) + omniauth-kerberos (~> 0.3.0) + omniauth-saml (~> 1.6.0) + omniauth-shibboleth (~> 1.2.0) + omniauth-twitter (~> 1.2.0) + omniauth_crowd (~> 2.2.0) + org-ruby (~> 0.9.12) + paranoia (~> 2.0) + pg (~> 0.18.2) + poltergeist (~> 1.9.0) + premailer-rails (~> 1.9.0) + pry-rails + rack-attack (~> 4.3.1) + rack-cors (~> 0.4.0) + rack-oauth2 (~> 1.2.1) + rails (= 4.2.6) + rails-deprecated_sanitizer (~> 1.0.3) + rainbow (~> 2.1.0) + rblineprof + rdoc (~> 3.6) + recaptcha (~> 3.0) + redcarpet (~> 3.3.3) + redis (~> 3.2) + redis-namespace + redis-rails (~> 4.0.0) + request_store (~> 1.3.0) + rerun (~> 0.11.0) + responders (~> 2.0) + rouge (~> 1.11) + rqrcode-rails3 (~> 0.1.7) + rspec-rails (~> 3.5.0) + rspec-retry + rubocop (~> 0.40.0) + rubocop-rspec (~> 1.5.0) + ruby-fogbugz (~> 0.2.1) + sanitize (~> 2.0) + sass-rails (~> 5.0.0) + scss_lint (~> 0.47.0) + sdoc (~> 0.3.20) + seed-fu (~> 2.3.5) + select2-rails (~> 3.5.9) + sentry-raven (~> 1.1.0) + settingslogic (~> 2.0.9) + sham_rack + shoulda-matchers (~> 2.8.0) + sidekiq (~> 4.0) + sidekiq-cron (~> 0.4.0) + simplecov (~> 0.11.0) + sinatra (~> 1.4.4) + six (~> 0.2.0) + slack-notifier (~> 1.2.0) + spinach-rails (~> 0.2.1) + spinach-rerun-reporter (~> 0.0.2) + spring (~> 1.7.0) + spring-commands-rspec (~> 1.0.4) + spring-commands-spinach (~> 1.1.0) + spring-commands-teaspoon (~> 0.0.2) + sprockets (~> 3.6.0) + state_machines-activerecord (~> 0.4.0) + sys-filesystem (~> 1.1.6) + task_list (~> 1.0.2) + teaspoon (~> 1.1.0) + teaspoon-jasmine (~> 2.2.0) + test_after_commit (~> 0.4.2) + thin (~> 1.7.0) + tinder (~> 1.10.0) + turbolinks (~> 2.5.0) + u2f (~> 0.2.1) + uglifier (~> 2.7.2) + underscore-rails (~> 1.8.0) + unf (~> 0.1.4) + unicorn (~> 4.9.0) + unicorn-worker-killer (~> 0.4.2) + version_sorter (~> 2.0.0) + virtus (~> 1.0.1) + vmstat (~> 2.1.0) + web-console (~> 2.0) + webmock (~> 1.21.0) + wikicloth (= 0.8.1) + +BUNDLED WITH + 1.12.5 -- cgit v1.2.1 From 5d6b90a050a30442f9cd44eafa1c7ed79f005bba Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 13:46:21 +0100 Subject: changes gemfile.lock --- Gemfile.lock | 159 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 77 insertions(+), 82 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f300e196865..055596b056f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,13 +57,14 @@ GEM faraday_middleware (~> 0.9) faraday_middleware-multi_json (~> 0.0) oauth2 (~> 1.0) - asciidoctor (1.5.4) - ast (2.3.0) + asciidoctor (1.5.3) + ast (2.2.0) attr_encrypted (3.0.1) encryptor (~> 3.0.0) - attr_required (1.0.1) - autoprefixer-rails (6.3.7) + attr_required (1.0.0) + autoprefixer-rails (6.2.3) execjs + json awesome_print (1.2.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) @@ -87,7 +88,7 @@ GEM babosa (1.0.2) base32 (0.3.2) bcrypt (3.1.11) - benchmark-ips (2.6.1) + benchmark-ips (2.3.0) better_errors (1.0.1) coderay (>= 1.0.0) erubis (>= 2.6.6) @@ -99,13 +100,13 @@ GEM brakeman (3.3.2) browser (2.2.0) builder (3.2.2) - bullet (5.1.1) + bullet (5.0.0) activesupport (>= 3.0.0) - uniform_notifier (~> 1.10.0) + uniform_notifier (~> 1.9.0) bundler-audit (0.5.0) bundler (~> 1.2) thor (~> 0.18) - byebug (9.0.5) + byebug (8.2.1) capybara (2.6.2) addressable mime-types (>= 1.16) @@ -113,7 +114,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - capybara-screenshot (1.0.13) + capybara-screenshot (1.0.11) capybara (>= 1.0, < 3) launchy carrierwave (0.10.0) @@ -125,9 +126,9 @@ GEM charlock_holmes (0.7.3) chronic_duration (0.10.6) numerizer (~> 0.1.1) - chunky_png (1.3.6) + chunky_png (1.3.5) cliver (0.3.2) - coderay (1.1.1) + coderay (1.1.0) coercible (1.0.0) descendants_tracker (~> 0.0.1) coffee-rails (4.1.1) @@ -137,15 +138,15 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - colorize (0.8.1) + colorize (0.7.7) concurrent-ruby (1.0.2) connection_pool (2.2.0) crack (0.4.3) safe_yaml (~> 1.0.0) creole (0.5.0) - css_parser (1.4.5) + css_parser (1.4.1) addressable - d3_rails (3.5.16) + d3_rails (3.5.11) railties (>= 3.1.0) daemons (1.2.3) database_cleaner (1.4.1) @@ -155,7 +156,7 @@ GEM activerecord (>= 3.2.0, < 5.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.0) + devise (4.1.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0, < 5.1) @@ -172,7 +173,7 @@ GEM docile (1.1.5) doorkeeper (4.0.0) railties (>= 4.2) - dropzonejs-rails (0.7.3) + dropzonejs-rails (0.7.2) rails (> 3.1) email_reply_parser (0.5.8) email_spec (1.6.0) @@ -182,9 +183,9 @@ GEM equalizer (0.0.11) erubis (2.7.0) escape_utils (1.1.1) - eventmachine (1.2.0.1) - excon (0.50.1) - execjs (2.7.0) + eventmachine (1.0.8) + excon (0.49.0) + execjs (2.6.0) expression_parser (0.9.0) factory_girl (4.5.0) activesupport (>= 3.0.0) @@ -199,21 +200,18 @@ GEM faraday_middleware multi_json ffaker (2.0.0) - ffi (1.9.13) - flay (2.8.0) - erubis (~> 2.7.0) - path_expander (~> 1.0) + ffi (1.9.10) + flay (2.6.1) ruby_parser (~> 3.0) sexp_processor (~> 4.0) - flog (4.4.0) - path_expander (~> 1.0) + flog (4.3.2) ruby_parser (~> 3.1, > 3.1.0) sexp_processor (~> 4.4) flowdock (0.7.1) httparty (~> 0.7) multi_json - fog-aws (0.9.4) - fog-core (~> 1.38) + fog-aws (0.9.2) + fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) ipaddress (~> 0.8) @@ -222,7 +220,7 @@ GEM fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) - fog-core (1.42.0) + fog-core (1.40.0) builder excon (~> 0.49) formatador (~> 0.2) @@ -235,8 +233,8 @@ GEM multi_json (~> 1.10) fog-local (0.3.0) fog-core (~> 1.27) - fog-openstack (0.1.7) - fog-core (>= 1.40) + fog-openstack (0.1.6) + fog-core (>= 1.39) fog-json (>= 1.0) ipaddress (>= 0.8) fog-rackspace (0.1.1) @@ -247,9 +245,9 @@ GEM fog-xml (0.1.2) fog-core nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.3.1) + font-awesome-rails (4.6.1.0) railties (>= 3.2, < 5.1) - foreman (0.82.0) + foreman (0.78.0) thor (~> 0.19.1) formatador (0.2.5) fuubar (2.0.0) @@ -259,7 +257,7 @@ GEM rugged (~> 0.21) gemojione (2.6.1) json - get_process_mem (0.2.1) + get_process_mem (0.2.0) gherkin-ruby (0.3.2) github-linguist (4.7.6) charlock_holmes (~> 0.7.3) @@ -276,7 +274,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.3.0) + gitlab_git (10.2.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) @@ -289,7 +287,7 @@ GEM rubyntlm (~> 0.3) globalid (0.3.6) activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.1) + gollum-grit_adapter (1.0.0) gitlab-grit (~> 2.7, >= 2.7.1) gollum-lib (4.1.0) github-markup (~> 1.3.3) @@ -323,10 +321,10 @@ GEM temple (~> 0.7.6) thor tilt - hashie (3.4.4) + hashie (3.4.3) health_check (1.5.1) rails (>= 2.3.0) - hipchat (1.5.3) + hipchat (1.5.2) httparty mimemagic html-pipeline (1.11.0) @@ -337,10 +335,10 @@ GEM httparty (0.13.7) json (~> 1.8) multi_xml (>= 0.5.2) - httpclient (2.8.0) + httpclient (2.7.0.1) i18n (0.7.0) - ice_nine (0.11.2) - influxdb (0.3.5) + ice_nine (0.11.1) + influxdb (0.2.3) cause json ipaddress (0.8.3) @@ -360,7 +358,7 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.10.0) - knapsack (1.11.1) + knapsack (1.11.0) rake timecop (>= 0.1.0) launchy (2.4.3) @@ -371,7 +369,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - license_finder (2.1.2) + license_finder (2.1.0) bundler httparty rubyzip @@ -379,10 +377,9 @@ GEM xml-simple licensee (8.0.0) rugged (>= 0.24b) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + listen (3.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) loofah (2.0.3) nokogiri (>= 1.5.9) macaddr (1.7.1) @@ -392,18 +389,18 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mimemagic (0.3.1) + mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.3.21) + mysql2 (0.3.20) nested_form (0.3.2) - net-ldap (0.14.0) - net-ssh (3.0.2) - newrelic_rpm (3.16.0.318) + net-ldap (0.12.1) + net-ssh (3.0.1) + newrelic_rpm (3.14.1.311) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) @@ -420,7 +417,7 @@ GEM omniauth (1.3.1) hashie (>= 1.2, < 4) rack (>= 1.0, < 3) - omniauth-auth0 (1.4.2) + omniauth-auth0 (1.4.1) omniauth-oauth2 (~> 1.1) omniauth-azure-oauth2 (0.0.6) jwt (~> 1.0) @@ -439,7 +436,7 @@ GEM omniauth-github (1.1.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.2) + omniauth-gitlab (1.0.1) omniauth (~> 1.0) omniauth-oauth2 (~> 1.0) omniauth-google-oauth2 (0.2.10) @@ -474,11 +471,10 @@ GEM org-ruby (0.9.12) rubypants (~> 0.2) orm_adapter (0.5.0) - paranoia (2.1.5) + paranoia (2.1.4) activerecord (~> 4.0) - parser (2.3.1.2) + parser (2.3.1.0) ast (~> 2.2) - path_expander (1.0.0) pg (0.18.4) pkg-config (1.1.7) poltergeist (1.9.0) @@ -488,10 +484,10 @@ GEM websocket-driver (>= 0.2.0) posix-spawn (0.3.11) powerpack (0.1.1) - premailer (1.8.7) - css_parser (>= 1.4.5) + premailer (1.8.6) + css_parser (>= 1.3.6) htmlentities (>= 4.0.0) - premailer-rails (1.9.4) + premailer-rails (1.9.2) actionmailer (>= 3, < 6) premailer (~> 1.7, >= 1.7.9) pry (0.10.3) @@ -509,7 +505,7 @@ GEM rack-cors (0.4.0) rack-mount (0.8.3) rack (>= 1.0.0) - rack-oauth2 (1.2.3) + rack-oauth2 (1.2.1) activesupport (>= 2.3) attr_required (>= 0.0.5) httpclient (>= 2.4) @@ -544,19 +540,19 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - raindrops (0.16.0) + raindrops (0.15.0) rake (10.5.0) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) + rb-fsevent (0.9.6) + rb-inotify (0.9.5) ffi (>= 0.5.0) rblineprof (0.3.6) debugger-ruby_core_source (~> 1.3) rdoc (3.12.2) json (~> 1.4) - recaptcha (3.3.0) + recaptcha (3.0.0) json - redcarpet (3.3.4) - redis (3.3.0) + redcarpet (3.3.3) + redis (3.2.2) redis-actionpack (4.0.1) actionpack (~> 4) redis-rack (~> 1.5.0) @@ -575,23 +571,23 @@ GEM redis-store (~> 1.1.0) redis-store (1.1.7) redis (>= 2.2) - request_store (1.3.1) + request_store (1.3.0) rerun (0.11.0) listen (~> 3.0) - responders (2.2.0) + responders (2.1.1) railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (1.11.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) + rouge (1.11.0) + rqrcode (0.7.0) + chunky_png rqrcode-rails3 (0.1.7) rqrcode (>= 0.4.2) rspec (3.5.0) rspec-core (~> 3.5.0) rspec-expectations (~> 3.5.0) rspec-mocks (~> 3.5.0) - rspec-core (3.5.1) + rspec-core (3.5.0) rspec-support (~> 3.5.0) rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) @@ -599,7 +595,7 @@ GEM rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) - rspec-rails (3.5.1) + rspec-rails (3.5.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -623,13 +619,12 @@ GEM ruby-progressbar (1.8.1) ruby-saml (1.3.0) nokogiri (>= 1.5.10) - ruby_dep (1.3.1) ruby_parser (3.8.2) sexp_processor (~> 4.1) - rubyntlm (0.6.0) + rubyntlm (0.5.2) rubypants (0.2.0) rubyzip (1.2.0) - rufus-scheduler (3.2.1) + rufus-scheduler (3.1.10) rugged (0.24.0) safe_yaml (1.0.4) sanitize (2.1.0) @@ -653,7 +648,7 @@ GEM seed-fu (2.3.6) activerecord (>= 3.1) activesupport (>= 3.1) - select2-rails (3.5.10) + select2-rails (3.5.9.3) thor (~> 0.14) sentry-raven (1.1.0) faraday (>= 0.7.6) @@ -668,7 +663,7 @@ GEM connection_pool (~> 2.2, >= 2.2.0) redis (~> 3.2, >= 3.2.1) sinatra (>= 1.4.7) - sidekiq-cron (0.4.2) + sidekiq-cron (0.4.0) redis-namespace (>= 1.5.2) rufus-scheduler (>= 2.0.24) sidekiq (>= 4.0.0) @@ -702,7 +697,7 @@ GEM spring (>= 0.9.1) spring-commands-teaspoon (0.0.2) spring (>= 0.9.1) - sprockets (3.6.3) + sprockets (3.6.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) @@ -763,7 +758,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.1.0) + unicode-display_width (1.0.5) unicorn (4.9.0) kgio (~> 2.6) rack @@ -771,7 +766,7 @@ GEM unicorn-worker-killer (0.4.4) get_process_mem (~> 0) unicorn (>= 4, < 6) - uniform_notifier (1.10.0) + uniform_notifier (1.9.0) uuid (2.3.8) macaddr (~> 1.0) version_sorter (2.0.0) @@ -791,7 +786,7 @@ GEM webmock (1.21.0) addressable (>= 2.3.6) crack (>= 0.3.2) - websocket-driver (0.6.4) + websocket-driver (0.6.3) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) wikicloth (0.8.1) -- cgit v1.2.1 From 401e10919761a5ad82821b42d6951679a9763cc9 Mon Sep 17 00:00:00 2001 From: Michael Elliott Date: Sat, 9 Jul 2016 13:00:39 -0600 Subject: fix style issue for new snippet button - fixes issue #19641 --- app/assets/stylesheets/framework/blocks.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index 41e77a4ac68..635c236c7ac 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -223,7 +223,9 @@ .nav-block { .controls { float: right; - margin-top: 11px; + margin-top: 8px; + padding-bottom: 7px; + border-bottom: 1px solid $white-dark; } } -- cgit v1.2.1 From 2e6177a680218416f258191141b58b2aa11eefee Mon Sep 17 00:00:00 2001 From: Michael Elliott Date: Sat, 9 Jul 2016 13:00:39 -0600 Subject: fix style issue for new snippet button - fixes issue #19641 add fix to changelog --- CHANGELOG | 1 + app/assets/stylesheets/framework/blocks.scss | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 3e4a10bb5a3..5559c4a7fe2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -60,6 +60,7 @@ v 8.10.0 (unreleased) - Fix 404 redirect after validation fails importing a GitLab project - Added setting to set new users by default as external !4545 (Dravere) - Add min value for project limit field on user's form !3622 (jastkand) + - Fix new snippet style bug v 8.9.5 - Add more debug info to import/export and memory killer. !5108 diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index 41e77a4ac68..635c236c7ac 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -223,7 +223,9 @@ .nav-block { .controls { float: right; - margin-top: 11px; + margin-top: 8px; + padding-bottom: 7px; + border-bottom: 1px solid $white-dark; } } -- cgit v1.2.1 From 80a7da12c3c7adb57569b54a597fe1e5b4a7cc4c Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 11 Jul 2016 11:50:13 +0100 Subject: Fixed dropdown search field height in ie11 Closes #19684 --- app/assets/stylesheets/framework/dropdowns.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss index d4e900f80ef..c54eb0d6479 100644 --- a/app/assets/stylesheets/framework/dropdowns.scss +++ b/app/assets/stylesheets/framework/dropdowns.scss @@ -350,6 +350,7 @@ .dropdown-input-field, .default-dropdown-input { width: 100%; + min-height: 30px; padding: 0 7px; color: $dropdown-input-color; line-height: 30px; -- cgit v1.2.1 From d048ba77962c13e30bb751603ab3eaa067623a91 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 28 Jun 2016 18:36:41 +0200 Subject: Improve readability of markdown files --- app/assets/stylesheets/framework/files.scss | 2 +- app/assets/stylesheets/framework/typography.scss | 32 +++++++++++++----------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index 71a9f79be3e..31e0da644a9 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -70,7 +70,7 @@ } &.wiki { - padding: $gl-padding; + padding: 30px $gl-padding; .highlight { margin-bottom: 9px; diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index 3575984b229..4f860c009e0 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -37,39 +37,41 @@ } h1 { - font-size: 1.3em; + font-size: 2.25em; font-weight: 600; - margin: 24px 0 12px; - padding: 0 0 10px; - border-bottom: 1px solid #e7e9ed; + margin: 1em 0 10px; + padding: 0 0 0.3em; + border-bottom: 1px solid $btn-default-border; color: $gl-gray-dark; } h2 { - font-size: 1.2em; + font-size: 1.8em; font-weight: 600; - margin: 24px 0 12px; + margin: 1em 0 10px; + padding-bottom: 0.3em; + border-bottom: 1px solid $btn-default-border; color: $gl-gray-dark; } h3 { - margin: 24px 0 12px; - font-size: 1.1em; + margin: 1em 0 10px; + font-size: 1.5em; } h4 { - margin: 24px 0 12px; - font-size: 0.98em; + margin: 1em 0 10px; + font-size: 1.25em; } h5 { - margin: 24px 0 12px; - font-size: 0.95em; + margin: 1em 0 10px; + font-size: 1em; } h6 { - margin: 24px 0 12px; - font-size: 0.90em; + margin: 1em 0 10px; + font-size: 0.95em; } blockquote { @@ -115,7 +117,7 @@ ul, ol { padding: 0; - margin: 6px 0 6px 28px !important; + margin: 3px 0 3px 28px !important; } li { -- cgit v1.2.1 From 2298c003b6d2d511fedef2f50a5570ffd3e017df Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 11 Jul 2016 17:11:16 +0100 Subject: changes the usasge of path to file_path on blob_controller for compatibillity with the create action --- app/controllers/concerns/creates_commit.rb | 2 +- app/controllers/projects/blob_controller.rb | 8 ++++---- app/views/projects/blob/_editor.html.haml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a76fcd61b52 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,7 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @path, + file_path: @file_path, previous_path: @previous_path ) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 091b661a09f..fb6ddd0e51d 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -39,16 +39,16 @@ class Projects::BlobController < Projects::ApplicationController def update unless params[:file_name].empty? - @previous_path = @path - @path = params[:file_name] + @previous_path = @file_path + @file_path = params[:file_name] end after_edit_path = if from_merge_request && @target_branch == @ref diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + - "#file-path-#{hexdigest(@path)}" + "#file-path-#{hexdigest(@file_path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @file_path)) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index ad3009f30ab..ba3b3439e9b 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -5,7 +5,7 @@ = ref %span.editor-file-name - if current_action?(:edit) || current_action?(:update) - = text_field_tag 'file_name', (params[:file_name] || @path), + = text_field_tag 'file_name', (params[:file_name] || @file_path), class: 'form-control new-file-name' - if current_action?(:new) || current_action?(:create) -- cgit v1.2.1 From 67f90c79840bcfca6d8d42a9f6620ef9eb7972c7 Mon Sep 17 00:00:00 2001 From: elliotec Date: Mon, 11 Jul 2016 10:48:48 -0600 Subject: resolve changelog conflict --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5559c4a7fe2..538c635ec3f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -43,6 +43,7 @@ v 8.10.0 (unreleased) - Avoid to retrieve MR closes_issues as much as possible. - Add API endpoint for a group issues !4520 (mahcsig) - Add Bugzilla integration !4930 (iamtjg) + - Fix new snippet style bug (elliotec) - Instrument Rinku usage - Metrics for Rouge::Plugins::Redcarpet and Rouge::Formatters::HTMLGitlab - RailsCache metris now includes fetch_hit/fetch_miss and read_hit/read_miss info. @@ -60,7 +61,6 @@ v 8.10.0 (unreleased) - Fix 404 redirect after validation fails importing a GitLab project - Added setting to set new users by default as external !4545 (Dravere) - Add min value for project limit field on user's form !3622 (jastkand) - - Fix new snippet style bug v 8.9.5 - Add more debug info to import/export and memory killer. !5108 -- cgit v1.2.1 From 3161d5d29b22bfb446443bcc71926378b4b7f01d Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 11:49:21 +0100 Subject: refactors update action to change commit_params with the correct path --- Gemfile.lock | 2 +- app/controllers/concerns/creates_commit.rb | 1 - app/controllers/projects/blob_controller.rb | 9 +++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 055596b056f..199ee684970 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -274,7 +274,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.2.3) + gitlab_git (10.3.0) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a76fcd61b52..f2b8f297bc2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,6 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @file_path, previous_path: @previous_path ) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index fb6ddd0e51d..ac1141b8613 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -39,16 +39,17 @@ class Projects::BlobController < Projects::ApplicationController def update unless params[:file_name].empty? - @previous_path = @file_path - @file_path = params[:file_name] + @previous_path = @path + @path = params[:file_name] + @commit_params[:file_path] = @path end after_edit_path = if from_merge_request && @target_branch == @ref diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + - "#file-path-#{hexdigest(@file_path)}" + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @file_path)) + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end create_commit(Files::UpdateService, success_path: after_edit_path, -- cgit v1.2.1 From c7c0392a0401f71802a1120b3244fac1e2ca1c4b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 12:48:24 +0100 Subject: test for nil params :file_name --- app/controllers/projects/blob_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index ac1141b8613..0120ad8e058 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -38,7 +38,7 @@ class Projects::BlobController < Projects::ApplicationController end def update - unless params[:file_name].empty? + unless params[:file_name].nil? || params[:file_name].empty? @previous_path = @path @path = params[:file_name] @commit_params[:file_path] = @path -- cgit v1.2.1 From 050e4848a27cb2b8c6fff14403adef927c616a5b Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 12 Jul 2016 11:33:10 +0100 Subject: Reduced diff email CSS --- .../stylesheets/mailers/repository_push_email.scss | 67 ++++++---------------- 1 file changed, 19 insertions(+), 48 deletions(-) diff --git a/app/assets/stylesheets/mailers/repository_push_email.scss b/app/assets/stylesheets/mailers/repository_push_email.scss index 7f645d3089d..2b61a9d4c73 100644 --- a/app/assets/stylesheets/mailers/repository_push_email.scss +++ b/app/assets/stylesheets/mailers/repository_push_email.scss @@ -11,40 +11,27 @@ // explicit child selectors. table.code { - width: 100%; font-family: monospace; - border: none; - border-collapse: separate; - margin: 0; - padding: 0; + font-size: $code_font_size; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; - > tr > td { + tr { line-height: $code_line_height; - font-family: monospace; - font-size: $code_font_size; - - &.diff-line-num { - margin: 0; - padding: 0; - border: none; - padding: 0 5px; - border-right: 1px solid; - text-align: right; - min-width: 35px; - max-width: 50px; - width: 35px; - } + } - &.line_content { - display: block; - margin: 0; - padding: 0 0.5em; - border: none; - white-space: pre; - } + .diff-line-num { + padding: 0 5px; + text-align: right; + max-width: 50px; + width: 35px; + border-right-width: 1px; + border-right-style: solid; + } + + .line_content { + white-space: pre; } } @@ -57,32 +44,24 @@ table.code { } pre.code, .diff-line-num { - border-color: $table-border-gray; -} - -.code.white, pre.code, .line_content { - background-color: #fff; - color: #333; + border-right: 1px solid $table-border-gray; } .diff-line-num { &.old { background-color: $line-number-old; - border-color: $line-removed-dark; + border-right-color: $line-removed-dark; } &.new { background-color: $line-number-new; - border-color: $line-added-dark; - } - - &.hll:not(.empty-cell) { - background-color: $line-number-select; - border-color: $line-select-yellow-dark; + border-right-color: $line-added-dark; } } .line_content { + background-color: #fff; + &.old { background-color: $line-removed; @@ -103,14 +82,6 @@ pre.code, .diff-line-num { color: $black-transparent; background-color: $match-line; } - - &.hll:not(.empty-cell) { - background-color: $line-select-yellow; - } -} - -pre > .hll { - background-color: #f8eec7 !important; } span.highlight_word { -- cgit v1.2.1 From b34310ae9e9d3d4331b38f1acf4a51e2247b76ac Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 3 ++- app/services/files/update_service.rb | 1 + app/views/projects/blob/_editor.html.haml | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 5356fdf010d..bcd436f2429 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + # params[:file_name] stores the new name for the file + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 1960dc7d949..52451d72b57 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + # Need to update file_path with the new filename repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 29c7d45074a..3c64b2f5e96 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,7 +4,11 @@ = icon('code-fork') = ref %span.editor-file-name - = @path + - if current_action?(:edit) && can?(current_user, :push_code, @project) + = text_field_tag 'file_name', params[:file_name], placeholder: @path, + class: 'form-control new-file-name' + - else + = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From ac30c60ad9379187e41629ac56c96bd02df6996e Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index dacb5679dd3..84b4a30c6d5 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -7,7 +7,8 @@ module CreatesCommit commit_params = @commit_params.merge( source_project: @project, source_branch: @ref, - target_branch: @target_branch + target_branch: @target_branch, + file_path: @path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index bcd436f2429..116f184c240 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,11 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else # params[:file_name] stores the new name for the file - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) + unless params[:file_name] == @path + @path = params[:file_name] + end + + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end create_commit(Files::UpdateService, success_path: after_edit_path, -- cgit v1.2.1 From ea50760b02ede0366ab5640a8007752b3a9d0496 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/controllers/projects/blob_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 116f184c240..cf7f00d3113 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,8 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - # params[:file_name] stores the new name for the file unless params[:file_name] == @path + previous_path = @path @path = params[:file_name] end -- cgit v1.2.1 From bb627b6fc24d71a0ee19fd35d987e423a2567c48 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index cf7f00d3113..2b8e76d4638 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -47,7 +47,6 @@ class Projects::BlobController < Projects::ApplicationController previous_path = @path @path = params[:file_name] end - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From be3777f77857707ad19358c837703d3690b89256 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 37c5e321b39..9abee4e349a 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,6 +15,12 @@ module Files params[:file_content] end +<<<<<<< bb627b6fc24d71a0ee19fd35d987e423a2567c48 +======= + puts @file_path + + # Validate parameters +>>>>>>> successfully adds the new version with the updated name on the projects repo validate # Create new branch if it different from source_branch -- cgit v1.2.1 From 385afc28efcd7b496b0c518a5490716265cdf87c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 9abee4e349a..ac5d7ddde02 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -15,12 +15,7 @@ module Files params[:file_content] end -<<<<<<< bb627b6fc24d71a0ee19fd35d987e423a2567c48 -======= - puts @file_path - # Validate parameters ->>>>>>> successfully adds the new version with the updated name on the projects repo validate # Create new branch if it different from source_branch -- cgit v1.2.1 From 9951854648a1dc98bbff016c51cd47e67f240267 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/controllers/concerns/creates_commit.rb | 3 ++- app/controllers/projects/blob_controller.rb | 2 +- app/models/repository.rb | 30 +++++++++++++++++++++++++++++ app/services/files/base_service.rb | 1 + app/services/files/update_service.rb | 2 +- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 84b4a30c6d5..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,8 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @path + file_path: @path, + previous_path: @previous_path ) result = service.new(@tree_edit_project, current_user, commit_params).execute diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 2b8e76d4638..fc608399fcb 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -44,7 +44,7 @@ class Projects::BlobController < Projects::ApplicationController "#file-path-#{hexdigest(@path)}" else unless params[:file_name] == @path - previous_path = @path + @previous_path = @path @path = params[:file_name] end namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) diff --git a/app/models/repository.rb b/app/models/repository.rb index 5b670cb4b8f..709b5edd31e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -731,6 +731,36 @@ class Repository end end + def update_file(user, path, previous_path, content, message, branch, update) + commit_with_hooks(user, branch) do |ref| + committer = user_to_committer(user) + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, + branch: ref, + } + + if previous_path + options[:file] = { + path: previous_path + } + + + Gitlab::Git::Blob.remove(raw_repository, options) + end + + options[:file] = { + content: content, + path: path, + update: update + } + + Gitlab::Git::Blob.commit(raw_repository, options) + end + end + def remove_file(user, path, message, branch) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index ac5d7ddde02..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -9,6 +9,7 @@ module Files @commit_message = params[:commit_message] @file_path = params[:file_path] + @previous_path = params[:previous_path] @file_content = if params[:file_content_encoding] == 'base64' Base64.decode64(params[:file_content]) else diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 52451d72b57..6d015642b91 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,7 +4,7 @@ module Files class UpdateService < Files::BaseService def commit # Need to update file_path with the new filename - repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch, true) + repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end end -- cgit v1.2.1 From ba8f8f2269fbad6f3480a40f350fc269140db583 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/services/files/update_service.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 6d015642b91..fefa1d4ef68 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,7 +3,6 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - # Need to update file_path with the new filename repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end -- cgit v1.2.1 From 561c3b5d61ec73ef1424f7cc8e97e3eebcbb6296 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From eb1feae09eeed1236694f85129acd9133cb530b6 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 1d5d5b1a428f389ba4d9e66c17852e115ba32f83 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 16:46:37 +0100 Subject: refactors blob_controller --- Gemfile | 2 +- Gemfile.lock | 14 ++++++++++++++ app/controllers/concerns/creates_commit.rb | 8 ++++++++ app/controllers/projects/blob_controller.rb | 2 +- app/models/repository.rb | 23 +++++++++++++---------- 5 files changed, 37 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 5c43015e52c..1fc1be9e272 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem 'gitlab_git', '~> 10.2' +gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index f8018e58a5e..d65616ad766 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,12 @@ +PATH + remote: ~/src/Gitlab/gitlab_git + specs: + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + GEM remote: https://rubygems.org/ specs: @@ -279,6 +288,9 @@ GEM charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) rugged (~> 0.24.0) + gitlab_emoji (0.3.1) + gemojione (~> 2.2, >= 2.2.1) +>>>>>>> refactors blob_controller gitlab_meta (7.0) gitlab_omniauth-ldap (1.2.1) net-ldap (~> 0.9) @@ -389,6 +401,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) + mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) @@ -862,6 +875,7 @@ DEPENDENCIES github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) gitlab_git (~> 10.2) + gitlab_emoji (~> 0.3.0) gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a3731b45df0 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,8 +12,16 @@ module CreatesCommit previous_path: @previous_path ) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + result = service.new(@tree_edit_project, current_user, commit_params).execute + puts "#" * 30 + puts result[:status] + puts "#" * 30 + if result[:status] == :success update_flash_notice(success_notice) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index fc608399fcb..4d8bb5be20b 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,7 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - unless params[:file_name] == @path + unless params[:file_name].empty? @previous_path = @path @path = params[:file_name] end diff --git a/app/models/repository.rb b/app/models/repository.rb index 709b5edd31e..36f51da8875 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -742,22 +742,25 @@ class Repository branch: ref, } - if previous_path - options[:file] = { - path: previous_path - } - - - Gitlab::Git::Blob.remove(raw_repository, options) - end - options[:file] = { content: content, path: path, update: update } - Gitlab::Git::Blob.commit(raw_repository, options) + if previous_path + options[:file].merge!(previous_path: previous_path) + + puts "#" * 90 + puts "Hello" + puts "#" * 90 + Gitlab::Git::Blob.rename(raw_repository, options) + else + puts "#" * 90 + puts "World" + puts "#" * 90 + Gitlab::Git::Blob.commit(raw_repository, options) + end end end -- cgit v1.2.1 From b1c44837df8eef373bc162baf809e8c911cf8941 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From fbde82b58799a75ba367836f4222170588ab7c5d Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From e621fb57c4c40bc05cfc2c88a1a7b2493cafc2f4 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 36f51da8875..e8a18746216 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -751,9 +751,6 @@ class Repository if previous_path options[:file].merge!(previous_path: previous_path) - puts "#" * 90 - puts "Hello" - puts "#" * 90 Gitlab::Git::Blob.rename(raw_repository, options) else puts "#" * 90 -- cgit v1.2.1 From 71bab5fe58e6b408c67ea681cba371459ae40e7b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 5 Jul 2016 09:46:48 +0100 Subject: removes debugging prints from code --- Gemfile | 2 +- Gemfile.lock | 7 ++++--- app/controllers/concerns/creates_commit.rb | 8 -------- app/models/repository.rb | 3 --- app/services/files/update_service.rb | 1 + 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index 1fc1be9e272..cce820fb53a 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index d65616ad766..3eaef214875 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,7 @@ -PATH - remote: ~/src/Gitlab/gitlab_git +GIT + remote: git@gitlab.com:gitlab-org/gitlab_git.git + revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + branch: commit-blob-rename-action specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -401,7 +403,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) diff --git a/app/models/repository.rb b/app/models/repository.rb index e8a18746216..a391820a8ba 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -753,9 +753,6 @@ class Repository Gitlab::Git::Blob.rename(raw_repository, options) else - puts "#" * 90 - puts "World" - puts "#" * 90 Gitlab::Git::Blob.commit(raw_repository, options) end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index fefa1d4ef68..41add13af50 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end -- cgit v1.2.1 From 7503dc7fcf961258d291e22425705fe309627e46 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:07:16 +0100 Subject: adds change to CHANGELOG file --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index ee3ee4c37d6..d5052df2cbe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.10.0 (unreleased) - Expose {should,force}_remove_source_branch (Ben Boeckel) + - Add the functionality to be able to rename a file. !5049 (tiagonbotelho) - Fix commit builds API, return all builds for all pipelines for given commit. !4849 - Replace Haml with Hamlit to make view rendering faster. !3666 - Expire the branch cache after `git gc` runs -- cgit v1.2.1 From 58031cadc88c7b2e75853eb7903de5225209d94f Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:25:45 +0100 Subject: refactors to pass values as arguments through options --- app/models/repository.rb | 27 ++++++++++++++------------- app/services/files/update_service.rb | 5 +++-- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index a391820a8ba..d9c5ec817a0 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -731,29 +731,30 @@ class Repository end end - def update_file(user, path, previous_path, content, message, branch, update) + # previous_path, message, update + def update_file(user, path, content, branch, options={}) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - options = {} - options[:committer] = committer - options[:author] = committer - options[:commit] = { - message: message, - branch: ref, + commit_options = {} + commit_options[:committer] = committer + commit_options[:author] = committer + commit_options[:commit] = { + message: options[:message], + branch: ref } - options[:file] = { + commit_options[:file] = { content: content, path: path, - update: update + update: options[:update] } - if previous_path - options[:file].merge!(previous_path: previous_path) + if options[:previous_path] + commit_options[:file].merge!(previous_path: options[:previous_path]) - Gitlab::Git::Blob.rename(raw_repository, options) + Gitlab::Git::Blob.rename(raw_repository, commit_options) else - Gitlab::Git::Blob.commit(raw_repository, options) + Gitlab::Git::Blob.commit(raw_repository, commit_options) end end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 41add13af50..905c7a7c81a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,8 +3,9 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - - repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) + repository.update_file(current_user, @file_path, @file_content, + @target_branch, previous_path: @previous_path, + message: @commit_message, update: true) end end end -- cgit v1.2.1 From d914275cd48050197924e3c3371cdac414aa8d82 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 13:51:28 +0100 Subject: fixes issues for mr acceptance --- app/models/repository.rb | 2 +- app/views/projects/blob/_editor.html.haml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index d9c5ec817a0..39264726c9c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -750,7 +750,7 @@ class Repository } if options[:previous_path] - commit_options[:file].merge!(previous_path: options[:previous_path]) + commit_options[:file][:previous_path] = options[:previous_path] Gitlab::Git::Blob.rename(raw_repository, commit_options) else diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 3c64b2f5e96..31bd4646d3d 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,11 +4,9 @@ = icon('code-fork') = ref %span.editor-file-name - - if current_action?(:edit) && can?(current_user, :push_code, @project) - = text_field_tag 'file_name', params[:file_name], placeholder: @path, + -if current_action?(:edit) || current_action?(:update) + = text_field_tag 'file_name', (params[:file_name] or @path), class: 'form-control new-file-name' - - else - = @path - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From 11bf8a81f4f8761494d5fc46d5ba72fe945562f7 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/services/files/update_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 905c7a7c81a..cbcbdafe21a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + repository.update_file(current_user, @file_path, @file_content, @target_branch, previous_path: @previous_path, message: @commit_message, update: true) -- cgit v1.2.1 From 4728b8697dfdb95d1c6a81e804d6faba61be9ee6 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 600b3298dc6b7defc325f4d37069e72570635aa3 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From c95434320a3edc27638710e30fa5a64cb5626c21 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 3824f6fde8b29b77c7d88f8fcc3dd50420355b65 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From 840335ec8378ec71cc09f71e0e82d29198d909e4 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 1 - app/services/files/update_service.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 39264726c9c..c0138514c0f 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -731,7 +731,6 @@ class Repository end end - # previous_path, message, update def update_file(user, path, content, branch, options={}) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index cbcbdafe21a..905c7a7c81a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,7 +3,6 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - repository.update_file(current_user, @file_path, @file_content, @target_branch, previous_path: @previous_path, message: @commit_message, update: true) -- cgit v1.2.1 From 494afb4e36ae1418e3f37eca2faead6535125b36 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/services/files/update_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 905c7a7c81a..cbcbdafe21a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + repository.update_file(current_user, @file_path, @file_content, @target_branch, previous_path: @previous_path, message: @commit_message, update: true) -- cgit v1.2.1 From 94e98afcfeea8fe7df4f64b1042a6370915eed8d Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From e5caeab441d6c0e818aec369ed467c0b8b9cc29a Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From ea577ddda314fc17c87f28e35115bcba0a8df8e6 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 16:46:37 +0100 Subject: refactors blob_controller --- Gemfile | 4 ++++ Gemfile.lock | 19 +++++++++++++++++++ app/controllers/concerns/creates_commit.rb | 8 ++++++++ 3 files changed, 31 insertions(+) diff --git a/Gemfile b/Gemfile index cce820fb53a..d97e6ab29db 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,11 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library +<<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" +======= +gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +>>>>>>> refactors blob_controller # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 3eaef214875..1fc6b36379f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,12 @@ +<<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a GIT remote: git@gitlab.com:gitlab-org/gitlab_git.git revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 branch: commit-blob-rename-action +======= +PATH + remote: ~/src/Gitlab/gitlab_git +>>>>>>> refactors blob_controller specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -285,11 +290,16 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) +<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 gitlab_git (10.2.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) rugged (~> 0.24.0) +<<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a +======= +======= +>>>>>>> refactors blob_controller gitlab_emoji (0.3.1) gemojione (~> 2.2, >= 2.2.1) >>>>>>> refactors blob_controller @@ -403,6 +413,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) + mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) @@ -875,8 +886,16 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) +<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 gitlab_git (~> 10.2) +<<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a + gitlab_emoji (~> 0.3.0) +======= +======= gitlab_emoji (~> 0.3.0) + gitlab_git (~> 10.2)! +>>>>>>> refactors blob_controller +>>>>>>> refactors blob_controller gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a3731b45df0 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,8 +12,16 @@ module CreatesCommit previous_path: @previous_path ) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + result = service.new(@tree_edit_project, current_user, commit_params).execute + puts "#" * 30 + puts result[:status] + puts "#" * 30 + if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From 40c009537a90864a2085c0ffc309b73530ffd24b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From b81cb3ee4924c0a5710b52b8c07adb8b4d76b108 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From c4208b30b677f526b38aa44fa884312a63b88ca0 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index c0138514c0f..73ea7f0af1c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -748,8 +748,8 @@ class Repository update: options[:update] } - if options[:previous_path] - commit_options[:file][:previous_path] = options[:previous_path] + if previous_path + options[:file].merge!(previous_path: previous_path) Gitlab::Git::Blob.rename(raw_repository, commit_options) else -- cgit v1.2.1 From 7759e86be51542b7a2850421f7ef377bb8dc5d5c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 5 Jul 2016 09:46:48 +0100 Subject: removes debugging prints from code --- Gemfile | 4 ---- Gemfile.lock | 15 ++++++--------- app/controllers/concerns/creates_commit.rb | 8 -------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index d97e6ab29db..1fc1be9e272 100644 --- a/Gemfile +++ b/Gemfile @@ -52,11 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -<<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a -gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" -======= gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" ->>>>>>> refactors blob_controller # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 1fc6b36379f..9c2f82ae1e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,18 @@ +<<<<<<< c4208b30b677f526b38aa44fa884312a63b88ca0 <<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a +======= +>>>>>>> removes debugging prints from code GIT remote: git@gitlab.com:gitlab-org/gitlab_git.git revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 branch: commit-blob-rename-action +<<<<<<< c4208b30b677f526b38aa44fa884312a63b88ca0 ======= PATH remote: ~/src/Gitlab/gitlab_git >>>>>>> refactors blob_controller +======= +>>>>>>> removes debugging prints from code specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -413,7 +419,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) @@ -886,16 +891,8 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) -<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 gitlab_git (~> 10.2) -<<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a gitlab_emoji (~> 0.3.0) -======= -======= - gitlab_emoji (~> 0.3.0) - gitlab_git (~> 10.2)! ->>>>>>> refactors blob_controller ->>>>>>> refactors blob_controller gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From d652fa5652f4e781c3944e5f26978de25a0e98f5 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:25:45 +0100 Subject: refactors to pass values as arguments through options --- app/models/repository.rb | 4 ++-- app/services/files/update_service.rb | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 73ea7f0af1c..80b83720d27 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -748,8 +748,8 @@ class Repository update: options[:update] } - if previous_path - options[:file].merge!(previous_path: previous_path) + if commit_options[:previous_path] + commit_options[:file].merge!(previous_path: commit_options[:previous_path]) Gitlab::Git::Blob.rename(raw_repository, commit_options) else diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index cbcbdafe21a..905c7a7c81a 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,7 +3,6 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit - repository.update_file(current_user, @file_path, @file_content, @target_branch, previous_path: @previous_path, message: @commit_message, update: true) -- cgit v1.2.1 From 908eabebc1117b53d811c8ba7f57b84735e37409 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 13:51:28 +0100 Subject: fixes issues for mr acceptance --- app/models/repository.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 80b83720d27..c0138514c0f 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -748,8 +748,8 @@ class Repository update: options[:update] } - if commit_options[:previous_path] - commit_options[:file].merge!(previous_path: commit_options[:previous_path]) + if options[:previous_path] + commit_options[:file][:previous_path] = options[:previous_path] Gitlab::Git::Blob.rename(raw_repository, commit_options) else -- cgit v1.2.1 From 6a3d05a94bd5c1c821a588232e5b96b5581a0c3e Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 14:35:56 +0100 Subject: fixes merge conflicts for Gemfile.lock --- Gemfile.lock | 169 +++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 95 insertions(+), 74 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9c2f82ae1e9..03dcc3abdec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ >>>>>>> removes debugging prints from code GIT remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + revision: cfb423fb576590525c4a978bc21cc98917c3334c branch: commit-blob-rename-action <<<<<<< c4208b30b677f526b38aa44fa884312a63b88ca0 ======= @@ -79,14 +79,13 @@ GEM faraday_middleware (~> 0.9) faraday_middleware-multi_json (~> 0.0) oauth2 (~> 1.0) - asciidoctor (1.5.3) - ast (2.2.0) + asciidoctor (1.5.4) + ast (2.3.0) attr_encrypted (3.0.1) encryptor (~> 3.0.0) - attr_required (1.0.0) - autoprefixer-rails (6.2.3) + attr_required (1.0.1) + autoprefixer-rails (6.3.7) execjs - json awesome_print (1.2.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) @@ -110,7 +109,7 @@ GEM babosa (1.0.2) base32 (0.3.2) bcrypt (3.1.11) - benchmark-ips (2.3.0) + benchmark-ips (2.6.1) better_errors (1.0.1) coderay (>= 1.0.0) erubis (>= 2.6.6) @@ -122,13 +121,13 @@ GEM brakeman (3.3.2) browser (2.2.0) builder (3.2.2) - bullet (5.0.0) + bullet (5.1.1) activesupport (>= 3.0.0) - uniform_notifier (~> 1.9.0) + uniform_notifier (~> 1.10.0) bundler-audit (0.5.0) bundler (~> 1.2) thor (~> 0.18) - byebug (8.2.1) + byebug (9.0.5) capybara (2.6.2) addressable mime-types (>= 1.16) @@ -136,7 +135,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - capybara-screenshot (1.0.11) + capybara-screenshot (1.0.13) capybara (>= 1.0, < 3) launchy carrierwave (0.10.0) @@ -148,9 +147,9 @@ GEM charlock_holmes (0.7.3) chronic_duration (0.10.6) numerizer (~> 0.1.1) - chunky_png (1.3.5) + chunky_png (1.3.6) cliver (0.3.2) - coderay (1.1.0) + coderay (1.1.1) coercible (1.0.0) descendants_tracker (~> 0.0.1) coffee-rails (4.1.1) @@ -160,15 +159,15 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - colorize (0.7.7) + colorize (0.8.1) concurrent-ruby (1.0.2) connection_pool (2.2.0) crack (0.4.3) safe_yaml (~> 1.0.0) creole (0.5.0) - css_parser (1.4.1) + css_parser (1.4.5) addressable - d3_rails (3.5.11) + d3_rails (3.5.16) railties (>= 3.1.0) daemons (1.2.3) database_cleaner (1.4.1) @@ -178,7 +177,7 @@ GEM activerecord (>= 3.2.0, < 5.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.1.1) + devise (4.2.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0, < 5.1) @@ -195,7 +194,7 @@ GEM docile (1.1.5) doorkeeper (4.0.0) railties (>= 4.2) - dropzonejs-rails (0.7.2) + dropzonejs-rails (0.7.3) rails (> 3.1) email_reply_parser (0.5.8) email_spec (1.6.0) @@ -205,9 +204,9 @@ GEM equalizer (0.0.11) erubis (2.7.0) escape_utils (1.1.1) - eventmachine (1.0.8) - excon (0.49.0) - execjs (2.6.0) + eventmachine (1.2.0.1) + excon (0.50.1) + execjs (2.7.0) expression_parser (0.9.0) factory_girl (4.5.0) activesupport (>= 3.0.0) @@ -222,18 +221,21 @@ GEM faraday_middleware multi_json ffaker (2.0.0) - ffi (1.9.10) - flay (2.6.1) + ffi (1.9.12) + flay (2.8.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) ruby_parser (~> 3.0) sexp_processor (~> 4.0) - flog (4.3.2) + flog (4.4.0) + path_expander (~> 1.0) ruby_parser (~> 3.1, > 3.1.0) sexp_processor (~> 4.4) flowdock (0.7.1) httparty (~> 0.7) multi_json - fog-aws (0.9.2) - fog-core (~> 1.27) + fog-aws (0.9.4) + fog-core (~> 1.38) fog-json (~> 1.0) fog-xml (~> 0.1) ipaddress (~> 0.8) @@ -242,7 +244,7 @@ GEM fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) - fog-core (1.40.0) + fog-core (1.42.0) builder excon (~> 0.49) formatador (~> 0.2) @@ -255,8 +257,8 @@ GEM multi_json (~> 1.10) fog-local (0.3.0) fog-core (~> 1.27) - fog-openstack (0.1.6) - fog-core (>= 1.39) + fog-openstack (0.1.7) + fog-core (>= 1.40) fog-json (>= 1.0) ipaddress (>= 0.8) fog-rackspace (0.1.1) @@ -267,9 +269,9 @@ GEM fog-xml (0.1.2) fog-core nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.1.0) + font-awesome-rails (4.6.3.1) railties (>= 3.2, < 5.1) - foreman (0.78.0) + foreman (0.82.0) thor (~> 0.19.1) formatador (0.2.5) fuubar (2.0.0) @@ -279,7 +281,7 @@ GEM rugged (~> 0.21) gemojione (2.6.1) json - get_process_mem (0.2.0) + get_process_mem (0.2.1) gherkin-ruby (0.3.2) github-linguist (4.7.6) charlock_holmes (~> 0.7.3) @@ -296,6 +298,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) +<<<<<<< 908eabebc1117b53d811c8ba7f57b84735e37409 <<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 gitlab_git (10.2.3) activesupport (~> 4.0) @@ -309,6 +312,8 @@ GEM gitlab_emoji (0.3.1) gemojione (~> 2.2, >= 2.2.1) >>>>>>> refactors blob_controller +======= +>>>>>>> fixes merge conflicts for Gemfile.lock gitlab_meta (7.0) gitlab_omniauth-ldap (1.2.1) net-ldap (~> 0.9) @@ -317,7 +322,7 @@ GEM rubyntlm (~> 0.3) globalid (0.3.6) activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.0) + gollum-grit_adapter (1.0.1) gitlab-grit (~> 2.7, >= 2.7.1) gollum-lib (4.1.0) github-markup (~> 1.3.3) @@ -351,10 +356,17 @@ GEM temple (~> 0.7.6) thor tilt +<<<<<<< 908eabebc1117b53d811c8ba7f57b84735e37409 hashie (3.4.3) health_check (2.1.0) rails (>= 4.0) hipchat (1.5.2) +======= + hashie (3.4.4) + health_check (1.5.1) + rails (>= 2.3.0) + hipchat (1.5.3) +>>>>>>> fixes merge conflicts for Gemfile.lock httparty mimemagic html-pipeline (1.11.0) @@ -365,10 +377,10 @@ GEM httparty (0.13.7) json (~> 1.8) multi_xml (>= 0.5.2) - httpclient (2.7.0.1) + httpclient (2.8.0) i18n (0.7.0) - ice_nine (0.11.1) - influxdb (0.2.3) + ice_nine (0.11.2) + influxdb (0.3.5) cause json ipaddress (0.8.3) @@ -388,7 +400,7 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.10.0) - knapsack (1.11.0) + knapsack (1.11.1) rake timecop (>= 0.1.0) launchy (2.4.3) @@ -399,7 +411,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - license_finder (2.1.0) + license_finder (2.1.2) bundler httparty rubyzip @@ -407,9 +419,10 @@ GEM xml-simple licensee (8.0.0) rugged (>= 0.24b) - listen (3.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) loofah (2.0.3) nokogiri (>= 1.5.9) macaddr (1.7.1) @@ -419,24 +432,30 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mimemagic (0.3.0) + mime-types-data (3.2016.0521) + mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.3.20) + mysql2 (0.3.21) nested_form (0.3.2) - net-ldap (0.12.1) - net-ssh (3.0.1) - newrelic_rpm (3.14.1.311) + net-ldap (0.14.0) + net-ssh (3.0.2) + newrelic_rpm (3.16.0.318) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) numerizer (0.1.1) +<<<<<<< 908eabebc1117b53d811c8ba7f57b84735e37409 oauth (0.4.7) oauth2 (1.2.0) +======= + oauth (0.5.1) + oauth2 (1.0.0) +>>>>>>> fixes merge conflicts for Gemfile.lock faraday (>= 0.8, < 0.10) jwt (~> 1.0) multi_json (~> 1.3) @@ -447,7 +466,7 @@ GEM omniauth (1.3.1) hashie (>= 1.2, < 4) rack (>= 1.0, < 3) - omniauth-auth0 (1.4.1) + omniauth-auth0 (1.4.2) omniauth-oauth2 (~> 1.1) omniauth-azure-oauth2 (0.0.6) jwt (~> 1.0) @@ -466,7 +485,7 @@ GEM omniauth-github (1.1.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.1) + omniauth-gitlab (1.0.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.0) omniauth-google-oauth2 (0.4.1) @@ -501,10 +520,11 @@ GEM org-ruby (0.9.12) rubypants (~> 0.2) orm_adapter (0.5.0) - paranoia (2.1.4) + paranoia (2.1.5) activerecord (~> 4.0) - parser (2.3.1.0) + parser (2.3.1.2) ast (~> 2.2) + path_expander (1.0.0) pg (0.18.4) pkg-config (1.1.7) poltergeist (1.9.0) @@ -514,10 +534,10 @@ GEM websocket-driver (>= 0.2.0) posix-spawn (0.3.11) powerpack (0.1.1) - premailer (1.8.6) - css_parser (>= 1.3.6) + premailer (1.8.7) + css_parser (>= 1.4.5) htmlentities (>= 4.0.0) - premailer-rails (1.9.2) + premailer-rails (1.9.4) actionmailer (>= 3, < 6) premailer (~> 1.7, >= 1.7.9) pry (0.10.3) @@ -535,7 +555,7 @@ GEM rack-cors (0.4.0) rack-mount (0.8.3) rack (>= 1.0.0) - rack-oauth2 (1.2.1) + rack-oauth2 (1.2.3) activesupport (>= 2.3) attr_required (>= 0.0.5) httpclient (>= 2.4) @@ -570,19 +590,19 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - raindrops (0.15.0) + raindrops (0.16.0) rake (10.5.0) - rb-fsevent (0.9.6) - rb-inotify (0.9.5) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) ffi (>= 0.5.0) rblineprof (0.3.6) debugger-ruby_core_source (~> 1.3) rdoc (3.12.2) json (~> 1.4) - recaptcha (3.0.0) + recaptcha (3.3.0) json - redcarpet (3.3.3) - redis (3.2.2) + redcarpet (3.3.4) + redis (3.3.0) redis-actionpack (4.0.1) actionpack (~> 4) redis-rack (~> 1.5.0) @@ -601,16 +621,16 @@ GEM redis-store (~> 1.1.0) redis-store (1.1.7) redis (>= 2.2) - request_store (1.3.0) + request_store (1.3.1) rerun (0.11.0) listen (~> 3.0) - responders (2.1.1) + responders (2.2.0) railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (1.11.0) - rqrcode (0.7.0) - chunky_png + rouge (1.11.1) + rqrcode (0.10.1) + chunky_png (~> 1.0) rqrcode-rails3 (0.1.7) rqrcode (>= 0.4.2) rspec (3.5.0) @@ -649,12 +669,13 @@ GEM ruby-progressbar (1.8.1) ruby-saml (1.3.0) nokogiri (>= 1.5.10) + ruby_dep (1.3.1) ruby_parser (3.8.2) sexp_processor (~> 4.1) - rubyntlm (0.5.2) + rubyntlm (0.6.0) rubypants (0.2.0) rubyzip (1.2.0) - rufus-scheduler (3.1.10) + rufus-scheduler (3.2.1) rugged (0.24.0) safe_yaml (1.0.4) sanitize (2.1.0) @@ -678,7 +699,7 @@ GEM seed-fu (2.3.6) activerecord (>= 3.1) activesupport (>= 3.1) - select2-rails (3.5.9.3) + select2-rails (3.5.10) thor (~> 0.14) sentry-raven (1.1.0) faraday (>= 0.7.6) @@ -693,7 +714,7 @@ GEM connection_pool (~> 2.2, >= 2.2.0) redis (~> 3.2, >= 3.2.1) sinatra (>= 1.4.7) - sidekiq-cron (0.4.0) + sidekiq-cron (0.4.2) redis-namespace (>= 1.5.2) rufus-scheduler (>= 2.0.24) sidekiq (>= 4.0.0) @@ -727,7 +748,7 @@ GEM spring (>= 0.9.1) spring-commands-teaspoon (0.0.2) spring (>= 0.9.1) - sprockets (3.6.2) + sprockets (3.6.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) @@ -788,7 +809,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.0.5) + unicode-display_width (1.1.0) unicorn (4.9.0) kgio (~> 2.6) rack @@ -796,7 +817,7 @@ GEM unicorn-worker-killer (0.4.4) get_process_mem (~> 0) unicorn (>= 4, < 6) - uniform_notifier (1.9.0) + uniform_notifier (1.10.0) uuid (2.3.8) macaddr (~> 1.0) version_sorter (2.0.0) @@ -816,7 +837,7 @@ GEM webmock (1.21.0) addressable (>= 2.3.6) crack (>= 0.3.2) - websocket-driver (0.6.3) + websocket-driver (0.6.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) wikicloth (0.8.1) @@ -1017,4 +1038,4 @@ DEPENDENCIES wikicloth (= 0.8.1) BUNDLED WITH - 1.12.5 + 1.10.6 -- cgit v1.2.1 From fc747dc34627c4bcb9fbb0ecab1440224f23ec88 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 18:36:22 +0100 Subject: fixes merge request edit bug where it would generate a cloned file and not remove the previous one --- Gemfile.lock | 1 - app/controllers/projects/blob_controller.rb | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 03dcc3abdec..b87b288f71f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -432,7 +432,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 4d8bb5be20b..00549265e9e 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -38,6 +38,11 @@ class Projects::BlobController < Projects::ApplicationController end def update + unless params[:file_name].empty? + @previous_path = @path + @path = params[:file_name] + end + after_edit_path = if from_merge_request && @target_branch == @ref diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + -- cgit v1.2.1 From 1f105bdc04088d5c72f7d1a1732075a407f38cf0 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 18:51:02 +0100 Subject: fixes more issues for MR acceptance --- app/models/repository.rb | 24 ++++++++++++------------ app/services/files/update_service.rb | 5 +++-- app/views/projects/blob/_editor.html.haml | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index c0138514c0f..538d91a77d7 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -731,29 +731,29 @@ class Repository end end - def update_file(user, path, content, branch, options={}) + def update_file(user, path, content, branch:, previous_path:, message:) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - commit_options = {} - commit_options[:committer] = committer - commit_options[:author] = committer - commit_options[:commit] = { - message: options[:message], + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, branch: ref } - commit_options[:file] = { + options[:file] = { content: content, path: path, - update: options[:update] + update: true } - if options[:previous_path] - commit_options[:file][:previous_path] = options[:previous_path] + if previous_path + options[:file][:previous_path] = previous_path - Gitlab::Git::Blob.rename(raw_repository, commit_options) + Gitlab::Git::Blob.rename(raw_repository, options) else - Gitlab::Git::Blob.commit(raw_repository, commit_options) + Gitlab::Git::Blob.commit(raw_repository, options) end end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 905c7a7c81a..8d2b5083179 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -4,8 +4,9 @@ module Files class UpdateService < Files::BaseService def commit repository.update_file(current_user, @file_path, @file_content, - @target_branch, previous_path: @previous_path, - message: @commit_message, update: true) + branch: @target_branch, + previous_path: @previous_path, + message: @commit_message) end end end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 31bd4646d3d..ad3009f30ab 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -4,8 +4,8 @@ = icon('code-fork') = ref %span.editor-file-name - -if current_action?(:edit) || current_action?(:update) - = text_field_tag 'file_name', (params[:file_name] or @path), + - if current_action?(:edit) || current_action?(:update) + = text_field_tag 'file_name', (params[:file_name] || @path), class: 'form-control new-file-name' - if current_action?(:new) || current_action?(:create) -- cgit v1.2.1 From 4c1d00d044f91d3324918924a46cc4b3d0e3f172 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 11:07:04 +0100 Subject: removes the git path for the gitlab_git gem corresponding to this MR dependency --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 1fc1be9e272..cbcd9f20ace 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2' # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes -- cgit v1.2.1 From 28c34301ae62cdc8f7c87dad87d80d97cdb8d379 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 11:07:33 +0100 Subject: removes Gemfile.lock --- Gemfile.lock | 1040 ---------------------------------------------------------- 1 file changed, 1040 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index b87b288f71f..00000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,1040 +0,0 @@ -<<<<<<< c4208b30b677f526b38aa44fa884312a63b88ca0 -<<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a -======= ->>>>>>> removes debugging prints from code -GIT - remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: cfb423fb576590525c4a978bc21cc98917c3334c - branch: commit-blob-rename-action -<<<<<<< c4208b30b677f526b38aa44fa884312a63b88ca0 -======= -PATH - remote: ~/src/Gitlab/gitlab_git ->>>>>>> refactors blob_controller -======= ->>>>>>> removes debugging prints from code - specs: - gitlab_git (10.3.0) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) - -GEM - remote: https://rubygems.org/ - specs: - RedCloth (4.3.2) - ace-rails-ap (4.0.2) - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) - globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) - arel (~> 6.0) - activerecord-session_store (1.0.0) - actionpack (>= 4.0, < 5.1) - activerecord (>= 4.0, < 5.1) - multi_json (~> 1.11, >= 1.11.2) - rack (>= 1.5.2, < 3) - railties (>= 4.0, < 5.1) - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - acts-as-taggable-on (3.5.0) - activerecord (>= 3.2, < 5) - addressable (2.3.8) - after_commit_queue (1.3.0) - activerecord (>= 3.0) - akismet (2.0.0) - allocations (1.0.5) - arel (6.0.3) - asana (0.4.0) - faraday (~> 0.9) - faraday_middleware (~> 0.9) - faraday_middleware-multi_json (~> 0.0) - oauth2 (~> 1.0) - asciidoctor (1.5.4) - ast (2.3.0) - attr_encrypted (3.0.1) - encryptor (~> 3.0.0) - attr_required (1.0.1) - autoprefixer-rails (6.3.7) - execjs - awesome_print (1.2.0) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - azure (0.7.5) - addressable (~> 2.3) - azure-core (~> 0.1) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - json (~> 1.8) - mime-types (>= 1, < 3.0) - nokogiri (~> 1.6) - systemu (~> 2.6) - thor (~> 0.19) - uuid (~> 2.0) - azure-core (0.1.2) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - nokogiri (~> 1.6) - babosa (1.0.2) - base32 (0.3.2) - bcrypt (3.1.11) - benchmark-ips (2.6.1) - better_errors (1.0.1) - coderay (>= 1.0.0) - erubis (>= 2.6.6) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - bootstrap-sass (3.3.6) - autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) - brakeman (3.3.2) - browser (2.2.0) - builder (3.2.2) - bullet (5.1.1) - activesupport (>= 3.0.0) - uniform_notifier (~> 1.10.0) - bundler-audit (0.5.0) - bundler (~> 1.2) - thor (~> 0.18) - byebug (9.0.5) - capybara (2.6.2) - addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - capybara-screenshot (1.0.13) - capybara (>= 1.0, < 3) - launchy - carrierwave (0.10.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) - json (>= 1.7) - mime-types (>= 1.16) - cause (0.1) - charlock_holmes (0.7.3) - chronic_duration (0.10.6) - numerizer (~> 0.1.1) - chunky_png (1.3.6) - cliver (0.3.2) - coderay (1.1.1) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (4.1.1) - coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.1.x) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - colorize (0.8.1) - concurrent-ruby (1.0.2) - connection_pool (2.2.0) - crack (0.4.3) - safe_yaml (~> 1.0.0) - creole (0.5.0) - css_parser (1.4.5) - addressable - d3_rails (3.5.16) - railties (>= 3.1.0) - daemons (1.2.3) - database_cleaner (1.4.1) - debug_inspector (0.0.2) - debugger-ruby_core_source (1.3.8) - default_value_for (3.0.1) - activerecord (>= 3.2.0, < 5.0) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.0) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) - responders - warden (~> 1.2.3) - devise-two-factor (3.0.0) - activesupport - attr_encrypted (>= 1.3, < 4, != 2) - devise (~> 4.0) - railties - rotp (~> 2.0) - diff-lcs (1.2.5) - diffy (3.0.7) - docile (1.1.5) - doorkeeper (4.0.0) - railties (>= 4.2) - dropzonejs-rails (0.7.3) - rails (> 3.1) - email_reply_parser (0.5.8) - email_spec (1.6.0) - launchy (~> 2.1) - mail (~> 2.2) - encryptor (3.0.0) - equalizer (0.0.11) - erubis (2.7.0) - escape_utils (1.1.1) - eventmachine (1.2.0.1) - excon (0.50.1) - execjs (2.7.0) - expression_parser (0.9.0) - factory_girl (4.5.0) - activesupport (>= 3.0.0) - factory_girl_rails (4.6.0) - factory_girl (~> 4.5.0) - railties (>= 3.0.0) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - faraday_middleware-multi_json (0.0.6) - faraday_middleware - multi_json - ffaker (2.0.0) - ffi (1.9.12) - flay (2.8.0) - erubis (~> 2.7.0) - path_expander (~> 1.0) - ruby_parser (~> 3.0) - sexp_processor (~> 4.0) - flog (4.4.0) - path_expander (~> 1.0) - ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.4) - flowdock (0.7.1) - httparty (~> 0.7) - multi_json - fog-aws (0.9.4) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-azure (0.0.2) - azure (~> 0.6) - fog-core (~> 1.27) - fog-json (~> 1.0) - fog-xml (~> 0.1) - fog-core (1.42.0) - builder - excon (~> 0.49) - formatador (~> 0.2) - fog-google (0.3.2) - fog-core - fog-json - fog-xml - fog-json (1.0.2) - fog-core (~> 1.0) - multi_json (~> 1.10) - fog-local (0.3.0) - fog-core (~> 1.27) - fog-openstack (0.1.7) - fog-core (>= 1.40) - fog-json (>= 1.0) - ipaddress (>= 0.8) - fog-rackspace (0.1.1) - fog-core (>= 1.35) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.8) - fog-xml (0.1.2) - fog-core - nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.3.1) - railties (>= 3.2, < 5.1) - foreman (0.82.0) - thor (~> 0.19.1) - formatador (0.2.5) - fuubar (2.0.0) - rspec (~> 3.0) - ruby-progressbar (~> 1.4) - gemnasium-gitlab-service (0.2.6) - rugged (~> 0.21) - gemojione (2.6.1) - json - get_process_mem (0.2.1) - gherkin-ruby (0.3.2) - github-linguist (4.7.6) - charlock_holmes (~> 0.7.3) - escape_utils (~> 1.1.0) - mime-types (>= 1.19) - rugged (>= 0.23.0b) - github-markup (1.3.3) - gitlab-flowdock-git-hook (1.0.1) - flowdock (~> 0.7) - gitlab-grit (>= 2.4.1) - multi_json - gitlab-grit (2.8.1) - charlock_holmes (~> 0.6) - diff-lcs (~> 1.1) - mime-types (>= 1.16, < 3) - posix-spawn (~> 0.3) -<<<<<<< 908eabebc1117b53d811c8ba7f57b84735e37409 -<<<<<<< 2da08236773692ac819a6acde0dfab8d26a26e30 - gitlab_git (10.2.3) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) -<<<<<<< e5caeab441d6c0e818aec369ed467c0b8b9cc29a -======= -======= ->>>>>>> refactors blob_controller - gitlab_emoji (0.3.1) - gemojione (~> 2.2, >= 2.2.1) ->>>>>>> refactors blob_controller -======= ->>>>>>> fixes merge conflicts for Gemfile.lock - gitlab_meta (7.0) - gitlab_omniauth-ldap (1.2.1) - net-ldap (~> 0.9) - omniauth (~> 1.0) - pyu-ruby-sasl (~> 0.0.3.1) - rubyntlm (~> 0.3) - globalid (0.3.6) - activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.1) - gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.1.0) - github-markup (~> 1.3.3) - gollum-grit_adapter (~> 1.0) - nokogiri (~> 1.6.4) - rouge (~> 1.9) - sanitize (~> 2.1.0) - stringex (~> 2.5.1) - gollum-rugged_adapter (0.4.2) - mime-types (>= 1.15) - rugged (~> 0.24.0, >= 0.21.3) - gon (6.0.1) - actionpack (>= 3.0) - json - multi_json - request_store (>= 1.0) - grape (0.13.0) - activesupport - builder - hashie (>= 2.1.0) - multi_json (>= 1.3.2) - multi_xml (>= 0.5.2) - rack (>= 1.3.0) - rack-accept - rack-mount - virtus (>= 1.0.0) - grape-entity (0.4.8) - activesupport - multi_json (>= 1.3.2) - hamlit (2.5.0) - temple (~> 0.7.6) - thor - tilt -<<<<<<< 908eabebc1117b53d811c8ba7f57b84735e37409 - hashie (3.4.3) - health_check (2.1.0) - rails (>= 4.0) - hipchat (1.5.2) -======= - hashie (3.4.4) - health_check (1.5.1) - rails (>= 2.3.0) - hipchat (1.5.3) ->>>>>>> fixes merge conflicts for Gemfile.lock - httparty - mimemagic - html-pipeline (1.11.0) - activesupport (>= 2) - nokogiri (~> 1.4) - htmlentities (4.3.4) - http_parser.rb (0.5.3) - httparty (0.13.7) - json (~> 1.8) - multi_xml (>= 0.5.2) - httpclient (2.8.0) - i18n (0.7.0) - ice_nine (0.11.2) - influxdb (0.3.5) - cause - json - ipaddress (0.8.3) - jquery-atwho-rails (1.3.2) - jquery-rails (4.1.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jquery-turbolinks (2.1.0) - railties (>= 3.1.0) - turbolinks - jquery-ui-rails (5.0.5) - railties (>= 3.2.16) - json (1.8.3) - jwt (1.5.4) - kaminari (0.17.0) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - kgio (2.10.0) - knapsack (1.11.1) - rake - timecop (>= 0.1.0) - launchy (2.4.3) - addressable (~> 2.3) - letter_opener (1.4.1) - launchy (~> 2.2) - letter_opener_web (1.3.0) - actionmailer (>= 3.2) - letter_opener (~> 1.0) - railties (>= 3.2) - license_finder (2.1.2) - bundler - httparty - rubyzip - thor - xml-simple - licensee (8.0.0) - rugged (>= 0.24b) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.0.3) - nokogiri (>= 1.5.9) - macaddr (1.7.1) - systemu (~> 2.6.2) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mail_room (0.8.0) - method_source (0.8.2) - mime-types (2.99.2) - mimemagic (0.3.1) - mini_portile2 (2.1.0) - minitest (5.7.0) - mousetrap-rails (1.4.6) - multi_json (1.12.1) - multi_xml (0.5.5) - multipart-post (2.0.0) - mysql2 (0.3.21) - nested_form (0.3.2) - net-ldap (0.14.0) - net-ssh (3.0.2) - newrelic_rpm (3.16.0.318) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - numerizer (0.1.1) -<<<<<<< 908eabebc1117b53d811c8ba7f57b84735e37409 - oauth (0.4.7) - oauth2 (1.2.0) -======= - oauth (0.5.1) - oauth2 (1.0.0) ->>>>>>> fixes merge conflicts for Gemfile.lock - faraday (>= 0.8, < 0.10) - jwt (~> 1.0) - multi_json (~> 1.3) - multi_xml (~> 0.5) - rack (>= 1.2, < 3) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) - omniauth (1.3.1) - hashie (>= 1.2, < 4) - rack (>= 1.0, < 3) - omniauth-auth0 (1.4.2) - omniauth-oauth2 (~> 1.1) - omniauth-azure-oauth2 (0.0.6) - jwt (~> 1.0) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-bitbucket (0.0.2) - multi_json (~> 1.7) - omniauth (~> 1.1) - omniauth-oauth (~> 1.0) - omniauth-cas3 (1.1.3) - addressable (~> 2.3) - nokogiri (~> 1.6.6) - omniauth (~> 1.2) - omniauth-facebook (3.0.0) - omniauth-oauth2 (~> 1.2) - omniauth-github (1.1.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.0) - omniauth-google-oauth2 (0.4.1) - addressable (~> 2.3) - jwt (~> 1.0) - multi_json (~> 1.3) - omniauth (>= 1.1.1) - omniauth-oauth2 (~> 1.3.1) - omniauth-kerberos (0.3.0) - omniauth-multipassword - timfel-krb5-auth (~> 0.8) - omniauth-multipassword (0.4.2) - omniauth (~> 1.0) - omniauth-oauth (1.1.0) - oauth - omniauth (~> 1.0) - omniauth-oauth2 (1.3.1) - oauth2 (~> 1.0) - omniauth (~> 1.2) - omniauth-saml (1.6.0) - omniauth (~> 1.3) - ruby-saml (~> 1.3) - omniauth-shibboleth (1.2.1) - omniauth (>= 1.0.0) - omniauth-twitter (1.2.1) - json (~> 1.3) - omniauth-oauth (~> 1.1) - omniauth_crowd (2.2.3) - activesupport - nokogiri (>= 1.4.4) - omniauth (~> 1.0) - org-ruby (0.9.12) - rubypants (~> 0.2) - orm_adapter (0.5.0) - paranoia (2.1.5) - activerecord (~> 4.0) - parser (2.3.1.2) - ast (~> 2.2) - path_expander (1.0.0) - pg (0.18.4) - pkg-config (1.1.7) - poltergeist (1.9.0) - capybara (~> 2.1) - cliver (~> 0.3.1) - multi_json (~> 1.0) - websocket-driver (>= 0.2.0) - posix-spawn (0.3.11) - powerpack (0.1.1) - premailer (1.8.7) - css_parser (>= 1.4.5) - htmlentities (>= 4.0.0) - premailer-rails (1.9.4) - actionmailer (>= 3, < 6) - premailer (~> 1.7, >= 1.7.9) - pry (0.10.3) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-rails (0.3.4) - pry (>= 0.9.10) - pyu-ruby-sasl (0.0.3.3) - rack (1.6.4) - rack-accept (0.4.5) - rack (>= 0.4) - rack-attack (4.3.1) - rack - rack-cors (0.4.0) - rack-mount (0.8.3) - rack (>= 1.0.0) - rack-oauth2 (1.2.3) - activesupport (>= 2.3) - attr_required (>= 0.0.5) - httpclient (>= 2.4) - multi_json (>= 1.3.6) - rack (>= 1.1) - rack-protection (1.5.3) - rack - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) - raindrops (0.16.0) - rake (10.5.0) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - rblineprof (0.3.6) - debugger-ruby_core_source (~> 1.3) - rdoc (3.12.2) - json (~> 1.4) - recaptcha (3.3.0) - json - redcarpet (3.3.4) - redis (3.3.0) - redis-actionpack (4.0.1) - actionpack (~> 4) - redis-rack (~> 1.5.0) - redis-store (~> 1.1.0) - redis-activesupport (4.1.5) - activesupport (>= 3, < 5) - redis-store (~> 1.1.0) - redis-namespace (1.5.2) - redis (~> 3.0, >= 3.0.4) - redis-rack (1.5.0) - rack (~> 1.5) - redis-store (~> 1.1.0) - redis-rails (4.0.0) - redis-actionpack (~> 4) - redis-activesupport (~> 4) - redis-store (~> 1.1.0) - redis-store (1.1.7) - redis (>= 2.2) - request_store (1.3.1) - rerun (0.11.0) - listen (~> 3.0) - responders (2.2.0) - railties (>= 4.2.0, < 5.1) - rinku (2.0.0) - rotp (2.1.2) - rouge (1.11.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) - rqrcode-rails3 (0.1.7) - rqrcode (>= 0.4.2) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.0) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-retry (0.4.5) - rspec-core - rspec-support (3.5.0) - rubocop (0.40.0) - parser (>= 2.3.1.0, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-rspec (1.5.0) - rubocop (>= 0.40.0) - ruby-fogbugz (0.2.1) - crack (~> 0.4) - ruby-progressbar (1.8.1) - ruby-saml (1.3.0) - nokogiri (>= 1.5.10) - ruby_dep (1.3.1) - ruby_parser (3.8.2) - sexp_processor (~> 4.1) - rubyntlm (0.6.0) - rubypants (0.2.0) - rubyzip (1.2.0) - rufus-scheduler (3.2.1) - rugged (0.24.0) - safe_yaml (1.0.4) - sanitize (2.1.0) - nokogiri (>= 1.4.4) - sass (3.4.22) - sass-rails (5.0.5) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) - scss_lint (0.47.1) - rake (>= 0.9, < 11) - sass (~> 3.4.15) - sdoc (0.3.20) - json (>= 1.1.3) - rdoc (~> 3.10) - seed-fu (2.3.6) - activerecord (>= 3.1) - activesupport (>= 3.1) - select2-rails (3.5.10) - thor (~> 0.14) - sentry-raven (1.1.0) - faraday (>= 0.7.6) - settingslogic (2.0.9) - sexp_processor (4.7.0) - sham_rack (1.3.6) - rack - shoulda-matchers (2.8.0) - activesupport (>= 3.0.0) - sidekiq (4.1.4) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.2, >= 2.2.0) - redis (~> 3.2, >= 3.2.1) - sinatra (>= 1.4.7) - sidekiq-cron (0.4.2) - redis-namespace (>= 1.5.2) - rufus-scheduler (>= 2.0.24) - sidekiq (>= 4.0.0) - simple_oauth (0.1.9) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - six (0.2.0) - slack-notifier (1.2.1) - slop (3.6.0) - spinach (0.8.10) - colorize - gherkin-ruby (>= 0.3.2) - json - spinach-rails (0.2.1) - capybara (>= 2.0.0) - railties (>= 3) - spinach (>= 0.4) - spinach-rerun-reporter (0.0.2) - spinach (~> 0.8) - spring (1.7.2) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) - spring-commands-spinach (1.1.0) - spring (>= 0.9.1) - spring-commands-teaspoon (0.0.2) - spring (>= 0.9.1) - sprockets (3.6.3) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.1.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - state_machines (0.4.0) - state_machines-activemodel (0.4.0) - activemodel (>= 4.1, < 5.1) - state_machines (>= 0.4.0) - state_machines-activerecord (0.4.0) - activerecord (>= 4.1, < 5.1) - state_machines-activemodel (>= 0.3.0) - stringex (2.5.2) - sys-filesystem (1.1.6) - ffi - systemu (2.6.5) - task_list (1.0.2) - html-pipeline - teaspoon (1.1.5) - railties (>= 3.2.5, < 6) - teaspoon-jasmine (2.2.0) - teaspoon (>= 1.0.0) - temple (0.7.7) - test_after_commit (0.4.2) - activerecord (>= 3.2) - thin (1.7.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - timecop (0.8.1) - timfel-krb5-auth (0.8.3) - tinder (1.10.1) - eventmachine (~> 1.0) - faraday (~> 0.9.0) - faraday_middleware (~> 0.9) - hashie (>= 1.0) - json (~> 1.8.0) - mime-types - multi_json (~> 1.7) - twitter-stream (~> 0.1) - turbolinks (2.5.3) - coffee-rails - twitter-stream (0.1.16) - eventmachine (>= 0.12.8) - http_parser.rb (~> 0.5.1) - simple_oauth (~> 0.1.4) - tzinfo (1.2.2) - thread_safe (~> 0.1) - u2f (0.2.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - underscore-rails (1.8.3) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.2) - unicode-display_width (1.1.0) - unicorn (4.9.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - unicorn-worker-killer (0.4.4) - get_process_mem (~> 0) - unicorn (>= 4, < 6) - uniform_notifier (1.10.0) - uuid (2.3.8) - macaddr (~> 1.0) - version_sorter (2.0.0) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - vmstat (2.1.0) - warden (1.2.6) - rack (>= 1.0) - web-console (2.3.0) - activemodel (>= 4.0) - binding_of_caller (>= 0.7.2) - railties (>= 4.0) - sprockets-rails (>= 2.0, < 4.0) - webmock (1.21.0) - addressable (>= 2.3.6) - crack (>= 0.3.2) - websocket-driver (0.6.4) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - wikicloth (0.8.1) - builder - expression_parser - rinku - xml-simple (1.1.5) - xpath (2.0.0) - nokogiri (~> 1.3) - -PLATFORMS - ruby - -DEPENDENCIES - RedCloth (~> 4.3.2) - ace-rails-ap (~> 4.0.2) - activerecord-session_store (~> 1.0.0) - acts-as-taggable-on (~> 3.4) - addressable (~> 2.3.8) - after_commit_queue (~> 1.3.0) - akismet (~> 2.0) - allocations (~> 1.0) - asana (~> 0.4.0) - asciidoctor (~> 1.5.2) - attr_encrypted (~> 3.0.0) - awesome_print (~> 1.2.0) - babosa (~> 1.0.2) - base32 (~> 0.3.0) - benchmark-ips (~> 2.3.0) - better_errors (~> 1.0.1) - binding_of_caller (~> 0.7.2) - bootstrap-sass (~> 3.3.0) - brakeman (~> 3.3.0) - browser (~> 2.2) - bullet (~> 5.0.0) - bundler-audit (~> 0.5.0) - byebug (~> 8.2.1) - capybara (~> 2.6.2) - capybara-screenshot (~> 1.0.0) - carrierwave (~> 0.10.0) - charlock_holmes (~> 0.7.3) - chronic_duration (~> 0.10.6) - coffee-rails (~> 4.1.0) - connection_pool (~> 2.0) - creole (~> 0.5.0) - d3_rails (~> 3.5.0) - database_cleaner (~> 1.4.0) - default_value_for (~> 3.0.0) - devise (~> 4.0) - devise-two-factor (~> 3.0.0) - diffy (~> 3.0.3) - doorkeeper (~> 4.0) - dropzonejs-rails (~> 0.7.1) - email_reply_parser (~> 0.5.8) - email_spec (~> 1.6.0) - factory_girl_rails (~> 4.6.0) - ffaker (~> 2.0.0) - flay (~> 2.6.1) - flog (~> 4.3.2) - fog-aws (~> 0.9) - fog-azure (~> 0.0) - fog-core (~> 1.40) - fog-google (~> 0.3) - fog-local (~> 0.3) - fog-openstack (~> 0.1) - fog-rackspace (~> 0.1.1) - font-awesome-rails (~> 4.6.1) - foreman (~> 0.78.0) - fuubar (~> 2.0.0) - gemnasium-gitlab-service (~> 0.2) - gemojione (~> 2.6) - github-linguist (~> 4.7.0) - github-markup (~> 1.3.1) - gitlab-flowdock-git-hook (~> 1.0.1) - gitlab_git (~> 10.2) - gitlab_emoji (~> 0.3.0) - gitlab_meta (= 7.0) - gitlab_omniauth-ldap (~> 1.2.1) - gollum-lib (~> 4.1.0) - gollum-rugged_adapter (~> 0.4.2) - gon (~> 6.0.1) - grape (~> 0.13.0) - grape-entity (~> 0.4.2) - hamlit (~> 2.5) - health_check (~> 2.1.0) - hipchat (~> 1.5.0) - html-pipeline (~> 1.11.0) - httparty (~> 0.13.3) - influxdb (~> 0.2) - jquery-atwho-rails (~> 1.3.2) - jquery-rails (~> 4.1.0) - jquery-turbolinks (~> 2.1.0) - jquery-ui-rails (~> 5.0.0) - jwt - kaminari (~> 0.17.0) - knapsack (~> 1.11.0) - letter_opener_web (~> 1.3.0) - license_finder (~> 2.1.0) - licensee (~> 8.0.0) - loofah (~> 2.0.3) - mail_room (~> 0.8) - method_source (~> 0.8) - minitest (~> 5.7.0) - mousetrap-rails (~> 1.4.6) - mysql2 (~> 0.3.16) - nested_form (~> 0.3.2) - net-ssh (~> 3.0.1) - newrelic_rpm (~> 3.14) - nokogiri (~> 1.6.7, >= 1.6.7.2) - oauth2 (~> 1.2.0) - octokit (~> 4.3.0) - omniauth (~> 1.3.1) - omniauth-auth0 (~> 1.4.1) - omniauth-azure-oauth2 (~> 0.0.6) - omniauth-bitbucket (~> 0.0.2) - omniauth-cas3 (~> 1.1.2) - omniauth-facebook (~> 3.0.0) - omniauth-github (~> 1.1.1) - omniauth-gitlab (~> 1.0.0) - omniauth-google-oauth2 (~> 0.4.1) - omniauth-kerberos (~> 0.3.0) - omniauth-saml (~> 1.6.0) - omniauth-shibboleth (~> 1.2.0) - omniauth-twitter (~> 1.2.0) - omniauth_crowd (~> 2.2.0) - org-ruby (~> 0.9.12) - paranoia (~> 2.0) - pg (~> 0.18.2) - poltergeist (~> 1.9.0) - premailer-rails (~> 1.9.0) - pry-rails (~> 0.3.4) - rack-attack (~> 4.3.1) - rack-cors (~> 0.4.0) - rack-oauth2 (~> 1.2.1) - rails (= 4.2.6) - rails-deprecated_sanitizer (~> 1.0.3) - rainbow (~> 2.1.0) - rblineprof (~> 0.3.6) - rdoc (~> 3.6) - recaptcha (~> 3.0) - redcarpet (~> 3.3.3) - redis (~> 3.2) - redis-namespace (~> 1.5.2) - redis-rails (~> 4.0.0) - request_store (~> 1.3.0) - rerun (~> 0.11.0) - responders (~> 2.0) - rouge (~> 1.11) - rqrcode-rails3 (~> 0.1.7) - rspec-rails (~> 3.5.0) - rspec-retry (~> 0.4.5) - rubocop (~> 0.40.0) - rubocop-rspec (~> 1.5.0) - ruby-fogbugz (~> 0.2.1) - sanitize (~> 2.0) - sass-rails (~> 5.0.0) - scss_lint (~> 0.47.0) - sdoc (~> 0.3.20) - seed-fu (~> 2.3.5) - select2-rails (~> 3.5.9) - sentry-raven (~> 1.1.0) - settingslogic (~> 2.0.9) - sham_rack (~> 1.3.6) - shoulda-matchers (~> 2.8.0) - sidekiq (~> 4.0) - sidekiq-cron (~> 0.4.0) - simplecov (~> 0.11.0) - sinatra (~> 1.4.4) - six (~> 0.2.0) - slack-notifier (~> 1.2.0) - spinach-rails (~> 0.2.1) - spinach-rerun-reporter (~> 0.0.2) - spring (~> 1.7.0) - spring-commands-rspec (~> 1.0.4) - spring-commands-spinach (~> 1.1.0) - spring-commands-teaspoon (~> 0.0.2) - sprockets (~> 3.6.0) - state_machines-activerecord (~> 0.4.0) - sys-filesystem (~> 1.1.6) - task_list (~> 1.0.2) - teaspoon (~> 1.1.0) - teaspoon-jasmine (~> 2.2.0) - test_after_commit (~> 0.4.2) - thin (~> 1.7.0) - tinder (~> 1.10.0) - turbolinks (~> 2.5.0) - u2f (~> 0.2.1) - uglifier (~> 2.7.2) - underscore-rails (~> 1.8.0) - unf (~> 0.1.4) - unicorn (~> 4.9.0) - unicorn-worker-killer (~> 0.4.2) - version_sorter (~> 2.0.0) - virtus (~> 1.0.1) - vmstat (~> 2.1.0) - web-console (~> 2.0) - webmock (~> 1.21.0) - wikicloth (= 0.8.1) - -BUNDLED WITH - 1.10.6 -- cgit v1.2.1 From 9cd65d345b4ccb70b56ba41795eb7649a81c8a77 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 10:40:10 +0100 Subject: adds Gemfile.lock to mr --- Gemfile.lock | 994 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 994 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000000..8809edb0fc9 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,994 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.3.2) + ace-rails-ap (4.0.2) + actionmailer (4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.6) + actionview (= 4.2.6) + activesupport (= 4.2.6) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.6) + activesupport (= 4.2.6) + globalid (>= 0.3.0) + activemodel (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + activerecord (4.2.6) + activemodel (= 4.2.6) + activesupport (= 4.2.6) + arel (~> 6.0) + activerecord-session_store (1.0.0) + actionpack (>= 4.0, < 5.1) + activerecord (>= 4.0, < 5.1) + multi_json (~> 1.11, >= 1.11.2) + rack (>= 1.5.2, < 3) + railties (>= 4.0, < 5.1) + activesupport (4.2.6) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + acts-as-taggable-on (3.5.0) + activerecord (>= 3.2, < 5) + addressable (2.3.8) + after_commit_queue (1.3.0) + activerecord (>= 3.0) + akismet (2.0.0) + allocations (1.0.5) + arel (6.0.3) + asana (0.4.0) + faraday (~> 0.9) + faraday_middleware (~> 0.9) + faraday_middleware-multi_json (~> 0.0) + oauth2 (~> 1.0) + asciidoctor (1.5.4) + ast (2.3.0) + attr_encrypted (3.0.1) + encryptor (~> 3.0.0) + attr_required (1.0.1) + autoprefixer-rails (6.3.7) + execjs + awesome_print (1.2.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + azure (0.7.5) + addressable (~> 2.3) + azure-core (~> 0.1) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + json (~> 1.8) + mime-types (>= 1, < 3.0) + nokogiri (~> 1.6) + systemu (~> 2.6) + thor (~> 0.19) + uuid (~> 2.0) + azure-core (0.1.2) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + nokogiri (~> 1.6) + babosa (1.0.2) + base32 (0.3.2) + bcrypt (3.1.11) + benchmark-ips (2.6.1) + better_errors (1.0.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bootstrap-sass (3.3.6) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + brakeman (3.3.2) + browser (2.2.0) + builder (3.2.2) + bullet (5.1.1) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.10.0) + bundler-audit (0.5.0) + bundler (~> 1.2) + thor (~> 0.18) + byebug (9.0.5) + capybara (2.6.2) + addressable + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + capybara-screenshot (1.0.13) + capybara (>= 1.0, < 3) + launchy + carrierwave (0.10.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + mime-types (>= 1.16) + cause (0.1) + charlock_holmes (0.7.3) + chronic_duration (0.10.6) + numerizer (~> 0.1.1) + chunky_png (1.3.6) + cliver (0.3.2) + coderay (1.1.1) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + coffee-rails (4.1.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.1.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorize (0.8.1) + concurrent-ruby (1.0.2) + connection_pool (2.2.0) + crack (0.4.3) + safe_yaml (~> 1.0.0) + creole (0.5.0) + css_parser (1.4.5) + addressable + d3_rails (3.5.16) + railties (>= 3.1.0) + daemons (1.2.3) + database_cleaner (1.4.1) + debug_inspector (0.0.2) + debugger-ruby_core_source (1.3.8) + default_value_for (3.0.1) + activerecord (>= 3.2.0, < 5.0) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + devise (4.2.0) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 5.1) + responders + warden (~> 1.2.3) + devise-two-factor (3.0.0) + activesupport + attr_encrypted (>= 1.3, < 4, != 2) + devise (~> 4.0) + railties + rotp (~> 2.0) + diff-lcs (1.2.5) + diffy (3.0.7) + docile (1.1.5) + doorkeeper (4.0.0) + railties (>= 4.2) + dropzonejs-rails (0.7.3) + rails (> 3.1) + email_reply_parser (0.5.8) + email_spec (1.6.0) + launchy (~> 2.1) + mail (~> 2.2) + encryptor (3.0.0) + equalizer (0.0.11) + erubis (2.7.0) + escape_utils (1.1.1) + eventmachine (1.2.0.1) + excon (0.50.1) + execjs (2.7.0) + expression_parser (0.9.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.6.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) + faraday_middleware-multi_json (0.0.6) + faraday_middleware + multi_json + ffaker (2.0.0) + ffi (1.9.13) + flay (2.8.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.4.0) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.4) + flowdock (0.7.1) + httparty (~> 0.7) + multi_json + fog-aws (0.9.4) + fog-core (~> 1.38) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-azure (0.0.2) + azure (~> 0.6) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + fog-core (1.42.0) + builder + excon (~> 0.49) + formatador (~> 0.2) + fog-google (0.3.2) + fog-core + fog-json + fog-xml + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-local (0.3.0) + fog-core (~> 1.27) + fog-openstack (0.1.7) + fog-core (>= 1.40) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-rackspace (0.1.1) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-xml (0.1.2) + fog-core + nokogiri (~> 1.5, >= 1.5.11) + font-awesome-rails (4.6.3.1) + railties (>= 3.2, < 5.1) + foreman (0.82.0) + thor (~> 0.19.1) + formatador (0.2.5) + fuubar (2.0.0) + rspec (~> 3.0) + ruby-progressbar (~> 1.4) + gemnasium-gitlab-service (0.2.6) + rugged (~> 0.21) + gemojione (2.6.1) + json + get_process_mem (0.2.1) + gherkin-ruby (0.3.2) + github-linguist (4.7.6) + charlock_holmes (~> 0.7.3) + escape_utils (~> 1.1.0) + mime-types (>= 1.19) + rugged (>= 0.23.0b) + github-markup (1.3.3) + gitlab-flowdock-git-hook (1.0.1) + flowdock (~> 0.7) + gitlab-grit (>= 2.4.1) + multi_json + gitlab-grit (2.8.1) + charlock_holmes (~> 0.6) + diff-lcs (~> 1.1) + mime-types (>= 1.16, < 3) + posix-spawn (~> 0.3) + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + gitlab_meta (7.0) + gitlab_omniauth-ldap (1.2.1) + net-ldap (~> 0.9) + omniauth (~> 1.0) + pyu-ruby-sasl (~> 0.0.3.1) + rubyntlm (~> 0.3) + globalid (0.3.6) + activesupport (>= 4.1.0) + gollum-grit_adapter (1.0.1) + gitlab-grit (~> 2.7, >= 2.7.1) + gollum-lib (4.1.0) + github-markup (~> 1.3.3) + gollum-grit_adapter (~> 1.0) + nokogiri (~> 1.6.4) + rouge (~> 1.9) + sanitize (~> 2.1.0) + stringex (~> 2.5.1) + gollum-rugged_adapter (0.4.2) + mime-types (>= 1.15) + rugged (~> 0.24.0, >= 0.21.3) + gon (6.0.1) + actionpack (>= 3.0) + json + multi_json + request_store (>= 1.0) + grape (0.13.0) + activesupport + builder + hashie (>= 2.1.0) + multi_json (>= 1.3.2) + multi_xml (>= 0.5.2) + rack (>= 1.3.0) + rack-accept + rack-mount + virtus (>= 1.0.0) + grape-entity (0.4.8) + activesupport + multi_json (>= 1.3.2) + hamlit (2.5.0) + temple (~> 0.7.6) + thor + tilt + hashie (3.4.4) + health_check (1.5.1) + rails (>= 2.3.0) + hipchat (1.5.3) + httparty + mimemagic + html-pipeline (1.11.0) + activesupport (>= 2) + nokogiri (~> 1.4) + htmlentities (4.3.4) + http_parser.rb (0.5.3) + httparty (0.13.7) + json (~> 1.8) + multi_xml (>= 0.5.2) + httpclient (2.8.0) + i18n (0.7.0) + ice_nine (0.11.2) + influxdb (0.3.5) + cause + json + ipaddress (0.8.3) + jquery-atwho-rails (1.3.2) + jquery-rails (4.1.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) + json (1.8.3) + jwt (1.5.4) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.10.0) + knapsack (1.11.1) + rake + timecop (>= 0.1.0) + launchy (2.4.3) + addressable (~> 2.3) + letter_opener (1.4.1) + launchy (~> 2.2) + letter_opener_web (1.3.0) + actionmailer (>= 3.2) + letter_opener (~> 1.0) + railties (>= 3.2) + license_finder (2.1.2) + bundler + httparty + rubyzip + thor + xml-simple + licensee (8.0.0) + rugged (>= 0.24b) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.0.3) + nokogiri (>= 1.5.9) + macaddr (1.7.1) + systemu (~> 2.6.2) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mail_room (0.8.0) + method_source (0.8.2) + mime-types (2.99.2) + mimemagic (0.3.1) + mini_portile2 (2.1.0) + minitest (5.7.0) + mousetrap-rails (1.4.6) + multi_json (1.12.1) + multi_xml (0.5.5) + multipart-post (2.0.0) + mysql2 (0.3.21) + nested_form (0.3.2) + net-ldap (0.14.0) + net-ssh (3.0.2) + newrelic_rpm (3.16.0.318) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + numerizer (0.1.1) + oauth (0.5.1) + oauth2 (1.0.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (~> 1.2) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) + omniauth (1.3.1) + hashie (>= 1.2, < 4) + rack (>= 1.0, < 3) + omniauth-auth0 (1.4.2) + omniauth-oauth2 (~> 1.1) + omniauth-azure-oauth2 (0.0.6) + jwt (~> 1.0) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-bitbucket (0.0.2) + multi_json (~> 1.7) + omniauth (~> 1.1) + omniauth-oauth (~> 1.0) + omniauth-cas3 (1.1.3) + addressable (~> 2.3) + nokogiri (~> 1.6.6) + omniauth (~> 1.2) + omniauth-facebook (3.0.0) + omniauth-oauth2 (~> 1.2) + omniauth-github (1.1.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-gitlab (1.0.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.0) + omniauth-google-oauth2 (0.2.10) + addressable (~> 2.3) + jwt (~> 1.0) + multi_json (~> 1.3) + omniauth (>= 1.1.1) + omniauth-oauth2 (~> 1.3.1) + omniauth-kerberos (0.3.0) + omniauth-multipassword + timfel-krb5-auth (~> 0.8) + omniauth-multipassword (0.4.2) + omniauth (~> 1.0) + omniauth-oauth (1.1.0) + oauth + omniauth (~> 1.0) + omniauth-oauth2 (1.3.1) + oauth2 (~> 1.0) + omniauth (~> 1.2) + omniauth-saml (1.6.0) + omniauth (~> 1.3) + ruby-saml (~> 1.3) + omniauth-shibboleth (1.2.1) + omniauth (>= 1.0.0) + omniauth-twitter (1.2.1) + json (~> 1.3) + omniauth-oauth (~> 1.1) + omniauth_crowd (2.2.3) + activesupport + nokogiri (>= 1.4.4) + omniauth (~> 1.0) + org-ruby (0.9.12) + rubypants (~> 0.2) + orm_adapter (0.5.0) + paranoia (2.1.5) + activerecord (~> 4.0) + parser (2.3.1.2) + ast (~> 2.2) + path_expander (1.0.0) + pg (0.18.4) + pkg-config (1.1.7) + poltergeist (1.9.0) + capybara (~> 2.1) + cliver (~> 0.3.1) + multi_json (~> 1.0) + websocket-driver (>= 0.2.0) + posix-spawn (0.3.11) + powerpack (0.1.1) + premailer (1.8.7) + css_parser (>= 1.4.5) + htmlentities (>= 4.0.0) + premailer-rails (1.9.4) + actionmailer (>= 3, < 6) + premailer (~> 1.7, >= 1.7.9) + pry (0.10.3) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.4) + pry (>= 0.9.10) + pyu-ruby-sasl (0.0.3.3) + rack (1.6.4) + rack-accept (0.4.5) + rack (>= 0.4) + rack-attack (4.3.1) + rack + rack-cors (0.4.0) + rack-mount (0.8.3) + rack (>= 1.0.0) + rack-oauth2 (1.2.3) + activesupport (>= 2.3) + attr_required (>= 0.0.5) + httpclient (>= 2.4) + multi_json (>= 1.3.6) + rack (>= 1.1) + rack-protection (1.5.3) + rack + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.6) + actionmailer (= 4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + activemodel (= 4.2.6) + activerecord (= 4.2.6) + activesupport (= 4.2.6) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.6) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (4.2.6) + actionpack (= 4.2.6) + activesupport (= 4.2.6) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rainbow (2.1.0) + raindrops (0.16.0) + rake (10.5.0) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + rblineprof (0.3.6) + debugger-ruby_core_source (~> 1.3) + rdoc (3.12.2) + json (~> 1.4) + recaptcha (3.3.0) + json + redcarpet (3.3.4) + redis (3.3.0) + redis-actionpack (4.0.1) + actionpack (~> 4) + redis-rack (~> 1.5.0) + redis-store (~> 1.1.0) + redis-activesupport (4.1.5) + activesupport (>= 3, < 5) + redis-store (~> 1.1.0) + redis-namespace (1.5.2) + redis (~> 3.0, >= 3.0.4) + redis-rack (1.5.0) + rack (~> 1.5) + redis-store (~> 1.1.0) + redis-rails (4.0.0) + redis-actionpack (~> 4) + redis-activesupport (~> 4) + redis-store (~> 1.1.0) + redis-store (1.1.7) + redis (>= 2.2) + request_store (1.3.1) + rerun (0.11.0) + listen (~> 3.0) + responders (2.2.0) + railties (>= 4.2.0, < 5.1) + rinku (2.0.0) + rotp (2.1.2) + rouge (1.11.1) + rqrcode (0.10.1) + chunky_png (~> 1.0) + rqrcode-rails3 (0.1.7) + rqrcode (>= 0.4.2) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.1) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-retry (0.4.5) + rspec-core + rspec-support (3.5.0) + rubocop (0.40.0) + parser (>= 2.3.1.0, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + rubocop-rspec (1.5.0) + rubocop (>= 0.40.0) + ruby-fogbugz (0.2.1) + crack (~> 0.4) + ruby-progressbar (1.8.1) + ruby-saml (1.3.0) + nokogiri (>= 1.5.10) + ruby_dep (1.3.1) + ruby_parser (3.8.2) + sexp_processor (~> 4.1) + rubyntlm (0.6.0) + rubypants (0.2.0) + rubyzip (1.2.0) + rufus-scheduler (3.2.1) + rugged (0.24.0) + safe_yaml (1.0.4) + sanitize (2.1.0) + nokogiri (>= 1.4.4) + sass (3.4.22) + sass-rails (5.0.5) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) + faraday (~> 0.8, < 0.10) + scss_lint (0.47.1) + rake (>= 0.9, < 11) + sass (~> 3.4.15) + sdoc (0.3.20) + json (>= 1.1.3) + rdoc (~> 3.10) + seed-fu (2.3.6) + activerecord (>= 3.1) + activesupport (>= 3.1) + select2-rails (3.5.10) + thor (~> 0.14) + sentry-raven (1.1.0) + faraday (>= 0.7.6) + settingslogic (2.0.9) + sexp_processor (4.7.0) + sham_rack (1.3.6) + rack + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + sidekiq (4.1.4) + concurrent-ruby (~> 1.0) + connection_pool (~> 2.2, >= 2.2.0) + redis (~> 3.2, >= 3.2.1) + sinatra (>= 1.4.7) + sidekiq-cron (0.4.2) + redis-namespace (>= 1.5.2) + rufus-scheduler (>= 2.0.24) + sidekiq (>= 4.0.0) + simple_oauth (0.1.9) + simplecov (0.11.2) + docile (~> 1.1.0) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + sinatra (1.4.7) + rack (~> 1.5) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + six (0.2.0) + slack-notifier (1.2.1) + slop (3.6.0) + spinach (0.8.10) + colorize + gherkin-ruby (>= 0.3.2) + json + spinach-rails (0.2.1) + capybara (>= 2.0.0) + railties (>= 3) + spinach (>= 0.4) + spinach-rerun-reporter (0.0.2) + spinach (~> 0.8) + spring (1.7.2) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) + spring-commands-spinach (1.1.0) + spring (>= 0.9.1) + spring-commands-teaspoon (0.0.2) + spring (>= 0.9.1) + sprockets (3.6.3) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.1.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + state_machines (0.4.0) + state_machines-activemodel (0.4.0) + activemodel (>= 4.1, < 5.1) + state_machines (>= 0.4.0) + state_machines-activerecord (0.4.0) + activerecord (>= 4.1, < 5.1) + state_machines-activemodel (>= 0.3.0) + stringex (2.5.2) + sys-filesystem (1.1.6) + ffi + systemu (2.6.5) + task_list (1.0.2) + html-pipeline + teaspoon (1.1.5) + railties (>= 3.2.5, < 6) + teaspoon-jasmine (2.2.0) + teaspoon (>= 1.0.0) + temple (0.7.7) + test_after_commit (0.4.2) + activerecord (>= 3.2) + thin (1.7.0) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.5) + timecop (0.8.1) + timfel-krb5-auth (0.8.3) + tinder (1.10.1) + eventmachine (~> 1.0) + faraday (~> 0.9.0) + faraday_middleware (~> 0.9) + hashie (>= 1.0) + json (~> 1.8.0) + mime-types + multi_json (~> 1.7) + twitter-stream (~> 0.1) + turbolinks (2.5.3) + coffee-rails + twitter-stream (0.1.16) + eventmachine (>= 0.12.8) + http_parser.rb (~> 0.5.1) + simple_oauth (~> 0.1.4) + tzinfo (1.2.2) + thread_safe (~> 0.1) + u2f (0.2.1) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + underscore-rails (1.8.3) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + unicode-display_width (1.1.0) + unicorn (4.9.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + unicorn-worker-killer (0.4.4) + get_process_mem (~> 0) + unicorn (>= 4, < 6) + uniform_notifier (1.10.0) + uuid (2.3.8) + macaddr (~> 1.0) + version_sorter (2.0.0) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + vmstat (2.1.0) + warden (1.2.6) + rack (>= 1.0) + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + webmock (1.21.0) + addressable (>= 2.3.6) + crack (>= 0.3.2) + websocket-driver (0.6.4) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + wikicloth (0.8.1) + builder + expression_parser + rinku + xml-simple (1.1.5) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth (~> 4.3.2) + ace-rails-ap (~> 4.0.2) + activerecord-session_store (~> 1.0.0) + acts-as-taggable-on (~> 3.4) + addressable (~> 2.3.8) + after_commit_queue + akismet (~> 2.0) + allocations (~> 1.0) + asana (~> 0.4.0) + asciidoctor (~> 1.5.2) + attr_encrypted (~> 3.0.0) + awesome_print (~> 1.2.0) + babosa (~> 1.0.2) + base32 (~> 0.3.0) + benchmark-ips + better_errors (~> 1.0.1) + binding_of_caller (~> 0.7.2) + bootstrap-sass (~> 3.3.0) + brakeman (~> 3.3.0) + browser (~> 2.2) + bullet + bundler-audit + byebug + capybara (~> 2.6.2) + capybara-screenshot (~> 1.0.0) + carrierwave (~> 0.10.0) + charlock_holmes (~> 0.7.3) + chronic_duration (~> 0.10.6) + coffee-rails (~> 4.1.0) + connection_pool (~> 2.0) + creole (~> 0.5.0) + d3_rails (~> 3.5.0) + database_cleaner (~> 1.4.0) + default_value_for (~> 3.0.0) + devise (~> 4.0) + devise-two-factor (~> 3.0.0) + diffy (~> 3.0.3) + doorkeeper (~> 4.0) + dropzonejs-rails (~> 0.7.1) + email_reply_parser (~> 0.5.8) + email_spec (~> 1.6.0) + factory_girl_rails (~> 4.6.0) + ffaker (~> 2.0.0) + flay + flog + fog-aws (~> 0.9) + fog-azure (~> 0.0) + fog-core (~> 1.40) + fog-google (~> 0.3) + fog-local (~> 0.3) + fog-openstack (~> 0.1) + fog-rackspace (~> 0.1.1) + font-awesome-rails (~> 4.6.1) + foreman + fuubar (~> 2.0.0) + gemnasium-gitlab-service (~> 0.2) + gemojione (~> 2.6) + github-linguist (~> 4.7.0) + github-markup (~> 1.3.1) + gitlab-flowdock-git-hook (~> 1.0.1) + gitlab_git (~> 10.2) + gitlab_meta (= 7.0) + gitlab_omniauth-ldap (~> 1.2.1) + gollum-lib (~> 4.1.0) + gollum-rugged_adapter (~> 0.4.2) + gon (~> 6.0.1) + grape (~> 0.13.0) + grape-entity (~> 0.4.2) + hamlit (~> 2.5) + health_check (~> 1.5.1) + hipchat (~> 1.5.0) + html-pipeline (~> 1.11.0) + httparty (~> 0.13.3) + influxdb (~> 0.2) + jquery-atwho-rails (~> 1.3.2) + jquery-rails (~> 4.1.0) + jquery-turbolinks (~> 2.1.0) + jquery-ui-rails (~> 5.0.0) + jwt + kaminari (~> 0.17.0) + knapsack + letter_opener_web (~> 1.3.0) + license_finder + licensee (~> 8.0.0) + loofah (~> 2.0.3) + mail_room (~> 0.8) + method_source (~> 0.8) + minitest (~> 5.7.0) + mousetrap-rails (~> 1.4.6) + mysql2 (~> 0.3.16) + nested_form (~> 0.3.2) + net-ssh (~> 3.0.1) + newrelic_rpm (~> 3.14) + nokogiri (~> 1.6.7, >= 1.6.7.2) + oauth2 (~> 1.0.0) + octokit (~> 4.3.0) + omniauth (~> 1.3.1) + omniauth-auth0 (~> 1.4.1) + omniauth-azure-oauth2 (~> 0.0.6) + omniauth-bitbucket (~> 0.0.2) + omniauth-cas3 (~> 1.1.2) + omniauth-facebook (~> 3.0.0) + omniauth-github (~> 1.1.1) + omniauth-gitlab (~> 1.0.0) + omniauth-google-oauth2 (~> 0.2.0) + omniauth-kerberos (~> 0.3.0) + omniauth-saml (~> 1.6.0) + omniauth-shibboleth (~> 1.2.0) + omniauth-twitter (~> 1.2.0) + omniauth_crowd (~> 2.2.0) + org-ruby (~> 0.9.12) + paranoia (~> 2.0) + pg (~> 0.18.2) + poltergeist (~> 1.9.0) + premailer-rails (~> 1.9.0) + pry-rails + rack-attack (~> 4.3.1) + rack-cors (~> 0.4.0) + rack-oauth2 (~> 1.2.1) + rails (= 4.2.6) + rails-deprecated_sanitizer (~> 1.0.3) + rainbow (~> 2.1.0) + rblineprof + rdoc (~> 3.6) + recaptcha (~> 3.0) + redcarpet (~> 3.3.3) + redis (~> 3.2) + redis-namespace + redis-rails (~> 4.0.0) + request_store (~> 1.3.0) + rerun (~> 0.11.0) + responders (~> 2.0) + rouge (~> 1.11) + rqrcode-rails3 (~> 0.1.7) + rspec-rails (~> 3.5.0) + rspec-retry + rubocop (~> 0.40.0) + rubocop-rspec (~> 1.5.0) + ruby-fogbugz (~> 0.2.1) + sanitize (~> 2.0) + sass-rails (~> 5.0.0) + scss_lint (~> 0.47.0) + sdoc (~> 0.3.20) + seed-fu (~> 2.3.5) + select2-rails (~> 3.5.9) + sentry-raven (~> 1.1.0) + settingslogic (~> 2.0.9) + sham_rack + shoulda-matchers (~> 2.8.0) + sidekiq (~> 4.0) + sidekiq-cron (~> 0.4.0) + simplecov (~> 0.11.0) + sinatra (~> 1.4.4) + six (~> 0.2.0) + slack-notifier (~> 1.2.0) + spinach-rails (~> 0.2.1) + spinach-rerun-reporter (~> 0.0.2) + spring (~> 1.7.0) + spring-commands-rspec (~> 1.0.4) + spring-commands-spinach (~> 1.1.0) + spring-commands-teaspoon (~> 0.0.2) + sprockets (~> 3.6.0) + state_machines-activerecord (~> 0.4.0) + sys-filesystem (~> 1.1.6) + task_list (~> 1.0.2) + teaspoon (~> 1.1.0) + teaspoon-jasmine (~> 2.2.0) + test_after_commit (~> 0.4.2) + thin (~> 1.7.0) + tinder (~> 1.10.0) + turbolinks (~> 2.5.0) + u2f (~> 0.2.1) + uglifier (~> 2.7.2) + underscore-rails (~> 1.8.0) + unf (~> 0.1.4) + unicorn (~> 4.9.0) + unicorn-worker-killer (~> 0.4.2) + version_sorter (~> 2.0.0) + virtus (~> 1.0.1) + vmstat (~> 2.1.0) + web-console (~> 2.0) + webmock (~> 1.21.0) + wikicloth (= 0.8.1) + +BUNDLED WITH + 1.12.5 -- cgit v1.2.1 From 50613fc6d313bd08ef5c1499739863a45a2a9d32 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 00549265e9e..8fc24668b42 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -52,6 +52,7 @@ class Projects::BlobController < Projects::ApplicationController @previous_path = @path @path = params[:file_name] end + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From 10954f93e9ca9a54d85228dddaeb0f4aaef25753 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/projects/blob_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 8fc24668b42..00549265e9e 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -52,7 +52,6 @@ class Projects::BlobController < Projects::ApplicationController @previous_path = @path @path = params[:file_name] end - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From f85834bc9622abcac44152348d6af3bed270110a Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/controllers/projects/blob_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 00549265e9e..8fc24668b42 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -52,6 +52,7 @@ class Projects::BlobController < Projects::ApplicationController @previous_path = @path @path = params[:file_name] end + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From d9561118e8a2ab5f2a5543e2c8ef3bfb6a3505c9 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 8fc24668b42..00549265e9e 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -52,7 +52,6 @@ class Projects::BlobController < Projects::ApplicationController @previous_path = @path @path = params[:file_name] end - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From 09194eebff2154d22ee6ae5a63ff5dea03cbfe73 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/controllers/projects/blob_controller.rb | 1 + app/services/files/base_service.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 00549265e9e..8fc24668b42 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -52,6 +52,7 @@ class Projects::BlobController < Projects::ApplicationController @previous_path = @path @path = params[:file_name] end + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 9d411f47c6b324d05686ee8cb819f03dde2b9302 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From fba72e1e0c80e1c799cb41105458c27dda813fcd Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/controllers/projects/blob_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 8fc24668b42..00549265e9e 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -52,7 +52,6 @@ class Projects::BlobController < Projects::ApplicationController @previous_path = @path @path = params[:file_name] end - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From b0ce99f5b0774be7d55c68083c5bdb609e99b776 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/controllers/projects/blob_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 00549265e9e..8fc24668b42 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -52,6 +52,7 @@ class Projects::BlobController < Projects::ApplicationController @previous_path = @path @path = params[:file_name] end + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From 1be09264755410511772b07a455b929b000958cf Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 66468bd73385b31b3a4380c85264dfbe06542d79 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From a50322679c8aec2858992aeac558f857c98ae28e Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 16:46:37 +0100 Subject: refactors blob_controller --- Gemfile | 2 +- Gemfile.lock | 20 ++++++++++++++++---- app/controllers/concerns/creates_commit.rb | 8 ++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index cbcd9f20ace..1fc1be9e272 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2' +gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 8809edb0fc9..57f2b056c86 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,12 @@ +PATH + remote: ~/src/Gitlab/gitlab_git + specs: + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + GEM remote: https://rubygems.org/ specs: @@ -277,10 +286,8 @@ GEM mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) gitlab_git (10.3.0) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) + gitlab_emoji (0.3.1) + gemojione (~> 2.2, >= 2.2.1) gitlab_meta (7.0) gitlab_omniauth-ldap (1.2.1) net-ldap (~> 0.9) @@ -392,7 +399,12 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) +<<<<<<< 66468bd73385b31b3a4380c85264dfbe06542d79 mimemagic (0.3.1) +======= + mime-types-data (3.2016.0521) + mimemagic (0.3.0) +>>>>>>> refactors blob_controller mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a3731b45df0 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,8 +12,16 @@ module CreatesCommit previous_path: @previous_path ) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + result = service.new(@tree_edit_project, current_user, commit_params).execute + puts "#" * 30 + puts result[:status] + puts "#" * 30 + if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From 6e40f5ba88b26a7771c6995c9db3b794fca9349c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 3ca21b0aa6b009463f074bee47b5fad894291a22 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From a343c0e697735eb0f47ad9b13088301c4fdcfe2c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index 538d91a77d7..01a6bbb5110 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -739,15 +739,31 @@ class Repository options[:author] = committer options[:commit] = { message: message, +<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 branch: ref } +======= + branch: ref, + } + + if previous_path + options[:file] = { + path: previous_path + } + + + Gitlab::Git::Blob.remove(raw_repository, options) + end + +>>>>>>> creates the update_file method in repository.rb and applies changes accordingly options[:file] = { content: content, path: path, update: true } +<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 if previous_path options[:file][:previous_path] = previous_path -- cgit v1.2.1 From 2313b09bffac0d75b3c58571cd2eed8c5996ca20 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 5 Jul 2016 09:46:48 +0100 Subject: removes debugging prints from code --- Gemfile | 2 +- Gemfile.lock | 11 ++++------- app/controllers/concerns/creates_commit.rb | 8 -------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 1fc1be9e272..cce820fb53a 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 57f2b056c86..cca04efd660 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,7 @@ -PATH - remote: ~/src/Gitlab/gitlab_git +GIT + remote: git@gitlab.com:gitlab-org/gitlab_git.git + revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + branch: commit-blob-rename-action specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -399,12 +401,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) -<<<<<<< 66468bd73385b31b3a4380c85264dfbe06542d79 - mimemagic (0.3.1) -======= - mime-types-data (3.2016.0521) mimemagic (0.3.0) ->>>>>>> refactors blob_controller mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From e7832d014a5eb4330f8568935345df844d3ee346 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:25:45 +0100 Subject: refactors to pass values as arguments through options --- app/models/repository.rb | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 01a6bbb5110..5f5634aafa2 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -734,42 +734,25 @@ class Repository def update_file(user, path, content, branch:, previous_path:, message:) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - options = {} - options[:committer] = committer - options[:author] = committer - options[:commit] = { - message: message, -<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 + commit_options = {} + commit_options[:committer] = committer + commit_options[:author] = committer + commit_options[:commit] = { + message: options[:message], branch: ref } -======= - branch: ref, - } - - if previous_path - options[:file] = { - path: previous_path - } - - - Gitlab::Git::Blob.remove(raw_repository, options) - end - ->>>>>>> creates the update_file method in repository.rb and applies changes accordingly - options[:file] = { + commit_options[:file] = { content: content, path: path, update: true } -<<<<<<< 3824e8e1c4315bb3d1b2c1389f442d3b5e94f945 if previous_path options[:file][:previous_path] = previous_path - - Gitlab::Git::Blob.rename(raw_repository, options) + Gitlab::Git::Blob.rename(raw_repository, commit_options) else - Gitlab::Git::Blob.commit(raw_repository, options) + Gitlab::Git::Blob.commit(raw_repository, commit_options) end end end -- cgit v1.2.1 From e182b85029524376d84a04e10730953a5be9e46b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 13:51:28 +0100 Subject: fixes issues for mr acceptance --- app/models/repository.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index 5f5634aafa2..990e2b30580 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -750,6 +750,7 @@ class Repository if previous_path options[:file][:previous_path] = previous_path + Gitlab::Git::Blob.rename(raw_repository, commit_options) else Gitlab::Git::Blob.commit(raw_repository, commit_options) -- cgit v1.2.1 From 4b8ae8f5975f2a88d700fe3d8fcad7e5e960d28e Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/views/projects/blob/_editor.html.haml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index ad3009f30ab..8a22e912624 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -7,7 +7,6 @@ - if current_action?(:edit) || current_action?(:update) = text_field_tag 'file_name', (params[:file_name] || @path), class: 'form-control new-file-name' - - if current_action?(:new) || current_action?(:create) %span.editor-file-name \/ -- cgit v1.2.1 From 278e3d08f4a39f7d1c9da256fafc9784e25b8d23 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 66dff311a86c7176dc744f5356f4148cc5de5cea Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From fa2f367a78ca802707cf464c2423fe64b8728be3 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From ef90b278e9840af412256b65d6caf402f99a9c36 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From da514fb9b5acdbd7a1b9f126909d30fe8dc1c53b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 990e2b30580..5f5634aafa2 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -750,7 +750,6 @@ class Repository if previous_path options[:file][:previous_path] = previous_path - Gitlab::Git::Blob.rename(raw_repository, commit_options) else Gitlab::Git::Blob.commit(raw_repository, commit_options) -- cgit v1.2.1 From 73c9e9e261bcb0a6cdeab23260301c1453facb73 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 16:32:56 +0100 Subject: implements the form for renaming the new filename on the file edit page --- app/services/files/update_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index 8d2b5083179..c2af9b855b1 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -7,6 +7,7 @@ module Files branch: @target_branch, previous_path: @previous_path, message: @commit_message) + end end end -- cgit v1.2.1 From 542b0b0e3af9b04c690b14aaecd7fac6ea5554b7 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 9ee35e13f399bc9a6cc546cca0eed2572bbacfad Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From df3d1c1fb977153aae5cab4f97a322ef6236c4d1 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 16:46:37 +0100 Subject: refactors blob_controller --- Gemfile | 2 +- Gemfile.lock | 13 +++++++++---- app/controllers/concerns/creates_commit.rb | 8 ++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index cce820fb53a..1fc1be9e272 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" +gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index cca04efd660..630e947e8b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,5 @@ -GIT - remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 - branch: commit-blob-rename-action +PATH + remote: ~/src/Gitlab/gitlab_git specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -288,6 +286,11 @@ GEM mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) gitlab_git (10.3.0) + gitlab_git (10.2.3) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) gitlab_emoji (0.3.1) gemojione (~> 2.2, >= 2.2.1) gitlab_meta (7.0) @@ -401,6 +404,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) + mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) @@ -876,6 +880,7 @@ DEPENDENCIES github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) gitlab_git (~> 10.2) + gitlab_emoji (~> 0.3.0) gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a3731b45df0 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,8 +12,16 @@ module CreatesCommit previous_path: @previous_path ) + puts "#" * 10 + puts @previous_path + puts "#" * 10 + result = service.new(@tree_edit_project, current_user, commit_params).execute + puts "#" * 30 + puts result[:status] + puts "#" * 30 + if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From 5cb5309a4dab70e3b85640f125b1b70d5c8e3805 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:46:37 +0100 Subject: successfully adds the new version with the updated name on the projects repo --- app/services/files/base_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index c8e66555c82..7719c1819ec 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,6 +16,8 @@ module Files params[:file_content] end + puts @file_path + # Validate parameters validate -- cgit v1.2.1 From 50dd8063909903f7965b9c9e11c0a0a0b0e9813b Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 1 Jul 2016 17:53:05 +0100 Subject: remove prints and useless comments --- app/services/files/base_service.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 7719c1819ec..c8e66555c82 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -16,8 +16,6 @@ module Files params[:file_content] end - puts @file_path - # Validate parameters validate -- cgit v1.2.1 From da7dc3864f86b56219b9ec46f584ce05b327611f Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 4 Jul 2016 11:32:57 +0100 Subject: creates the update_file method in repository.rb and applies changes accordingly --- app/models/repository.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index 5f5634aafa2..990e2b30580 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -750,6 +750,7 @@ class Repository if previous_path options[:file][:previous_path] = previous_path + Gitlab::Git::Blob.rename(raw_repository, commit_options) else Gitlab::Git::Blob.commit(raw_repository, commit_options) -- cgit v1.2.1 From 3beb55c659bc4f24c1cd34ed1b56925d528e7256 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 5 Jul 2016 09:46:48 +0100 Subject: removes debugging prints from code --- Gemfile | 2 +- Gemfile.lock | 7 ++++--- app/controllers/concerns/creates_commit.rb | 8 -------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 1fc1be9e272..cce820fb53a 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 630e947e8b0..f70fcae5ff2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,7 @@ -PATH - remote: ~/src/Gitlab/gitlab_git +GIT + remote: git@gitlab.com:gitlab-org/gitlab_git.git + revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + branch: commit-blob-rename-action specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -404,7 +406,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0..036805306f2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) -- cgit v1.2.1 From 66c9a2db629e034db72aba939d71ca57be2984d7 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 11:25:45 +0100 Subject: refactors to pass values as arguments through options --- app/services/files/update_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index c2af9b855b1..aaac3da9355 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -8,6 +8,7 @@ module Files previous_path: @previous_path, message: @commit_message) + end end end -- cgit v1.2.1 From f2df78d17977c1e082d6e78dda1ba98e62097ebd Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 13:51:28 +0100 Subject: fixes issues for mr acceptance --- app/models/repository.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 990e2b30580..5f5634aafa2 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -750,7 +750,6 @@ class Repository if previous_path options[:file][:previous_path] = previous_path - Gitlab::Git::Blob.rename(raw_repository, commit_options) else Gitlab::Git::Blob.commit(raw_repository, commit_options) -- cgit v1.2.1 From 161ab6d618c7b674a1606ef79d2756b9274e59d6 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 14:35:56 +0100 Subject: fixes merge conflicts for Gemfile.lock --- Gemfile.lock | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f70fcae5ff2..a86612509ae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + revision: cfb423fb576590525c4a978bc21cc98917c3334c branch: commit-blob-rename-action specs: gitlab_git (10.3.0) @@ -210,7 +210,11 @@ GEM faraday_middleware multi_json ffaker (2.0.0) +<<<<<<< f2df78d17977c1e082d6e78dda1ba98e62097ebd ffi (1.9.13) +======= + ffi (1.9.12) +>>>>>>> fixes merge conflicts for Gemfile.lock flay (2.8.0) erubis (~> 2.7.0) path_expander (~> 1.0) @@ -287,7 +291,6 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.3.0) gitlab_git (10.2.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) @@ -406,7 +409,8 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mimemagic (0.3.0) + mime-types-data (3.2016.0521) + mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) @@ -422,8 +426,18 @@ GEM mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) numerizer (0.1.1) +<<<<<<< f2df78d17977c1e082d6e78dda1ba98e62097ebd + oauth (0.5.1) + oauth2 (1.0.0) +======= +<<<<<<< e36858231db42f64fb69af7d74f3ec6a898d8a70 + oauth (0.4.7) + oauth2 (1.2.0) +======= oauth (0.5.1) oauth2 (1.0.0) +>>>>>>> fixes merge conflicts for Gemfile.lock +>>>>>>> fixes merge conflicts for Gemfile.lock faraday (>= 0.8, < 0.10) jwt (~> 1.0) multi_json (~> 1.3) @@ -880,8 +894,12 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.3.1) gitlab-flowdock-git-hook (~> 1.0.1) +<<<<<<< e36858231db42f64fb69af7d74f3ec6a898d8a70 gitlab_git (~> 10.2) gitlab_emoji (~> 0.3.0) +======= + gitlab_git (~> 10.2)! +>>>>>>> fixes merge conflicts for Gemfile.lock gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.1.0) @@ -1006,4 +1024,4 @@ DEPENDENCIES wikicloth (= 0.8.1) BUNDLED WITH - 1.12.5 + 1.10.6 -- cgit v1.2.1 From 4deab9a5406cadcdb16870f81dea1a6f41787af3 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 18:36:22 +0100 Subject: fixes merge request edit bug where it would generate a cloned file and not remove the previous one --- Gemfile.lock | 1 - app/controllers/projects/blob_controller.rb | 5 ----- 2 files changed, 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a86612509ae..efd15fa1d93 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -409,7 +409,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 8fc24668b42..091b661a09f 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -48,11 +48,6 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - unless params[:file_name].empty? - @previous_path = @path - @path = params[:file_name] - end - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end -- cgit v1.2.1 From 4025c7f099c6ad4de832567443dce4e39d543e76 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 6 Jul 2016 18:51:02 +0100 Subject: fixes more issues for MR acceptance --- app/models/repository.rb | 16 ++++++++-------- app/services/files/update_service.rb | 2 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 5f5634aafa2..affd21de924 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -734,15 +734,15 @@ class Repository def update_file(user, path, content, branch:, previous_path:, message:) commit_with_hooks(user, branch) do |ref| committer = user_to_committer(user) - commit_options = {} - commit_options[:committer] = committer - commit_options[:author] = committer - commit_options[:commit] = { - message: options[:message], + options = {} + options[:committer] = committer + options[:author] = committer + options[:commit] = { + message: message, branch: ref } - commit_options[:file] = { + options[:file] = { content: content, path: path, update: true @@ -750,9 +750,9 @@ class Repository if previous_path options[:file][:previous_path] = previous_path - Gitlab::Git::Blob.rename(raw_repository, commit_options) + Gitlab::Git::Blob.rename(raw_repository, options) else - Gitlab::Git::Blob.commit(raw_repository, commit_options) + Gitlab::Git::Blob.commit(raw_repository, options) end end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index aaac3da9355..8d2b5083179 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -7,8 +7,6 @@ module Files branch: @target_branch, previous_path: @previous_path, message: @commit_message) - - end end end -- cgit v1.2.1 From 7a48fb129ae0e12ab101f85a949577046e4e4b6c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 11:07:04 +0100 Subject: removes the git path for the gitlab_git gem corresponding to this MR dependency --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index cce820fb53a..cbcd9f20ace 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" +gem "gitlab_git", '~> 10.2' # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes -- cgit v1.2.1 From dc88ae248d7e24f4f3e39154f9b2cfbeae19961c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 11:07:33 +0100 Subject: removes Gemfile.lock --- Gemfile.lock | 1026 ---------------------------------------------------------- 1 file changed, 1026 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index efd15fa1d93..00000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,1026 +0,0 @@ -GIT - remote: git@gitlab.com:gitlab-org/gitlab_git.git - revision: cfb423fb576590525c4a978bc21cc98917c3334c - branch: commit-blob-rename-action - specs: - gitlab_git (10.3.0) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) - -GEM - remote: https://rubygems.org/ - specs: - RedCloth (4.3.2) - ace-rails-ap (4.0.2) - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) - globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) - arel (~> 6.0) - activerecord-session_store (1.0.0) - actionpack (>= 4.0, < 5.1) - activerecord (>= 4.0, < 5.1) - multi_json (~> 1.11, >= 1.11.2) - rack (>= 1.5.2, < 3) - railties (>= 4.0, < 5.1) - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - acts-as-taggable-on (3.5.0) - activerecord (>= 3.2, < 5) - addressable (2.3.8) - after_commit_queue (1.3.0) - activerecord (>= 3.0) - akismet (2.0.0) - allocations (1.0.5) - arel (6.0.3) - asana (0.4.0) - faraday (~> 0.9) - faraday_middleware (~> 0.9) - faraday_middleware-multi_json (~> 0.0) - oauth2 (~> 1.0) - asciidoctor (1.5.4) - ast (2.3.0) - attr_encrypted (3.0.1) - encryptor (~> 3.0.0) - attr_required (1.0.1) - autoprefixer-rails (6.3.7) - execjs - awesome_print (1.2.0) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - azure (0.7.5) - addressable (~> 2.3) - azure-core (~> 0.1) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - json (~> 1.8) - mime-types (>= 1, < 3.0) - nokogiri (~> 1.6) - systemu (~> 2.6) - thor (~> 0.19) - uuid (~> 2.0) - azure-core (0.1.2) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - nokogiri (~> 1.6) - babosa (1.0.2) - base32 (0.3.2) - bcrypt (3.1.11) - benchmark-ips (2.6.1) - better_errors (1.0.1) - coderay (>= 1.0.0) - erubis (>= 2.6.6) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - bootstrap-sass (3.3.6) - autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) - brakeman (3.3.2) - browser (2.2.0) - builder (3.2.2) - bullet (5.1.1) - activesupport (>= 3.0.0) - uniform_notifier (~> 1.10.0) - bundler-audit (0.5.0) - bundler (~> 1.2) - thor (~> 0.18) - byebug (9.0.5) - capybara (2.6.2) - addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - capybara-screenshot (1.0.13) - capybara (>= 1.0, < 3) - launchy - carrierwave (0.10.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) - json (>= 1.7) - mime-types (>= 1.16) - cause (0.1) - charlock_holmes (0.7.3) - chronic_duration (0.10.6) - numerizer (~> 0.1.1) - chunky_png (1.3.6) - cliver (0.3.2) - coderay (1.1.1) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (4.1.1) - coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.1.x) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - colorize (0.8.1) - concurrent-ruby (1.0.2) - connection_pool (2.2.0) - crack (0.4.3) - safe_yaml (~> 1.0.0) - creole (0.5.0) - css_parser (1.4.5) - addressable - d3_rails (3.5.16) - railties (>= 3.1.0) - daemons (1.2.3) - database_cleaner (1.4.1) - debug_inspector (0.0.2) - debugger-ruby_core_source (1.3.8) - default_value_for (3.0.1) - activerecord (>= 3.2.0, < 5.0) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.0) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) - responders - warden (~> 1.2.3) - devise-two-factor (3.0.0) - activesupport - attr_encrypted (>= 1.3, < 4, != 2) - devise (~> 4.0) - railties - rotp (~> 2.0) - diff-lcs (1.2.5) - diffy (3.0.7) - docile (1.1.5) - doorkeeper (4.0.0) - railties (>= 4.2) - dropzonejs-rails (0.7.3) - rails (> 3.1) - email_reply_parser (0.5.8) - email_spec (1.6.0) - launchy (~> 2.1) - mail (~> 2.2) - encryptor (3.0.0) - equalizer (0.0.11) - erubis (2.7.0) - escape_utils (1.1.1) - eventmachine (1.2.0.1) - excon (0.50.1) - execjs (2.7.0) - expression_parser (0.9.0) - factory_girl (4.5.0) - activesupport (>= 3.0.0) - factory_girl_rails (4.6.0) - factory_girl (~> 4.5.0) - railties (>= 3.0.0) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - faraday_middleware-multi_json (0.0.6) - faraday_middleware - multi_json - ffaker (2.0.0) -<<<<<<< f2df78d17977c1e082d6e78dda1ba98e62097ebd - ffi (1.9.13) -======= - ffi (1.9.12) ->>>>>>> fixes merge conflicts for Gemfile.lock - flay (2.8.0) - erubis (~> 2.7.0) - path_expander (~> 1.0) - ruby_parser (~> 3.0) - sexp_processor (~> 4.0) - flog (4.4.0) - path_expander (~> 1.0) - ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.4) - flowdock (0.7.1) - httparty (~> 0.7) - multi_json - fog-aws (0.9.4) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-azure (0.0.2) - azure (~> 0.6) - fog-core (~> 1.27) - fog-json (~> 1.0) - fog-xml (~> 0.1) - fog-core (1.42.0) - builder - excon (~> 0.49) - formatador (~> 0.2) - fog-google (0.3.2) - fog-core - fog-json - fog-xml - fog-json (1.0.2) - fog-core (~> 1.0) - multi_json (~> 1.10) - fog-local (0.3.0) - fog-core (~> 1.27) - fog-openstack (0.1.7) - fog-core (>= 1.40) - fog-json (>= 1.0) - ipaddress (>= 0.8) - fog-rackspace (0.1.1) - fog-core (>= 1.35) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.8) - fog-xml (0.1.2) - fog-core - nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.3.1) - railties (>= 3.2, < 5.1) - foreman (0.82.0) - thor (~> 0.19.1) - formatador (0.2.5) - fuubar (2.0.0) - rspec (~> 3.0) - ruby-progressbar (~> 1.4) - gemnasium-gitlab-service (0.2.6) - rugged (~> 0.21) - gemojione (2.6.1) - json - get_process_mem (0.2.1) - gherkin-ruby (0.3.2) - github-linguist (4.7.6) - charlock_holmes (~> 0.7.3) - escape_utils (~> 1.1.0) - mime-types (>= 1.19) - rugged (>= 0.23.0b) - github-markup (1.3.3) - gitlab-flowdock-git-hook (1.0.1) - flowdock (~> 0.7) - gitlab-grit (>= 2.4.1) - multi_json - gitlab-grit (2.8.1) - charlock_holmes (~> 0.6) - diff-lcs (~> 1.1) - mime-types (>= 1.16, < 3) - posix-spawn (~> 0.3) - gitlab_git (10.2.3) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) - gitlab_emoji (0.3.1) - gemojione (~> 2.2, >= 2.2.1) - gitlab_meta (7.0) - gitlab_omniauth-ldap (1.2.1) - net-ldap (~> 0.9) - omniauth (~> 1.0) - pyu-ruby-sasl (~> 0.0.3.1) - rubyntlm (~> 0.3) - globalid (0.3.6) - activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.1) - gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.1.0) - github-markup (~> 1.3.3) - gollum-grit_adapter (~> 1.0) - nokogiri (~> 1.6.4) - rouge (~> 1.9) - sanitize (~> 2.1.0) - stringex (~> 2.5.1) - gollum-rugged_adapter (0.4.2) - mime-types (>= 1.15) - rugged (~> 0.24.0, >= 0.21.3) - gon (6.0.1) - actionpack (>= 3.0) - json - multi_json - request_store (>= 1.0) - grape (0.13.0) - activesupport - builder - hashie (>= 2.1.0) - multi_json (>= 1.3.2) - multi_xml (>= 0.5.2) - rack (>= 1.3.0) - rack-accept - rack-mount - virtus (>= 1.0.0) - grape-entity (0.4.8) - activesupport - multi_json (>= 1.3.2) - hamlit (2.5.0) - temple (~> 0.7.6) - thor - tilt - hashie (3.4.4) - health_check (1.5.1) - rails (>= 2.3.0) - hipchat (1.5.3) - httparty - mimemagic - html-pipeline (1.11.0) - activesupport (>= 2) - nokogiri (~> 1.4) - htmlentities (4.3.4) - http_parser.rb (0.5.3) - httparty (0.13.7) - json (~> 1.8) - multi_xml (>= 0.5.2) - httpclient (2.8.0) - i18n (0.7.0) - ice_nine (0.11.2) - influxdb (0.3.5) - cause - json - ipaddress (0.8.3) - jquery-atwho-rails (1.3.2) - jquery-rails (4.1.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jquery-turbolinks (2.1.0) - railties (>= 3.1.0) - turbolinks - jquery-ui-rails (5.0.5) - railties (>= 3.2.16) - json (1.8.3) - jwt (1.5.4) - kaminari (0.17.0) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - kgio (2.10.0) - knapsack (1.11.1) - rake - timecop (>= 0.1.0) - launchy (2.4.3) - addressable (~> 2.3) - letter_opener (1.4.1) - launchy (~> 2.2) - letter_opener_web (1.3.0) - actionmailer (>= 3.2) - letter_opener (~> 1.0) - railties (>= 3.2) - license_finder (2.1.2) - bundler - httparty - rubyzip - thor - xml-simple - licensee (8.0.0) - rugged (>= 0.24b) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.0.3) - nokogiri (>= 1.5.9) - macaddr (1.7.1) - systemu (~> 2.6.2) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mail_room (0.8.0) - method_source (0.8.2) - mime-types (2.99.2) - mimemagic (0.3.1) - mini_portile2 (2.1.0) - minitest (5.7.0) - mousetrap-rails (1.4.6) - multi_json (1.12.1) - multi_xml (0.5.5) - multipart-post (2.0.0) - mysql2 (0.3.21) - nested_form (0.3.2) - net-ldap (0.14.0) - net-ssh (3.0.2) - newrelic_rpm (3.16.0.318) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - numerizer (0.1.1) -<<<<<<< f2df78d17977c1e082d6e78dda1ba98e62097ebd - oauth (0.5.1) - oauth2 (1.0.0) -======= -<<<<<<< e36858231db42f64fb69af7d74f3ec6a898d8a70 - oauth (0.4.7) - oauth2 (1.2.0) -======= - oauth (0.5.1) - oauth2 (1.0.0) ->>>>>>> fixes merge conflicts for Gemfile.lock ->>>>>>> fixes merge conflicts for Gemfile.lock - faraday (>= 0.8, < 0.10) - jwt (~> 1.0) - multi_json (~> 1.3) - multi_xml (~> 0.5) - rack (~> 1.2) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) - omniauth (1.3.1) - hashie (>= 1.2, < 4) - rack (>= 1.0, < 3) - omniauth-auth0 (1.4.2) - omniauth-oauth2 (~> 1.1) - omniauth-azure-oauth2 (0.0.6) - jwt (~> 1.0) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-bitbucket (0.0.2) - multi_json (~> 1.7) - omniauth (~> 1.1) - omniauth-oauth (~> 1.0) - omniauth-cas3 (1.1.3) - addressable (~> 2.3) - nokogiri (~> 1.6.6) - omniauth (~> 1.2) - omniauth-facebook (3.0.0) - omniauth-oauth2 (~> 1.2) - omniauth-github (1.1.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.0) - omniauth-google-oauth2 (0.2.10) - addressable (~> 2.3) - jwt (~> 1.0) - multi_json (~> 1.3) - omniauth (>= 1.1.1) - omniauth-oauth2 (~> 1.3.1) - omniauth-kerberos (0.3.0) - omniauth-multipassword - timfel-krb5-auth (~> 0.8) - omniauth-multipassword (0.4.2) - omniauth (~> 1.0) - omniauth-oauth (1.1.0) - oauth - omniauth (~> 1.0) - omniauth-oauth2 (1.3.1) - oauth2 (~> 1.0) - omniauth (~> 1.2) - omniauth-saml (1.6.0) - omniauth (~> 1.3) - ruby-saml (~> 1.3) - omniauth-shibboleth (1.2.1) - omniauth (>= 1.0.0) - omniauth-twitter (1.2.1) - json (~> 1.3) - omniauth-oauth (~> 1.1) - omniauth_crowd (2.2.3) - activesupport - nokogiri (>= 1.4.4) - omniauth (~> 1.0) - org-ruby (0.9.12) - rubypants (~> 0.2) - orm_adapter (0.5.0) - paranoia (2.1.5) - activerecord (~> 4.0) - parser (2.3.1.2) - ast (~> 2.2) - path_expander (1.0.0) - pg (0.18.4) - pkg-config (1.1.7) - poltergeist (1.9.0) - capybara (~> 2.1) - cliver (~> 0.3.1) - multi_json (~> 1.0) - websocket-driver (>= 0.2.0) - posix-spawn (0.3.11) - powerpack (0.1.1) - premailer (1.8.7) - css_parser (>= 1.4.5) - htmlentities (>= 4.0.0) - premailer-rails (1.9.4) - actionmailer (>= 3, < 6) - premailer (~> 1.7, >= 1.7.9) - pry (0.10.3) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-rails (0.3.4) - pry (>= 0.9.10) - pyu-ruby-sasl (0.0.3.3) - rack (1.6.4) - rack-accept (0.4.5) - rack (>= 0.4) - rack-attack (4.3.1) - rack - rack-cors (0.4.0) - rack-mount (0.8.3) - rack (>= 1.0.0) - rack-oauth2 (1.2.3) - activesupport (>= 2.3) - attr_required (>= 0.0.5) - httpclient (>= 2.4) - multi_json (>= 1.3.6) - rack (>= 1.1) - rack-protection (1.5.3) - rack - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) - raindrops (0.16.0) - rake (10.5.0) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - rblineprof (0.3.6) - debugger-ruby_core_source (~> 1.3) - rdoc (3.12.2) - json (~> 1.4) - recaptcha (3.3.0) - json - redcarpet (3.3.4) - redis (3.3.0) - redis-actionpack (4.0.1) - actionpack (~> 4) - redis-rack (~> 1.5.0) - redis-store (~> 1.1.0) - redis-activesupport (4.1.5) - activesupport (>= 3, < 5) - redis-store (~> 1.1.0) - redis-namespace (1.5.2) - redis (~> 3.0, >= 3.0.4) - redis-rack (1.5.0) - rack (~> 1.5) - redis-store (~> 1.1.0) - redis-rails (4.0.0) - redis-actionpack (~> 4) - redis-activesupport (~> 4) - redis-store (~> 1.1.0) - redis-store (1.1.7) - redis (>= 2.2) - request_store (1.3.1) - rerun (0.11.0) - listen (~> 3.0) - responders (2.2.0) - railties (>= 4.2.0, < 5.1) - rinku (2.0.0) - rotp (2.1.2) - rouge (1.11.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) - rqrcode-rails3 (0.1.7) - rqrcode (>= 0.4.2) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.1) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-retry (0.4.5) - rspec-core - rspec-support (3.5.0) - rubocop (0.40.0) - parser (>= 2.3.1.0, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-rspec (1.5.0) - rubocop (>= 0.40.0) - ruby-fogbugz (0.2.1) - crack (~> 0.4) - ruby-progressbar (1.8.1) - ruby-saml (1.3.0) - nokogiri (>= 1.5.10) - ruby_dep (1.3.1) - ruby_parser (3.8.2) - sexp_processor (~> 4.1) - rubyntlm (0.6.0) - rubypants (0.2.0) - rubyzip (1.2.0) - rufus-scheduler (3.2.1) - rugged (0.24.0) - safe_yaml (1.0.4) - sanitize (2.1.0) - nokogiri (>= 1.4.4) - sass (3.4.22) - sass-rails (5.0.5) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) - scss_lint (0.47.1) - rake (>= 0.9, < 11) - sass (~> 3.4.15) - sdoc (0.3.20) - json (>= 1.1.3) - rdoc (~> 3.10) - seed-fu (2.3.6) - activerecord (>= 3.1) - activesupport (>= 3.1) - select2-rails (3.5.10) - thor (~> 0.14) - sentry-raven (1.1.0) - faraday (>= 0.7.6) - settingslogic (2.0.9) - sexp_processor (4.7.0) - sham_rack (1.3.6) - rack - shoulda-matchers (2.8.0) - activesupport (>= 3.0.0) - sidekiq (4.1.4) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.2, >= 2.2.0) - redis (~> 3.2, >= 3.2.1) - sinatra (>= 1.4.7) - sidekiq-cron (0.4.2) - redis-namespace (>= 1.5.2) - rufus-scheduler (>= 2.0.24) - sidekiq (>= 4.0.0) - simple_oauth (0.1.9) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - six (0.2.0) - slack-notifier (1.2.1) - slop (3.6.0) - spinach (0.8.10) - colorize - gherkin-ruby (>= 0.3.2) - json - spinach-rails (0.2.1) - capybara (>= 2.0.0) - railties (>= 3) - spinach (>= 0.4) - spinach-rerun-reporter (0.0.2) - spinach (~> 0.8) - spring (1.7.2) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) - spring-commands-spinach (1.1.0) - spring (>= 0.9.1) - spring-commands-teaspoon (0.0.2) - spring (>= 0.9.1) - sprockets (3.6.3) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.1.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - state_machines (0.4.0) - state_machines-activemodel (0.4.0) - activemodel (>= 4.1, < 5.1) - state_machines (>= 0.4.0) - state_machines-activerecord (0.4.0) - activerecord (>= 4.1, < 5.1) - state_machines-activemodel (>= 0.3.0) - stringex (2.5.2) - sys-filesystem (1.1.6) - ffi - systemu (2.6.5) - task_list (1.0.2) - html-pipeline - teaspoon (1.1.5) - railties (>= 3.2.5, < 6) - teaspoon-jasmine (2.2.0) - teaspoon (>= 1.0.0) - temple (0.7.7) - test_after_commit (0.4.2) - activerecord (>= 3.2) - thin (1.7.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - timecop (0.8.1) - timfel-krb5-auth (0.8.3) - tinder (1.10.1) - eventmachine (~> 1.0) - faraday (~> 0.9.0) - faraday_middleware (~> 0.9) - hashie (>= 1.0) - json (~> 1.8.0) - mime-types - multi_json (~> 1.7) - twitter-stream (~> 0.1) - turbolinks (2.5.3) - coffee-rails - twitter-stream (0.1.16) - eventmachine (>= 0.12.8) - http_parser.rb (~> 0.5.1) - simple_oauth (~> 0.1.4) - tzinfo (1.2.2) - thread_safe (~> 0.1) - u2f (0.2.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - underscore-rails (1.8.3) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.2) - unicode-display_width (1.1.0) - unicorn (4.9.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - unicorn-worker-killer (0.4.4) - get_process_mem (~> 0) - unicorn (>= 4, < 6) - uniform_notifier (1.10.0) - uuid (2.3.8) - macaddr (~> 1.0) - version_sorter (2.0.0) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - vmstat (2.1.0) - warden (1.2.6) - rack (>= 1.0) - web-console (2.3.0) - activemodel (>= 4.0) - binding_of_caller (>= 0.7.2) - railties (>= 4.0) - sprockets-rails (>= 2.0, < 4.0) - webmock (1.21.0) - addressable (>= 2.3.6) - crack (>= 0.3.2) - websocket-driver (0.6.4) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - wikicloth (0.8.1) - builder - expression_parser - rinku - xml-simple (1.1.5) - xpath (2.0.0) - nokogiri (~> 1.3) - -PLATFORMS - ruby - -DEPENDENCIES - RedCloth (~> 4.3.2) - ace-rails-ap (~> 4.0.2) - activerecord-session_store (~> 1.0.0) - acts-as-taggable-on (~> 3.4) - addressable (~> 2.3.8) - after_commit_queue - akismet (~> 2.0) - allocations (~> 1.0) - asana (~> 0.4.0) - asciidoctor (~> 1.5.2) - attr_encrypted (~> 3.0.0) - awesome_print (~> 1.2.0) - babosa (~> 1.0.2) - base32 (~> 0.3.0) - benchmark-ips - better_errors (~> 1.0.1) - binding_of_caller (~> 0.7.2) - bootstrap-sass (~> 3.3.0) - brakeman (~> 3.3.0) - browser (~> 2.2) - bullet - bundler-audit - byebug - capybara (~> 2.6.2) - capybara-screenshot (~> 1.0.0) - carrierwave (~> 0.10.0) - charlock_holmes (~> 0.7.3) - chronic_duration (~> 0.10.6) - coffee-rails (~> 4.1.0) - connection_pool (~> 2.0) - creole (~> 0.5.0) - d3_rails (~> 3.5.0) - database_cleaner (~> 1.4.0) - default_value_for (~> 3.0.0) - devise (~> 4.0) - devise-two-factor (~> 3.0.0) - diffy (~> 3.0.3) - doorkeeper (~> 4.0) - dropzonejs-rails (~> 0.7.1) - email_reply_parser (~> 0.5.8) - email_spec (~> 1.6.0) - factory_girl_rails (~> 4.6.0) - ffaker (~> 2.0.0) - flay - flog - fog-aws (~> 0.9) - fog-azure (~> 0.0) - fog-core (~> 1.40) - fog-google (~> 0.3) - fog-local (~> 0.3) - fog-openstack (~> 0.1) - fog-rackspace (~> 0.1.1) - font-awesome-rails (~> 4.6.1) - foreman - fuubar (~> 2.0.0) - gemnasium-gitlab-service (~> 0.2) - gemojione (~> 2.6) - github-linguist (~> 4.7.0) - github-markup (~> 1.3.1) - gitlab-flowdock-git-hook (~> 1.0.1) -<<<<<<< e36858231db42f64fb69af7d74f3ec6a898d8a70 - gitlab_git (~> 10.2) - gitlab_emoji (~> 0.3.0) -======= - gitlab_git (~> 10.2)! ->>>>>>> fixes merge conflicts for Gemfile.lock - gitlab_meta (= 7.0) - gitlab_omniauth-ldap (~> 1.2.1) - gollum-lib (~> 4.1.0) - gollum-rugged_adapter (~> 0.4.2) - gon (~> 6.0.1) - grape (~> 0.13.0) - grape-entity (~> 0.4.2) - hamlit (~> 2.5) - health_check (~> 1.5.1) - hipchat (~> 1.5.0) - html-pipeline (~> 1.11.0) - httparty (~> 0.13.3) - influxdb (~> 0.2) - jquery-atwho-rails (~> 1.3.2) - jquery-rails (~> 4.1.0) - jquery-turbolinks (~> 2.1.0) - jquery-ui-rails (~> 5.0.0) - jwt - kaminari (~> 0.17.0) - knapsack - letter_opener_web (~> 1.3.0) - license_finder - licensee (~> 8.0.0) - loofah (~> 2.0.3) - mail_room (~> 0.8) - method_source (~> 0.8) - minitest (~> 5.7.0) - mousetrap-rails (~> 1.4.6) - mysql2 (~> 0.3.16) - nested_form (~> 0.3.2) - net-ssh (~> 3.0.1) - newrelic_rpm (~> 3.14) - nokogiri (~> 1.6.7, >= 1.6.7.2) - oauth2 (~> 1.0.0) - octokit (~> 4.3.0) - omniauth (~> 1.3.1) - omniauth-auth0 (~> 1.4.1) - omniauth-azure-oauth2 (~> 0.0.6) - omniauth-bitbucket (~> 0.0.2) - omniauth-cas3 (~> 1.1.2) - omniauth-facebook (~> 3.0.0) - omniauth-github (~> 1.1.1) - omniauth-gitlab (~> 1.0.0) - omniauth-google-oauth2 (~> 0.2.0) - omniauth-kerberos (~> 0.3.0) - omniauth-saml (~> 1.6.0) - omniauth-shibboleth (~> 1.2.0) - omniauth-twitter (~> 1.2.0) - omniauth_crowd (~> 2.2.0) - org-ruby (~> 0.9.12) - paranoia (~> 2.0) - pg (~> 0.18.2) - poltergeist (~> 1.9.0) - premailer-rails (~> 1.9.0) - pry-rails - rack-attack (~> 4.3.1) - rack-cors (~> 0.4.0) - rack-oauth2 (~> 1.2.1) - rails (= 4.2.6) - rails-deprecated_sanitizer (~> 1.0.3) - rainbow (~> 2.1.0) - rblineprof - rdoc (~> 3.6) - recaptcha (~> 3.0) - redcarpet (~> 3.3.3) - redis (~> 3.2) - redis-namespace - redis-rails (~> 4.0.0) - request_store (~> 1.3.0) - rerun (~> 0.11.0) - responders (~> 2.0) - rouge (~> 1.11) - rqrcode-rails3 (~> 0.1.7) - rspec-rails (~> 3.5.0) - rspec-retry - rubocop (~> 0.40.0) - rubocop-rspec (~> 1.5.0) - ruby-fogbugz (~> 0.2.1) - sanitize (~> 2.0) - sass-rails (~> 5.0.0) - scss_lint (~> 0.47.0) - sdoc (~> 0.3.20) - seed-fu (~> 2.3.5) - select2-rails (~> 3.5.9) - sentry-raven (~> 1.1.0) - settingslogic (~> 2.0.9) - sham_rack - shoulda-matchers (~> 2.8.0) - sidekiq (~> 4.0) - sidekiq-cron (~> 0.4.0) - simplecov (~> 0.11.0) - sinatra (~> 1.4.4) - six (~> 0.2.0) - slack-notifier (~> 1.2.0) - spinach-rails (~> 0.2.1) - spinach-rerun-reporter (~> 0.0.2) - spring (~> 1.7.0) - spring-commands-rspec (~> 1.0.4) - spring-commands-spinach (~> 1.1.0) - spring-commands-teaspoon (~> 0.0.2) - sprockets (~> 3.6.0) - state_machines-activerecord (~> 0.4.0) - sys-filesystem (~> 1.1.6) - task_list (~> 1.0.2) - teaspoon (~> 1.1.0) - teaspoon-jasmine (~> 2.2.0) - test_after_commit (~> 0.4.2) - thin (~> 1.7.0) - tinder (~> 1.10.0) - turbolinks (~> 2.5.0) - u2f (~> 0.2.1) - uglifier (~> 2.7.2) - underscore-rails (~> 1.8.0) - unf (~> 0.1.4) - unicorn (~> 4.9.0) - unicorn-worker-killer (~> 0.4.2) - version_sorter (~> 2.0.0) - virtus (~> 1.0.1) - vmstat (~> 2.1.0) - web-console (~> 2.0) - webmock (~> 1.21.0) - wikicloth (= 0.8.1) - -BUNDLED WITH - 1.10.6 -- cgit v1.2.1 From 8f67d970af8cd290ee95a3edb02badc589643e72 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 10:40:10 +0100 Subject: adds Gemfile.lock to mr --- Gemfile.lock | 994 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 994 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000000..8809edb0fc9 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,994 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.3.2) + ace-rails-ap (4.0.2) + actionmailer (4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.6) + actionview (= 4.2.6) + activesupport (= 4.2.6) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.6) + activesupport (= 4.2.6) + globalid (>= 0.3.0) + activemodel (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + activerecord (4.2.6) + activemodel (= 4.2.6) + activesupport (= 4.2.6) + arel (~> 6.0) + activerecord-session_store (1.0.0) + actionpack (>= 4.0, < 5.1) + activerecord (>= 4.0, < 5.1) + multi_json (~> 1.11, >= 1.11.2) + rack (>= 1.5.2, < 3) + railties (>= 4.0, < 5.1) + activesupport (4.2.6) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + acts-as-taggable-on (3.5.0) + activerecord (>= 3.2, < 5) + addressable (2.3.8) + after_commit_queue (1.3.0) + activerecord (>= 3.0) + akismet (2.0.0) + allocations (1.0.5) + arel (6.0.3) + asana (0.4.0) + faraday (~> 0.9) + faraday_middleware (~> 0.9) + faraday_middleware-multi_json (~> 0.0) + oauth2 (~> 1.0) + asciidoctor (1.5.4) + ast (2.3.0) + attr_encrypted (3.0.1) + encryptor (~> 3.0.0) + attr_required (1.0.1) + autoprefixer-rails (6.3.7) + execjs + awesome_print (1.2.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + azure (0.7.5) + addressable (~> 2.3) + azure-core (~> 0.1) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + json (~> 1.8) + mime-types (>= 1, < 3.0) + nokogiri (~> 1.6) + systemu (~> 2.6) + thor (~> 0.19) + uuid (~> 2.0) + azure-core (0.1.2) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + nokogiri (~> 1.6) + babosa (1.0.2) + base32 (0.3.2) + bcrypt (3.1.11) + benchmark-ips (2.6.1) + better_errors (1.0.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bootstrap-sass (3.3.6) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + brakeman (3.3.2) + browser (2.2.0) + builder (3.2.2) + bullet (5.1.1) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.10.0) + bundler-audit (0.5.0) + bundler (~> 1.2) + thor (~> 0.18) + byebug (9.0.5) + capybara (2.6.2) + addressable + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + capybara-screenshot (1.0.13) + capybara (>= 1.0, < 3) + launchy + carrierwave (0.10.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + mime-types (>= 1.16) + cause (0.1) + charlock_holmes (0.7.3) + chronic_duration (0.10.6) + numerizer (~> 0.1.1) + chunky_png (1.3.6) + cliver (0.3.2) + coderay (1.1.1) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + coffee-rails (4.1.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.1.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorize (0.8.1) + concurrent-ruby (1.0.2) + connection_pool (2.2.0) + crack (0.4.3) + safe_yaml (~> 1.0.0) + creole (0.5.0) + css_parser (1.4.5) + addressable + d3_rails (3.5.16) + railties (>= 3.1.0) + daemons (1.2.3) + database_cleaner (1.4.1) + debug_inspector (0.0.2) + debugger-ruby_core_source (1.3.8) + default_value_for (3.0.1) + activerecord (>= 3.2.0, < 5.0) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + devise (4.2.0) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 5.1) + responders + warden (~> 1.2.3) + devise-two-factor (3.0.0) + activesupport + attr_encrypted (>= 1.3, < 4, != 2) + devise (~> 4.0) + railties + rotp (~> 2.0) + diff-lcs (1.2.5) + diffy (3.0.7) + docile (1.1.5) + doorkeeper (4.0.0) + railties (>= 4.2) + dropzonejs-rails (0.7.3) + rails (> 3.1) + email_reply_parser (0.5.8) + email_spec (1.6.0) + launchy (~> 2.1) + mail (~> 2.2) + encryptor (3.0.0) + equalizer (0.0.11) + erubis (2.7.0) + escape_utils (1.1.1) + eventmachine (1.2.0.1) + excon (0.50.1) + execjs (2.7.0) + expression_parser (0.9.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.6.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) + faraday_middleware-multi_json (0.0.6) + faraday_middleware + multi_json + ffaker (2.0.0) + ffi (1.9.13) + flay (2.8.0) + erubis (~> 2.7.0) + path_expander (~> 1.0) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.4.0) + path_expander (~> 1.0) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.4) + flowdock (0.7.1) + httparty (~> 0.7) + multi_json + fog-aws (0.9.4) + fog-core (~> 1.38) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-azure (0.0.2) + azure (~> 0.6) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + fog-core (1.42.0) + builder + excon (~> 0.49) + formatador (~> 0.2) + fog-google (0.3.2) + fog-core + fog-json + fog-xml + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-local (0.3.0) + fog-core (~> 1.27) + fog-openstack (0.1.7) + fog-core (>= 1.40) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-rackspace (0.1.1) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-xml (0.1.2) + fog-core + nokogiri (~> 1.5, >= 1.5.11) + font-awesome-rails (4.6.3.1) + railties (>= 3.2, < 5.1) + foreman (0.82.0) + thor (~> 0.19.1) + formatador (0.2.5) + fuubar (2.0.0) + rspec (~> 3.0) + ruby-progressbar (~> 1.4) + gemnasium-gitlab-service (0.2.6) + rugged (~> 0.21) + gemojione (2.6.1) + json + get_process_mem (0.2.1) + gherkin-ruby (0.3.2) + github-linguist (4.7.6) + charlock_holmes (~> 0.7.3) + escape_utils (~> 1.1.0) + mime-types (>= 1.19) + rugged (>= 0.23.0b) + github-markup (1.3.3) + gitlab-flowdock-git-hook (1.0.1) + flowdock (~> 0.7) + gitlab-grit (>= 2.4.1) + multi_json + gitlab-grit (2.8.1) + charlock_holmes (~> 0.6) + diff-lcs (~> 1.1) + mime-types (>= 1.16, < 3) + posix-spawn (~> 0.3) + gitlab_git (10.3.0) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + gitlab_meta (7.0) + gitlab_omniauth-ldap (1.2.1) + net-ldap (~> 0.9) + omniauth (~> 1.0) + pyu-ruby-sasl (~> 0.0.3.1) + rubyntlm (~> 0.3) + globalid (0.3.6) + activesupport (>= 4.1.0) + gollum-grit_adapter (1.0.1) + gitlab-grit (~> 2.7, >= 2.7.1) + gollum-lib (4.1.0) + github-markup (~> 1.3.3) + gollum-grit_adapter (~> 1.0) + nokogiri (~> 1.6.4) + rouge (~> 1.9) + sanitize (~> 2.1.0) + stringex (~> 2.5.1) + gollum-rugged_adapter (0.4.2) + mime-types (>= 1.15) + rugged (~> 0.24.0, >= 0.21.3) + gon (6.0.1) + actionpack (>= 3.0) + json + multi_json + request_store (>= 1.0) + grape (0.13.0) + activesupport + builder + hashie (>= 2.1.0) + multi_json (>= 1.3.2) + multi_xml (>= 0.5.2) + rack (>= 1.3.0) + rack-accept + rack-mount + virtus (>= 1.0.0) + grape-entity (0.4.8) + activesupport + multi_json (>= 1.3.2) + hamlit (2.5.0) + temple (~> 0.7.6) + thor + tilt + hashie (3.4.4) + health_check (1.5.1) + rails (>= 2.3.0) + hipchat (1.5.3) + httparty + mimemagic + html-pipeline (1.11.0) + activesupport (>= 2) + nokogiri (~> 1.4) + htmlentities (4.3.4) + http_parser.rb (0.5.3) + httparty (0.13.7) + json (~> 1.8) + multi_xml (>= 0.5.2) + httpclient (2.8.0) + i18n (0.7.0) + ice_nine (0.11.2) + influxdb (0.3.5) + cause + json + ipaddress (0.8.3) + jquery-atwho-rails (1.3.2) + jquery-rails (4.1.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) + json (1.8.3) + jwt (1.5.4) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.10.0) + knapsack (1.11.1) + rake + timecop (>= 0.1.0) + launchy (2.4.3) + addressable (~> 2.3) + letter_opener (1.4.1) + launchy (~> 2.2) + letter_opener_web (1.3.0) + actionmailer (>= 3.2) + letter_opener (~> 1.0) + railties (>= 3.2) + license_finder (2.1.2) + bundler + httparty + rubyzip + thor + xml-simple + licensee (8.0.0) + rugged (>= 0.24b) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.0.3) + nokogiri (>= 1.5.9) + macaddr (1.7.1) + systemu (~> 2.6.2) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mail_room (0.8.0) + method_source (0.8.2) + mime-types (2.99.2) + mimemagic (0.3.1) + mini_portile2 (2.1.0) + minitest (5.7.0) + mousetrap-rails (1.4.6) + multi_json (1.12.1) + multi_xml (0.5.5) + multipart-post (2.0.0) + mysql2 (0.3.21) + nested_form (0.3.2) + net-ldap (0.14.0) + net-ssh (3.0.2) + newrelic_rpm (3.16.0.318) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + numerizer (0.1.1) + oauth (0.5.1) + oauth2 (1.0.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (~> 1.2) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) + omniauth (1.3.1) + hashie (>= 1.2, < 4) + rack (>= 1.0, < 3) + omniauth-auth0 (1.4.2) + omniauth-oauth2 (~> 1.1) + omniauth-azure-oauth2 (0.0.6) + jwt (~> 1.0) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-bitbucket (0.0.2) + multi_json (~> 1.7) + omniauth (~> 1.1) + omniauth-oauth (~> 1.0) + omniauth-cas3 (1.1.3) + addressable (~> 2.3) + nokogiri (~> 1.6.6) + omniauth (~> 1.2) + omniauth-facebook (3.0.0) + omniauth-oauth2 (~> 1.2) + omniauth-github (1.1.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-gitlab (1.0.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.0) + omniauth-google-oauth2 (0.2.10) + addressable (~> 2.3) + jwt (~> 1.0) + multi_json (~> 1.3) + omniauth (>= 1.1.1) + omniauth-oauth2 (~> 1.3.1) + omniauth-kerberos (0.3.0) + omniauth-multipassword + timfel-krb5-auth (~> 0.8) + omniauth-multipassword (0.4.2) + omniauth (~> 1.0) + omniauth-oauth (1.1.0) + oauth + omniauth (~> 1.0) + omniauth-oauth2 (1.3.1) + oauth2 (~> 1.0) + omniauth (~> 1.2) + omniauth-saml (1.6.0) + omniauth (~> 1.3) + ruby-saml (~> 1.3) + omniauth-shibboleth (1.2.1) + omniauth (>= 1.0.0) + omniauth-twitter (1.2.1) + json (~> 1.3) + omniauth-oauth (~> 1.1) + omniauth_crowd (2.2.3) + activesupport + nokogiri (>= 1.4.4) + omniauth (~> 1.0) + org-ruby (0.9.12) + rubypants (~> 0.2) + orm_adapter (0.5.0) + paranoia (2.1.5) + activerecord (~> 4.0) + parser (2.3.1.2) + ast (~> 2.2) + path_expander (1.0.0) + pg (0.18.4) + pkg-config (1.1.7) + poltergeist (1.9.0) + capybara (~> 2.1) + cliver (~> 0.3.1) + multi_json (~> 1.0) + websocket-driver (>= 0.2.0) + posix-spawn (0.3.11) + powerpack (0.1.1) + premailer (1.8.7) + css_parser (>= 1.4.5) + htmlentities (>= 4.0.0) + premailer-rails (1.9.4) + actionmailer (>= 3, < 6) + premailer (~> 1.7, >= 1.7.9) + pry (0.10.3) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.4) + pry (>= 0.9.10) + pyu-ruby-sasl (0.0.3.3) + rack (1.6.4) + rack-accept (0.4.5) + rack (>= 0.4) + rack-attack (4.3.1) + rack + rack-cors (0.4.0) + rack-mount (0.8.3) + rack (>= 1.0.0) + rack-oauth2 (1.2.3) + activesupport (>= 2.3) + attr_required (>= 0.0.5) + httpclient (>= 2.4) + multi_json (>= 1.3.6) + rack (>= 1.1) + rack-protection (1.5.3) + rack + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.6) + actionmailer (= 4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + activemodel (= 4.2.6) + activerecord (= 4.2.6) + activesupport (= 4.2.6) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.6) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (4.2.6) + actionpack (= 4.2.6) + activesupport (= 4.2.6) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rainbow (2.1.0) + raindrops (0.16.0) + rake (10.5.0) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + rblineprof (0.3.6) + debugger-ruby_core_source (~> 1.3) + rdoc (3.12.2) + json (~> 1.4) + recaptcha (3.3.0) + json + redcarpet (3.3.4) + redis (3.3.0) + redis-actionpack (4.0.1) + actionpack (~> 4) + redis-rack (~> 1.5.0) + redis-store (~> 1.1.0) + redis-activesupport (4.1.5) + activesupport (>= 3, < 5) + redis-store (~> 1.1.0) + redis-namespace (1.5.2) + redis (~> 3.0, >= 3.0.4) + redis-rack (1.5.0) + rack (~> 1.5) + redis-store (~> 1.1.0) + redis-rails (4.0.0) + redis-actionpack (~> 4) + redis-activesupport (~> 4) + redis-store (~> 1.1.0) + redis-store (1.1.7) + redis (>= 2.2) + request_store (1.3.1) + rerun (0.11.0) + listen (~> 3.0) + responders (2.2.0) + railties (>= 4.2.0, < 5.1) + rinku (2.0.0) + rotp (2.1.2) + rouge (1.11.1) + rqrcode (0.10.1) + chunky_png (~> 1.0) + rqrcode-rails3 (0.1.7) + rqrcode (>= 0.4.2) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.1) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-retry (0.4.5) + rspec-core + rspec-support (3.5.0) + rubocop (0.40.0) + parser (>= 2.3.1.0, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + rubocop-rspec (1.5.0) + rubocop (>= 0.40.0) + ruby-fogbugz (0.2.1) + crack (~> 0.4) + ruby-progressbar (1.8.1) + ruby-saml (1.3.0) + nokogiri (>= 1.5.10) + ruby_dep (1.3.1) + ruby_parser (3.8.2) + sexp_processor (~> 4.1) + rubyntlm (0.6.0) + rubypants (0.2.0) + rubyzip (1.2.0) + rufus-scheduler (3.2.1) + rugged (0.24.0) + safe_yaml (1.0.4) + sanitize (2.1.0) + nokogiri (>= 1.4.4) + sass (3.4.22) + sass-rails (5.0.5) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) + faraday (~> 0.8, < 0.10) + scss_lint (0.47.1) + rake (>= 0.9, < 11) + sass (~> 3.4.15) + sdoc (0.3.20) + json (>= 1.1.3) + rdoc (~> 3.10) + seed-fu (2.3.6) + activerecord (>= 3.1) + activesupport (>= 3.1) + select2-rails (3.5.10) + thor (~> 0.14) + sentry-raven (1.1.0) + faraday (>= 0.7.6) + settingslogic (2.0.9) + sexp_processor (4.7.0) + sham_rack (1.3.6) + rack + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + sidekiq (4.1.4) + concurrent-ruby (~> 1.0) + connection_pool (~> 2.2, >= 2.2.0) + redis (~> 3.2, >= 3.2.1) + sinatra (>= 1.4.7) + sidekiq-cron (0.4.2) + redis-namespace (>= 1.5.2) + rufus-scheduler (>= 2.0.24) + sidekiq (>= 4.0.0) + simple_oauth (0.1.9) + simplecov (0.11.2) + docile (~> 1.1.0) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + sinatra (1.4.7) + rack (~> 1.5) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + six (0.2.0) + slack-notifier (1.2.1) + slop (3.6.0) + spinach (0.8.10) + colorize + gherkin-ruby (>= 0.3.2) + json + spinach-rails (0.2.1) + capybara (>= 2.0.0) + railties (>= 3) + spinach (>= 0.4) + spinach-rerun-reporter (0.0.2) + spinach (~> 0.8) + spring (1.7.2) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) + spring-commands-spinach (1.1.0) + spring (>= 0.9.1) + spring-commands-teaspoon (0.0.2) + spring (>= 0.9.1) + sprockets (3.6.3) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.1.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + state_machines (0.4.0) + state_machines-activemodel (0.4.0) + activemodel (>= 4.1, < 5.1) + state_machines (>= 0.4.0) + state_machines-activerecord (0.4.0) + activerecord (>= 4.1, < 5.1) + state_machines-activemodel (>= 0.3.0) + stringex (2.5.2) + sys-filesystem (1.1.6) + ffi + systemu (2.6.5) + task_list (1.0.2) + html-pipeline + teaspoon (1.1.5) + railties (>= 3.2.5, < 6) + teaspoon-jasmine (2.2.0) + teaspoon (>= 1.0.0) + temple (0.7.7) + test_after_commit (0.4.2) + activerecord (>= 3.2) + thin (1.7.0) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.5) + timecop (0.8.1) + timfel-krb5-auth (0.8.3) + tinder (1.10.1) + eventmachine (~> 1.0) + faraday (~> 0.9.0) + faraday_middleware (~> 0.9) + hashie (>= 1.0) + json (~> 1.8.0) + mime-types + multi_json (~> 1.7) + twitter-stream (~> 0.1) + turbolinks (2.5.3) + coffee-rails + twitter-stream (0.1.16) + eventmachine (>= 0.12.8) + http_parser.rb (~> 0.5.1) + simple_oauth (~> 0.1.4) + tzinfo (1.2.2) + thread_safe (~> 0.1) + u2f (0.2.1) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + underscore-rails (1.8.3) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + unicode-display_width (1.1.0) + unicorn (4.9.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + unicorn-worker-killer (0.4.4) + get_process_mem (~> 0) + unicorn (>= 4, < 6) + uniform_notifier (1.10.0) + uuid (2.3.8) + macaddr (~> 1.0) + version_sorter (2.0.0) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + vmstat (2.1.0) + warden (1.2.6) + rack (>= 1.0) + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + webmock (1.21.0) + addressable (>= 2.3.6) + crack (>= 0.3.2) + websocket-driver (0.6.4) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + wikicloth (0.8.1) + builder + expression_parser + rinku + xml-simple (1.1.5) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth (~> 4.3.2) + ace-rails-ap (~> 4.0.2) + activerecord-session_store (~> 1.0.0) + acts-as-taggable-on (~> 3.4) + addressable (~> 2.3.8) + after_commit_queue + akismet (~> 2.0) + allocations (~> 1.0) + asana (~> 0.4.0) + asciidoctor (~> 1.5.2) + attr_encrypted (~> 3.0.0) + awesome_print (~> 1.2.0) + babosa (~> 1.0.2) + base32 (~> 0.3.0) + benchmark-ips + better_errors (~> 1.0.1) + binding_of_caller (~> 0.7.2) + bootstrap-sass (~> 3.3.0) + brakeman (~> 3.3.0) + browser (~> 2.2) + bullet + bundler-audit + byebug + capybara (~> 2.6.2) + capybara-screenshot (~> 1.0.0) + carrierwave (~> 0.10.0) + charlock_holmes (~> 0.7.3) + chronic_duration (~> 0.10.6) + coffee-rails (~> 4.1.0) + connection_pool (~> 2.0) + creole (~> 0.5.0) + d3_rails (~> 3.5.0) + database_cleaner (~> 1.4.0) + default_value_for (~> 3.0.0) + devise (~> 4.0) + devise-two-factor (~> 3.0.0) + diffy (~> 3.0.3) + doorkeeper (~> 4.0) + dropzonejs-rails (~> 0.7.1) + email_reply_parser (~> 0.5.8) + email_spec (~> 1.6.0) + factory_girl_rails (~> 4.6.0) + ffaker (~> 2.0.0) + flay + flog + fog-aws (~> 0.9) + fog-azure (~> 0.0) + fog-core (~> 1.40) + fog-google (~> 0.3) + fog-local (~> 0.3) + fog-openstack (~> 0.1) + fog-rackspace (~> 0.1.1) + font-awesome-rails (~> 4.6.1) + foreman + fuubar (~> 2.0.0) + gemnasium-gitlab-service (~> 0.2) + gemojione (~> 2.6) + github-linguist (~> 4.7.0) + github-markup (~> 1.3.1) + gitlab-flowdock-git-hook (~> 1.0.1) + gitlab_git (~> 10.2) + gitlab_meta (= 7.0) + gitlab_omniauth-ldap (~> 1.2.1) + gollum-lib (~> 4.1.0) + gollum-rugged_adapter (~> 0.4.2) + gon (~> 6.0.1) + grape (~> 0.13.0) + grape-entity (~> 0.4.2) + hamlit (~> 2.5) + health_check (~> 1.5.1) + hipchat (~> 1.5.0) + html-pipeline (~> 1.11.0) + httparty (~> 0.13.3) + influxdb (~> 0.2) + jquery-atwho-rails (~> 1.3.2) + jquery-rails (~> 4.1.0) + jquery-turbolinks (~> 2.1.0) + jquery-ui-rails (~> 5.0.0) + jwt + kaminari (~> 0.17.0) + knapsack + letter_opener_web (~> 1.3.0) + license_finder + licensee (~> 8.0.0) + loofah (~> 2.0.3) + mail_room (~> 0.8) + method_source (~> 0.8) + minitest (~> 5.7.0) + mousetrap-rails (~> 1.4.6) + mysql2 (~> 0.3.16) + nested_form (~> 0.3.2) + net-ssh (~> 3.0.1) + newrelic_rpm (~> 3.14) + nokogiri (~> 1.6.7, >= 1.6.7.2) + oauth2 (~> 1.0.0) + octokit (~> 4.3.0) + omniauth (~> 1.3.1) + omniauth-auth0 (~> 1.4.1) + omniauth-azure-oauth2 (~> 0.0.6) + omniauth-bitbucket (~> 0.0.2) + omniauth-cas3 (~> 1.1.2) + omniauth-facebook (~> 3.0.0) + omniauth-github (~> 1.1.1) + omniauth-gitlab (~> 1.0.0) + omniauth-google-oauth2 (~> 0.2.0) + omniauth-kerberos (~> 0.3.0) + omniauth-saml (~> 1.6.0) + omniauth-shibboleth (~> 1.2.0) + omniauth-twitter (~> 1.2.0) + omniauth_crowd (~> 2.2.0) + org-ruby (~> 0.9.12) + paranoia (~> 2.0) + pg (~> 0.18.2) + poltergeist (~> 1.9.0) + premailer-rails (~> 1.9.0) + pry-rails + rack-attack (~> 4.3.1) + rack-cors (~> 0.4.0) + rack-oauth2 (~> 1.2.1) + rails (= 4.2.6) + rails-deprecated_sanitizer (~> 1.0.3) + rainbow (~> 2.1.0) + rblineprof + rdoc (~> 3.6) + recaptcha (~> 3.0) + redcarpet (~> 3.3.3) + redis (~> 3.2) + redis-namespace + redis-rails (~> 4.0.0) + request_store (~> 1.3.0) + rerun (~> 0.11.0) + responders (~> 2.0) + rouge (~> 1.11) + rqrcode-rails3 (~> 0.1.7) + rspec-rails (~> 3.5.0) + rspec-retry + rubocop (~> 0.40.0) + rubocop-rspec (~> 1.5.0) + ruby-fogbugz (~> 0.2.1) + sanitize (~> 2.0) + sass-rails (~> 5.0.0) + scss_lint (~> 0.47.0) + sdoc (~> 0.3.20) + seed-fu (~> 2.3.5) + select2-rails (~> 3.5.9) + sentry-raven (~> 1.1.0) + settingslogic (~> 2.0.9) + sham_rack + shoulda-matchers (~> 2.8.0) + sidekiq (~> 4.0) + sidekiq-cron (~> 0.4.0) + simplecov (~> 0.11.0) + sinatra (~> 1.4.4) + six (~> 0.2.0) + slack-notifier (~> 1.2.0) + spinach-rails (~> 0.2.1) + spinach-rerun-reporter (~> 0.0.2) + spring (~> 1.7.0) + spring-commands-rspec (~> 1.0.4) + spring-commands-spinach (~> 1.1.0) + spring-commands-teaspoon (~> 0.0.2) + sprockets (~> 3.6.0) + state_machines-activerecord (~> 0.4.0) + sys-filesystem (~> 1.1.6) + task_list (~> 1.0.2) + teaspoon (~> 1.1.0) + teaspoon-jasmine (~> 2.2.0) + test_after_commit (~> 0.4.2) + thin (~> 1.7.0) + tinder (~> 1.10.0) + turbolinks (~> 2.5.0) + u2f (~> 0.2.1) + uglifier (~> 2.7.2) + underscore-rails (~> 1.8.0) + unf (~> 0.1.4) + unicorn (~> 4.9.0) + unicorn-worker-killer (~> 0.4.2) + version_sorter (~> 2.0.0) + virtus (~> 1.0.1) + vmstat (~> 2.1.0) + web-console (~> 2.0) + webmock (~> 1.21.0) + wikicloth (= 0.8.1) + +BUNDLED WITH + 1.12.5 -- cgit v1.2.1 From 82dd0ab5bf08326f40e635f03357eff5b220d751 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 13:07:43 +0100 Subject: removes Gemfile.lock from project --- Gemfile.lock | 994 ----------------------------------------------------------- 1 file changed, 994 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 8809edb0fc9..00000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,994 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - RedCloth (4.3.2) - ace-rails-ap (4.0.2) - actionmailer (4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.6) - actionview (= 4.2.6) - activesupport (= 4.2.6) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.6) - activesupport (= 4.2.6) - globalid (>= 0.3.0) - activemodel (4.2.6) - activesupport (= 4.2.6) - builder (~> 3.1) - activerecord (4.2.6) - activemodel (= 4.2.6) - activesupport (= 4.2.6) - arel (~> 6.0) - activerecord-session_store (1.0.0) - actionpack (>= 4.0, < 5.1) - activerecord (>= 4.0, < 5.1) - multi_json (~> 1.11, >= 1.11.2) - rack (>= 1.5.2, < 3) - railties (>= 4.0, < 5.1) - activesupport (4.2.6) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - acts-as-taggable-on (3.5.0) - activerecord (>= 3.2, < 5) - addressable (2.3.8) - after_commit_queue (1.3.0) - activerecord (>= 3.0) - akismet (2.0.0) - allocations (1.0.5) - arel (6.0.3) - asana (0.4.0) - faraday (~> 0.9) - faraday_middleware (~> 0.9) - faraday_middleware-multi_json (~> 0.0) - oauth2 (~> 1.0) - asciidoctor (1.5.4) - ast (2.3.0) - attr_encrypted (3.0.1) - encryptor (~> 3.0.0) - attr_required (1.0.1) - autoprefixer-rails (6.3.7) - execjs - awesome_print (1.2.0) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - azure (0.7.5) - addressable (~> 2.3) - azure-core (~> 0.1) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - json (~> 1.8) - mime-types (>= 1, < 3.0) - nokogiri (~> 1.6) - systemu (~> 2.6) - thor (~> 0.19) - uuid (~> 2.0) - azure-core (0.1.2) - faraday (~> 0.9) - faraday_middleware (~> 0.10) - nokogiri (~> 1.6) - babosa (1.0.2) - base32 (0.3.2) - bcrypt (3.1.11) - benchmark-ips (2.6.1) - better_errors (1.0.1) - coderay (>= 1.0.0) - erubis (>= 2.6.6) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - bootstrap-sass (3.3.6) - autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) - brakeman (3.3.2) - browser (2.2.0) - builder (3.2.2) - bullet (5.1.1) - activesupport (>= 3.0.0) - uniform_notifier (~> 1.10.0) - bundler-audit (0.5.0) - bundler (~> 1.2) - thor (~> 0.18) - byebug (9.0.5) - capybara (2.6.2) - addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - capybara-screenshot (1.0.13) - capybara (>= 1.0, < 3) - launchy - carrierwave (0.10.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) - json (>= 1.7) - mime-types (>= 1.16) - cause (0.1) - charlock_holmes (0.7.3) - chronic_duration (0.10.6) - numerizer (~> 0.1.1) - chunky_png (1.3.6) - cliver (0.3.2) - coderay (1.1.1) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - coffee-rails (4.1.1) - coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.1.x) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.10.0) - colorize (0.8.1) - concurrent-ruby (1.0.2) - connection_pool (2.2.0) - crack (0.4.3) - safe_yaml (~> 1.0.0) - creole (0.5.0) - css_parser (1.4.5) - addressable - d3_rails (3.5.16) - railties (>= 3.1.0) - daemons (1.2.3) - database_cleaner (1.4.1) - debug_inspector (0.0.2) - debugger-ruby_core_source (1.3.8) - default_value_for (3.0.1) - activerecord (>= 3.2.0, < 5.0) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.0) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) - responders - warden (~> 1.2.3) - devise-two-factor (3.0.0) - activesupport - attr_encrypted (>= 1.3, < 4, != 2) - devise (~> 4.0) - railties - rotp (~> 2.0) - diff-lcs (1.2.5) - diffy (3.0.7) - docile (1.1.5) - doorkeeper (4.0.0) - railties (>= 4.2) - dropzonejs-rails (0.7.3) - rails (> 3.1) - email_reply_parser (0.5.8) - email_spec (1.6.0) - launchy (~> 2.1) - mail (~> 2.2) - encryptor (3.0.0) - equalizer (0.0.11) - erubis (2.7.0) - escape_utils (1.1.1) - eventmachine (1.2.0.1) - excon (0.50.1) - execjs (2.7.0) - expression_parser (0.9.0) - factory_girl (4.5.0) - activesupport (>= 3.0.0) - factory_girl_rails (4.6.0) - factory_girl (~> 4.5.0) - railties (>= 3.0.0) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.10.0) - faraday (>= 0.7.4, < 0.10) - faraday_middleware-multi_json (0.0.6) - faraday_middleware - multi_json - ffaker (2.0.0) - ffi (1.9.13) - flay (2.8.0) - erubis (~> 2.7.0) - path_expander (~> 1.0) - ruby_parser (~> 3.0) - sexp_processor (~> 4.0) - flog (4.4.0) - path_expander (~> 1.0) - ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.4) - flowdock (0.7.1) - httparty (~> 0.7) - multi_json - fog-aws (0.9.4) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-azure (0.0.2) - azure (~> 0.6) - fog-core (~> 1.27) - fog-json (~> 1.0) - fog-xml (~> 0.1) - fog-core (1.42.0) - builder - excon (~> 0.49) - formatador (~> 0.2) - fog-google (0.3.2) - fog-core - fog-json - fog-xml - fog-json (1.0.2) - fog-core (~> 1.0) - multi_json (~> 1.10) - fog-local (0.3.0) - fog-core (~> 1.27) - fog-openstack (0.1.7) - fog-core (>= 1.40) - fog-json (>= 1.0) - ipaddress (>= 0.8) - fog-rackspace (0.1.1) - fog-core (>= 1.35) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.8) - fog-xml (0.1.2) - fog-core - nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.3.1) - railties (>= 3.2, < 5.1) - foreman (0.82.0) - thor (~> 0.19.1) - formatador (0.2.5) - fuubar (2.0.0) - rspec (~> 3.0) - ruby-progressbar (~> 1.4) - gemnasium-gitlab-service (0.2.6) - rugged (~> 0.21) - gemojione (2.6.1) - json - get_process_mem (0.2.1) - gherkin-ruby (0.3.2) - github-linguist (4.7.6) - charlock_holmes (~> 0.7.3) - escape_utils (~> 1.1.0) - mime-types (>= 1.19) - rugged (>= 0.23.0b) - github-markup (1.3.3) - gitlab-flowdock-git-hook (1.0.1) - flowdock (~> 0.7) - gitlab-grit (>= 2.4.1) - multi_json - gitlab-grit (2.8.1) - charlock_holmes (~> 0.6) - diff-lcs (~> 1.1) - mime-types (>= 1.16, < 3) - posix-spawn (~> 0.3) - gitlab_git (10.3.0) - activesupport (~> 4.0) - charlock_holmes (~> 0.7.3) - github-linguist (~> 4.7.0) - rugged (~> 0.24.0) - gitlab_meta (7.0) - gitlab_omniauth-ldap (1.2.1) - net-ldap (~> 0.9) - omniauth (~> 1.0) - pyu-ruby-sasl (~> 0.0.3.1) - rubyntlm (~> 0.3) - globalid (0.3.6) - activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.1) - gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.1.0) - github-markup (~> 1.3.3) - gollum-grit_adapter (~> 1.0) - nokogiri (~> 1.6.4) - rouge (~> 1.9) - sanitize (~> 2.1.0) - stringex (~> 2.5.1) - gollum-rugged_adapter (0.4.2) - mime-types (>= 1.15) - rugged (~> 0.24.0, >= 0.21.3) - gon (6.0.1) - actionpack (>= 3.0) - json - multi_json - request_store (>= 1.0) - grape (0.13.0) - activesupport - builder - hashie (>= 2.1.0) - multi_json (>= 1.3.2) - multi_xml (>= 0.5.2) - rack (>= 1.3.0) - rack-accept - rack-mount - virtus (>= 1.0.0) - grape-entity (0.4.8) - activesupport - multi_json (>= 1.3.2) - hamlit (2.5.0) - temple (~> 0.7.6) - thor - tilt - hashie (3.4.4) - health_check (1.5.1) - rails (>= 2.3.0) - hipchat (1.5.3) - httparty - mimemagic - html-pipeline (1.11.0) - activesupport (>= 2) - nokogiri (~> 1.4) - htmlentities (4.3.4) - http_parser.rb (0.5.3) - httparty (0.13.7) - json (~> 1.8) - multi_xml (>= 0.5.2) - httpclient (2.8.0) - i18n (0.7.0) - ice_nine (0.11.2) - influxdb (0.3.5) - cause - json - ipaddress (0.8.3) - jquery-atwho-rails (1.3.2) - jquery-rails (4.1.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - jquery-turbolinks (2.1.0) - railties (>= 3.1.0) - turbolinks - jquery-ui-rails (5.0.5) - railties (>= 3.2.16) - json (1.8.3) - jwt (1.5.4) - kaminari (0.17.0) - actionpack (>= 3.0.0) - activesupport (>= 3.0.0) - kgio (2.10.0) - knapsack (1.11.1) - rake - timecop (>= 0.1.0) - launchy (2.4.3) - addressable (~> 2.3) - letter_opener (1.4.1) - launchy (~> 2.2) - letter_opener_web (1.3.0) - actionmailer (>= 3.2) - letter_opener (~> 1.0) - railties (>= 3.2) - license_finder (2.1.2) - bundler - httparty - rubyzip - thor - xml-simple - licensee (8.0.0) - rugged (>= 0.24b) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.0.3) - nokogiri (>= 1.5.9) - macaddr (1.7.1) - systemu (~> 2.6.2) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mail_room (0.8.0) - method_source (0.8.2) - mime-types (2.99.2) - mimemagic (0.3.1) - mini_portile2 (2.1.0) - minitest (5.7.0) - mousetrap-rails (1.4.6) - multi_json (1.12.1) - multi_xml (0.5.5) - multipart-post (2.0.0) - mysql2 (0.3.21) - nested_form (0.3.2) - net-ldap (0.14.0) - net-ssh (3.0.2) - newrelic_rpm (3.16.0.318) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - numerizer (0.1.1) - oauth (0.5.1) - oauth2 (1.0.0) - faraday (>= 0.8, < 0.10) - jwt (~> 1.0) - multi_json (~> 1.3) - multi_xml (~> 0.5) - rack (~> 1.2) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) - omniauth (1.3.1) - hashie (>= 1.2, < 4) - rack (>= 1.0, < 3) - omniauth-auth0 (1.4.2) - omniauth-oauth2 (~> 1.1) - omniauth-azure-oauth2 (0.0.6) - jwt (~> 1.0) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-bitbucket (0.0.2) - multi_json (~> 1.7) - omniauth (~> 1.1) - omniauth-oauth (~> 1.0) - omniauth-cas3 (1.1.3) - addressable (~> 2.3) - nokogiri (~> 1.6.6) - omniauth (~> 1.2) - omniauth-facebook (3.0.0) - omniauth-oauth2 (~> 1.2) - omniauth-github (1.1.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.2) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.0) - omniauth-google-oauth2 (0.2.10) - addressable (~> 2.3) - jwt (~> 1.0) - multi_json (~> 1.3) - omniauth (>= 1.1.1) - omniauth-oauth2 (~> 1.3.1) - omniauth-kerberos (0.3.0) - omniauth-multipassword - timfel-krb5-auth (~> 0.8) - omniauth-multipassword (0.4.2) - omniauth (~> 1.0) - omniauth-oauth (1.1.0) - oauth - omniauth (~> 1.0) - omniauth-oauth2 (1.3.1) - oauth2 (~> 1.0) - omniauth (~> 1.2) - omniauth-saml (1.6.0) - omniauth (~> 1.3) - ruby-saml (~> 1.3) - omniauth-shibboleth (1.2.1) - omniauth (>= 1.0.0) - omniauth-twitter (1.2.1) - json (~> 1.3) - omniauth-oauth (~> 1.1) - omniauth_crowd (2.2.3) - activesupport - nokogiri (>= 1.4.4) - omniauth (~> 1.0) - org-ruby (0.9.12) - rubypants (~> 0.2) - orm_adapter (0.5.0) - paranoia (2.1.5) - activerecord (~> 4.0) - parser (2.3.1.2) - ast (~> 2.2) - path_expander (1.0.0) - pg (0.18.4) - pkg-config (1.1.7) - poltergeist (1.9.0) - capybara (~> 2.1) - cliver (~> 0.3.1) - multi_json (~> 1.0) - websocket-driver (>= 0.2.0) - posix-spawn (0.3.11) - powerpack (0.1.1) - premailer (1.8.7) - css_parser (>= 1.4.5) - htmlentities (>= 4.0.0) - premailer-rails (1.9.4) - actionmailer (>= 3, < 6) - premailer (~> 1.7, >= 1.7.9) - pry (0.10.3) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-rails (0.3.4) - pry (>= 0.9.10) - pyu-ruby-sasl (0.0.3.3) - rack (1.6.4) - rack-accept (0.4.5) - rack (>= 0.4) - rack-attack (4.3.1) - rack - rack-cors (0.4.0) - rack-mount (0.8.3) - rack (>= 1.0.0) - rack-oauth2 (1.2.3) - activesupport (>= 2.3) - attr_required (>= 0.0.5) - httpclient (>= 2.4) - multi_json (>= 1.3.6) - rack (>= 1.1) - rack-protection (1.5.3) - rack - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.6) - actionmailer (= 4.2.6) - actionpack (= 4.2.6) - actionview (= 4.2.6) - activejob (= 4.2.6) - activemodel (= 4.2.6) - activerecord (= 4.2.6) - activesupport (= 4.2.6) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.6) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) - railties (4.2.6) - actionpack (= 4.2.6) - activesupport (= 4.2.6) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) - raindrops (0.16.0) - rake (10.5.0) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) - ffi (>= 0.5.0) - rblineprof (0.3.6) - debugger-ruby_core_source (~> 1.3) - rdoc (3.12.2) - json (~> 1.4) - recaptcha (3.3.0) - json - redcarpet (3.3.4) - redis (3.3.0) - redis-actionpack (4.0.1) - actionpack (~> 4) - redis-rack (~> 1.5.0) - redis-store (~> 1.1.0) - redis-activesupport (4.1.5) - activesupport (>= 3, < 5) - redis-store (~> 1.1.0) - redis-namespace (1.5.2) - redis (~> 3.0, >= 3.0.4) - redis-rack (1.5.0) - rack (~> 1.5) - redis-store (~> 1.1.0) - redis-rails (4.0.0) - redis-actionpack (~> 4) - redis-activesupport (~> 4) - redis-store (~> 1.1.0) - redis-store (1.1.7) - redis (>= 2.2) - request_store (1.3.1) - rerun (0.11.0) - listen (~> 3.0) - responders (2.2.0) - railties (>= 4.2.0, < 5.1) - rinku (2.0.0) - rotp (2.1.2) - rouge (1.11.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) - rqrcode-rails3 (0.1.7) - rqrcode (>= 0.4.2) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.1) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-retry (0.4.5) - rspec-core - rspec-support (3.5.0) - rubocop (0.40.0) - parser (>= 2.3.1.0, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-rspec (1.5.0) - rubocop (>= 0.40.0) - ruby-fogbugz (0.2.1) - crack (~> 0.4) - ruby-progressbar (1.8.1) - ruby-saml (1.3.0) - nokogiri (>= 1.5.10) - ruby_dep (1.3.1) - ruby_parser (3.8.2) - sexp_processor (~> 4.1) - rubyntlm (0.6.0) - rubypants (0.2.0) - rubyzip (1.2.0) - rufus-scheduler (3.2.1) - rugged (0.24.0) - safe_yaml (1.0.4) - sanitize (2.1.0) - nokogiri (>= 1.4.4) - sass (3.4.22) - sass-rails (5.0.5) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) - scss_lint (0.47.1) - rake (>= 0.9, < 11) - sass (~> 3.4.15) - sdoc (0.3.20) - json (>= 1.1.3) - rdoc (~> 3.10) - seed-fu (2.3.6) - activerecord (>= 3.1) - activesupport (>= 3.1) - select2-rails (3.5.10) - thor (~> 0.14) - sentry-raven (1.1.0) - faraday (>= 0.7.6) - settingslogic (2.0.9) - sexp_processor (4.7.0) - sham_rack (1.3.6) - rack - shoulda-matchers (2.8.0) - activesupport (>= 3.0.0) - sidekiq (4.1.4) - concurrent-ruby (~> 1.0) - connection_pool (~> 2.2, >= 2.2.0) - redis (~> 3.2, >= 3.2.1) - sinatra (>= 1.4.7) - sidekiq-cron (0.4.2) - redis-namespace (>= 1.5.2) - rufus-scheduler (>= 2.0.24) - sidekiq (>= 4.0.0) - simple_oauth (0.1.9) - simplecov (0.11.2) - docile (~> 1.1.0) - json (~> 1.8) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - six (0.2.0) - slack-notifier (1.2.1) - slop (3.6.0) - spinach (0.8.10) - colorize - gherkin-ruby (>= 0.3.2) - json - spinach-rails (0.2.1) - capybara (>= 2.0.0) - railties (>= 3) - spinach (>= 0.4) - spinach-rerun-reporter (0.0.2) - spinach (~> 0.8) - spring (1.7.2) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) - spring-commands-spinach (1.1.0) - spring (>= 0.9.1) - spring-commands-teaspoon (0.0.2) - spring (>= 0.9.1) - sprockets (3.6.3) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.1.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - state_machines (0.4.0) - state_machines-activemodel (0.4.0) - activemodel (>= 4.1, < 5.1) - state_machines (>= 0.4.0) - state_machines-activerecord (0.4.0) - activerecord (>= 4.1, < 5.1) - state_machines-activemodel (>= 0.3.0) - stringex (2.5.2) - sys-filesystem (1.1.6) - ffi - systemu (2.6.5) - task_list (1.0.2) - html-pipeline - teaspoon (1.1.5) - railties (>= 3.2.5, < 6) - teaspoon-jasmine (2.2.0) - teaspoon (>= 1.0.0) - temple (0.7.7) - test_after_commit (0.4.2) - activerecord (>= 3.2) - thin (1.7.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.5) - timecop (0.8.1) - timfel-krb5-auth (0.8.3) - tinder (1.10.1) - eventmachine (~> 1.0) - faraday (~> 0.9.0) - faraday_middleware (~> 0.9) - hashie (>= 1.0) - json (~> 1.8.0) - mime-types - multi_json (~> 1.7) - twitter-stream (~> 0.1) - turbolinks (2.5.3) - coffee-rails - twitter-stream (0.1.16) - eventmachine (>= 0.12.8) - http_parser.rb (~> 0.5.1) - simple_oauth (~> 0.1.4) - tzinfo (1.2.2) - thread_safe (~> 0.1) - u2f (0.2.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - underscore-rails (1.8.3) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.2) - unicode-display_width (1.1.0) - unicorn (4.9.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - unicorn-worker-killer (0.4.4) - get_process_mem (~> 0) - unicorn (>= 4, < 6) - uniform_notifier (1.10.0) - uuid (2.3.8) - macaddr (~> 1.0) - version_sorter (2.0.0) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - vmstat (2.1.0) - warden (1.2.6) - rack (>= 1.0) - web-console (2.3.0) - activemodel (>= 4.0) - binding_of_caller (>= 0.7.2) - railties (>= 4.0) - sprockets-rails (>= 2.0, < 4.0) - webmock (1.21.0) - addressable (>= 2.3.6) - crack (>= 0.3.2) - websocket-driver (0.6.4) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) - wikicloth (0.8.1) - builder - expression_parser - rinku - xml-simple (1.1.5) - xpath (2.0.0) - nokogiri (~> 1.3) - -PLATFORMS - ruby - -DEPENDENCIES - RedCloth (~> 4.3.2) - ace-rails-ap (~> 4.0.2) - activerecord-session_store (~> 1.0.0) - acts-as-taggable-on (~> 3.4) - addressable (~> 2.3.8) - after_commit_queue - akismet (~> 2.0) - allocations (~> 1.0) - asana (~> 0.4.0) - asciidoctor (~> 1.5.2) - attr_encrypted (~> 3.0.0) - awesome_print (~> 1.2.0) - babosa (~> 1.0.2) - base32 (~> 0.3.0) - benchmark-ips - better_errors (~> 1.0.1) - binding_of_caller (~> 0.7.2) - bootstrap-sass (~> 3.3.0) - brakeman (~> 3.3.0) - browser (~> 2.2) - bullet - bundler-audit - byebug - capybara (~> 2.6.2) - capybara-screenshot (~> 1.0.0) - carrierwave (~> 0.10.0) - charlock_holmes (~> 0.7.3) - chronic_duration (~> 0.10.6) - coffee-rails (~> 4.1.0) - connection_pool (~> 2.0) - creole (~> 0.5.0) - d3_rails (~> 3.5.0) - database_cleaner (~> 1.4.0) - default_value_for (~> 3.0.0) - devise (~> 4.0) - devise-two-factor (~> 3.0.0) - diffy (~> 3.0.3) - doorkeeper (~> 4.0) - dropzonejs-rails (~> 0.7.1) - email_reply_parser (~> 0.5.8) - email_spec (~> 1.6.0) - factory_girl_rails (~> 4.6.0) - ffaker (~> 2.0.0) - flay - flog - fog-aws (~> 0.9) - fog-azure (~> 0.0) - fog-core (~> 1.40) - fog-google (~> 0.3) - fog-local (~> 0.3) - fog-openstack (~> 0.1) - fog-rackspace (~> 0.1.1) - font-awesome-rails (~> 4.6.1) - foreman - fuubar (~> 2.0.0) - gemnasium-gitlab-service (~> 0.2) - gemojione (~> 2.6) - github-linguist (~> 4.7.0) - github-markup (~> 1.3.1) - gitlab-flowdock-git-hook (~> 1.0.1) - gitlab_git (~> 10.2) - gitlab_meta (= 7.0) - gitlab_omniauth-ldap (~> 1.2.1) - gollum-lib (~> 4.1.0) - gollum-rugged_adapter (~> 0.4.2) - gon (~> 6.0.1) - grape (~> 0.13.0) - grape-entity (~> 0.4.2) - hamlit (~> 2.5) - health_check (~> 1.5.1) - hipchat (~> 1.5.0) - html-pipeline (~> 1.11.0) - httparty (~> 0.13.3) - influxdb (~> 0.2) - jquery-atwho-rails (~> 1.3.2) - jquery-rails (~> 4.1.0) - jquery-turbolinks (~> 2.1.0) - jquery-ui-rails (~> 5.0.0) - jwt - kaminari (~> 0.17.0) - knapsack - letter_opener_web (~> 1.3.0) - license_finder - licensee (~> 8.0.0) - loofah (~> 2.0.3) - mail_room (~> 0.8) - method_source (~> 0.8) - minitest (~> 5.7.0) - mousetrap-rails (~> 1.4.6) - mysql2 (~> 0.3.16) - nested_form (~> 0.3.2) - net-ssh (~> 3.0.1) - newrelic_rpm (~> 3.14) - nokogiri (~> 1.6.7, >= 1.6.7.2) - oauth2 (~> 1.0.0) - octokit (~> 4.3.0) - omniauth (~> 1.3.1) - omniauth-auth0 (~> 1.4.1) - omniauth-azure-oauth2 (~> 0.0.6) - omniauth-bitbucket (~> 0.0.2) - omniauth-cas3 (~> 1.1.2) - omniauth-facebook (~> 3.0.0) - omniauth-github (~> 1.1.1) - omniauth-gitlab (~> 1.0.0) - omniauth-google-oauth2 (~> 0.2.0) - omniauth-kerberos (~> 0.3.0) - omniauth-saml (~> 1.6.0) - omniauth-shibboleth (~> 1.2.0) - omniauth-twitter (~> 1.2.0) - omniauth_crowd (~> 2.2.0) - org-ruby (~> 0.9.12) - paranoia (~> 2.0) - pg (~> 0.18.2) - poltergeist (~> 1.9.0) - premailer-rails (~> 1.9.0) - pry-rails - rack-attack (~> 4.3.1) - rack-cors (~> 0.4.0) - rack-oauth2 (~> 1.2.1) - rails (= 4.2.6) - rails-deprecated_sanitizer (~> 1.0.3) - rainbow (~> 2.1.0) - rblineprof - rdoc (~> 3.6) - recaptcha (~> 3.0) - redcarpet (~> 3.3.3) - redis (~> 3.2) - redis-namespace - redis-rails (~> 4.0.0) - request_store (~> 1.3.0) - rerun (~> 0.11.0) - responders (~> 2.0) - rouge (~> 1.11) - rqrcode-rails3 (~> 0.1.7) - rspec-rails (~> 3.5.0) - rspec-retry - rubocop (~> 0.40.0) - rubocop-rspec (~> 1.5.0) - ruby-fogbugz (~> 0.2.1) - sanitize (~> 2.0) - sass-rails (~> 5.0.0) - scss_lint (~> 0.47.0) - sdoc (~> 0.3.20) - seed-fu (~> 2.3.5) - select2-rails (~> 3.5.9) - sentry-raven (~> 1.1.0) - settingslogic (~> 2.0.9) - sham_rack - shoulda-matchers (~> 2.8.0) - sidekiq (~> 4.0) - sidekiq-cron (~> 0.4.0) - simplecov (~> 0.11.0) - sinatra (~> 1.4.4) - six (~> 0.2.0) - slack-notifier (~> 1.2.0) - spinach-rails (~> 0.2.1) - spinach-rerun-reporter (~> 0.0.2) - spring (~> 1.7.0) - spring-commands-rspec (~> 1.0.4) - spring-commands-spinach (~> 1.1.0) - spring-commands-teaspoon (~> 0.0.2) - sprockets (~> 3.6.0) - state_machines-activerecord (~> 0.4.0) - sys-filesystem (~> 1.1.6) - task_list (~> 1.0.2) - teaspoon (~> 1.1.0) - teaspoon-jasmine (~> 2.2.0) - test_after_commit (~> 0.4.2) - thin (~> 1.7.0) - tinder (~> 1.10.0) - turbolinks (~> 2.5.0) - u2f (~> 0.2.1) - uglifier (~> 2.7.2) - underscore-rails (~> 1.8.0) - unf (~> 0.1.4) - unicorn (~> 4.9.0) - unicorn-worker-killer (~> 0.4.2) - version_sorter (~> 2.0.0) - virtus (~> 1.0.1) - vmstat (~> 2.1.0) - web-console (~> 2.0) - webmock (~> 1.21.0) - wikicloth (= 0.8.1) - -BUNDLED WITH - 1.12.5 -- cgit v1.2.1 From e167c94123fce673084cb641962c97e02d70bd91 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 8 Jul 2016 13:41:26 +0100 Subject: adds Gemfile.lock --- Gemfile.lock | 989 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 989 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000000..055596b056f --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,989 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.3.2) + ace-rails-ap (4.0.2) + actionmailer (4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.6) + actionview (= 4.2.6) + activesupport (= 4.2.6) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.6) + activesupport (= 4.2.6) + globalid (>= 0.3.0) + activemodel (4.2.6) + activesupport (= 4.2.6) + builder (~> 3.1) + activerecord (4.2.6) + activemodel (= 4.2.6) + activesupport (= 4.2.6) + arel (~> 6.0) + activerecord-session_store (1.0.0) + actionpack (>= 4.0, < 5.1) + activerecord (>= 4.0, < 5.1) + multi_json (~> 1.11, >= 1.11.2) + rack (>= 1.5.2, < 3) + railties (>= 4.0, < 5.1) + activesupport (4.2.6) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + acts-as-taggable-on (3.5.0) + activerecord (>= 3.2, < 5) + addressable (2.3.8) + after_commit_queue (1.3.0) + activerecord (>= 3.0) + akismet (2.0.0) + allocations (1.0.5) + arel (6.0.3) + asana (0.4.0) + faraday (~> 0.9) + faraday_middleware (~> 0.9) + faraday_middleware-multi_json (~> 0.0) + oauth2 (~> 1.0) + asciidoctor (1.5.3) + ast (2.2.0) + attr_encrypted (3.0.1) + encryptor (~> 3.0.0) + attr_required (1.0.0) + autoprefixer-rails (6.2.3) + execjs + json + awesome_print (1.2.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + azure (0.7.5) + addressable (~> 2.3) + azure-core (~> 0.1) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + json (~> 1.8) + mime-types (>= 1, < 3.0) + nokogiri (~> 1.6) + systemu (~> 2.6) + thor (~> 0.19) + uuid (~> 2.0) + azure-core (0.1.2) + faraday (~> 0.9) + faraday_middleware (~> 0.10) + nokogiri (~> 1.6) + babosa (1.0.2) + base32 (0.3.2) + bcrypt (3.1.11) + benchmark-ips (2.3.0) + better_errors (1.0.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + bootstrap-sass (3.3.6) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + brakeman (3.3.2) + browser (2.2.0) + builder (3.2.2) + bullet (5.0.0) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.9.0) + bundler-audit (0.5.0) + bundler (~> 1.2) + thor (~> 0.18) + byebug (8.2.1) + capybara (2.6.2) + addressable + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + capybara-screenshot (1.0.11) + capybara (>= 1.0, < 3) + launchy + carrierwave (0.10.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + mime-types (>= 1.16) + cause (0.1) + charlock_holmes (0.7.3) + chronic_duration (0.10.6) + numerizer (~> 0.1.1) + chunky_png (1.3.5) + cliver (0.3.2) + coderay (1.1.0) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + coffee-rails (4.1.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.1.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorize (0.7.7) + concurrent-ruby (1.0.2) + connection_pool (2.2.0) + crack (0.4.3) + safe_yaml (~> 1.0.0) + creole (0.5.0) + css_parser (1.4.1) + addressable + d3_rails (3.5.11) + railties (>= 3.1.0) + daemons (1.2.3) + database_cleaner (1.4.1) + debug_inspector (0.0.2) + debugger-ruby_core_source (1.3.8) + default_value_for (3.0.1) + activerecord (>= 3.2.0, < 5.0) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + devise (4.1.1) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 5.1) + responders + warden (~> 1.2.3) + devise-two-factor (3.0.0) + activesupport + attr_encrypted (>= 1.3, < 4, != 2) + devise (~> 4.0) + railties + rotp (~> 2.0) + diff-lcs (1.2.5) + diffy (3.0.7) + docile (1.1.5) + doorkeeper (4.0.0) + railties (>= 4.2) + dropzonejs-rails (0.7.2) + rails (> 3.1) + email_reply_parser (0.5.8) + email_spec (1.6.0) + launchy (~> 2.1) + mail (~> 2.2) + encryptor (3.0.0) + equalizer (0.0.11) + erubis (2.7.0) + escape_utils (1.1.1) + eventmachine (1.0.8) + excon (0.49.0) + execjs (2.6.0) + expression_parser (0.9.0) + factory_girl (4.5.0) + activesupport (>= 3.0.0) + factory_girl_rails (4.6.0) + factory_girl (~> 4.5.0) + railties (>= 3.0.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) + faraday_middleware-multi_json (0.0.6) + faraday_middleware + multi_json + ffaker (2.0.0) + ffi (1.9.10) + flay (2.6.1) + ruby_parser (~> 3.0) + sexp_processor (~> 4.0) + flog (4.3.2) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.4) + flowdock (0.7.1) + httparty (~> 0.7) + multi_json + fog-aws (0.9.2) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-azure (0.0.2) + azure (~> 0.6) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + fog-core (1.40.0) + builder + excon (~> 0.49) + formatador (~> 0.2) + fog-google (0.3.2) + fog-core + fog-json + fog-xml + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-local (0.3.0) + fog-core (~> 1.27) + fog-openstack (0.1.6) + fog-core (>= 1.39) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-rackspace (0.1.1) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-xml (0.1.2) + fog-core + nokogiri (~> 1.5, >= 1.5.11) + font-awesome-rails (4.6.1.0) + railties (>= 3.2, < 5.1) + foreman (0.78.0) + thor (~> 0.19.1) + formatador (0.2.5) + fuubar (2.0.0) + rspec (~> 3.0) + ruby-progressbar (~> 1.4) + gemnasium-gitlab-service (0.2.6) + rugged (~> 0.21) + gemojione (2.6.1) + json + get_process_mem (0.2.0) + gherkin-ruby (0.3.2) + github-linguist (4.7.6) + charlock_holmes (~> 0.7.3) + escape_utils (~> 1.1.0) + mime-types (>= 1.19) + rugged (>= 0.23.0b) + github-markup (1.3.3) + gitlab-flowdock-git-hook (1.0.1) + flowdock (~> 0.7) + gitlab-grit (>= 2.4.1) + multi_json + gitlab-grit (2.8.1) + charlock_holmes (~> 0.6) + diff-lcs (~> 1.1) + mime-types (>= 1.16, < 3) + posix-spawn (~> 0.3) + gitlab_git (10.2.3) + activesupport (~> 4.0) + charlock_holmes (~> 0.7.3) + github-linguist (~> 4.7.0) + rugged (~> 0.24.0) + gitlab_meta (7.0) + gitlab_omniauth-ldap (1.2.1) + net-ldap (~> 0.9) + omniauth (~> 1.0) + pyu-ruby-sasl (~> 0.0.3.1) + rubyntlm (~> 0.3) + globalid (0.3.6) + activesupport (>= 4.1.0) + gollum-grit_adapter (1.0.0) + gitlab-grit (~> 2.7, >= 2.7.1) + gollum-lib (4.1.0) + github-markup (~> 1.3.3) + gollum-grit_adapter (~> 1.0) + nokogiri (~> 1.6.4) + rouge (~> 1.9) + sanitize (~> 2.1.0) + stringex (~> 2.5.1) + gollum-rugged_adapter (0.4.2) + mime-types (>= 1.15) + rugged (~> 0.24.0, >= 0.21.3) + gon (6.0.1) + actionpack (>= 3.0) + json + multi_json + request_store (>= 1.0) + grape (0.13.0) + activesupport + builder + hashie (>= 2.1.0) + multi_json (>= 1.3.2) + multi_xml (>= 0.5.2) + rack (>= 1.3.0) + rack-accept + rack-mount + virtus (>= 1.0.0) + grape-entity (0.4.8) + activesupport + multi_json (>= 1.3.2) + hamlit (2.5.0) + temple (~> 0.7.6) + thor + tilt + hashie (3.4.3) + health_check (1.5.1) + rails (>= 2.3.0) + hipchat (1.5.2) + httparty + mimemagic + html-pipeline (1.11.0) + activesupport (>= 2) + nokogiri (~> 1.4) + htmlentities (4.3.4) + http_parser.rb (0.5.3) + httparty (0.13.7) + json (~> 1.8) + multi_xml (>= 0.5.2) + httpclient (2.7.0.1) + i18n (0.7.0) + ice_nine (0.11.1) + influxdb (0.2.3) + cause + json + ipaddress (0.8.3) + jquery-atwho-rails (1.3.2) + jquery-rails (4.1.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) + json (1.8.3) + jwt (1.5.4) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) + kgio (2.10.0) + knapsack (1.11.0) + rake + timecop (>= 0.1.0) + launchy (2.4.3) + addressable (~> 2.3) + letter_opener (1.4.1) + launchy (~> 2.2) + letter_opener_web (1.3.0) + actionmailer (>= 3.2) + letter_opener (~> 1.0) + railties (>= 3.2) + license_finder (2.1.0) + bundler + httparty + rubyzip + thor + xml-simple + licensee (8.0.0) + rugged (>= 0.24b) + listen (3.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + loofah (2.0.3) + nokogiri (>= 1.5.9) + macaddr (1.7.1) + systemu (~> 2.6.2) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mail_room (0.8.0) + method_source (0.8.2) + mime-types (2.99.2) + mimemagic (0.3.0) + mini_portile2 (2.1.0) + minitest (5.7.0) + mousetrap-rails (1.4.6) + multi_json (1.12.1) + multi_xml (0.5.5) + multipart-post (2.0.0) + mysql2 (0.3.20) + nested_form (0.3.2) + net-ldap (0.12.1) + net-ssh (3.0.1) + newrelic_rpm (3.14.1.311) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + numerizer (0.1.1) + oauth (0.4.7) + oauth2 (1.2.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (>= 1.2, < 3) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) + omniauth (1.3.1) + hashie (>= 1.2, < 4) + rack (>= 1.0, < 3) + omniauth-auth0 (1.4.1) + omniauth-oauth2 (~> 1.1) + omniauth-azure-oauth2 (0.0.6) + jwt (~> 1.0) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-bitbucket (0.0.2) + multi_json (~> 1.7) + omniauth (~> 1.1) + omniauth-oauth (~> 1.0) + omniauth-cas3 (1.1.3) + addressable (~> 2.3) + nokogiri (~> 1.6.6) + omniauth (~> 1.2) + omniauth-facebook (3.0.0) + omniauth-oauth2 (~> 1.2) + omniauth-github (1.1.2) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.1) + omniauth-gitlab (1.0.1) + omniauth (~> 1.0) + omniauth-oauth2 (~> 1.0) + omniauth-google-oauth2 (0.2.10) + addressable (~> 2.3) + jwt (~> 1.0) + multi_json (~> 1.3) + omniauth (>= 1.1.1) + omniauth-oauth2 (~> 1.3.1) + omniauth-kerberos (0.3.0) + omniauth-multipassword + timfel-krb5-auth (~> 0.8) + omniauth-multipassword (0.4.2) + omniauth (~> 1.0) + omniauth-oauth (1.1.0) + oauth + omniauth (~> 1.0) + omniauth-oauth2 (1.3.1) + oauth2 (~> 1.0) + omniauth (~> 1.2) + omniauth-saml (1.6.0) + omniauth (~> 1.3) + ruby-saml (~> 1.3) + omniauth-shibboleth (1.2.1) + omniauth (>= 1.0.0) + omniauth-twitter (1.2.1) + json (~> 1.3) + omniauth-oauth (~> 1.1) + omniauth_crowd (2.2.3) + activesupport + nokogiri (>= 1.4.4) + omniauth (~> 1.0) + org-ruby (0.9.12) + rubypants (~> 0.2) + orm_adapter (0.5.0) + paranoia (2.1.4) + activerecord (~> 4.0) + parser (2.3.1.0) + ast (~> 2.2) + pg (0.18.4) + pkg-config (1.1.7) + poltergeist (1.9.0) + capybara (~> 2.1) + cliver (~> 0.3.1) + multi_json (~> 1.0) + websocket-driver (>= 0.2.0) + posix-spawn (0.3.11) + powerpack (0.1.1) + premailer (1.8.6) + css_parser (>= 1.3.6) + htmlentities (>= 4.0.0) + premailer-rails (1.9.2) + actionmailer (>= 3, < 6) + premailer (~> 1.7, >= 1.7.9) + pry (0.10.3) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.4) + pry (>= 0.9.10) + pyu-ruby-sasl (0.0.3.3) + rack (1.6.4) + rack-accept (0.4.5) + rack (>= 0.4) + rack-attack (4.3.1) + rack + rack-cors (0.4.0) + rack-mount (0.8.3) + rack (>= 1.0.0) + rack-oauth2 (1.2.1) + activesupport (>= 2.3) + attr_required (>= 0.0.5) + httpclient (>= 2.4) + multi_json (>= 1.3.6) + rack (>= 1.1) + rack-protection (1.5.3) + rack + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.6) + actionmailer (= 4.2.6) + actionpack (= 4.2.6) + actionview (= 4.2.6) + activejob (= 4.2.6) + activemodel (= 4.2.6) + activerecord (= 4.2.6) + activesupport (= 4.2.6) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.6) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (4.2.6) + actionpack (= 4.2.6) + activesupport (= 4.2.6) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rainbow (2.1.0) + raindrops (0.15.0) + rake (10.5.0) + rb-fsevent (0.9.6) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rblineprof (0.3.6) + debugger-ruby_core_source (~> 1.3) + rdoc (3.12.2) + json (~> 1.4) + recaptcha (3.0.0) + json + redcarpet (3.3.3) + redis (3.2.2) + redis-actionpack (4.0.1) + actionpack (~> 4) + redis-rack (~> 1.5.0) + redis-store (~> 1.1.0) + redis-activesupport (4.1.5) + activesupport (>= 3, < 5) + redis-store (~> 1.1.0) + redis-namespace (1.5.2) + redis (~> 3.0, >= 3.0.4) + redis-rack (1.5.0) + rack (~> 1.5) + redis-store (~> 1.1.0) + redis-rails (4.0.0) + redis-actionpack (~> 4) + redis-activesupport (~> 4) + redis-store (~> 1.1.0) + redis-store (1.1.7) + redis (>= 2.2) + request_store (1.3.0) + rerun (0.11.0) + listen (~> 3.0) + responders (2.1.1) + railties (>= 4.2.0, < 5.1) + rinku (2.0.0) + rotp (2.1.2) + rouge (1.11.0) + rqrcode (0.7.0) + chunky_png + rqrcode-rails3 (0.1.7) + rqrcode (>= 0.4.2) + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-core (3.5.0) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-retry (0.4.5) + rspec-core + rspec-support (3.5.0) + rubocop (0.40.0) + parser (>= 2.3.1.0, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + rubocop-rspec (1.5.0) + rubocop (>= 0.40.0) + ruby-fogbugz (0.2.1) + crack (~> 0.4) + ruby-progressbar (1.8.1) + ruby-saml (1.3.0) + nokogiri (>= 1.5.10) + ruby_parser (3.8.2) + sexp_processor (~> 4.1) + rubyntlm (0.5.2) + rubypants (0.2.0) + rubyzip (1.2.0) + rufus-scheduler (3.1.10) + rugged (0.24.0) + safe_yaml (1.0.4) + sanitize (2.1.0) + nokogiri (>= 1.4.4) + sass (3.4.22) + sass-rails (5.0.5) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) + faraday (~> 0.8, < 0.10) + scss_lint (0.47.1) + rake (>= 0.9, < 11) + sass (~> 3.4.15) + sdoc (0.3.20) + json (>= 1.1.3) + rdoc (~> 3.10) + seed-fu (2.3.6) + activerecord (>= 3.1) + activesupport (>= 3.1) + select2-rails (3.5.9.3) + thor (~> 0.14) + sentry-raven (1.1.0) + faraday (>= 0.7.6) + settingslogic (2.0.9) + sexp_processor (4.7.0) + sham_rack (1.3.6) + rack + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + sidekiq (4.1.4) + concurrent-ruby (~> 1.0) + connection_pool (~> 2.2, >= 2.2.0) + redis (~> 3.2, >= 3.2.1) + sinatra (>= 1.4.7) + sidekiq-cron (0.4.0) + redis-namespace (>= 1.5.2) + rufus-scheduler (>= 2.0.24) + sidekiq (>= 4.0.0) + simple_oauth (0.1.9) + simplecov (0.11.2) + docile (~> 1.1.0) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + sinatra (1.4.7) + rack (~> 1.5) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + six (0.2.0) + slack-notifier (1.2.1) + slop (3.6.0) + spinach (0.8.10) + colorize + gherkin-ruby (>= 0.3.2) + json + spinach-rails (0.2.1) + capybara (>= 2.0.0) + railties (>= 3) + spinach (>= 0.4) + spinach-rerun-reporter (0.0.2) + spinach (~> 0.8) + spring (1.7.2) + spring-commands-rspec (1.0.4) + spring (>= 0.9.1) + spring-commands-spinach (1.1.0) + spring (>= 0.9.1) + spring-commands-teaspoon (0.0.2) + spring (>= 0.9.1) + sprockets (3.6.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.1.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + state_machines (0.4.0) + state_machines-activemodel (0.4.0) + activemodel (>= 4.1, < 5.1) + state_machines (>= 0.4.0) + state_machines-activerecord (0.4.0) + activerecord (>= 4.1, < 5.1) + state_machines-activemodel (>= 0.3.0) + stringex (2.5.2) + sys-filesystem (1.1.6) + ffi + systemu (2.6.5) + task_list (1.0.2) + html-pipeline + teaspoon (1.1.5) + railties (>= 3.2.5, < 6) + teaspoon-jasmine (2.2.0) + teaspoon (>= 1.0.0) + temple (0.7.7) + test_after_commit (0.4.2) + activerecord (>= 3.2) + thin (1.7.0) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thor (0.19.1) + thread_safe (0.3.5) + tilt (2.0.5) + timecop (0.8.1) + timfel-krb5-auth (0.8.3) + tinder (1.10.1) + eventmachine (~> 1.0) + faraday (~> 0.9.0) + faraday_middleware (~> 0.9) + hashie (>= 1.0) + json (~> 1.8.0) + mime-types + multi_json (~> 1.7) + twitter-stream (~> 0.1) + turbolinks (2.5.3) + coffee-rails + twitter-stream (0.1.16) + eventmachine (>= 0.12.8) + http_parser.rb (~> 0.5.1) + simple_oauth (~> 0.1.4) + tzinfo (1.2.2) + thread_safe (~> 0.1) + u2f (0.2.1) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + underscore-rails (1.8.3) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) + unicode-display_width (1.0.5) + unicorn (4.9.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + unicorn-worker-killer (0.4.4) + get_process_mem (~> 0) + unicorn (>= 4, < 6) + uniform_notifier (1.9.0) + uuid (2.3.8) + macaddr (~> 1.0) + version_sorter (2.0.0) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + vmstat (2.1.0) + warden (1.2.6) + rack (>= 1.0) + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) + webmock (1.21.0) + addressable (>= 2.3.6) + crack (>= 0.3.2) + websocket-driver (0.6.3) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + wikicloth (0.8.1) + builder + expression_parser + rinku + xml-simple (1.1.5) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + RedCloth (~> 4.3.2) + ace-rails-ap (~> 4.0.2) + activerecord-session_store (~> 1.0.0) + acts-as-taggable-on (~> 3.4) + addressable (~> 2.3.8) + after_commit_queue + akismet (~> 2.0) + allocations (~> 1.0) + asana (~> 0.4.0) + asciidoctor (~> 1.5.2) + attr_encrypted (~> 3.0.0) + awesome_print (~> 1.2.0) + babosa (~> 1.0.2) + base32 (~> 0.3.0) + benchmark-ips + better_errors (~> 1.0.1) + binding_of_caller (~> 0.7.2) + bootstrap-sass (~> 3.3.0) + brakeman (~> 3.3.0) + browser (~> 2.2) + bullet + bundler-audit + byebug + capybara (~> 2.6.2) + capybara-screenshot (~> 1.0.0) + carrierwave (~> 0.10.0) + charlock_holmes (~> 0.7.3) + chronic_duration (~> 0.10.6) + coffee-rails (~> 4.1.0) + connection_pool (~> 2.0) + creole (~> 0.5.0) + d3_rails (~> 3.5.0) + database_cleaner (~> 1.4.0) + default_value_for (~> 3.0.0) + devise (~> 4.0) + devise-two-factor (~> 3.0.0) + diffy (~> 3.0.3) + doorkeeper (~> 4.0) + dropzonejs-rails (~> 0.7.1) + email_reply_parser (~> 0.5.8) + email_spec (~> 1.6.0) + factory_girl_rails (~> 4.6.0) + ffaker (~> 2.0.0) + flay + flog + fog-aws (~> 0.9) + fog-azure (~> 0.0) + fog-core (~> 1.40) + fog-google (~> 0.3) + fog-local (~> 0.3) + fog-openstack (~> 0.1) + fog-rackspace (~> 0.1.1) + font-awesome-rails (~> 4.6.1) + foreman + fuubar (~> 2.0.0) + gemnasium-gitlab-service (~> 0.2) + gemojione (~> 2.6) + github-linguist (~> 4.7.0) + github-markup (~> 1.3.1) + gitlab-flowdock-git-hook (~> 1.0.1) + gitlab_git (~> 10.2) + gitlab_meta (= 7.0) + gitlab_omniauth-ldap (~> 1.2.1) + gollum-lib (~> 4.1.0) + gollum-rugged_adapter (~> 0.4.2) + gon (~> 6.0.1) + grape (~> 0.13.0) + grape-entity (~> 0.4.2) + hamlit (~> 2.5) + health_check (~> 1.5.1) + hipchat (~> 1.5.0) + html-pipeline (~> 1.11.0) + httparty (~> 0.13.3) + influxdb (~> 0.2) + jquery-atwho-rails (~> 1.3.2) + jquery-rails (~> 4.1.0) + jquery-turbolinks (~> 2.1.0) + jquery-ui-rails (~> 5.0.0) + jwt + kaminari (~> 0.17.0) + knapsack + letter_opener_web (~> 1.3.0) + license_finder + licensee (~> 8.0.0) + loofah (~> 2.0.3) + mail_room (~> 0.8) + method_source (~> 0.8) + minitest (~> 5.7.0) + mousetrap-rails (~> 1.4.6) + mysql2 (~> 0.3.16) + nested_form (~> 0.3.2) + net-ssh (~> 3.0.1) + newrelic_rpm (~> 3.14) + nokogiri (~> 1.6.7, >= 1.6.7.2) + oauth2 (~> 1.2.0) + octokit (~> 4.3.0) + omniauth (~> 1.3.1) + omniauth-auth0 (~> 1.4.1) + omniauth-azure-oauth2 (~> 0.0.6) + omniauth-bitbucket (~> 0.0.2) + omniauth-cas3 (~> 1.1.2) + omniauth-facebook (~> 3.0.0) + omniauth-github (~> 1.1.1) + omniauth-gitlab (~> 1.0.0) + omniauth-google-oauth2 (~> 0.2.0) + omniauth-kerberos (~> 0.3.0) + omniauth-saml (~> 1.6.0) + omniauth-shibboleth (~> 1.2.0) + omniauth-twitter (~> 1.2.0) + omniauth_crowd (~> 2.2.0) + org-ruby (~> 0.9.12) + paranoia (~> 2.0) + pg (~> 0.18.2) + poltergeist (~> 1.9.0) + premailer-rails (~> 1.9.0) + pry-rails + rack-attack (~> 4.3.1) + rack-cors (~> 0.4.0) + rack-oauth2 (~> 1.2.1) + rails (= 4.2.6) + rails-deprecated_sanitizer (~> 1.0.3) + rainbow (~> 2.1.0) + rblineprof + rdoc (~> 3.6) + recaptcha (~> 3.0) + redcarpet (~> 3.3.3) + redis (~> 3.2) + redis-namespace + redis-rails (~> 4.0.0) + request_store (~> 1.3.0) + rerun (~> 0.11.0) + responders (~> 2.0) + rouge (~> 1.11) + rqrcode-rails3 (~> 0.1.7) + rspec-rails (~> 3.5.0) + rspec-retry + rubocop (~> 0.40.0) + rubocop-rspec (~> 1.5.0) + ruby-fogbugz (~> 0.2.1) + sanitize (~> 2.0) + sass-rails (~> 5.0.0) + scss_lint (~> 0.47.0) + sdoc (~> 0.3.20) + seed-fu (~> 2.3.5) + select2-rails (~> 3.5.9) + sentry-raven (~> 1.1.0) + settingslogic (~> 2.0.9) + sham_rack + shoulda-matchers (~> 2.8.0) + sidekiq (~> 4.0) + sidekiq-cron (~> 0.4.0) + simplecov (~> 0.11.0) + sinatra (~> 1.4.4) + six (~> 0.2.0) + slack-notifier (~> 1.2.0) + spinach-rails (~> 0.2.1) + spinach-rerun-reporter (~> 0.0.2) + spring (~> 1.7.0) + spring-commands-rspec (~> 1.0.4) + spring-commands-spinach (~> 1.1.0) + spring-commands-teaspoon (~> 0.0.2) + sprockets (~> 3.6.0) + state_machines-activerecord (~> 0.4.0) + sys-filesystem (~> 1.1.6) + task_list (~> 1.0.2) + teaspoon (~> 1.1.0) + teaspoon-jasmine (~> 2.2.0) + test_after_commit (~> 0.4.2) + thin (~> 1.7.0) + tinder (~> 1.10.0) + turbolinks (~> 2.5.0) + u2f (~> 0.2.1) + uglifier (~> 2.7.2) + underscore-rails (~> 1.8.0) + unf (~> 0.1.4) + unicorn (~> 4.9.0) + unicorn-worker-killer (~> 0.4.2) + version_sorter (~> 2.0.0) + virtus (~> 1.0.1) + vmstat (~> 2.1.0) + web-console (~> 2.0) + webmock (~> 1.21.0) + wikicloth (= 0.8.1) + +BUNDLED WITH + 1.12.5 -- cgit v1.2.1 From cf96c7596a80296abffe8ad75303cc964d72ee5d Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 11 Jul 2016 17:11:16 +0100 Subject: changes the usasge of path to file_path on blob_controller for compatibillity with the create action --- app/controllers/concerns/creates_commit.rb | 2 +- app/controllers/projects/blob_controller.rb | 8 ++++---- app/views/projects/blob/_editor.html.haml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 036805306f2..a76fcd61b52 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,7 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @path, + file_path: @file_path, previous_path: @previous_path ) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 091b661a09f..fb6ddd0e51d 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -39,16 +39,16 @@ class Projects::BlobController < Projects::ApplicationController def update unless params[:file_name].empty? - @previous_path = @path - @path = params[:file_name] + @previous_path = @file_path + @file_path = params[:file_name] end after_edit_path = if from_merge_request && @target_branch == @ref diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + - "#file-path-#{hexdigest(@path)}" + "#file-path-#{hexdigest(@file_path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @file_path)) end create_commit(Files::UpdateService, success_path: after_edit_path, diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 8a22e912624..e920f35879f 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -5,7 +5,7 @@ = ref %span.editor-file-name - if current_action?(:edit) || current_action?(:update) - = text_field_tag 'file_name', (params[:file_name] || @path), + = text_field_tag 'file_name', (params[:file_name] || @file_path), class: 'form-control new-file-name' - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From 893f3f28562c45da796ac5674600fd368bb3dbdf Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 11:49:21 +0100 Subject: refactors update action to change commit_params with the correct path --- Gemfile.lock | 2 +- app/controllers/concerns/creates_commit.rb | 1 - app/controllers/projects/blob_controller.rb | 9 +++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 055596b056f..199ee684970 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -274,7 +274,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.2.3) + gitlab_git (10.3.0) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a76fcd61b52..f2b8f297bc2 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -8,7 +8,6 @@ module CreatesCommit source_project: @project, source_branch: @ref, target_branch: @target_branch, - file_path: @file_path, previous_path: @previous_path ) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index fb6ddd0e51d..ac1141b8613 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -39,16 +39,17 @@ class Projects::BlobController < Projects::ApplicationController def update unless params[:file_name].empty? - @previous_path = @file_path - @file_path = params[:file_name] + @previous_path = @path + @path = params[:file_name] + @commit_params[:file_path] = @path end after_edit_path = if from_merge_request && @target_branch == @ref diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + - "#file-path-#{hexdigest(@file_path)}" + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @file_path)) + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) end create_commit(Files::UpdateService, success_path: after_edit_path, -- cgit v1.2.1 From 98c0eb461596e2b390ea5d43fc2f5f5284d1d0c0 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 12:48:24 +0100 Subject: test for nil params :file_name --- app/controllers/projects/blob_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index ac1141b8613..0120ad8e058 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -38,7 +38,7 @@ class Projects::BlobController < Projects::ApplicationController end def update - unless params[:file_name].empty? + unless params[:file_name].nil? || params[:file_name].empty? @previous_path = @path @path = params[:file_name] @commit_params[:file_path] = @path -- cgit v1.2.1 From 4a7e1c64dc5ea834188ab0ad8886931cc7c9a8ef Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 16:10:27 +0100 Subject: restores gemfile.lock --- Gemfile.lock | 192 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 199ee684970..10bee450bff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,14 +57,13 @@ GEM faraday_middleware (~> 0.9) faraday_middleware-multi_json (~> 0.0) oauth2 (~> 1.0) - asciidoctor (1.5.3) - ast (2.2.0) + asciidoctor (1.5.4) + ast (2.3.0) attr_encrypted (3.0.1) encryptor (~> 3.0.0) - attr_required (1.0.0) - autoprefixer-rails (6.2.3) + attr_required (1.0.1) + autoprefixer-rails (6.3.7) execjs - json awesome_print (1.2.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) @@ -106,7 +105,7 @@ GEM bundler-audit (0.5.0) bundler (~> 1.2) thor (~> 0.18) - byebug (8.2.1) + byebug (8.2.5) capybara (2.6.2) addressable mime-types (>= 1.16) @@ -114,7 +113,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - capybara-screenshot (1.0.11) + capybara-screenshot (1.0.13) capybara (>= 1.0, < 3) launchy carrierwave (0.10.0) @@ -126,9 +125,9 @@ GEM charlock_holmes (0.7.3) chronic_duration (0.10.6) numerizer (~> 0.1.1) - chunky_png (1.3.5) + chunky_png (1.3.6) cliver (0.3.2) - coderay (1.1.0) + coderay (1.1.1) coercible (1.0.0) descendants_tracker (~> 0.0.1) coffee-rails (4.1.1) @@ -138,15 +137,15 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - colorize (0.7.7) + colorize (0.8.1) concurrent-ruby (1.0.2) connection_pool (2.2.0) crack (0.4.3) safe_yaml (~> 1.0.0) creole (0.5.0) - css_parser (1.4.1) + css_parser (1.4.5) addressable - d3_rails (3.5.11) + d3_rails (3.5.16) railties (>= 3.1.0) daemons (1.2.3) database_cleaner (1.4.1) @@ -156,7 +155,7 @@ GEM activerecord (>= 3.2.0, < 5.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.1.1) + devise (4.2.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0, < 5.1) @@ -173,7 +172,7 @@ GEM docile (1.1.5) doorkeeper (4.0.0) railties (>= 4.2) - dropzonejs-rails (0.7.2) + dropzonejs-rails (0.7.3) rails (> 3.1) email_reply_parser (0.5.8) email_spec (1.6.0) @@ -183,9 +182,9 @@ GEM equalizer (0.0.11) erubis (2.7.0) escape_utils (1.1.1) - eventmachine (1.0.8) - excon (0.49.0) - execjs (2.6.0) + eventmachine (1.2.0.1) + excon (0.51.0) + execjs (2.7.0) expression_parser (0.9.0) factory_girl (4.5.0) activesupport (>= 3.0.0) @@ -200,7 +199,7 @@ GEM faraday_middleware multi_json ffaker (2.0.0) - ffi (1.9.10) + ffi (1.9.14) flay (2.6.1) ruby_parser (~> 3.0) sexp_processor (~> 4.0) @@ -210,8 +209,8 @@ GEM flowdock (0.7.1) httparty (~> 0.7) multi_json - fog-aws (0.9.2) - fog-core (~> 1.27) + fog-aws (0.9.4) + fog-core (~> 1.38) fog-json (~> 1.0) fog-xml (~> 0.1) ipaddress (~> 0.8) @@ -220,7 +219,7 @@ GEM fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) - fog-core (1.40.0) + fog-core (1.42.0) builder excon (~> 0.49) formatador (~> 0.2) @@ -233,8 +232,8 @@ GEM multi_json (~> 1.10) fog-local (0.3.0) fog-core (~> 1.27) - fog-openstack (0.1.6) - fog-core (>= 1.39) + fog-openstack (0.1.7) + fog-core (>= 1.40) fog-json (>= 1.0) ipaddress (>= 0.8) fog-rackspace (0.1.1) @@ -245,7 +244,7 @@ GEM fog-xml (0.1.2) fog-core nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.1.0) + font-awesome-rails (4.6.3.1) railties (>= 3.2, < 5.1) foreman (0.78.0) thor (~> 0.19.1) @@ -257,7 +256,7 @@ GEM rugged (~> 0.21) gemojione (2.6.1) json - get_process_mem (0.2.0) + get_process_mem (0.2.1) gherkin-ruby (0.3.2) github-linguist (4.7.6) charlock_holmes (~> 0.7.3) @@ -287,7 +286,7 @@ GEM rubyntlm (~> 0.3) globalid (0.3.6) activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.0) + gollum-grit_adapter (1.0.1) gitlab-grit (~> 2.7, >= 2.7.1) gollum-lib (4.1.0) github-markup (~> 1.3.3) @@ -321,10 +320,10 @@ GEM temple (~> 0.7.6) thor tilt - hashie (3.4.3) - health_check (1.5.1) - rails (>= 2.3.0) - hipchat (1.5.2) + hashie (3.4.4) + health_check (2.1.0) + rails (>= 4.0) + hipchat (1.5.3) httparty mimemagic html-pipeline (1.11.0) @@ -335,10 +334,10 @@ GEM httparty (0.13.7) json (~> 1.8) multi_xml (>= 0.5.2) - httpclient (2.7.0.1) + httpclient (2.8.0) i18n (0.7.0) - ice_nine (0.11.1) - influxdb (0.2.3) + ice_nine (0.11.2) + influxdb (0.3.5) cause json ipaddress (0.8.3) @@ -358,7 +357,7 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.10.0) - knapsack (1.11.0) + knapsack (1.11.1) rake timecop (>= 0.1.0) launchy (2.4.3) @@ -369,7 +368,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - license_finder (2.1.0) + license_finder (2.1.2) bundler httparty rubyzip @@ -377,9 +376,10 @@ GEM xml-simple licensee (8.0.0) rugged (>= 0.24b) - listen (3.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) loofah (2.0.3) nokogiri (>= 1.5.9) macaddr (1.7.1) @@ -389,23 +389,23 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mimemagic (0.3.0) + mimemagic (0.3.1) mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.3.20) + mysql2 (0.3.21) nested_form (0.3.2) - net-ldap (0.12.1) - net-ssh (3.0.1) - newrelic_rpm (3.14.1.311) + net-ldap (0.14.0) + net-ssh (3.0.2) + newrelic_rpm (3.16.0.318) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) numerizer (0.1.1) - oauth (0.4.7) + oauth (0.5.1) oauth2 (1.2.0) faraday (>= 0.8, < 0.10) jwt (~> 1.0) @@ -417,7 +417,7 @@ GEM omniauth (1.3.1) hashie (>= 1.2, < 4) rack (>= 1.0, < 3) - omniauth-auth0 (1.4.1) + omniauth-auth0 (1.4.2) omniauth-oauth2 (~> 1.1) omniauth-azure-oauth2 (0.0.6) jwt (~> 1.0) @@ -436,15 +436,14 @@ GEM omniauth-github (1.1.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.1) + omniauth-gitlab (1.0.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.0) - omniauth-google-oauth2 (0.2.10) - addressable (~> 2.3) - jwt (~> 1.0) + omniauth-google-oauth2 (0.4.1) + jwt (~> 1.5.2) multi_json (~> 1.3) omniauth (>= 1.1.1) - omniauth-oauth2 (~> 1.3.1) + omniauth-oauth2 (>= 1.3.1) omniauth-kerberos (0.3.0) omniauth-multipassword timfel-krb5-auth (~> 0.8) @@ -453,7 +452,7 @@ GEM omniauth-oauth (1.1.0) oauth omniauth (~> 1.0) - omniauth-oauth2 (1.3.1) + omniauth-oauth2 (1.4.0) oauth2 (~> 1.0) omniauth (~> 1.2) omniauth-saml (1.6.0) @@ -471,9 +470,9 @@ GEM org-ruby (0.9.12) rubypants (~> 0.2) orm_adapter (0.5.0) - paranoia (2.1.4) + paranoia (2.1.5) activerecord (~> 4.0) - parser (2.3.1.0) + parser (2.3.1.2) ast (~> 2.2) pg (0.18.4) pkg-config (1.1.7) @@ -484,13 +483,13 @@ GEM websocket-driver (>= 0.2.0) posix-spawn (0.3.11) powerpack (0.1.1) - premailer (1.8.6) - css_parser (>= 1.3.6) + premailer (1.8.7) + css_parser (>= 1.4.5) htmlentities (>= 4.0.0) - premailer-rails (1.9.2) + premailer-rails (1.9.4) actionmailer (>= 3, < 6) premailer (~> 1.7, >= 1.7.9) - pry (0.10.3) + pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) @@ -505,7 +504,7 @@ GEM rack-cors (0.4.0) rack-mount (0.8.3) rack (>= 1.0.0) - rack-oauth2 (1.2.1) + rack-oauth2 (1.2.3) activesupport (>= 2.3) attr_required (>= 0.0.5) httpclient (>= 2.4) @@ -540,19 +539,19 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - raindrops (0.15.0) + raindrops (0.16.0) rake (10.5.0) - rb-fsevent (0.9.6) - rb-inotify (0.9.5) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) ffi (>= 0.5.0) rblineprof (0.3.6) debugger-ruby_core_source (~> 1.3) rdoc (3.12.2) json (~> 1.4) - recaptcha (3.0.0) + recaptcha (3.3.0) json - redcarpet (3.3.3) - redis (3.2.2) + redcarpet (3.3.4) + redis (3.3.0) redis-actionpack (4.0.1) actionpack (~> 4) redis-rack (~> 1.5.0) @@ -571,23 +570,23 @@ GEM redis-store (~> 1.1.0) redis-store (1.1.7) redis (>= 2.2) - request_store (1.3.0) + request_store (1.3.1) rerun (0.11.0) listen (~> 3.0) - responders (2.1.1) + responders (2.2.0) railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (1.11.0) - rqrcode (0.7.0) - chunky_png + rouge (1.11.1) + rqrcode (0.10.1) + chunky_png (~> 1.0) rqrcode-rails3 (0.1.7) rqrcode (>= 0.4.2) rspec (3.5.0) rspec-core (~> 3.5.0) rspec-expectations (~> 3.5.0) rspec-mocks (~> 3.5.0) - rspec-core (3.5.0) + rspec-core (3.5.1) rspec-support (~> 3.5.0) rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) @@ -595,7 +594,7 @@ GEM rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) - rspec-rails (3.5.0) + rspec-rails (3.5.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -617,14 +616,15 @@ GEM ruby-fogbugz (0.2.1) crack (~> 0.4) ruby-progressbar (1.8.1) - ruby-saml (1.3.0) + ruby-saml (1.3.1) nokogiri (>= 1.5.10) + ruby_dep (1.3.1) ruby_parser (3.8.2) sexp_processor (~> 4.1) - rubyntlm (0.5.2) + rubyntlm (0.6.0) rubypants (0.2.0) rubyzip (1.2.0) - rufus-scheduler (3.1.10) + rufus-scheduler (3.2.1) rugged (0.24.0) safe_yaml (1.0.4) sanitize (2.1.0) @@ -648,7 +648,7 @@ GEM seed-fu (2.3.6) activerecord (>= 3.1) activesupport (>= 3.1) - select2-rails (3.5.9.3) + select2-rails (3.5.10) thor (~> 0.14) sentry-raven (1.1.0) faraday (>= 0.7.6) @@ -663,7 +663,7 @@ GEM connection_pool (~> 2.2, >= 2.2.0) redis (~> 3.2, >= 3.2.1) sinatra (>= 1.4.7) - sidekiq-cron (0.4.0) + sidekiq-cron (0.4.2) redis-namespace (>= 1.5.2) rufus-scheduler (>= 2.0.24) sidekiq (>= 4.0.0) @@ -697,7 +697,7 @@ GEM spring (>= 0.9.1) spring-commands-teaspoon (0.0.2) spring (>= 0.9.1) - sprockets (3.6.2) + sprockets (3.6.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) @@ -758,7 +758,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.0.5) + unicode-display_width (1.1.0) unicorn (4.9.0) kgio (~> 2.6) rack @@ -786,7 +786,7 @@ GEM webmock (1.21.0) addressable (>= 2.3.6) crack (>= 0.3.2) - websocket-driver (0.6.3) + websocket-driver (0.6.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) wikicloth (0.8.1) @@ -806,7 +806,7 @@ DEPENDENCIES activerecord-session_store (~> 1.0.0) acts-as-taggable-on (~> 3.4) addressable (~> 2.3.8) - after_commit_queue + after_commit_queue (~> 1.3.0) akismet (~> 2.0) allocations (~> 1.0) asana (~> 0.4.0) @@ -815,15 +815,15 @@ DEPENDENCIES awesome_print (~> 1.2.0) babosa (~> 1.0.2) base32 (~> 0.3.0) - benchmark-ips + benchmark-ips (~> 2.3.0) better_errors (~> 1.0.1) binding_of_caller (~> 0.7.2) bootstrap-sass (~> 3.3.0) brakeman (~> 3.3.0) browser (~> 2.2) - bullet - bundler-audit - byebug + bullet (~> 5.0.0) + bundler-audit (~> 0.5.0) + byebug (~> 8.2.1) capybara (~> 2.6.2) capybara-screenshot (~> 1.0.0) carrierwave (~> 0.10.0) @@ -844,8 +844,8 @@ DEPENDENCIES email_spec (~> 1.6.0) factory_girl_rails (~> 4.6.0) ffaker (~> 2.0.0) - flay - flog + flay (~> 2.6.1) + flog (~> 4.3.2) fog-aws (~> 0.9) fog-azure (~> 0.0) fog-core (~> 1.40) @@ -854,7 +854,7 @@ DEPENDENCIES fog-openstack (~> 0.1) fog-rackspace (~> 0.1.1) font-awesome-rails (~> 4.6.1) - foreman + foreman (~> 0.78.0) fuubar (~> 2.0.0) gemnasium-gitlab-service (~> 0.2) gemojione (~> 2.6) @@ -870,7 +870,7 @@ DEPENDENCIES grape (~> 0.13.0) grape-entity (~> 0.4.2) hamlit (~> 2.5) - health_check (~> 1.5.1) + health_check (~> 2.1.0) hipchat (~> 1.5.0) html-pipeline (~> 1.11.0) httparty (~> 0.13.3) @@ -881,9 +881,9 @@ DEPENDENCIES jquery-ui-rails (~> 5.0.0) jwt kaminari (~> 0.17.0) - knapsack + knapsack (~> 1.11.0) letter_opener_web (~> 1.3.0) - license_finder + license_finder (~> 2.1.0) licensee (~> 8.0.0) loofah (~> 2.0.3) mail_room (~> 0.8) @@ -905,7 +905,7 @@ DEPENDENCIES omniauth-facebook (~> 3.0.0) omniauth-github (~> 1.1.1) omniauth-gitlab (~> 1.0.0) - omniauth-google-oauth2 (~> 0.2.0) + omniauth-google-oauth2 (~> 0.4.1) omniauth-kerberos (~> 0.3.0) omniauth-saml (~> 1.6.0) omniauth-shibboleth (~> 1.2.0) @@ -916,19 +916,19 @@ DEPENDENCIES pg (~> 0.18.2) poltergeist (~> 1.9.0) premailer-rails (~> 1.9.0) - pry-rails + pry-rails (~> 0.3.4) rack-attack (~> 4.3.1) rack-cors (~> 0.4.0) rack-oauth2 (~> 1.2.1) rails (= 4.2.6) rails-deprecated_sanitizer (~> 1.0.3) rainbow (~> 2.1.0) - rblineprof + rblineprof (~> 0.3.6) rdoc (~> 3.6) recaptcha (~> 3.0) redcarpet (~> 3.3.3) redis (~> 3.2) - redis-namespace + redis-namespace (~> 1.5.2) redis-rails (~> 4.0.0) request_store (~> 1.3.0) rerun (~> 0.11.0) @@ -936,7 +936,7 @@ DEPENDENCIES rouge (~> 1.11) rqrcode-rails3 (~> 0.1.7) rspec-rails (~> 3.5.0) - rspec-retry + rspec-retry (~> 0.4.5) rubocop (~> 0.40.0) rubocop-rspec (~> 1.5.0) ruby-fogbugz (~> 0.2.1) @@ -948,7 +948,7 @@ DEPENDENCIES select2-rails (~> 3.5.9) sentry-raven (~> 1.1.0) settingslogic (~> 2.0.9) - sham_rack + sham_rack (~> 1.3.6) shoulda-matchers (~> 2.8.0) sidekiq (~> 4.0) sidekiq-cron (~> 0.4.0) -- cgit v1.2.1 From 2bbe6741f5422150f989f8e6fcb19a9517772f7d Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 16:13:38 +0100 Subject: fix gemfile.lock --- Gemfile.lock | 154 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 10bee450bff..f8018e58a5e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,13 +57,14 @@ GEM faraday_middleware (~> 0.9) faraday_middleware-multi_json (~> 0.0) oauth2 (~> 1.0) - asciidoctor (1.5.4) - ast (2.3.0) + asciidoctor (1.5.3) + ast (2.2.0) attr_encrypted (3.0.1) encryptor (~> 3.0.0) - attr_required (1.0.1) - autoprefixer-rails (6.3.7) + attr_required (1.0.0) + autoprefixer-rails (6.2.3) execjs + json awesome_print (1.2.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) @@ -105,7 +106,7 @@ GEM bundler-audit (0.5.0) bundler (~> 1.2) thor (~> 0.18) - byebug (8.2.5) + byebug (8.2.1) capybara (2.6.2) addressable mime-types (>= 1.16) @@ -113,7 +114,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - capybara-screenshot (1.0.13) + capybara-screenshot (1.0.11) capybara (>= 1.0, < 3) launchy carrierwave (0.10.0) @@ -125,9 +126,9 @@ GEM charlock_holmes (0.7.3) chronic_duration (0.10.6) numerizer (~> 0.1.1) - chunky_png (1.3.6) + chunky_png (1.3.5) cliver (0.3.2) - coderay (1.1.1) + coderay (1.1.0) coercible (1.0.0) descendants_tracker (~> 0.0.1) coffee-rails (4.1.1) @@ -137,15 +138,15 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - colorize (0.8.1) + colorize (0.7.7) concurrent-ruby (1.0.2) connection_pool (2.2.0) crack (0.4.3) safe_yaml (~> 1.0.0) creole (0.5.0) - css_parser (1.4.5) + css_parser (1.4.1) addressable - d3_rails (3.5.16) + d3_rails (3.5.11) railties (>= 3.1.0) daemons (1.2.3) database_cleaner (1.4.1) @@ -155,7 +156,7 @@ GEM activerecord (>= 3.2.0, < 5.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.2.0) + devise (4.1.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0, < 5.1) @@ -172,7 +173,7 @@ GEM docile (1.1.5) doorkeeper (4.0.0) railties (>= 4.2) - dropzonejs-rails (0.7.3) + dropzonejs-rails (0.7.2) rails (> 3.1) email_reply_parser (0.5.8) email_spec (1.6.0) @@ -182,9 +183,9 @@ GEM equalizer (0.0.11) erubis (2.7.0) escape_utils (1.1.1) - eventmachine (1.2.0.1) - excon (0.51.0) - execjs (2.7.0) + eventmachine (1.0.8) + excon (0.49.0) + execjs (2.6.0) expression_parser (0.9.0) factory_girl (4.5.0) activesupport (>= 3.0.0) @@ -199,7 +200,7 @@ GEM faraday_middleware multi_json ffaker (2.0.0) - ffi (1.9.14) + ffi (1.9.10) flay (2.6.1) ruby_parser (~> 3.0) sexp_processor (~> 4.0) @@ -209,8 +210,8 @@ GEM flowdock (0.7.1) httparty (~> 0.7) multi_json - fog-aws (0.9.4) - fog-core (~> 1.38) + fog-aws (0.9.2) + fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) ipaddress (~> 0.8) @@ -219,7 +220,7 @@ GEM fog-core (~> 1.27) fog-json (~> 1.0) fog-xml (~> 0.1) - fog-core (1.42.0) + fog-core (1.40.0) builder excon (~> 0.49) formatador (~> 0.2) @@ -232,8 +233,8 @@ GEM multi_json (~> 1.10) fog-local (0.3.0) fog-core (~> 1.27) - fog-openstack (0.1.7) - fog-core (>= 1.40) + fog-openstack (0.1.6) + fog-core (>= 1.39) fog-json (>= 1.0) ipaddress (>= 0.8) fog-rackspace (0.1.1) @@ -244,7 +245,7 @@ GEM fog-xml (0.1.2) fog-core nokogiri (~> 1.5, >= 1.5.11) - font-awesome-rails (4.6.3.1) + font-awesome-rails (4.6.1.0) railties (>= 3.2, < 5.1) foreman (0.78.0) thor (~> 0.19.1) @@ -256,7 +257,7 @@ GEM rugged (~> 0.21) gemojione (2.6.1) json - get_process_mem (0.2.1) + get_process_mem (0.2.0) gherkin-ruby (0.3.2) github-linguist (4.7.6) charlock_holmes (~> 0.7.3) @@ -273,7 +274,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.3.0) + gitlab_git (10.2.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) @@ -286,7 +287,7 @@ GEM rubyntlm (~> 0.3) globalid (0.3.6) activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.1) + gollum-grit_adapter (1.0.0) gitlab-grit (~> 2.7, >= 2.7.1) gollum-lib (4.1.0) github-markup (~> 1.3.3) @@ -320,10 +321,10 @@ GEM temple (~> 0.7.6) thor tilt - hashie (3.4.4) + hashie (3.4.3) health_check (2.1.0) rails (>= 4.0) - hipchat (1.5.3) + hipchat (1.5.2) httparty mimemagic html-pipeline (1.11.0) @@ -334,10 +335,10 @@ GEM httparty (0.13.7) json (~> 1.8) multi_xml (>= 0.5.2) - httpclient (2.8.0) + httpclient (2.7.0.1) i18n (0.7.0) - ice_nine (0.11.2) - influxdb (0.3.5) + ice_nine (0.11.1) + influxdb (0.2.3) cause json ipaddress (0.8.3) @@ -357,7 +358,7 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.10.0) - knapsack (1.11.1) + knapsack (1.11.0) rake timecop (>= 0.1.0) launchy (2.4.3) @@ -368,7 +369,7 @@ GEM actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) - license_finder (2.1.2) + license_finder (2.1.0) bundler httparty rubyzip @@ -376,10 +377,9 @@ GEM xml-simple licensee (8.0.0) rugged (>= 0.24b) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + listen (3.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) loofah (2.0.3) nokogiri (>= 1.5.9) macaddr (1.7.1) @@ -389,23 +389,23 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mimemagic (0.3.1) + mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) mousetrap-rails (1.4.6) multi_json (1.12.1) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.3.21) + mysql2 (0.3.20) nested_form (0.3.2) - net-ldap (0.14.0) - net-ssh (3.0.2) - newrelic_rpm (3.16.0.318) + net-ldap (0.12.1) + net-ssh (3.0.1) + newrelic_rpm (3.14.1.311) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) numerizer (0.1.1) - oauth (0.5.1) + oauth (0.4.7) oauth2 (1.2.0) faraday (>= 0.8, < 0.10) jwt (~> 1.0) @@ -417,7 +417,7 @@ GEM omniauth (1.3.1) hashie (>= 1.2, < 4) rack (>= 1.0, < 3) - omniauth-auth0 (1.4.2) + omniauth-auth0 (1.4.1) omniauth-oauth2 (~> 1.1) omniauth-azure-oauth2 (0.0.6) jwt (~> 1.0) @@ -436,14 +436,15 @@ GEM omniauth-github (1.1.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.1) - omniauth-gitlab (1.0.2) + omniauth-gitlab (1.0.1) omniauth (~> 1.0) omniauth-oauth2 (~> 1.0) omniauth-google-oauth2 (0.4.1) - jwt (~> 1.5.2) + addressable (~> 2.3) + jwt (~> 1.0) multi_json (~> 1.3) omniauth (>= 1.1.1) - omniauth-oauth2 (>= 1.3.1) + omniauth-oauth2 (~> 1.3.1) omniauth-kerberos (0.3.0) omniauth-multipassword timfel-krb5-auth (~> 0.8) @@ -452,7 +453,7 @@ GEM omniauth-oauth (1.1.0) oauth omniauth (~> 1.0) - omniauth-oauth2 (1.4.0) + omniauth-oauth2 (1.3.1) oauth2 (~> 1.0) omniauth (~> 1.2) omniauth-saml (1.6.0) @@ -470,9 +471,9 @@ GEM org-ruby (0.9.12) rubypants (~> 0.2) orm_adapter (0.5.0) - paranoia (2.1.5) + paranoia (2.1.4) activerecord (~> 4.0) - parser (2.3.1.2) + parser (2.3.1.0) ast (~> 2.2) pg (0.18.4) pkg-config (1.1.7) @@ -483,13 +484,13 @@ GEM websocket-driver (>= 0.2.0) posix-spawn (0.3.11) powerpack (0.1.1) - premailer (1.8.7) - css_parser (>= 1.4.5) + premailer (1.8.6) + css_parser (>= 1.3.6) htmlentities (>= 4.0.0) - premailer-rails (1.9.4) + premailer-rails (1.9.2) actionmailer (>= 3, < 6) premailer (~> 1.7, >= 1.7.9) - pry (0.10.4) + pry (0.10.3) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) @@ -504,7 +505,7 @@ GEM rack-cors (0.4.0) rack-mount (0.8.3) rack (>= 1.0.0) - rack-oauth2 (1.2.3) + rack-oauth2 (1.2.1) activesupport (>= 2.3) attr_required (>= 0.0.5) httpclient (>= 2.4) @@ -539,19 +540,19 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - raindrops (0.16.0) + raindrops (0.15.0) rake (10.5.0) - rb-fsevent (0.9.7) - rb-inotify (0.9.7) + rb-fsevent (0.9.6) + rb-inotify (0.9.5) ffi (>= 0.5.0) rblineprof (0.3.6) debugger-ruby_core_source (~> 1.3) rdoc (3.12.2) json (~> 1.4) - recaptcha (3.3.0) + recaptcha (3.0.0) json - redcarpet (3.3.4) - redis (3.3.0) + redcarpet (3.3.3) + redis (3.2.2) redis-actionpack (4.0.1) actionpack (~> 4) redis-rack (~> 1.5.0) @@ -570,23 +571,23 @@ GEM redis-store (~> 1.1.0) redis-store (1.1.7) redis (>= 2.2) - request_store (1.3.1) + request_store (1.3.0) rerun (0.11.0) listen (~> 3.0) - responders (2.2.0) + responders (2.1.1) railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (1.11.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) + rouge (1.11.0) + rqrcode (0.7.0) + chunky_png rqrcode-rails3 (0.1.7) rqrcode (>= 0.4.2) rspec (3.5.0) rspec-core (~> 3.5.0) rspec-expectations (~> 3.5.0) rspec-mocks (~> 3.5.0) - rspec-core (3.5.1) + rspec-core (3.5.0) rspec-support (~> 3.5.0) rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) @@ -594,7 +595,7 @@ GEM rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) - rspec-rails (3.5.1) + rspec-rails (3.5.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -616,15 +617,14 @@ GEM ruby-fogbugz (0.2.1) crack (~> 0.4) ruby-progressbar (1.8.1) - ruby-saml (1.3.1) + ruby-saml (1.3.0) nokogiri (>= 1.5.10) - ruby_dep (1.3.1) ruby_parser (3.8.2) sexp_processor (~> 4.1) - rubyntlm (0.6.0) + rubyntlm (0.5.2) rubypants (0.2.0) rubyzip (1.2.0) - rufus-scheduler (3.2.1) + rufus-scheduler (3.1.10) rugged (0.24.0) safe_yaml (1.0.4) sanitize (2.1.0) @@ -648,7 +648,7 @@ GEM seed-fu (2.3.6) activerecord (>= 3.1) activesupport (>= 3.1) - select2-rails (3.5.10) + select2-rails (3.5.9.3) thor (~> 0.14) sentry-raven (1.1.0) faraday (>= 0.7.6) @@ -663,7 +663,7 @@ GEM connection_pool (~> 2.2, >= 2.2.0) redis (~> 3.2, >= 3.2.1) sinatra (>= 1.4.7) - sidekiq-cron (0.4.2) + sidekiq-cron (0.4.0) redis-namespace (>= 1.5.2) rufus-scheduler (>= 2.0.24) sidekiq (>= 4.0.0) @@ -697,7 +697,7 @@ GEM spring (>= 0.9.1) spring-commands-teaspoon (0.0.2) spring (>= 0.9.1) - sprockets (3.6.3) + sprockets (3.6.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) @@ -758,7 +758,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.1.0) + unicode-display_width (1.0.5) unicorn (4.9.0) kgio (~> 2.6) rack @@ -786,7 +786,7 @@ GEM webmock (1.21.0) addressable (>= 2.3.6) crack (>= 0.3.2) - websocket-driver (0.6.4) + websocket-driver (0.6.3) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) wikicloth (0.8.1) -- cgit v1.2.1 From 421ec6e089e161bc7a7db61336a17a3e776916f7 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 16:17:24 +0100 Subject: changes " usage to ' --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index cbcd9f20ace..5c43015e52c 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2' +gem 'gitlab_git', '~> 10.2' # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes -- cgit v1.2.1 From 893cc5ec01b02a7183ae28ce815d6d14d0dfdeff Mon Sep 17 00:00:00 2001 From: elliotec Date: Tue, 12 Jul 2016 09:22:53 -0600 Subject: use correct color variable for border --- app/assets/stylesheets/framework/blocks.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index 635c236c7ac..1e7c0468d89 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -225,7 +225,7 @@ float: right; margin-top: 8px; padding-bottom: 7px; - border-bottom: 1px solid $white-dark; + border-bottom: 1px solid $border-color; } } -- cgit v1.2.1 From e7d9fcc1c9162271512edbd430d103c0697ccdbc Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Tue, 12 Jul 2016 17:59:21 +0200 Subject: API: Expose due_date for issues --- CHANGELOG | 1 + doc/api/issues.md | 29 ++++++++++++++++++++--------- lib/api/entities.rb | 1 + lib/api/issues.rb | 10 ++++++---- spec/requests/api/issues_spec.rb | 25 +++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 84bfc27b151..2dab994ecb8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -35,6 +35,7 @@ v 8.10.0 (unreleased) - Add notification settings dropdown for groups - Wildcards for protected branches. !4665 - Allow importing from Github using Personal Access Tokens. (Eric K Idema) + - API: Expose `due_date` for issues (Robert Schilling) - API: Todos !3188 (Robert Schilling) - API: Expose shared groups for projects and shared projects for groups !5050 (Robert Schilling) - Add "Enabled Git access protocols" to Application Settings diff --git a/doc/api/issues.md b/doc/api/issues.md index 3ced787b23e..419fb8f85d8 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -78,7 +78,8 @@ Example response: "iid" : 6, "labels" : [], "subscribed" : false, - "user_notes_count": 1 + "user_notes_count": 1, + "due_date": "2016-07-22" } ] ``` @@ -154,7 +155,8 @@ Example response: "updated_at" : "2016-01-04T15:31:46.176Z", "created_at" : "2016-01-04T15:31:46.176Z", "subscribed" : false, - "user_notes_count": 1 + "user_notes_count": 1, + "due_date": null } ] ``` @@ -232,7 +234,8 @@ Example response: "updated_at" : "2016-01-04T15:31:46.176Z", "created_at" : "2016-01-04T15:31:46.176Z", "subscribed" : false, - "user_notes_count": 1 + "user_notes_count": 1, + "due_date": "2016-07-22" } ] ``` @@ -295,7 +298,8 @@ Example response: "updated_at" : "2016-01-04T15:31:46.176Z", "created_at" : "2016-01-04T15:31:46.176Z", "subscribed": false, - "user_notes_count": 1 + "user_notes_count": 1, + "due_date": null } ``` @@ -320,6 +324,7 @@ POST /projects/:id/issues | `milestone_id` | integer | no | The ID of a milestone to assign issue | | `labels` | string | no | Comma-separated label names for an issue | | `created_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` | +| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` | ```bash curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues?title=Issues%20with%20auth&labels=bug @@ -351,7 +356,8 @@ Example response: "updated_at" : "2016-01-07T12:44:33.959Z", "milestone" : null, "subscribed" : true, - "user_notes_count": 0 + "user_notes_count": 0, + "due_date": null } ``` @@ -379,6 +385,7 @@ PUT /projects/:id/issues/:issue_id | `labels` | string | no | Comma-separated label names for an issue | | `state_event` | string | no | The state event of an issue. Set `close` to close the issue and `reopen` to reopen it | | `updated_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` | +| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` | ```bash curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85?state_event=close @@ -410,7 +417,8 @@ Example response: "assignee" : null, "milestone" : null, "subscribed" : true, - "user_notes_count": 0 + "user_notes_count": 0, + "due_date": "2016-07-22" } ``` @@ -487,7 +495,8 @@ Example response: "state": "active", "avatar_url": "http://www.gravatar.com/avatar/7a190fecbaa68212a4b68aeb6e3acd10?s=80&d=identicon", "web_url": "https://gitlab.example.com/u/solon.cremin" - } + }, + "due_date": null } ``` @@ -541,7 +550,8 @@ Example response: "state": "active", "avatar_url": "http://www.gravatar.com/avatar/7a190fecbaa68212a4b68aeb6e3acd10?s=80&d=identicon", "web_url": "https://gitlab.example.com/u/solon.cremin" - } + }, + "due_date": null } ``` @@ -596,7 +606,8 @@ Example response: "avatar_url": "http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon", "web_url": "https://gitlab.example.com/u/orville" }, - "subscribed": false + "subscribed": false, + "due_date": null } ``` diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 301dbb688a7..40e2a487fe9 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -186,6 +186,7 @@ module API end expose :user_notes_count expose :upvotes, :downvotes + expose :due_date end class ExternalIssue < Grape::Entity diff --git a/lib/api/issues.rb b/lib/api/issues.rb index 8a03a41e9c5..c588103e517 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -152,12 +152,13 @@ module API # milestone_id (optional) - The ID of a milestone to assign issue # labels (optional) - The labels of an issue # created_at (optional) - Date time string, ISO 8601 formatted + # due_date (optional) - Date time string in the format YEAR-MONTH-DAY # Example Request: # POST /projects/:id/issues - post ":id/issues" do + post ':id/issues' do required_attributes! [:title] - keys = [:title, :description, :assignee_id, :milestone_id] + keys = [:title, :description, :assignee_id, :milestone_id, :due_date] keys << :created_at if current_user.admin? || user_project.owner == current_user attrs = attributes_for_keys(keys) @@ -201,12 +202,13 @@ module API # labels (optional) - The labels of an issue # state_event (optional) - The state event of an issue (close|reopen) # updated_at (optional) - Date time string, ISO 8601 formatted + # due_date (optional) - Date time string in the format YEAR-MONTH-DAY # Example Request: # PUT /projects/:id/issues/:issue_id - put ":id/issues/:issue_id" do + put ':id/issues/:issue_id' do issue = user_project.issues.find(params[:issue_id]) authorize! :update_issue, issue - keys = [:title, :description, :assignee_id, :milestone_id, :state_event] + keys = [:title, :description, :assignee_id, :milestone_id, :state_event, :due_date] keys << :updated_at if current_user.admin? || user_project.owner == current_user attrs = attributes_for_keys(keys) diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index 6adccb4ebae..12f2cfa6942 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -503,6 +503,20 @@ describe API::API, api: true do ]) end + context 'with due date' do + it 'creates a new project issue' do + due_date = 2.weeks.from_now.strftime('%Y-%m-%d') + + post api("/projects/#{project.id}/issues", user), + title: 'new issue', due_date: due_date + + expect(response).to have_http_status(201) + expect(json_response['title']).to eq('new issue') + expect(json_response['description']).to be_nil + expect(json_response['due_date']).to eq(due_date) + end + end + context 'when an admin or owner makes the request' do it 'accepts the creation date to be set' do creation_time = 2.weeks.ago @@ -683,6 +697,17 @@ describe API::API, api: true do end end + describe 'PUT /projects/:id/issues/:issue_id to update due date' do + it 'creates a new project issue' do + due_date = 2.weeks.from_now.strftime('%Y-%m-%d') + + put api("/projects/#{project.id}/issues/#{issue.id}", user), due_date: due_date + + expect(response).to have_http_status(200) + expect(json_response['due_date']).to eq(due_date) + end + end + describe "DELETE /projects/:id/issues/:issue_id" do it "rejects a non member from deleting an issue" do delete api("/projects/#{project.id}/issues/#{issue.id}", non_member) -- cgit v1.2.1 From 4352ff0d446337b8718e9164d7fdac08fcc53d6f Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 17:29:24 +0100 Subject: fixes frontend bug --- app/views/projects/blob/_editor.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index ba3b3439e9b..ad3009f30ab 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -5,7 +5,7 @@ = ref %span.editor-file-name - if current_action?(:edit) || current_action?(:update) - = text_field_tag 'file_name', (params[:file_name] || @file_path), + = text_field_tag 'file_name', (params[:file_name] || @path), class: 'form-control new-file-name' - if current_action?(:new) || current_action?(:create) -- cgit v1.2.1 From dd3addad481e7e0475cfecd16c8bcd3dc65e967d Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 13 Jul 2016 11:19:14 +0100 Subject: renames :file_name to :file_path --- app/controllers/projects/blob_controller.rb | 4 ++-- app/views/projects/blob/_editor.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 0120ad8e058..eda3727a28d 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -38,9 +38,9 @@ class Projects::BlobController < Projects::ApplicationController end def update - unless params[:file_name].nil? || params[:file_name].empty? + if params[:file_path].present? @previous_path = @path - @path = params[:file_name] + @path = params[:file_path] @commit_params[:file_path] = @path end diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index ad3009f30ab..ff379bafb26 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -5,8 +5,8 @@ = ref %span.editor-file-name - if current_action?(:edit) || current_action?(:update) - = text_field_tag 'file_name', (params[:file_name] || @path), - class: 'form-control new-file-name' + = text_field_tag 'file_path', (params[:file_path] || @path), + class: 'form-control new-file-path' - if current_action?(:new) || current_action?(:create) %span.editor-file-name -- cgit v1.2.1 From ba07fa0798e592fbf71f0e37f01db38b38c53903 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 13 Jul 2016 16:31:32 +0100 Subject: Changed CSS for emails to be mostly single class selectors --- .../stylesheets/mailers/repository_push_email.scss | 41 ++++++++-------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/app/assets/stylesheets/mailers/repository_push_email.scss b/app/assets/stylesheets/mailers/repository_push_email.scss index 2b61a9d4c73..847e4578baa 100644 --- a/app/assets/stylesheets/mailers/repository_push_email.scss +++ b/app/assets/stylesheets/mailers/repository_push_email.scss @@ -10,7 +10,7 @@ // preference): plain class selectors, type (element name) selectors, or // explicit child selectors. -table.code { +.code { font-family: monospace; font-size: $code_font_size; -premailer-cellpadding: 0; @@ -20,34 +20,16 @@ table.code { tr { line-height: $code_line_height; } - - .diff-line-num { - padding: 0 5px; - text-align: right; - max-width: 50px; - width: 35px; - border-right-width: 1px; - border-right-style: solid; - } - - .line_content { - white-space: pre; - } } -.line-numbers, .diff-line-num { - background-color: $background-color; -} - -.diff-line-num, .diff-line-num a { +.diff-line-num { + padding: 0 5px; + text-align: right; + max-width: 50px; + width: 35px; color: $black-transparent; -} - -pre.code, .diff-line-num { border-right: 1px solid $table-border-gray; -} -.diff-line-num { &.old { background-color: $line-number-old; border-right-color: $line-removed-dark; @@ -60,12 +42,14 @@ pre.code, .diff-line-num { } .line_content { + white-space: pre; background-color: #fff; &.old { background-color: $line-removed; - > .line > span.idiff, > .line > span > span.idiff { + > .line > span.idiff, + > .line > span > span.idiff { background-color: $line-removed-dark; } } @@ -73,7 +57,8 @@ pre.code, .diff-line-num { &.new { background-color: $line-added; - > .line > span.idiff, > .line > span > span.idiff { + > .line > span.idiff, + > .line > span > span.idiff { background-color: $line-added-dark; } } @@ -84,6 +69,10 @@ pre.code, .diff-line-num { } } +.diff-line-num { + background-color: $background-color; +} + span.highlight_word { background-color: #fafe3d !important; } -- cgit v1.2.1 From ae6edf18fcf207a63a7130ec8d49966acd83de67 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Wed, 29 Jun 2016 18:00:22 +0200 Subject: Update rubocop to 0.41.2 https://github.com/bbatsov/rubocop/blob/v0.41.2/CHANGELOG.md --- .rubocop.yml | 6 ++--- .rubocop_todo.yml | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Gemfile | 2 +- Gemfile.lock | 12 +++++----- 4 files changed, 74 insertions(+), 11 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index 3aac8401848..17802fbb307 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,6 +2,8 @@ require: - rubocop-rspec - ./rubocop/rubocop +inherit_from: .rubocop_todo.yml + AllCops: TargetRubyVersion: 2.1 # Cop names are not displayed in offense messages by default. Change behavior @@ -159,10 +161,6 @@ Style/ConstantName: Style/DefWithParentheses: Enabled: true -# Checks for use of deprecated Hash methods. -Style/DeprecatedHashMethods: - Enabled: false - # Document classes and non-namespace modules. Style/Documentation: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000000..9a791d74c15 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,65 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2016-06-29 18:24:55 +0200 using RuboCop version 0.41.1. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 1 +Lint/ShadowedException: + Exclude: + - 'app/models/u2f_registration.rb' + +# Offense count: 12 +# Cop supports --auto-correct. +Performance/PushSplat: + Exclude: + - 'app/controllers/projects/refs_controller.rb' + - 'app/helpers/page_layout_helper.rb' + - 'app/models/ability.rb' + - 'app/models/network/graph.rb' + - 'app/models/project_team.rb' + - 'app/models/user.rb' + - 'config/application.rb' + +# Offense count: 59 +Rails/OutputSafety: + Enabled: false + +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles. +# SupportedOctalStyles: zero_with_o, zero_only +Style/NumericLiteralPrefix: + Exclude: + - 'config/initializers/1_settings.rb' + - 'config/initializers/secret_token.rb' + - 'lib/gitlab/backend/shell.rb' + - 'spec/support/test_env.rb' + - 'spec/tasks/gitlab/backup_rake_spec.rb' + +# Offense count: 28 +# Cop supports --auto-correct. +Style/PreferredHashMethods: + Exclude: + - 'app/helpers/dropdowns_helper.rb' + - 'app/models/application_setting.rb' + - 'app/models/members/project_member.rb' + - 'app/services/git_push_service.rb' + - 'lib/api/helpers.rb' + - 'lib/ci/api/builds.rb' + - 'lib/ci/gitlab_ci_yaml_processor.rb' + - 'lib/gitlab/ci/config/node/configurable.rb' + - 'lib/gitlab/ci/config/node/factory.rb' + - 'lib/gitlab/google_code_import/client.rb' + - 'lib/gitlab/google_code_import/importer.rb' + - 'lib/gitlab/visibility_level.rb' + - 'spec/requests/api/projects_spec.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +Style/SpaceInsidePercentLiteralDelimiters: + Exclude: + - 'lib/event_filter.rb' + - 'lib/gitlab/git_access.rb' diff --git a/Gemfile b/Gemfile index 5c43015e52c..0769214a071 100644 --- a/Gemfile +++ b/Gemfile @@ -299,7 +299,7 @@ group :development, :test do gem 'spring-commands-spinach', '~> 1.1.0' gem 'spring-commands-teaspoon', '~> 0.0.2' - gem 'rubocop', '~> 0.40.0', require: false + gem 'rubocop', '~> 0.41.1', require: false gem 'rubocop-rspec', '~> 1.5.0', require: false gem 'scss_lint', '~> 0.47.0', require: false gem 'simplecov', '~> 0.11.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index f8018e58a5e..6f93a534359 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GEM faraday_middleware-multi_json (~> 0.0) oauth2 (~> 1.0) asciidoctor (1.5.3) - ast (2.2.0) + ast (2.3.0) attr_encrypted (3.0.1) encryptor (~> 3.0.0) attr_required (1.0.0) @@ -473,7 +473,7 @@ GEM orm_adapter (0.5.0) paranoia (2.1.4) activerecord (~> 4.0) - parser (2.3.1.0) + parser (2.3.1.2) ast (~> 2.2) pg (0.18.4) pkg-config (1.1.7) @@ -606,8 +606,8 @@ GEM rspec-retry (0.4.5) rspec-core rspec-support (3.5.0) - rubocop (0.40.0) - parser (>= 2.3.1.0, < 3.0) + rubocop (0.41.2) + parser (>= 2.3.1.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) @@ -758,7 +758,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.0.5) + unicode-display_width (1.1.0) unicorn (4.9.0) kgio (~> 2.6) rack @@ -937,7 +937,7 @@ DEPENDENCIES rqrcode-rails3 (~> 0.1.7) rspec-rails (~> 3.5.0) rspec-retry (~> 0.4.5) - rubocop (~> 0.40.0) + rubocop (~> 0.41.1) rubocop-rspec (~> 1.5.0) ruby-fogbugz (~> 0.2.1) sanitize (~> 2.0) -- cgit v1.2.1 From fb4f3a473b633ebd165d351e7101898c2b87ad72 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 3 Jul 2016 14:18:39 -0600 Subject: Remove some disabled cops. --- .rubocop.yml | 363 +--------------------------------- .rubocop_todo.yml | 567 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 552 insertions(+), 378 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 17802fbb307..ce4287a2796 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -37,10 +37,6 @@ AllCops: Style/AccessModifierIndentation: Enabled: true -# Check the naming of accessor methods for get_/set_. -Style/AccessorMethodName: - Enabled: false - # Use alias_method instead of alias. Style/Alias: EnforcedStyle: prefer_alias_method @@ -54,14 +50,6 @@ Style/AlignArray: Style/AlignHash: Enabled: true -# Align the parameters of a method call if they span more than one line. -Style/AlignParameters: - Enabled: false - -# Use &&/|| instead of and/or. -Style/AndOr: - Enabled: false - # Use `Array#join` instead of `Array#*`. Style/ArrayJoin: Enabled: true @@ -82,10 +70,6 @@ Style/Attr: Style/BeginBlock: Enabled: true -# Checks if usage of %() or %Q() matches configuration. -Style/BarePercentLiterals: - Enabled: false - # Do not use block comments. Style/BlockComments: Enabled: true @@ -99,14 +83,6 @@ Style/BlockEndNewline: Style/BlockDelimiters: Enabled: true -# Enforce braces style around hash parameters. -Style/BracesAroundHashParameters: - Enabled: false - -# Avoid explicit use of the case equality operator(===). -Style/CaseEquality: - Enabled: false - # Indentation of when in a case/when/[else/]end. Style/CaseIndentation: Enabled: true @@ -135,24 +111,10 @@ Style/ClassMethods: Style/ClassVars: Enabled: true -# Do not use :: for method call. -Style/ColonMethodCall: - Enabled: false - -# Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW). -Style/CommentAnnotation: - Enabled: false - # Indentation of comments. Style/CommentIndentation: Enabled: true -# Use the return value of `if` and `case` statements for assignment to a -# variable and variable comparison instead of assigning that variable -# inside of each branch. -Style/ConditionalAssignment: - Enabled: false - # Constants should use SCREAMING_SNAKE_CASE. Style/ConstantName: Enabled: true @@ -165,26 +127,10 @@ Style/DefWithParentheses: Style/Documentation: Enabled: false -# Checks the position of the dot in multi-line method calls. -Style/DotPosition: - Enabled: false - -# Checks for uses of double negation (!!). -Style/DoubleNegation: - Enabled: false - -# Prefer `each_with_object` over `inject` or `reduce`. -Style/EachWithObject: - Enabled: false - # Align elses and elsifs correctly. Style/ElseAlignment: Enabled: true -# Avoid empty else-clauses. -Style/EmptyElse: - Enabled: false - # Use empty lines between defs. Style/EmptyLineBetweenDefs: Enabled: false @@ -213,10 +159,6 @@ Style/EmptyLinesAroundModuleBody: Style/EmptyLinesAroundMethodBody: Enabled: false -# Prefer literals to Array.new/Hash.new/String.new. -Style/EmptyLiteral: - Enabled: false - # Avoid the use of END blocks. Style/EndBlock: Enabled: true @@ -229,10 +171,6 @@ Style/EndOfLine: Style/EvenOdd: Enabled: true -# Do not use unnecessary spacing. -Style/ExtraSpacing: - Enabled: false - # Use snake_case for source file names. Style/FileName: Enabled: true @@ -250,31 +188,15 @@ Style/FlipFlop: Style/For: Enabled: true -# Enforce the use of Kernel#sprintf, Kernel#format or String#%. -Style/FormatString: - Enabled: false - # Do not introduce global variables. Style/GlobalVars: Enabled: true -# Check for conditionals that can be replaced with guard clauses. -Style/GuardClause: - Enabled: false - # Prefer Ruby 1.9 hash syntax `{ a: 1, b: 2 }` # over 1.8 syntax `{ :a => 1, :b => 2 }`. Style/HashSyntax: Enabled: true -# Finds if nodes inside else, which can be converted to elsif. -Style/IfInsideElse: - Enabled: false - -# Favor modifier if/unless usage when you have a single-line body. -Style/IfUnlessModifier: - Enabled: false - # Do not use if x; .... Use the ternary operator instead. Style/IfWithSemicolon: Enabled: true @@ -297,22 +219,10 @@ Style/IndentationConsistency: Style/IndentationWidth: Enabled: true -# Checks the indentation of the first element in an array literal. -Style/IndentArray: - Enabled: false - -# Checks the indentation of the first key in a hash literal. -Style/IndentHash: - Enabled: false - # Use Kernel#loop for infinite loops. Style/InfiniteLoop: Enabled: true -# Use the new lambda literal syntax for single-line blocks. -Style/Lambda: - Enabled: false - # Use lambda.call(...) instead of lambda.(...). Style/LambdaCall: Enabled: true @@ -321,14 +231,6 @@ Style/LambdaCall: Style/LeadingCommentSpace: Enabled: true -# Use \ instead of + or << to concatenate two string literals at line end. -Style/LineEndConcatenation: - Enabled: false - -# Do not use parentheses for method calls with no arguments. -Style/MethodCallParentheses: - Enabled: false - # Checks if the method definitions have or don't have parentheses. Style/MethodDefParentheses: Enabled: true @@ -337,10 +239,6 @@ Style/MethodDefParentheses: Style/MethodName: Enabled: true -# Checks for usage of `extend self` in modules. -Style/ModuleFunction: - Enabled: false - # Checks that the closing brace in an array literal is either on the same line # as the last array element, or a new line. Style/MultilineArrayBraceLayout: @@ -385,39 +283,18 @@ Style/MultilineMethodDefinitionBraceLayout: Style/MultilineOperationIndentation: Enabled: false -# Avoid multi-line `? :` (the ternary operator), use if/unless instead. -Style/MultilineTernaryOperator: - Enabled: false - -# Do not assign mutable objects to constants. -Style/MutableConstant: - Enabled: false - # Favor unless over if for negative conditions (or control flow or). Style/NegatedIf: Enabled: true -# Favor until over while for negative conditions. -Style/NegatedWhile: - Enabled: false - # Avoid using nested modifiers. Style/NestedModifier: Enabled: true -# Parenthesize method calls which are nested inside the argument list of -# another parenthesized method call. -Style/NestedParenthesizedCalls: - Enabled: false - # Use one expression per branch in a ternary operator. Style/NestedTernaryOperator: Enabled: true -# Use `next` to skip iteration instead of a condition at the end. -Style/Next: - Enabled: false - # Prefer x.nil? to x == nil. Style/NilComparison: Enabled: true @@ -442,51 +319,10 @@ Style/OneLineConditional: Style/OpMethod: Enabled: true -# Check for simple usages of parallel assignment. It will only warn when -# the number of variables matches on both sides of the assignment. -Style/ParallelAssignment: - Enabled: false - # Don't use parentheses around the condition of an if/unless/while. Style/ParenthesesAroundCondition: Enabled: true -# Use `%`-literal delimiters consistently. -Style/PercentLiteralDelimiters: - Enabled: false - -# Checks if uses of %Q/%q match the configured preference. -Style/PercentQLiterals: - Enabled: false - -# Avoid Perl-style regex back references. -Style/PerlBackrefs: - Enabled: false - -# Check the names of predicate methods. -Style/PredicateName: - Enabled: false - -# Use proc instead of Proc.new. -Style/Proc: - Enabled: false - -# Checks the arguments passed to raise/fail. -Style/RaiseArgs: - Enabled: false - -# Don't use begin blocks when they are not needed. -Style/RedundantBegin: - Enabled: false - -# Checks for an obsolete RuntimeException argument in raise/fail. -Style/RedundantException: - Enabled: false - -# Checks usages of Object#freeze on immutable objects. -Style/RedundantFreeze: - Enabled: false - # Checks for parentheses that seem not to serve any purpose. Style/RedundantParentheses: Enabled: true @@ -495,24 +331,6 @@ Style/RedundantParentheses: Style/RedundantReturn: Enabled: true -# Don't use self where it's not needed. -Style/RedundantSelf: - Enabled: false - -# Use %r for regular expressions matching more than `MaxSlashes` '/' -# characters. Use %r only for regular expressions matching more -# than `MaxSlashes` '/' character. -Style/RegexpLiteral: - Enabled: false - -# Avoid using rescue in its modifier form. -Style/RescueModifier: - Enabled: false - -# Checks for places where self-assignment shorthand should have been used. -Style/SelfAssignment: - Enabled: false - # Don't use semicolons to terminate expressions. Style/Semicolon: Enabled: true @@ -522,14 +340,6 @@ Style/SignalException: EnforcedStyle: only_raise Enabled: true -# Enforces the names of some block params. -Style/SingleLineBlockParams: - Enabled: false - -# Avoid single-line methods. -Style/SingleLineMethods: - Enabled: false - # Use spaces after colons. Style/SpaceAfterColon: Enabled: true @@ -551,11 +361,6 @@ Style/SpaceAfterNot: Style/SpaceAfterSemicolon: Enabled: true -# Checks that the equals signs in parameter default assignments have or don't -# have surrounding space depending on configuration. -Style/SpaceAroundEqualsInParameterDefault: - Enabled: false - # Use a space around keywords if appropriate. Style/SpaceAroundKeyword: Enabled: true @@ -564,10 +369,6 @@ Style/SpaceAroundKeyword: Style/SpaceAroundOperators: Enabled: true -# Checks that the left block brace has or doesn't have space before it. -Style/SpaceBeforeBlockBraces: - Enabled: false - # No spaces before commas. Style/SpaceBeforeComma: Enabled: true @@ -576,33 +377,14 @@ Style/SpaceBeforeComma: Style/SpaceBeforeComment: Enabled: true -# Checks that exactly one space is used between a method name and the first -# argument for method calls without parentheses. -Style/SpaceBeforeFirstArg: - Enabled: false - # No spaces before semicolons. Style/SpaceBeforeSemicolon: Enabled: true -# Checks that block braces have or don't have surrounding space. -# For blocks taking parameters, checks that the left brace has or doesn't -# have trailing space. -Style/SpaceInsideBlockBraces: - Enabled: false - -# No spaces after [ or before ]. -Style/SpaceInsideBrackets: - Enabled: false - # Use spaces inside hash literal braces - or don't. Style/SpaceInsideHashLiteralBraces: Enabled: true -# No spaces after ( or before ). -Style/SpaceInsideParens: - Enabled: false - # No spaces inside range literals. Style/SpaceInsideRangeLiteral: Enabled: true @@ -612,10 +394,6 @@ Style/SpaceInsideStringInterpolation: EnforcedStyle: no_space Enabled: true -# Avoid Perl-style global variables. -Style/SpecialGlobalVars: - Enabled: false - # Check for the usage of parentheses around stabby lambda arguments. Style/StabbyLambdaParentheses: EnforcedStyle: require_parentheses @@ -625,25 +403,12 @@ Style/StabbyLambdaParentheses: Style/StringLiterals: Enabled: false -# Checks if uses of quotes inside expressions in interpolated strings match the -# configured preference. -Style/StringLiteralsInInterpolation: - Enabled: false - # Checks if configured preferred methods are used over non-preferred. Style/StringMethods: PreferredMethods: intern: to_sym Enabled: true -# Use %i or %I for arrays of symbols. -Style/SymbolArray: - Enabled: false - -# Use symbols as procs instead of blocks when possible. -Style/SymbolProc: - Enabled: false - # No hard tabs. Style/Tab: Enabled: true @@ -652,40 +417,10 @@ Style/Tab: Style/TrailingBlankLines: Enabled: true -# Checks for trailing comma in array and hash literals. -Style/TrailingCommaInLiteral: - Enabled: false - -# Checks for trailing comma in argument lists. -Style/TrailingCommaInArguments: - Enabled: false - -# Avoid trailing whitespace. -Style/TrailingWhitespace: - Enabled: false - -# Checks for the usage of unneeded trailing underscores at the end of -# parallel variable assignment. -Style/TrailingUnderscoreVariable: - Enabled: false - -# Prefer attr_* methods to trivial readers/writers. -Style/TrivialAccessors: - Enabled: false - -# Do not use unless with else. Rewrite these with the positive case first. -Style/UnlessElse: - Enabled: false - # Checks for %W when interpolation is not needed. Style/UnneededCapitalW: Enabled: true -# TODO: Enable UnneededInterpolation Cop. -# Checks for strings that are just an interpolated expression. -Style/UnneededInterpolation: - Enabled: false - # Checks for %q/%Q when single quotes or double quotes would do. Style/UnneededPercentQ: Enabled: false @@ -715,12 +450,6 @@ Style/WhileUntilModifier: Style/WordArray: Enabled: false -# TODO: Enable ZeroLengthPredicate Cop. -# Use #empty? when testing for objects of length 0. -Style/ZeroLengthPredicate: - Enabled: false - - #################### Metrics ################################ # A calculated magnitude based on number of assignments, @@ -774,15 +503,6 @@ Metrics/PerceivedComplexity: Lint/AmbiguousOperator: Enabled: true -# Checks for ambiguous regexp literals in the first argument of a method -# invocation without parentheses. -Lint/AmbiguousRegexpLiteral: - Enabled: false - -# Don't use assignment in conditions. -Lint/AssignmentInCondition: - Enabled: false - # Align block ends correctly. Lint/BlockAlignment: Enabled: true @@ -808,14 +528,6 @@ Lint/DefEndAlignment: Lint/DeprecatedClassMethods: Enabled: true -# Check for duplicate method definitions. -Lint/DuplicateMethods: - Enabled: false - -# Check for duplicate keys in hash literals. -Lint/DuplicatedKey: - Enabled: false - # Check for immutable argument given to each_with_object. Lint/EachWithObjectArgument: Enabled: true @@ -828,10 +540,6 @@ Lint/ElseLayout: Lint/EmptyEnsure: Enabled: true -# Checks for empty string interpolation. -Lint/EmptyInterpolation: - Enabled: false - # Align ends correctly. Lint/EndAlignment: Enabled: true @@ -856,21 +564,11 @@ Lint/FloatOutOfRange: Lint/FormatParameterMismatch: Enabled: true -# Don't suppress exception. -Lint/HandleExceptions: - Enabled: false - # Checks for adjacent string literals on the same line, which could better be # represented as a single string literal. Lint/ImplicitStringConcatenation: Enabled: true -# TODO: Enable IneffectiveAccessModifier Cop. -# Checks for attempts to use `private` or `protected` to set the visibility -# of a class method, which does not work. -Lint/IneffectiveAccessModifier: - Enabled: false - # Checks for invalid character literals with a non-escaped whitespace # character. Lint/InvalidCharacterLiteral: @@ -884,11 +582,6 @@ Lint/LiteralInCondition: Lint/LiteralInInterpolation: Enabled: true -# Use Kernel#loop with break rather than begin/end/until or begin/end/while -# for post-loop tests. -Lint/Loop: - Enabled: false - # Do not use nested method definitions. Lint/NestedMethodDefinition: Enabled: true @@ -914,13 +607,8 @@ Lint/RequireParentheses: Lint/RescueException: Enabled: true -# Do not use the same name as outer local variable for block arguments -# or block local variables. -Lint/ShadowingOuterLocalVariable: - Enabled: false - -# 'Checks for Object#to_s usage in string interpolation. -Lint/StringConversionInInterpolation: +# Checks for the order which exceptions are rescued to avoid rescueing a less specific exception before a more specific exception. +Lint/ShadowedException: Enabled: false # Do not use prefix `_` for a variable that is used. @@ -933,22 +621,10 @@ Lint/UnderscorePrefixedVariableName: Lint/UnneededDisable: Enabled: false -# Checks for unused block arguments. -Lint/UnusedBlockArgument: - Enabled: false - -# Checks for unused method arguments. -Lint/UnusedMethodArgument: - Enabled: false - # Unreachable code. Lint/UnreachableCode: Enabled: true -# Checks for useless access modifiers. -Lint/UselessAccessModifier: - Enabled: false - # Checks for useless assignment to a local variable. Lint/UselessAssignment: Enabled: true @@ -981,11 +657,6 @@ Performance/Casecmp: Performance/DoubleStartEndWith: Enabled: true -# TODO: Enable EndWith Cop. -# Use `end_with?` instead of a regex match anchored to the end of a string. -Performance/EndWith: - Enabled: false - # Use `strip` instead of `lstrip.rstrip`. Performance/LstripRstrip: Enabled: true @@ -994,24 +665,6 @@ Performance/LstripRstrip: Performance/RangeInclude: Enabled: true -# TODO: Enable RedundantBlockCall Cop. -# Use `yield` instead of `block.call`. -Performance/RedundantBlockCall: - Enabled: false - -# TODO: Enable RedundantMatch Cop. -# Use `=~` instead of `String#match` or `Regexp#match` in a context where the -# returned `MatchData` is not needed. -Performance/RedundantMatch: - Enabled: false - -# TODO: Enable RedundantMerge Cop. -# Use `Hash#[]=`, rather than `Hash#merge!` with a single key-value pair. -Performance/RedundantMerge: - # Max number of key-value pairs to consider an offense - MaxKeyValuePairs: 2 - Enabled: false - # Use `sort` instead of `sort_by { |x| x }`. Performance/RedundantSortBy: Enabled: true @@ -1080,18 +733,6 @@ Rails/ReadWriteAttribute: Rails/ScopeArgs: Enabled: true -# Checks the correct usage of time zone aware methods. -# http://danilenko.org/2012/7/6/rails_timezones -Rails/TimeZone: - Enabled: false - -# Use validates :attribute, hash of validations. -Rails/Validation: - Enabled: false - -Rails/UniqBeforePluck: - Enabled: false - ##################### RSpec ################################## # Check that instances are not being stubbed globally. diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9a791d74c15..cb6df9d88c2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,15 +1,66 @@ # This configuration was generated by -# `rubocop --auto-gen-config` -# on 2016-06-29 18:24:55 +0200 using RuboCop version 0.41.1. +# `rubocop --auto-gen-config --exclude-limit 8` +# on 2016-07-03 15:32:25 -0600 using RuboCop version 0.41.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. +# Offense count: 152 +Lint/AmbiguousRegexpLiteral: + Enabled: false + +# Offense count: 42 +# Configuration parameters: AllowSafeAssignment. +Lint/AssignmentInCondition: + Enabled: false + # Offense count: 1 -Lint/ShadowedException: +Lint/DuplicateMethods: + Exclude: + - 'lib/gitlab/github_import/branch_formatter.rb' + +# Offense count: 14 +Lint/HandleExceptions: + Enabled: false + +# Offense count: 20 +Lint/IneffectiveAccessModifier: + Enabled: false + +# Offense count: 2 +Lint/Loop: + Exclude: + - 'app/mailers/notify.rb' + - 'lib/gitlab/bitbucket_import/client.rb' + +# Offense count: 12 +Lint/ShadowingOuterLocalVariable: + Enabled: false + +# Offense count: 3 +# Cop supports --auto-correct. +Lint/StringConversionInInterpolation: Exclude: - - 'app/models/u2f_registration.rb' + - 'app/models/commit_range.rb' + - 'app/services/system_hooks_service.rb' + - 'app/services/system_note_service.rb' + +# Offense count: 42 +# Cop supports --auto-correct. +# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. +Lint/UnusedBlockArgument: + Enabled: false + +# Offense count: 125 +# Cop supports --auto-correct. +# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. +Lint/UnusedMethodArgument: + Enabled: false + +# Offense count: 11 +Lint/UselessAccessModifier: + Enabled: false # Offense count: 12 # Cop supports --auto-correct. @@ -23,10 +74,263 @@ Performance/PushSplat: - 'app/models/user.rb' - 'config/application.rb' +# Offense count: 2 +# Cop supports --auto-correct. +Performance/RedundantBlockCall: + Exclude: + - 'app/controllers/application_controller.rb' + - 'lib/gitlab/backend/shell.rb' + +# Offense count: 5 +# Cop supports --auto-correct. +Performance/RedundantMatch: + Exclude: + - 'app/models/external_issue.rb' + - 'lib/extracts_path.rb' + - 'lib/gitlab/diff/highlight.rb' + - 'lib/gitlab/diff/inline_diff.rb' + - 'lib/gitlab/diff/parser.rb' + +# Offense count: 24 +# Cop supports --auto-correct. +# Configuration parameters: MaxKeyValuePairs. +Performance/RedundantMerge: + Enabled: false + # Offense count: 59 Rails/OutputSafety: Enabled: false +# Offense count: 125 +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: strict, flexible +Rails/TimeZone: + Enabled: false + +# Offense count: 12 +# Cop supports --auto-correct. +# Configuration parameters: Include. +# Include: app/models/**/*.rb +Rails/Validation: + Enabled: false + +# Offense count: 18 +Style/AccessorMethodName: + Enabled: false + +# Offense count: 208 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: with_first_parameter, with_fixed_indentation +Style/AlignParameters: + Enabled: false + +# Offense count: 32 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: always, conditionals +Style/AndOr: + Enabled: false + +# Offense count: 47 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: percent_q, bare_percent +Style/BarePercentLiterals: + Enabled: false + +# Offense count: 255 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: braces, no_braces, context_dependent +Style/BracesAroundHashParameters: + Enabled: false + +# Offense count: 4 +Style/CaseEquality: + Exclude: + - 'app/helpers/auth_helper.rb' + - 'app/models/commit.rb' + - 'app/services/projects/download_service.rb' + - 'config/initializers/trusted_proxies.rb' + +# Offense count: 19 +# Cop supports --auto-correct. +Style/ColonMethodCall: + Enabled: false + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: Keywords. +# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW +Style/CommentAnnotation: + Exclude: + - 'app/models/project.rb' + - 'lib/api/entities.rb' + - 'spec/requests/api/project_snippets_spec.rb' + +# Offense count: 35 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly. +# SupportedStyles: assign_to_condition, assign_inside_condition +Style/ConditionalAssignment: + Enabled: false + +# Offense count: 762 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: leading, trailing +Style/DotPosition: + Enabled: false + +# Offense count: 14 +Style/DoubleNegation: + Enabled: false + +# Offense count: 3 +Style/EachWithObject: + Exclude: + - 'app/models/commit_status.rb' + - 'lib/ci/ansi2html.rb' + - 'lib/gitlab/import_export/members_mapper.rb' + +# Offense count: 29 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: empty, nil, both +Style/EmptyElse: + Enabled: false + +# Offense count: 3 +# Cop supports --auto-correct. +Style/EmptyLiteral: + Exclude: + - 'features/steps/project/commits/commits.rb' + - 'lib/gitlab/fogbugz_import/importer.rb' + - 'spec/lib/gitlab/workhorse_spec.rb' + +# Offense count: 119 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. +Style/ExtraSpacing: + Enabled: false + +# Offense count: 7 +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: format, sprintf, percent +Style/FormatString: + Exclude: + - 'app/models/ci/pipeline.rb' + - 'app/services/gravatar_service.rb' + - 'config/initializers/rack_lineprof.rb' + - 'lib/ci/version_info.rb' + - 'lib/gitlab/version_info.rb' + - 'spec/requests/api/issues_spec.rb' + +# Offense count: 50 +# Configuration parameters: MinBodyLength. +Style/GuardClause: + Enabled: false + +# Offense count: 9 +Style/IdenticalConditionalBranches: + Exclude: + - 'app/controllers/projects_controller.rb' + - 'app/models/project_services/irker_service.rb' + - 'app/services/merge_requests/refresh_service.rb' + - 'lib/rouge/formatters/html_gitlab.rb' + +# Offense count: 10 +Style/IfInsideElse: + Enabled: false + +# Offense count: 178 +# Cop supports --auto-correct. +# Configuration parameters: MaxLineLength. +Style/IfUnlessModifier: + Enabled: false + +# Offense count: 48 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_brackets +Style/IndentArray: + Enabled: false + +# Offense count: 85 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_braces +Style/IndentHash: + Enabled: false + +# Offense count: 11 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: line_count_dependent, lambda, literal +Style/Lambda: + Exclude: + - 'app/models/ci/runner.rb' + - 'app/models/event.rb' + - 'app/models/note.rb' + - 'config/routes.rb' + - 'lib/api/entities.rb' + - 'spec/models/concerns/participable_spec.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +Style/LineEndConcatenation: + Exclude: + - 'app/helpers/preferences_helper.rb' + - 'app/helpers/tree_helper.rb' + - 'app/models/merge_request.rb' + - 'app/models/user.rb' + - 'spec/lib/gitlab/gfm/reference_rewriter_spec.rb' + +# Offense count: 13 +# Cop supports --auto-correct. +Style/MethodCallParentheses: + Exclude: + - 'lib/api/helpers.rb' + - 'lib/ci/ansi2html.rb' + - 'spec/features/dashboard/datetime_on_tooltips_spec.rb' + - 'spec/helpers/submodule_helper_spec.rb' + - 'spec/workers/post_receive_spec.rb' + +# Offense count: 9 +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: module_function, extend_self +Style/ModuleFunction: + Enabled: false + +# Offense count: 3 +Style/MultilineTernaryOperator: + Exclude: + - 'lib/banzai/filter/relative_link_filter.rb' + - 'spec/support/api_helpers.rb' + +# Offense count: 62 +# Cop supports --auto-correct. +Style/MutableConstant: + Enabled: false + +# Offense count: 10 +# Cop supports --auto-correct. +Style/NestedParenthesizedCalls: + Exclude: + - 'app/helpers/commits_helper.rb' + - 'app/workers/irker_worker.rb' + - 'spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb' + - 'spec/lib/gitlab/email/message/repository_push_spec.rb' + - 'spec/services/ci/create_builds_service_spec.rb' + +# Offense count: 13 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. +# SupportedStyles: skip_modifier_ifs, always +Style/Next: + Enabled: false + # Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles. @@ -39,23 +343,166 @@ Style/NumericLiteralPrefix: - 'spec/support/test_env.rb' - 'spec/tasks/gitlab/backup_rake_spec.rb' +# Offense count: 29 +# Cop supports --auto-correct. +Style/ParallelAssignment: + Enabled: false + +# Offense count: 201 +# Cop supports --auto-correct. +# Configuration parameters: PreferredDelimiters. +Style/PercentLiteralDelimiters: + Enabled: false + +# Offense count: 11 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: lower_case_q, upper_case_q +Style/PercentQLiterals: + Exclude: + - 'spec/helpers/gitlab_markdown_helper_spec.rb' + - 'spec/lib/gitlab/diff/highlight_spec.rb' + - 'spec/models/project_services/bamboo_service_spec.rb' + - 'spec/models/project_services/teamcity_service_spec.rb' + - 'spec/workers/repository_import_worker_spec.rb' + +# Offense count: 14 +# Cop supports --auto-correct. +Style/PerlBackrefs: + Enabled: false + +# Offense count: 30 +# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. +# NamePrefix: is_, has_, have_ +# NamePrefixBlacklist: is_, has_, have_ +# NameWhitelist: is_a? +Style/PredicateName: + Enabled: false + # Offense count: 28 # Cop supports --auto-correct. Style/PreferredHashMethods: + Enabled: false + +# Offense count: 6 +# Cop supports --auto-correct. +Style/Proc: Exclude: - - 'app/helpers/dropdowns_helper.rb' - - 'app/models/application_setting.rb' - - 'app/models/members/project_member.rb' - - 'app/services/git_push_service.rb' - - 'lib/api/helpers.rb' - - 'lib/ci/api/builds.rb' - - 'lib/ci/gitlab_ci_yaml_processor.rb' - - 'lib/gitlab/ci/config/node/configurable.rb' - - 'lib/gitlab/ci/config/node/factory.rb' - - 'lib/gitlab/google_code_import/client.rb' - - 'lib/gitlab/google_code_import/importer.rb' - - 'lib/gitlab/visibility_level.rb' - - 'spec/requests/api/projects_spec.rb' + - 'app/mailers/base_mailer.rb' + - 'app/models/label.rb' + - 'app/models/service.rb' + - 'lib/api/api_guard.rb' + - 'spec/initializers/trusted_proxies_spec.rb' + +# Offense count: 21 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: compact, exploded +Style/RaiseArgs: + Enabled: false + +# Offense count: 3 +# Cop supports --auto-correct. +Style/RedundantBegin: + Exclude: + - 'app/models/ci/build.rb' + - 'app/models/merge_request.rb' + - 'app/services/projects/import_service.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/RedundantException: + Exclude: + - 'app/helpers/preferences_helper.rb' + +# Offense count: 21 +# Cop supports --auto-correct. +Style/RedundantFreeze: + Enabled: false + +# Offense count: 312 +# Cop supports --auto-correct. +Style/RedundantSelf: + Enabled: false + +# Offense count: 92 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. +# SupportedStyles: slashes, percent_r, mixed +Style/RegexpLiteral: + Enabled: false + +# Offense count: 14 +# Cop supports --auto-correct. +Style/RescueModifier: + Enabled: false + +# Offense count: 2 +# Cop supports --auto-correct. +Style/SelfAssignment: + Exclude: + - 'app/services/notification_service.rb' + - 'lib/api/runners.rb' + +# Offense count: 2 +# Configuration parameters: Methods. +# Methods: {"reduce"=>["a", "e"]}, {"inject"=>["a", "e"]} +Style/SingleLineBlockParams: + Exclude: + - 'app/models/commit.rb' + - 'spec/support/services_shared_context.rb' + +# Offense count: 50 +# Cop supports --auto-correct. +# Configuration parameters: AllowIfMethodIsEmpty. +Style/SingleLineMethods: + Exclude: + - 'lib/ci/ansi2html.rb' + +# Offense count: 14 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: space, no_space +Style/SpaceAroundEqualsInParameterDefault: + Enabled: false + +# Offense count: 118 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: space, no_space +Style/SpaceBeforeBlockBraces: + Enabled: false + +# Offense count: 11 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Style/SpaceBeforeFirstArg: + Exclude: + - 'config/initializers/doorkeeper.rb' + - 'config/routes.rb' + - 'features/steps/project/source/browse_files.rb' + - 'features/steps/project/source/markdown_render.rb' + - 'spec/routing/project_routing_spec.rb' + - 'spec/services/delete_user_service_spec.rb' + - 'spec/services/projects/fork_service_spec.rb' + - 'spec/services/system_note_service_spec.rb' + +# Offense count: 129 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. +# SupportedStyles: space, no_space +Style/SpaceInsideBlockBraces: + Enabled: false + +# Offense count: 92 +# Cop supports --auto-correct. +Style/SpaceInsideBrackets: + Enabled: false + +# Offense count: 60 +# Cop supports --auto-correct. +Style/SpaceInsideParens: + Enabled: false # Offense count: 5 # Cop supports --auto-correct. @@ -63,3 +510,89 @@ Style/SpaceInsidePercentLiteralDelimiters: Exclude: - 'lib/event_filter.rb' - 'lib/gitlab/git_access.rb' + +# Offense count: 33 +# Cop supports --auto-correct. +# Configuration parameters: SupportedStyles. +# SupportedStyles: use_perl_names, use_english_names +Style/SpecialGlobalVars: + EnforcedStyle: use_perl_names + +# Offense count: 30 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiteralsInInterpolation: + Enabled: false + +# Offense count: 24 +# Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. +# IgnoredMethods: respond_to, define_method +Style/SymbolProc: + Enabled: false + +# Offense count: 23 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. +# SupportedStyles: comma, consistent_comma, no_comma +Style/TrailingCommaInArguments: + Enabled: false + +# Offense count: 117 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. +# SupportedStyles: comma, consistent_comma, no_comma +Style/TrailingCommaInLiteral: + Enabled: false + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: AllowNamedUnderscoreVariables. +Style/TrailingUnderscoreVariable: + Exclude: + - 'app/controllers/admin/background_jobs_controller.rb' + - 'app/controllers/invites_controller.rb' + - 'app/controllers/projects/git_http_controller.rb' + - 'app/helpers/tab_helper.rb' + - 'lib/gitlab/force_push_check.rb' + - 'lib/gitlab/logger.rb' + +# Offense count: 89 +# Cop supports --auto-correct. +Style/TrailingWhitespace: + Enabled: false + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist. +# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym +Style/TrivialAccessors: + Exclude: + - 'app/models/external_issue.rb' + - 'lib/gitlab/ldap/person.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Style/UnlessElse: + Exclude: + - 'lib/api/projects.rb' + - 'lib/gitlab/backend/grack_auth.rb' + - 'lib/gitlab/project_search_results.rb' + +# Offense count: 14 +# Cop supports --auto-correct. +Style/UnneededInterpolation: + Enabled: false + +# Offense count: 8 +# Cop supports --auto-correct. +Style/ZeroLengthPredicate: + Exclude: + - 'app/models/deploy_key.rb' + - 'app/models/network/commit.rb' + - 'app/models/network/graph.rb' + - 'app/models/project_services/asana_service.rb' + - 'app/models/repository.rb' + - 'lib/extracts_path.rb' + - 'lib/gitlab/force_push_check.rb' -- cgit v1.2.1 From c4cbf3effa2c19ebcdcd3943b46ed9296c6e609e Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 5 Jul 2016 10:33:50 -0600 Subject: Disable two cops as recommended. --- .rubocop.yml | 8 ++++++++ .rubocop_todo.yml | 42 ++++++++++++++++-------------------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ce4287a2796..db0bcfadcf4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -37,6 +37,10 @@ AllCops: Style/AccessModifierIndentation: Enabled: true +# Check the naming of accessor methods for get_/set_. +Style/AccessorMethodName: + Enabled: false + # Use alias_method instead of alias. Style/Alias: EnforcedStyle: prefer_alias_method @@ -239,6 +243,10 @@ Style/MethodDefParentheses: Style/MethodName: Enabled: true +# Checks for usage of `extend self` in modules. +Style/ModuleFunction: + Enabled: false + # Checks that the closing brace in an array literal is either on the same line # as the last array element, or a new line. Style/MultilineArrayBraceLayout: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index cb6df9d88c2..8204fd82a63 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,12 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 8` -# on 2016-07-03 15:32:25 -0600 using RuboCop version 0.41.1. +# on 2016-07-05 10:30:07 -0600 using RuboCop version 0.41.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 152 +# Offense count: 154 Lint/AmbiguousRegexpLiteral: Enabled: false @@ -52,7 +52,7 @@ Lint/StringConversionInInterpolation: Lint/UnusedBlockArgument: Enabled: false -# Offense count: 125 +# Offense count: 129 # Cop supports --auto-correct. # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. Lint/UnusedMethodArgument: @@ -114,11 +114,7 @@ Rails/TimeZone: Rails/Validation: Enabled: false -# Offense count: 18 -Style/AccessorMethodName: - Enabled: false - -# Offense count: 208 +# Offense count: 218 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: with_first_parameter, with_fixed_indentation @@ -139,7 +135,7 @@ Style/AndOr: Style/BarePercentLiterals: Enabled: false -# Offense count: 255 +# Offense count: 256 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: braces, no_braces, context_dependent @@ -176,7 +172,7 @@ Style/CommentAnnotation: Style/ConditionalAssignment: Enabled: false -# Offense count: 762 +# Offense count: 773 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: leading, trailing @@ -194,7 +190,7 @@ Style/EachWithObject: - 'lib/ci/ansi2html.rb' - 'lib/gitlab/import_export/members_mapper.rb' -# Offense count: 29 +# Offense count: 30 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: empty, nil, both @@ -244,7 +240,7 @@ Style/IdenticalConditionalBranches: Style/IfInsideElse: Enabled: false -# Offense count: 178 +# Offense count: 179 # Cop supports --auto-correct. # Configuration parameters: MaxLineLength. Style/IfUnlessModifier: @@ -297,19 +293,13 @@ Style/MethodCallParentheses: - 'spec/helpers/submodule_helper_spec.rb' - 'spec/workers/post_receive_spec.rb' -# Offense count: 9 -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: module_function, extend_self -Style/ModuleFunction: - Enabled: false - # Offense count: 3 Style/MultilineTernaryOperator: Exclude: - 'lib/banzai/filter/relative_link_filter.rb' - 'spec/support/api_helpers.rb' -# Offense count: 62 +# Offense count: 61 # Cop supports --auto-correct. Style/MutableConstant: Enabled: false @@ -348,7 +338,7 @@ Style/NumericLiteralPrefix: Style/ParallelAssignment: Enabled: false -# Offense count: 201 +# Offense count: 206 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: @@ -379,7 +369,7 @@ Style/PerlBackrefs: Style/PredicateName: Enabled: false -# Offense count: 28 +# Offense count: 27 # Cop supports --auto-correct. Style/PreferredHashMethods: Enabled: false @@ -394,7 +384,7 @@ Style/Proc: - 'lib/api/api_guard.rb' - 'spec/initializers/trusted_proxies_spec.rb' -# Offense count: 21 +# Offense count: 20 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: compact, exploded @@ -420,7 +410,7 @@ Style/RedundantException: Style/RedundantFreeze: Enabled: false -# Offense count: 312 +# Offense count: 321 # Cop supports --auto-correct. Style/RedundantSelf: Enabled: false @@ -466,7 +456,7 @@ Style/SingleLineMethods: Style/SpaceAroundEqualsInParameterDefault: Enabled: false -# Offense count: 118 +# Offense count: 119 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: space, no_space @@ -494,7 +484,7 @@ Style/SpaceBeforeFirstArg: Style/SpaceInsideBlockBraces: Enabled: false -# Offense count: 92 +# Offense count: 98 # Cop supports --auto-correct. Style/SpaceInsideBrackets: Enabled: false @@ -558,7 +548,7 @@ Style/TrailingUnderscoreVariable: - 'lib/gitlab/force_push_check.rb' - 'lib/gitlab/logger.rb' -# Offense count: 89 +# Offense count: 88 # Cop supports --auto-correct. Style/TrailingWhitespace: Enabled: false -- cgit v1.2.1 From 9468b07925a1ab47fc485bf6baddaf4e89252b08 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 13 Jul 2016 12:08:45 -0600 Subject: Resolve feedback. --- .rubocop_todo.yml | 95 ++++++++++++++++++++++++------------------------------- Gemfile | 2 +- Gemfile.lock | 2 +- 3 files changed, 44 insertions(+), 55 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8204fd82a63..3478d86f1fa 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 8` -# on 2016-07-05 10:30:07 -0600 using RuboCop version 0.41.1. +# on 2016-07-13 12:03:44 -0600 using RuboCop version 0.41.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -10,21 +10,16 @@ Lint/AmbiguousRegexpLiteral: Enabled: false -# Offense count: 42 +# Offense count: 43 # Configuration parameters: AllowSafeAssignment. Lint/AssignmentInCondition: Enabled: false -# Offense count: 1 -Lint/DuplicateMethods: - Exclude: - - 'lib/gitlab/github_import/branch_formatter.rb' - # Offense count: 14 Lint/HandleExceptions: Enabled: false -# Offense count: 20 +# Offense count: 21 Lint/IneffectiveAccessModifier: Enabled: false @@ -34,7 +29,7 @@ Lint/Loop: - 'app/mailers/notify.rb' - 'lib/gitlab/bitbucket_import/client.rb' -# Offense count: 12 +# Offense count: 15 Lint/ShadowingOuterLocalVariable: Enabled: false @@ -46,7 +41,7 @@ Lint/StringConversionInInterpolation: - 'app/services/system_hooks_service.rb' - 'app/services/system_note_service.rb' -# Offense count: 42 +# Offense count: 44 # Cop supports --auto-correct. # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: @@ -81,14 +76,13 @@ Performance/RedundantBlockCall: - 'app/controllers/application_controller.rb' - 'lib/gitlab/backend/shell.rb' -# Offense count: 5 +# Offense count: 4 # Cop supports --auto-correct. Performance/RedundantMatch: Exclude: - 'app/models/external_issue.rb' - 'lib/extracts_path.rb' - 'lib/gitlab/diff/highlight.rb' - - 'lib/gitlab/diff/inline_diff.rb' - 'lib/gitlab/diff/parser.rb' # Offense count: 24 @@ -97,11 +91,11 @@ Performance/RedundantMatch: Performance/RedundantMerge: Enabled: false -# Offense count: 59 +# Offense count: 60 Rails/OutputSafety: Enabled: false -# Offense count: 125 +# Offense count: 128 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: strict, flexible Rails/TimeZone: @@ -114,7 +108,7 @@ Rails/TimeZone: Rails/Validation: Enabled: false -# Offense count: 218 +# Offense count: 217 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: with_first_parameter, with_fixed_indentation @@ -135,18 +129,19 @@ Style/AndOr: Style/BarePercentLiterals: Enabled: false -# Offense count: 256 +# Offense count: 258 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: braces, no_braces, context_dependent Style/BracesAroundHashParameters: Enabled: false -# Offense count: 4 +# Offense count: 5 Style/CaseEquality: Exclude: - 'app/helpers/auth_helper.rb' - 'app/models/commit.rb' + - 'app/models/protected_branch.rb' - 'app/services/projects/download_service.rb' - 'config/initializers/trusted_proxies.rb' @@ -165,21 +160,21 @@ Style/CommentAnnotation: - 'lib/api/entities.rb' - 'spec/requests/api/project_snippets_spec.rb' -# Offense count: 35 +# Offense count: 34 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly. # SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: Enabled: false -# Offense count: 773 +# Offense count: 788 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: leading, trailing Style/DotPosition: Enabled: false -# Offense count: 14 +# Offense count: 13 Style/DoubleNegation: Enabled: false @@ -205,7 +200,7 @@ Style/EmptyLiteral: - 'lib/gitlab/fogbugz_import/importer.rb' - 'spec/lib/gitlab/workhorse_spec.rb' -# Offense count: 119 +# Offense count: 123 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. Style/ExtraSpacing: @@ -223,44 +218,36 @@ Style/FormatString: - 'lib/gitlab/version_info.rb' - 'spec/requests/api/issues_spec.rb' -# Offense count: 50 +# Offense count: 48 # Configuration parameters: MinBodyLength. Style/GuardClause: Enabled: false -# Offense count: 9 -Style/IdenticalConditionalBranches: - Exclude: - - 'app/controllers/projects_controller.rb' - - 'app/models/project_services/irker_service.rb' - - 'app/services/merge_requests/refresh_service.rb' - - 'lib/rouge/formatters/html_gitlab.rb' - -# Offense count: 10 +# Offense count: 11 Style/IfInsideElse: Enabled: false -# Offense count: 179 +# Offense count: 177 # Cop supports --auto-correct. # Configuration parameters: MaxLineLength. Style/IfUnlessModifier: Enabled: false -# Offense count: 48 +# Offense count: 50 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets Style/IndentArray: Enabled: false -# Offense count: 85 +# Offense count: 89 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_braces Style/IndentHash: Enabled: false -# Offense count: 11 +# Offense count: 12 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: line_count_dependent, lambda, literal @@ -269,6 +256,7 @@ Style/Lambda: - 'app/models/ci/runner.rb' - 'app/models/event.rb' - 'app/models/note.rb' + - 'app/models/notification_setting.rb' - 'config/routes.rb' - 'lib/api/entities.rb' - 'spec/models/concerns/participable_spec.rb' @@ -299,7 +287,7 @@ Style/MultilineTernaryOperator: - 'lib/banzai/filter/relative_link_filter.rb' - 'spec/support/api_helpers.rb' -# Offense count: 61 +# Offense count: 62 # Cop supports --auto-correct. Style/MutableConstant: Enabled: false @@ -314,14 +302,14 @@ Style/NestedParenthesizedCalls: - 'spec/lib/gitlab/email/message/repository_push_spec.rb' - 'spec/services/ci/create_builds_service_spec.rb' -# Offense count: 13 +# Offense count: 12 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. # SupportedStyles: skip_modifier_ifs, always Style/Next: Enabled: false -# Offense count: 6 +# Offense count: 8 # Cop supports --auto-correct. # Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles. # SupportedOctalStyles: zero_with_o, zero_only @@ -330,6 +318,7 @@ Style/NumericLiteralPrefix: - 'config/initializers/1_settings.rb' - 'config/initializers/secret_token.rb' - 'lib/gitlab/backend/shell.rb' + - 'spec/lib/gitlab/git/hook_spec.rb' - 'spec/support/test_env.rb' - 'spec/tasks/gitlab/backup_rake_spec.rb' @@ -338,7 +327,7 @@ Style/NumericLiteralPrefix: Style/ParallelAssignment: Enabled: false -# Offense count: 206 +# Offense count: 208 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: @@ -356,12 +345,12 @@ Style/PercentQLiterals: - 'spec/models/project_services/teamcity_service_spec.rb' - 'spec/workers/repository_import_worker_spec.rb' -# Offense count: 14 +# Offense count: 13 # Cop supports --auto-correct. Style/PerlBackrefs: Enabled: false -# Offense count: 30 +# Offense count: 32 # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. # NamePrefix: is_, has_, have_ # NamePrefixBlacklist: is_, has_, have_ @@ -369,7 +358,7 @@ Style/PerlBackrefs: Style/PredicateName: Enabled: false -# Offense count: 27 +# Offense count: 28 # Cop supports --auto-correct. Style/PreferredHashMethods: Enabled: false @@ -405,24 +394,24 @@ Style/RedundantException: Exclude: - 'app/helpers/preferences_helper.rb' -# Offense count: 21 +# Offense count: 23 # Cop supports --auto-correct. Style/RedundantFreeze: Enabled: false -# Offense count: 321 +# Offense count: 377 # Cop supports --auto-correct. Style/RedundantSelf: Enabled: false -# Offense count: 92 +# Offense count: 94 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. # SupportedStyles: slashes, percent_r, mixed Style/RegexpLiteral: Enabled: false -# Offense count: 14 +# Offense count: 17 # Cop supports --auto-correct. Style/RescueModifier: Enabled: false @@ -477,7 +466,7 @@ Style/SpaceBeforeFirstArg: - 'spec/services/projects/fork_service_spec.rb' - 'spec/services/system_note_service_spec.rb' -# Offense count: 129 +# Offense count: 130 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # SupportedStyles: space, no_space @@ -501,7 +490,7 @@ Style/SpaceInsidePercentLiteralDelimiters: - 'lib/event_filter.rb' - 'lib/gitlab/git_access.rb' -# Offense count: 33 +# Offense count: 36 # Cop supports --auto-correct. # Configuration parameters: SupportedStyles. # SupportedStyles: use_perl_names, use_english_names @@ -529,7 +518,7 @@ Style/SymbolProc: Style/TrailingCommaInArguments: Enabled: false -# Offense count: 117 +# Offense count: 114 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. # SupportedStyles: comma, consistent_comma, no_comma @@ -545,10 +534,10 @@ Style/TrailingUnderscoreVariable: - 'app/controllers/invites_controller.rb' - 'app/controllers/projects/git_http_controller.rb' - 'app/helpers/tab_helper.rb' - - 'lib/gitlab/force_push_check.rb' + - 'lib/gitlab/checks/force_push.rb' - 'lib/gitlab/logger.rb' -# Offense count: 88 +# Offense count: 90 # Cop supports --auto-correct. Style/TrailingWhitespace: Enabled: false @@ -570,7 +559,7 @@ Style/UnlessElse: - 'lib/gitlab/backend/grack_auth.rb' - 'lib/gitlab/project_search_results.rb' -# Offense count: 14 +# Offense count: 13 # Cop supports --auto-correct. Style/UnneededInterpolation: Enabled: false @@ -585,4 +574,4 @@ Style/ZeroLengthPredicate: - 'app/models/project_services/asana_service.rb' - 'app/models/repository.rb' - 'lib/extracts_path.rb' - - 'lib/gitlab/force_push_check.rb' + - 'lib/gitlab/checks/force_push.rb' diff --git a/Gemfile b/Gemfile index 0769214a071..7f16e0bd18c 100644 --- a/Gemfile +++ b/Gemfile @@ -299,7 +299,7 @@ group :development, :test do gem 'spring-commands-spinach', '~> 1.1.0' gem 'spring-commands-teaspoon', '~> 0.0.2' - gem 'rubocop', '~> 0.41.1', require: false + gem 'rubocop', '~> 0.41.2', require: false gem 'rubocop-rspec', '~> 1.5.0', require: false gem 'scss_lint', '~> 0.47.0', require: false gem 'simplecov', '~> 0.11.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 6f93a534359..cb3a3af47cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -937,7 +937,7 @@ DEPENDENCIES rqrcode-rails3 (~> 0.1.7) rspec-rails (~> 3.5.0) rspec-retry (~> 0.4.5) - rubocop (~> 0.41.1) + rubocop (~> 0.41.2) rubocop-rspec (~> 1.5.0) ruby-fogbugz (~> 0.2.1) sanitize (~> 2.0) -- cgit v1.2.1 From 82c500a2b69e985cb12ce89964c6ebdd289a0d23 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 13 Jul 2016 12:39:14 -0600 Subject: Disable all cops with offenses. --- .rubocop_todo.yml | 183 ++++++++++-------------------------------------------- 1 file changed, 34 insertions(+), 149 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3478d86f1fa..9310e711889 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by -# `rubocop --auto-gen-config --exclude-limit 8` -# on 2016-07-13 12:03:44 -0600 using RuboCop version 0.41.2. +# `rubocop --auto-gen-config --exclude-limit 0` +# on 2016-07-13 12:36:08 -0600 using RuboCop version 0.41.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -25,9 +25,7 @@ Lint/IneffectiveAccessModifier: # Offense count: 2 Lint/Loop: - Exclude: - - 'app/mailers/notify.rb' - - 'lib/gitlab/bitbucket_import/client.rb' + Enabled: false # Offense count: 15 Lint/ShadowingOuterLocalVariable: @@ -36,10 +34,7 @@ Lint/ShadowingOuterLocalVariable: # Offense count: 3 # Cop supports --auto-correct. Lint/StringConversionInInterpolation: - Exclude: - - 'app/models/commit_range.rb' - - 'app/services/system_hooks_service.rb' - - 'app/services/system_note_service.rb' + Enabled: false # Offense count: 44 # Cop supports --auto-correct. @@ -60,30 +55,17 @@ Lint/UselessAccessModifier: # Offense count: 12 # Cop supports --auto-correct. Performance/PushSplat: - Exclude: - - 'app/controllers/projects/refs_controller.rb' - - 'app/helpers/page_layout_helper.rb' - - 'app/models/ability.rb' - - 'app/models/network/graph.rb' - - 'app/models/project_team.rb' - - 'app/models/user.rb' - - 'config/application.rb' + Enabled: false # Offense count: 2 # Cop supports --auto-correct. Performance/RedundantBlockCall: - Exclude: - - 'app/controllers/application_controller.rb' - - 'lib/gitlab/backend/shell.rb' + Enabled: false # Offense count: 4 # Cop supports --auto-correct. Performance/RedundantMatch: - Exclude: - - 'app/models/external_issue.rb' - - 'lib/extracts_path.rb' - - 'lib/gitlab/diff/highlight.rb' - - 'lib/gitlab/diff/parser.rb' + Enabled: false # Offense count: 24 # Cop supports --auto-correct. @@ -138,12 +120,7 @@ Style/BracesAroundHashParameters: # Offense count: 5 Style/CaseEquality: - Exclude: - - 'app/helpers/auth_helper.rb' - - 'app/models/commit.rb' - - 'app/models/protected_branch.rb' - - 'app/services/projects/download_service.rb' - - 'config/initializers/trusted_proxies.rb' + Enabled: false # Offense count: 19 # Cop supports --auto-correct. @@ -155,10 +132,7 @@ Style/ColonMethodCall: # Configuration parameters: Keywords. # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW Style/CommentAnnotation: - Exclude: - - 'app/models/project.rb' - - 'lib/api/entities.rb' - - 'spec/requests/api/project_snippets_spec.rb' + Enabled: false # Offense count: 34 # Cop supports --auto-correct. @@ -167,7 +141,7 @@ Style/CommentAnnotation: Style/ConditionalAssignment: Enabled: false -# Offense count: 788 +# Offense count: 789 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: leading, trailing @@ -180,10 +154,7 @@ Style/DoubleNegation: # Offense count: 3 Style/EachWithObject: - Exclude: - - 'app/models/commit_status.rb' - - 'lib/ci/ansi2html.rb' - - 'lib/gitlab/import_export/members_mapper.rb' + Enabled: false # Offense count: 30 # Cop supports --auto-correct. @@ -195,10 +166,7 @@ Style/EmptyElse: # Offense count: 3 # Cop supports --auto-correct. Style/EmptyLiteral: - Exclude: - - 'features/steps/project/commits/commits.rb' - - 'lib/gitlab/fogbugz_import/importer.rb' - - 'spec/lib/gitlab/workhorse_spec.rb' + Enabled: false # Offense count: 123 # Cop supports --auto-correct. @@ -210,13 +178,7 @@ Style/ExtraSpacing: # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: format, sprintf, percent Style/FormatString: - Exclude: - - 'app/models/ci/pipeline.rb' - - 'app/services/gravatar_service.rb' - - 'config/initializers/rack_lineprof.rb' - - 'lib/ci/version_info.rb' - - 'lib/gitlab/version_info.rb' - - 'spec/requests/api/issues_spec.rb' + Enabled: false # Offense count: 48 # Configuration parameters: MinBodyLength. @@ -233,7 +195,7 @@ Style/IfInsideElse: Style/IfUnlessModifier: Enabled: false -# Offense count: 50 +# Offense count: 52 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets @@ -252,40 +214,21 @@ Style/IndentHash: # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: line_count_dependent, lambda, literal Style/Lambda: - Exclude: - - 'app/models/ci/runner.rb' - - 'app/models/event.rb' - - 'app/models/note.rb' - - 'app/models/notification_setting.rb' - - 'config/routes.rb' - - 'lib/api/entities.rb' - - 'spec/models/concerns/participable_spec.rb' + Enabled: false # Offense count: 6 # Cop supports --auto-correct. Style/LineEndConcatenation: - Exclude: - - 'app/helpers/preferences_helper.rb' - - 'app/helpers/tree_helper.rb' - - 'app/models/merge_request.rb' - - 'app/models/user.rb' - - 'spec/lib/gitlab/gfm/reference_rewriter_spec.rb' + Enabled: false # Offense count: 13 # Cop supports --auto-correct. Style/MethodCallParentheses: - Exclude: - - 'lib/api/helpers.rb' - - 'lib/ci/ansi2html.rb' - - 'spec/features/dashboard/datetime_on_tooltips_spec.rb' - - 'spec/helpers/submodule_helper_spec.rb' - - 'spec/workers/post_receive_spec.rb' + Enabled: false # Offense count: 3 Style/MultilineTernaryOperator: - Exclude: - - 'lib/banzai/filter/relative_link_filter.rb' - - 'spec/support/api_helpers.rb' + Enabled: false # Offense count: 62 # Cop supports --auto-correct. @@ -295,12 +238,7 @@ Style/MutableConstant: # Offense count: 10 # Cop supports --auto-correct. Style/NestedParenthesizedCalls: - Exclude: - - 'app/helpers/commits_helper.rb' - - 'app/workers/irker_worker.rb' - - 'spec/lib/gitlab/ci/build/artifacts/metadata/entry_spec.rb' - - 'spec/lib/gitlab/email/message/repository_push_spec.rb' - - 'spec/services/ci/create_builds_service_spec.rb' + Enabled: false # Offense count: 12 # Cop supports --auto-correct. @@ -314,13 +252,7 @@ Style/Next: # Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles. # SupportedOctalStyles: zero_with_o, zero_only Style/NumericLiteralPrefix: - Exclude: - - 'config/initializers/1_settings.rb' - - 'config/initializers/secret_token.rb' - - 'lib/gitlab/backend/shell.rb' - - 'spec/lib/gitlab/git/hook_spec.rb' - - 'spec/support/test_env.rb' - - 'spec/tasks/gitlab/backup_rake_spec.rb' + Enabled: false # Offense count: 29 # Cop supports --auto-correct. @@ -338,12 +270,7 @@ Style/PercentLiteralDelimiters: # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: lower_case_q, upper_case_q Style/PercentQLiterals: - Exclude: - - 'spec/helpers/gitlab_markdown_helper_spec.rb' - - 'spec/lib/gitlab/diff/highlight_spec.rb' - - 'spec/models/project_services/bamboo_service_spec.rb' - - 'spec/models/project_services/teamcity_service_spec.rb' - - 'spec/workers/repository_import_worker_spec.rb' + Enabled: false # Offense count: 13 # Cop supports --auto-correct. @@ -366,12 +293,7 @@ Style/PreferredHashMethods: # Offense count: 6 # Cop supports --auto-correct. Style/Proc: - Exclude: - - 'app/mailers/base_mailer.rb' - - 'app/models/label.rb' - - 'app/models/service.rb' - - 'lib/api/api_guard.rb' - - 'spec/initializers/trusted_proxies_spec.rb' + Enabled: false # Offense count: 20 # Cop supports --auto-correct. @@ -383,16 +305,12 @@ Style/RaiseArgs: # Offense count: 3 # Cop supports --auto-correct. Style/RedundantBegin: - Exclude: - - 'app/models/ci/build.rb' - - 'app/models/merge_request.rb' - - 'app/services/projects/import_service.rb' + Enabled: false # Offense count: 1 # Cop supports --auto-correct. Style/RedundantException: - Exclude: - - 'app/helpers/preferences_helper.rb' + Enabled: false # Offense count: 23 # Cop supports --auto-correct. @@ -419,24 +337,19 @@ Style/RescueModifier: # Offense count: 2 # Cop supports --auto-correct. Style/SelfAssignment: - Exclude: - - 'app/services/notification_service.rb' - - 'lib/api/runners.rb' + Enabled: false # Offense count: 2 # Configuration parameters: Methods. # Methods: {"reduce"=>["a", "e"]}, {"inject"=>["a", "e"]} Style/SingleLineBlockParams: - Exclude: - - 'app/models/commit.rb' - - 'spec/support/services_shared_context.rb' + Enabled: false # Offense count: 50 # Cop supports --auto-correct. # Configuration parameters: AllowIfMethodIsEmpty. Style/SingleLineMethods: - Exclude: - - 'lib/ci/ansi2html.rb' + Enabled: false # Offense count: 14 # Cop supports --auto-correct. @@ -456,15 +369,7 @@ Style/SpaceBeforeBlockBraces: # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment. Style/SpaceBeforeFirstArg: - Exclude: - - 'config/initializers/doorkeeper.rb' - - 'config/routes.rb' - - 'features/steps/project/source/browse_files.rb' - - 'features/steps/project/source/markdown_render.rb' - - 'spec/routing/project_routing_spec.rb' - - 'spec/services/delete_user_service_spec.rb' - - 'spec/services/projects/fork_service_spec.rb' - - 'spec/services/system_note_service_spec.rb' + Enabled: false # Offense count: 130 # Cop supports --auto-correct. @@ -486,9 +391,7 @@ Style/SpaceInsideParens: # Offense count: 5 # Cop supports --auto-correct. Style/SpaceInsidePercentLiteralDelimiters: - Exclude: - - 'lib/event_filter.rb' - - 'lib/gitlab/git_access.rb' + Enabled: false # Offense count: 36 # Cop supports --auto-correct. @@ -518,7 +421,7 @@ Style/SymbolProc: Style/TrailingCommaInArguments: Enabled: false -# Offense count: 114 +# Offense count: 113 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. # SupportedStyles: comma, consistent_comma, no_comma @@ -529,13 +432,7 @@ Style/TrailingCommaInLiteral: # Cop supports --auto-correct. # Configuration parameters: AllowNamedUnderscoreVariables. Style/TrailingUnderscoreVariable: - Exclude: - - 'app/controllers/admin/background_jobs_controller.rb' - - 'app/controllers/invites_controller.rb' - - 'app/controllers/projects/git_http_controller.rb' - - 'app/helpers/tab_helper.rb' - - 'lib/gitlab/checks/force_push.rb' - - 'lib/gitlab/logger.rb' + Enabled: false # Offense count: 90 # Cop supports --auto-correct. @@ -547,17 +444,12 @@ Style/TrailingWhitespace: # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist. # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym Style/TrivialAccessors: - Exclude: - - 'app/models/external_issue.rb' - - 'lib/gitlab/ldap/person.rb' + Enabled: false # Offense count: 3 # Cop supports --auto-correct. Style/UnlessElse: - Exclude: - - 'lib/api/projects.rb' - - 'lib/gitlab/backend/grack_auth.rb' - - 'lib/gitlab/project_search_results.rb' + Enabled: false # Offense count: 13 # Cop supports --auto-correct. @@ -567,11 +459,4 @@ Style/UnneededInterpolation: # Offense count: 8 # Cop supports --auto-correct. Style/ZeroLengthPredicate: - Exclude: - - 'app/models/deploy_key.rb' - - 'app/models/network/commit.rb' - - 'app/models/network/graph.rb' - - 'app/models/project_services/asana_service.rb' - - 'app/models/repository.rb' - - 'lib/extracts_path.rb' - - 'lib/gitlab/checks/force_push.rb' + Enabled: false -- cgit v1.2.1 From dbd581112dacade61c5863d33533f93ac06de206 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 13 Jul 2016 13:37:16 -0500 Subject: Fix icon alignment; reduce side padding on table cells; add tag and fork icon for pipeline ref --- app/assets/stylesheets/pages/pipelines.scss | 37 ++++++++++++++-------- .../projects/ci/pipelines/_pipeline.html.haml | 5 ++- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index cbf8297f387..bbb67d46025 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -1,7 +1,7 @@ .pipelines { .stage { - max-width: 80px; - width: 80px; + max-width: 90px; + width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -30,13 +30,17 @@ } .table.builds { - min-width: 1100px; + min-width: 1200px; tr { th { - padding: 16px; + padding: 16px 8px; border: none; } + + td { + padding: 10px 8px; + } } tbody { @@ -46,9 +50,8 @@ .branch-commit { .branch-name { - margin-left: 8px; font-weight: bold; - max-width: 180px; + max-width: 150px; overflow: hidden; display: inline-block; white-space: nowrap; @@ -57,10 +60,15 @@ } svg { - margin: 0 6px; height: 14px; width: auto; vertical-align: middle; + fill: $table-text-gray; + } + + .fa { + font-size: 12px; + color: $table-text-gray; } .commit-id { @@ -88,6 +96,12 @@ } } + .icon-container { + display: inline-block; + text-align: center; + width: 20px; + } + .duration, .finished-at { color: $table-text-gray; @@ -98,15 +112,10 @@ } svg { - height: 12px; - width: auto; + width: 12px; + height: auto; vertical-align: middle; } - - .fa, - svg { - margin-right: 5px; - } } .pipeline-actions { diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 4ef72ff5d2a..70d72f72bca 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -10,8 +10,11 @@ = link_to namespace_project_pipeline_path(@project.namespace, @project, pipeline.id) do %span ##{pipeline.id} - if pipeline.ref + .icon-container + = pipeline.tag? ? icon('tag') : icon('code-fork') = link_to pipeline.ref, namespace_project_commits_path(@project.namespace, @project, pipeline.ref), class: "monospace branch-name" - = custom_icon("icon_commit") + .icon-container + = custom_icon("icon_commit") = link_to pipeline.short_sha, namespace_project_commit_path(@project.namespace, @project, pipeline.sha), class: "commit-id monospace" - if pipeline.tag? %span.label.label-primary tag -- cgit v1.2.1 From 9bfc67cba4d2a5d920a82a4442502f82b13b3b05 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 13 Jul 2016 13:38:17 -0500 Subject: Remove pipeline styled tag --- app/views/projects/ci/pipelines/_pipeline.html.haml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 70d72f72bca..aea51dcd986 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -16,9 +16,7 @@ .icon-container = custom_icon("icon_commit") = link_to pipeline.short_sha, namespace_project_commit_path(@project.namespace, @project, pipeline.sha), class: "commit-id monospace" - - if pipeline.tag? - %span.label.label-primary tag - - elsif pipeline.latest? + - if pipeline.latest? %span.label.label-success.has-tooltip{ title: 'Latest build for this branch' } latest - if pipeline.triggered? %span.label.label-primary triggered -- cgit v1.2.1 From 746d33a917d639f8cc9ccd70968190e6cf80def6 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 13 Jul 2016 16:08:16 -0500 Subject: Add right margin to time icons --- app/assets/stylesheets/pages/pipelines.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index bbb67d46025..8ba03813afc 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -109,12 +109,14 @@ .fa { font-size: 12px; + margin-right: 4px; } svg { width: 12px; height: auto; vertical-align: middle; + margin-right: 4px; } } -- cgit v1.2.1 From d7c591915893c8c572e9135db4ec27dc174823fd Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 13 Jul 2016 19:17:17 -0700 Subject: Revert "Optimistic locking for Issue and Merge Requests" This reverts commit c39356998b1850f3dc26fe0b987cb419c1d1afb4. --- app/controllers/projects/issues_controller.rb | 6 +----- .../projects/merge_requests_controller.rb | 5 +---- app/models/concerns/issuable.rb | 6 ------ app/views/shared/issuable/_form.html.haml | 9 --------- db/migrate/20160707104333_add_lock_to_issuables.rb | 17 ----------------- db/schema.rb | 22 ++++++++++------------ features/project/merge_requests.feature | 2 +- spec/features/issues_spec.rb | 11 ----------- spec/features/merge_requests/edit_mr_spec.rb | 11 ----------- 9 files changed, 13 insertions(+), 76 deletions(-) delete mode 100644 db/migrate/20160707104333_add_lock_to_issuables.rb diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index f7ada5cfee4..b6e80762e3c 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -119,10 +119,6 @@ class Projects::IssuesController < Projects::ApplicationController render json: @issue.to_json(include: { milestone: {}, assignee: { methods: :avatar_url }, labels: { methods: :text_color } }) end end - - rescue ActiveRecord::StaleObjectError - @conflict = true - render :edit end def referenced_merge_requests @@ -220,7 +216,7 @@ class Projects::IssuesController < Projects::ApplicationController def issue_params params.require(:issue).permit( :title, :assignee_id, :position, :description, :confidential, - :milestone_id, :due_date, :state_event, :task_num, :lock_version, label_ids: [] + :milestone_id, :due_date, :state_event, :task_num, label_ids: [] ) end diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 2deb7959700..df659bb8c3b 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -196,9 +196,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController else render "edit" end - rescue ActiveRecord::StaleObjectError - @conflict = true - render :edit end def remove_wip @@ -427,7 +424,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController :title, :assignee_id, :source_project_id, :source_branch, :target_project_id, :target_branch, :milestone_id, :state_event, :description, :task_num, :force_remove_source_branch, - :lock_version, label_ids: [] + label_ids: [] ) end diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index fb49bd7dd64..acb6f5a2998 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -87,12 +87,6 @@ module Issuable User.find(assignee_id_was).update_cache_counts if assignee_id_was assignee.update_cache_counts if assignee end - - # We want to use optimistic lock for cases when only title or description are involved - # http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html - def locking_enabled? - title_changed? || description_changed? - end end module ClassMethods diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 98bbb12eaec..c30bdb0ae91 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -1,12 +1,5 @@ = form_errors(issuable) -- if @conflict - .alert.alert-danger - Someone edited the #{issuable.class.model_name.human.downcase} the same time you did. - Please check out - = link_to "the #{issuable.class.model_name.human.downcase}", polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), target: "_blank" - and make sure your changes will not unintentionally remove theirs - .form-group = f.label :title, class: 'control-label' .col-sm-10 @@ -156,5 +149,3 @@ = link_to 'Delete', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), data: { confirm: "#{issuable.class.name.titleize} will be removed! Are you sure?" }, method: :delete, class: 'btn btn-danger btn-grouped' = link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), class: 'btn btn-grouped btn-cancel' - -= f.hidden_field :lock_version diff --git a/db/migrate/20160707104333_add_lock_to_issuables.rb b/db/migrate/20160707104333_add_lock_to_issuables.rb deleted file mode 100644 index cb516672800..00000000000 --- a/db/migrate/20160707104333_add_lock_to_issuables.rb +++ /dev/null @@ -1,17 +0,0 @@ -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddLockToIssuables < ActiveRecord::Migration - include Gitlab::Database::MigrationHelpers - disable_ddl_transaction! - - def up - add_column_with_default :issues, :lock_version, :integer, default: 0 - add_column_with_default :merge_requests, :lock_version, :integer, default: 0 - end - - def down - remove_column :issues, :lock_version - remove_column :merge_requests, :lock_version - end -end diff --git a/db/schema.rb b/db/schema.rb index f24e47b85b2..8c12898eec9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -70,11 +70,11 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.string "recaptcha_site_key" t.string "recaptcha_private_key" t.integer "metrics_port", default: 8089 + t.boolean "akismet_enabled", default: false + t.string "akismet_api_key" t.integer "metrics_sample_interval", default: 15 t.boolean "sentry_enabled", default: false t.string "sentry_dsn" - t.boolean "akismet_enabled", default: false - t.string "akismet_api_key" t.boolean "email_author_in_body", default: false t.integer "default_group_visibility" t.boolean "repository_checks_enabled", default: false @@ -84,10 +84,10 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.string "health_check_access_token" t.boolean "send_user_confirmation_email", default: false t.integer "container_registry_token_expire_delay", default: 5 + t.boolean "user_default_external", default: false, null: false t.text "after_sign_up_text" t.string "repository_storage", default: "default" t.string "enabled_git_access_protocol" - t.boolean "user_default_external", default: false, null: false end create_table "audit_events", force: :cascade do |t| @@ -165,8 +165,8 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.text "artifacts_metadata" t.integer "erased_by_id" t.datetime "erased_at" - t.datetime "artifacts_expire_at" t.string "environment" + t.datetime "artifacts_expire_at" t.integer "artifacts_size" end @@ -481,11 +481,10 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.string "state" t.integer "iid" t.integer "updated_by_id" - t.integer "moved_to_id" t.boolean "confidential", default: false t.datetime "deleted_at" t.date "due_date" - t.integer "lock_version", default: 0, null: false + t.integer "moved_to_id" end add_index "issues", ["assignee_id"], name: "index_issues_on_assignee_id", using: :btree @@ -625,7 +624,6 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.integer "merge_user_id" t.string "merge_commit_sha" t.datetime "deleted_at" - t.integer "lock_version", default: 0, null: false end add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree @@ -775,10 +773,10 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.integer "user_id", null: false t.string "token", null: false t.string "name", null: false - t.boolean "revoked", default: false - t.datetime "expires_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.boolean "revoked", default: false + t.datetime "expires_at" end add_index "personal_access_tokens", ["token"], name: "index_personal_access_tokens_on_token", unique: true, using: :btree @@ -898,9 +896,9 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.string "type" t.string "title" t.integer "project_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "active", null: false + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "active", default: false, null: false t.text "properties" t.boolean "template", default: false t.boolean "push_events", default: true diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index 8176ec5ab45..21768c15c17 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -89,7 +89,7 @@ Feature: Project Merge Requests Then The list should be sorted by "Oldest updated" @javascript - Scenario: Visiting Merge Requests from a different Project after sorting + Scenario: Visiting Merge Requests from a differente Project after sorting Given I visit project "Shop" merge requests page And I sort the list by "Oldest updated" And I visit dashboard merge requests page diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index cfe6349a1a1..d51c9abea19 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -121,17 +121,6 @@ describe 'Issues', feature: true do expect(page).to have_content date.to_s(:medium) end end - - it 'warns about version conflict' do - issue.update(title: "New title") - - fill_in 'issue_title', with: 'bug 345' - fill_in 'issue_description', with: 'bug description' - - click_button 'Save changes' - - expect(page).to have_content 'Someone edited the issue the same time you did' - end end end diff --git a/spec/features/merge_requests/edit_mr_spec.rb b/spec/features/merge_requests/edit_mr_spec.rb index 8ad884492d1..9e007ab7635 100644 --- a/spec/features/merge_requests/edit_mr_spec.rb +++ b/spec/features/merge_requests/edit_mr_spec.rb @@ -17,16 +17,5 @@ feature 'Edit Merge Request', feature: true do it 'form should have class js-quick-submit' do expect(page).to have_selector('.js-quick-submit') end - - it 'warns about version conflict' do - merge_request.update(title: "New title") - - fill_in 'merge_request_title', with: 'bug 345' - fill_in 'merge_request_description', with: 'bug description' - - click_button 'Save changes' - - expect(page).to have_content 'Someone edited the merge request the same time you did' - end end end -- cgit v1.2.1 From 4b33c4c6d1aa529ec22606995123cfa3a151ccee Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Mon, 11 Jul 2016 13:00:22 +0530 Subject: Load Javascript U2F library selectively. 1. Only on supported Chrome versions 2. Mainly, this lets us simplify the javascript-based U2F check to `window.u2f`, where `window.u2f` can either be loaded from the GitLab server (for Chrome) or from the Firefox extension. 3. This is a better way to provide browser detection for U2F. --- CHANGELOG | 1 + app/assets/javascripts/application.js.coffee | 1 - app/assets/javascripts/u2f/util.js.coffee.erb | 14 +------------- app/controllers/application_controller.rb | 4 ---- app/controllers/concerns/authenticates_with_two_factor.rb | 3 +-- app/controllers/profiles/two_factor_auths_controller.rb | 3 +-- app/helpers/u2f_helper.rb | 5 +++++ app/views/devise/sessions/two_factor.html.haml | 4 ++++ app/views/profiles/two_factor_auths/show.html.haml | 4 ++++ config/application.rb | 1 + 10 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 app/helpers/u2f_helper.rb diff --git a/CHANGELOG b/CHANGELOG index 0eb7595fbfa..cd66281fddc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ v 8.10.0 (unreleased) - Make images fit to the size of the viewport !4810 - Fix check for New Branch button on Issue page !4630 (winniehell) - Fix MR-auto-close text added to description. !4836 + - Support U2F devices in Firefox. !5177 - Fix issue, preventing users w/o push access to sort tags !5105 (redetection) - Add Spring EmojiOne updates. - Add syntax for multiline blockquote using `>>>` fence !3954 diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 64da503c35f..4393fece329 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -54,7 +54,6 @@ #= require_directory ./u2f #= require_directory . #= require fuzzaldrin-plus -#= require u2f window.slugify = (text) -> text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase() diff --git a/app/assets/javascripts/u2f/util.js.coffee.erb b/app/assets/javascripts/u2f/util.js.coffee.erb index d59341c38b9..be1d3286b01 100644 --- a/app/assets/javascripts/u2f/util.js.coffee.erb +++ b/app/assets/javascripts/u2f/util.js.coffee.erb @@ -1,15 +1,3 @@ -# Helper class for U2F (universal 2nd factor) device registration and authentication. - class @U2FUtil @isU2FSupported: -> - if @testMode - true - else - gon.u2f.browser_supports_u2f - - @enableTestMode: -> - @testMode = true - -<% if Rails.env.test? %> -U2FUtil.enableTestMode(); -<% end %> + window.u2f diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9cc31620d9f..a1004d9bcea 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -344,10 +344,6 @@ class ApplicationController < ActionController::Base session[:skip_tfa] && session[:skip_tfa] > Time.current end - def browser_supports_u2f? - browser.chrome? && browser.version.to_i >= 41 && !browser.device.mobile? - end - def redirect_to_home_page_url? # If user is not signed-in and tries to access root_path - redirect him to landing page # Don't redirect to the default URL to prevent endless redirections diff --git a/app/controllers/concerns/authenticates_with_two_factor.rb b/app/controllers/concerns/authenticates_with_two_factor.rb index 998b8adc411..0c755894790 100644 --- a/app/controllers/concerns/authenticates_with_two_factor.rb +++ b/app/controllers/concerns/authenticates_with_two_factor.rb @@ -80,8 +80,7 @@ module AuthenticatesWithTwoFactor challenges = sign_requests.map(&:challenge) session[:challenges] = challenges gon.push(u2f: { challenges: challenges, app_id: u2f_app_id, - sign_requests: sign_requests, - browser_supports_u2f: browser_supports_u2f? }) + sign_requests: sign_requests }) end end end diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb index 6a358fdcc05..e37e9e136db 100644 --- a/app/controllers/profiles/two_factor_auths_controller.rb +++ b/app/controllers/profiles/two_factor_auths_controller.rb @@ -100,7 +100,6 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController gon.push(u2f: { challenges: session[:challenges], app_id: u2f_app_id, register_requests: registration_requests, - sign_requests: sign_requests, - browser_supports_u2f: browser_supports_u2f? }) + sign_requests: sign_requests }) end end diff --git a/app/helpers/u2f_helper.rb b/app/helpers/u2f_helper.rb new file mode 100644 index 00000000000..143b4ca6b51 --- /dev/null +++ b/app/helpers/u2f_helper.rb @@ -0,0 +1,5 @@ +module U2fHelper + def inject_u2f_api? + browser.chrome? && browser.version.to_i >= 41 && !browser.device.mobile? + end +end diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml index a373f61bd3c..dbf4d699d01 100644 --- a/app/views/devise/sessions/two_factor.html.haml +++ b/app/views/devise/sessions/two_factor.html.haml @@ -1,3 +1,7 @@ +- content_for :page_specific_javascripts do + - if inject_u2f_api? + = page_specific_javascript_tag('u2f.js') + %div .login-box .login-heading diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml index 5890456bee2..0e9a80a6267 100644 --- a/app/views/profiles/two_factor_auths/show.html.haml +++ b/app/views/profiles/two_factor_auths/show.html.haml @@ -2,6 +2,10 @@ - header_title "Two-Factor Authentication", profile_two_factor_auth_path = render 'profiles/head' +- content_for :page_specific_javascripts do + - if inject_u2f_api? + = page_specific_javascript_tag('u2f.js') + .row.prepend-top-default .col-lg-3 %h4.prepend-top-0 diff --git a/config/application.rb b/config/application.rb index 21e7cc7b6e8..5f7b6a3c049 100644 --- a/config/application.rb +++ b/config/application.rb @@ -87,6 +87,7 @@ module Gitlab config.assets.precompile << "profile/application.js" config.assets.precompile << "lib/utils/*.js" config.assets.precompile << "lib/*.js" + config.assets.precompile << "u2f.js" # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' -- cgit v1.2.1 From 3572582dd2568cd473676563077ab3985b9803f7 Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Mon, 11 Jul 2016 13:02:24 +0530 Subject: Use a single challenge for U2F authentication. 1. According to the spec, either we have a single challenge with a number of `signRequests`, or a number of `signRequests`, each with it's own challenge. 2. Previously, we had both these - per-request challenges, as well as a single extra challenge. 3. This commit changes this so that the per-request challenges are removed, leaving only a single challenge, as per the v1.1 U2F API. 4. The existing implementation didn't work in Firefox, because the Firefox (extension) implementation is less flexible with regard to the inputs. 5. Fix teaspoon specs. 6. References: https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-javascript-api.html#h2_background --- app/assets/javascripts/u2f/authenticate.js.coffee | 15 ++++++++++++--- app/controllers/concerns/authenticates_with_two_factor.rb | 7 +++---- spec/javascripts/u2f/authenticate_spec.coffee | 3 +-- spec/javascripts/u2f/register_spec.js.coffee | 1 - spec/support/fake_u2f_device.rb | 4 ++-- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/u2f/authenticate.js.coffee b/app/assets/javascripts/u2f/authenticate.js.coffee index 6deb902c8de..be10e911c83 100644 --- a/app/assets/javascripts/u2f/authenticate.js.coffee +++ b/app/assets/javascripts/u2f/authenticate.js.coffee @@ -6,8 +6,17 @@ class @U2FAuthenticate constructor: (@container, u2fParams) -> @appId = u2fParams.app_id - @challenges = u2fParams.challenges - @signRequests = u2fParams.sign_requests + @challenge = u2fParams.challenge + + # The U2F Javascript API v1.1 requires a single challenge, with _no + # challenges per-request_. + # + # The U2F Javascript API v1.0 requires a challenge per-request, which + # is done by copying the single challenge into every request. + # + # In either case, we don't need the per-request challenges that the server + # has generated, so we can remove them. + @signRequests = u2fParams.sign_requests.map (request) -> _(request).omit('challenge') start: () => if U2FUtil.isU2FSupported() @@ -16,7 +25,7 @@ class @U2FAuthenticate @renderNotSupported() authenticate: () => - u2f.sign(@appId, @challenges, @signRequests, (response) => + u2f.sign(@appId, @challenge, @signRequests, (response) => if response.errorCode error = new U2FError(response.errorCode) @renderError(error); diff --git a/app/controllers/concerns/authenticates_with_two_factor.rb b/app/controllers/concerns/authenticates_with_two_factor.rb index 0c755894790..ba07cea569c 100644 --- a/app/controllers/concerns/authenticates_with_two_factor.rb +++ b/app/controllers/concerns/authenticates_with_two_factor.rb @@ -57,7 +57,7 @@ module AuthenticatesWithTwoFactor # Authenticate using the response from a U2F (universal 2nd factor) device def authenticate_with_two_factor_via_u2f(user) - if U2fRegistration.authenticate(user, u2f_app_id, user_params[:device_response], session[:challenges]) + if U2fRegistration.authenticate(user, u2f_app_id, user_params[:device_response], session[:challenge]) # Remove any lingering user data from login session.delete(:otp_user_id) session.delete(:challenges) @@ -77,9 +77,8 @@ module AuthenticatesWithTwoFactor if key_handles.present? sign_requests = u2f.authentication_requests(key_handles) - challenges = sign_requests.map(&:challenge) - session[:challenges] = challenges - gon.push(u2f: { challenges: challenges, app_id: u2f_app_id, + session[:challenge] ||= u2f.challenge + gon.push(u2f: { challenge: session[:challenge], app_id: u2f_app_id, sign_requests: sign_requests }) end end diff --git a/spec/javascripts/u2f/authenticate_spec.coffee b/spec/javascripts/u2f/authenticate_spec.coffee index e8a2892d678..8ffeda11704 100644 --- a/spec/javascripts/u2f/authenticate_spec.coffee +++ b/spec/javascripts/u2f/authenticate_spec.coffee @@ -5,13 +5,12 @@ #= require ./mock_u2f_device describe 'U2FAuthenticate', -> - U2FUtil.enableTestMode() fixture.load('u2f/authenticate') beforeEach -> @u2fDevice = new MockU2FDevice @container = $("#js-authenticate-u2f") - @component = new U2FAuthenticate(@container, {}, "token") + @component = new U2FAuthenticate(@container, {sign_requests: []}, "token") @component.start() it 'allows authenticating via a U2F device', -> diff --git a/spec/javascripts/u2f/register_spec.js.coffee b/spec/javascripts/u2f/register_spec.js.coffee index 0858abeca1a..87dc769792b 100644 --- a/spec/javascripts/u2f/register_spec.js.coffee +++ b/spec/javascripts/u2f/register_spec.js.coffee @@ -5,7 +5,6 @@ #= require ./mock_u2f_device describe 'U2FRegister', -> - U2FUtil.enableTestMode() fixture.load('u2f/register') beforeEach -> diff --git a/spec/support/fake_u2f_device.rb b/spec/support/fake_u2f_device.rb index 553fe9f1fbc..f550e9a0160 100644 --- a/spec/support/fake_u2f_device.rb +++ b/spec/support/fake_u2f_device.rb @@ -18,8 +18,8 @@ class FakeU2fDevice def respond_to_u2f_authentication app_id = @page.evaluate_script('gon.u2f.app_id') - challenges = @page.evaluate_script('gon.u2f.challenges') - json_response = u2f_device(app_id).sign_response(challenges[0]) + challenge = @page.evaluate_script('gon.u2f.challenge') + json_response = u2f_device(app_id).sign_response(challenge) @page.execute_script(" u2f.sign = function(appId, challenges, signRequests, callback) { -- cgit v1.2.1 From 341d8bc3f7fbe3763250af1e89020b81dad34bb8 Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Mon, 11 Jul 2016 13:23:02 +0530 Subject: Add a U2F feature spec for multiple devices owned by the same user. 1. This scenario was previously tested for the registration flow, but not authentication. --- app/assets/javascripts/u2f/authenticate.js.coffee | 13 +++-- app/assets/javascripts/u2f/util.js.coffee | 3 ++ app/assets/javascripts/u2f/util.js.coffee.erb | 3 -- app/views/devise/sessions/two_factor.html.haml | 4 +- app/views/profiles/two_factor_auths/show.html.haml | 4 +- spec/features/u2f_spec.rb | 55 +++++++++++++++++----- 6 files changed, 59 insertions(+), 23 deletions(-) create mode 100644 app/assets/javascripts/u2f/util.js.coffee delete mode 100644 app/assets/javascripts/u2f/util.js.coffee.erb diff --git a/app/assets/javascripts/u2f/authenticate.js.coffee b/app/assets/javascripts/u2f/authenticate.js.coffee index be10e911c83..918c0a560fd 100644 --- a/app/assets/javascripts/u2f/authenticate.js.coffee +++ b/app/assets/javascripts/u2f/authenticate.js.coffee @@ -8,14 +8,17 @@ class @U2FAuthenticate @appId = u2fParams.app_id @challenge = u2fParams.challenge - # The U2F Javascript API v1.1 requires a single challenge, with _no - # challenges per-request_. - # - # The U2F Javascript API v1.0 requires a challenge per-request, which - # is done by copying the single challenge into every request. + # The U2F Javascript API v1.1 requires a single challenge, with + # _no challenges per-request_. The U2F Javascript API v1.0 requires a + # challenge per-request, which is done by copying the single challenge + # into every request. # # In either case, we don't need the per-request challenges that the server # has generated, so we can remove them. + # + # Note: The server library fixes this behaviour in (unreleased) version 1.0.0. + # This can be removed once we upgrade. + # https://github.com/castle/ruby-u2f/commit/103f428071a81cd3d5f80c2e77d522d5029946a4 @signRequests = u2fParams.sign_requests.map (request) -> _(request).omit('challenge') start: () => diff --git a/app/assets/javascripts/u2f/util.js.coffee b/app/assets/javascripts/u2f/util.js.coffee new file mode 100644 index 00000000000..5ef324f609d --- /dev/null +++ b/app/assets/javascripts/u2f/util.js.coffee @@ -0,0 +1,3 @@ +class @U2FUtil + @isU2FSupported: -> + window.u2f diff --git a/app/assets/javascripts/u2f/util.js.coffee.erb b/app/assets/javascripts/u2f/util.js.coffee.erb deleted file mode 100644 index be1d3286b01..00000000000 --- a/app/assets/javascripts/u2f/util.js.coffee.erb +++ /dev/null @@ -1,3 +0,0 @@ -class @U2FUtil - @isU2FSupported: -> - window.u2f diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml index dbf4d699d01..4debd3d608f 100644 --- a/app/views/devise/sessions/two_factor.html.haml +++ b/app/views/devise/sessions/two_factor.html.haml @@ -1,5 +1,5 @@ -- content_for :page_specific_javascripts do - - if inject_u2f_api? +- if inject_u2f_api? + - content_for :page_specific_javascripts do = page_specific_javascript_tag('u2f.js') %div diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml index 0e9a80a6267..355bfcf1d62 100644 --- a/app/views/profiles/two_factor_auths/show.html.haml +++ b/app/views/profiles/two_factor_auths/show.html.haml @@ -2,8 +2,8 @@ - header_title "Two-Factor Authentication", profile_two_factor_auth_path = render 'profiles/head' -- content_for :page_specific_javascripts do - - if inject_u2f_api? +- if inject_u2f_api? + - content_for :page_specific_javascripts do = page_specific_javascript_tag('u2f.js') .row.prepend-top-default diff --git a/spec/features/u2f_spec.rb b/spec/features/u2f_spec.rb index 14613754f74..9335f5bf120 100644 --- a/spec/features/u2f_spec.rb +++ b/spec/features/u2f_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: true, js: true do + before { allow_any_instance_of(U2fHelper).to receive(:inject_u2f_api?).and_return(true) } + def register_u2f_device(u2f_device = nil) u2f_device ||= FakeU2fDevice.new(page) u2f_device.respond_to_u2f_registration @@ -208,21 +210,52 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature: expect(page.body).to match('Authentication via U2F device failed') end end - end - describe "when two-factor authentication is disabled" do - let(:user) { create(:user) } + describe "when more than one device has been registered by the same user" do + it "allows logging in with either device" do + # Register first device + user = login_as(:user) + user.update_attribute(:otp_required_for_login, true) + visit profile_two_factor_auth_path + expect(page).to have_content("Your U2F device needs to be set up.") + first_device = register_u2f_device + + # Register second device + visit profile_two_factor_auth_path + expect(page).to have_content("Your U2F device needs to be set up.") + second_device = register_u2f_device + logout + + # Authenticate as both devices + [first_device, second_device].each do |device| + login_as(user) + device.respond_to_u2f_authentication + click_on "Login Via U2F Device" + expect(page.body).to match('We heard back from your U2F device') + click_on "Authenticate via U2F Device" - before do - login_as(user) - user.update_attribute(:otp_required_for_login, true) - visit profile_account_path - click_on 'Manage Two-Factor Authentication' - register_u2f_device + expect(page.body).to match('Signed in successfully') + + logout + end + end end - it "deletes u2f registrations" do - expect { click_on "Disable" }.to change { U2fRegistration.count }.from(1).to(0) + describe "when two-factor authentication is disabled" do + let(:user) { create(:user) } + + before do + user = login_as(:user) + user.update_attribute(:otp_required_for_login, true) + visit profile_account_path + click_on 'Manage Two-Factor Authentication' + expect(page).to have_content("Your U2F device needs to be set up.") + register_u2f_device + end + + it "deletes u2f registrations" do + expect { click_on "Disable" }.to change { U2fRegistration.count }.by(-1) + end end end end -- cgit v1.2.1 From e21492b810bf9cd30f0e60836c056a72e830f427 Mon Sep 17 00:00:00 2001 From: dixpac Date: Sun, 3 Jul 2016 16:04:22 +0200 Subject: Fix not normalized emoji paths * There where path where +1 was stored as +1 not as thumbsup that was causing problems such as showing thumbsup icon 2 time. I fixed this to always normalize and store +1 as tumbsup --- CHANGELOG | 1 + app/models/concerns/awardable.rb | 9 +++++++-- app/models/note.rb | 3 +-- app/services/notes/create_service.rb | 1 - lib/api/award_emoji.rb | 4 ++-- spec/requests/api/award_emoji_spec.rb | 32 ++++++++++++++++++++++++++++++++ 6 files changed, 43 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 19286abd74f..139444ef70e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -74,6 +74,7 @@ v 8.10.0 (unreleased) - Add basic system information like memory and disk usage to the admin panel - Don't garbage collect commits that have related DB records like comments - More descriptive message for git hooks and file locks + - Aliases of award emoji should be stored as original name. !5060 (dixpac) - Handle custom Git hook result in GitLab UI - Allow '?', or '&' for label names - Fix importer for GitHub Pull Requests when a branch was reused across Pull Requests diff --git a/app/models/concerns/awardable.rb b/app/models/concerns/awardable.rb index 06beff177b1..800a16ab246 100644 --- a/app/models/concerns/awardable.rb +++ b/app/models/concerns/awardable.rb @@ -65,8 +65,7 @@ module Awardable def create_award_emoji(name, current_user) return unless emoji_awardable? - - award_emoji.create(name: name, user: current_user) + award_emoji.create(name: normalize_name(name), user: current_user) end def remove_award_emoji(name, current_user) @@ -80,4 +79,10 @@ module Awardable create_award_emoji(emoji_name, current_user) end end + + private + + def normalize_name(name) + Gitlab::AwardEmoji.normalize_emoji_name(name) + end end diff --git a/app/models/note.rb b/app/models/note.rb index 8dca2ef09a8..0ce10c77de9 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -229,8 +229,7 @@ class Note < ActiveRecord::Base end def award_emoji_name - original_name = note.match(Banzai::Filter::EmojiFilter.emoji_pattern)[1] - Gitlab::AwardEmoji.normalize_emoji_name(original_name) + note.match(Banzai::Filter::EmojiFilter.emoji_pattern)[1] end private diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb index 02fca5c0ea3..18971bd0be3 100644 --- a/app/services/notes/create_service.rb +++ b/app/services/notes/create_service.rb @@ -8,7 +8,6 @@ module Notes if note.award_emoji? noteable = note.noteable todo_service.new_award_emoji(noteable, current_user) - return noteable.create_award_emoji(note.award_emoji_name, current_user) end diff --git a/lib/api/award_emoji.rb b/lib/api/award_emoji.rb index c4fa1838b5a..2efe7e3adf3 100644 --- a/lib/api/award_emoji.rb +++ b/lib/api/award_emoji.rb @@ -56,9 +56,9 @@ module API not_found!('Award Emoji') unless can_read_awardable? - award = awardable.award_emoji.new(name: params[:name], user: current_user) + award = awardable.create_award_emoji(params[:name], current_user) - if award.save + if award.persisted? present award, with: Entities::AwardEmoji else not_found!("Award Emoji #{award.errors.messages}") diff --git a/spec/requests/api/award_emoji_spec.rb b/spec/requests/api/award_emoji_spec.rb index 72a6d45f47d..2b74dd4bbb0 100644 --- a/spec/requests/api/award_emoji_spec.rb +++ b/spec/requests/api/award_emoji_spec.rb @@ -135,6 +135,22 @@ describe API::API, api: true do expect(response).to have_http_status(401) end + + it "normalizes +1 as thumbsup award" do + post api("/projects/#{project.id}/issues/#{issue.id}/award_emoji", user), name: '+1' + + expect(issue.award_emoji.last.name).to eq("thumbsup") + end + + context 'when the emoji already has been awarded' do + it 'returns a 404 status code' do + post api("/projects/#{project.id}/issues/#{issue.id}/award_emoji", user), name: 'thumbsup' + post api("/projects/#{project.id}/issues/#{issue.id}/award_emoji", user), name: 'thumbsup' + + expect(response).to have_http_status(404) + expect(json_response["message"]).to match("has already been taken") + end + end end end @@ -147,6 +163,22 @@ describe API::API, api: true do expect(response).to have_http_status(201) expect(json_response['user']['username']).to eq(user.username) end + + it "normalizes +1 as thumbsup award" do + post api("/projects/#{project.id}/issues/#{issue.id}/notes/#{note.id}/award_emoji", user), name: '+1' + + expect(note.award_emoji.last.name).to eq("thumbsup") + end + + context 'when the emoji already has been awarded' do + it 'returns a 404 status code' do + post api("/projects/#{project.id}/issues/#{issue.id}/notes/#{note.id}/award_emoji", user), name: 'rocket' + post api("/projects/#{project.id}/issues/#{issue.id}/notes/#{note.id}/award_emoji", user), name: 'rocket' + + expect(response).to have_http_status(404) + expect(json_response["message"]).to match("has already been taken") + end + end end describe 'DELETE /projects/:id/awardable/:awardable_id/award_emoji/:award_id' do -- cgit v1.2.1 From de6ca8ef3a8ae6f783dc1b0684e7ad65be388564 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 14 Jul 2016 08:44:22 +0100 Subject: Chnaged noteable class check --- app/views/layouts/_init_auto_complete.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml index 79483d629d0..351100f3523 100644 --- a/app/views/layouts/_init_auto_complete.html.haml +++ b/app/views/layouts/_init_auto_complete.html.haml @@ -1,5 +1,5 @@ - project = @target_project || @project -- noteable_class = @noteable.nil? ? nil : @noteable.class +- noteable_class = @noteable.class if @noteable.present? :javascript GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: noteable_class, type_id: params[:id])}" -- cgit v1.2.1 From ef892bc2bfa29046dd58441d8d9afe8b3cde0007 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Thu, 14 Jul 2016 10:53:56 +0200 Subject: When Issue author assign or mention himself Todos are created --- CHANGELOG | 1 + app/services/todo_service.rb | 3 +-- spec/services/todo_service_spec.rb | 35 ++++++++++++++++++++--------------- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 19286abd74f..aaab3551ea8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -91,6 +91,7 @@ v 8.10.0 (unreleased) - Redesign Builds and Pipelines pages - Change status color and icon for running builds - Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.` + - Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska) v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index 6bb0a72d30e..6b48d68cccb 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -194,7 +194,7 @@ class TodoService end def create_assignment_todo(issuable, author) - if issuable.assignee && issuable.assignee != author + if issuable.assignee attributes = attributes_for_todo(issuable.project, issuable, author, Todo::ASSIGNED) create_todos(issuable.assignee, attributes) end @@ -239,7 +239,6 @@ class TodoService def filter_mentioned_users(project, target, author) mentioned_users = target.mentioned_users(author) mentioned_users = reject_users_without_access(mentioned_users, project, target) - mentioned_users.delete(author) mentioned_users.uniq end diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb index b4522536724..b8c62e3d1dc 100644 --- a/spec/services/todo_service_spec.rb +++ b/spec/services/todo_service_spec.rb @@ -35,8 +35,11 @@ describe TodoService, services: true do should_not_create_any_todo { service.new_issue(unassigned_issue, author) } end - it 'does not create a todo if assignee is the current user' do - should_not_create_any_todo { service.new_issue(unassigned_issue, john_doe) } + it 'creates a todo if assignee is the current user' do + unassigned_issue.update_attribute(:assignee, john_doe) + service.new_issue(unassigned_issue, john_doe) + + should_create_todo(user: john_doe, target: unassigned_issue, author: john_doe, action: Todo::ASSIGNED) end it 'creates a todo for each valid mentioned user' do @@ -44,7 +47,7 @@ describe TodoService, services: true do should_create_todo(user: member, target: issue, action: Todo::MENTIONED) should_create_todo(user: guest, target: issue, action: Todo::MENTIONED) - should_not_create_todo(user: author, target: issue, action: Todo::MENTIONED) + should_create_todo(user: author, target: issue, action: Todo::MENTIONED) should_not_create_todo(user: john_doe, target: issue, action: Todo::MENTIONED) should_not_create_todo(user: non_member, target: issue, action: Todo::MENTIONED) end @@ -57,7 +60,7 @@ describe TodoService, services: true do should_create_todo(user: member, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) should_create_todo(user: admin, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) should_not_create_todo(user: guest, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) - should_not_create_todo(user: john_doe, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) + should_create_todo(user: john_doe, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) end context 'when a private group is mentioned' do @@ -87,7 +90,7 @@ describe TodoService, services: true do should_create_todo(user: member, target: issue, action: Todo::MENTIONED) should_create_todo(user: guest, target: issue, action: Todo::MENTIONED) should_create_todo(user: john_doe, target: issue, action: Todo::MENTIONED) - should_not_create_todo(user: author, target: issue, action: Todo::MENTIONED) + should_create_todo(user: author, target: issue, action: Todo::MENTIONED) should_not_create_todo(user: non_member, target: issue, action: Todo::MENTIONED) end @@ -105,7 +108,7 @@ describe TodoService, services: true do should_create_todo(user: member, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) should_create_todo(user: admin, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) should_not_create_todo(user: guest, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) - should_not_create_todo(user: john_doe, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) + should_create_todo(user: john_doe, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) end context 'issues with a task list' do @@ -156,10 +159,11 @@ describe TodoService, services: true do should_not_create_any_todo { service.reassigned_issue(issue, author) } end - it 'does not create a todo if new assignee is the current user' do + it 'creates a todo if new assignee is the current user' do unassigned_issue.update_attribute(:assignee, john_doe) + service.reassigned_issue(unassigned_issue, john_doe) - should_not_create_any_todo { service.reassigned_issue(unassigned_issue, john_doe) } + should_create_todo(user: john_doe, target: unassigned_issue, author: john_doe, action: Todo::ASSIGNED) end end @@ -250,7 +254,7 @@ describe TodoService, services: true do should_create_todo(user: member, target: issue, author: john_doe, action: Todo::MENTIONED, note: note) should_create_todo(user: guest, target: issue, author: john_doe, action: Todo::MENTIONED, note: note) should_create_todo(user: author, target: issue, author: john_doe, action: Todo::MENTIONED, note: note) - should_not_create_todo(user: john_doe, target: issue, author: john_doe, action: Todo::MENTIONED, note: note) + should_create_todo(user: john_doe, target: issue, author: john_doe, action: Todo::MENTIONED, note: note) should_not_create_todo(user: non_member, target: issue, author: john_doe, action: Todo::MENTIONED, note: note) end @@ -262,7 +266,7 @@ describe TodoService, services: true do should_create_todo(user: member, target: confidential_issue, author: john_doe, action: Todo::MENTIONED, note: note_on_confidential_issue) should_create_todo(user: admin, target: confidential_issue, author: john_doe, action: Todo::MENTIONED, note: note_on_confidential_issue) should_not_create_todo(user: guest, target: confidential_issue, author: john_doe, action: Todo::MENTIONED, note: note_on_confidential_issue) - should_not_create_todo(user: john_doe, target: confidential_issue, author: john_doe, action: Todo::MENTIONED, note: note_on_confidential_issue) + should_create_todo(user: john_doe, target: confidential_issue, author: john_doe, action: Todo::MENTIONED, note: note_on_confidential_issue) end it 'creates a todo for each valid mentioned user when leaving a note on commit' do @@ -270,7 +274,7 @@ describe TodoService, services: true do should_create_todo(user: member, target_id: nil, target_type: 'Commit', commit_id: note_on_commit.commit_id, author: john_doe, action: Todo::MENTIONED, note: note_on_commit) should_create_todo(user: author, target_id: nil, target_type: 'Commit', commit_id: note_on_commit.commit_id, author: john_doe, action: Todo::MENTIONED, note: note_on_commit) - should_not_create_todo(user: john_doe, target_id: nil, target_type: 'Commit', commit_id: note_on_commit.commit_id, author: john_doe, action: Todo::MENTIONED, note: note_on_commit) + should_create_todo(user: john_doe, target_id: nil, target_type: 'Commit', commit_id: note_on_commit.commit_id, author: john_doe, action: Todo::MENTIONED, note: note_on_commit) should_not_create_todo(user: non_member, target_id: nil, target_type: 'Commit', commit_id: note_on_commit.commit_id, author: john_doe, action: Todo::MENTIONED, note: note_on_commit) end @@ -312,7 +316,7 @@ describe TodoService, services: true do should_create_todo(user: member, target: mr_assigned, action: Todo::MENTIONED) should_create_todo(user: guest, target: mr_assigned, action: Todo::MENTIONED) - should_not_create_todo(user: author, target: mr_assigned, action: Todo::MENTIONED) + should_create_todo(user: author, target: mr_assigned, action: Todo::MENTIONED) should_not_create_todo(user: john_doe, target: mr_assigned, action: Todo::MENTIONED) should_not_create_todo(user: non_member, target: mr_assigned, action: Todo::MENTIONED) end @@ -325,7 +329,7 @@ describe TodoService, services: true do should_create_todo(user: member, target: mr_assigned, action: Todo::MENTIONED) should_create_todo(user: guest, target: mr_assigned, action: Todo::MENTIONED) should_create_todo(user: john_doe, target: mr_assigned, action: Todo::MENTIONED) - should_not_create_todo(user: author, target: mr_assigned, action: Todo::MENTIONED) + should_create_todo(user: author, target: mr_assigned, action: Todo::MENTIONED) should_not_create_todo(user: non_member, target: mr_assigned, action: Todo::MENTIONED) end @@ -382,10 +386,11 @@ describe TodoService, services: true do should_not_create_any_todo { service.reassigned_merge_request(mr_assigned, author) } end - it 'does not create a todo if new assignee is the current user' do + it 'creates a todo if new assignee is the current user' do mr_assigned.update_attribute(:assignee, john_doe) + service.reassigned_merge_request(mr_assigned, john_doe) - should_not_create_any_todo { service.reassigned_merge_request(mr_assigned, john_doe) } + should_create_todo(user: john_doe, target: mr_assigned, author: john_doe, action: Todo::ASSIGNED) end end -- cgit v1.2.1 From 097706b4588ca8ace9dfaab44f03d62ac6b3a2be Mon Sep 17 00:00:00 2001 From: James Lopez Date: Thu, 14 Jul 2016 12:07:54 +0200 Subject: fix EE => CE project import, and updated JSON spec --- lib/gitlab/import_export/relation_factory.rb | 8 ++++++-- spec/lib/gitlab/import_export/project.json | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb index 9824df3f274..6ba25a31641 100644 --- a/lib/gitlab/import_export/relation_factory.rb +++ b/lib/gitlab/import_export/relation_factory.rb @@ -87,7 +87,7 @@ module Gitlab project_id = @relation_hash.delete('project_id') # project_id may not be part of the export, but we always need to populate it if required. - @relation_hash['project_id'] = project_id if relation_class.column_names.include?('project_id') + @relation_hash['project_id'] = project_id @relation_hash['gl_project_id'] = project_id if @relation_hash['gl_project_id'] @relation_hash['target_project_id'] = project_id if @relation_hash['target_project_id'] @relation_hash['source_project_id'] = -1 if @relation_hash['source_project_id'] @@ -111,7 +111,7 @@ module Gitlab end def imported_object - imported_object = relation_class.new(@relation_hash) + imported_object = relation_class.new(parsed_relation_hash) yield(imported_object) if block_given? imported_object.importing = true if imported_object.respond_to?(:importing) imported_object @@ -125,6 +125,10 @@ module Gitlab def admin_user? @user.is_admin? end + + def parsed_relation_hash + @relation_hash.reject { |k, _v| !relation_class.attribute_method?(k) } + end end end end diff --git a/spec/lib/gitlab/import_export/project.json b/spec/lib/gitlab/import_export/project.json index 7286b0c39c0..4113d829c3c 100644 --- a/spec/lib/gitlab/import_export/project.json +++ b/spec/lib/gitlab/import_export/project.json @@ -26,6 +26,7 @@ "deleted_at": null, "due_date": null, "moved_to_id": null, + "test_ee_field": "test", "notes": [ { "id": 351, -- cgit v1.2.1 From 37d1e65a2deb64d95183e69c3680a6eeb1770fdb Mon Sep 17 00:00:00 2001 From: James Lopez Date: Thu, 14 Jul 2016 12:18:16 +0200 Subject: added changelog --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 19286abd74f..6acecf94420 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -91,6 +91,7 @@ v 8.10.0 (unreleased) - Redesign Builds and Pipelines pages - Change status color and icon for running builds - Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.` + - Fix issues importing projects from EE to CE v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 -- cgit v1.2.1 From fa079e38d443275efc7b23aa62f44d1e426cd37e Mon Sep 17 00:00:00 2001 From: winniehell Date: Mon, 4 Jul 2016 15:19:07 +0200 Subject: Hide namespace and project name on project activity page (!5068) --- CHANGELOG | 1 + app/assets/stylesheets/pages/events.scss | 8 ++++++++ app/views/events/_event_scope.html.haml | 7 +++++++ app/views/events/event/_common.html.haml | 9 ++------- app/views/events/event/_created_project.html.haml | 2 +- app/views/events/event/_note.html.haml | 11 +++-------- app/views/events/event/_push.html.haml | 6 +++--- app/views/projects/_activity.html.haml | 3 ++- 8 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 app/views/events/_event_scope.html.haml diff --git a/CHANGELOG b/CHANGELOG index 43f8f522f41..268b29b9fb2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -61,6 +61,7 @@ v 8.10.0 (unreleased) - ObjectRenderer retrieve renderer content using Rails.cache.read_multi - Better caching of git calls on ProjectsController#show. - Avoid to retrieve MR closes_issues as much as possible. + - Hide project name in project activities !5068 (winniehell) - Add API endpoint for a group issues !4520 (mahcsig) - Add Bugzilla integration !4930 (iamtjg) - Instrument Rinku usage diff --git a/app/assets/stylesheets/pages/events.scss b/app/assets/stylesheets/pages/events.scss index a2145956eb5..5c336bb1c7e 100644 --- a/app/assets/stylesheets/pages/events.scss +++ b/app/assets/stylesheets/pages/events.scss @@ -176,3 +176,11 @@ } } } + +// hide event scope (namespace + project) where it is not necessary +.project-activity { + .event-scope { + display: none; + } +} + diff --git a/app/views/events/_event_scope.html.haml b/app/views/events/_event_scope.html.haml new file mode 100644 index 00000000000..8f7da7d8c4f --- /dev/null +++ b/app/views/events/_event_scope.html.haml @@ -0,0 +1,7 @@ +%span.event-scope + = event_preposition(event) + - if event.project + = link_to_project event.project + - else + = event.project_name + diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml index 2e2403347c1..bba6e0d2c20 100644 --- a/app/views/events/event/_common.html.haml +++ b/app/views/events/event/_common.html.haml @@ -1,6 +1,6 @@ .event-title %span.author_name= link_to_author event - %span.event_label{class: event.action_name} + %span{class: event.action_name} - if event.target = event.action_name %strong @@ -10,12 +10,7 @@ - else = event_action_name(event) - = event_preposition(event) - - - if event.project - = link_to_project event.project - - else - = event.project_name + = render "events/event_scope", event: event - if event.target.respond_to?(:title) .event-body diff --git a/app/views/events/event/_created_project.html.haml b/app/views/events/event/_created_project.html.haml index 5a2a469ba62..aba64dd17d0 100644 --- a/app/views/events/event/_created_project.html.haml +++ b/app/views/events/event/_created_project.html.haml @@ -1,6 +1,6 @@ .event-title %span.author_name= link_to_author event - %span.event_label{class: event.action_name} + %span{class: event.action_name} = event_action_name(event) - if event.project diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index 830fec0b4ab..f08c96df309 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -1,14 +1,9 @@ .event-title %span.author_name= link_to_author event - %span.event_label - = event.action_name - = event_note_title_html(event) - at + = event.action_name + = event_note_title_html(event) - - if event.project - = link_to_project event.project - - else - = event.project_name + = render "events/event_scope", event: event .event-body .event-note diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index ea54ef226ec..44fff49d99c 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -2,14 +2,14 @@ .event-title %span.author_name= link_to_author event - %span.event_label.pushed #{event.action_name} #{event.ref_type} + %span.pushed #{event.action_name} #{event.ref_type} - if event.rm_ref? %strong= event.ref_name - else %strong = link_to event.ref_name, namespace_project_commits_path(project.namespace, project, event.ref_name), title: h(event.target_title) - at - = link_to_project project + + = render "events/event_scope", event: event - if event.push_with_commits? .event-body diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index 48b0dd6b121..ac50ce83f6a 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -5,7 +5,8 @@ %i.fa.fa-rss = render 'shared/event_filter' -.content_list{:"data-href" => activity_project_path(@project)} + +.content_list.project-activity{:"data-href" => activity_project_path(@project)} = spinner :javascript -- cgit v1.2.1 From 7d456ad436c95a6b081da59cd61cc9672e1e3f5a Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 10:27:39 -0700 Subject: update rouge, gollum-lib, and github-markup --- Gemfile | 6 +++--- Gemfile.lock | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index ee23f712f05..3c0b8edabc6 100644 --- a/Gemfile +++ b/Gemfile @@ -61,7 +61,7 @@ gem 'gitlab_omniauth-ldap', '~> 1.2.1', require: 'omniauth-ldap' # Git Wiki # Required manually in config/initializers/gollum.rb to control load order -gem 'gollum-lib', '~> 4.1.0', require: false +gem 'gollum-lib', '~> 4.2', require: false gem 'gollum-rugged_adapter', '~> 0.4.2', require: false # Language detection @@ -105,7 +105,7 @@ gem 'seed-fu', '~> 2.3.5' # Markdown and HTML processing gem 'html-pipeline', '~> 1.11.0' gem 'task_list', '~> 1.0.2', require: 'task_list/railtie' -gem 'github-markup', '~> 1.3.1' +gem 'github-markup', '~> 1.4' gem 'redcarpet', '~> 3.3.3' gem 'RedCloth', '~> 4.3.2' gem 'rdoc', '~>3.6' @@ -113,7 +113,7 @@ gem 'org-ruby', '~> 0.9.12' gem 'creole', '~> 0.5.0' gem 'wikicloth', '0.8.1' gem 'asciidoctor', '~> 1.5.2' -gem 'rouge', '~> 1.11' +gem 'rouge', '~> 2.0' # See https://groups.google.com/forum/#!topic/ruby-security-ann/aSbgDiwb24s # and https://groups.google.com/forum/#!topic/ruby-security-ann/Dy7YiKb_pMM diff --git a/Gemfile.lock b/Gemfile.lock index 67c0645c3d9..1514bde61ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -264,7 +264,7 @@ GEM escape_utils (~> 1.1.0) mime-types (>= 1.19) rugged (>= 0.23.0b) - github-markup (1.3.3) + github-markup (1.4.0) gitlab-flowdock-git-hook (1.0.1) flowdock (~> 0.7) gitlab-grit (>= 2.4.1) @@ -287,13 +287,13 @@ GEM rubyntlm (~> 0.3) globalid (0.3.6) activesupport (>= 4.1.0) - gollum-grit_adapter (1.0.0) + gollum-grit_adapter (1.0.1) gitlab-grit (~> 2.7, >= 2.7.1) - gollum-lib (4.1.0) - github-markup (~> 1.3.3) + gollum-lib (4.2.1) + github-markup (~> 1.4.0) gollum-grit_adapter (~> 1.0) nokogiri (~> 1.6.4) - rouge (~> 1.9) + rouge (~> 2.0) sanitize (~> 2.1.0) stringex (~> 2.5.1) gollum-rugged_adapter (0.4.2) @@ -578,7 +578,7 @@ GEM railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (1.11.0) + rouge (2.0.1) rqrcode (0.7.0) chunky_png rqrcode-rails3 (0.1.7) @@ -859,12 +859,12 @@ DEPENDENCIES gemnasium-gitlab-service (~> 0.2) gemojione (~> 2.6) github-linguist (~> 4.7.0) - github-markup (~> 1.3.1) + github-markup (~> 1.4) gitlab-flowdock-git-hook (~> 1.0.1) gitlab_git (~> 10.2) gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) - gollum-lib (~> 4.1.0) + gollum-lib (~> 4.2) gollum-rugged_adapter (~> 0.4.2) gon (~> 6.0.1) grape (~> 0.13.0) @@ -933,7 +933,7 @@ DEPENDENCIES request_store (~> 1.3.0) rerun (~> 0.11.0) responders (~> 2.0) - rouge (~> 1.11) + rouge (~> 2.0) rqrcode-rails3 (~> 0.1.7) rspec-rails (~> 3.5.0) rspec-retry (~> 0.4.5) -- cgit v1.2.1 From 96c68c503340bf650a545872cb4e8767a1b00f5b Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 11:29:19 -0700 Subject: deprecate @anchorlinenos --- lib/rouge/formatters/html_gitlab.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index 3358ed6773e..2833dbddcf3 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -26,9 +26,6 @@ module Rouge # [+lineanchorsid+] If lineanchors is true the name of the anchors can # be changed with lineanchorsid to e.g. foo-linenumber # (default: 'L'). - # [+anchorlinenos+] If set to true, will wrap line numbers in - # tags. Used in combination with linenos and lineanchors - # (default: false). # [+inline_theme+] Inline CSS styles for the
 tag (default: false).
       def initialize(
           nowrap: false,
@@ -37,7 +34,6 @@ module Rouge
           linenostart: 1,
           lineanchors: false,
           lineanchorsid: 'L',
-          anchorlinenos: false,
           inline_theme: nil
       )
         @nowrap = nowrap
@@ -46,7 +42,6 @@ module Rouge
         @linenostart = linenostart
         @lineanchors = lineanchors
         @lineanchorsid = lineanchorsid
-        @anchorlinenos = anchorlinenos
         @inline_theme = Theme.find(inline_theme).new if inline_theme.is_a?(String)
       end
 
@@ -120,11 +115,6 @@ module Rouge
       end
 
       def wrap_linenos(numbers)
-        if @anchorlinenos
-          numbers.map! do |number|
-            "#{number}"
-          end
-        end
         numbers.join("\n")
       end
 
-- 
cgit v1.2.1


From 95d6174a0818230a9811d5d302c77760b49597b1 Mon Sep 17 00:00:00 2001
From: "http://jneen.net/" 
Date: Wed, 15 Jun 2016 11:32:08 -0700
Subject: remove the unused inline_theme feature

---
 lib/rouge/formatters/html_gitlab.rb | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb
index 2833dbddcf3..50b1db88c0e 100644
--- a/lib/rouge/formatters/html_gitlab.rb
+++ b/lib/rouge/formatters/html_gitlab.rb
@@ -26,15 +26,13 @@ module Rouge
       # [+lineanchorsid+]   If lineanchors is true the name of the anchors can
       #                     be changed with lineanchorsid to e.g. foo-linenumber
       #                     (default: 'L').
-      # [+inline_theme+]    Inline CSS styles for the 
 tag (default: false).
       def initialize(
           nowrap: false,
           cssclass: 'highlight',
           linenos: nil,
           linenostart: 1,
           lineanchors: false,
-          lineanchorsid: 'L',
-          inline_theme: nil
+          lineanchorsid: 'L'
       )
         @nowrap = nowrap
         @cssclass = cssclass
@@ -42,7 +40,6 @@ module Rouge
         @linenostart = linenostart
         @lineanchors = lineanchors
         @lineanchorsid = lineanchorsid
-        @inline_theme = Theme.find(inline_theme).new if inline_theme.is_a?(String)
       end
 
       def render(tokens)
@@ -150,12 +147,7 @@ module Rouge
         if tok.shortname.empty?
           val
         else
-          if @inline_theme
-            rules = @inline_theme.style_for(tok).rendered_rules
-            ""
-          else
-            "#{val}"
-          end
+          "#{val}"
         end
       end
     end
-- 
cgit v1.2.1


From 681b5af586eb847651af075b325a8b6ef69f4ec6 Mon Sep 17 00:00:00 2001
From: "http://jneen.net/" 
Date: Wed, 15 Jun 2016 11:32:27 -0700
Subject: do this thing in a clearer way

---
 lib/gitlab/highlight.rb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb
index 41296415e35..adac216b337 100644
--- a/lib/gitlab/highlight.rb
+++ b/lib/gitlab/highlight.rb
@@ -28,11 +28,14 @@ module Gitlab
     end
 
     def highlight(text, continue: true, plain: false)
+      lexer = @lexer
+
       if plain
-        @formatter.format(Rouge::Lexers::PlainText.lex(text)).html_safe
-      else
-        @formatter.format(@lexer.lex(text, continue: continue)).html_safe
+        lexer = Rouge::Lexers::PlainText
+        continue = false
       end
+
+      @formatter.format(@lexer.lex(text, continue: continue)).html_safe
     rescue
       @formatter.format(Rouge::Lexers::PlainText.lex(text)).html_safe
     end
-- 
cgit v1.2.1


From 7e8a92fbd1cdaaf1011b301124c0d3f471c871fd Mon Sep 17 00:00:00 2001
From: "http://jneen.net/" 
Date: Wed, 15 Jun 2016 11:44:12 -0700
Subject: the call site always specifies this option

---
 lib/gitlab/highlight.rb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb
index adac216b337..7230a85bc9f 100644
--- a/lib/gitlab/highlight.rb
+++ b/lib/gitlab/highlight.rb
@@ -52,7 +52,6 @@ module Gitlab
 
     def rouge_formatter(options = {})
       options = options.reverse_merge(
-        nowrap: true,
         cssclass: 'code highlight',
         lineanchors: true,
         lineanchorsid: 'LC'
-- 
cgit v1.2.1


From e2c9770e03681edafe14212d3db1035a675ba47d Mon Sep 17 00:00:00 2001
From: "http://jneen.net/" 
Date: Wed, 15 Jun 2016 11:49:22 -0700
Subject: rm dead `highlighter` method

---
 app/helpers/blob_helper.rb | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 428a42266d0..d639a56f487 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -1,8 +1,4 @@
 module BlobHelper
-  def highlighter(blob_name, blob_content, repository: nil, nowrap: false)
-    Gitlab::Highlight.new(blob_name, blob_content, nowrap: nowrap, repository: repository)
-  end
-
   def highlight(blob_name, blob_content, repository: nil, nowrap: false, plain: false)
     Gitlab::Highlight.highlight(blob_name, blob_content, nowrap: nowrap, plain: plain, repository: repository)
   end
-- 
cgit v1.2.1


From 7214a221e082c569b4804eb4729e097d4e4b069c Mon Sep 17 00:00:00 2001
From: "http://jneen.net/" 
Date: Wed, 15 Jun 2016 11:52:23 -0700
Subject: kill the nowrap option

the 
 wrapping is *always* used by the helper, and *never* by
anywhere else, so pull the wrapping into the helper
---
 app/helpers/blob_helper.rb |  5 +++--
 lib/gitlab/highlight.rb    | 16 +++++-----------
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index d639a56f487..39f9f935d31 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -1,6 +1,7 @@
 module BlobHelper
-  def highlight(blob_name, blob_content, repository: nil, nowrap: false, plain: false)
-    Gitlab::Highlight.highlight(blob_name, blob_content, nowrap: nowrap, plain: plain, repository: repository)
+  def highlight(blob_name, blob_content, repository: nil, plain: false)
+    highlighted = Gitlab::Highlight.highlight(blob_name, blob_content, plain: plain, repository: repository)
+    raw %<
#{highlighted}
> end def no_highlight_files diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index 7230a85bc9f..ad928fec970 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -1,7 +1,7 @@ module Gitlab class Highlight - def self.highlight(blob_name, blob_content, repository: nil, nowrap: true, plain: false) - new(blob_name, blob_content, nowrap: nowrap, repository: repository). + def self.highlight(blob_name, blob_content, repository: nil, plain: false) + new(blob_name, blob_content, repository: repository). highlight(blob_content, continue: false, plain: plain) end @@ -13,13 +13,9 @@ module Gitlab highlight(file_name, blob.data, repository: repository).lines.map!(&:html_safe) end - attr_reader :lexer - def initialize(blob_name, blob_content, repository: nil, nowrap: true) - @blob_name = blob_name - @blob_content = blob_content + def initialize(blob_name, blob_content, repository: nil) + @formatter = rouge_formatter @repository = repository - @formatter = rouge_formatter(nowrap: nowrap) - @lexer = custom_language || begin Rouge::Lexer.guess(filename: blob_name, source: blob_content).new rescue Rouge::Lexer::AmbiguousGuess => e @@ -51,13 +47,11 @@ module Gitlab end def rouge_formatter(options = {}) - options = options.reverse_merge( + Rouge::Formatters::HTMLGitlab.new( cssclass: 'code highlight', lineanchors: true, lineanchorsid: 'LC' ) - - Rouge::Formatters::HTMLGitlab.new(options) end end end -- cgit v1.2.1 From 2ae837f9c9c62272efae4f6dbb1d33cbba325389 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 11:58:47 -0700 Subject: kill the nowrap option in HTMLGitlab itself --- lib/rouge/formatters/html_gitlab.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index 50b1db88c0e..04943c173bd 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -7,8 +7,6 @@ module Rouge # Creates a new Rouge::Formatter::HTMLGitlab instance. # - # [+nowrap+] If set to True, don't wrap the output at all, not - # even inside a
 tag (default: false).
       # [+cssclass+]        CSS class for the wrapping 
tag # (default: 'highlight'). # [+linenos+] If set to 'table', output line numbers as a table @@ -27,14 +25,12 @@ module Rouge # be changed with lineanchorsid to e.g. foo-linenumber # (default: 'L'). def initialize( - nowrap: false, cssclass: 'highlight', linenos: nil, linenostart: 1, lineanchors: false, lineanchorsid: 'L' ) - @nowrap = nowrap @cssclass = cssclass @linenos = linenos @linenostart = linenostart @@ -60,18 +56,13 @@ module Rouge def render_untableized(tokens) data = process_tokens(tokens) - html = '' - html << "
" unless @nowrap
-        html << wrap_lines(data[:code])
-        html << "
\n" unless @nowrap - html + wrap_lines(data[:code]) end def render_tableized(tokens) data = process_tokens(tokens) html = '' - html << "
" unless @nowrap html << '' html << "' html << '
"
         html << wrap_linenos(data[:numbers])
@@ -80,7 +71,6 @@ module Rouge
         html << wrap_lines(data[:code])
         html << '
' - html << '
' unless @nowrap html end -- cgit v1.2.1 From 96274c2765ad4daa23af667b27dc647a3406d7c0 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 12:04:25 -0700 Subject: add the wrapping back in for the banzai filter --- lib/banzai/filter/syntax_highlight_filter.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index 536b478979f..c06de2e5b37 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -20,7 +20,7 @@ module Banzai code = node.text begin - highlighted = block_code(code, language) + highlighted = %<
#{block_code(code, language)}
> rescue # Gracefully handle syntax highlighter bugs/errors to ensure # users can still access an issue/comment/etc. @@ -31,6 +31,10 @@ module Banzai replace_parent_pre_element(node, highlighted) end + def css_classes + "code highlight js-syntax-highlight #{lexer.tag}" + end + private def replace_parent_pre_element(node, highlighted) -- cgit v1.2.1 From 504a048b0824aecb81faa3ca4a9503a05c93faac Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 12:08:04 -0700 Subject: remove the dead linenos and linenostart options and the methods that relied on them --- lib/rouge/formatters/html_gitlab.rb | 46 ++----------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index 04943c173bd..b76021eef77 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -9,14 +9,6 @@ module Rouge # # [+cssclass+] CSS class for the wrapping
tag # (default: 'highlight'). - # [+linenos+] If set to 'table', output line numbers as a table - # with two cells, one containing the line numbers, - # the other the whole code. This is copy paste friendly, - # but may cause alignment problems with some browsers - # or fonts. If set to 'inline', the line numbers will - # be integrated in the
 tag that contains
-      #                     the code (default: nil).
-      # [+linenostart+]     The line number for the first line (default: 1).
       # [+lineanchors+]     If set to true the formatter will wrap each output
       #                     line in an anchor tag with a name of L-linenumber.
       #                     This allows easy linking to certain lines
@@ -26,53 +18,23 @@ module Rouge
       #                     (default: 'L').
       def initialize(
           cssclass: 'highlight',
-          linenos: nil,
-          linenostart: 1,
           lineanchors: false,
           lineanchorsid: 'L'
       )
         @cssclass = cssclass
-        @linenos = linenos
-        @linenostart = linenostart
         @lineanchors = lineanchors
         @lineanchorsid = lineanchorsid
       end
 
       def render(tokens)
-        case @linenos
-        when 'table'
-          render_tableized(tokens)
-        when 'inline'
-          render_untableized(tokens)
-        else
-          render_untableized(tokens)
-        end
-      end
-
-      alias_method :format, :render
-
-      private
-
-      def render_untableized(tokens)
         data = process_tokens(tokens)
 
         wrap_lines(data[:code])
       end
 
-      def render_tableized(tokens)
-        data = process_tokens(tokens)
+      alias_method :format, :render
 
-        html = ''
-        html << ''
-        html << "'
-        html << "'
-        html << '
"
-        html << wrap_linenos(data[:numbers])
-        html << '
"
-        html << wrap_lines(data[:code])
-        html << '
' - html - end + private def process_tokens(tokens) rendered = [] @@ -101,10 +63,6 @@ module Rouge { numbers: numbers, code: rendered } end - def wrap_linenos(numbers) - numbers.join("\n") - end - def wrap_lines(lines) if @lineanchors lines = lines.each_with_index.map do |line, index| -- cgit v1.2.1 From 55dc7d09b35c43679d0c298885c10aa59818bf66 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 12:12:48 -0700 Subject: trim more dead code --- lib/rouge/formatters/html_gitlab.rb | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index b76021eef77..791a9523884 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -57,10 +57,7 @@ module Rouge # Add leftover text rendered << current_line if current_line.present? - num_lines = rendered.size - numbers = (@linenostart..num_lines + @linenostart - 1).to_a - - { numbers: numbers, code: rendered } + { code: rendered } end def wrap_lines(lines) @@ -68,20 +65,8 @@ module Rouge lines = lines.each_with_index.map do |line, index| number = index + @linenostart - if @linenos == 'inline' - "" \ - "#{number}" \ - "#{line}" \ - '' - else - "#{line}" \ - '' - end - end - elsif @linenos == 'inline' - lines = lines.each_with_index.map do |line, index| - number = index + @linenostart - "#{number}#{line}" + "#{line}" \ + '' end end -- cgit v1.2.1 From 3bb65815b0cb7731b3262ff216506582951a6f6f Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 14 Jul 2016 09:51:10 -0700 Subject: kill the :cssclass option --- lib/banzai/filter/syntax_highlight_filter.rb | 3 +-- lib/gitlab/highlight.rb | 1 - lib/rouge/formatters/html_gitlab.rb | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index c06de2e5b37..7f838ef4c08 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -44,8 +44,7 @@ module Banzai # Override Rouge::Plugins::Redcarpet#rouge_formatter def rouge_formatter(lexer) - Rouge::Formatters::HTMLGitlab.new( - cssclass: "code highlight js-syntax-highlight #{lexer.tag}") + Rouge::Formatters::HTMLGitlab.new end end end diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index ad928fec970..aaef569d870 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -48,7 +48,6 @@ module Gitlab def rouge_formatter(options = {}) Rouge::Formatters::HTMLGitlab.new( - cssclass: 'code highlight', lineanchors: true, lineanchorsid: 'LC' ) diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index 791a9523884..b9e3272e0b5 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -17,11 +17,9 @@ module Rouge # be changed with lineanchorsid to e.g. foo-linenumber # (default: 'L'). def initialize( - cssclass: 'highlight', lineanchors: false, lineanchorsid: 'L' ) - @cssclass = cssclass @lineanchors = lineanchors @lineanchorsid = lineanchorsid end -- cgit v1.2.1 From 34a3d2a340b5d235da3958176bca6e0de6679a0f Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 12:15:47 -0700 Subject: without line anchors, this is just the plain HTML formatter --- lib/banzai/filter/syntax_highlight_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index 7f838ef4c08..144d8c175dc 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -44,7 +44,7 @@ module Banzai # Override Rouge::Plugins::Redcarpet#rouge_formatter def rouge_formatter(lexer) - Rouge::Formatters::HTMLGitlab.new + Rouge::Formatters::HTML.new end end end -- cgit v1.2.1 From e1824aa101a2181fe7e5ce080582cfa188d19da8 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 12:32:55 -0700 Subject: use the new token_lines interface to format lines --- lib/gitlab/highlight.rb | 5 +-- lib/rouge/formatters/html_gitlab.rb | 81 +++++-------------------------------- 2 files changed, 12 insertions(+), 74 deletions(-) diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index aaef569d870..ba157cc98cc 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -47,10 +47,7 @@ module Gitlab end def rouge_formatter(options = {}) - Rouge::Formatters::HTMLGitlab.new( - lineanchors: true, - lineanchorsid: 'LC' - ) + Rouge::Formatters::HTMLGitlab.new end end end diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index b9e3272e0b5..723bac574dd 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -2,83 +2,24 @@ require 'cgi' module Rouge module Formatters - class HTMLGitlab < Rouge::Formatter + class HTMLGitlab < Rouge::Formatters::HTML tag 'html_gitlab' # Creates a new Rouge::Formatter::HTMLGitlab instance. # - # [+cssclass+] CSS class for the wrapping
tag - # (default: 'highlight'). - # [+lineanchors+] If set to true the formatter will wrap each output - # line in an anchor tag with a name of L-linenumber. - # This allows easy linking to certain lines - # (default: false). - # [+lineanchorsid+] If lineanchors is true the name of the anchors can - # be changed with lineanchorsid to e.g. foo-linenumber - # (default: 'L'). - def initialize( - lineanchors: false, - lineanchorsid: 'L' - ) - @lineanchors = lineanchors - @lineanchorsid = lineanchorsid + # [+linenostart+] The line number for the first line (default: 1). + def initialize(linenostart: 1) + @linenostart = linenostart + @line_number = linenostart end - def render(tokens) - data = process_tokens(tokens) + def stream(tokens, &b) + token_lines(tokens) do |line| + yield %<> + line.each { |token, value| yield span(token, value) } + yield %<\n> - wrap_lines(data[:code]) - end - - alias_method :format, :render - - private - - def process_tokens(tokens) - rendered = [] - current_line = '' - - tokens.each do |tok, val| - # In the case of multi-line values (e.g. comments), we need to apply - # styling to each line since span elements are inline. - val.lines.each do |line| - stripped = line.chomp - current_line << span(tok, stripped) - - if line.end_with?("\n") - rendered << current_line - current_line = '' - end - end - end - - # Add leftover text - rendered << current_line if current_line.present? - - { code: rendered } - end - - def wrap_lines(lines) - if @lineanchors - lines = lines.each_with_index.map do |line, index| - number = index + @linenostart - - "#{line}" \ - '' - end - end - - lines.join("\n") - end - - def span(tok, val) - # http://stackoverflow.com/a/1600584/2587286 - val = CGI.escapeHTML(val) - - if tok.shortname.empty? - val - else - "#{val}" + @line_number += 1 end end end -- cgit v1.2.1 From 6107933ba30a2ac6e591971d4a7581a5611c42c0 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 14:01:47 -0700 Subject: inline #rouge_formatter --- lib/gitlab/highlight.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index ba157cc98cc..84bd616d608 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -13,8 +13,8 @@ module Gitlab highlight(file_name, blob.data, repository: repository).lines.map!(&:html_safe) end - def initialize(blob_name, blob_content, repository: nil) - @formatter = rouge_formatter + def initialize(blob_name, blob_content) + @formatter = Rouge::Formatters::HTMLGitlab.new @repository = repository @lexer = custom_language || begin Rouge::Lexer.guess(filename: blob_name, source: blob_content).new @@ -45,9 +45,5 @@ module Gitlab Rouge::Lexer.find_fancy(language_name) end - - def rouge_formatter(options = {}) - Rouge::Formatters::HTMLGitlab.new - end end end -- cgit v1.2.1 From 4365144f5cfa1ab8ada3a75447e9d494f406980e Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 14:01:57 -0700 Subject: no longer need cgi --- lib/rouge/formatters/html_gitlab.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index 723bac574dd..31533fc3b8c 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -1,5 +1,3 @@ -require 'cgi' - module Rouge module Formatters class HTMLGitlab < Rouge::Formatters::HTML -- cgit v1.2.1 From ff7e679bca6a0303dcb3cb07dbe26aa32f6fb649 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 15 Jun 2016 15:02:13 -0700 Subject: we no longer encode double-quotes --- spec/lib/gitlab/diff/highlight_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/lib/gitlab/diff/highlight_spec.rb b/spec/lib/gitlab/diff/highlight_spec.rb index fb5d50a5c68..4408d5bcdb4 100644 --- a/spec/lib/gitlab/diff/highlight_spec.rb +++ b/spec/lib/gitlab/diff/highlight_spec.rb @@ -28,13 +28,13 @@ describe Gitlab::Diff::Highlight, lib: true do end it 'highlights and marks removed lines' do - code = %Q{- raise "System commands must be given as an array of strings"\n} + code = %Q{- raise "System commands must be given as an array of strings"\n} expect(subject[4].text).to eq(code) end it 'highlights and marks added lines' do - code = %Q{+ raise RuntimeError, "System commands must be given as an array of strings"\n} + code = %Q{+ raise RuntimeError, "System commands must be given as an array of strings"\n} expect(subject[5].text).to eq(code) end @@ -67,7 +67,7 @@ describe Gitlab::Diff::Highlight, lib: true do end it 'marks added lines' do - code = %Q{+ raise RuntimeError, "System commands must be given as an array of strings"} + code = %Q{+ raise RuntimeError, "System commands must be given as an array of strings"} expect(subject[5].text).to eq(code) expect(subject[5].text).to be_html_safe -- cgit v1.2.1 From f82287e2cc3a57a21be74263be81716c5b3787b7 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 16 Jun 2016 15:15:18 -0700 Subject: use the local lexer variable to respect plain: ... --- lib/gitlab/highlight.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index 84bd616d608..fbed65a055b 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -31,7 +31,7 @@ module Gitlab continue = false end - @formatter.format(@lexer.lex(text, continue: continue)).html_safe + @formatter.format(lexer.lex(text, continue: continue)).html_safe rescue @formatter.format(Rouge::Lexers::PlainText.lex(text)).html_safe end -- cgit v1.2.1 From e9f191907cb9c9d03b5ad0b67bd3e114f2111a18 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 16 Jun 2016 15:15:34 -0700 Subject: apparently this gets encoded now? --- spec/lib/gitlab/diff/highlight_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/gitlab/diff/highlight_spec.rb b/spec/lib/gitlab/diff/highlight_spec.rb index 4408d5bcdb4..88e4115c453 100644 --- a/spec/lib/gitlab/diff/highlight_spec.rb +++ b/spec/lib/gitlab/diff/highlight_spec.rb @@ -67,7 +67,7 @@ describe Gitlab::Diff::Highlight, lib: true do end it 'marks added lines' do - code = %Q{+ raise RuntimeError, "System commands must be given as an array of strings"} + code = %Q{+ raise RuntimeError, "System commands must be given as an array of strings"} expect(subject[5].text).to eq(code) expect(subject[5].text).to be_html_safe -- cgit v1.2.1 From 362d7fde084d0e9eeeeea0c78c2f455c6e86a35b Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 16 Jun 2016 16:05:53 -0700 Subject: bugfix: don't error in css_classes --- lib/banzai/filter/syntax_highlight_filter.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index 144d8c175dc..17f9164bcb7 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -19,8 +19,15 @@ module Banzai language = node.attr('class') code = node.text + lexer = Rouge::Lexer.find_fancy(language) + formatter = Rouge::Formatters::HTML.new + css_classes = "code highlight js-syntax-highlight #{lexer.tag}" + begin - highlighted = %<
#{block_code(code, language)}
> + highlighted = '' + highlighted << %<
>
+          highlighted << formatter.format(lexer.lex(code))
+          highlighted << %<
> rescue # Gracefully handle syntax highlighter bugs/errors to ensure # users can still access an issue/comment/etc. @@ -31,10 +38,6 @@ module Banzai replace_parent_pre_element(node, highlighted) end - def css_classes - "code highlight js-syntax-highlight #{lexer.tag}" - end - private def replace_parent_pre_element(node, highlighted) -- cgit v1.2.1 From 001b1ff312df04e014a82fdb831a77cfaf66fd62 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 21 Jun 2016 10:52:11 -0700 Subject: rm spec for a deleted method --- spec/helpers/blob_helper_spec.rb | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb index 6d1c02db297..b6e18c6a753 100644 --- a/spec/helpers/blob_helper_spec.rb +++ b/spec/helpers/blob_helper_spec.rb @@ -54,20 +54,6 @@ describe BlobHelper do end end - describe "#highlighter" do - it 'should highlight continued blocks' do - # Both lines have LC1 as ID since formatter doesn't support continue at the moment - expected = [ - '(make-pathname :defaults name', - ':type "assem"))' - ] - - highlighter = helper.highlighter(blob_name, blob_content, nowrap: true) - result = split_content.map{ |content| highlighter.highlight(content) } - expect(result).to eq(expected) - end - end - describe "#sanitize_svg" do let(:input_svg_path) { File.join(Rails.root, 'spec', 'fixtures', 'unsanitized.svg') } let(:data) { open(input_svg_path).read } -- cgit v1.2.1 From d625f652916c7039797190351d1dc04c6152ce78 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 21 Jun 2016 11:23:10 -0700 Subject: eliminate the final newline in
 blocks

---
 lib/rouge/formatters/html_gitlab.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb
index 31533fc3b8c..b76cf14a536 100644
--- a/lib/rouge/formatters/html_gitlab.rb
+++ b/lib/rouge/formatters/html_gitlab.rb
@@ -12,10 +12,14 @@ module Rouge
       end
 
       def stream(tokens, &b)
+        is_first = true
         token_lines(tokens) do |line|
+          yield "\n" unless is_first
+          is_first = false
+
           yield %<>
           line.each { |token, value| yield span(token, value) }
-          yield %<\n>
+          yield %<>
 
           @line_number += 1
         end
-- 
cgit v1.2.1


From e0ee9dacd1bf6acab6774a2add992ae14fa0e2fc Mon Sep 17 00:00:00 2001
From: "http://jneen.net/" 
Date: Tue, 21 Jun 2016 11:24:12 -0700
Subject: remove uses of the nowrap: feature

---
 spec/helpers/blob_helper_spec.rb | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb
index b6e18c6a753..e5dfa61fa6a 100644
--- a/spec/helpers/blob_helper_spec.rb
+++ b/spec/helpers/blob_helper_spec.rb
@@ -16,19 +16,19 @@ describe BlobHelper do
 
   describe '#highlight' do
     it 'should return plaintext for unknown lexer context' do
-      result = helper.highlight(blob_name, no_context_content, nowrap: true)
-      expect(result).to eq(':type "assem"))')
+      result = helper.highlight(blob_name, no_context_content)
+      expect(result).to eq(%<
:type "assem"))
>) end it 'should highlight single block' do - expected = %Q[(make-pathname :defaults name -:type "assem"))] + expected = %Q[
(make-pathname :defaults name
+:type "assem"))
] - expect(helper.highlight(blob_name, blob_content, nowrap: true)).to eq(expected) + expect(helper.highlight(blob_name, blob_content)).to eq(expected) end it 'should highlight multi-line comments' do - result = helper.highlight(blob_name, multiline_content, nowrap: true) + result = helper.highlight(blob_name, multiline_content) html = Nokogiri::HTML(result) lines = html.search('.s') expect(lines.count).to eq(3) @@ -41,14 +41,14 @@ describe BlobHelper do let(:blob_name) { 'test.diff' } let(:blob_content) { "+aaa\n+bbb\n- ccc\n ddd\n"} let(:expected) do - %q(+aaa + %q(
+aaa
 +bbb
 - ccc
- ddd)
+ ddd
) end it 'should highlight each line properly' do - result = helper.highlight(blob_name, blob_content, nowrap: true) + result = helper.highlight(blob_name, blob_content) expect(result).to eq(expected) end end -- cgit v1.2.1 From 4e3db22fe0a469a8429f50b99a7edde8f5f28312 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 21 Jun 2016 11:48:39 -0700 Subject: don't expect " encoding anymore --- spec/fixtures/parallel_diff_result.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/fixtures/parallel_diff_result.yml b/spec/fixtures/parallel_diff_result.yml index 333eda1191a..37066c8e930 100644 --- a/spec/fixtures/parallel_diff_result.yml +++ b/spec/fixtures/parallel_diff_result.yml @@ -121,7 +121,7 @@ :type: old :number: 9 :text: | - - raise "System commands must be given as an array of strings" + - raise "System commands must be given as an array of strings" :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_9_9 :position: !ruby/object:Gitlab::Diff::Position attributes: @@ -136,7 +136,7 @@ :type: new :number: 9 :text: | - + raise RuntimeError, "System commands must be given as an array of strings" + + raise RuntimeError, "System commands must be given as an array of strings" :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_10_9 :position: !ruby/object:Gitlab::Diff::Position attributes: @@ -241,7 +241,7 @@ :type: old :number: 13 :text: | - - vars = { "PWD" => path } + - vars = { "PWD" => path } :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_13_13 :position: !ruby/object:Gitlab::Diff::Position attributes: @@ -315,7 +315,7 @@ :type: new :number: 15 :text: | - + "PWD" => path + + "PWD" => path :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_15 :position: !ruby/object:Gitlab::Diff::Position attributes: @@ -623,7 +623,7 @@ :type: :number: 20 :text: |2 - @cmd_output = "" + @cmd_output = "" :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_20_26 :position: !ruby/object:Gitlab::Diff::Position attributes: @@ -638,7 +638,7 @@ :type: :number: 26 :text: |2 - @cmd_output = "" + @cmd_output = "" :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_20_26 :position: !ruby/object:Gitlab::Diff::Position attributes: -- cgit v1.2.1 From ca32a542d7a36c1d27fc8851534a0c15048a79dd Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 21 Jun 2016 11:51:29 -0700 Subject: don't expect a random newline at the end of the thing? --- spec/lib/banzai/filter/syntax_highlight_filter_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb b/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb index 407617f3307..50be175c1c3 100644 --- a/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb +++ b/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb @@ -5,7 +5,7 @@ describe Banzai::Filter::SyntaxHighlightFilter, lib: true do it 'highlights valid code blocks' do result = filter('
def fun end')
-    expect(result.to_html).to eq("
def fun end
\n") + expect(result.to_html).to eq("
def fun end
") end it 'passes through invalid code blocks' do -- cgit v1.2.1 From 2f0b29227d15bc30b2f13ee415ba83d052fd7f68 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 21 Jun 2016 13:08:24 -0700 Subject: stub out errors from the formatter since we've eliminated #block_code --- spec/lib/banzai/filter/syntax_highlight_filter_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb b/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb index 50be175c1c3..48ebc81cf82 100644 --- a/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb +++ b/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb @@ -9,7 +9,7 @@ describe Banzai::Filter::SyntaxHighlightFilter, lib: true do end it 'passes through invalid code blocks' do - allow_any_instance_of(described_class).to receive(:block_code).and_raise(StandardError) + allow_any_instance_of(Rouge::Formatter).to receive(:format).and_raise(StandardError) result = filter('
This is a test
') expect(result.to_html).to eq('
This is a test
') -- cgit v1.2.1 From 734ed9c59a486651820907051fbee149898f01e4 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 21 Jun 2016 13:12:21 -0700 Subject: expect final newlines from the banzai filter --- spec/helpers/events_helper_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb index c0d2be98e85..6b5e3d93d48 100644 --- a/spec/helpers/events_helper_spec.rb +++ b/spec/helpers/events_helper_spec.rb @@ -57,7 +57,7 @@ describe EventsHelper do expected = '
' \
         "def test\n" \
         "  \'hello world\'\n" \
-        "end" \
+        "end\n" \
         '
' expect(helper.event_note(input)).to eq(expected) end -- cgit v1.2.1 From 7ceb9913aa87f1691411d725417e1fd1aadacb9b Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Mon, 27 Jun 2016 13:19:11 -0700 Subject: update to rouge 2.0.2 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1514bde61ab..d87decc324e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -578,7 +578,7 @@ GEM railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (2.0.1) + rouge (2.0.2) rqrcode (0.7.0) chunky_png rqrcode-rails3 (0.1.7) -- cgit v1.2.1 From d54a281e3d1c543f4cbd550c62f62d225f595bbb Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Tue, 12 Jul 2016 16:40:05 -0300 Subject: Fix creating group with space in group path --- app/views/layouts/_search.html.haml | 2 +- spec/features/groups_spec.rb | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml index 245b9c3b4d4..f7580f00159 100644 --- a/app/views/layouts/_search.html.haml +++ b/app/views/layouts/_search.html.haml @@ -44,7 +44,7 @@ name: "#{j(@project.name)}" }; - - if @group and @group.path + - if @group && @group.persisted? && @group.path :javascript gl.groupOptions = gl.groupOptions || {}; gl.groupOptions["#{j(@group.path)}"] = { diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index 891df65216d..2d8b59472e8 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -1,14 +1,26 @@ require 'spec_helper' feature 'Group', feature: true do + before do + login_as(:admin) + end + + describe 'creating a group with space in group path' do + it 'renders new group form with validation errors' do + visit new_group_path + fill_in 'Group path', with: 'space group' + + click_button 'Create group' + + expect(current_path).to eq(groups_path) + expect(page).to have_content("Path can contain only letters, digits, '_', '-' and '.'. Cannot start with '-' or end in '.'.") + end + end + describe 'description' do let(:group) { create(:group) } let(:path) { group_path(group) } - before do - login_as(:admin) - end - it 'parses Markdown' do group.update_attribute(:description, 'This is **my** group') visit path -- cgit v1.2.1 From e367bbff164cef36fcb4d5f819714347ed9a2ebd Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Tue, 12 Jul 2016 16:40:37 -0300 Subject: Update CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 6b24b2c5b32..7e784bd641d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -91,6 +91,7 @@ v 8.10.0 (unreleased) - Redesign Builds and Pipelines pages - Change status color and icon for running builds - Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.` + - Fix creating group with space in group path v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 -- cgit v1.2.1 From 822304b19f81386a36eb7175f7384e2a8c5fd5e1 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 14 Jul 2016 11:40:55 -0700 Subject: fix Gitlab::Highlight#initializer bugs from rebase --- lib/gitlab/highlight.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index fbed65a055b..57b7fc139f8 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -13,9 +13,10 @@ module Gitlab highlight(file_name, blob.data, repository: repository).lines.map!(&:html_safe) end - def initialize(blob_name, blob_content) + def initialize(blob_name, blob_content, repository: nil) @formatter = Rouge::Formatters::HTMLGitlab.new @repository = repository + @blob_name = blob_name @lexer = custom_language || begin Rouge::Lexer.guess(filename: blob_name, source: blob_content).new rescue Rouge::Lexer::AmbiguousGuess => e -- cgit v1.2.1 From b468672d7634b13b2a2bea5685a5e1cbc9d82c23 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 14 Jul 2016 11:44:59 -0700 Subject: style: factor out `@lexer` into a method --- lib/gitlab/highlight.rb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index 57b7fc139f8..a9e429a29f4 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -17,26 +17,30 @@ module Gitlab @formatter = Rouge::Formatters::HTMLGitlab.new @repository = repository @blob_name = blob_name - @lexer = custom_language || begin - Rouge::Lexer.guess(filename: blob_name, source: blob_content).new - rescue Rouge::Lexer::AmbiguousGuess => e - e.alternatives.sort_by(&:tag).first - end + @blob_content = blob_content end def highlight(text, continue: true, plain: false) - lexer = @lexer - if plain - lexer = Rouge::Lexers::PlainText + hl_lexer = Rouge::Lexers::PlainText continue = false + else + hl_lexer = self.lexer end - @formatter.format(lexer.lex(text, continue: continue)).html_safe + @formatter.format(hl_lexer.lex(text, continue: continue)).html_safe rescue @formatter.format(Rouge::Lexers::PlainText.lex(text)).html_safe end + def lexer + @lexer ||= custom_language || begin + Rouge::Lexer.guess(filename: blob_name, source: blob_content).new + rescue Rouge::Lexer::AmbiguousGuess => e + e.alternatives.sort_by(&:tag).first + end + end + private def custom_language -- cgit v1.2.1 From f7f082f46c919e5c8c730a2c2ab0a7baf086b01b Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 14 Jul 2016 12:19:39 -0700 Subject: bump rouge to 2.0.3 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d87decc324e..eab04ec3a25 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -578,7 +578,7 @@ GEM railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (2.0.2) + rouge (2.0.3) rqrcode (0.7.0) chunky_png rqrcode-rails3 (0.1.7) -- cgit v1.2.1 From c763c7e402599a2789e260ecf61c11c68381aaa5 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 14 Jul 2016 12:21:22 -0700 Subject: use the proper variable names o_O --- lib/gitlab/highlight.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gitlab/highlight.rb b/lib/gitlab/highlight.rb index a9e429a29f4..9360afedfcb 100644 --- a/lib/gitlab/highlight.rb +++ b/lib/gitlab/highlight.rb @@ -35,8 +35,8 @@ module Gitlab def lexer @lexer ||= custom_language || begin - Rouge::Lexer.guess(filename: blob_name, source: blob_content).new - rescue Rouge::Lexer::AmbiguousGuess => e + Rouge::Lexer.guess(filename: @blob_name, source: @blob_content).new + rescue Rouge::Guesser::Ambiguous => e e.alternatives.sort_by(&:tag).first end end -- cgit v1.2.1 From 01ff8ae5df7e00db16aa64f056098626b8ae795b Mon Sep 17 00:00:00 2001 From: winniehell Date: Thu, 14 Jul 2016 23:43:27 +0200 Subject: Display tooltip for mentioned users and groups (!5261) --- CHANGELOG | 1 + lib/banzai/filter/user_reference_filter.rb | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6b24b2c5b32..eeb2d377bf6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,7 @@ v 8.10.0 (unreleased) - Add Sidekiq queue duration to transaction metrics. - Add a new column `artifacts_size` to table `ci_builds` !4964 - Let Workhorse serve format-patch diffs + - Display tooltip for mentioned users and groups !5261 (winniehell) - Added day name to contribution calendar tooltips - Make images fit to the size of the viewport !4810 - Fix check for New Branch button on Issue page !4630 (winniehell) diff --git a/lib/banzai/filter/user_reference_filter.rb b/lib/banzai/filter/user_reference_filter.rb index 5b0a6d8541b..e1ca7f4d24b 100644 --- a/lib/banzai/filter/user_reference_filter.rb +++ b/lib/banzai/filter/user_reference_filter.rb @@ -112,7 +112,7 @@ module Banzai data = data_attribute(project: project.id, author: author.try(:id)) text = link_text || User.reference_prefix + 'all' - link_tag(url, data, text) + link_tag(url, data, text, 'All Project and Group Members') end def link_to_namespace(namespace, link_text: nil) @@ -128,7 +128,7 @@ module Banzai data = data_attribute(group: namespace.id) text = link_text || Group.reference_prefix + group - link_tag(url, data, text) + link_tag(url, data, text, namespace.name) end def link_to_user(user, namespace, link_text: nil) @@ -136,11 +136,11 @@ module Banzai data = data_attribute(user: namespace.owner_id) text = link_text || User.reference_prefix + user - link_tag(url, data, text) + link_tag(url, data, text, namespace.owner_name) end - def link_tag(url, data, text) - %(#{escape_once(text)}) + def link_tag(url, data, text, title) + %(#{escape_once(text)}) end end end -- cgit v1.2.1 From 36dc4a5ce74dfd76a4acd7580fabec43ede1a254 Mon Sep 17 00:00:00 2001 From: Cairo Noleto Date: Tue, 12 Jul 2016 20:18:13 -0300 Subject: Allow bulk (un)subscription from issues in issue index fixies #19747 --- CHANGELOG | 1 + .../javascripts/issues-bulk-assignment.js.coffee | 13 ++++---- .../javascripts/subscription_select.js.coffee | 18 ++++++++++ app/controllers/projects/issues_controller.rb | 1 + app/services/issuable_base_service.rb | 10 ++++++ app/services/issues/bulk_update_service.rb | 2 +- app/views/shared/issuable/_filter.html.haml | 9 ++++- spec/services/issues/bulk_update_service_spec.rb | 38 ++++++++++++++++++++++ 8 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 app/assets/javascripts/subscription_select.js.coffee diff --git a/CHANGELOG b/CHANGELOG index 6b24b2c5b32..01a09bb3ca4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -91,6 +91,7 @@ v 8.10.0 (unreleased) - Redesign Builds and Pipelines pages - Change status color and icon for running builds - Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.` + - Allow bulk (un)subscription from issues in issue index v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 diff --git a/app/assets/javascripts/issues-bulk-assignment.js.coffee b/app/assets/javascripts/issues-bulk-assignment.js.coffee index 6b0e69dbae7..3d09ea08e3b 100644 --- a/app/assets/javascripts/issues-bulk-assignment.js.coffee +++ b/app/assets/javascripts/issues-bulk-assignment.js.coffee @@ -85,12 +85,13 @@ class @IssuableBulkActions getFormDataAsObject: -> formData = update: - state_event : @form.find('input[name="update[state_event]"]').val() - assignee_id : @form.find('input[name="update[assignee_id]"]').val() - milestone_id : @form.find('input[name="update[milestone_id]"]').val() - issues_ids : @form.find('input[name="update[issues_ids]"]').val() - add_label_ids : [] - remove_label_ids : [] + state_event : @form.find('input[name="update[state_event]"]').val() + assignee_id : @form.find('input[name="update[assignee_id]"]').val() + milestone_id : @form.find('input[name="update[milestone_id]"]').val() + issues_ids : @form.find('input[name="update[issues_ids]"]').val() + subscription_event : @form.find('input[name="update[subscription_event]"]').val() + add_label_ids : [] + remove_label_ids : [] if @willUpdateLabels @getLabelsToApply().map (id) -> diff --git a/app/assets/javascripts/subscription_select.js.coffee b/app/assets/javascripts/subscription_select.js.coffee new file mode 100644 index 00000000000..e5eb7a50d80 --- /dev/null +++ b/app/assets/javascripts/subscription_select.js.coffee @@ -0,0 +1,18 @@ +class @SubscriptionSelect + constructor: -> + $('.js-subscription-event').each (i, el) -> + fieldName = $(el).data("field-name") + + $(el).glDropdown( + selectable: true + fieldName: fieldName + toggleLabel: (selected, el, instance) => + label = 'Subscription' + $item = instance.dropdown.find('.is-active') + label = $item.text() if $item.length + label + clicked: (item, $el, e)-> + e.preventDefault() + id: (obj, el) -> + $(el).data("id") + ) diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index f7ada5cfee4..c52aa2663da 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -230,6 +230,7 @@ class Projects::IssuesController < Projects::ApplicationController :assignee_id, :milestone_id, :state_event, + :subscription_event, label_ids: [], add_label_ids: [], remove_label_ids: [] diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb index e3dc569152c..2d96efe1042 100644 --- a/app/services/issuable_base_service.rb +++ b/app/services/issuable_base_service.rb @@ -101,6 +101,7 @@ class IssuableBaseService < BaseService def update(issuable) change_state(issuable) + change_subscription(issuable) filter_params old_labels = issuable.labels.to_a @@ -124,6 +125,15 @@ class IssuableBaseService < BaseService end end + def change_subscription(issuable) + case params.delete(:subscription_event) + when 'subscribe' + issuable.subscribe(current_user) + when 'unsubscribe' + issuable.unsubscribe(current_user) + end + end + def has_changes?(issuable, old_labels: []) valid_attrs = [:title, :description, :assignee_id, :milestone_id, :target_branch] diff --git a/app/services/issues/bulk_update_service.rb b/app/services/issues/bulk_update_service.rb index cd08c3a0cb9..7e19a73f71a 100644 --- a/app/services/issues/bulk_update_service.rb +++ b/app/services/issues/bulk_update_service.rb @@ -4,7 +4,7 @@ module Issues issues_ids = params.delete(:issues_ids).split(",") issue_params = params - %i(state_event milestone_id assignee_id add_label_ids remove_label_ids).each do |key| + %i(state_event milestone_id assignee_id add_label_ids remove_label_ids subscription_event).each do |key| issue_params.delete(key) unless issue_params[key].present? end diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index 094d6636c66..0b7fa8c7d06 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -44,9 +44,15 @@ placeholder: "Search authors", data: { first_user: (current_user.username if current_user), null_user: true, current_user: true, project_id: @project.id, field_name: "update[assignee_id]" } }) .filter-item.inline = dropdown_tag("Milestone", options: { title: "Assign milestone", toggle_class: 'js-milestone-select js-extra-options js-filter-submit js-filter-bulk-update', filter: true, dropdown_class: "dropdown-menu-selectable dropdown-menu-milestone", placeholder: "Search milestones", data: { show_no: true, field_name: "update[milestone_id]", project_id: @project.id, milestones: namespace_project_milestones_path(@project.namespace, @project, :json), use_id: true } }) - .filter-item.inline.labels-filter = render "shared/issuable/label_dropdown", classes: ['js-filter-bulk-update', 'js-multiselect'], show_create: false, show_footer: false, extra_options: false, filter_submit: false, show_footer: false, data_options: { persist_when_hide: "true", field_name: "update[label_ids][]", show_no: false, show_any: false, use_id: true } + .filter-item.inline + = dropdown_tag("Subscription", options: { toggle_class: "js-subscription-event", title: "Change subscription", dropdown_class: "dropdown-menu-selectable", data: { field_name: "update[subscription_event]" } } ) do + %ul + %li + %a{href: "#", data: {id: "subscribe"}} Subscribe + %li + %a{href: "#", data: {id: "unsubscribe"}} Unsubscribe = hidden_field_tag 'update[issues_ids]', [] = hidden_field_tag :state_event, params[:state_event] @@ -63,6 +69,7 @@ new LabelsSelect(); new MilestoneSelect(); new IssueStatusSelect(); + new SubscriptionSelect(); $('form.filter-form').on('submit', function (event) { event.preventDefault(); Turbolinks.visit(this.action + '&' + $(this).serialize()); diff --git a/spec/services/issues/bulk_update_service_spec.rb b/spec/services/issues/bulk_update_service_spec.rb index 4a689e64dc5..ba3a4dfc048 100644 --- a/spec/services/issues/bulk_update_service_spec.rb +++ b/spec/services/issues/bulk_update_service_spec.rb @@ -262,4 +262,42 @@ describe Issues::BulkUpdateService, services: true do end end end + + describe :subscribe_issues do + let(:issues) { create_list(:issue, 5, project: project) } + let(:params) do + { + subscription_event: 'subscribe', + issues_ids: issues.map(&:id).join(',') + } + end + + it 'subscribes the given user' do + issues.each do |issue| + expect(issue.subscribed?(user)).to be_truthy + end + end + end + + describe :unsubscribe_issues do + let(:issues) { create_list(:closed_issue, 5, project: project) } + let(:params) do + { + subscription_event: 'unsubscribe', + issues_ids: issues.map(&:id).join(',') + } + end + + before do + issues.each do |issue| + issue.subscriptions.create(user: user, subscribed: true) + end + end + + it 'unsubscribes the given user' do + issues.each do |issue| + expect(issue.subscribed?(user)).to be_falsey + end + end + end end -- cgit v1.2.1 From c4ea394736f98aebd6b370d75a5b3556206ce09d Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 14 Jul 2016 22:43:49 -0700 Subject: use %(...) and %[...] in favor of %<...> --- app/helpers/blob_helper.rb | 2 +- lib/banzai/filter/syntax_highlight_filter.rb | 4 ++-- lib/rouge/formatters/html_gitlab.rb | 4 ++-- spec/helpers/blob_helper_spec.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index 39f9f935d31..abe115d8c68 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -1,7 +1,7 @@ module BlobHelper def highlight(blob_name, blob_content, repository: nil, plain: false) highlighted = Gitlab::Highlight.highlight(blob_name, blob_content, plain: plain, repository: repository) - raw %<
#{highlighted}
> + raw %(
#{highlighted}
) end def no_highlight_files diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index 17f9164bcb7..028edef704b 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -25,9 +25,9 @@ module Banzai begin highlighted = '' - highlighted << %<
>
+          highlighted << %(
)
           highlighted << formatter.format(lexer.lex(code))
-          highlighted << %<
> + highlighted << %(
) rescue # Gracefully handle syntax highlighter bugs/errors to ensure # users can still access an issue/comment/etc. diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index b76cf14a536..f818dc78d34 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -17,9 +17,9 @@ module Rouge yield "\n" unless is_first is_first = false - yield %<> + yield %() line.each { |token, value| yield span(token, value) } - yield %<> + yield %() @line_number += 1 end diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb index e5dfa61fa6a..bd0108f9938 100644 --- a/spec/helpers/blob_helper_spec.rb +++ b/spec/helpers/blob_helper_spec.rb @@ -17,7 +17,7 @@ describe BlobHelper do describe '#highlight' do it 'should return plaintext for unknown lexer context' do result = helper.highlight(blob_name, no_context_content) - expect(result).to eq(%<
:type "assem"))
>) + expect(result).to eq(%[
:type "assem"))
]) end it 'should highlight single block' do -- cgit v1.2.1 From 65549a5866da6ceaf7ee4052736077879b5e641d Mon Sep 17 00:00:00 2001 From: James Lopez Date: Fri, 15 Jul 2016 12:47:06 +0200 Subject: add project name and namespace to filename on project export added changelog --- CHANGELOG | 1 + .../projects/import_export/export_service.rb | 2 +- lib/gitlab/import_export.rb | 7 +++++++ lib/gitlab/import_export/saver.rb | 5 +++-- spec/lib/gitlab/import_export/import_export_spec.rb | 21 +++++++++++++++++++++ 5 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 spec/lib/gitlab/import_export/import_export_spec.rb diff --git a/CHANGELOG b/CHANGELOG index 51f1db07e8b..49792d2950f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -93,6 +93,7 @@ v 8.10.0 (unreleased) - Redesign Builds and Pipelines pages - Change status color and icon for running builds - Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.` + - Project export filename now includes the project and namespace path v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 diff --git a/app/services/projects/import_export/export_service.rb b/app/services/projects/import_export/export_service.rb index 6afc048576d..998789d64d2 100644 --- a/app/services/projects/import_export/export_service.rb +++ b/app/services/projects/import_export/export_service.rb @@ -10,7 +10,7 @@ module Projects def save_all if [version_saver, project_tree_saver, uploads_saver, repo_saver, wiki_repo_saver].all?(&:save) - Gitlab::ImportExport::Saver.save(shared: @shared) + Gitlab::ImportExport::Saver.save(project: project, shared: @shared) notify_success else cleanup_and_notify diff --git a/lib/gitlab/import_export.rb b/lib/gitlab/import_export.rb index 588647e5adb..bab2ea73c4f 100644 --- a/lib/gitlab/import_export.rb +++ b/lib/gitlab/import_export.rb @@ -3,6 +3,7 @@ module Gitlab extend self VERSION = '0.1.1' + FILENAME_LIMIT = 50 def export_path(relative_path:) File.join(storage_path, relative_path) @@ -28,6 +29,12 @@ module Gitlab 'VERSION' end + def export_filename(project:) + basename = "#{Time.now.strftime('%Y-%m-%d_%H-%M-%3N')}_#{project.namespace.path}_#{project.path}" + + "#{basename[0..FILENAME_LIMIT]}_export.tar.gz" + end + def version VERSION end diff --git a/lib/gitlab/import_export/saver.rb b/lib/gitlab/import_export/saver.rb index 6a60b65071f..6130c124dd1 100644 --- a/lib/gitlab/import_export/saver.rb +++ b/lib/gitlab/import_export/saver.rb @@ -7,7 +7,8 @@ module Gitlab new(*args).save end - def initialize(shared:) + def initialize(project:, shared:) + @project = project @shared = shared end @@ -36,7 +37,7 @@ module Gitlab end def archive_file - @archive_file ||= File.join(@shared.export_path, '..', "#{Time.now.strftime('%Y-%m-%d_%H-%M-%3N')}_project_export.tar.gz") + @archive_file ||= File.join(@shared.export_path, '..', Gitlab::ImportExport.export_filename(project: @project)) end end end diff --git a/spec/lib/gitlab/import_export/import_export_spec.rb b/spec/lib/gitlab/import_export/import_export_spec.rb new file mode 100644 index 00000000000..d6409a29550 --- /dev/null +++ b/spec/lib/gitlab/import_export/import_export_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper' + +describe Gitlab::ImportExport, services: true do + describe 'export filename' do + let(:project) { create(:project, :public, path: 'project-path') } + + it 'contains the project path' do + expect(described_class.export_filename(project: project)).to include(project.path) + end + + it 'contains the namespace path' do + expect(described_class.export_filename(project: project)).to include(project.namespace.path) + end + + it 'does not go over a certain length' do + project.path = 'a' * 100 + + expect(described_class.export_filename(project: project).length).to be < 70 + end + end +end -- cgit v1.2.1 From 86f39fece2273319e2c960d96b131924a9fbdc3c Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 14:01:34 +0200 Subject: Refactor LFS specs to use requests instead of LfsRouter --- spec/lib/gitlab/lfs/lfs_router_spec.rb | 730 ------------------------------- spec/requests/lfs_http_spec.rb | 763 +++++++++++++++++++++++++++++++++ 2 files changed, 763 insertions(+), 730 deletions(-) delete mode 100644 spec/lib/gitlab/lfs/lfs_router_spec.rb create mode 100644 spec/requests/lfs_http_spec.rb diff --git a/spec/lib/gitlab/lfs/lfs_router_spec.rb b/spec/lib/gitlab/lfs/lfs_router_spec.rb deleted file mode 100644 index 659facd6c19..00000000000 --- a/spec/lib/gitlab/lfs/lfs_router_spec.rb +++ /dev/null @@ -1,730 +0,0 @@ -require 'spec_helper' - -describe Gitlab::Lfs::Router, lib: true do - let(:project) { create(:project) } - let(:public_project) { create(:project, :public) } - let(:forked_project) { fork_project(public_project, user) } - - let(:user) { create(:user) } - let(:user_two) { create(:user) } - let!(:lfs_object) { create(:lfs_object, :with_file) } - - let(:request) { Rack::Request.new(env) } - let(:env) do - { - 'rack.input' => '', - 'REQUEST_METHOD' => 'GET', - } - end - - let(:lfs_router_auth) { new_lfs_router(project, user: user) } - let(:lfs_router_ci_auth) { new_lfs_router(project, ci: true) } - let(:lfs_router_noauth) { new_lfs_router(project) } - let(:lfs_router_public_auth) { new_lfs_router(public_project, user: user) } - let(:lfs_router_public_ci_auth) { new_lfs_router(public_project, ci: true) } - let(:lfs_router_public_noauth) { new_lfs_router(public_project) } - let(:lfs_router_forked_noauth) { new_lfs_router(forked_project) } - let(:lfs_router_forked_auth) { new_lfs_router(forked_project, user: user_two) } - let(:lfs_router_forked_ci_auth) { new_lfs_router(forked_project, ci: true) } - - let(:sample_oid) { "b68143e6463773b1b6c6fd009a76c32aeec041faff32ba2ed42fd7f708a17f80" } - let(:sample_size) { 499013 } - let(:respond_with_deprecated) {[ 501, { "Content-Type" => "application/json; charset=utf-8" }, ["{\"message\":\"Server supports batch API only, please update your Git LFS client to version 1.0.1 and up.\",\"documentation_url\":\"#{Gitlab.config.gitlab.url}/help\"}"]]} - let(:respond_with_disabled) {[ 501, { "Content-Type" => "application/json; charset=utf-8" }, ["{\"message\":\"Git LFS is not enabled on this GitLab server, contact your admin.\",\"documentation_url\":\"#{Gitlab.config.gitlab.url}/help\"}"]]} - - describe 'when lfs is disabled' do - before do - allow(Gitlab.config.lfs).to receive(:enabled).and_return(false) - env['REQUEST_METHOD'] = 'POST' - body = { - 'objects' => [ - { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', - 'size' => 1575078 - }, - { 'oid' => sample_oid, - 'size' => sample_size - } - ], - 'operation' => 'upload' - }.to_json - env['rack.input'] = StringIO.new(body) - env["PATH_INFO"] = "#{project.repository.path_with_namespace}.git/info/lfs/objects/batch" - end - - it 'responds with 501' do - expect(lfs_router_auth.try_call).to match_array(respond_with_disabled) - end - end - - describe 'when fetching lfs object using deprecated API' do - before do - enable_lfs - env["PATH_INFO"] = "#{project.repository.path_with_namespace}.git/info/lfs/objects/#{sample_oid}" - end - - it 'responds with 501' do - expect(lfs_router_auth.try_call).to match_array(respond_with_deprecated) - end - end - - describe 'when fetching lfs object' do - before do - enable_lfs - env['HTTP_ACCEPT'] = "application/vnd.git-lfs+json; charset=utf-8" - env["PATH_INFO"] = "#{project.repository.path_with_namespace}.git/gitlab-lfs/objects/#{sample_oid}" - end - - describe 'and request comes from gitlab-workhorse' do - context 'without user being authorized' do - it "responds with status 401" do - expect(lfs_router_noauth.try_call.first).to eq(401) - end - end - - context 'with required headers' do - before do - project.lfs_objects << lfs_object - env['HTTP_X_SENDFILE_TYPE'] = "X-Sendfile" - end - - context 'when user does not have project access' do - it "responds with status 403" do - expect(lfs_router_auth.try_call.first).to eq(403) - end - end - - context 'when user has project access' do - before do - project.team << [user, :master] - end - - it "responds with status 200" do - expect(lfs_router_auth.try_call.first).to eq(200) - end - - it "responds with the file location" do - expect(lfs_router_auth.try_call[1]['Content-Type']).to eq("application/octet-stream") - expect(lfs_router_auth.try_call[1]['X-Sendfile']).to eq(lfs_object.file.path) - end - end - - context 'when CI is authorized' do - it "responds with status 200" do - expect(lfs_router_ci_auth.try_call.first).to eq(200) - end - - it "responds with the file location" do - expect(lfs_router_ci_auth.try_call[1]['Content-Type']).to eq("application/octet-stream") - expect(lfs_router_ci_auth.try_call[1]['X-Sendfile']).to eq(lfs_object.file.path) - end - end - end - - context 'without required headers' do - it "responds with status 403" do - expect(lfs_router_auth.try_call.first).to eq(403) - end - end - end - end - - describe 'when handling lfs request using deprecated API' do - before do - enable_lfs - env['REQUEST_METHOD'] = 'POST' - env["PATH_INFO"] = "#{project.repository.path_with_namespace}.git/info/lfs/objects" - end - - it 'responds with 501' do - expect(lfs_router_auth.try_call).to match_array(respond_with_deprecated) - end - end - - describe 'when handling lfs batch request' do - before do - enable_lfs - env['REQUEST_METHOD'] = 'POST' - env['PATH_INFO'] = "#{project.repository.path_with_namespace}.git/info/lfs/objects/batch" - end - - describe 'download' do - before do - body = { 'operation' => 'download', - 'objects' => [ - { 'oid' => sample_oid, - 'size' => sample_size - }] - }.to_json - env['rack.input'] = StringIO.new(body) - end - - shared_examples 'an authorized requests' do - context 'when downloading an lfs object that is assigned to our project' do - before do - project.lfs_objects << lfs_object - end - - it 'responds with status 200 and href to download' do - response = router.try_call - expect(response.first).to eq(200) - response_body = ActiveSupport::JSON.decode(response.last.first) - - expect(response_body).to eq('objects' => [ - { 'oid' => sample_oid, - 'size' => sample_size, - 'actions' => { - 'download' => { - 'href' => "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", - 'header' => { 'Authorization' => auth } - } - } - }]) - end - end - - context 'when downloading an lfs object that is assigned to other project' do - before do - public_project.lfs_objects << lfs_object - end - - it 'responds with status 200 and error message' do - response = router.try_call - expect(response.first).to eq(200) - response_body = ActiveSupport::JSON.decode(response.last.first) - - expect(response_body).to eq('objects' => [ - { 'oid' => sample_oid, - 'size' => sample_size, - 'error' => { - 'code' => 404, - 'message' => "Object does not exist on the server or you don't have permissions to access it", - } - }]) - end - end - - context 'when downloading a lfs object that does not exist' do - before do - body = { 'operation' => 'download', - 'objects' => [ - { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', - 'size' => 1575078 - }] - }.to_json - env['rack.input'] = StringIO.new(body) - end - - it "responds with status 200 and error message" do - response = router.try_call - expect(response.first).to eq(200) - response_body = ActiveSupport::JSON.decode(response.last.first) - - expect(response_body).to eq('objects' => [ - { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', - 'size' => 1575078, - 'error' => { - 'code' => 404, - 'message' => "Object does not exist on the server or you don't have permissions to access it", - } - }]) - end - end - - context 'when downloading one new and one existing lfs object' do - before do - body = { 'operation' => 'download', - 'objects' => [ - { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', - 'size' => 1575078 - }, - { 'oid' => sample_oid, - 'size' => sample_size - } - ] - }.to_json - env['rack.input'] = StringIO.new(body) - project.lfs_objects << lfs_object - end - - it "responds with status 200 with upload hypermedia link for the new object" do - response = router.try_call - expect(response.first).to eq(200) - response_body = ActiveSupport::JSON.decode(response.last.first) - - expect(response_body).to eq('objects' => [ - { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', - 'size' => 1575078, - 'error' => { - 'code' => 404, - 'message' => "Object does not exist on the server or you don't have permissions to access it", - } - }, - { 'oid' => sample_oid, - 'size' => sample_size, - 'actions' => { - 'download' => { - 'href' => "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", - 'header' => { 'Authorization' => auth } - } - } - }]) - end - end - end - - context 'when user is authenticated' do - let(:auth) { authorize(user) } - - before do - env["HTTP_AUTHORIZATION"] = auth - project.team << [user, role] - end - - it_behaves_like 'an authorized requests' do - let(:role) { :reporter } - let(:router) { lfs_router_auth } - end - - context 'when user does is not member of the project' do - let(:role) { :guest } - - it 'responds with 403' do - expect(lfs_router_auth.try_call.first).to eq(403) - end - end - - context 'when user does not have download access' do - let(:role) { :guest } - - it 'responds with 403' do - expect(lfs_router_auth.try_call.first).to eq(403) - end - end - end - - context 'when CI is authorized' do - let(:auth) { 'gitlab-ci-token:password' } - - before do - env["HTTP_AUTHORIZATION"] = auth - end - - it_behaves_like 'an authorized requests' do - let(:router) { lfs_router_ci_auth } - end - end - - context 'when user is not authenticated' do - describe 'is accessing public project' do - before do - public_project.lfs_objects << lfs_object - end - - it 'responds with status 200 and href to download' do - response = lfs_router_public_noauth.try_call - expect(response.first).to eq(200) - response_body = ActiveSupport::JSON.decode(response.last.first) - - expect(response_body).to eq('objects' => [ - { 'oid' => sample_oid, - 'size' => sample_size, - 'actions' => { - 'download' => { - 'href' => "#{public_project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", - 'header' => {} - } - } - }]) - end - end - - describe 'is accessing non-public project' do - before do - project.lfs_objects << lfs_object - end - - it 'responds with authorization required' do - expect(lfs_router_noauth.try_call.first).to eq(401) - end - end - end - end - - describe 'upload' do - before do - body = { 'operation' => 'upload', - 'objects' => [ - { 'oid' => sample_oid, - 'size' => sample_size - }] - }.to_json - env['rack.input'] = StringIO.new(body) - end - - describe 'when request is authenticated' do - describe 'when user has project push access' do - before do - @auth = authorize(user) - env["HTTP_AUTHORIZATION"] = @auth - project.team << [user, :developer] - end - - context 'when pushing an lfs object that already exists' do - before do - public_project.lfs_objects << lfs_object - end - - it "responds with status 200 and links the object to the project" do - response_body = lfs_router_auth.try_call.last - response = ActiveSupport::JSON.decode(response_body.first) - - expect(response['objects']).to be_kind_of(Array) - expect(response['objects'].first['oid']).to eq(sample_oid) - expect(response['objects'].first['size']).to eq(sample_size) - expect(lfs_object.projects.pluck(:id)).not_to include(project.id) - expect(lfs_object.projects.pluck(:id)).to include(public_project.id) - expect(response['objects'].first['actions']['upload']['href']).to eq("#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}.git/gitlab-lfs/objects/#{sample_oid}/#{sample_size}") - expect(response['objects'].first['actions']['upload']['header']).to eq('Authorization' => @auth) - end - end - - context 'when pushing a lfs object that does not exist' do - before do - body = { 'operation' => 'upload', - 'objects' => [ - { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', - 'size' => 1575078 - }] - }.to_json - env['rack.input'] = StringIO.new(body) - end - - it "responds with status 200 and upload hypermedia link" do - response = lfs_router_auth.try_call - expect(response.first).to eq(200) - - response_body = ActiveSupport::JSON.decode(response.last.first) - expect(response_body['objects']).to be_kind_of(Array) - expect(response_body['objects'].first['oid']).to eq("91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897") - expect(response_body['objects'].first['size']).to eq(1575078) - expect(lfs_object.projects.pluck(:id)).not_to include(project.id) - expect(response_body['objects'].first['actions']['upload']['href']).to eq("#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}.git/gitlab-lfs/objects/91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897/1575078") - expect(response_body['objects'].first['actions']['upload']['header']).to eq('Authorization' => @auth) - end - end - - context 'when pushing one new and one existing lfs object' do - before do - body = { 'operation' => 'upload', - 'objects' => [ - { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', - 'size' => 1575078 - }, - { 'oid' => sample_oid, - 'size' => sample_size - } - ] - }.to_json - env['rack.input'] = StringIO.new(body) - project.lfs_objects << lfs_object - end - - it "responds with status 200 with upload hypermedia link for the new object" do - response = lfs_router_auth.try_call - expect(response.first).to eq(200) - - response_body = ActiveSupport::JSON.decode(response.last.first) - expect(response_body['objects']).to be_kind_of(Array) - - expect(response_body['objects'].first['oid']).to eq("91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897") - expect(response_body['objects'].first['size']).to eq(1575078) - expect(response_body['objects'].first['actions']['upload']['href']).to eq("#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}.git/gitlab-lfs/objects/91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897/1575078") - expect(response_body['objects'].first['actions']['upload']['header']).to eq("Authorization" => @auth) - - expect(response_body['objects'].last['oid']).to eq(sample_oid) - expect(response_body['objects'].last['size']).to eq(sample_size) - expect(response_body['objects'].last).not_to have_key('actions') - end - end - end - - context 'when user does not have push access' do - it 'responds with 403' do - expect(lfs_router_auth.try_call.first).to eq(403) - end - end - - context 'when CI is authorized' do - it 'responds with 401' do - expect(lfs_router_ci_auth.try_call.first).to eq(401) - end - end - end - - context 'when user is not authenticated' do - context 'when user has push access' do - before do - project.team << [user, :master] - end - - it "responds with status 401" do - expect(lfs_router_public_noauth.try_call.first).to eq(401) - end - end - - context 'when user does not have push access' do - it "responds with status 401" do - expect(lfs_router_public_noauth.try_call.first).to eq(401) - end - end - end - - context 'when CI is authorized' do - let(:auth) { 'gitlab-ci-token:password' } - - before do - env["HTTP_AUTHORIZATION"] = auth - end - - it "responds with status 403" do - expect(lfs_router_public_ci_auth.try_call.first).to eq(401) - end - end - end - - describe 'unsupported' do - before do - body = { 'operation' => 'other', - 'objects' => [ - { 'oid' => sample_oid, - 'size' => sample_size - }] - }.to_json - env['rack.input'] = StringIO.new(body) - end - - it 'responds with status 404' do - expect(lfs_router_public_noauth.try_call.first).to eq(404) - end - end - end - - describe 'when pushing a lfs object' do - before do - enable_lfs - env['REQUEST_METHOD'] = 'PUT' - end - - shared_examples 'unauthorized' do - context 'and request is sent by gitlab-workhorse to authorize the request' do - before do - header_for_upload_authorize(router.project) - end - - it 'responds with status 401' do - expect(router.try_call.first).to eq(401) - end - end - - context 'and request is sent by gitlab-workhorse to finalize the upload' do - before do - headers_for_upload_finalize(router.project) - end - - it 'responds with status 401' do - expect(router.try_call.first).to eq(401) - end - end - - context 'and request is sent with a malformed headers' do - before do - env["PATH_INFO"] = "#{router.project.repository.path_with_namespace}.git/gitlab-lfs/objects/#{sample_oid}/#{sample_size}" - env["HTTP_X_GITLAB_LFS_TMP"] = "cat /etc/passwd" - end - - it 'does not recognize it as a valid lfs command' do - expect(router.try_call).to eq(nil) - end - end - end - - shared_examples 'forbidden' do - context 'and request is sent by gitlab-workhorse to authorize the request' do - before do - header_for_upload_authorize(router.project) - end - - it 'responds with 403' do - expect(router.try_call.first).to eq(403) - end - end - - context 'and request is sent by gitlab-workhorse to finalize the upload' do - before do - headers_for_upload_finalize(router.project) - end - - it 'responds with 403' do - expect(router.try_call.first).to eq(403) - end - end - end - - describe 'to one project' do - describe 'when user is authenticated' do - describe 'when user has push access to the project' do - before do - project.team << [user, :developer] - end - - context 'and request is sent by gitlab-workhorse to authorize the request' do - before do - header_for_upload_authorize(project) - end - - it 'responds with status 200, location of lfs store and object details' do - json_response = ActiveSupport::JSON.decode(lfs_router_auth.try_call.last.first) - - expect(lfs_router_auth.try_call.first).to eq(200) - expect(json_response['StoreLFSPath']).to eq("#{Gitlab.config.shared.path}/lfs-objects/tmp/upload") - expect(json_response['LfsOid']).to eq(sample_oid) - expect(json_response['LfsSize']).to eq(sample_size) - end - end - - context 'and request is sent by gitlab-workhorse to finalize the upload' do - before do - headers_for_upload_finalize(project) - end - - it 'responds with status 200 and lfs object is linked to the project' do - expect(lfs_router_auth.try_call.first).to eq(200) - expect(lfs_object.projects.pluck(:id)).to include(project.id) - end - end - end - - describe 'and user does not have push access' do - let(:router) { lfs_router_auth } - - it_behaves_like 'forbidden' - end - end - - context 'when CI is authenticated' do - let(:router) { lfs_router_ci_auth } - - it_behaves_like 'unauthorized' - end - - context 'for unauthenticated' do - let(:router) { new_lfs_router(project) } - - it_behaves_like 'unauthorized' - end - end - - describe 'to a forked project' do - let(:forked_project) { fork_project(public_project, user) } - - describe 'when user is authenticated' do - describe 'when user has push access to the project' do - before do - forked_project.team << [user_two, :developer] - end - - context 'and request is sent by gitlab-workhorse to authorize the request' do - before do - header_for_upload_authorize(forked_project) - end - - it 'responds with status 200, location of lfs store and object details' do - json_response = ActiveSupport::JSON.decode(lfs_router_forked_auth.try_call.last.first) - - expect(lfs_router_forked_auth.try_call.first).to eq(200) - expect(json_response['StoreLFSPath']).to eq("#{Gitlab.config.shared.path}/lfs-objects/tmp/upload") - expect(json_response['LfsOid']).to eq(sample_oid) - expect(json_response['LfsSize']).to eq(sample_size) - end - end - - context 'and request is sent by gitlab-workhorse to finalize the upload' do - before do - headers_for_upload_finalize(forked_project) - end - - it 'responds with status 200 and lfs object is linked to the source project' do - expect(lfs_router_forked_auth.try_call.first).to eq(200) - expect(lfs_object.projects.pluck(:id)).to include(public_project.id) - end - end - end - - describe 'and user does not have push access' do - let(:router) { lfs_router_forked_auth } - - it_behaves_like 'forbidden' - end - end - - context 'when CI is authenticated' do - let(:router) { lfs_router_forked_ci_auth } - - it_behaves_like 'unauthorized' - end - - context 'for unauthenticated' do - let(:router) { lfs_router_forked_noauth } - - it_behaves_like 'unauthorized' - end - - describe 'and second project not related to fork or a source project' do - let(:second_project) { create(:project) } - let(:lfs_router_second_project) { new_lfs_router(second_project, user: user) } - - before do - public_project.lfs_objects << lfs_object - headers_for_upload_finalize(second_project) - end - - context 'when pushing the same lfs object to the second project' do - before do - second_project.team << [user, :master] - end - - it 'responds with 200 and links the lfs object to the project' do - expect(lfs_router_second_project.try_call.first).to eq(200) - expect(lfs_object.projects.pluck(:id)).to include(second_project.id, public_project.id) - end - end - end - end - end - - def enable_lfs - allow(Gitlab.config.lfs).to receive(:enabled).and_return(true) - end - - def authorize(user) - ActionController::HttpAuthentication::Basic.encode_credentials(user.username, user.password) - end - - def new_lfs_router(project, user: nil, ci: false) - Gitlab::Lfs::Router.new(project, user, ci, request) - end - - def header_for_upload_authorize(project) - env["PATH_INFO"] = "#{project.repository.path_with_namespace}.git/gitlab-lfs/objects/#{sample_oid}/#{sample_size}/authorize" - end - - def headers_for_upload_finalize(project) - env["PATH_INFO"] = "#{project.repository.path_with_namespace}.git/gitlab-lfs/objects/#{sample_oid}/#{sample_size}" - env["HTTP_X_GITLAB_LFS_TMP"] = "#{sample_oid}6e561c9d4" - end - - def fork_project(project, user, object = nil) - allow(RepositoryForkWorker).to receive(:perform_async).and_return(true) - Projects::ForkService.new(project, user, {}).execute - end -end diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb new file mode 100644 index 00000000000..d862cb5b0b4 --- /dev/null +++ b/spec/requests/lfs_http_spec.rb @@ -0,0 +1,763 @@ +require 'spec_helper' + +describe Gitlab::Lfs::Router do + let(:user) { create(:user) } + let!(:lfs_object) { create(:lfs_object, :with_file) } + + let(:headers) do + { + 'Authorization' => authorization, + 'X-Sendfile-Type' => sendfile + }.compact + end + let(:authorization) { } + let(:sendfile) { } + + let(:sample_oid) { lfs_object.oid } + let(:sample_size) { lfs_object.size } + + describe 'when lfs is disabled' do + let(:project) { create(:empty_project) } + let(:body) do + { + 'objects' => [ + { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', + 'size' => 1575078 + }, + { 'oid' => sample_oid, + 'size' => sample_size + } + ], + 'operation' => 'upload' + } + end + + before do + allow(Gitlab.config.lfs).to receive(:enabled).and_return(false) + post_json "#{project.http_url_to_repo}/info/lfs/objects/batch", body, headers + end + + it 'responds with 501' do + expect(response).to have_http_status(501) + expect(json_response).to include('message' => 'Git LFS is not enabled on this GitLab server, contact your admin.') + end + end + + describe 'deprecated API' do + let(:project) { create(:empty_project) } + + before do + enable_lfs + end + + shared_examples 'a deprecated' do + it 'responds with 501' do + expect(response).to have_http_status(501) + end + + it 'returns deprecated message' do + expect(json_response).to include('message' => 'Server supports batch API only, please update your Git LFS client to version 1.0.1 and up.') + end + end + + context 'when fetching lfs object using deprecated API' do + let(:authorization) { authorize_user } + + before do + get "#{project.http_url_to_repo}/info/lfs/objects/#{sample_oid}", nil, headers + end + + it_behaves_like 'a deprecated' + end + + context 'when handling lfs request using deprecated API' do + before do + post_json "#{project.http_url_to_repo}/info/lfs/objects", nil, headers + end + + it_behaves_like 'a deprecated' + end + end + + describe 'when fetching lfs object' do + let(:project) { create(:empty_project) } + let(:update_permissions) { } + + before do + enable_lfs + update_permissions + get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", nil, headers + end + + context 'and request comes from gitlab-workhorse' do + context 'without user being authorized' do + it 'responds with status 401' do + expect(response).to have_http_status(401) + end + end + + context 'with required headers' do + shared_examples 'responds with a file' do + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'responds with the file location' do + expect(response.headers['Content-Type']).to eq('application/octet-stream') + expect(response.headers['X-Sendfile']).to eq(lfs_object.file.path) + end + end + + context 'with user is authorized' do + let(:authorization) { authorize_user } + let(:sendfile) { 'X-Sendfile' } + + context 'and does not have project access' do + let(:update_permissions) do + project.lfs_objects << lfs_object + end + + it 'responds with status 403' do + expect(response).to have_http_status(403) + end + end + + context 'and does have project access' do + let(:update_permissions) do + project.team << [user, :master] + project.lfs_objects << lfs_object + end + + it_behaves_like 'responds with a file' + end + end + + context 'when CI is authorized' do + let(:authorization) { authorize_ci_project } + + it_behaves_like 'responds with a file' + end + end + + context 'without required headers' do + let(:authorization) { authorize_user } + + it 'responds with status 403' do + expect(response).to have_http_status(403) + end + end + end + end + + describe 'when handling lfs batch request' do + let(:update_lfs_permissions) { } + let(:update_user_permissions) { } + + before do + enable_lfs + update_lfs_permissions + update_user_permissions + post_json "#{project.http_url_to_repo}/info/lfs/objects/batch", body, headers + end + + describe 'download' do + let(:project) { create(:empty_project) } + let(:body) do + { 'operation' => 'download', + 'objects' => [ + { 'oid' => sample_oid, + 'size' => sample_size + }] + } + end + + shared_examples 'an authorized requests' do + context 'when downloading an lfs object that is assigned to our project' do + let(:update_lfs_permissions) do + project.lfs_objects << lfs_object + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'with href to download' do + expect(json_response).to eq('objects' => [ + { 'oid' => sample_oid, + 'size' => sample_size, + 'actions' => { + 'download' => { + 'href' => "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", + 'header' => { 'Authorization' => authorization } + } + } + }]) + end + end + + context 'when downloading an lfs object that is assigned to other project' do + let(:other_project) { create(:empty_project) } + let(:update_lfs_permissions) do + other_project.lfs_objects << lfs_object + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'with href to download' do + expect(json_response).to eq('objects' => [ + { 'oid' => sample_oid, + 'size' => sample_size, + 'error' => { + 'code' => 404, + 'message' => "Object does not exist on the server or you don't have permissions to access it", + } + }]) + end + end + + context 'when downloading a lfs object that does not exist' do + let(:body) do + { 'operation' => 'download', + 'objects' => [ + { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', + 'size' => 1575078 + }] + } + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'with an 404 for specific object' do + expect(json_response).to eq('objects' => [ + { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', + 'size' => 1575078, + 'error' => { + 'code' => 404, + 'message' => "Object does not exist on the server or you don't have permissions to access it", + } + }]) + end + end + + context 'when downloading one new and one existing lfs object' do + let(:body) do + { 'operation' => 'download', + 'objects' => [ + { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', + 'size' => 1575078 + }, + { 'oid' => sample_oid, + 'size' => sample_size + } + ] + } + end + + let(:update_lfs_permissions) do + project.lfs_objects << lfs_object + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'responds with upload hypermedia link for the new object' do + expect(json_response).to eq('objects' => [ + { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', + 'size' => 1575078, + 'error' => { + 'code' => 404, + 'message' => "Object does not exist on the server or you don't have permissions to access it", + } + }, + { 'oid' => sample_oid, + 'size' => sample_size, + 'actions' => { + 'download' => { + 'href' => "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", + 'header' => { 'Authorization' => authorization } + } + } + }]) + end + end + end + + context 'when user is authenticated' do + let(:authorization) { authorize_user } + + let(:update_user_permissions) do + project.team << [user, role] + end + + it_behaves_like 'an authorized requests' do + let(:role) { :reporter } + end + + context 'when user does is not member of the project' do + let(:role) { :guest } + + it 'responds with 403' do + expect(response).to have_http_status(403) + end + end + + context 'when user does not have download access' do + let(:role) { :guest } + + it 'responds with 403' do + expect(response).to have_http_status(403) + end + end + end + + context 'when CI is authorized' do + let(:authorization) { authorize_ci_project } + + it_behaves_like 'an authorized requests' + end + + context 'when user is not authenticated' do + describe 'is accessing public project' do + let(:project) { create(:project, :public) } + + let(:update_lfs_permissions) do + project.lfs_objects << lfs_object + end + + it 'responds with status 200 and href to download' do + expect(response).to have_http_status(200) + end + + it 'responds with status 200 and href to download' do + expect(json_response).to eq('objects' => [ + { 'oid' => sample_oid, + 'size' => sample_size, + 'actions' => { + 'download' => { + 'href' => "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", + 'header' => {} + } + } + }]) + end + end + + describe 'is accessing non-public project' do + let(:update_lfs_permissions) do + project.lfs_objects << lfs_object + end + + it 'responds with authorization required' do + expect(response).to have_http_status(401) + end + end + end + end + + describe 'upload' do + let(:project) { create(:project, :public) } + let(:body) do + { 'operation' => 'upload', + 'objects' => [ + { 'oid' => sample_oid, + 'size' => sample_size + }] + } + end + + describe 'when request is authenticated' do + describe 'when user has project push access' do + let(:authorization) { authorize_user } + + let(:update_user_permissions) do + project.team << [user, :developer] + end + + context 'when pushing an lfs object that already exists' do + let(:other_project) { create(:empty_project) } + let(:update_lfs_permissions) do + other_project.lfs_objects << lfs_object + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'responds with links the object to the project' do + expect(json_response['objects']).to be_kind_of(Array) + expect(json_response['objects'].first['oid']).to eq(sample_oid) + expect(json_response['objects'].first['size']).to eq(sample_size) + expect(lfs_object.projects.pluck(:id)).not_to include(project.id) + expect(lfs_object.projects.pluck(:id)).to include(other_project.id) + expect(json_response['objects'].first['actions']['upload']['href']).to eq("#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}") + expect(json_response['objects'].first['actions']['upload']['header']).to eq('Authorization' => authorization) + end + end + + context 'when pushing a lfs object that does not exist' do + let(:body) do + { 'operation' => 'upload', + 'objects' => [ + { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', + 'size' => 1575078 + }] + } + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'responds with upload hypermedia link' do + expect(json_response['objects']).to be_kind_of(Array) + expect(json_response['objects'].first['oid']).to eq("91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897") + expect(json_response['objects'].first['size']).to eq(1575078) + expect(json_response['objects'].first['actions']['upload']['href']).to eq("#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}.git/gitlab-lfs/objects/91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897/1575078") + expect(json_response['objects'].first['actions']['upload']['header']).to eq('Authorization' => authorization) + end + end + + context 'when pushing one new and one existing lfs object' do + let(:body) do + { 'operation' => 'upload', + 'objects' => [ + { 'oid' => '91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897', + 'size' => 1575078 + }, + { 'oid' => sample_oid, + 'size' => sample_size + } + ] + } + end + + let(:update_lfs_permissions) do + project.lfs_objects << lfs_object + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'responds with upload hypermedia link for the new object' do + expect(json_response['objects']).to be_kind_of(Array) + + expect(json_response['objects'].first['oid']).to eq("91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897") + expect(json_response['objects'].first['size']).to eq(1575078) + expect(json_response['objects'].first['actions']['upload']['href']).to eq("#{project.http_url_to_repo}/gitlab-lfs/objects/91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897/1575078") + expect(json_response['objects'].first['actions']['upload']['header']).to eq("Authorization" => authorization) + + expect(json_response['objects'].last['oid']).to eq(sample_oid) + expect(json_response['objects'].last['size']).to eq(sample_size) + expect(json_response['objects'].last).not_to have_key('actions') + end + end + end + + context 'when user does not have push access' do + let(:authorization) { authorize_user } + + it 'responds with 403' do + expect(response).to have_http_status(403) + end + end + + context 'when CI is authorized' do + let(:authorization) { authorize_ci_project } + + it 'responds with 401' do + expect(response).to have_http_status(401) + end + end + end + + context 'when user is not authenticated' do + context 'when user has push access' do + let(:update_user_permissions) do + project.team << [user, :master] + end + + it 'responds with status 401' do + expect(response).to have_http_status(401) + end + end + + context 'when user does not have push access' do + it 'responds with status 401' do + expect(response).to have_http_status(401) + end + end + end + + context 'when CI is authorized' do + let(:authorization) { authorize_ci_project } + + it 'responds with status 403' do + expect(response).to have_http_status(401) + end + end + end + + describe 'unsupported' do + let(:project) { create(:empty_project) } + let(:body) do + { 'operation' => 'other', + 'objects' => [ + { 'oid' => sample_oid, + 'size' => sample_size + }] + } + end + + it 'responds with status 404' do + expect(response).to have_http_status(404) + end + end + end + + describe 'when pushing a lfs object' do + before do + enable_lfs + end + + shared_examples 'unauthorized' do + context 'and request is sent by gitlab-workhorse to authorize the request' do + before do + put_authorize + end + + it 'responds with status 401' do + expect(response).to have_http_status(401) + end + end + + context 'and request is sent by gitlab-workhorse to finalize the upload' do + before do + put_finalize + end + + it 'responds with status 401' do + expect(response).to have_http_status(401) + end + end + + context 'and request is sent with a malformed headers' do + before do + put_finalize('cat /etc/passwd') + end + + it 'does not recognize it as a valid lfs command' do + expect(response).to have_http_status(401) + end + end + end + + shared_examples 'forbidden' do + context 'and request is sent by gitlab-workhorse to authorize the request' do + before do + put_authorize + end + + it 'responds with 403' do + expect(response).to have_http_status(403) + end + end + + context 'and request is sent by gitlab-workhorse to finalize the upload' do + before do + put_finalize + end + + it 'responds with 403' do + expect(response).to have_http_status(403) + end + end + end + + describe 'to one project' do + let(:project) { create(:empty_project) } + + describe 'when user is authenticated' do + let(:authorization) { authorize_user } + + describe 'when user has push access to the project' do + before do + project.team << [user, :developer] + end + + context 'and request is sent by gitlab-workhorse to authorize the request' do + before do + put_authorize + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'responds with status 200, location of lfs store and object details' do + expect(json_response['StoreLFSPath']).to eq("#{Gitlab.config.shared.path}/lfs-objects/tmp/upload") + expect(json_response['LfsOid']).to eq(sample_oid) + expect(json_response['LfsSize']).to eq(sample_size) + end + end + + context 'and request is sent by gitlab-workhorse to finalize the upload' do + before do + put_finalize + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'lfs object is linked to the project' do + expect(lfs_object.projects.pluck(:id)).to include(project.id) + end + end + end + + describe 'and user does not have push access' do + it_behaves_like 'forbidden' + end + end + + context 'when CI is authenticated' do + let(:authorization) { authorize_ci_project } + + it_behaves_like 'unauthorized' + end + + context 'for unauthenticated' do + it_behaves_like 'unauthorized' + end + end + + describe 'to a forked project' do + let(:upstream_project) { create(:project, :public) } + let(:project_owner) { create(:user) } + let(:project) { fork_project(upstream_project, project_owner) } + + describe 'when user is authenticated' do + let(:authorization) { authorize_user } + + describe 'when user has push access to the project' do + before do + project.team << [user, :developer] + end + + context 'and request is sent by gitlab-workhorse to authorize the request' do + before do + put_authorize + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'with location of lfs store and object details' do + expect(json_response['StoreLFSPath']).to eq("#{Gitlab.config.shared.path}/lfs-objects/tmp/upload") + expect(json_response['LfsOid']).to eq(sample_oid) + expect(json_response['LfsSize']).to eq(sample_size) + end + end + + context 'and request is sent by gitlab-workhorse to finalize the upload' do + before do + put_finalize + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'lfs object is linked to the source project' do + expect(lfs_object.projects.pluck(:id)).to include(upstream_project.id) + end + end + end + + describe 'and user does not have push access' do + it_behaves_like 'forbidden' + end + end + + context 'when CI is authenticated' do + let(:authorization) { authorize_ci_project } + + it_behaves_like 'unauthorized' + end + + context 'for unauthenticated' do + it_behaves_like 'unauthorized' + end + + describe 'and second project not related to fork or a source project' do + let(:second_project) { create(:empty_project) } + let(:authorization) { authorize_user } + + before do + second_project.team << [user, :master] + upstream_project.lfs_objects << lfs_object + end + + context 'when pushing the same lfs object to the second project' do + before do + put "#{second_project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}", nil, + headers.merge('X-Gitlab-Lfs-Tmp' => lfs_tmp_file).compact + end + + it 'responds with status 200' do + expect(response).to have_http_status(200) + end + + it 'links the lfs object to the project' do + expect(lfs_object.projects.pluck(:id)).to include(second_project.id, upstream_project.id) + end + end + end + end + + def put_authorize + put "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}/authorize", nil, headers + end + + def put_finalize(lfs_tmp = lfs_tmp_file) + put "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}", nil, + headers.merge('X-Gitlab-Lfs-Tmp' => lfs_tmp).compact + end + + def lfs_tmp_file + "#{sample_oid}012345678" + end + end + + def enable_lfs + allow(Gitlab.config.lfs).to receive(:enabled).and_return(true) + end + + def authorize_ci_project + ActionController::HttpAuthentication::Basic.encode_credentials('gitlab-ci-token', project.runners_token) + end + + def authorize_user + ActionController::HttpAuthentication::Basic.encode_credentials(user.username, user.password) + end + + def fork_project(project, user, object = nil) + allow(RepositoryForkWorker).to receive(:perform_async).and_return(true) + Projects::ForkService.new(project, user, {}).execute + end + + def post_json(url, body = nil, headers = nil) + post(url, body.try(:to_json), (headers || {}).merge('Content-Type' => 'application/json')) + end + + def json_response + @json_response ||= JSON.parse(response.body) + end +end -- cgit v1.2.1 From bb9f827ddc51eba73c78be83b977a07e10638936 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 14:23:26 +0200 Subject: Fix fetching LFS objects for private CI projects --- CHANGELOG | 1 + lib/gitlab/backend/grack_auth.rb | 2 +- spec/requests/lfs_http_spec.rb | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a977fc3fdbf..671a7c2e4a9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,6 +18,7 @@ v 8.10.0 (unreleased) - Fix MR-auto-close text added to description. !4836 - Fix issue, preventing users w/o push access to sort tags !5105 (redetection) - Add Spring EmojiOne updates. + - Fix fetching LFS objects for private CI projects - Add syntax for multiline blockquote using `>>>` fence !3954 - Fix viewing notification settings when a project is pending deletion - Fix pagination when sorting by columns with lots of ties (like priority) diff --git a/lib/gitlab/backend/grack_auth.rb b/lib/gitlab/backend/grack_auth.rb index 478f145bfed..ab94abeda77 100644 --- a/lib/gitlab/backend/grack_auth.rb +++ b/lib/gitlab/backend/grack_auth.rb @@ -63,7 +63,7 @@ module Grack def ci_request?(login, password) matched_login = /(?^[a-zA-Z]*-ci)-token$/.match(login) - if project && matched_login.present? && git_cmd == 'git-upload-pack' + if project && matched_login.present? underscored_service = matched_login['s'].underscore if underscored_service == 'gitlab_ci' diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb index d862cb5b0b4..aaad1e3a6ec 100644 --- a/spec/requests/lfs_http_spec.rb +++ b/spec/requests/lfs_http_spec.rb @@ -98,6 +98,8 @@ describe Gitlab::Lfs::Router do context 'with required headers' do shared_examples 'responds with a file' do + let(:sendfile) { 'X-Sendfile' } + it 'responds with status 200' do expect(response).to have_http_status(200) end @@ -110,7 +112,6 @@ describe Gitlab::Lfs::Router do context 'with user is authorized' do let(:authorization) { authorize_user } - let(:sendfile) { 'X-Sendfile' } context 'and does not have project access' do let(:update_permissions) do @@ -135,6 +136,10 @@ describe Gitlab::Lfs::Router do context 'when CI is authorized' do let(:authorization) { authorize_ci_project } + let(:update_permissions) do + project.lfs_objects << lfs_object + end + it_behaves_like 'responds with a file' end end -- cgit v1.2.1 From e300dac29302015cbba5b917ad5ea3657de62f0d Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 15:06:19 +0200 Subject: Fix LFS specs --- lib/gitlab/lfs/response.rb | 2 ++ lib/gitlab/lfs/router.rb | 2 -- spec/requests/lfs_http_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gitlab/lfs/response.rb b/lib/gitlab/lfs/response.rb index 811363405a8..a1ee1aa81ff 100644 --- a/lib/gitlab/lfs/response.rb +++ b/lib/gitlab/lfs/response.rb @@ -47,6 +47,8 @@ module Gitlab end def render_storage_upload_store_response(oid, size, tmp_file_name) + return render_forbidden unless tmp_file_name + render_response_to_push do render_lfs_upload_ok(oid, size, tmp_file_name) end diff --git a/lib/gitlab/lfs/router.rb b/lib/gitlab/lfs/router.rb index 69bd5e62305..f2a76a56b8f 100644 --- a/lib/gitlab/lfs/router.rb +++ b/lib/gitlab/lfs/router.rb @@ -74,8 +74,6 @@ module Gitlab lfs.render_storage_upload_authorize_response(oid, size) else tmp_file_name = sanitize_tmp_filename(@request.env['HTTP_X_GITLAB_LFS_TMP']) - return nil unless tmp_file_name - lfs.render_storage_upload_store_response(oid, size, tmp_file_name) end end diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb index aaad1e3a6ec..93d2bc160cc 100644 --- a/spec/requests/lfs_http_spec.rb +++ b/spec/requests/lfs_http_spec.rb @@ -557,7 +557,7 @@ describe Gitlab::Lfs::Router do end it 'does not recognize it as a valid lfs command' do - expect(response).to have_http_status(401) + expect(response).to have_http_status(403) end end end -- cgit v1.2.1 From 5aea280fa7017cc4eac814c31eb45e024ba84a1e Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 14 Jul 2016 10:48:01 -0500 Subject: Add new fork svg icon --- app/assets/stylesheets/framework/buttons.scss | 20 ++++++++++++++++++++ app/views/projects/forks/index.html.haml | 4 ++-- app/views/shared/icons/_icon_fork.svg | 1 + 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 app/views/shared/icons/_icon_fork.svg diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index 590b8f54363..c6fe614f503 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -49,6 +49,20 @@ border-color: $border-dark; color: $color; } + + svg { + vertical-align: top; + position: relative; + top: 2px; + + path { + fill: $white-light; + } + + use { + stroke: $white-light; + } + } } @mixin btn-green { @@ -173,6 +187,12 @@ .caret { margin-left: 5px; } + + svg { + width: 16px; + height: auto; + vertical-align: middle; + } } .btn-lg { diff --git a/app/views/projects/forks/index.html.haml b/app/views/projects/forks/index.html.haml index dbe9ddfde2f..a1d79bdabda 100644 --- a/app/views/projects/forks/index.html.haml +++ b/app/views/projects/forks/index.html.haml @@ -31,11 +31,11 @@ - if current_user && can?(current_user, :fork_project, @project) - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2 = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-new' do - = icon('code-fork fw') + = custom_icon('icon_fork') Fork - else = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-new' do - = icon('code-fork fw') + = custom_icon('icon_fork') Fork diff --git a/app/views/shared/icons/_icon_fork.svg b/app/views/shared/icons/_icon_fork.svg new file mode 100644 index 00000000000..420ffe3a55b --- /dev/null +++ b/app/views/shared/icons/_icon_fork.svg @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.2.1 From 13c62cdbfad1cc7f140d59f018b6004f92e6d3b5 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 15 Jul 2016 09:23:41 -0500 Subject: Add svg icon color to btn-color mixin --- app/assets/stylesheets/framework/buttons.scss | 14 ++++++-------- app/assets/stylesheets/pages/projects.scss | 11 +++++++++++ app/views/projects/buttons/_fork.html.haml | 4 ++-- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index c6fe614f503..f87b8a2ad1c 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -51,16 +51,13 @@ } svg { - vertical-align: top; - position: relative; - top: 2px; path { - fill: $white-light; + fill: $color; } use { - stroke: $white-light; + stroke: $color; } } } @@ -189,9 +186,10 @@ } svg { - width: 16px; - height: auto; - vertical-align: middle; + height: 15px; + width: auto; + position: relative; + top: 2px; } } diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index ea9f7cf0540..7c36ce85fb1 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -129,6 +129,17 @@ color: $layout-link-gray; } + svg { + + path { + fill: $layout-link-gray; + } + + use { + stroke: $layout-link-gray; + } + } + .fa-caret-down { margin-left: 3px; } diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml index a9eaed4c5f6..a098a082854 100644 --- a/app/views/projects/buttons/_fork.html.haml +++ b/app/views/projects/buttons/_fork.html.haml @@ -2,7 +2,7 @@ - if current_user && can?(current_user, :fork_project, @project) - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2 = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn has-tooltip' do - = icon('code-fork fw') + = custom_icon('icon_fork') Fork %div.count-with-arrow %span.arrow @@ -10,7 +10,7 @@ = @project.forks_count - else = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn has-tooltip' do - = icon('code-fork fw') + = custom_icon('icon_fork') Fork %div.count-with-arrow %span.arrow -- cgit v1.2.1 From 3a3d999601ded922acca5a8f7a5f374f9690c1e0 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 16:35:48 +0200 Subject: Fix stage status shown for pipelines --- CHANGELOG | 1 + .../projects/ci/pipelines/_pipeline.html.haml | 2 +- spec/models/commit_status_spec.rb | 24 +++++++++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 040926d270d..67d7b43fef2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -58,6 +58,7 @@ v 8.10.0 (unreleased) - Collapse large diffs by default (!4990) - Check for conflicts with existing Project's wiki path when creating a new project. - Show last push widget in upstream after push to fork + - Fix stage status shown for pipelines - Cache todos pending/done dashboard query counts. - Don't instantiate a git tree on Projects show default view - Bump Rinku to 2.0.0 diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index b53a8633937..0a103e58db3 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -32,7 +32,7 @@ Cant find HEAD commit for this branch - - stages_status = pipeline.statuses.stages_status + - stages_status = pipeline.statuses.latest.stages_status - stages.each do |stage| %td - status = stages_status[stage] diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index 05f22c7a9eb..ff6371ad685 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -177,10 +177,10 @@ describe CommitStatus, models: true do describe '#stages' do before do - FactoryGirl.create :commit_status, pipeline: pipeline, stage: 'build', stage_idx: 0, status: 'success' - FactoryGirl.create :commit_status, pipeline: pipeline, stage: 'build', stage_idx: 0, status: 'failed' - FactoryGirl.create :commit_status, pipeline: pipeline, stage: 'deploy', stage_idx: 2, status: 'running' - FactoryGirl.create :commit_status, pipeline: pipeline, stage: 'test', stage_idx: 1, status: 'success' + create :commit_status, pipeline: pipeline, stage: 'build', name: 'linux', stage_idx: 0, status: 'success' + create :commit_status, pipeline: pipeline, stage: 'build', name: 'mac', stage_idx: 0, status: 'failed' + create :commit_status, pipeline: pipeline, stage: 'deploy', name: 'staging', stage_idx: 2, status: 'running' + create :commit_status, pipeline: pipeline, stage: 'test', name: 'rspec', stage_idx: 1, status: 'success' end context 'stages list' do @@ -192,7 +192,7 @@ describe CommitStatus, models: true do end context 'stages with statuses' do - subject { CommitStatus.where(pipeline: pipeline).stages_status } + subject { CommitStatus.where(pipeline: pipeline).latest.stages_status } it 'return list of stages with statuses' do is_expected.to eq({ @@ -201,6 +201,20 @@ describe CommitStatus, models: true do 'deploy' => 'running' }) end + + context 'when build is retried' do + before do + create :commit_status, pipeline: pipeline, stage: 'build', name: 'mac', stage_idx: 0, status: 'success' + end + + it 'ignores a previous state' do + is_expected.to eq({ + 'build' => 'success', + 'test' => 'success', + 'deploy' => 'running' + }) + end + end end end -- cgit v1.2.1 From 1744c742f28afb1a89432fa2854fad93e1557fd8 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 17:05:41 +0200 Subject: Allow to access Container Registry for Public and Internal projects --- CHANGELOG | 1 + app/models/ability.rb | 3 +- .../security/project/internal_access_spec.rb | 19 ++++ .../security/project/private_access_spec.rb | 19 ++++ .../security/project/public_access_spec.rb | 19 ++++ ...ntainer_registry_authentication_service_spec.rb | 104 ++++++++++++++++----- 6 files changed, 139 insertions(+), 26 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 040926d270d..bb58672f7bf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -79,6 +79,7 @@ v 8.10.0 (unreleased) - Don't garbage collect commits that have related DB records like comments - More descriptive message for git hooks and file locks - Handle custom Git hook result in GitLab UI + - Allow to access Container Registry for Public and Internal projects - Allow '?', or '&' for label names - Fix importer for GitHub Pull Requests when a branch was reused across Pull Requests - Add date when user joined the team on the member page diff --git a/app/models/ability.rb b/app/models/ability.rb index eeb0ceba081..6fd18f2ee24 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -204,7 +204,8 @@ class Ability :download_code, :fork_project, :read_commit_status, - :read_pipeline + :read_pipeline, + :read_container_image ] end diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index 13d980a326f..b6acc509342 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -426,4 +426,23 @@ describe "Internal Project Access", feature: true do it { is_expected.to be_denied_for :external } it { is_expected.to be_denied_for :visitor } end + + describe "GET /:project_path/container_registry" do + before do + stub_container_registry_tags('latest') + stub_container_registry_config(enabled: true) + end + + subject { namespace_project_container_registry_index_path(project.namespace, project) } + + it { is_expected.to be_allowed_for :admin } + it { is_expected.to be_allowed_for owner } + it { is_expected.to be_allowed_for master } + it { is_expected.to be_allowed_for developer } + it { is_expected.to be_allowed_for reporter } + it { is_expected.to be_allowed_for guest } + it { is_expected.to be_allowed_for :user } + it { is_expected.to be_denied_for :external } + it { is_expected.to be_denied_for :visitor } + end end diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index ac9690cc127..ccb5c06dab0 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -362,4 +362,23 @@ describe "Private Project Access", feature: true do it { is_expected.to be_denied_for :external } it { is_expected.to be_denied_for :visitor } end + + describe "GET /:project_path/container_registry" do + before do + stub_container_registry_tags('latest') + stub_container_registry_config(enabled: true) + end + + subject { namespace_project_container_registry_index_path(project.namespace, project) } + + it { is_expected.to be_allowed_for :admin } + it { is_expected.to be_allowed_for owner } + it { is_expected.to be_allowed_for master } + it { is_expected.to be_allowed_for developer } + it { is_expected.to be_allowed_for reporter } + it { is_expected.to be_denied_for guest } + it { is_expected.to be_denied_for :user } + it { is_expected.to be_denied_for :external } + it { is_expected.to be_denied_for :visitor } + end end diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index 737897de52b..985663e7c98 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -426,4 +426,23 @@ describe "Public Project Access", feature: true do it { is_expected.to be_denied_for :external } it { is_expected.to be_denied_for :visitor } end + + describe "GET /:project_path/container_registry" do + before do + stub_container_registry_tags('latest') + stub_container_registry_config(enabled: true) + end + + subject { namespace_project_container_registry_index_path(project.namespace, project) } + + it { is_expected.to be_allowed_for :admin } + it { is_expected.to be_allowed_for owner } + it { is_expected.to be_allowed_for master } + it { is_expected.to be_allowed_for developer } + it { is_expected.to be_allowed_for reporter } + it { is_expected.to be_allowed_for guest } + it { is_expected.to be_allowed_for :user } + it { is_expected.to be_allowed_for :external } + it { is_expected.to be_allowed_for :visitor } + end end diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb index 67777ad48bc..7cc71f706ce 100644 --- a/spec/services/auth/container_registry_authentication_service_spec.rb +++ b/spec/services/auth/container_registry_authentication_service_spec.rb @@ -87,51 +87,105 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do end context 'user authorization' do - let(:project) { create(:project) } let(:current_user) { create(:user) } - context 'allow to use scope-less authentication' do - it_behaves_like 'a valid token' - end + context 'for private project' do + let(:project) { create(:empty_project) } - context 'allow developer to push images' do - before { project.team << [current_user, :developer] } + context 'allow to use scope-less authentication' do + it_behaves_like 'a valid token' + end - let(:current_params) do - { scope: "repository:#{project.path_with_namespace}:push" } + context 'allow developer to push images' do + before { project.team << [current_user, :developer] } + + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:push" } + end + + it_behaves_like 'a pushable' end - it_behaves_like 'a pushable' - end + context 'allow reporter to pull images' do + before { project.team << [current_user, :reporter] } + + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:pull" } + end - context 'allow reporter to pull images' do - before { project.team << [current_user, :reporter] } + it_behaves_like 'a pullable' + end - let(:current_params) do - { scope: "repository:#{project.path_with_namespace}:pull" } + context 'return a least of privileges' do + before { project.team << [current_user, :reporter] } + + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:push,pull" } + end + + it_behaves_like 'a pullable' end - it_behaves_like 'a pullable' + context 'disallow guest to pull or push images' do + before { project.team << [current_user, :guest] } + + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:pull,push" } + end + + it_behaves_like 'an inaccessible' + end end - context 'return a least of privileges' do - before { project.team << [current_user, :reporter] } + context 'for public project' do + let(:project) { create(:empty_project, :public) } - let(:current_params) do - { scope: "repository:#{project.path_with_namespace}:push,pull" } + context 'allow anyone to pull images' do + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:pull" } + end + + it_behaves_like 'a pullable' end - it_behaves_like 'a pullable' + context 'disallow anyone to push images' do + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:push" } + end + + it_behaves_like 'an inaccessible' + end end - context 'disallow guest to pull or push images' do - before { project.team << [current_user, :guest] } + context 'for internal project' do + let(:project) { create(:empty_project, :internal) } - let(:current_params) do - { scope: "repository:#{project.path_with_namespace}:pull,push" } + context 'for internal user' do + context 'allow anyone to pull images' do + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:pull" } + end + + it_behaves_like 'a pullable' + end + + context 'disallow anyone to push images' do + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:push" } + end + + it_behaves_like 'an inaccessible' + end end - it_behaves_like 'an inaccessible' + context 'for external user' do + let(:current_user) { create(:user, external: true) } + let(:current_params) do + { scope: "repository:#{project.path_with_namespace}:pull,push" } + end + + it_behaves_like 'an inaccessible' + end end end -- cgit v1.2.1 From fbdf9008c2f6f2fbf75338ab6582b65072972f08 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 15 Jun 2016 16:08:45 +0200 Subject: Make docker registry work with location redirects when external storage is used --- CHANGELOG | 1 + lib/container_registry/tag.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5ab16db31ce..8a4b8f4dfbc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -281,6 +281,7 @@ v 8.9.0 - TeamCity Service: Fix URL handling when base URL contains a path - Todos will display target state if issuable target is 'Closed' or 'Merged' - Validate only and except regexp + - Make docker registry work with location redirects when external storage is used - Fix bug when sorting issues by milestone due date and filtering by two or more labels - POST to API /projects/:id/runners/:runner_id would give 409 if the runner was already enabled for this project - Add support for using Yubikeys (U2F) for two-factor authentication diff --git a/lib/container_registry/tag.rb b/lib/container_registry/tag.rb index 708d01b95a1..59040199920 100644 --- a/lib/container_registry/tag.rb +++ b/lib/container_registry/tag.rb @@ -53,7 +53,7 @@ module ContainerRegistry def config return unless config_blob - @config ||= ContainerRegistry::Config.new(self, config_blob) + @config ||= ContainerRegistry::Config.new(self, config_blob) if config_blob.data end def created_at -- cgit v1.2.1 From a3d8a7e6be2511ba9457a5045581de2b3ce80ab0 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 29 Jun 2016 14:18:55 +0200 Subject: Allow blob to be redirected --- lib/container_registry/client.rb | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/lib/container_registry/client.rb b/lib/container_registry/client.rb index 42232b7129d..50ddf79601d 100644 --- a/lib/container_registry/client.rb +++ b/lib/container_registry/client.rb @@ -7,6 +7,13 @@ module ContainerRegistry MANIFEST_VERSION = 'application/vnd.docker.distribution.manifest.v2+json' + # Taken from: FaradayMiddleware::FollowRedirects + REDIRECT_CODES = Set.new [301, 302, 303, 307] + + # Regex that matches characters that need to be escaped in URLs, sans + # the "%" character which we assume already represents an escaped sequence. + URI_UNSAFE = /[^\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]%]/ + def initialize(base_uri, options = {}) @base_uri = base_uri @faraday = Faraday.new(@base_uri) do |conn| @@ -34,7 +41,7 @@ module ContainerRegistry def blob(name, digest, type = nil) headers = {} headers['Accept'] = type if type - response_body @faraday.get("/v2/#{name}/blobs/#{digest}", nil, headers) + response_body @faraday.get("/v2/#{name}/blobs/#{digest}", nil, headers), allow_redirect: true end def delete_blob(name, digest) @@ -61,8 +68,32 @@ module ContainerRegistry conn.adapter :net_http end - def response_body(response) - response.body if response.success? + def response_body(response, allow_redirect: false) + if allow_redirect && REDIRECT_CODES.include?(response.status) + response = redirect_response(response.env['url'], response.headers['location']) + end + + response.body if response && response.success? + end + + def redirect_response(url, location) + return unless location + + url += safe_escape(location) + + # We use HTTParty due to fact that @faraday contains internal authorization token + HTTParty.get(url) + end + + # Taken from: FaradayMiddleware::FollowRedirects + # Internal: escapes unsafe characters from an URL which might be a path + # component only or a fully qualified URI so that it can be joined onto an + # URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not + # risk double-escaping. + def safe_escape(uri) + uri.to_s.gsub(URI_UNSAFE) { |match| + '%' + match.unpack('H2' * match.bytesize).join('%').upcase + } end end end -- cgit v1.2.1 From 3e4dc164a7a99f19c24accc64b15fb33c0bee1aa Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 30 Jun 2016 14:49:58 +0200 Subject: Explicitly remove authorization token and make sure that invalid addresses are properly handled --- lib/container_registry/client.rb | 72 ++++++++++++++++---------------- spec/lib/container_registry/blob_spec.rb | 52 ++++++++++++++++++++++- spec/lib/container_registry/tag_spec.rb | 49 ++++++++++++++++------ 3 files changed, 122 insertions(+), 51 deletions(-) diff --git a/lib/container_registry/client.rb b/lib/container_registry/client.rb index 50ddf79601d..3dda60f607c 100644 --- a/lib/container_registry/client.rb +++ b/lib/container_registry/client.rb @@ -10,54 +10,41 @@ module ContainerRegistry # Taken from: FaradayMiddleware::FollowRedirects REDIRECT_CODES = Set.new [301, 302, 303, 307] - # Regex that matches characters that need to be escaped in URLs, sans - # the "%" character which we assume already represents an escaped sequence. - URI_UNSAFE = /[^\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]%]/ - def initialize(base_uri, options = {}) @base_uri = base_uri - @faraday = Faraday.new(@base_uri) do |conn| - initialize_connection(conn, options) - end + @options = options end def repository_tags(name) - response_body @faraday.get("/v2/#{name}/tags/list") + response_body faraday.get("/v2/#{name}/tags/list") end def repository_manifest(name, reference) - response_body @faraday.get("/v2/#{name}/manifests/#{reference}") + response_body faraday.get("/v2/#{name}/manifests/#{reference}") end def repository_tag_digest(name, reference) - response = @faraday.head("/v2/#{name}/manifests/#{reference}") + response = faraday.head("/v2/#{name}/manifests/#{reference}") response.headers['docker-content-digest'] if response.success? end def delete_repository_tag(name, reference) - @faraday.delete("/v2/#{name}/manifests/#{reference}").success? + faraday.delete("/v2/#{name}/manifests/#{reference}").success? end def blob(name, digest, type = nil) - headers = {} - headers['Accept'] = type if type - response_body @faraday.get("/v2/#{name}/blobs/#{digest}", nil, headers), allow_redirect: true + type ||= 'application/octet-stream' + response_body faraday_blob.get("/v2/#{name}/blobs/#{digest}", nil, 'Accept' => type), allow_redirect: true end def delete_blob(name, digest) - @faraday.delete("/v2/#{name}/blobs/#{digest}").success? + faraday.delete("/v2/#{name}/blobs/#{digest}").success? end - + private - + def initialize_connection(conn, options) conn.request :json - conn.headers['Accept'] = MANIFEST_VERSION - - conn.response :json, content_type: 'application/json' - conn.response :json, content_type: 'application/vnd.docker.distribution.manifest.v1+prettyjws' - conn.response :json, content_type: 'application/vnd.docker.distribution.manifest.v1+json' - conn.response :json, content_type: 'application/vnd.docker.distribution.manifest.v2+json' if options[:user] && options[:password] conn.request(:basic_auth, options[:user].to_s, options[:password].to_s) @@ -68,32 +55,43 @@ module ContainerRegistry conn.adapter :net_http end + def accept_manifest(conn) + conn.headers['Accept'] = MANIFEST_VERSION + + conn.response :json, content_type: 'application/json' + conn.response :json, content_type: 'application/vnd.docker.distribution.manifest.v1+prettyjws' + conn.response :json, content_type: 'application/vnd.docker.distribution.manifest.v1+json' + conn.response :json, content_type: 'application/vnd.docker.distribution.manifest.v2+json' + end + def response_body(response, allow_redirect: false) if allow_redirect && REDIRECT_CODES.include?(response.status) - response = redirect_response(response.env['url'], response.headers['location']) + response = redirect_response(response.headers['location']) end response.body if response && response.success? end - def redirect_response(url, location) + def redirect_response(location) return unless location - url += safe_escape(location) + # We explicitly remove authorization token + faraday_blob.get(location) do |req| + req['Authorization'] = '' + end + end - # We use HTTParty due to fact that @faraday contains internal authorization token - HTTParty.get(url) + def faraday + @faraday ||= Faraday.new(@base_uri) do |conn| + initialize_connection(conn, @options) + accept_manifest(conn) + end end - # Taken from: FaradayMiddleware::FollowRedirects - # Internal: escapes unsafe characters from an URL which might be a path - # component only or a fully qualified URI so that it can be joined onto an - # URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not - # risk double-escaping. - def safe_escape(uri) - uri.to_s.gsub(URI_UNSAFE) { |match| - '%' + match.unpack('H2' * match.bytesize).join('%').upcase - } + def faraday_blob + @faraday_blob ||= Faraday.new(@base_uri) do |conn| + initialize_connection(conn, @options) + end end end end diff --git a/spec/lib/container_registry/blob_spec.rb b/spec/lib/container_registry/blob_spec.rb index 4d8cb787dde..bbacdc67ebd 100644 --- a/spec/lib/container_registry/blob_spec.rb +++ b/spec/lib/container_registry/blob_spec.rb @@ -9,8 +9,9 @@ describe ContainerRegistry::Blob do 'size' => 1000 } end + let(:token) { 'authorization-token' } - let(:registry) { ContainerRegistry::Registry.new('http://example.com') } + let(:registry) { ContainerRegistry::Registry.new('http://example.com', token: token) } let(:repository) { registry.repository('group/test') } let(:blob) { repository.blob(config) } @@ -58,4 +59,53 @@ describe ContainerRegistry::Blob do it { is_expected.to be_truthy } end + + context '#data' do + let(:data) { '{"key":"value"}' } + + subject { blob.data } + + context 'when locally stored' do + before do + stub_request(:get, 'http://example.com/v2/group/test/blobs/sha256:0123456789012345'). + to_return( + status: 200, + headers: { 'Content-Type' => 'application/json' }, + body: data) + end + + it { is_expected.to eq(data) } + end + + context 'when externally stored' do + before do + stub_request(:get, 'http://example.com/v2/group/test/blobs/sha256:0123456789012345'). + with(headers: { 'Authorization' => "bearer #{token}" }). + to_return( + status: 307, + headers: { 'Location' => location }) + end + + context 'for a valid address' do + let(:location) { 'http://external.com/blob/file' } + + before do + stub_request(:get, location). + with(headers: { 'Authorization' => nil }). + to_return( + status: 200, + headers: { 'Content-Type' => 'application/json' }, + body: data) + end + + it { is_expected.to eq(data) } + end + + context 'for invalid file' do + let(:location) { 'file:///etc/passwd' } + + it { expect{ subject }.to raise_error(ArgumentError, 'invalid address') } + end + end + end end diff --git a/spec/lib/container_registry/tag_spec.rb b/spec/lib/container_registry/tag_spec.rb index c7324c2bf77..c5e31ae82b6 100644 --- a/spec/lib/container_registry/tag_spec.rb +++ b/spec/lib/container_registry/tag_spec.rb @@ -77,24 +77,47 @@ describe ContainerRegistry::Tag do end context 'config processing' do - before do - stub_request(:get, 'http://example.com/v2/group/test/blobs/sha256:d7a513a663c1a6dcdba9ed832ca53c02ac2af0c333322cd6ca92936d1d9917ac'). - with(headers: { 'Accept' => 'application/octet-stream' }). - to_return( - status: 200, - body: File.read(Rails.root + 'spec/fixtures/container_registry/config_blob.json')) - end + shared_examples 'a processable' do + context '#config' do + subject { tag.config } - context '#config' do - subject { tag.config } + it { is_expected.not_to be_nil } + end + + context '#created_at' do + subject { tag.created_at } - it { is_expected.not_to be_nil } + it { is_expected.not_to be_nil } + end end - context '#created_at' do - subject { tag.created_at } + context 'when locally stored' do + before do + stub_request(:get, 'http://example.com/v2/group/test/blobs/sha256:d7a513a663c1a6dcdba9ed832ca53c02ac2af0c333322cd6ca92936d1d9917ac'). + with(headers: { 'Accept' => 'application/octet-stream' }). + to_return( + status: 200, + body: File.read(Rails.root + 'spec/fixtures/container_registry/config_blob.json')) + end + + it_behaves_like 'a processable' + end - it { is_expected.not_to be_nil } + context 'when externally stored' do + before do + stub_request(:get, 'http://example.com/v2/group/test/blobs/sha256:d7a513a663c1a6dcdba9ed832ca53c02ac2af0c333322cd6ca92936d1d9917ac'). + with(headers: { 'Accept' => 'application/octet-stream' }). + to_return( + status: 307, + headers: { 'Location' => 'http://external.com/blob/file' }) + + stub_request(:get, 'http://external.com/blob/file'). + to_return( + status: 200, + body: File.read(Rails.root + 'spec/fixtures/container_registry/config_blob.json')) + end + + it_behaves_like 'a processable' end end end -- cgit v1.2.1 From 2630111e5141fcc211e76c7512aec47614a8bd3b Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 17:36:00 +0200 Subject: Add CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 8a4b8f4dfbc..141a323ab99 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -81,6 +81,7 @@ v 8.10.0 (unreleased) - More descriptive message for git hooks and file locks - Handle custom Git hook result in GitLab UI - Allow '?', or '&' for label names + - Support redirected blobs for Container Registry integration - Fix importer for GitHub Pull Requests when a branch was reused across Pull Requests - Add date when user joined the team on the member page - Fix 404 redirect after validation fails importing a GitLab project -- cgit v1.2.1 From 1556d4848d4753b7bddd8430cf223b91e6f47b0f Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 15:42:29 +0200 Subject: Track a user who created a pipeline --- CHANGELOG | 1 + app/models/ci/pipeline.rb | 2 ++ app/models/project.rb | 4 ++-- app/models/user.rb | 1 + app/services/ci/create_pipeline_service.rb | 1 + app/services/create_commit_builds_service.rb | 8 +++++++- db/migrate/20160715132507_add_user_id_to_pipeline.rb | 7 +++++++ db/schema.rb | 3 ++- lib/api/commit_statuses.rb | 2 +- spec/models/ci/pipeline_spec.rb | 3 +++ spec/models/user_spec.rb | 2 ++ spec/services/create_commit_builds_service_spec.rb | 3 ++- 12 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 db/migrate/20160715132507_add_user_id_to_pipeline.rb diff --git a/CHANGELOG b/CHANGELOG index 5ab16db31ce..044bdb476cc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -53,6 +53,7 @@ v 8.10.0 (unreleased) - Fix user creation with stronger minimum password requirements !4054 (nathan-pmt) - Only show New Snippet button to users that can create snippets. - PipelinesFinder uses git cache data + - Track a user who created a pipeline - Actually render old and new sections of parallel diff next to each other - Throttle the update of `project.pushes_since_gc` to 1 minute. - Allow expanding and collapsing files in diff view (!4990) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index fa4071e2482..cb284ba1e1c 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -6,6 +6,8 @@ module Ci self.table_name = 'ci_commits' belongs_to :project, class_name: '::Project', foreign_key: :gl_project_id + belongs_to :user + has_many :statuses, class_name: 'CommitStatus', foreign_key: :commit_id has_many :builds, class_name: 'Ci::Build', foreign_key: :commit_id has_many :trigger_requests, dependent: :destroy, class_name: 'Ci::TriggerRequest', foreign_key: :commit_id diff --git a/app/models/project.rb b/app/models/project.rb index e7b9835692d..dba3b3413ef 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1038,8 +1038,8 @@ class Project < ActiveRecord::Base pipelines.order(id: :desc).find_by(sha: sha, ref: ref) end - def ensure_pipeline(sha, ref) - pipeline(sha, ref) || pipelines.create(sha: sha, ref: ref) + def ensure_pipeline(sha, ref, current_user = nil) + pipeline(sha, ref) || pipelines.create(sha: sha, ref: ref, user: current_user) end def enable_ci diff --git a/app/models/user.rb b/app/models/user.rb index 7a72c202150..3d0a033785c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -85,6 +85,7 @@ class User < ActiveRecord::Base has_one :abuse_report, dependent: :destroy has_many :spam_logs, dependent: :destroy has_many :builds, dependent: :nullify, class_name: 'Ci::Build' + has_many :pipelines, dependent: :nullify, class_name: 'Ci::Pipeline' has_many :todos, dependent: :destroy has_many :notification_settings, dependent: :destroy has_many :award_emoji, dependent: :destroy diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index b1ee6874190..be91bf0db85 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -2,6 +2,7 @@ module Ci class CreatePipelineService < BaseService def execute pipeline = project.pipelines.new(params) + pipeline.user = current_user unless ref_names.include?(params[:ref]) pipeline.errors.add(:base, 'Reference not found') diff --git a/app/services/create_commit_builds_service.rb b/app/services/create_commit_builds_service.rb index f947e8f452e..0b66b854dea 100644 --- a/app/services/create_commit_builds_service.rb +++ b/app/services/create_commit_builds_service.rb @@ -14,7 +14,13 @@ class CreateCommitBuildsService return false end - @pipeline = Ci::Pipeline.new(project: project, sha: sha, ref: ref, before_sha: before_sha, tag: tag) + @pipeline = Ci::Pipeline.new( + project: project, + sha: sha, + ref: ref, + before_sha: before_sha, + tag: tag, + user: user) ## # Skip creating pipeline if no gitlab-ci.yml is found diff --git a/db/migrate/20160715132507_add_user_id_to_pipeline.rb b/db/migrate/20160715132507_add_user_id_to_pipeline.rb new file mode 100644 index 00000000000..af0461c4daf --- /dev/null +++ b/db/migrate/20160715132507_add_user_id_to_pipeline.rb @@ -0,0 +1,7 @@ +class AddUserIdToPipeline < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + def change + add_column :ci_commits, :user_id, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index f24e47b85b2..6ab5a1eaded 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160712171823) do +ActiveRecord::Schema.define(version: 20160715132507) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -199,6 +199,7 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.datetime "started_at" t.datetime "finished_at" t.integer "duration" + t.integer "user_id" end add_index "ci_commits", ["gl_project_id", "sha"], name: "index_ci_commits_on_gl_project_id_and_sha", using: :btree diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 323a7086890..acb4812b5cf 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -64,7 +64,7 @@ module API ref = branches.first end - pipeline = @project.ensure_pipeline(commit.sha, ref) + pipeline = @project.ensure_pipeline(commit.sha, ref, current_user) name = params[:name] || params[:context] status = GenericCommitStatus.running_or_pending.find_by(pipeline: pipeline, name: name, ref: params[:ref]) diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 4e5481f9154..10db79bd15f 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -5,9 +5,12 @@ describe Ci::Pipeline, models: true do let(:pipeline) { FactoryGirl.create :ci_pipeline, project: project } it { is_expected.to belong_to(:project) } + it { is_expected.to belong_to(:user) } + it { is_expected.to have_many(:statuses) } it { is_expected.to have_many(:trigger_requests) } it { is_expected.to have_many(:builds) } + it { is_expected.to validate_presence_of :sha } it { is_expected.to validate_presence_of :status } diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index ff39f187759..fc74488ac0e 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -31,6 +31,8 @@ describe User, models: true do it { is_expected.to have_many(:spam_logs).dependent(:destroy) } it { is_expected.to have_many(:todos).dependent(:destroy) } it { is_expected.to have_many(:award_emoji).dependent(:destroy) } + it { is_expected.to have_many(:builds).dependent(:nullify) } + it { is_expected.to have_many(:pipelines).dependent(:nullify) } describe '#group_members' do it 'does not include group memberships for which user is a requester' do diff --git a/spec/services/create_commit_builds_service_spec.rb b/spec/services/create_commit_builds_service_spec.rb index 4d09bc5fb12..7caf69bc870 100644 --- a/spec/services/create_commit_builds_service_spec.rb +++ b/spec/services/create_commit_builds_service_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe CreateCommitBuildsService, services: true do let(:service) { CreateCommitBuildsService.new } let(:project) { FactoryGirl.create(:empty_project) } - let(:user) { nil } + let(:user) { create(:user) } before do stub_ci_pipeline_to_return_yaml_file @@ -24,6 +24,7 @@ describe CreateCommitBuildsService, services: true do it { expect(pipeline).to be_valid } it { expect(pipeline).to be_persisted } it { expect(pipeline).to eq(project.pipelines.last) } + it { expect(pipeline).to have_attributes(:user => user) } it { expect(pipeline.builds.first).to be_kind_of(Ci::Build) } end -- cgit v1.2.1 From 7993fc1b89f6a8903fea0aa9586b1ed1d8a3b29e Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 15:46:49 +0200 Subject: Add index for user_id of pipeline --- db/migrate/20160715134306_add_index_for_pipeline_user_id.rb | 7 +++++++ db/schema.rb | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20160715134306_add_index_for_pipeline_user_id.rb diff --git a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb new file mode 100644 index 00000000000..ac5d2bec681 --- /dev/null +++ b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb @@ -0,0 +1,7 @@ +class AddIndexForPipelineUserId < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + def change + add_index :ci_commits, :user_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 6ab5a1eaded..c96baef6a8b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160715132507) do +ActiveRecord::Schema.define(version: 20160715134306) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -211,6 +211,7 @@ ActiveRecord::Schema.define(version: 20160715132507) do add_index "ci_commits", ["project_id"], name: "index_ci_commits_on_project_id", using: :btree add_index "ci_commits", ["sha"], name: "index_ci_commits_on_sha", using: :btree add_index "ci_commits", ["status"], name: "index_ci_commits_on_status", using: :btree + add_index "ci_commits", ["user_id"], name: "index_ci_commits_on_user_id", using: :btree create_table "ci_events", force: :cascade do |t| t.integer "project_id" -- cgit v1.2.1 From 9d72d902cf21c786b871eced12609a793596cf29 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 18:01:43 +0200 Subject: Make rubocop happy --- db/migrate/20160715134306_add_index_for_pipeline_user_id.rb | 2 +- spec/services/create_commit_builds_service_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb index ac5d2bec681..e09caa0e6d7 100644 --- a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb +++ b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb @@ -2,6 +2,6 @@ class AddIndexForPipelineUserId < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers def change - add_index :ci_commits, :user_id + add_concurrent_index :ci_commits, :user_id end end diff --git a/spec/services/create_commit_builds_service_spec.rb b/spec/services/create_commit_builds_service_spec.rb index 7caf69bc870..d4c5e584421 100644 --- a/spec/services/create_commit_builds_service_spec.rb +++ b/spec/services/create_commit_builds_service_spec.rb @@ -24,7 +24,7 @@ describe CreateCommitBuildsService, services: true do it { expect(pipeline).to be_valid } it { expect(pipeline).to be_persisted } it { expect(pipeline).to eq(project.pipelines.last) } - it { expect(pipeline).to have_attributes(:user => user) } + it { expect(pipeline).to have_attributes(user: user) } it { expect(pipeline.builds.first).to be_kind_of(Ci::Build) } end -- cgit v1.2.1 From 52af77d8f8e45caff9b7a496768fa47256e74c71 Mon Sep 17 00:00:00 2001 From: "Jacob Vosmaer (GitLab)" Date: Fri, 15 Jul 2016 16:04:45 +0000 Subject: Don't ask Heather to review documentation MR's --- doc/development/doc_styleguide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index 975bb82c37d..fac35ec964d 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -44,7 +44,7 @@ it organized and easy to find. - When introducing a new document, be careful for the headings to be grammatically and syntactically correct. It is advised to mention one or all of the following GitLab members for a review: `@axil`, `@rspeicher`, - `@dblessing`, `@ashleys`, `@nearlythere`. This is to ensure that no document + `@dblessing`, `@ashleys`. This is to ensure that no document with wrong heading is going live without an audit, thus preventing dead links and redirection issues when corrected - Leave exactly one newline after a heading -- cgit v1.2.1 From 2462a473c2048dc0bc2b4e8e2aa2c802566d687c Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 18:05:39 +0200 Subject: Make rubocop happy --- lib/container_registry/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/container_registry/client.rb b/lib/container_registry/client.rb index 3dda60f607c..2edddb84fc3 100644 --- a/lib/container_registry/client.rb +++ b/lib/container_registry/client.rb @@ -8,7 +8,7 @@ module ContainerRegistry MANIFEST_VERSION = 'application/vnd.docker.distribution.manifest.v2+json' # Taken from: FaradayMiddleware::FollowRedirects - REDIRECT_CODES = Set.new [301, 302, 303, 307] + REDIRECT_CODES = Set.new [301, 302, 303, 307] def initialize(base_uri, options = {}) @base_uri = base_uri -- cgit v1.2.1 From add3767db14d12e3655f9d5e04de33700318d5dd Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 15 Jul 2016 11:21:33 -0500 Subject: Position commit icons closer to branch name/tag/sha; add min-width to pipeline actions cell --- app/assets/stylesheets/pages/pipelines.scss | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 8ba03813afc..e6ac3e54fac 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -98,8 +98,18 @@ .icon-container { display: inline-block; - text-align: center; + text-align: right; width: 20px; + + .fa { + position: relative; + right: 3px; + } + + svg { + position: relative; + right: 1px; + } } .duration, @@ -121,6 +131,7 @@ } .pipeline-actions { + min-width: 140px; .btn { margin: 0; -- cgit v1.2.1 From 66c4ed6165d5e895ee802d9745205a05dfca9986 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Wed, 13 Jul 2016 21:00:46 -0300 Subject: Fix mentioned users list on diff notes --- app/models/concerns/note_on_diff.rb | 3 +++ spec/services/todo_service_spec.rb | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/app/models/concerns/note_on_diff.rb b/app/models/concerns/note_on_diff.rb index 2785fbb21c9..7b6a28ccf3c 100644 --- a/app/models/concerns/note_on_diff.rb +++ b/app/models/concerns/note_on_diff.rb @@ -4,6 +4,9 @@ module NoteOnDiff NUMBER_OF_TRUNCATED_DIFF_LINES = 16 included do + attr_mentionable :note, pipeline: :note + participant :author + delegate :blob, :highlighted_diff_lines, to: :diff_file, allow_nil: true end diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb index b4522536724..83c18a35472 100644 --- a/spec/services/todo_service_spec.rb +++ b/spec/services/todo_service_spec.rb @@ -435,6 +435,24 @@ describe TodoService, services: true do should_create_todo(user: author, target: mr_unassigned, action: Todo::MARKED) end end + + describe '#new_note' do + let(:mention) { john_doe.to_reference } + let(:diff_note_on_merge_request) { create(:diff_note_on_merge_request, project: project, noteable: mr_unassigned, author: author, note: "Hey #{mention}") } + let(:legacy_diff_note_on_merge_request) { create(:legacy_diff_note_on_merge_request, project: project, noteable: mr_unassigned, author: author, note: "Hey #{mention}") } + + it 'creates a todo for mentioned user on new diff note' do + service.new_note(diff_note_on_merge_request, author) + + should_create_todo(user: john_doe, target: mr_unassigned, author: author, action: Todo::MENTIONED, note: diff_note_on_merge_request) + end + + it 'creates a todo for mentioned user on legacy diff note' do + service.new_note(legacy_diff_note_on_merge_request, author) + + should_create_todo(user: john_doe, target: mr_unassigned, author: author, action: Todo::MENTIONED, note: legacy_diff_note_on_merge_request) + end + end end it 'updates cached counts when a todo is created' do -- cgit v1.2.1 From 16c9abf1ee95551d130e8b8eb454c440ca4c2eb2 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Thu, 14 Jul 2016 00:28:58 -0300 Subject: Use cattr_accessor instead duplicating code on NoteOnDiff concern --- app/models/concerns/mentionable.rb | 8 ++++---- app/models/concerns/note_on_diff.rb | 3 --- app/models/concerns/participable.rb | 7 +++++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/models/concerns/mentionable.rb b/app/models/concerns/mentionable.rb index 8cac47246db..ec9e0f1b1d0 100644 --- a/app/models/concerns/mentionable.rb +++ b/app/models/concerns/mentionable.rb @@ -14,14 +14,14 @@ module Mentionable attr = attr.to_s mentionable_attrs << [attr, options] end + end + included do # Accessor for attributes marked mentionable. - def mentionable_attrs - @mentionable_attrs ||= [] + cattr_accessor :mentionable_attrs, instance_accessor: false do + [] end - end - included do if self < Participable participant -> (user, ext) { all_references(user, extractor: ext) } end diff --git a/app/models/concerns/note_on_diff.rb b/app/models/concerns/note_on_diff.rb index 7b6a28ccf3c..2785fbb21c9 100644 --- a/app/models/concerns/note_on_diff.rb +++ b/app/models/concerns/note_on_diff.rb @@ -4,9 +4,6 @@ module NoteOnDiff NUMBER_OF_TRUNCATED_DIFF_LINES = 16 included do - attr_mentionable :note, pipeline: :note - participant :author - delegate :blob, :highlighted_diff_lines, to: :diff_file, allow_nil: true end diff --git a/app/models/concerns/participable.rb b/app/models/concerns/participable.rb index 9822844357d..70740c76e43 100644 --- a/app/models/concerns/participable.rb +++ b/app/models/concerns/participable.rb @@ -41,9 +41,12 @@ module Participable def participant(attr) participant_attrs << attr end + end - def participant_attrs - @participant_attrs ||= [] + included do + # Accessor for participant attributes. + cattr_accessor :participant_attrs, instance_accessor: false do + [] end end -- cgit v1.2.1 From efe18f0507e08c7fd0f90a99e0c241c3c4ce107a Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Wed, 13 Jul 2016 21:01:15 -0300 Subject: Update CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 5ab16db31ce..424f8956a51 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,6 +57,7 @@ v 8.10.0 (unreleased) - Throttle the update of `project.pushes_since_gc` to 1 minute. - Allow expanding and collapsing files in diff view (!4990) - Collapse large diffs by default (!4990) + - Fix mentioned users list on diff notes - Check for conflicts with existing Project's wiki path when creating a new project. - Show last push widget in upstream after push to fork - Cache todos pending/done dashboard query counts. -- cgit v1.2.1 From a9d5b07769b56286903534cde0fcf8e6063c8eb0 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 7 Jul 2016 12:36:33 +0100 Subject: Apply diff view cookie on compare Closes #19573 --- CHANGELOG | 1 + app/controllers/projects/compare_controller.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 5ab16db31ce..4beed8a8a17 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -37,6 +37,7 @@ v 8.10.0 (unreleased) - The Markdown reference parsers now re-use query results to prevent running the same queries multiple times !5020 - Updated project header design - Issuable collapsed assignee tooltip is now the users name + - Fix compare view not changing code view rendering style - Exclude email check from the standard health check - Updated layout for Projects, Groups, Users on Admin area !4424 - Fix changing issue state columns in milestone view diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index 5f3ee71444d..10749d0fef8 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -15,6 +15,7 @@ class Projects::CompareController < Projects::ApplicationController end def show + apply_diff_view_cookie! end def diff_for_path -- cgit v1.2.1 From e4a90e393fb641786eefa1a5f076ae65a554e6c0 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Thu, 30 Jun 2016 05:18:49 +0100 Subject: Updated fork page --- app/assets/stylesheets/pages/projects.scss | 48 +++++++++++++---- app/views/projects/forks/new.html.haml | 82 +++++++++++++++--------------- 2 files changed, 79 insertions(+), 51 deletions(-) diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index ea9f7cf0540..2f84dcfa67f 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -322,18 +322,46 @@ a.deploy-project-label { } .fork-namespaces { - .fork-thumbnail { - text-align: center; - margin-bottom: $gl-padding; + .row { + -webkit-flex-wrap: wrap; + display: -webkit-flex; + display: flex; + flex-wrap: wrap; + justify-content: flex-start; + + .fork-thumbnail { + @include border-radius($border-radius-base); + background-color: $white-light; + border: 1px solid $border-white-light; + height: 202px; + margin: $gl-padding; + text-align: center; + width: 169px; + &.forked { + background-color: #f8faff; + border-color: #b3d7ff; + } + &:hover { + background-color: #fcfdff; + border-color: #e6f4ff; + } - .caption { - padding: $gl-padding 0; - min-height: 30px; - } + a { + display: block; + width: 100%; + height: 100%; + padding-top: $gl-padding; + color: $gl-gray; + .caption { + min-height: 30px; + padding: $gl-padding 0; + } + } - img { - @include border-radius(50%); - max-width: 100px; + img { + @include border-radius(50%); + max-width: 100px; + } } } } diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index 73a7fc0e1ac..ebb994406de 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -1,45 +1,45 @@ - page_title "Fork project" -- if @namespaces.present? - %h3.page-title Fork project - %p.lead - Click to fork the project to a user or group - %hr - .fork-namespaces - - @namespaces.in_groups_of(6, false) do |group| - .row - - group.each do |namespace| - .col-md-2.col-sm-3 - - if fork = namespace.find_fork_of(@project) - .fork-thumbnail - = link_to project_path(fork), title: "Visit project fork", class: 'has-tooltip' do - = image_tag namespace_icon(namespace, 100) - .caption - %strong - = namespace.human_name - %div.text-primary - Already forked - - - else - .fork-thumbnail - = link_to namespace_project_forks_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has-tooltip' do - = image_tag namespace_icon(namespace, 100) - .caption - %strong - = namespace.human_name - - %p.light - Fork is a copy of a project repository. +.row.prepend-top-default + .col-lg-3 + %h4.prepend-top-0 + Fork project + %p + A fork is a copy of a project. %br - Forking a repository allows you to do changes without affecting the original project. -- else - %h3 No available namespaces to fork the project - %p.slead - You must have permission to create a project in a namespace before forking. + Forking a repository allows you to make changes without affecting the original project. + .col-lg-9 + .fork-namespaces + - if @namespaces.present? + %label.label-light + %span + Click to fork the project to a user or group + - @namespaces.in_groups_of(6, false) do |group| + .row + - group.each do |namespace| + - if fork = namespace.find_fork_of(@project) + .fork-thumbnail.forked + = link_to project_path(fork) do + = image_tag namespace_icon(namespace, 100) + .caption + = namespace.human_name + - else + .fork-thumbnail + = link_to namespace_project_forks_path(@project.namespace, @project, namespace_key: namespace.id), method: "POST" do + = image_tag namespace_icon(namespace, 100) + .caption + = namespace.human_name + - else + %label.label-light + %span + No available namespaces to fork the project. + %br + %small + You must have permission to create a project in a namespace before forking. -.save-project-loader.hide - .center - %h2 - %i.fa.fa-spinner.fa-spin - Forking repository - %p Please wait a moment, this page will automatically refresh when ready. + .save-project-loader.hide + .center + %h2 + %i.fa.fa-spinner.fa-spin + Forking repository + %p Please wait a moment, this page will automatically refresh when ready. -- cgit v1.2.1 From 1b83fa713038facef9b64c96c8c5e97be1eecd45 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Thu, 7 Jul 2016 03:44:57 +0100 Subject: Added custom no_avatar icon --- app/assets/stylesheets/pages/projects.scss | 13 ++++++++++++- app/views/projects/forks/new.html.haml | 13 +++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 2f84dcfa67f..376f70b963d 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -345,7 +345,18 @@ a.deploy-project-label { background-color: #fcfdff; border-color: #e6f4ff; } - + .no-avatar { + width: 100px; + height: 100px; + background-color: $gray-light; + border: 1px solid $gray-dark; + margin: 0 auto; + @include border-radius(50%); + i { + font-size: 100px; + color: $gray-dark; + } + } a { display: block; width: 100%; diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index ebb994406de..5242bc72b71 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -17,16 +17,25 @@ - @namespaces.in_groups_of(6, false) do |group| .row - group.each do |namespace| + - avatar = namespace_icon(namespace, 100) - if fork = namespace.find_fork_of(@project) .fork-thumbnail.forked = link_to project_path(fork) do - = image_tag namespace_icon(namespace, 100) + - if /no_((\w*)_)*avatar/.match(avatar) + .no-avatar + = icon 'question' + - else + = image_tag avatar .caption = namespace.human_name - else .fork-thumbnail = link_to namespace_project_forks_path(@project.namespace, @project, namespace_key: namespace.id), method: "POST" do - = image_tag namespace_icon(namespace, 100) + - if /no_((\w*)_)*avatar/.match(avatar) + .no-avatar + = icon 'question' + - else + = image_tag avatar .caption = namespace.human_name - else -- cgit v1.2.1 From a0838cd955577951c6fd7cf6a1f40814b8bee6f5 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Fri, 15 Jul 2016 20:05:15 +0100 Subject: Refactored to use SASS vars for color --- app/assets/stylesheets/pages/projects.scss | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 376f70b963d..306f2152129 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -337,13 +337,9 @@ a.deploy-project-label { margin: $gl-padding; text-align: center; width: 169px; - &.forked { - background-color: #f8faff; - border-color: #b3d7ff; - } - &:hover { - background-color: #fcfdff; - border-color: #e6f4ff; + &:hover, &.forked { + background-color: $row-hover; + border-color: $row-hover-border; } .no-avatar { width: 100px; -- cgit v1.2.1 From 566e01a5b1488dfa6bd19fd0818e2c0e8ea71762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Fri, 15 Jul 2016 19:14:52 +0000 Subject: Update CHANGELOG --- CHANGELOG | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 141a323ab99..80c85213842 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -282,7 +282,6 @@ v 8.9.0 - TeamCity Service: Fix URL handling when base URL contains a path - Todos will display target state if issuable target is 'Closed' or 'Merged' - Validate only and except regexp - - Make docker registry work with location redirects when external storage is used - Fix bug when sorting issues by milestone due date and filtering by two or more labels - POST to API /projects/:id/runners/:runner_id would give 409 if the runner was already enabled for this project - Add support for using Yubikeys (U2F) for two-factor authentication -- cgit v1.2.1 From ec8a25ba0b1b7cff6f432cb77574cfc181bea012 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 12 Jul 2016 14:30:09 -0600 Subject: Replace namespace-specific application.js files with namespace-bundle.js files. --- app/assets/javascripts/graphs/application.js.coffee | 7 ------- app/assets/javascripts/graphs/graphs_bundle.js.coffee | 7 +++++++ app/assets/javascripts/network/application.js.coffee | 17 ----------------- app/assets/javascripts/network/network_bundle.js.coffee | 17 +++++++++++++++++ app/assets/javascripts/profile/application.js.coffee | 2 -- app/assets/javascripts/profile/profile_bundle.js.coffee | 2 ++ app/assets/javascripts/users/application.js.coffee | 2 -- app/assets/javascripts/users/users_bundle.js.coffee | 2 ++ app/views/profiles/_head.html.haml | 2 +- app/views/projects/graphs/_head.html.haml | 2 +- app/views/projects/network/show.html.haml | 2 +- app/views/users/show.html.haml | 2 +- config/application.rb | 8 ++++---- 13 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 app/assets/javascripts/graphs/application.js.coffee create mode 100644 app/assets/javascripts/graphs/graphs_bundle.js.coffee delete mode 100644 app/assets/javascripts/network/application.js.coffee create mode 100644 app/assets/javascripts/network/network_bundle.js.coffee delete mode 100644 app/assets/javascripts/profile/application.js.coffee create mode 100644 app/assets/javascripts/profile/profile_bundle.js.coffee delete mode 100644 app/assets/javascripts/users/application.js.coffee create mode 100644 app/assets/javascripts/users/users_bundle.js.coffee diff --git a/app/assets/javascripts/graphs/application.js.coffee b/app/assets/javascripts/graphs/application.js.coffee deleted file mode 100644 index e0f681acf0b..00000000000 --- a/app/assets/javascripts/graphs/application.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -# This is a manifest file that'll be compiled into including all the files listed below. -# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -# be included in the compiled file accessible from http://example.com/assets/application.js -# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -# the compiled file. -# -#= require_tree . diff --git a/app/assets/javascripts/graphs/graphs_bundle.js.coffee b/app/assets/javascripts/graphs/graphs_bundle.js.coffee new file mode 100644 index 00000000000..e0f681acf0b --- /dev/null +++ b/app/assets/javascripts/graphs/graphs_bundle.js.coffee @@ -0,0 +1,7 @@ +# This is a manifest file that'll be compiled into including all the files listed below. +# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +# be included in the compiled file accessible from http://example.com/assets/application.js +# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +# the compiled file. +# +#= require_tree . diff --git a/app/assets/javascripts/network/application.js.coffee b/app/assets/javascripts/network/application.js.coffee deleted file mode 100644 index f75f63869c5..00000000000 --- a/app/assets/javascripts/network/application.js.coffee +++ /dev/null @@ -1,17 +0,0 @@ -# This is a manifest file that'll be compiled into including all the files listed below. -# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -# be included in the compiled file accessible from http://example.com/assets/application.js -# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -# the compiled file. -# -#= require_tree . - -$ -> - network_graph = new Network({ - url: $(".network-graph").attr('data-url'), - commit_url: $(".network-graph").attr('data-commit-url'), - ref: $(".network-graph").attr('data-ref'), - commit_id: $(".network-graph").attr('data-commit-id') - }) - - new ShortcutsNetwork(network_graph.branch_graph) diff --git a/app/assets/javascripts/network/network_bundle.js.coffee b/app/assets/javascripts/network/network_bundle.js.coffee new file mode 100644 index 00000000000..f75f63869c5 --- /dev/null +++ b/app/assets/javascripts/network/network_bundle.js.coffee @@ -0,0 +1,17 @@ +# This is a manifest file that'll be compiled into including all the files listed below. +# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +# be included in the compiled file accessible from http://example.com/assets/application.js +# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +# the compiled file. +# +#= require_tree . + +$ -> + network_graph = new Network({ + url: $(".network-graph").attr('data-url'), + commit_url: $(".network-graph").attr('data-commit-url'), + ref: $(".network-graph").attr('data-ref'), + commit_id: $(".network-graph").attr('data-commit-id') + }) + + new ShortcutsNetwork(network_graph.branch_graph) diff --git a/app/assets/javascripts/profile/application.js.coffee b/app/assets/javascripts/profile/application.js.coffee deleted file mode 100644 index 91cacfece46..00000000000 --- a/app/assets/javascripts/profile/application.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -# -#= require_tree . diff --git a/app/assets/javascripts/profile/profile_bundle.js.coffee b/app/assets/javascripts/profile/profile_bundle.js.coffee new file mode 100644 index 00000000000..91cacfece46 --- /dev/null +++ b/app/assets/javascripts/profile/profile_bundle.js.coffee @@ -0,0 +1,2 @@ +# +#= require_tree . diff --git a/app/assets/javascripts/users/application.js.coffee b/app/assets/javascripts/users/application.js.coffee deleted file mode 100644 index 91cacfece46..00000000000 --- a/app/assets/javascripts/users/application.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -# -#= require_tree . diff --git a/app/assets/javascripts/users/users_bundle.js.coffee b/app/assets/javascripts/users/users_bundle.js.coffee new file mode 100644 index 00000000000..91cacfece46 --- /dev/null +++ b/app/assets/javascripts/users/users_bundle.js.coffee @@ -0,0 +1,2 @@ +# +#= require_tree . diff --git a/app/views/profiles/_head.html.haml b/app/views/profiles/_head.html.haml index 003884a5bd9..943ebdaeffe 100644 --- a/app/views/profiles/_head.html.haml +++ b/app/views/profiles/_head.html.haml @@ -1,3 +1,3 @@ - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/cropper.js') - = page_specific_javascript_tag('profile/application.js') + = page_specific_javascript_tag('profile/profile_bundle.js') diff --git a/app/views/projects/graphs/_head.html.haml b/app/views/projects/graphs/_head.html.haml index ca347406dfe..45e51389c00 100644 --- a/app/views/projects/graphs/_head.html.haml +++ b/app/views/projects/graphs/_head.html.haml @@ -3,7 +3,7 @@ - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/chart.js') - = page_specific_javascript_tag('graphs/application.js') + = page_specific_javascript_tag('graphs/graphs_bundle.js') = nav_link(action: :show) do = link_to 'Contributors', namespace_project_graph_path = nav_link(action: :commits) do diff --git a/app/views/projects/network/show.html.haml b/app/views/projects/network/show.html.haml index 091af4df4a1..b2ece44d966 100644 --- a/app/views/projects/network/show.html.haml +++ b/app/views/projects/network/show.html.haml @@ -1,7 +1,7 @@ - page_title "Network", @ref - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/raphael.js') - = page_specific_javascript_tag('network/application.js') + = page_specific_javascript_tag('network/network_bundle.js') = render "projects/commits/head" = render "head" %div{ class: container_class } diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index db2b4885861..c7f39868e71 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -2,7 +2,7 @@ - page_description @user.bio - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/d3.js') - = page_specific_javascript_tag('users/application.js') + = page_specific_javascript_tag('users/users_bundle.js') - header_title @user.name, user_path(@user) - @no_container = true diff --git a/config/application.rb b/config/application.rb index 21e7cc7b6e8..843502a9826 100644 --- a/config/application.rb +++ b/config/application.rb @@ -81,10 +81,10 @@ module Gitlab config.assets.precompile << "print.css" config.assets.precompile << "notify.css" config.assets.precompile << "mailers/*.css" - config.assets.precompile << "graphs/application.js" - config.assets.precompile << "users/application.js" - config.assets.precompile << "network/application.js" - config.assets.precompile << "profile/application.js" + config.assets.precompile << "graphs/graphs_bundle.js" + config.assets.precompile << "users/users_bundle.js" + config.assets.precompile << "network/network_bundle.js" + config.assets.precompile << "profile/profile_bundle.js" config.assets.precompile << "lib/utils/*.js" config.assets.precompile << "lib/*.js" -- cgit v1.2.1 From c5555c8a84f10dd4a3f3f213bcf8b088e2a79718 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 15 Jul 2016 17:32:49 -0500 Subject: Don't fail when a LegacyDiffNote didn't store the right diff --- app/models/legacy_diff_note.rb | 4 ++-- app/views/notify/note_merge_request_email.html.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/legacy_diff_note.rb b/app/models/legacy_diff_note.rb index 790dfd4d480..04a651d50ab 100644 --- a/app/models/legacy_diff_note.rb +++ b/app/models/legacy_diff_note.rb @@ -38,7 +38,7 @@ class LegacyDiffNote < Note end def diff_line - @diff_line ||= diff_file.line_for_line_code(self.line_code) + @diff_line ||= diff_file.line_for_line_code(self.line_code) if diff_file end def for_line?(line) @@ -55,7 +55,7 @@ class LegacyDiffNote < Note def active? return @active if defined?(@active) return true if for_commit? - return true unless self.diff + return true unless diff_line return false unless noteable noteable_diff = find_noteable_diff diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml index 35c4b862bb7..ea7e3d199fd 100644 --- a/app/views/notify/note_merge_request_email.html.haml +++ b/app/views/notify/note_merge_request_email.html.haml @@ -1,4 +1,4 @@ -- if @note.diff_note? +- if @note.diff_note? && @note.diff_file %p.details New comment on diff for = link_to @note.diff_file.file_path, @target_url -- cgit v1.2.1 From 979f1182ae7f036e5b647cdab6c80ca73ede968a Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 15 Jul 2016 17:33:30 -0500 Subject: Don't fail when Ci::Pipeline doesn't have a project --- app/models/ci/pipeline.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index fa4071e2482..7d743ce99f0 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -215,6 +215,8 @@ module Ci end def keep_around_commits + return unless project + project.repository.keep_around(self.sha) project.repository.keep_around(self.before_sha) end -- cgit v1.2.1 From 34653c1e8be0be230943c39713da424a9e22d15b Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 15 Jul 2016 18:17:15 -0500 Subject: Update tests --- spec/models/legacy_diff_note_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/models/legacy_diff_note_spec.rb b/spec/models/legacy_diff_note_spec.rb index d64d89edbd3..d23fc06c3ad 100644 --- a/spec/models/legacy_diff_note_spec.rb +++ b/spec/models/legacy_diff_note_spec.rb @@ -16,10 +16,10 @@ describe LegacyDiffNote, models: true do end describe '#active?' do - it 'is always true when the note has no associated diff' do + it 'is always true when the note has no associated diff line' do note = build(:legacy_diff_note_on_merge_request) - expect(note).to receive(:diff).and_return(nil) + expect(note).to receive(:diff_line).and_return(nil) expect(note).to be_active end @@ -27,7 +27,7 @@ describe LegacyDiffNote, models: true do it 'is never true when the note has no noteable associated' do note = build(:legacy_diff_note_on_merge_request) - expect(note).to receive(:diff).and_return(double) + expect(note).to receive(:diff_line).and_return(double) expect(note).to receive(:noteable).and_return(nil) expect(note).not_to be_active @@ -47,7 +47,7 @@ describe LegacyDiffNote, models: true do merge = build_stubbed(:merge_request, :simple) note = build(:legacy_diff_note_on_merge_request, noteable: merge) - allow(note).to receive(:diff).and_return(double) + allow(note).to receive(:diff_line).and_return(double) expect(note).to receive(:find_noteable_diff).and_return(nil) expect(note).not_to be_active -- cgit v1.2.1 From 2e9d53586874a83cea7e7d29a49bde1180e15829 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Tue, 12 Jul 2016 18:19:47 -0300 Subject: Allow build email service to be tested --- CHANGELOG | 1 + app/controllers/projects/services_controller.rb | 3 +- app/mailers/emails/builds.rb | 1 + .../project_services/builds_email_service.rb | 27 +++++++++++++++ app/models/service.rb | 9 +++++ app/views/projects/services/_form.html.haml | 2 +- .../project_services/builds_email_service_spec.rb | 38 ++++++++++++++++++++++ 7 files changed, 79 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5518429e1b5..d898b2cf180 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -24,6 +24,7 @@ v 8.10.0 (unreleased) - Add a new column `artifacts_size` to table `ci_builds` !4964 - Let Workhorse serve format-patch diffs - Display tooltip for mentioned users and groups !5261 (winniehell) + - Allow build email service to be tested - Added day name to contribution calendar tooltips - Make images fit to the size of the viewport !4810 - Fix check for New Branch button on Issue page !4630 (winniehell) diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index 739681f4085..1b91882048e 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -45,8 +45,9 @@ class Projects::ServicesController < Projects::ApplicationController end def test - data = Gitlab::PushDataBuilder.build_sample(project, current_user) + data = @service.test_data(project, current_user) outcome = @service.test(data) + if outcome[:success] message = { notice: 'We sent a request to the provided URL' } else diff --git a/app/mailers/emails/builds.rb b/app/mailers/emails/builds.rb index 2f86d1be576..3853af6201a 100644 --- a/app/mailers/emails/builds.rb +++ b/app/mailers/emails/builds.rb @@ -6,6 +6,7 @@ module Emails add_project_headers add_build_headers('failed') + mail(to: to, subject: subject("Build failed for #{@project.name}", @build.short_sha)) end diff --git a/app/models/project_services/builds_email_service.rb b/app/models/project_services/builds_email_service.rb index 54da4d74fc5..5e166471077 100644 --- a/app/models/project_services/builds_email_service.rb +++ b/app/models/project_services/builds_email_service.rb @@ -42,6 +42,19 @@ class BuildsEmailService < Service end end + def can_test? + project.builds.count > 0 + end + + def disabled_title + "Please setup a build on your repository." + end + + def test_data(project = nil, user = nil) + build = project.builds.last + Gitlab::BuildDataBuilder.build(build) + end + def fields [ { type: 'textarea', name: 'recipients', placeholder: 'Emails separated by comma' }, @@ -50,6 +63,20 @@ class BuildsEmailService < Service ] end + def test(data) + begin + # bypass build status verification when testing + data[:build_status] = "failed" + data[:build_allow_failure] = false + + result = execute(data) + rescue StandardError => error + return { success: false, result: error } + end + + { success: true, result: result } + end + def should_build_be_notified?(data) case data[:build_status] when 'success' diff --git a/app/models/service.rb b/app/models/service.rb index d7a32c28267..5432f8c7ab4 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -76,6 +76,10 @@ class Service < ActiveRecord::Base [] end + def test_data(project, user) + Gitlab::PushDataBuilder.build_sample(project, user) + end + def supported_events %w(push tag_push issue merge_request wiki_page) end @@ -94,6 +98,11 @@ class Service < ActiveRecord::Base !project.empty_repo? end + # reason why service cannot be tested + def disabled_title + "Please setup a project repository." + end + # Provide convenient accessor methods # for each serialized property. # Also keep track of updated properties in a similar way as ActiveModel::Dirty diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 1f13ea28b4e..166dc4a01fc 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -12,5 +12,5 @@   - if @service.valid? && @service.activated? - disabled = @service.can_test? ? '':'disabled' - = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service.to_param), class: "btn #{disabled}" + = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service), class: "btn #{disabled}", title: @service.disabled_title = link_to "Cancel", namespace_project_services_path(@project.namespace, @project), class: "btn btn-cancel" diff --git a/spec/models/project_services/builds_email_service_spec.rb b/spec/models/project_services/builds_email_service_spec.rb index 236df8f047d..ca2cd8aa551 100644 --- a/spec/models/project_services/builds_email_service_spec.rb +++ b/spec/models/project_services/builds_email_service_spec.rb @@ -23,6 +23,44 @@ describe BuildsEmailService do end end + describe '#test_data' do + let(:build) { create(:ci_build) } + let(:project) { build.project } + let(:user) { create(:user) } + + before { project.team << [user, :developer] } + + it 'builds test data' do + data = subject.test_data(project) + + expect(data[:object_kind]).to eq("build") + end + end + + describe '#test' do + it 'sends email' do + data = Gitlab::BuildDataBuilder.build(create(:ci_build)) + subject.recipients = 'test@gitlab.com' + + expect(BuildEmailWorker).to receive(:perform_async) + + subject.test(data) + end + + context 'notify only failed builds is true' do + it 'sends email' do + data = Gitlab::BuildDataBuilder.build(create(:ci_build)) + data[:build_status] = "success" + subject.recipients = 'test@gitlab.com' + + expect(subject).not_to receive(:notify_only_broken_builds) + expect(BuildEmailWorker).to receive(:perform_async) + + subject.test(data) + end + end + end + describe '#execute' do it 'sends email' do subject.recipients = 'test@gitlab.com' -- cgit v1.2.1 From 2735e5f1c2859ad496bc4f7bd820a7be33f97527 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 15 Jul 2016 23:46:29 +0000 Subject: Revert "Merge branch 'gl-dropdown-issuable-form' into 'master'" This reverts merge request !4970 --- app/assets/javascripts/dispatcher.js.coffee | 2 -- app/assets/javascripts/labels_select.js.coffee | 31 ++++++------------- app/assets/javascripts/milestone_select.js.coffee | 2 +- app/assets/javascripts/users_select.js.coffee | 9 ++---- app/assets/stylesheets/framework/dropdowns.scss | 2 +- app/assets/stylesheets/pages/merge_requests.scss | 4 --- app/helpers/issuables_helper.rb | 2 +- app/views/shared/issuable/_filter.html.haml | 4 +-- app/views/shared/issuable/_form.html.haml | 36 +++++++++++++++------- .../shared/issuable/_label_dropdown.html.haml | 14 ++++----- .../shared/issuable/_milestone_dropdown.html.haml | 8 ++--- features/project/issues/issues.feature | 1 - features/steps/project/forked_merge_requests.rb | 12 +++++--- features/steps/project/issues/issues.rb | 3 +- spec/features/issues/move_spec.rb | 2 +- spec/features/issues_spec.rb | 5 +-- 16 files changed, 65 insertions(+), 72 deletions(-) diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee index b5da15e9e49..afaa6407b05 100644 --- a/app/assets/javascripts/dispatcher.js.coffee +++ b/app/assets/javascripts/dispatcher.js.coffee @@ -39,8 +39,6 @@ class Dispatcher shortcut_handler = new ShortcutsNavigation() new GLForm($('.issue-form')) new IssuableForm($('.issue-form')) - new LabelsSelect() - new MilestoneSelect() when 'projects:merge_requests:new', 'projects:merge_requests:edit' new Diff() shortcut_handler = new ShortcutsNavigation() diff --git a/app/assets/javascripts/labels_select.js.coffee b/app/assets/javascripts/labels_select.js.coffee index 1a802b81452..7688609b301 100644 --- a/app/assets/javascripts/labels_select.js.coffee +++ b/app/assets/javascripts/labels_select.js.coffee @@ -184,22 +184,20 @@ class @LabelsSelect .value() if $dropdown.hasClass 'js-extra-options' - extraData = [] - if showAny - extraData.push( - isAny: true - title: 'Any Label' - ) - if showNo - extraData.push( + data.unshift( id: 0 title: 'No Label' ) - if extraData.length - extraData.push 'divider' - data = extraData.concat(data) + if showAny + data.unshift( + isAny: true + title: 'Any Label' + ) + + if data.length > 2 + data.splice 2, 0, 'divider' callback data @@ -289,12 +287,6 @@ class @LabelsSelect defaultLabel fieldName: $dropdown.data('field-name') id: (label) -> - if $dropdown.hasClass('js-issuable-form-dropdown') - if label.id is 0 - return - else - return label.id - if $dropdown.hasClass("js-filter-submit") and not label.isAny? label.title else @@ -308,9 +300,6 @@ class @LabelsSelect $selectbox.hide() # display:block overrides the hide-collapse rule $value.removeAttr('style') - - return if $dropdown.hasClass('js-issuable-form-dropdown') - if $dropdown.hasClass 'js-multiselect' if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex) selectedLabels = $dropdown @@ -332,7 +321,7 @@ class @LabelsSelect clicked: (label) -> _this.enableBulkLabelDropdown() - if $dropdown.hasClass('js-filter-bulk-update') or $dropdown.hasClass('js-issuable-form-dropdown') + if $dropdown.hasClass('js-filter-bulk-update') return page = $('body').data 'page' diff --git a/app/assets/javascripts/milestone_select.js.coffee b/app/assets/javascripts/milestone_select.js.coffee index 3a036569317..8ab03ed93ee 100644 --- a/app/assets/javascripts/milestone_select.js.coffee +++ b/app/assets/javascripts/milestone_select.js.coffee @@ -62,7 +62,7 @@ class @MilestoneSelect title: 'Upcoming' ) - if extraOptions.length > 0 + if extraOptions.length > 2 extraOptions.push 'divider' callback(extraOptions.concat(data)) diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee index e061f042ca9..344be811e0d 100644 --- a/app/assets/javascripts/users_select.js.coffee +++ b/app/assets/javascripts/users_select.js.coffee @@ -155,13 +155,11 @@ class @UsersSelect # display:block overrides the hide-collapse rule $value.css('display', '') - clicked: (user, $el, e) -> + clicked: (user) -> page = $('body').data 'page' isIssueIndex = page is 'projects:issues:index' isMRIndex = page is page is 'projects:merge_requests:index' - if $dropdown.hasClass('js-filter-bulk-update') or $dropdown.hasClass('js-issuable-form-dropdown') - e.preventDefault() - selectedId = user.id + if $dropdown.hasClass('js-filter-bulk-update') return if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex) @@ -174,8 +172,7 @@ class @UsersSelect .closest('.selectbox') .find("input[name='#{$dropdown.data('field-name')}']").val() assignTo(selected) - id: (user) -> - user.id + renderRow: (user) -> username = if user.username then "@#{user.username}" else "" avatar = if user.avatar_url then user.avatar_url else false diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss index 3fd0e12568d..d4e900f80ef 100644 --- a/app/assets/stylesheets/framework/dropdowns.scss +++ b/app/assets/stylesheets/framework/dropdowns.scss @@ -56,7 +56,7 @@ position: absolute; top: 50%; right: 6px; - margin-top: -6px; + margin-top: -4px; color: $dropdown-toggle-icon-color; font-size: 10px; } diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index dba9a7ab3ee..15c6c9f231a 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -324,10 +324,6 @@ .issuable-form-select-holder { display: inline-block; width: 250px; - - .dropdown-menu-toggle { - width: 100%; - } } .table-holder { diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index a3a8c7d5ff9..47d174361db 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -9,7 +9,7 @@ module IssuablesHelper def multi_label_name(current_labels, default_label) # current_labels may be a string from before - if current_labels.is_a?(Array) && current_labels.any? + if current_labels.is_a?(Array) if current_labels.count > 1 "#{current_labels[0]} +#{current_labels.count - 1} more" else diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index d5199bd86dd..094d6636c66 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -21,10 +21,10 @@ placeholder: "Search assignee", data: { any_user: "Any Assignee", first_user: (current_user.username if current_user), null_user: true, current_user: true, project_id: (@project.id if @project), selected: params[:assignee_id], field_name: "assignee_id", default_label: "Assignee" } }) .filter-item.inline.milestone-filter - = render "shared/issuable/milestone_dropdown", selected: params[:milestone_title], name: :milestone_title, show_any: true, show_upcoming: true + = render "shared/issuable/milestone_dropdown" .filter-item.inline.labels-filter - = render "shared/issuable/label_dropdown", selected: params[:label_name], data_options: { field_name: "label_name[]" } + = render "shared/issuable/label_dropdown" .pull-right = render 'shared/sort_dropdown' diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index a8a8426df52..c30bdb0ae91 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -52,24 +52,38 @@ = f.label :assignee_id, "Assignee", class: "control-label #{"col-lg-4" if has_due_date}" .col-sm-10{ class: ("col-lg-8" if has_due_date) } .issuable-form-select-holder - - project = @target_project || @project - - if issuable.assignee_id - = hidden_field_tag("#{issuable.class.model_name.param_key}[assignee_id]", issuable.assignee_id) - = dropdown_tag(user_dropdown_label(issuable.assignee_id, "Assignee"), options: { toggle_class: "js-user-search js-issuable-form-dropdown js-assignee-search", title: "Filter by assignee", filter: true, dropdown_class: "dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit", - placeholder: "Search assignee", data: { first_user: (current_user.username if current_user), null_user: true, current_user: true, project_id: (project.id if project), selected: issuable.assignee_id, field_name: "#{issuable.class.model_name.param_key}[assignee_id]", default_label: "Assignee" } }) + = users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]", + placeholder: 'Select assignee', class: 'custom-form-control', null_user: true, + selected: issuable.assignee_id, project: @target_project || @project, + first_user: true, current_user: true, include_blank: true) + %div + = link_to 'Assign to me', '#', class: 'assign-to-me-link prepend-top-5 inline' .form-group.issue-milestone = f.label :milestone_id, "Milestone", class: "control-label #{"col-lg-4" if has_due_date}" .col-sm-10{ class: ("col-lg-8" if has_due_date) } - .issuable-form-select-holder - = render "shared/issuable/milestone_dropdown", selected: issuable.milestone_id, name: "#{issuable.class.model_name.param_key}[milestone_id]", show_any: false, show_upcoming: false + - if milestone_options(issuable).present? + .issuable-form-select-holder + = f.select(:milestone_id, milestone_options(issuable), + { include_blank: true }, { class: 'select2', data: { placeholder: 'Select milestone' } }) + - else + .prepend-top-10 + %span.light No open milestones available. + - if can? current_user, :admin_milestone, issuable.project + %div + = link_to 'Create new milestone', new_namespace_project_milestone_path(issuable.project.namespace, issuable.project), target: :blank, class: "prepend-top-5 inline" .form-group - has_labels = issuable.project.labels.any? - - selected_labels = issuable.label_ids.any? ? issuable.label_ids : nil - - label_dropdown_toggle = issuable.labels.map { |label| label.title } = f.label :label_ids, "Labels", class: "control-label #{"col-lg-4" if has_due_date}" .col-sm-10{ class: "#{"col-lg-8" if has_due_date} #{'issuable-form-padding-top' if !has_labels}" } - .issuable-form-select-holder - = render "shared/issuable/label_dropdown", classes: ["js-issuable-form-dropdown"], selected: selected_labels, selected_toggle: label_dropdown_toggle, data_options: { field_name: "#{issuable.class.model_name.param_key}[label_ids][]", show_any: "false" } + - if has_labels + .issuable-form-select-holder + = f.collection_select :label_ids, issuable.project.labels.all, :id, :name, + { selected: issuable.label_ids }, multiple: true, class: 'select2', data: { placeholder: "Select labels" } + - else + %span.light No labels yet. + - if can? current_user, :admin_label, issuable.project + %div + = link_to 'Create new label', new_namespace_project_label_path(issuable.project.namespace, issuable.project), target: :blank, class: "prepend-top-5 inline" - if has_due_date .col-lg-6 .form-group diff --git a/app/views/shared/issuable/_label_dropdown.html.haml b/app/views/shared/issuable/_label_dropdown.html.haml index bcbe133ce62..d34d28f6736 100644 --- a/app/views/shared/issuable/_label_dropdown.html.haml +++ b/app/views/shared/issuable/_label_dropdown.html.haml @@ -4,21 +4,19 @@ - show_footer = local_assigns.fetch(:show_footer, true) - data_options = local_assigns.fetch(:data_options, {}) - classes = local_assigns.fetch(:classes, []) -- selected = local_assigns.fetch(:selected, nil) -- selected_toggle = local_assigns.fetch(:selected_toggle, nil) -- dropdown_data = {toggle: 'dropdown', field_name: "label_name[]", show_no: "true", show_any: "true", selected: selected, project_id: @project.try(:id), labels: labels_filter_path, default_label: "Label"} +- dropdown_data = {toggle: 'dropdown', field_name: 'label_name[]', show_no: "true", show_any: "true", selected: params[:label_name], project_id: @project.try(:id), labels: labels_filter_path, default_label: "Label"} - dropdown_data.merge!(data_options) - classes << 'js-extra-options' if extra_options - classes << 'js-filter-submit' if filter_submit -- if selected.present? - - if selected.respond_to?('any?') - - selected.each do |label| - = hidden_field_tag data_options[:field_name], label, id: nil +- if params[:label_name].present? + - if params[:label_name].respond_to?('any?') + - params[:label_name].each do |label| + = hidden_field_tag "label_name[]", label, id: nil .dropdown %button.dropdown-menu-toggle.js-label-select.js-multiselect{class: classes.join(' '), type: "button", data: dropdown_data} %span.dropdown-toggle-text - = h(multi_label_name(selected_toggle || selected, "Label")) + = h(multi_label_name(params[:label_name], "Label")) = icon('chevron-down') .dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable = render partial: "shared/issuable/label_page_default", locals: { title: "Filter by label", show_footer: show_footer, show_create: show_create } diff --git a/app/views/shared/issuable/_milestone_dropdown.html.haml b/app/views/shared/issuable/_milestone_dropdown.html.haml index 9188ef72d52..2fcf40ece99 100644 --- a/app/views/shared/issuable/_milestone_dropdown.html.haml +++ b/app/views/shared/issuable/_milestone_dropdown.html.haml @@ -1,7 +1,7 @@ -- if selected.present? - = hidden_field_tag(name, selected) -= dropdown_tag(milestone_dropdown_label(selected), options: { title: "Filter by milestone", toggle_class: 'js-milestone-select js-filter-submit', filter: true, dropdown_class: "dropdown-menu-selectable", - placeholder: "Search milestones", footer_content: @project.present?, data: { show_no: true, show_any: show_any, show_upcoming: show_upcoming, field_name: name, selected: selected, project_id: @project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do +- if params[:milestone_title].present? + = hidden_field_tag(:milestone_title, params[:milestone_title]) += dropdown_tag(milestone_dropdown_label(params[:milestone_title]), options: { title: "Filter by milestone", toggle_class: 'js-milestone-select js-filter-submit', filter: true, dropdown_class: "dropdown-menu-selectable", + placeholder: "Search milestones", footer_content: @project.present?, data: { show_no: true, show_any: true, show_upcoming: true, field_name: "milestone_title", selected: params[:milestone_title], project_id: @project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do - if @project %ul.dropdown-footer-list - if can? current_user, :admin_milestone, @project diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature index 80670063ea0..358e622b736 100644 --- a/features/project/issues/issues.feature +++ b/features/project/issues/issues.feature @@ -37,7 +37,6 @@ Feature: Project Issues And I submit new issue "500 error on profile" Then I should see issue "500 error on profile" - @javascript Scenario: I submit new unassigned issue with labels Given project "Shop" has labels: "bug", "feature", "enhancement" And I click link "New Issue" diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb index 8f71dfdd899..6b56a77b832 100644 --- a/features/steps/project/forked_merge_requests.rb +++ b/features/steps/project/forked_merge_requests.rb @@ -135,17 +135,19 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps end step 'I click "Assign to" dropdown"' do - click_button 'Assignee' + first('.ajax-users-select').click end step 'I should see the target project ID in the input selector' do - expect(find('.js-assignee-search')["data-project-id"]).to eq "#{@project.id}" + expect(page).to have_selector("input[data-project-id=\"#{@project.id}\"]") end step 'I should see the users from the target project ID' do - expect(page).to have_content 'Unassigned' - expect(page).to have_content current_user.name - expect(page).to have_content @project.users.first.name + expect(page).to have_selector('.user-result', visible: true, count: 3) + users = page.all('.user-name') + expect(users[0].text).to eq 'Unassigned' + expect(users[1].text).to eq current_user.name + expect(users[2].text).to eq @project.users.first.name end # Verify a link is generated against the correct project diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index b785e15f70e..35f166c7c08 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -82,8 +82,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps step 'I submit new issue "500 error on profile" with label \'bug\'' do fill_in "issue_title", with: "500 error on profile" - click_button "Label" - click_link "bug" + select 'bug', from: "Labels" click_button "Submit issue" end diff --git a/spec/features/issues/move_spec.rb b/spec/features/issues/move_spec.rb index 055210399a7..7773c486b4e 100644 --- a/spec/features/issues/move_spec.rb +++ b/spec/features/issues/move_spec.rb @@ -55,7 +55,7 @@ feature 'issue move to another project' do first('.select2-choice').click end - fill_in('s2id_autogen1_search', with: new_project_search.name) + fill_in('s2id_autogen2_search', with: new_project_search.name) page.within '.select2-drop' do expect(page).to have_content(new_project_search.name) diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index d00cffa4e2b..d51c9abea19 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -50,8 +50,9 @@ describe 'Issues', feature: true do expect(page).to have_content "Assignee #{@user.name}" - first('.js-user-search').click - click_link 'Unassigned' + first('#s2id_issue_assignee_id').click + sleep 2 # wait for ajax stuff to complete + first('.user-result').click click_button 'Save changes' -- cgit v1.2.1 From 82959349dd97450a166d42547083f8dfd3d1491e Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 15 Jul 2016 20:22:35 -0500 Subject: Don't fail to highlight when Rouge doesn't have a lexer --- lib/banzai/filter/syntax_highlight_filter.rb | 15 +++++----- .../banzai/filter/syntax_highlight_filter_spec.rb | 34 +++++++++++++++++----- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index 028edef704b..91f0159f9a1 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -19,21 +19,22 @@ module Banzai language = node.attr('class') code = node.text - lexer = Rouge::Lexer.find_fancy(language) + css_classes = "code highlight" + + lexer = Rouge::Lexer.find_fancy(language) || Rouge::Lexers::PlainText formatter = Rouge::Formatters::HTML.new - css_classes = "code highlight js-syntax-highlight #{lexer.tag}" begin - highlighted = '' - highlighted << %(
)
-          highlighted << formatter.format(lexer.lex(code))
-          highlighted << %(
) + code = formatter.format(lexer.lex(code)) + + css_classes << " js-syntax-highlight #{lexer.tag}" rescue # Gracefully handle syntax highlighter bugs/errors to ensure # users can still access an issue/comment/etc. - highlighted = "
#{code}
" end + highlighted = %(
#{code}
) + # Extracted to a method to measure it replace_parent_pre_element(node, highlighted) end diff --git a/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb b/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb index 48ebc81cf82..b1370bca833 100644 --- a/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb +++ b/spec/lib/banzai/filter/syntax_highlight_filter_spec.rb @@ -3,15 +3,35 @@ require 'spec_helper' describe Banzai::Filter::SyntaxHighlightFilter, lib: true do include FilterSpecHelper - it 'highlights valid code blocks' do - result = filter('
def fun end')
-    expect(result.to_html).to eq("
def fun end
") + context "when no language is specified" do + it "highlights as plaintext" do + result = filter('
def fun end
') + expect(result.to_html).to eq('
def fun end
') + end end - it 'passes through invalid code blocks' do - allow_any_instance_of(Rouge::Formatter).to receive(:format).and_raise(StandardError) + context "when a valid language is specified" do + it "highlights as that language" do + result = filter('
def fun end
') + expect(result.to_html).to eq('
def fun end
') + end + end + + context "when an invalid language is specified" do + it "highlights as plaintext" do + result = filter('
This is a test
') + expect(result.to_html).to eq('
This is a test
') + end + end + + context "when Rouge formatting fails" do + before do + allow_any_instance_of(Rouge::Formatter).to receive(:format).and_raise(StandardError) + end - result = filter('
This is a test
') - expect(result.to_html).to eq('
This is a test
') + it "highlights as plaintext" do + result = filter('
This is a test
') + expect(result.to_html).to eq('
This is a test
') + end end end -- cgit v1.2.1 From e94d3834c7d32f6e8a1d3d4c32d8be8cb1d7810c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Fri, 15 Jul 2016 21:31:26 -0400 Subject: Fix a bug where the project's repository path was returned instead of the wiki path --- lib/api/internal.rb | 7 ++++++- spec/requests/api/internal_spec.rb | 14 +++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/api/internal.rb b/lib/api/internal.rb index d5dfba5e0cc..959b700de78 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -63,7 +63,12 @@ module API if access_status.status # Return the repository full path so that gitlab-shell has it when # handling ssh commands - response[:repository_path] = project.repository.path_to_repo + response[:repository_path] = + if wiki? + project.wiki.repository.path_to_repo + else + project.repository.path_to_repo + end end response diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index e567d36afa8..f6f85d6e95e 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -56,13 +56,21 @@ describe API::API, api: true do context "git push with project.wiki" do it 'responds with success' do - project_wiki = create(:project, name: 'my.wiki', path: 'my.wiki') - project_wiki.team << [user, :developer] + push(key, project.wiki) - push(key, project_wiki) + expect(response).to have_http_status(200) + expect(json_response["status"]).to be_truthy + expect(json_response["repository_path"]).to eq(project.wiki.repository.path_to_repo) + end + end + + context "git pull with project.wiki" do + it 'responds with success' do + pull(key, project.wiki) expect(response).to have_http_status(200) expect(json_response["status"]).to be_truthy + expect(json_response["repository_path"]).to eq(project.wiki.repository.path_to_repo) end end -- cgit v1.2.1 From 72818f2c1573b7664d4b41692dc51db1e5c28fbb Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 15 Jul 2016 16:17:46 +0200 Subject: Fix creation of deployment on build that is retried, redeployed or rollback --- CHANGELOG | 1 + app/models/ci/build.rb | 1 + spec/services/create_deployment_service_spec.rb | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 5518429e1b5..0ab37eea3c6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -60,6 +60,7 @@ v 8.10.0 (unreleased) - Allow expanding and collapsing files in diff view (!4990) - Collapse large diffs by default (!4990) - Fix mentioned users list on diff notes + - Fix creation of deployment on build that is retried, redeployed or rollback - Check for conflicts with existing Project's wiki path when creating a new project. - Show last push widget in upstream after push to fork - Cache todos pending/done dashboard query counts. diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index e189dbac285..b24527247e0 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -53,6 +53,7 @@ module Ci new_build.stage_idx = build.stage_idx new_build.trigger_request = build.trigger_request new_build.user = user + new_build.environment = build.environment new_build.save MergeRequests::AddTodoWhenBuildFailsService.new(build.project, nil).close(new_build) new_build diff --git a/spec/services/create_deployment_service_spec.rb b/spec/services/create_deployment_service_spec.rb index 654e441f3cd..8da2a2b3c1b 100644 --- a/spec/services/create_deployment_service_spec.rb +++ b/spec/services/create_deployment_service_spec.rb @@ -89,6 +89,12 @@ describe CreateDeploymentService, services: true do expect_any_instance_of(described_class).to receive(:execute) subject end + + it 'is set as deployable' do + subject + + expect(Deployment.last.deployable).to eq(deployable) + end end context 'without environment specified' do @@ -105,6 +111,8 @@ describe CreateDeploymentService, services: true do context 'when build succeeds' do it_behaves_like 'does create environment and deployment' do + let(:deployable) { build } + subject { build.success } end end @@ -114,6 +122,14 @@ describe CreateDeploymentService, services: true do subject { build.drop } end end + + context 'when build is retried' do + it_behaves_like 'does create environment and deployment' do + let(:deployable) { Ci::Build.retry(build) } + + subject { deployable.success } + end + end end end end -- cgit v1.2.1 From 9912ad261f696ef92657171396774607af7f1893 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Jul 2016 20:10:22 +0200 Subject: Store when and yaml variables in builds table --- CHANGELOG | 1 + app/models/ci/build.rb | 34 ++++---------- app/services/ci/create_builds_service.rb | 4 +- ...710_add_when_and_yaml_variables_to_ci_builds.rb | 22 +++++++++ db/schema.rb | 4 +- lib/ci/gitlab_ci_yaml_processor.rb | 53 ++++++++++++++++------ spec/factories/ci/builds.rb | 5 ++ spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 21 +++------ spec/models/build_spec.rb | 18 +------- 9 files changed, 89 insertions(+), 73 deletions(-) create mode 100644 db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb diff --git a/CHANGELOG b/CHANGELOG index 040926d270d..32f33131de1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,7 @@ v 8.10.0 (unreleased) - Align flash messages with left side of page content !4959 (winniehell) - Display tooltip for "Copy to Clipboard" button !5164 (winniehell) - Use default cursor for table header of project files !5165 (winniehell) + - Store when and yaml variables in builds table - Display last commit of deleted branch in push events !4699 (winniehell) - Escape file extension when parsing search results !5141 (winniehell) - Apply the trusted_proxies config to the rack request object for use with rack_attack diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index e189dbac285..8c18f7ceb12 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -5,6 +5,7 @@ module Ci belongs_to :erased_by, class_name: 'User' serialize :options + serialize :yaml_variables validates :coverage, numericality: true, allow_blank: true validates_presence_of :ref @@ -52,6 +53,8 @@ module Ci new_build.stage = build.stage new_build.stage_idx = build.stage_idx new_build.trigger_request = build.trigger_request + new_build.yaml_variables = build.yaml_variables + new_build.when = build.when new_build.user = user new_build.save MergeRequests::AddTodoWhenBuildFailsService.new(build.project, nil).close(new_build) @@ -117,7 +120,12 @@ module Ci end def variables - predefined_variables + yaml_variables + project_variables + trigger_variables + variables = [] + variables += predefined_variables + variables += yaml_variables if yaml_variables + variables += project_variables + variables += trigger_variables + variables end def merge_request @@ -394,30 +402,6 @@ module Ci self.update(erased_by: user, erased_at: Time.now, artifacts_expire_at: nil) end - def yaml_variables - global_yaml_variables + job_yaml_variables - end - - def global_yaml_variables - if pipeline.config_processor - pipeline.config_processor.global_variables.map do |key, value| - { key: key, value: value, public: true } - end - else - [] - end - end - - def job_yaml_variables - if pipeline.config_processor - pipeline.config_processor.job_variables(name).map do |key, value| - { key: key, value: value, public: true } - end - else - [] - end - end - def project_variables project.variables.map do |variable| { key: variable.key, value: variable.value, public: false } diff --git a/app/services/ci/create_builds_service.rb b/app/services/ci/create_builds_service.rb index 2dcb052d274..3b21f0acb96 100644 --- a/app/services/ci/create_builds_service.rb +++ b/app/services/ci/create_builds_service.rb @@ -36,7 +36,9 @@ module Ci :allow_failure, :stage, :stage_idx, - :environment) + :environment, + :when, + :yaml_variables) build_attrs.merge!(pipeline: @pipeline, ref: @pipeline.ref, diff --git a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb new file mode 100644 index 00000000000..816a32aa0d3 --- /dev/null +++ b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb @@ -0,0 +1,22 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddWhenAndYamlVariablesCiBuilds < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + add_column :ci_builds, :when, :string + add_column :ci_builds, :yaml_variables, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index f24e47b85b2..4a0df65aafb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160712171823) do +ActiveRecord::Schema.define(version: 20160716115710) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -168,6 +168,8 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.datetime "artifacts_expire_at" t.string "environment" t.integer "artifacts_size" + t.string "when" + t.text "yaml_variables" end add_index "ci_builds", ["commit_id", "stage_idx", "created_at"], name: "index_ci_builds_on_commit_id_and_stage_idx_and_created_at", using: :btree diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index 01ef13df57a..a48dc542b14 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -31,28 +31,34 @@ module Ci raise ValidationError, e.message end - def builds_for_stage_and_ref(stage, ref, tag = false, trigger_request = nil) - builds.select do |build| - build[:stage] == stage && - process?(build[:only], build[:except], ref, tag, trigger_request) + def jobs_for_ref(ref, tag = false, trigger_request = nil) + @jobs.select do |_, job| + process?(job[:only], job[:except], ref, tag, trigger_request) end end - def builds - @jobs.map do |name, job| - build_job(name, job) + def jobs_for_stage_and_ref(stage, ref, tag = false, trigger_request = nil) + jobs_for_ref(ref, tag, trigger_request).select do |_, job| + job[:stage] == stage end end - def global_variables - @variables + def builds_for_ref(ref, tag = false, trigger_request = nil) + jobs_for_ref(ref, tag, trigger_request).map do |name, job| + build_job(name, job) + end end - def job_variables(name) - job = @jobs[name.to_sym] - return [] unless job + def builds_for_stage_and_ref(stage, ref, tag = false, trigger_request = nil) + jobs_for_stage_and_ref(stage, ref, tag, trigger_request).map do |name, job| + build_job(name, job) + end + end - job[:variables] || [] + def builds + @jobs.map do |name, job| + build_job(name, job) + end end private @@ -95,11 +101,10 @@ module Ci commands: [job[:before_script] || @before_script, job[:script]].flatten.compact.join("\n"), tag_list: job[:tags] || [], name: name, - only: job[:only], - except: job[:except], allow_failure: job[:allow_failure] || false, when: job[:when] || 'on_success', environment: job[:environment], + yaml_variables: yaml_variables(name), options: { image: job[:image] || @image, services: job[:services] || @services, @@ -111,6 +116,24 @@ module Ci } end + def yaml_variables(name) + variables = global_variables.merge(job_variables(name)) + variables.map do |key, value| + { key: key, value: value, public: true } + end + end + + def global_variables + @variables || {} + end + + def job_variables(name) + job = @jobs[name.to_sym] + return {} unless job + + job[:variables] || {} + end + def validate! @jobs.each do |name, job| validate_job!(name, job) diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index fe05a0cfc00..5fb671df570 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -15,6 +15,11 @@ FactoryGirl.define do services: ["postgres"] } end + yaml_variables do + [ + { key: :DB_NAME, value: 'postgres', public: true } + ] + end pipeline factory: :ci_pipeline diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index bcbf409c8b0..6b2492b61b8 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -19,15 +19,14 @@ module Ci expect(config_processor.builds_for_stage_and_ref(type, "master").first).to eq({ stage: "test", stage_idx: 1, - except: nil, name: :rspec, - only: nil, commands: "pwd\nrspec", tag_list: [], options: {}, allow_failure: false, when: "on_success", environment: nil, + yaml_variables: {} }) end @@ -432,11 +431,9 @@ module Ci expect(config_processor.builds_for_stage_and_ref("test", "master").size).to eq(1) expect(config_processor.builds_for_stage_and_ref("test", "master").first).to eq({ - except: nil, stage: "test", stage_idx: 1, name: :rspec, - only: nil, commands: "pwd\nrspec", tag_list: [], options: { @@ -446,6 +443,7 @@ module Ci allow_failure: false, when: "on_success", environment: nil, + yaml_variables: {} }) end @@ -461,11 +459,9 @@ module Ci expect(config_processor.builds_for_stage_and_ref("test", "master").size).to eq(1) expect(config_processor.builds_for_stage_and_ref("test", "master").first).to eq({ - except: nil, stage: "test", stage_idx: 1, name: :rspec, - only: nil, commands: "pwd\nrspec", tag_list: [], options: { @@ -475,6 +471,7 @@ module Ci allow_failure: false, when: "on_success", environment: nil, + yaml_variables: [] }) end end @@ -681,11 +678,9 @@ module Ci expect(config_processor.builds_for_stage_and_ref("test", "master").size).to eq(1) expect(config_processor.builds_for_stage_and_ref("test", "master").first).to eq({ - except: nil, stage: "test", stage_idx: 1, name: :rspec, - only: nil, commands: "pwd\nrspec", tag_list: [], options: { @@ -701,6 +696,7 @@ module Ci when: "on_success", allow_failure: false, environment: nil, + yaml_variables: {} }) end @@ -819,17 +815,16 @@ module Ci it "doesn't create jobs that start with dot" do expect(subject.size).to eq(1) expect(subject.first).to eq({ - except: nil, stage: "test", stage_idx: 1, name: :normal_job, - only: nil, commands: "test", tag_list: [], options: {}, when: "on_success", allow_failure: false, environment: nil, + yaml_variables: {} }) end end @@ -865,30 +860,28 @@ module Ci it "is correctly supported for jobs" do expect(subject.size).to eq(2) expect(subject.first).to eq({ - except: nil, stage: "build", stage_idx: 0, name: :job1, - only: nil, commands: "execute-script-for-job", tag_list: [], options: {}, when: "on_success", allow_failure: false, environment: nil, + yaml_variables: {} }) expect(subject.second).to eq({ - except: nil, stage: "build", stage_idx: 0, name: :job2, - only: nil, commands: "execute-script-for-job", tag_list: [], options: {}, when: "on_success", allow_failure: false, environment: nil, + yaml_variables: {} }) end end diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index e8171788872..481416319dd 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -208,7 +208,7 @@ describe Ci::Build, models: true do end before do - build.update_attributes(stage: 'stage') + build.update_attributes(stage: 'stage', yaml_variables: yaml_variables) end it { is_expected.to eq(predefined_variables + yaml_variables) } @@ -260,22 +260,6 @@ describe Ci::Build, models: true do it { is_expected.to eq(predefined_variables + predefined_trigger_variable + yaml_variables + secure_variables + trigger_variables) } end - - context 'when job variables are defined' do - ## - # Job-level variables are defined in gitlab_ci.yml fixture - # - context 'when job variables are unique' do - let(:build) { create(:ci_build, name: 'staging') } - - it 'includes job variables' do - expect(subject).to include( - { key: :KEY1, value: 'value1', public: true }, - { key: :KEY2, value: 'value2', public: true } - ) - end - end - end end end end -- cgit v1.2.1 From 50b54951e84b4cfed23f5b3d57e2c785f44cb031 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Jul 2016 20:53:24 +0200 Subject: Fix gitlab_ci_yaml_processor_spec.rb --- spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index 6b2492b61b8..1efc1e8ebdd 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -881,7 +881,7 @@ module Ci when: "on_success", allow_failure: false, environment: nil, - yaml_variables: {} + yaml_variables: [] }) end end -- cgit v1.2.1 From 75857e94bd878395a6d649580dd08207ea4c41fa Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Jul 2016 20:54:07 +0200 Subject: Fix AddWhenAndYamlVariablesToCiBuilds migration --- db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb index 816a32aa0d3..800e88f789d 100644 --- a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb +++ b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddWhenAndYamlVariablesCiBuilds < ActiveRecord::Migration +class AddWhenAndYamlVariablesToCiBuilds < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers # When using the methods "add_concurrent_index" or "add_column_with_default" -- cgit v1.2.1 From 0793370c1aa595e9af3f89c80923b657037b0b4f Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Jul 2016 22:16:38 +0200 Subject: Fix gitlab_ci_yaml_processor_spec.rb --- spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index 1efc1e8ebdd..974fbcc7195 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -26,7 +26,7 @@ module Ci allow_failure: false, when: "on_success", environment: nil, - yaml_variables: {} + yaml_variables: [] }) end @@ -443,7 +443,7 @@ module Ci allow_failure: false, when: "on_success", environment: nil, - yaml_variables: {} + yaml_variables: [] }) end @@ -696,7 +696,7 @@ module Ci when: "on_success", allow_failure: false, environment: nil, - yaml_variables: {} + yaml_variables: [] }) end @@ -824,7 +824,7 @@ module Ci when: "on_success", allow_failure: false, environment: nil, - yaml_variables: {} + yaml_variables: [] }) end end @@ -869,7 +869,7 @@ module Ci when: "on_success", allow_failure: false, environment: nil, - yaml_variables: {} + yaml_variables: [] }) expect(subject.second).to eq({ stage: "build", -- cgit v1.2.1 From aafd4349862d538e57eba65154c498bc4cc4d749 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Jul 2016 22:56:03 +0200 Subject: Remove irrelevant comments --- ...60716115710_add_when_and_yaml_variables_to_ci_builds.rb | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb index 800e88f789d..3e084023a65 100644 --- a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb +++ b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb @@ -1,20 +1,6 @@ -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - class AddWhenAndYamlVariablesToCiBuilds < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers - # When using the methods "add_concurrent_index" or "add_column_with_default" - # you must disable the use of transactions as these methods can not run in an - # existing transaction. When using "add_concurrent_index" make sure that this - # method is the _only_ method called in the migration, any other changes - # should go in a separate migration. This ensures that upon failure _only_ the - # index creation fails and can be retried or reverted easily. - # - # To disable transactions uncomment the following line and remove these - # comments: - # disable_ddl_transaction! - def change add_column :ci_builds, :when, :string add_column :ci_builds, :yaml_variables, :text -- cgit v1.2.1 From 1395edc06f0f06e4cfe8b37b49298c739b9eda2e Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Sat, 16 Jul 2016 17:47:05 -0500 Subject: Remove deploy to production button --- app/views/projects/ci/pipelines/_pipeline.html.haml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index b53a8633937..ebe4204788e 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -58,16 +58,7 @@ .controls.hidden-xs.pull-right - artifacts = pipeline.builds.latest.select { |b| b.artifacts? } - if artifacts.present? - .btn-group.inline - .btn-group - %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} - = icon("play") - %b.caret - %ul.dropdown-menu.dropdown-menu-align-right - %li - = link_to '#' do - = icon("play") - %span Deploy to production + .inline .btn-group %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} = icon("download") -- cgit v1.2.1 From e72fe97e42c1a97bd6fd305a61e90dbb193c9f45 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Sat, 16 Jul 2016 17:51:39 -0500 Subject: Align cancel and retry buttons --- app/assets/stylesheets/pages/pipelines.scss | 2 ++ app/views/projects/ci/pipelines/_pipeline.html.haml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 08da4e290dc..a0334207c68 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -129,6 +129,8 @@ } .cancel-retry-btns { + vertical-align: middle; + .btn:not(:first-child) { margin-left: 8px; } diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index ebe4204788e..631873fb0a3 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -71,7 +71,7 @@ %span Download '#{build.name}' artifacts - if can?(current_user, :update_pipeline, @project) - .cancel-retry-btns + .cancel-retry-btns.inline - if pipeline.retryable? = link_to retry_namespace_project_pipeline_path(@project.namespace, @project, pipeline.id), class: 'btn has-tooltip', title: "Retry", method: :post do = icon("repeat") -- cgit v1.2.1 From 8b2a7a2d6c8f860120a2696c48956840910ded4a Mon Sep 17 00:00:00 2001 From: eanplatter Date: Sat, 16 Jul 2016 22:47:47 -0500 Subject: Fix activity heatmap to show proper day name. --- CHANGELOG | 1 + app/assets/javascripts/lib/utils/datetime_utility.js.coffee | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5518429e1b5..9000bf07e55 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.10.0 (unreleased) + - Fix profile activity heatmap to show correct day name (eanplatter) - Expose {should,force}_remove_source_branch (Ben Boeckel) - Disable PostgreSQL statement timeout during migrations - Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho) diff --git a/app/assets/javascripts/lib/utils/datetime_utility.js.coffee b/app/assets/javascripts/lib/utils/datetime_utility.js.coffee index 178963fe0aa..2371e913844 100644 --- a/app/assets/javascripts/lib/utils/datetime_utility.js.coffee +++ b/app/assets/javascripts/lib/utils/datetime_utility.js.coffee @@ -2,7 +2,7 @@ w.gl ?= {} w.gl.utils ?= {} - w.gl.utils.days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] + w.gl.utils.days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] w.gl.utils.formatDate = (datetime) -> dateFormat(datetime, 'mmm d, yyyy h:MMtt Z') -- cgit v1.2.1 From 63e951797102b37ef99a5651e18c45dc24e7f75c Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 17 Jul 2016 11:10:18 +0300 Subject: Fix CI yaml example --- doc/ci/yaml/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 16a1461a7e4..50fa263f693 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -985,11 +985,11 @@ directive defined in `.postgres_services` and `.mysql_services` respectively: - ruby test:postgres: - << *job_definition + <<: *job_definition services: *postgres_definition test:mysql: - << *job_definition + <<: *job_definition services: *mysql_definition ``` -- cgit v1.2.1 From 22c2814b09960255d9ece0c620858500719858cb Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sun, 17 Jul 2016 13:03:57 +0200 Subject: Refactor gitlab_ci_yaml_processor variables tests --- spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 128 ++++++++++++++++----------- 1 file changed, 76 insertions(+), 52 deletions(-) diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index 974fbcc7195..ad6587b4c25 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -477,96 +477,120 @@ module Ci end describe 'Variables' do - context 'when global variables are defined' do - it 'returns global variables' do - variables = { - VAR1: 'value1', - VAR2: 'value2', - } + let(:config_processor) { GitlabCiYamlProcessor.new(YAML.dump(config), path) } - config = YAML.dump({ + subject { config_processor.builds.first[:yaml_variables] } + + context 'when global variables are defined' do + let(:variables) do + { VAR1: 'value1', VAR2: 'value2' } + end + let(:config) do + { variables: variables, before_script: ['pwd'], rspec: { script: 'rspec' } - }) + } + end - config_processor = GitlabCiYamlProcessor.new(config, path) + it 'returns global variables' do + expect(subject).to contain_exactly( + { key: :VAR1, value: 'value1', public: true }, + { key: :VAR2, value: 'value2', public: true } + ) + end + end + + context 'when job and global variables are defined' do + let(:global_variables) do + { VAR1: 'global1', VAR3: 'global3' } + end + let(:job_variables) do + { VAR1: 'value1', VAR2: 'value2' } + end + let(:config) do + { + before_script: ['pwd'], + variables: global_variables, + rspec: { script: 'rspec', variables: job_variables } + } + end - expect(config_processor.global_variables).to eq(variables) + it 'returns all unique variables' do + expect(subject).to contain_exactly( + { key: :VAR3, value: 'global3', public: true }, + { key: :VAR1, value: 'value1', public: true }, + { key: :VAR2, value: 'value2', public: true } + ) end end context 'when job variables are defined' do - context 'when syntax is correct' do - it 'returns job variables' do - variables = { - KEY1: 'value1', - SOME_KEY_2: 'value2' - } + let(:config) do + { + before_script: ['pwd'], + rspec: { script: 'rspec', variables: variables } + } + end + + context 'when also global variables are defined' do - config = YAML.dump( - { before_script: ['pwd'], - rspec: { - variables: variables, - script: 'rspec' } - }) + end - config_processor = GitlabCiYamlProcessor.new(config, path) + context 'when syntax is correct' do + let(:variables) do + { VAR1: 'value1', VAR2: 'value2' } + end - expect(config_processor.job_variables(:rspec)).to eq variables + it 'returns job variables' do + expect(subject).to contain_exactly( + { key: :VAR1, value: 'value1', public: true }, + { key: :VAR2, value: 'value2', public: true } + ) end end context 'when syntax is incorrect' do context 'when variables defined but invalid' do - it 'raises error' do - variables = [:KEY1, 'value1', :KEY2, 'value2'] - - config = YAML.dump( - { before_script: ['pwd'], - rspec: { - variables: variables, - script: 'rspec' } - }) + let(:variables) do + [ :VAR1, 'value1', :VAR2, 'value2' ] + end - expect { GitlabCiYamlProcessor.new(config, path) } + it 'raises error' do + expect { subject } .to raise_error(GitlabCiYamlProcessor::ValidationError, - /job: variables should be a map/) + /job: variables should be a map/) end end context 'when variables key defined but value not specified' do - it 'returns empty array' do - config = YAML.dump( - { before_script: ['pwd'], - rspec: { - variables: nil, - script: 'rspec' } - }) - - config_processor = GitlabCiYamlProcessor.new(config, path) + let(:variables) do + nil + end + it 'returns empty array' do ## # When variables config is empty, we assume this is a valid # configuration, see issue #18775 # - expect(config_processor.job_variables(:rspec)) - .to be_an_instance_of(Array).and be_empty + expect(subject).to be_an_instance_of(Array) + expect(subject).to be_empty end end end end context 'when job variables are not defined' do - it 'returns empty array' do - config = YAML.dump({ + let(:config) do + { before_script: ['pwd'], rspec: { script: 'rspec' } - }) - - config_processor = GitlabCiYamlProcessor.new(config, path) + } + end - expect(config_processor.job_variables(:rspec)).to eq [] + it 'returns empty array' do + expect(subject).to be_an_instance_of(Array) + expect(subject).to be_empty end end end -- cgit v1.2.1 From 1bc911d9e49a35264e3c97b4684598b2f989e8ae Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Sun, 17 Jul 2016 17:47:46 +0100 Subject: Fixed the alignment in the MR widget --- app/assets/stylesheets/pages/merge_requests.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index 15c6c9f231a..fbff0c97355 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -270,7 +270,7 @@ .item-title { @media (min-width: $screen-sm-min) { - width: 49%; + width: 45%; } } -- cgit v1.2.1 From 565b3a183978a7952ef92d2e1e05b429f38322fa Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 17 Jul 2016 20:12:32 -0700 Subject: Allow a project import URL to be blank to prevent false positives preventing settings from being saved --- app/models/project.rb | 4 ++-- spec/models/project_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index e7b9835692d..8d71e01103c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -162,7 +162,7 @@ class Project < ActiveRecord::Base validates :namespace, presence: true validates_uniqueness_of :name, scope: :namespace_id validates_uniqueness_of :path, scope: :namespace_id - validates :import_url, addressable_url: true, if: :import_url + validates :import_url, addressable_url: true, if: "import_url.present?" validates :star_count, numericality: { greater_than_or_equal_to: 0 } validate :check_limit, on: :create validate :avatar_type, @@ -482,7 +482,7 @@ class Project < ActiveRecord::Base end def create_or_update_import_data(data: nil, credentials: nil) - return unless valid_import_url? + return unless import_url.present? && valid_import_url? project_import_data = import_data || build_import_data if data diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index e842c58dd82..9dc34276f18 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -142,10 +142,10 @@ describe Project, models: true do expect(project2).to be_valid end - it 'does not allow to introduce an empty URI' do + it 'allows an empty URI' do project2 = build(:project, import_url: '') - expect(project2).not_to be_valid + expect(project2).to be_valid end it 'does not produce import data on an empty URI' do -- cgit v1.2.1 From 328da189d21673b7f8937d122363ef0c710f9ae9 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 17 Jul 2016 20:57:11 -0700 Subject: Fix spec to set import_url before attempting to create import_data --- spec/lib/gitlab/bitbucket_import/client_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/gitlab/bitbucket_import/client_spec.rb b/spec/lib/gitlab/bitbucket_import/client_spec.rb index 760d66a1488..7543c29bcc4 100644 --- a/spec/lib/gitlab/bitbucket_import/client_spec.rb +++ b/spec/lib/gitlab/bitbucket_import/client_spec.rb @@ -54,12 +54,12 @@ describe Gitlab::BitbucketImport::Client, lib: true do context 'project import' do it 'calls .from_project with no errors' do project = create(:empty_project) + project.import_url = "ssh://git@bitbucket.org/test/test.git" project.create_or_update_import_data(credentials: { user: "git", password: nil, bb_session: { bitbucket_access_token: "test", bitbucket_access_token_secret: "test" } }) - project.import_url = "ssh://git@bitbucket.org/test/test.git" expect { described_class.from_project(project) }.not_to raise_error end -- cgit v1.2.1 From 7a72c75a9cfeb2793e68e55ef091c1c298f27832 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 18 Jul 2016 08:54:25 +0200 Subject: use method in validates statement --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 8d71e01103c..d3ae4a2dd0b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -162,7 +162,7 @@ class Project < ActiveRecord::Base validates :namespace, presence: true validates_uniqueness_of :name, scope: :namespace_id validates_uniqueness_of :path, scope: :namespace_id - validates :import_url, addressable_url: true, if: "import_url.present?" + validates :import_url, addressable_url: true, if: :external_import? validates :star_count, numericality: { greater_than_or_equal_to: 0 } validate :check_limit, on: :create validate :avatar_type, -- cgit v1.2.1 From 785043841873f120e8e26da706060500b4a333a6 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Fri, 15 Jul 2016 11:34:23 +0200 Subject: limit project expor retry to only 3 --- app/workers/project_export_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/project_export_worker.rb b/app/workers/project_export_worker.rb index 39f6037e077..615311e63f5 100644 --- a/app/workers/project_export_worker.rb +++ b/app/workers/project_export_worker.rb @@ -1,7 +1,7 @@ class ProjectExportWorker include Sidekiq::Worker - sidekiq_options queue: :gitlab_shell, retry: true + sidekiq_options queue: :gitlab_shell, retry: 3 def perform(current_user_id, project_id) current_user = User.find(current_user_id) -- cgit v1.2.1 From 5ede1331d45199ff1b79d98c70bddda86837de48 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Fri, 15 Jul 2016 11:44:38 +0200 Subject: added changelog --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 5518429e1b5..8b70c6bf3df 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -103,6 +103,7 @@ v 8.10.0 (unreleased) - Fix issues importing projects from EE to CE - Fix creating group with space in group path - Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska) + - Limit the number of retries on error to 3 for exporting projects v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 -- cgit v1.2.1 From 2cf7f09b1e9ccb000433374a42bd7b33b73f8116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 18 Jul 2016 10:16:56 +0200 Subject: Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' "" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50. See !4892. Signed-off-by: Rémy Coutable --- CHANGELOG | 1 + .../javascripts/protected_branches.js.coffee | 8 +- .../projects/protected_branches_controller.rb | 2 +- app/helpers/branches_helper.rb | 2 +- app/models/merge_request.rb | 8 +- app/models/project.rb | 4 + app/models/repository.rb | 14 +- app/services/commits/change_service.rb | 4 +- app/services/files/base_service.rb | 2 +- app/services/git_push_service.rb | 3 +- app/services/merge_requests/merge_service.rb | 4 +- app/services/merge_requests/refresh_service.rb | 2 +- .../widget/open/_conflicts.html.haml | 2 +- .../protected_branches/_branches_list.html.haml | 2 + .../protected_branches/_protected_branch.html.haml | 2 + .../projects/protected_branches/index.html.haml | 8 + ...d_developers_can_merge_to_protected_branches.rb | 9 + ..._progress_merge_commit_sha_to_merge_requests.rb | 8 + db/schema.rb | 10 +- lib/api/helpers.rb | 2 +- lib/gitlab/access.rb | 8 +- lib/gitlab/checks/change_access.rb | 96 ++++++++ lib/gitlab/checks/force_push.rb | 17 ++ lib/gitlab/checks/matching_merge_request.rb | 18 ++ lib/gitlab/force_push_check.rb | 15 -- lib/gitlab/git_access.rb | 143 +++--------- lib/gitlab/git_access_wiki.rb | 2 +- lib/gitlab/user_access.rb | 48 +++- spec/lib/gitlab/diff/position_tracer_spec.rb | 3 +- spec/lib/gitlab/git_access_spec.rb | 247 ++++++++++----------- spec/lib/gitlab/user_access_spec.rb | 88 ++++++++ spec/models/repository_spec.rb | 9 +- spec/requests/api/api_helpers_spec.rb | 4 +- spec/services/git_push_service_spec.rb | 14 +- .../merge_requests/refresh_service_spec.rb | 3 +- 35 files changed, 508 insertions(+), 304 deletions(-) create mode 100644 db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb create mode 100644 db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb create mode 100644 lib/gitlab/checks/change_access.rb create mode 100644 lib/gitlab/checks/force_push.rb create mode 100644 lib/gitlab/checks/matching_merge_request.rb delete mode 100644 lib/gitlab/force_push_check.rb create mode 100644 spec/lib/gitlab/user_access_spec.rb diff --git a/CHANGELOG b/CHANGELOG index 3b17ea491ce..c0ea2c01a62 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -53,6 +53,7 @@ v 8.10.0 (unreleased) - Add "Enabled Git access protocols" to Application Settings - Diffs will create button/diff form on demand no on server side - Reduce size of HTML used by diff comment forms + - Protected branches have a "Developers can Merge" setting. !4892 (original implementation by Mathias Vestergaard) - Fix user creation with stronger minimum password requirements !4054 (nathan-pmt) - Only show New Snippet button to users that can create snippets. - PipelinesFinder uses git cache data diff --git a/app/assets/javascripts/protected_branches.js.coffee b/app/assets/javascripts/protected_branches.js.coffee index 79c2306e4d2..14afef2e2ee 100644 --- a/app/assets/javascripts/protected_branches.js.coffee +++ b/app/assets/javascripts/protected_branches.js.coffee @@ -1,18 +1,18 @@ $ -> $(".protected-branches-list :checkbox").change (e) -> name = $(this).attr("name") - if name == "developers_can_push" + if name == "developers_can_push" || name == "developers_can_merge" id = $(this).val() - checked = $(this).is(":checked") + can_push = $(this).is(":checked") url = $(this).data("url") $.ajax - type: "PUT" + type: "PATCH" url: url dataType: "json" data: id: id protected_branch: - developers_can_push: checked + "#{name}": can_push success: -> row = $(e.target) diff --git a/app/controllers/projects/protected_branches_controller.rb b/app/controllers/projects/protected_branches_controller.rb index 80dad758afa..10dca47fded 100644 --- a/app/controllers/projects/protected_branches_controller.rb +++ b/app/controllers/projects/protected_branches_controller.rb @@ -50,6 +50,6 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController end def protected_branch_params - params.require(:protected_branch).permit(:name, :developers_can_push) + params.require(:protected_branch).permit(:name, :developers_can_push, :developers_can_merge) end end diff --git a/app/helpers/branches_helper.rb b/app/helpers/branches_helper.rb index 601df5c18df..bfd23aa4e04 100644 --- a/app/helpers/branches_helper.rb +++ b/app/helpers/branches_helper.rb @@ -12,7 +12,7 @@ module BranchesHelper def can_push_branch?(project, branch_name) return false unless project.repository.branch_exists?(branch_name) - ::Gitlab::GitAccess.new(current_user, project, 'web').can_push_to_branch?(branch_name) + ::Gitlab::UserAccess.new(current_user, project: project).can_push_to_branch?(branch_name) end def project_branches diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 157901378d3..471e32f3b60 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -552,7 +552,13 @@ class MergeRequest < ActiveRecord::Base end def can_be_merged_by?(user) - ::Gitlab::GitAccess.new(user, project, 'web').can_push_to_branch?(target_branch) + access = ::Gitlab::UserAccess.new(user, project: project) + access.can_push_to_branch?(target_branch) || access.can_merge_to_branch?(target_branch) + end + + def can_be_merged_via_command_line_by?(user) + access = ::Gitlab::UserAccess.new(user, project: project) + access.can_push_to_branch?(target_branch) end def mergeable_ci_state? diff --git a/app/models/project.rb b/app/models/project.rb index d3ae4a2dd0b..b1ef2cb457c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -838,6 +838,10 @@ class Project < ActiveRecord::Base protected_branches.matching(branch_name).any?(&:developers_can_push) end + def developers_can_merge_to_protected_branch?(branch_name) + protected_branches.matching(branch_name).any?(&:developers_can_merge) + end + def forked? !(forked_project_link.nil? || forked_project_link.forked_from_project.nil?) end diff --git a/app/models/repository.rb b/app/models/repository.rb index 5b670cb4b8f..09487b62f98 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -769,9 +769,9 @@ class Repository end end - def merge(user, source_sha, target_branch, options = {}) - our_commit = rugged.branches[target_branch].target - their_commit = rugged.lookup(source_sha) + def merge(user, merge_request, options = {}) + our_commit = rugged.branches[merge_request.target_branch].target + their_commit = rugged.lookup(merge_request.diff_head_sha) raise "Invalid merge target" if our_commit.nil? raise "Invalid merge source" if their_commit.nil? @@ -779,14 +779,16 @@ class Repository merge_index = rugged.merge_commits(our_commit, their_commit) return false if merge_index.conflicts? - commit_with_hooks(user, target_branch) do |ref| + commit_with_hooks(user, merge_request.target_branch) do |tmp_ref| actual_options = options.merge( parents: [our_commit, their_commit], tree: merge_index.write_tree(rugged), - update_ref: ref + update_ref: tmp_ref ) - Rugged::Commit.create(rugged, actual_options) + commit_id = Rugged::Commit.create(rugged, actual_options) + merge_request.update(in_progress_merge_commit_sha: commit_id) + commit_id end end diff --git a/app/services/commits/change_service.rb b/app/services/commits/change_service.rb index c578097376a..ed73d8cb8c2 100644 --- a/app/services/commits/change_service.rb +++ b/app/services/commits/change_service.rb @@ -23,7 +23,7 @@ module Commits private def check_push_permissions - allowed = ::Gitlab::GitAccess.new(current_user, project, 'web').can_push_to_branch?(@target_branch) + allowed = ::Gitlab::UserAccess.new(current_user, project: project).can_push_to_branch?(@target_branch) unless allowed raise ValidationError.new('You are not allowed to push into this branch') @@ -31,7 +31,7 @@ module Commits true end - + def create_target_branch(new_branch) # Temporary branch exists and contains the change commit return success if repository.find_branch(new_branch) diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb index 37c5e321b39..55da949f56a 100644 --- a/app/services/files/base_service.rb +++ b/app/services/files/base_service.rb @@ -42,7 +42,7 @@ module Files end def validate - allowed = ::Gitlab::GitAccess.new(current_user, project, 'web').can_push_to_branch?(@target_branch) + allowed = ::Gitlab::UserAccess.new(current_user, project: project).can_push_to_branch?(@target_branch) unless allowed raise_error("You are not allowed to push into this branch") diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index a886f35981f..e02b50ff9a2 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -89,7 +89,8 @@ class GitPushService < BaseService # Set protection on the default branch if configured if current_application_settings.default_branch_protection != PROTECTION_NONE developers_can_push = current_application_settings.default_branch_protection == PROTECTION_DEV_CAN_PUSH ? true : false - @project.protected_branches.create({ name: @project.default_branch, developers_can_push: developers_can_push }) + developers_can_merge = current_application_settings.default_branch_protection == PROTECTION_DEV_CAN_MERGE ? true : false + @project.protected_branches.create({ name: @project.default_branch, developers_can_push: developers_can_push, developers_can_merge: developers_can_merge }) end end diff --git a/app/services/merge_requests/merge_service.rb b/app/services/merge_requests/merge_service.rb index f1b1d90c457..0dac0614141 100644 --- a/app/services/merge_requests/merge_service.rb +++ b/app/services/merge_requests/merge_service.rb @@ -34,7 +34,7 @@ module MergeRequests committer: committer } - commit_id = repository.merge(current_user, merge_request.diff_head_sha, merge_request.target_branch, options) + commit_id = repository.merge(current_user, merge_request, options) merge_request.update(merge_commit_sha: commit_id) rescue GitHooksService::PreReceiveError => e merge_request.update(merge_error: e.message) @@ -43,6 +43,8 @@ module MergeRequests merge_request.update(merge_error: "Something went wrong during merge") Rails.logger.error(e.message) false + ensure + merge_request.update(in_progress_merge_commit_sha: nil) end def after_merge diff --git a/app/services/merge_requests/refresh_service.rb b/app/services/merge_requests/refresh_service.rb index b11ecd97a57..1daf6bbf553 100644 --- a/app/services/merge_requests/refresh_service.rb +++ b/app/services/merge_requests/refresh_service.rb @@ -48,7 +48,7 @@ module MergeRequests end def force_push? - Gitlab::ForcePushCheck.force_push?(@project, @oldrev, @newrev) + Gitlab::Checks::ForcePush.force_push?(@project, @oldrev, @newrev) end # Refresh merge request diff if we push to source or target branch of merge request diff --git a/app/views/projects/merge_requests/widget/open/_conflicts.html.haml b/app/views/projects/merge_requests/widget/open/_conflicts.html.haml index 06ab0a3fa00..f000cc38a65 100644 --- a/app/views/projects/merge_requests/widget/open/_conflicts.html.haml +++ b/app/views/projects/merge_requests/widget/open/_conflicts.html.haml @@ -4,7 +4,7 @@ %p Please resolve these conflicts or - - if @merge_request.can_be_merged_by?(current_user) + - if @merge_request.can_be_merged_via_command_line_by?(current_user) #{link_to "merge this request manually", "#modal_merge_info", class: "how_to_merge_link vlink", "data-toggle" => "modal"}. - else ask someone with write access to this repository to merge this request manually. diff --git a/app/views/projects/protected_branches/_branches_list.html.haml b/app/views/projects/protected_branches/_branches_list.html.haml index 97cb1a9052b..720d67dff7c 100644 --- a/app/views/projects/protected_branches/_branches_list.html.haml +++ b/app/views/projects/protected_branches/_branches_list.html.haml @@ -8,6 +8,7 @@ .table-responsive %table.table.protected-branches-list %colgroup + %col{ width: "20%" } %col{ width: "30%" } %col{ width: "25%" } %col{ width: "25%" } @@ -18,6 +19,7 @@ %th Protected Branch %th Commit %th Developers Can Push + %th Developers Can Merge - if can_admin_project %th %tbody diff --git a/app/views/projects/protected_branches/_protected_branch.html.haml b/app/views/projects/protected_branches/_protected_branch.html.haml index 474aec3a97c..7fda7f96047 100644 --- a/app/views/projects/protected_branches/_protected_branch.html.haml +++ b/app/views/projects/protected_branches/_protected_branch.html.haml @@ -16,6 +16,8 @@ (branch was removed from repository) %td = check_box_tag("developers_can_push", protected_branch.id, protected_branch.developers_can_push, data: { url: url }) + %td + = check_box_tag("developers_can_merge", protected_branch.id, protected_branch.developers_can_merge, data: { url: url }) - if can_admin_project %td = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning btn-sm pull-right" diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml index 883d3e3af1e..151e1d64851 100644 --- a/app/views/projects/protected_branches/index.html.haml +++ b/app/views/projects/protected_branches/index.html.haml @@ -36,6 +36,14 @@ = f.label :developers_can_push, "Developers can push", class: "label-light append-bottom-0" %p.light.append-bottom-0 Allow developers to push to this branch + + .form-group + = f.check_box :developers_can_merge, class: "pull-left" + .prepend-left-20 + = f.label :developers_can_merge, "Developers can merge", class: "label-light append-bottom-0" + %p.light.append-bottom-0 + Allow developers to accept merge requests to this branch = f.submit "Protect", class: "btn-create btn protect-branch-btn", disabled: true + %hr = render "branches_list" diff --git a/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb b/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb new file mode 100644 index 00000000000..15ad8e8bcbb --- /dev/null +++ b/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb @@ -0,0 +1,9 @@ +class AddDevelopersCanMergeToProtectedBranches < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + def change + add_column_with_default :protected_branches, :developers_can_merge, :boolean, default: false, allow_null: false + end +end diff --git a/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb b/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb new file mode 100644 index 00000000000..7c5f76572ef --- /dev/null +++ b/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb @@ -0,0 +1,8 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddColumnInProgressMergeCommitShaToMergeRequests < ActiveRecord::Migration + def change + add_column :merge_requests, :in_progress_merge_commit_sha, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 8c12898eec9..453a8fb9e51 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -624,8 +624,9 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.integer "merge_user_id" t.string "merge_commit_sha" t.datetime "deleted_at" + t.integer "lock_version", default: 0, null: false + t.string "in_progress_merge_commit_sha" end - add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree add_index "merge_requests", ["author_id"], name: "index_merge_requests_on_author_id", using: :btree add_index "merge_requests", ["created_at", "id"], name: "index_merge_requests_on_created_at_and_id", using: :btree @@ -858,11 +859,12 @@ ActiveRecord::Schema.define(version: 20160712171823) do add_index "projects", ["visibility_level"], name: "index_projects_on_visibility_level", using: :btree create_table "protected_branches", force: :cascade do |t| - t.integer "project_id", null: false - t.string "name", null: false + t.integer "project_id", null: false + t.string "name", null: false t.datetime "created_at" t.datetime "updated_at" - t.boolean "developers_can_push", default: false, null: false + t.boolean "developers_can_push", default: false, null: false + t.boolean "developers_can_merge", default: false, null: false end add_index "protected_branches", ["project_id"], name: "index_protected_branches_on_project_id", using: :btree diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 77e407b54c5..73557cf7db6 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -17,7 +17,7 @@ module API def current_user @current_user ||= (find_user_by_private_token || doorkeeper_guard) - unless @current_user && Gitlab::UserAccess.allowed?(@current_user) + unless @current_user && Gitlab::UserAccess.new(@current_user).allowed? return nil end diff --git a/lib/gitlab/access.rb b/lib/gitlab/access.rb index 831f1e635ba..de41ea415a6 100644 --- a/lib/gitlab/access.rb +++ b/lib/gitlab/access.rb @@ -14,9 +14,10 @@ module Gitlab OWNER = 50 # Branch protection settings - PROTECTION_NONE = 0 - PROTECTION_DEV_CAN_PUSH = 1 - PROTECTION_FULL = 2 + PROTECTION_NONE = 0 + PROTECTION_DEV_CAN_PUSH = 1 + PROTECTION_FULL = 2 + PROTECTION_DEV_CAN_MERGE = 3 class << self def values @@ -54,6 +55,7 @@ module Gitlab def protection_options { "Not protected: Both developers and masters can push new commits, force push, or delete the branch." => PROTECTION_NONE, + "Protected against pushes: Developers cannot push new commits, but are allowed to accept merge requests to the branch." => PROTECTION_DEV_CAN_MERGE, "Partially protected: Developers can push new commits, but cannot force push or delete the branch. Masters can do all of those." => PROTECTION_DEV_CAN_PUSH, "Fully protected: Developers cannot push new commits, force push, or delete the branch. Only masters can do any of those." => PROTECTION_FULL, } diff --git a/lib/gitlab/checks/change_access.rb b/lib/gitlab/checks/change_access.rb new file mode 100644 index 00000000000..5551fac4b8b --- /dev/null +++ b/lib/gitlab/checks/change_access.rb @@ -0,0 +1,96 @@ +module Gitlab + module Checks + class ChangeAccess + attr_reader :user_access, :project + + def initialize(change, user_access:, project:) + @oldrev, @newrev, @ref = change.split(' ') + @branch_name = branch_name(@ref) + @user_access = user_access + @project = project + end + + def exec + error = protected_branch_checks || tag_checks || push_checks + + if error + GitAccessStatus.new(false, error) + else + GitAccessStatus.new(true) + end + end + + protected + + def protected_branch_checks + return unless project.protected_branch?(@branch_name) + + if forced_push? && user_access.cannot_do_action?(:force_push_code_to_protected_branches) + return "You are not allowed to force push code to a protected branch on this project." + elsif Gitlab::Git.blank_ref?(@newrev) && user_access.cannot_do_action?(:remove_protected_branches) + return "You are not allowed to delete protected branches from this project." + end + + if matching_merge_request? + if user_access.can_merge_to_branch?(@branch_name) || user_access.can_push_to_branch?(@branch_name) + return + else + "You are not allowed to merge code into protected branches on this project." + end + else + if user_access.can_push_to_branch?(@branch_name) + return + else + "You are not allowed to push code to protected branches on this project." + end + end + end + + def tag_checks + tag_ref = tag_name(@ref) + + if tag_ref && protected_tag?(tag_ref) && user_access.cannot_do_action?(:admin_project) + "You are not allowed to change existing tags on this project." + end + end + + def push_checks + if user_access.cannot_do_action?(:push_code) + "You are not allowed to push code to this project." + end + end + + private + + def protected_tag?(tag_name) + project.repository.tag_exists?(tag_name) + end + + def forced_push? + Gitlab::Checks::ForcePush.force_push?(@project, @oldrev, @newrev) + end + + def matching_merge_request? + Checks::MatchingMergeRequest.new(@newrev, @branch_name, @project).match? + end + + def branch_name(ref) + ref = @ref.to_s + if Gitlab::Git.branch_ref?(ref) + Gitlab::Git.ref_name(ref) + else + nil + end + end + + def tag_name(ref) + ref = @ref.to_s + if Gitlab::Git.tag_ref?(ref) + Gitlab::Git.ref_name(ref) + else + nil + end + end + end + end +end diff --git a/lib/gitlab/checks/force_push.rb b/lib/gitlab/checks/force_push.rb new file mode 100644 index 00000000000..dfa83a0eab3 --- /dev/null +++ b/lib/gitlab/checks/force_push.rb @@ -0,0 +1,17 @@ +module Gitlab + module Checks + class ForcePush + def self.force_push?(project, oldrev, newrev) + return false if project.empty_repo? + + # Created or deleted branch + if Gitlab::Git.blank_ref?(oldrev) || Gitlab::Git.blank_ref?(newrev) + false + else + missed_refs, _ = Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --git-dir=#{project.repository.path_to_repo} rev-list #{oldrev} ^#{newrev})) + missed_refs.split("\n").size > 0 + end + end + end + end +end diff --git a/lib/gitlab/checks/matching_merge_request.rb b/lib/gitlab/checks/matching_merge_request.rb new file mode 100644 index 00000000000..849848515da --- /dev/null +++ b/lib/gitlab/checks/matching_merge_request.rb @@ -0,0 +1,18 @@ +module Gitlab + module Checks + class MatchingMergeRequest + def initialize(newrev, branch_name, project) + @newrev = newrev + @branch_name = branch_name + @project = project + end + + def match? + @project.merge_requests + .with_state(:locked) + .where(in_progress_merge_commit_sha: @newrev, target_branch: @branch_name) + .exists? + end + end + end +end diff --git a/lib/gitlab/force_push_check.rb b/lib/gitlab/force_push_check.rb deleted file mode 100644 index 93c6a5bb7f5..00000000000 --- a/lib/gitlab/force_push_check.rb +++ /dev/null @@ -1,15 +0,0 @@ -module Gitlab - class ForcePushCheck - def self.force_push?(project, oldrev, newrev) - return false if project.empty_repo? - - # Created or deleted branch - if Gitlab::Git.blank_ref?(oldrev) || Gitlab::Git.blank_ref?(newrev) - false - else - missed_refs, _ = Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --git-dir=#{project.repository.path_to_repo} rev-list #{oldrev} ^#{newrev})) - missed_refs.split("\n").size > 0 - end - end - end -end diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index 7679c7e4bb8..308f23bc9bc 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -1,52 +1,17 @@ +# Check a user's access to perform a git action. All public methods in this +# class return an instance of `GitlabAccessStatus` module Gitlab class GitAccess DOWNLOAD_COMMANDS = %w{ git-upload-pack git-upload-archive } PUSH_COMMANDS = %w{ git-receive-pack } - attr_reader :actor, :project, :protocol + attr_reader :actor, :project, :protocol, :user_access def initialize(actor, project, protocol) @actor = actor @project = project @protocol = protocol - end - - def user - return @user if defined?(@user) - - @user = - case actor - when User - actor - when DeployKey - nil - when Key - actor.user - end - end - - def deploy_key - actor if actor.is_a?(DeployKey) - end - - def can_push_to_branch?(ref) - return false unless user - - if project.protected_branch?(ref) && !project.developers_can_push_to_protected_branch?(ref) - user.can?(:push_code_to_protected_branches, project) - else - user.can?(:push_code, project) - end - end - - def can_read_project? - if user - user.can?(:read_project, project) - elsif deploy_key - deploy_key.projects.include?(project) - else - false - end + @user_access = UserAccess.new(user, project: project) end def check(cmd, changes = nil) @@ -56,11 +21,11 @@ module Gitlab return build_status_object(false, "No user or key was provided.") end - if user && !user_allowed? + if user && !user_access.allowed? return build_status_object(false, "Your account has been blocked.") end - unless project && can_read_project? + unless project && (user_access.can_read_project? || deploy_key_can_read_project?) return build_status_object(false, 'The project you were looking for could not be found.') end @@ -95,7 +60,7 @@ module Gitlab end def user_download_access_check - unless user.can?(:download_code, project) + unless user_access.can_do_action?(:download_code) return build_status_object(false, "You are not allowed to download code from this project.") end @@ -125,46 +90,8 @@ module Gitlab build_status_object(true) end - def can_user_do_action?(action) - @permission_cache ||= {} - @permission_cache[action] ||= user.can?(action, project) - end - def change_access_check(change) - oldrev, newrev, ref = change.split(' ') - - action = - if project.protected_branch?(branch_name(ref)) - protected_branch_action(oldrev, newrev, branch_name(ref)) - elsif (tag_ref = tag_name(ref)) && protected_tag?(tag_ref) - # Prevent any changes to existing git tag unless user has permissions - :admin_project - else - :push_code - end - - unless can_user_do_action?(action) - status = - case action - when :force_push_code_to_protected_branches - build_status_object(false, "You are not allowed to force push code to a protected branch on this project.") - when :remove_protected_branches - build_status_object(false, "You are not allowed to deleted protected branches from this project.") - when :push_code_to_protected_branches - build_status_object(false, "You are not allowed to push code to protected branches on this project.") - when :admin_project - build_status_object(false, "You are not allowed to change existing tags on this project.") - else # :push_code - build_status_object(false, "You are not allowed to push code to this project.") - end - return status - end - - build_status_object(true) - end - - def forced_push?(oldrev, newrev) - Gitlab::ForcePushCheck.force_push?(project, oldrev, newrev) + Checks::ChangeAccess.new(change, user_access: user_access, project: project).exec end def protocol_allowed? @@ -173,48 +100,38 @@ module Gitlab private - def protected_branch_action(oldrev, newrev, branch_name) - # we dont allow force push to protected branch - if forced_push?(oldrev, newrev) - :force_push_code_to_protected_branches - elsif Gitlab::Git.blank_ref?(newrev) - # and we dont allow remove of protected branch - :remove_protected_branches - elsif project.developers_can_push_to_protected_branch?(branch_name) - :push_code - else - :push_code_to_protected_branches - end + def matching_merge_request?(newrev, branch_name) + Checks::MatchingMergeRequest.new(newrev, branch_name, project).match? end - def protected_tag?(tag_name) - project.repository.tag_exists?(tag_name) - end - - def user_allowed? - Gitlab::UserAccess.allowed?(user) - end - - def branch_name(ref) - ref = ref.to_s - if Gitlab::Git.branch_ref?(ref) - Gitlab::Git.ref_name(ref) - else - nil - end + def deploy_key + actor if actor.is_a?(DeployKey) end - def tag_name(ref) - ref = ref.to_s - if Gitlab::Git.tag_ref?(ref) - Gitlab::Git.ref_name(ref) + def deploy_key_can_read_project? + if deploy_key + deploy_key.projects.include?(project) else - nil + false end end protected + def user + return @user if defined?(@user) + + @user = + case actor + when User + actor + when DeployKey + nil + when Key + actor.user + end + end + def build_status_object(status, message = '') GitAccessStatus.new(status, message) end diff --git a/lib/gitlab/git_access_wiki.rb b/lib/gitlab/git_access_wiki.rb index 8672cbc0ec4..f71d3575909 100644 --- a/lib/gitlab/git_access_wiki.rb +++ b/lib/gitlab/git_access_wiki.rb @@ -1,7 +1,7 @@ module Gitlab class GitAccessWiki < GitAccess def change_access_check(change) - if user.can?(:create_wiki, project) + if user_access.can_do_action?(:create_wiki) build_status_object(true) else build_status_object(false, "You are not allowed to write to this project's wiki.") diff --git a/lib/gitlab/user_access.rb b/lib/gitlab/user_access.rb index d1b42c1f9b9..c0f85e9b3a8 100644 --- a/lib/gitlab/user_access.rb +++ b/lib/gitlab/user_access.rb @@ -1,7 +1,23 @@ module Gitlab - module UserAccess - def self.allowed?(user) - return false if user.blocked? + class UserAccess + attr_reader :user, :project + + def initialize(user, project: nil) + @user = user + @project = project + end + + def can_do_action?(action) + @permission_cache ||= {} + @permission_cache[action] ||= user.can?(action, project) + end + + def cannot_do_action?(action) + !can_do_action?(action) + end + + def allowed? + return false if user.blank? || user.blocked? if user.requires_ldap_check? && user.try_obtain_ldap_lease return false unless Gitlab::LDAP::Access.allowed?(user) @@ -9,5 +25,31 @@ module Gitlab true end + + def can_push_to_branch?(ref) + return false unless user + + if project.protected_branch?(ref) && !project.developers_can_push_to_protected_branch?(ref) + user.can?(:push_code_to_protected_branches, project) + else + user.can?(:push_code, project) + end + end + + def can_merge_to_branch?(ref) + return false unless user + + if project.protected_branch?(ref) && !project.developers_can_merge_to_protected_branch?(ref) + user.can?(:push_code_to_protected_branches, project) + else + user.can?(:push_code, project) + end + end + + def can_read_project? + return false unless user + + user.can?(:read_project, project) + end end end diff --git a/spec/lib/gitlab/diff/position_tracer_spec.rb b/spec/lib/gitlab/diff/position_tracer_spec.rb index 08312e60f4a..c268f84c759 100644 --- a/spec/lib/gitlab/diff/position_tracer_spec.rb +++ b/spec/lib/gitlab/diff/position_tracer_spec.rb @@ -1639,7 +1639,8 @@ describe Gitlab::Diff::PositionTracer, lib: true do committer: committer } - repository.merge(current_user, second_create_file_commit.sha, branch_name, options) + merge_request = create(:merge_request, source_branch: second_create_file_commit.sha, target_branch: branch_name, source_project: project) + repository.merge(current_user, merge_request, options) project.commit(branch_name) end diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index c79ba11f782..db33c7a22bb 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -6,67 +6,6 @@ describe Gitlab::GitAccess, lib: true do let(:user) { create(:user) } let(:actor) { user } - describe 'can_push_to_branch?' do - describe 'push to none protected branch' do - it "returns true if user is a master" do - project.team << [user, :master] - expect(access.can_push_to_branch?("random_branch")).to be_truthy - end - - it "returns true if user is a developer" do - project.team << [user, :developer] - expect(access.can_push_to_branch?("random_branch")).to be_truthy - end - - it "returns false if user is a reporter" do - project.team << [user, :reporter] - expect(access.can_push_to_branch?("random_branch")).to be_falsey - end - end - - describe 'push to protected branch' do - before do - @branch = create :protected_branch, project: project - end - - it "returns true if user is a master" do - project.team << [user, :master] - expect(access.can_push_to_branch?(@branch.name)).to be_truthy - end - - it "returns false if user is a developer" do - project.team << [user, :developer] - expect(access.can_push_to_branch?(@branch.name)).to be_falsey - end - - it "returns false if user is a reporter" do - project.team << [user, :reporter] - expect(access.can_push_to_branch?(@branch.name)).to be_falsey - end - end - - describe 'push to protected branch if allowed for developers' do - before do - @branch = create :protected_branch, project: project, developers_can_push: true - end - - it "returns true if user is a master" do - project.team << [user, :master] - expect(access.can_push_to_branch?(@branch.name)).to be_truthy - end - - it "returns true if user is a developer" do - project.team << [user, :developer] - expect(access.can_push_to_branch?(@branch.name)).to be_truthy - end - - it "returns false if user is a reporter" do - project.team << [user, :reporter] - expect(access.can_push_to_branch?(@branch.name)).to be_falsey - end - end - end - describe '#check with single protocols allowed' do def disable_protocol(protocol) settings = ::ApplicationSetting.create_from_defaults @@ -160,96 +99,46 @@ describe Gitlab::GitAccess, lib: true do end describe 'push_access_check' do - def protect_feature_branch - create(:protected_branch, name: 'feature', project: project) - end + before { merge_into_protected_branch } + let(:unprotected_branch) { FFaker::Internet.user_name } - def changes - { - push_new_branch: "#{Gitlab::Git::BLANK_SHA} 570e7b2ab refs/heads/wow", + let(:changes) do + { push_new_branch: "#{Gitlab::Git::BLANK_SHA} 570e7b2ab refs/heads/wow", push_master: '6f6d7e7ed 570e7b2ab refs/heads/master', push_protected_branch: '6f6d7e7ed 570e7b2ab refs/heads/feature', push_remove_protected_branch: "570e7b2ab #{Gitlab::Git::BLANK_SHA} "\ 'refs/heads/feature', push_tag: '6f6d7e7ed 570e7b2ab refs/tags/v1.0.0', push_new_tag: "#{Gitlab::Git::BLANK_SHA} 570e7b2ab refs/tags/v7.8.9", - push_all: ['6f6d7e7ed 570e7b2ab refs/heads/master', '6f6d7e7ed 570e7b2ab refs/heads/feature'] - } + push_all: ['6f6d7e7ed 570e7b2ab refs/heads/master', '6f6d7e7ed 570e7b2ab refs/heads/feature'], + merge_into_protected_branch: "0b4bc9a #{merge_into_protected_branch} refs/heads/feature" } end - def self.permissions_matrix - { - master: { - push_new_branch: true, - push_master: true, - push_protected_branch: true, - push_remove_protected_branch: false, - push_tag: true, - push_new_tag: true, - push_all: true, - }, - - developer: { - push_new_branch: true, - push_master: true, - push_protected_branch: false, - push_remove_protected_branch: false, - push_tag: false, - push_new_tag: true, - push_all: false, - }, - - reporter: { - push_new_branch: false, - push_master: false, - push_protected_branch: false, - push_remove_protected_branch: false, - push_tag: false, - push_new_tag: false, - push_all: false, - }, - - guest: { - push_new_branch: false, - push_master: false, - push_protected_branch: false, - push_remove_protected_branch: false, - push_tag: false, - push_new_tag: false, - push_all: false, - } - } - end - - def self.updated_permissions_matrix - updated_permissions_matrix = permissions_matrix.dup - updated_permissions_matrix[:developer][:push_protected_branch] = true - updated_permissions_matrix[:developer][:push_all] = true - updated_permissions_matrix + def stub_git_hooks + # Running the `pre-receive` hook is expensive, and not necessary for this test. + allow_any_instance_of(GitHooksService).to receive(:execute).and_yield end - permissions_matrix.keys.each do |role| - describe "#{role} access" do - before { protect_feature_branch } - before { project.team << [user, role] } - - permissions_matrix[role].each do |action, allowed| - context action do - subject { access.push_access_check(changes[action]) } + def merge_into_protected_branch + @protected_branch_merge_commit ||= begin + stub_git_hooks + project.repository.add_branch(user, unprotected_branch, 'feature') + target_branch = project.repository.lookup('feature') + source_branch = project.repository.commit_file(user, FFaker::InternetSE.login_user_name, FFaker::HipsterIpsum.paragraph, FFaker::HipsterIpsum.sentence, unprotected_branch, false) + rugged = project.repository.rugged + author = { email: "email@example.com", time: Time.now, name: "Example Git User" } - it { expect(subject.allowed?).to allowed ? be_truthy : be_falsey } - end - end + merge_index = rugged.merge_commits(target_branch, source_branch) + Rugged::Commit.create(rugged, author: author, committer: author, message: "commit message", parents: [target_branch, source_branch], tree: merge_index.write_tree(rugged)) end end - context "with enabled developers push to protected branches " do - updated_permissions_matrix.keys.each do |role| + def self.run_permission_checks(permissions_matrix) + permissions_matrix.keys.each do |role| describe "#{role} access" do - before { create(:protected_branch, name: 'feature', developers_can_push: true, project: project) } before { project.team << [user, role] } - updated_permissions_matrix[role].each do |action, allowed| + permissions_matrix[role].each do |action, allowed| context action do subject { access.push_access_check(changes[action]) } @@ -259,5 +148,97 @@ describe Gitlab::GitAccess, lib: true do end end end + + permissions_matrix = { + master: { + push_new_branch: true, + push_master: true, + push_protected_branch: true, + push_remove_protected_branch: false, + push_tag: true, + push_new_tag: true, + push_all: true, + merge_into_protected_branch: true + }, + + developer: { + push_new_branch: true, + push_master: true, + push_protected_branch: false, + push_remove_protected_branch: false, + push_tag: false, + push_new_tag: true, + push_all: false, + merge_into_protected_branch: false + }, + + reporter: { + push_new_branch: false, + push_master: false, + push_protected_branch: false, + push_remove_protected_branch: false, + push_tag: false, + push_new_tag: false, + push_all: false, + merge_into_protected_branch: false + }, + + guest: { + push_new_branch: false, + push_master: false, + push_protected_branch: false, + push_remove_protected_branch: false, + push_tag: false, + push_new_tag: false, + push_all: false, + merge_into_protected_branch: false + } + } + + [['feature', 'exact'], ['feat*', 'wildcard']].each do |protected_branch_name, protected_branch_type| + context do + before { create(:protected_branch, name: protected_branch_name, project: project) } + + run_permission_checks(permissions_matrix) + end + + context "when 'developers can push' is turned on for the #{protected_branch_type} protected branch" do + before { create(:protected_branch, name: protected_branch_name, developers_can_push: true, project: project) } + + run_permission_checks(permissions_matrix.deep_merge(developer: { push_protected_branch: true, push_all: true, merge_into_protected_branch: true })) + end + + context "when 'developers can merge' is turned on for the #{protected_branch_type} protected branch" do + before { create(:protected_branch, name: protected_branch_name, developers_can_merge: true, project: project) } + + context "when a merge request exists for the given source/target branch" do + context "when the merge request is in progress" do + before do + create(:merge_request, source_project: project, source_branch: unprotected_branch, target_branch: 'feature', state: 'locked', in_progress_merge_commit_sha: merge_into_protected_branch) + end + + run_permission_checks(permissions_matrix.deep_merge(developer: { merge_into_protected_branch: true })) + end + + context "when the merge request is not in progress" do + before do + create(:merge_request, source_project: project, source_branch: unprotected_branch, target_branch: 'feature', in_progress_merge_commit_sha: nil) + end + + run_permission_checks(permissions_matrix.deep_merge(developer: { merge_into_protected_branch: false })) + end + end + + context "when a merge request does not exist for the given source/target branch" do + run_permission_checks(permissions_matrix.deep_merge(developer: { merge_into_protected_branch: false })) + end + end + + context "when 'developers can merge' and 'developers can push' are turned on for the #{protected_branch_type} protected branch" do + before { create(:protected_branch, name: protected_branch_name, developers_can_merge: true, developers_can_push: true, project: project) } + + run_permission_checks(permissions_matrix.deep_merge(developer: { push_protected_branch: true, push_all: true, merge_into_protected_branch: true })) + end + end end end diff --git a/spec/lib/gitlab/user_access_spec.rb b/spec/lib/gitlab/user_access_spec.rb new file mode 100644 index 00000000000..aa9ec243498 --- /dev/null +++ b/spec/lib/gitlab/user_access_spec.rb @@ -0,0 +1,88 @@ +require 'spec_helper' + +describe Gitlab::UserAccess, lib: true do + let(:access) { Gitlab::UserAccess.new(user, project: project) } + let(:project) { create(:project) } + let(:user) { create(:user) } + + describe 'can_push_to_branch?' do + describe 'push to none protected branch' do + it 'returns true if user is a master' do + project.team << [user, :master] + expect(access.can_push_to_branch?('random_branch')).to be_truthy + end + + it 'returns true if user is a developer' do + project.team << [user, :developer] + expect(access.can_push_to_branch?('random_branch')).to be_truthy + end + + it 'returns false if user is a reporter' do + project.team << [user, :reporter] + expect(access.can_push_to_branch?('random_branch')).to be_falsey + end + end + + describe 'push to protected branch' do + let(:branch) { create :protected_branch, project: project } + + it 'returns true if user is a master' do + project.team << [user, :master] + expect(access.can_push_to_branch?(branch.name)).to be_truthy + end + + it 'returns false if user is a developer' do + project.team << [user, :developer] + expect(access.can_push_to_branch?(branch.name)).to be_falsey + end + + it 'returns false if user is a reporter' do + project.team << [user, :reporter] + expect(access.can_push_to_branch?(branch.name)).to be_falsey + end + end + + describe 'push to protected branch if allowed for developers' do + before do + @branch = create :protected_branch, project: project, developers_can_push: true + end + + it 'returns true if user is a master' do + project.team << [user, :master] + expect(access.can_push_to_branch?(@branch.name)).to be_truthy + end + + it 'returns true if user is a developer' do + project.team << [user, :developer] + expect(access.can_push_to_branch?(@branch.name)).to be_truthy + end + + it 'returns false if user is a reporter' do + project.team << [user, :reporter] + expect(access.can_push_to_branch?(@branch.name)).to be_falsey + end + end + + describe 'merge to protected branch if allowed for developers' do + before do + @branch = create :protected_branch, project: project, developers_can_merge: true + end + + it 'returns true if user is a master' do + project.team << [user, :master] + expect(access.can_merge_to_branch?(@branch.name)).to be_truthy + end + + it 'returns true if user is a developer' do + project.team << [user, :developer] + expect(access.can_merge_to_branch?(@branch.name)).to be_truthy + end + + it 'returns false if user is a reporter' do + project.team << [user, :reporter] + expect(access.can_merge_to_branch?(@branch.name)).to be_falsey + end + end + + end +end diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index b39b958450c..e14cec589fe 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -4,16 +4,17 @@ describe Repository, models: true do include RepoHelpers TestBlob = Struct.new(:name) - let(:repository) { create(:project).repository } + let(:project) { create(:project) } + let(:repository) { project.repository } let(:user) { create(:user) } let(:commit_options) do author = repository.user_to_committer(user) { message: 'Test message', committer: author, author: author } end let(:merge_commit) do - source_sha = repository.find_branch('feature').target - merge_commit_sha = repository.merge(user, source_sha, 'master', commit_options) - repository.commit(merge_commit_sha) + merge_request = create(:merge_request, source_branch: 'feature', target_branch: 'master', source_project: project) + merge_commit_id = repository.merge(user, merge_request, commit_options) + repository.commit(merge_commit_id) end describe '#branch_names_contains' do diff --git a/spec/requests/api/api_helpers_spec.rb b/spec/requests/api/api_helpers_spec.rb index 83025953889..3d5c19aeff3 100644 --- a/spec/requests/api/api_helpers_spec.rb +++ b/spec/requests/api/api_helpers_spec.rb @@ -49,7 +49,7 @@ describe API::Helpers, api: true do it "should return nil for a user without access" do env[API::Helpers::PRIVATE_TOKEN_HEADER] = user.private_token - allow(Gitlab::UserAccess).to receive(:allowed?).and_return(false) + allow_any_instance_of(Gitlab::UserAccess).to receive(:allowed?).and_return(false) expect(current_user).to be_nil end @@ -73,7 +73,7 @@ describe API::Helpers, api: true do it "should return nil for a user without access" do env[API::Helpers::PRIVATE_TOKEN_HEADER] = personal_access_token.token - allow(Gitlab::UserAccess).to receive(:allowed?).and_return(false) + allow_any_instance_of(Gitlab::UserAccess).to receive(:allowed?).and_return(false) expect(current_user).to be_nil end diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index afabeed4a80..47c0580e0f0 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -224,7 +224,7 @@ describe GitPushService, services: true do it "when pushing a branch for the first time" do expect(project).to receive(:execute_hooks) expect(project.default_branch).to eq("master") - expect(project.protected_branches).to receive(:create).with({ name: "master", developers_can_push: false }) + expect(project.protected_branches).to receive(:create).with({ name: "master", developers_can_push: false, developers_can_merge: false }) execute_service(project, user, @blankrev, 'newrev', 'refs/heads/master' ) end @@ -242,7 +242,17 @@ describe GitPushService, services: true do expect(project).to receive(:execute_hooks) expect(project.default_branch).to eq("master") - expect(project.protected_branches).to receive(:create).with({ name: "master", developers_can_push: true }) + expect(project.protected_branches).to receive(:create).with({ name: "master", developers_can_push: true, developers_can_merge: false }) + + execute_service(project, user, @blankrev, 'newrev', 'refs/heads/master') + end + + it "when pushing a branch for the first time with default branch protection set to 'developers can merge'" do + stub_application_setting(default_branch_protection: Gitlab::Access::PROTECTION_DEV_CAN_MERGE) + + expect(project).to receive(:execute_hooks) + expect(project.default_branch).to eq("master") + expect(project.protected_branches).to receive(:create).with({ name: "master", developers_can_push: false, developers_can_merge: true }) execute_service(project, user, @blankrev, 'newrev', 'refs/heads/master' ) end diff --git a/spec/services/merge_requests/refresh_service_spec.rb b/spec/services/merge_requests/refresh_service_spec.rb index 06f56d85aa8..ce643b3f860 100644 --- a/spec/services/merge_requests/refresh_service_spec.rb +++ b/spec/services/merge_requests/refresh_service_spec.rb @@ -88,8 +88,7 @@ describe MergeRequests::RefreshService, services: true do # Merge master -> feature branch author = { email: 'test@gitlab.com', time: Time.now, name: "Me" } commit_options = { message: 'Test message', committer: author, author: author } - master_commit = @project.repository.commit('master') - @project.repository.merge(@user, master_commit.id, 'feature', commit_options) + @project.repository.merge(@user, @merge_request, commit_options) commit = @project.repository.commit('feature') service.new(@project, @user).execute(@oldrev, commit.id, 'refs/heads/feature') reload_mrs -- cgit v1.2.1 From 5813aec22dac9a896e75a23781934d555aef4269 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Tue, 5 Jul 2016 10:10:34 +0200 Subject: Add Pending Tab to Admin Builds Add Pending Tab to Project Builds Update CHANGELOG --- CHANGELOG | 5 +++++ app/controllers/admin/builds_controller.rb | 4 +++- app/controllers/projects/builds_controller.rb | 4 +++- app/views/admin/builds/index.html.haml | 7 ++++++- app/views/projects/builds/index.html.haml | 7 ++++++- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 90f006d445d..6cfb51b5d62 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -133,6 +133,11 @@ v 8.9.5 - Fixed 'use shortcuts' button on docs. !4979 - Admin should be able to turn shared runners into specific ones. !4961 - Update RedCloth to 4.3.2 for CVE-2012-6684. !4929 (Takuya Noguchi) + - Add Pending tab for Builds + +v 8.9.4 (unreleased) + - Ensure references to private repos aren't shown to logged-out users +v 8.9.5 (unreleased) - Improve the request / withdraw access button. !4860 v 8.9.4 diff --git a/app/controllers/admin/builds_controller.rb b/app/controllers/admin/builds_controller.rb index 0db91eaaf2e..88f3c0e2fd4 100644 --- a/app/controllers/admin/builds_controller.rb +++ b/app/controllers/admin/builds_controller.rb @@ -5,8 +5,10 @@ class Admin::BuildsController < Admin::ApplicationController @builds = @all_builds.order('created_at DESC') @builds = case @scope + when 'pending' + @builds.pending.reverse_order when 'running' - @builds.running_or_pending.reverse_order + @builds.running.reverse_order when 'finished' @builds.finished else diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index ef3051d7519..d7513d75f01 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -10,8 +10,10 @@ class Projects::BuildsController < Projects::ApplicationController @builds = @all_builds.order('created_at DESC') @builds = case @scope + when 'pending' + @builds.pending.reverse_order when 'running' - @builds.running_or_pending.reverse_order + @builds.running.reverse_order when 'finished' @builds.finished else diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml index 9ea3cca0ecb..0fcff566a70 100644 --- a/app/views/admin/builds/index.html.haml +++ b/app/views/admin/builds/index.html.haml @@ -10,10 +10,15 @@ All %span.badge.js-totalbuilds-count= @all_builds.count(:id) + %li{class: ('active' if @scope == 'pending')} + = link_to admin_builds_path(scope: :pending) do + Pending + %span.badge.js-running-count= number_with_delimiter(@all_builds.pending.count(:id)) + %li{class: ('active' if @scope == 'running')} = link_to admin_builds_path(scope: :running) do Running - %span.badge.js-running-count= number_with_delimiter(@all_builds.running_or_pending.count(:id)) + %span.badge.js-running-count= number_with_delimiter(@all_builds.running.count(:id)) %li{class: ('active' if @scope == 'finished')} = link_to admin_builds_path(scope: :finished) do diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 85c31dfd918..41f0462e4be 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -11,12 +11,17 @@ %span.badge.js-totalbuilds-count = number_with_delimiter(@all_builds.count(:id)) + %li{class: ('active' if @scope == 'pending')} + = link_to project_builds_path(@project, scope: :pending) do + Pending + %span.badge.js-running-count + = number_with_delimiter(@all_builds.pending.count(:id)) %li{class: ('active' if @scope == 'running')} = link_to project_builds_path(@project, scope: :running) do Running %span.badge.js-running-count - = number_with_delimiter(@all_builds.running_or_pending.count(:id)) + = number_with_delimiter(@all_builds.running.count(:id)) %li{class: ('active' if @scope == 'finished')} = link_to project_builds_path(@project, scope: :finished) do -- cgit v1.2.1 From a3d8f89d9fd8e49017850e8e2a2c2ddcd405c7e7 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Tue, 5 Jul 2016 14:39:55 +0200 Subject: Add test for new pending tab and update tests for running tab --- spec/features/admin/admin_builds_spec.rb | 36 +++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/spec/features/admin/admin_builds_spec.rb b/spec/features/admin/admin_builds_spec.rb index a6198389f04..e177059d959 100644 --- a/spec/features/admin/admin_builds_spec.rb +++ b/spec/features/admin/admin_builds_spec.rb @@ -36,12 +36,45 @@ describe 'Admin Builds' do end end + context 'Pending tab' do + context 'when have pending builds' do + it 'shows pending builds' do + build1 = create(:ci_build, pipeline: pipeline, status: :pending) + build2 = create(:ci_build, pipeline: pipeline, status: :running) + build3 = create(:ci_build, pipeline: pipeline, status: :success) + build4 = create(:ci_build, pipeline: pipeline, status: :failed) + + visit admin_builds_path(scope: :pending) + + expect(page).to have_selector('.nav-links li.active', text: 'Pending') + expect(page.find('.build-link')).to have_content(build1.id) + expect(page.find('.build-link')).not_to have_content(build2.id) + expect(page.find('.build-link')).not_to have_content(build3.id) + expect(page.find('.build-link')).not_to have_content(build4.id) + expect(page).to have_link 'Cancel all' + end + end + + context 'when have no builds pending' do + it 'shows a message' do + create(:ci_build, pipeline: pipeline, status: :success) + + visit admin_builds_path(scope: :pending) + + expect(page).to have_selector('.nav-links li.active', text: 'Pending') + expect(page).to have_content 'No builds to show' + expect(page).not_to have_link 'Cancel all' + end + end + end + context 'Running tab' do context 'when have running builds' do it 'shows running builds' do - build1 = create(:ci_build, pipeline: pipeline, status: :pending) + build1 = create(:ci_build, pipeline: pipeline, status: :running) build2 = create(:ci_build, pipeline: pipeline, status: :success) build3 = create(:ci_build, pipeline: pipeline, status: :failed) + build4 = create(:ci_build, pipeline: pipeline, status: :pending) visit admin_builds_path(scope: :running) @@ -49,6 +82,7 @@ describe 'Admin Builds' do expect(page.find('.build-link')).to have_content(build1.id) expect(page.find('.build-link')).not_to have_content(build2.id) expect(page.find('.build-link')).not_to have_content(build3.id) + expect(page.find('.build-link')).not_to have_content(build4.id) expect(page).to have_link 'Cancel all' end end -- cgit v1.2.1 From 463f1cb52b0d57f0e388a0324a06f1a90bb9ea09 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Mon, 11 Jul 2016 10:33:04 +0200 Subject: Remove unused .js-running-count class --- app/views/admin/builds/index.html.haml | 6 +++--- app/views/projects/builds/index.html.haml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml index 0fcff566a70..3d77634d8fa 100644 --- a/app/views/admin/builds/index.html.haml +++ b/app/views/admin/builds/index.html.haml @@ -13,17 +13,17 @@ %li{class: ('active' if @scope == 'pending')} = link_to admin_builds_path(scope: :pending) do Pending - %span.badge.js-running-count= number_with_delimiter(@all_builds.pending.count(:id)) + %span.badge= number_with_delimiter(@all_builds.pending.count(:id)) %li{class: ('active' if @scope == 'running')} = link_to admin_builds_path(scope: :running) do Running - %span.badge.js-running-count= number_with_delimiter(@all_builds.running.count(:id)) + %span.badge= number_with_delimiter(@all_builds.running.count(:id)) %li{class: ('active' if @scope == 'finished')} = link_to admin_builds_path(scope: :finished) do Finished - %span.badge.js-running-count= number_with_delimiter(@all_builds.finished.count(:id)) + %span.badge= number_with_delimiter(@all_builds.finished.count(:id)) .nav-controls - if @all_builds.running_or_pending.any? diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 41f0462e4be..2af625f69cd 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -14,19 +14,19 @@ %li{class: ('active' if @scope == 'pending')} = link_to project_builds_path(@project, scope: :pending) do Pending - %span.badge.js-running-count + %span.badge = number_with_delimiter(@all_builds.pending.count(:id)) %li{class: ('active' if @scope == 'running')} = link_to project_builds_path(@project, scope: :running) do Running - %span.badge.js-running-count + %span.badge = number_with_delimiter(@all_builds.running.count(:id)) %li{class: ('active' if @scope == 'finished')} = link_to project_builds_path(@project, scope: :finished) do Finished - %span.badge.js-running-count + %span.badge = number_with_delimiter(@all_builds.finished.count(:id)) .nav-controls -- cgit v1.2.1 From c220f9a03717ea2274a61f3365d37b5bac5c24e7 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Tue, 12 Jul 2016 10:31:15 +0200 Subject: Add tests to project builds for pending tab Fix CHANGELOG Fix build spec for pending tab --- CHANGELOG | 6 +----- spec/features/builds_spec.rb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6cfb51b5d62..38aee5af6c5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -113,6 +113,7 @@ v 8.9.6 - Fix broken migration in MySQL. !5005 - Overwrite Host and X-Forwarded-Host headers in NGINX !5213 - Keeps issue number when importing from Gitlab.com + - Add Pending tab for Builds (Katarzyna Kobierska, Urszula Budziszewska) v 8.9.7 (unreleased) - Fix import_data wrongly saved as a result of an invalid import_url @@ -133,11 +134,6 @@ v 8.9.5 - Fixed 'use shortcuts' button on docs. !4979 - Admin should be able to turn shared runners into specific ones. !4961 - Update RedCloth to 4.3.2 for CVE-2012-6684. !4929 (Takuya Noguchi) - - Add Pending tab for Builds - -v 8.9.4 (unreleased) - - Ensure references to private repos aren't shown to logged-out users -v 8.9.5 (unreleased) - Improve the request / withdraw access button. !4860 v 8.9.4 diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index 16832c297ac..38c11ca9c4c 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -13,6 +13,18 @@ describe "Builds" do end describe "GET /:project/builds" do + context "Pending scope" do + before do + visit namespace_project_builds_path(@project.namespace, @project, scope: :pending) + end + + it { expect(page).to have_link 'Cancel running' } + it { expect(page).to have_selector('.nav-links li.active', text: 'Pending') } + it { expect(page).to have_content @build.short_sha } + it { expect(page).to have_content @build.ref } + it { expect(page).to have_content @build.name } + end + context "Running scope" do before do @build.run! -- cgit v1.2.1 From c958305409dbec64852a88fb91ecd55da7bd79d3 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Mon, 18 Jul 2016 10:57:22 +0200 Subject: Modify test for Build tabs --- spec/features/builds_spec.rb | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index 38c11ca9c4c..cab3dc1d167 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -18,11 +18,13 @@ describe "Builds" do visit namespace_project_builds_path(@project.namespace, @project, scope: :pending) end - it { expect(page).to have_link 'Cancel running' } - it { expect(page).to have_selector('.nav-links li.active', text: 'Pending') } - it { expect(page).to have_content @build.short_sha } - it { expect(page).to have_content @build.ref } - it { expect(page).to have_content @build.name } + it "shows Pending tab builds" do + expect(page).to have_link 'Cancel running' + expect(page).to have_selector('.nav-links li.active', text: 'Pending') + expect(page).to have_content @build.short_sha + expect(page).to have_content @build.ref + expect(page).to have_content @build.name + end end context "Running scope" do @@ -31,11 +33,13 @@ describe "Builds" do visit namespace_project_builds_path(@project.namespace, @project, scope: :running) end - it { expect(page).to have_selector('.nav-links li.active', text: 'Running') } - it { expect(page).to have_link 'Cancel running' } - it { expect(page).to have_content @build.short_sha } - it { expect(page).to have_content @build.ref } - it { expect(page).to have_content @build.name } + it "shows Running tab builds" do + expect(page).to have_selector('.nav-links li.active', text: 'Running') + expect(page).to have_link 'Cancel running' + expect(page).to have_content @build.short_sha + expect(page).to have_content @build.ref + expect(page).to have_content @build.name + end end context "Finished scope" do @@ -44,9 +48,11 @@ describe "Builds" do visit namespace_project_builds_path(@project.namespace, @project, scope: :finished) end - it { expect(page).to have_selector('.nav-links li.active', text: 'Finished') } - it { expect(page).to have_content 'No builds to show' } - it { expect(page).to have_link 'Cancel running' } + it "shows Finished tab builds" do + expect(page).to have_selector('.nav-links li.active', text: 'Finished') + expect(page).to have_content 'No builds to show' + expect(page).to have_link 'Cancel running' + end end context "All builds" do @@ -55,11 +61,13 @@ describe "Builds" do visit namespace_project_builds_path(@project.namespace, @project) end - it { expect(page).to have_selector('.nav-links li.active', text: 'All') } - it { expect(page).to have_content @build.short_sha } - it { expect(page).to have_content @build.ref } - it { expect(page).to have_content @build.name } - it { expect(page).not_to have_link 'Cancel running' } + it "shows All tab builds" do + expect(page).to have_selector('.nav-links li.active', text: 'All') + expect(page).to have_content @build.short_sha + expect(page).to have_content @build.ref + expect(page).to have_content @build.name + expect(page).not_to have_link 'Cancel running' + end end end -- cgit v1.2.1 From 60a2b3eff2b91ae8db6eac4df95059c5fcd3eb31 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 18 Jul 2016 11:02:07 +0200 Subject: allow empty repos on import/export --- lib/gitlab/import_export/importer.rb | 3 +-- lib/gitlab/import_export/repo_restorer.rb | 9 ++------- lib/gitlab/import_export/repo_saver.rb | 2 +- lib/gitlab/import_export/wiki_repo_saver.rb | 1 + 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/gitlab/import_export/importer.rb b/lib/gitlab/import_export/importer.rb index 8f66f48cbfe..6b69a653f12 100644 --- a/lib/gitlab/import_export/importer.rb +++ b/lib/gitlab/import_export/importer.rb @@ -44,8 +44,7 @@ module Gitlab def wiki_restorer Gitlab::ImportExport::RepoRestorer.new(path_to_bundle: wiki_repo_path, shared: @shared, - project: ProjectWiki.new(project_tree.restored_project), - wiki: true) + project: ProjectWiki.new(project_tree.restored_project)) end def uploads_restorer diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb index 546dae4d122..f84de652a57 100644 --- a/lib/gitlab/import_export/repo_restorer.rb +++ b/lib/gitlab/import_export/repo_restorer.rb @@ -3,15 +3,14 @@ module Gitlab class RepoRestorer include Gitlab::ImportExport::CommandLineUtil - def initialize(project:, shared:, path_to_bundle:, wiki: false) + def initialize(project:, shared:, path_to_bundle:) @project = project @path_to_bundle = path_to_bundle @shared = shared - @wiki = wiki end def restore - return wiki? unless File.exist?(@path_to_bundle) + return true unless File.exist?(@path_to_bundle) FileUtils.mkdir_p(path_to_repo) @@ -30,10 +29,6 @@ module Gitlab def path_to_repo @project.repository.path_to_repo end - - def wiki? - @wiki - end end end end diff --git a/lib/gitlab/import_export/repo_saver.rb b/lib/gitlab/import_export/repo_saver.rb index cce43fe994b..331e14021e6 100644 --- a/lib/gitlab/import_export/repo_saver.rb +++ b/lib/gitlab/import_export/repo_saver.rb @@ -11,7 +11,7 @@ module Gitlab end def save - return false if @project.empty_repo? + return true if @project.empty_repo? # it's ok to have no repo @full_path = File.join(@shared.export_path, ImportExport.project_bundle_filename) bundle_to_disk diff --git a/lib/gitlab/import_export/wiki_repo_saver.rb b/lib/gitlab/import_export/wiki_repo_saver.rb index 1eedae39f8a..6107420e4dd 100644 --- a/lib/gitlab/import_export/wiki_repo_saver.rb +++ b/lib/gitlab/import_export/wiki_repo_saver.rb @@ -4,6 +4,7 @@ module Gitlab def save @wiki = ProjectWiki.new(@project) return true unless wiki_repository_exists? # it's okay to have no Wiki + bundle_to_disk(File.join(@shared.export_path, project_filename)) end -- cgit v1.2.1 From c157305373593d49aaa2536f3220a6b475d74914 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 18 Jul 2016 11:07:42 +0200 Subject: added changelog --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 94f212324f7..52e47ba9c95 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -111,6 +111,7 @@ v 8.10.0 (unreleased) - Fix creating group with space in group path - Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska) - Limit the number of retries on error to 3 for exporting projects + - Allow empty repositories on project import/export v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 -- cgit v1.2.1 From 888b9456d190bd83538d0c21c457d63c7f050d6c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 18 Jul 2016 12:48:07 +0300 Subject: Reduce font-size for headers for nicer and more compact look Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/framework/typography.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index 4f860c009e0..8659604cb8b 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -37,7 +37,7 @@ } h1 { - font-size: 2.25em; + font-size: 2em; font-weight: 600; margin: 1em 0 10px; padding: 0 0 0.3em; @@ -46,7 +46,7 @@ } h2 { - font-size: 1.8em; + font-size: 1.6em; font-weight: 600; margin: 1em 0 10px; padding-bottom: 0.3em; @@ -56,7 +56,7 @@ h3 { margin: 1em 0 10px; - font-size: 1.5em; + font-size: 1.4em; } h4 { -- cgit v1.2.1 From 6ba1c27772008b08da5e8515d38c052980c89d37 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 18 Jul 2016 13:02:15 +0300 Subject: Make sub navigation background color darker for better visual separation Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/framework/variables.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index f0e7002e4cd..1882d4e888d 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -16,7 +16,7 @@ $border-color: #e5e5e5; $focus-border-color: #3aabf0; $table-border-color: #f0f0f0; $background-color: #fafafa; -$dark-background-color: #f7f7f7; +$dark-background-color: #f5f5f5; $table-text-gray: #8f8f8f; /* -- cgit v1.2.1 From df8e4f3ae2097241761e4997dbd2b964895d9b0f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 18 Jul 2016 13:05:34 +0300 Subject: Make repository files list UI a bit more compact Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/pages/tree.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss index 42a20e9775f..390977297fb 100644 --- a/app/assets/stylesheets/pages/tree.scss +++ b/app/assets/stylesheets/pages/tree.scss @@ -19,7 +19,7 @@ border-top: 1px solid $table-border-gray; td, th { - line-height: 23px; + line-height: 21px; } &:hover { -- cgit v1.2.1 From d61b4aa5dfce8d14e3db574d3c67b2f506d333b2 Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 7 Jul 2016 11:02:57 +0200 Subject: render only commit title update CHANGELOG --- CHANGELOG | 1 + app/views/projects/builds/_sidebar.html.haml | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index aa9748c685d..e5b93a53cf0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -128,6 +128,7 @@ v 8.9.7 (unreleased) v 8.9.6 - Fix importing of events under notes for GitLab projects + - Render only commit message title in builds v 8.9.5 - Add more debug info to import/export and memory killer. !5108 diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index cab21f0cf19..00e7ca757aa 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -94,9 +94,11 @@ .block .title - Commit message - %p.build-light-text.append-bottom-0 - #{@build.pipeline.git_commit_message} + Commit title + %p.build-light-text.append-bottom- + #{@build.pipeline.commit.title} + + - if @build.tags.any? .block -- cgit v1.2.1 From c8c8fd928d5f55516e155b2616e2f79a720d36f9 Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 7 Jul 2016 12:26:48 +0200 Subject: render-only-commit-title-update --- app/views/projects/builds/_sidebar.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index 00e7ca757aa..9f1b18e053d 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -95,8 +95,8 @@ .block .title Commit title - %p.build-light-text.append-bottom- - #{@build.pipeline.commit.title} + %p.build-light-text.append-bottom-0 + #{@build.commit.title} -- cgit v1.2.1 From a29905c08268b6cd991de3f6770b4d3be371b487 Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 7 Jul 2016 13:27:01 +0200 Subject: add try to title method --- app/views/projects/builds/_sidebar.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index 9f1b18e053d..ee1b95e9e84 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -96,7 +96,7 @@ .title Commit title %p.build-light-text.append-bottom-0 - #{@build.commit.title} + #{@build.pipeline.commit.try(:title)} -- cgit v1.2.1 From 2a3246a2f73527bf57146c215b23a7024aeaaf99 Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 7 Jul 2016 11:02:57 +0200 Subject: render only commit title update CHANGELOG --- app/views/projects/builds/_sidebar.html.haml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index ee1b95e9e84..3fc1157ddcb 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -98,8 +98,6 @@ %p.build-light-text.append-bottom-0 #{@build.pipeline.commit.try(:title)} - - - if @build.tags.any? .block .title -- cgit v1.2.1 From bacd95810b33cde3f2f17e439b772ff10f49e3bb Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 7 Jul 2016 12:26:48 +0200 Subject: render-only-commit-title-update --- app/views/projects/builds/_sidebar.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index 3fc1157ddcb..aba09a37ac7 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -96,7 +96,7 @@ .title Commit title %p.build-light-text.append-bottom-0 - #{@build.pipeline.commit.try(:title)} + #{@build.commit.title} - if @build.tags.any? .block -- cgit v1.2.1 From af1a6f0533854cca76d4b0bcf2059131a1bfd106 Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 7 Jul 2016 13:27:01 +0200 Subject: add try to title method --- app/views/projects/builds/_sidebar.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index aba09a37ac7..3fc1157ddcb 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -96,7 +96,7 @@ .title Commit title %p.build-light-text.append-bottom-0 - #{@build.commit.title} + #{@build.pipeline.commit.try(:title)} - if @build.tags.any? .block -- cgit v1.2.1 From fda1d011824c24fc38dcac0e2fc795a4515ae2ec Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Mon, 11 Jul 2016 09:11:20 +0200 Subject: add git-commit-title-method into pipeline model and modify view add git-commit-title-method into tests --- app/models/ci/pipeline.rb | 4 ++++ app/views/projects/builds/_sidebar.html.haml | 2 +- spec/views/projects/builds/show.html.haml_spec.rb | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index b468434866b..a65a826536d 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -51,6 +51,10 @@ module Ci commit.try(:message) end + def git_commit_title + commit.try(:title) + end + def short_sha Ci::Pipeline.truncate_sha(sha) end diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index 3fc1157ddcb..396cc4ad925 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -96,7 +96,7 @@ .title Commit title %p.build-light-text.append-bottom-0 - #{@build.pipeline.commit.try(:title)} + #{@build.pipeline.git_commit_title} - if @build.tags.any? .block diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index cd18d19ef5e..7051e084375 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -22,6 +22,10 @@ describe 'projects/builds/show' do it 'does not show retry button' do expect(rendered).not_to have_link('Retry') end + + it 'shows commit title' do + expect(rendered).to have_text(@git_commit_title) + end end context 'when build is not running' do @@ -33,5 +37,10 @@ describe 'projects/builds/show' do it 'shows retry button' do expect(rendered).to have_link('Retry') end + + it 'shows commit title' do + expect(rendered).to have_text(@git_commit_title) + end end + end -- cgit v1.2.1 From 86df8bc3530121440c3d4e3a56758206eaf73710 Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Mon, 11 Jul 2016 13:15:03 +0200 Subject: repair rubocop test --- spec/views/projects/builds/show.html.haml_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index 7051e084375..c66f15e3c0b 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -38,7 +38,7 @@ describe 'projects/builds/show' do expect(rendered).to have_link('Retry') end - it 'shows commit title' do + it 'shows commit title' do expect(rendered).to have_text(@git_commit_title) end end -- cgit v1.2.1 From 85fc83c5888411bcc1ee7ec7dc75a7d902f821cb Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 14 Jul 2016 14:51:10 +0200 Subject: add test to view repair rubocop test and update CHANGELOG repair rubocop test repair rubocop repair rubocop repair rubocop --- CHANGELOG | 1 + spec/views/projects/builds/show.html.haml_spec.rb | 25 +++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e5b93a53cf0..64cf8a2c5ed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -129,6 +129,7 @@ v 8.9.7 (unreleased) v 8.9.6 - Fix importing of events under notes for GitLab projects - Render only commit message title in builds + - Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska) v 8.9.5 - Add more debug info to import/export and memory killer. !5108 diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index c66f15e3c0b..c71705fe8e5 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -3,12 +3,15 @@ require 'spec_helper' describe 'projects/builds/show' do include Devise::TestHelpers - let(:build) { create(:ci_build) } - let(:project) { build.project } + let(:project) { create(:project) } + let(:pipeline) { create(:ci_pipeline, project: project) } + let(:build) { create(:ci_build, pipeline: pipeline) } + let(:commit) { project.commit } before do assign(:build, build) assign(:project, project) + assign(:commit_title, build.project.commit.title) allow(view).to receive(:can?).and_return(true) end @@ -22,10 +25,6 @@ describe 'projects/builds/show' do it 'does not show retry button' do expect(rendered).not_to have_link('Retry') end - - it 'shows commit title' do - expect(rendered).to have_text(@git_commit_title) - end end context 'when build is not running' do @@ -37,10 +36,18 @@ describe 'projects/builds/show' do it 'shows retry button' do expect(rendered).to have_link('Retry') end + end - it 'shows commit title' do - expect(rendered).to have_text(@git_commit_title) + context 'show commit title' do + before do + build.run! + render end - end + it 'show commit title' do + within('p.build-light-text.append-bottom-0') do + assert page.has_content?(commit.title) + end + end + end end -- cgit v1.2.1 From 9244a36edbc50b69556109348616beeccb5f68ea Mon Sep 17 00:00:00 2001 From: ula budziszewska Date: Thu, 14 Jul 2016 17:07:26 +0000 Subject: Update CHANGELOG --- CHANGELOG | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 64cf8a2c5ed..29446e044db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -113,6 +113,7 @@ v 8.10.0 (unreleased) - Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska) - Limit the number of retries on error to 3 for exporting projects - Allow empty repositories on project import/export + - Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska) v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 @@ -128,8 +129,7 @@ v 8.9.7 (unreleased) v 8.9.6 - Fix importing of events under notes for GitLab projects - - Render only commit message title in builds - - Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska) + v 8.9.5 - Add more debug info to import/export and memory killer. !5108 -- cgit v1.2.1 From 9d75ecedac4e9754ac7d9c4ccc7290df576df6b8 Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Fri, 15 Jul 2016 11:10:30 +0200 Subject: modify view test to commit title modify view test to commit title-repair rubocop modify view test to commit title-repair rubocop modify view test to commit title-repair rubocop --- spec/views/projects/builds/show.html.haml_spec.rb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index c71705fe8e5..61004d0fed7 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -6,12 +6,10 @@ describe 'projects/builds/show' do let(:project) { create(:project) } let(:pipeline) { create(:ci_pipeline, project: project) } let(:build) { create(:ci_build, pipeline: pipeline) } - let(:commit) { project.commit } before do assign(:build, build) assign(:project, project) - assign(:commit_title, build.project.commit.title) allow(view).to receive(:can?).and_return(true) end @@ -38,15 +36,12 @@ describe 'projects/builds/show' do end end - context 'show commit title' do - before do - build.run! - render - end - - it 'show commit title' do + describe 'projects/builds/show/commit title' do + let(:commit_title) {build.project.commit.title} + + it 'shows commit title' do within('p.build-light-text.append-bottom-0') do - assert page.has_content?(commit.title) + expect(rendered).to have_content(commit_title) end end end -- cgit v1.2.1 From b30a3981d7dfcbf7cca278f5df7589d223247862 Mon Sep 17 00:00:00 2001 From: ula budziszewska Date: Fri, 15 Jul 2016 15:56:16 +0000 Subject: Update CHANGELOG - remove empty line --- CHANGELOG | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 29446e044db..c25b594f3c5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -130,7 +130,6 @@ v 8.9.7 (unreleased) v 8.9.6 - Fix importing of events under notes for GitLab projects - v 8.9.5 - Add more debug info to import/export and memory killer. !5108 - Fixed avatar alignment in new MR view. !5095 -- cgit v1.2.1 From 679f2ac45552d027159291ef3bb008596268948e Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 7 Jul 2016 11:02:57 +0200 Subject: render only commit title update CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index c25b594f3c5..e19b835504a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -129,6 +129,7 @@ v 8.9.7 (unreleased) v 8.9.6 - Fix importing of events under notes for GitLab projects + - Render only commit message title in builds v 8.9.5 - Add more debug info to import/export and memory killer. !5108 -- cgit v1.2.1 From 7d74f2f00f65f1fd9fc53e631f6640cf6a713d34 Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Thu, 14 Jul 2016 14:51:10 +0200 Subject: add test to view repair rubocop test and update CHANGELOG repair rubocop test repair rubocop repair rubocop repair rubocop --- CHANGELOG | 1 + spec/views/projects/builds/show.html.haml_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index e19b835504a..28f7fc005fc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -130,6 +130,7 @@ v 8.9.7 (unreleased) v 8.9.6 - Fix importing of events under notes for GitLab projects - Render only commit message title in builds + - Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska) v 8.9.5 - Add more debug info to import/export and memory killer. !5108 diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index 61004d0fed7..f7d5d8b020b 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -10,6 +10,7 @@ describe 'projects/builds/show' do before do assign(:build, build) assign(:project, project) + assign(:commit_title, build.project.commit.title) allow(view).to receive(:can?).and_return(true) end -- cgit v1.2.1 From 0c56fdcdda7b651b8ec7bf78cf86a0a8af2564c6 Mon Sep 17 00:00:00 2001 From: ula budziszewska Date: Thu, 14 Jul 2016 17:07:26 +0000 Subject: Update CHANGELOG --- CHANGELOG | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 28f7fc005fc..29446e044db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -129,8 +129,7 @@ v 8.9.7 (unreleased) v 8.9.6 - Fix importing of events under notes for GitLab projects - - Render only commit message title in builds - - Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska) + v 8.9.5 - Add more debug info to import/export and memory killer. !5108 -- cgit v1.2.1 From af44c0ba860084c121523d1403932fc4caefcb0a Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Fri, 15 Jul 2016 11:10:30 +0200 Subject: modify view test to commit title modify view test to commit title-repair rubocop modify view test to commit title-repair rubocop modify view test to commit title-repair rubocop remove empty line in CHANGELOG --- CHANGELOG | 1 - spec/views/projects/builds/show.html.haml_spec.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 29446e044db..c25b594f3c5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -130,7 +130,6 @@ v 8.9.7 (unreleased) v 8.9.6 - Fix importing of events under notes for GitLab projects - v 8.9.5 - Add more debug info to import/export and memory killer. !5108 - Fixed avatar alignment in new MR view. !5095 diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index f7d5d8b020b..61004d0fed7 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -10,7 +10,6 @@ describe 'projects/builds/show' do before do assign(:build, build) assign(:project, project) - assign(:commit_title, build.project.commit.title) allow(view).to receive(:can?).and_return(true) end -- cgit v1.2.1 From 0c2da7f7348095ae6babeee230484f7f9c59ea62 Mon Sep 17 00:00:00 2001 From: Paco Guzman Date: Mon, 18 Jul 2016 11:02:19 +0200 Subject: Don't parse Rinku returned value to DocFragment when it didn't change the original html string. --- CHANGELOG | 1 + lib/banzai/filter/autolink_filter.rb | 2 ++ spec/lib/banzai/filter/autolink_filter_spec.rb | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 94f212324f7..8c12c427597 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -64,6 +64,7 @@ v 8.10.0 (unreleased) - Collapse large diffs by default (!4990) - Fix mentioned users list on diff notes - Fix creation of deployment on build that is retried, redeployed or rollback + - Don't parse Rinku returned value to DocFragment when it didn't change the original html string. - Check for conflicts with existing Project's wiki path when creating a new project. - Show last push widget in upstream after push to fork - Fix stage status shown for pipelines diff --git a/lib/banzai/filter/autolink_filter.rb b/lib/banzai/filter/autolink_filter.rb index fac7dad3243..9ed45707515 100644 --- a/lib/banzai/filter/autolink_filter.rb +++ b/lib/banzai/filter/autolink_filter.rb @@ -56,6 +56,8 @@ module Banzai # period (e.g., http://localhost:3000/) rinku = Rinku.auto_link(html, :urls, options, IGNORE_PARENTS.to_a, 1) + return if rinku == html + # Rinku returns a String, so parse it back to a Nokogiri::XML::Document # for further processing. @doc = parse_html(rinku) diff --git a/spec/lib/banzai/filter/autolink_filter_spec.rb b/spec/lib/banzai/filter/autolink_filter_spec.rb index 84c2ddf444e..dca7f997570 100644 --- a/spec/lib/banzai/filter/autolink_filter_spec.rb +++ b/spec/lib/banzai/filter/autolink_filter_spec.rb @@ -15,6 +15,16 @@ describe Banzai::Filter::AutolinkFilter, lib: true do expect(filter(act).to_html).to eq exp end + context 'when the input contains no links' do + it 'does not parse_html back the rinku returned value' do + act = HTML::Pipeline.parse('

This text contains no links to autolink

') + + expect_any_instance_of(described_class).not_to receive(:parse_html) + + filter(act).to_html + end + end + context 'Rinku schemes' do it 'autolinks http' do doc = filter("See #{link}") @@ -58,6 +68,16 @@ describe Banzai::Filter::AutolinkFilter, lib: true do expect(filter(act).to_html).to eq exp end end + + context 'when the input contains link' do + it 'does parse_html back the rinku returned value' do + act = HTML::Pipeline.parse("

See #{link}

") + + expect_any_instance_of(described_class).to receive(:parse_html).at_least(:once).and_call_original + + filter(act).to_html + end + end end context 'other schemes' do -- cgit v1.2.1 From a0260bb57777ae66353bbcd079405702cc6800d7 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 14:01:57 +0200 Subject: Disable transaction when adding index for Ci::Pipeline --- db/migrate/20160715134306_add_index_for_pipeline_user_id.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb index e09caa0e6d7..7c991c6d998 100644 --- a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb +++ b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb @@ -1,6 +1,8 @@ class AddIndexForPipelineUserId < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + def change add_concurrent_index :ci_commits, :user_id end -- cgit v1.2.1 From 2e021c4e17f0ffb223d388ef4c177f82f162e805 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 18 Jul 2016 13:29:14 +0100 Subject: bumps gitlab_git to 10.3.0 --- Gemfile.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f8018e58a5e..df8e2008bca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -274,7 +274,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.2.3) + gitlab_git (10.3.0) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) @@ -389,6 +389,7 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) + mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) -- cgit v1.2.1 From 7d0fe1f04ed285e7e5cf825a305114b3e981c2f8 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Jul 2016 18:39:58 +0200 Subject: Add implementation of manual actions --- app/controllers/projects/builds_controller.rb | 9 ++++++ app/models/ci/build.rb | 24 +++++++++++++++ app/models/ci/pipeline.rb | 4 +++ app/models/deployment.rb | 4 +++ app/views/projects/ci/builds/_build.html.haml | 13 +++++++-- .../projects/ci/pipelines/_pipeline.html.haml | 34 +++++++++++++++------- .../projects/deployments/_deployment.html.haml | 2 ++ app/views/projects/deployments/_playable.html.haml | 12 ++++++++ .../projects/environments/_environment.html.haml | 4 +++ config/routes.rb | 1 + lib/ci/gitlab_ci_yaml_processor.rb | 4 +-- spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 2 +- 12 files changed, 96 insertions(+), 17 deletions(-) create mode 100644 app/views/projects/deployments/_playable.html.haml diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index d7513d75f01..597cfa93712 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -57,6 +57,15 @@ class Projects::BuildsController < Projects::ApplicationController redirect_to build_path(build) end + def play + unless @build.playable? + return render_404 + end + + build = @build.play(current_user) + redirect_to build_path(build) + end + def cancel @build.cancel redirect_to build_path(@build) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index ffac3a22efc..81feca0088f 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -15,6 +15,7 @@ module Ci scope :with_artifacts, ->() { where.not(artifacts_file: nil) } scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) } scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) } + scope :manual_actions, ->() { where(when: :manual).without_created } mount_uploader :artifacts_file, ArtifactUploader mount_uploader :artifacts_metadata, ArtifactUploader @@ -91,6 +92,29 @@ module Ci end end + def manual? + self.when == 'manual' + end + + def playable_actions + pipeline.playable_actions + end + + def playable? + project.builds_enabled? && commands.present? && manual? + end + + def play(current_user = nil) + if skipped? + # We can run skipped build + new_build.user = current_user + new_build.queue + else + # Otherwise we need to create a duplicate + Ci::Build.retry(self, current_user) + end + end + def retryable? project.builds_enabled? && commands.present? && complete? end diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index b468434866b..5aefe1d1694 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -65,6 +65,10 @@ module Ci !tag? end + def playable_actions + builds.manual_actions.latest + end + def retryable? builds.latest.any? do |build| build.failed? && build.retryable? diff --git a/app/models/deployment.rb b/app/models/deployment.rb index 520026c18dd..44dfb67552e 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -32,4 +32,8 @@ class Deployment < ActiveRecord::Base def keep_around_commit project.repository.keep_around(self.sha) end + + def playable_actions + deployable.try(:playable_actions) + end end diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index e1b42b2cfa5..efedafefc38 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -39,6 +39,8 @@ %span.label.label-danger allowed to fail - if defined?(retried) && retried %span.label.label-warning retried + - if build.manual? + %span.label.label-info manual - if defined?(runner) && runner @@ -79,6 +81,11 @@ - if build.active? = link_to cancel_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Cancel', class: 'btn btn-build' do = icon('remove', class: 'cred') - - elsif defined?(allow_retry) && allow_retry && build.retryable? - = link_to retry_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do - = icon('repeat') + - elsif defined?(allow_retry) && allow_retry + - if build.retryable? + = link_to retry_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do + = icon('repeat') + - elsif build.playable? + = link_to play_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do + = icon('play') + diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 0557d384e33..1285fce4930 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -57,18 +57,30 @@ %td.pipeline-actions .controls.hidden-xs.pull-right - artifacts = pipeline.builds.latest.select { |b| b.artifacts? } - - if artifacts.present? - .inline - .btn-group - %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} - = icon("download") - %b.caret - %ul.dropdown-menu.dropdown-menu-align-right - - artifacts.each do |build| + - playable = pipeline.playable_actions + - if artifacts.present? || playable.any? + .btn-group.inline + - if playable.any? + .btn-group + %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} + = icon("play") + %b.caret + %ul.dropdown-menu.dropdown-menu-align-right %li - = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, build), rel: 'nofollow' do - = icon("download") - %span Download '#{build.name}' artifacts + = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do + = icon("play") + %span= playable.name.titleize + - if artifacts.present? + .btn-group + %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} + = icon("download") + %b.caret + %ul.dropdown-menu.dropdown-menu-align-right + - artifacts.each do |build| + %li + = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, build), rel: 'nofollow' do + = icon("download") + %span Download '#{build.name}' artifacts - if can?(current_user, :update_pipeline, @project) .cancel-retry-btns.inline diff --git a/app/views/projects/deployments/_deployment.html.haml b/app/views/projects/deployments/_deployment.html.haml index d08dd92f1f6..e430d195ea6 100644 --- a/app/views/projects/deployments/_deployment.html.haml +++ b/app/views/projects/deployments/_deployment.html.haml @@ -21,3 +21,5 @@ Retry - else Rollback + + = render 'playable', deployment: deployment diff --git a/app/views/projects/deployments/_playable.html.haml b/app/views/projects/deployments/_playable.html.haml new file mode 100644 index 00000000000..02e4fb7974e --- /dev/null +++ b/app/views/projects/deployments/_playable.html.haml @@ -0,0 +1,12 @@ +- playable = deployment.playable_actions +- if playable.any? + .btn-group.inline + .btn-group + %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} + = icon("play") + %b.caret + %ul.dropdown-menu.dropdown-menu-align-right + %li + = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do + = icon("play") + %span= playable.name.titleize diff --git a/app/views/projects/environments/_environment.html.haml b/app/views/projects/environments/_environment.html.haml index eafa246d05f..8e517196e27 100644 --- a/app/views/projects/environments/_environment.html.haml +++ b/app/views/projects/environments/_environment.html.haml @@ -15,3 +15,7 @@ %td - if last_deployment #{time_ago_with_tooltip(last_deployment.created_at)} + + %td + - if can?(current_user, :create_deployment, last_deployment) && last_deployment.deployable + = render 'projects/deployments/playable', deployment: last_deployment diff --git a/config/routes.rb b/config/routes.rb index 3160fd767b8..be651d8903f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -750,6 +750,7 @@ Rails.application.routes.draw do get :status post :cancel post :retry + post :play post :erase get :trace get :raw diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index a48dc542b14..41449d720b3 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -194,8 +194,8 @@ module Ci raise ValidationError, "#{name} job: allow_failure parameter should be an boolean" end - if job[:when] && !job[:when].in?(%w[on_success on_failure always]) - raise ValidationError, "#{name} job: when parameter should be on_success, on_failure or always" + if job[:when] && !job[:when].in?(%w[on_success on_failure always manual]) + raise ValidationError, "#{name} job: when parameter should be on_success, on_failure, always or manual" end if job[:environment] && !validate_environment(job[:environment]) diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index ad6587b4c25..d20fd4ab7dd 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -1141,7 +1141,7 @@ EOT config = YAML.dump({ rspec: { script: "test", when: 1 } }) expect do GitlabCiYamlProcessor.new(config, path) - end.to raise_error(GitlabCiYamlProcessor::ValidationError, "rspec job: when parameter should be on_success, on_failure or always") + end.to raise_error(GitlabCiYamlProcessor::ValidationError, "rspec job: when parameter should be on_success, on_failure, always or manual") end it "returns errors if job artifacts:name is not an a string" do -- cgit v1.2.1 From 3248c9fb56e5d5cb8980cb37effec1ee2f4f664a Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 16 Jul 2016 23:06:34 +0200 Subject: Rename playable_actions to manual_actions --- app/models/ci/build.rb | 4 ---- app/models/ci/pipeline.rb | 4 ++-- app/models/deployment.rb | 4 ++-- app/views/projects/ci/pipelines/_pipeline.html.haml | 6 +++--- app/views/projects/deployments/_playable.html.haml | 6 +++--- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 81feca0088f..a05b3f43f97 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -96,10 +96,6 @@ module Ci self.when == 'manual' end - def playable_actions - pipeline.playable_actions - end - def playable? project.builds_enabled? && commands.present? && manual? end diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 5aefe1d1694..de9c74194ac 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -65,8 +65,8 @@ module Ci !tag? end - def playable_actions - builds.manual_actions.latest + def manual_actions + builds.latest.manual_actions end def retryable? diff --git a/app/models/deployment.rb b/app/models/deployment.rb index 44dfb67552e..aa1f7e462d2 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -33,7 +33,7 @@ class Deployment < ActiveRecord::Base project.repository.keep_around(self.sha) end - def playable_actions - deployable.try(:playable_actions) + def manual_actions + deployable.try(:manual_actions) end end diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 1285fce4930..b9adc920ea6 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -57,8 +57,8 @@ %td.pipeline-actions .controls.hidden-xs.pull-right - artifacts = pipeline.builds.latest.select { |b| b.artifacts? } - - playable = pipeline.playable_actions - - if artifacts.present? || playable.any? + - actions = pipeline.manual_actions + - if artifacts.present? || actions.any? .btn-group.inline - if playable.any? .btn-group @@ -69,7 +69,7 @@ %li = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do = icon("play") - %span= playable.name.titleize + %span= actions.name.titleize - if artifacts.present? .btn-group %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} diff --git a/app/views/projects/deployments/_playable.html.haml b/app/views/projects/deployments/_playable.html.haml index 02e4fb7974e..4bff21ce7a5 100644 --- a/app/views/projects/deployments/_playable.html.haml +++ b/app/views/projects/deployments/_playable.html.haml @@ -1,5 +1,5 @@ -- playable = deployment.playable_actions -- if playable.any? +- actions = deployment.manual_actions +- if actions.any? .btn-group.inline .btn-group %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} @@ -9,4 +9,4 @@ %li = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do = icon("play") - %span= playable.name.titleize + %span= actions.name.titleize -- cgit v1.2.1 From e00da96c88314df79600e7848ae6fe7e4a29af2e Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sun, 17 Jul 2016 01:48:51 +0200 Subject: Improve manual actions code and add model, service and feature tests Manual actions are accessible from: - Pipelines - Builds - Environments - Deployments --- app/controllers/projects/builds_controller.rb | 2 +- app/models/ci/build.rb | 14 +- app/models/deployment.rb | 2 +- app/views/projects/ci/builds/_build.html.haml | 2 +- .../projects/ci/pipelines/_pipeline.html.haml | 11 +- app/views/projects/deployments/_actions.haml | 22 +++ .../projects/deployments/_deployment.html.haml | 12 +- app/views/projects/deployments/_playable.html.haml | 12 -- .../projects/environments/_environment.html.haml | 3 +- app/views/projects/environments/index.html.haml | 1 + .../initializers/relative_naming_ci_namespace.rb | 16 ++ doc/ci/yaml/README.md | 17 +- spec/factories/ci/builds.rb | 5 + spec/features/environments_spec.rb | 38 +++- spec/features/pipelines_spec.rb | 22 +++ spec/models/build_spec.rb | 51 +++++ spec/models/ci/pipeline_spec.rb | 24 +++ spec/models/deployment_spec.rb | 1 + spec/services/ci/create_pipeline_service_spec.rb | 213 +++++++++++++++++++++ 19 files changed, 429 insertions(+), 39 deletions(-) create mode 100644 app/views/projects/deployments/_actions.haml delete mode 100644 app/views/projects/deployments/_playable.html.haml create mode 100644 config/initializers/relative_naming_ci_namespace.rb create mode 100644 spec/services/ci/create_pipeline_service_spec.rb diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index 597cfa93712..d64d1e52e2c 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -1,6 +1,6 @@ class Projects::BuildsController < Projects::ApplicationController before_action :build, except: [:index, :cancel_all] - before_action :authorize_read_build!, except: [:cancel, :cancel_all, :retry] + before_action :authorize_read_build!, except: [:cancel, :cancel_all, :retry, :play] before_action :authorize_update_build!, except: [:index, :show, :status, :raw] layout 'project' diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index a05b3f43f97..248ecd71962 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -15,7 +15,7 @@ module Ci scope :with_artifacts, ->() { where.not(artifacts_file: nil) } scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) } scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) } - scope :manual_actions, ->() { where(when: :manual).without_created } + scope :manual_actions, ->() { where(when: :manual).relevant } mount_uploader :artifacts_file, ArtifactUploader mount_uploader :artifacts_metadata, ArtifactUploader @@ -96,15 +96,19 @@ module Ci self.when == 'manual' end + def other_actions + pipeline.manual_actions.where.not(id: self) + end + def playable? project.builds_enabled? && commands.present? && manual? end def play(current_user = nil) - if skipped? - # We can run skipped build - new_build.user = current_user - new_build.queue + # Try to queue a current build + if self.queue + self.update(user: current_user) + self else # Otherwise we need to create a duplicate Ci::Build.retry(self, current_user) diff --git a/app/models/deployment.rb b/app/models/deployment.rb index aa1f7e462d2..1a7cd60817e 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -34,6 +34,6 @@ class Deployment < ActiveRecord::Base end def manual_actions - deployable.try(:manual_actions) + deployable.try(:other_actions) end end diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index efedafefc38..9264289987d 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -86,6 +86,6 @@ = link_to retry_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do = icon('repeat') - elsif build.playable? - = link_to play_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Retry', class: 'btn btn-build' do + = link_to play_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Play', class: 'btn btn-build' do = icon('play') diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index b9adc920ea6..397f26012d4 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -60,16 +60,17 @@ - actions = pipeline.manual_actions - if artifacts.present? || actions.any? .btn-group.inline - - if playable.any? + - if actions.any? .btn-group %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} = icon("play") %b.caret %ul.dropdown-menu.dropdown-menu-align-right - %li - = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do - = icon("play") - %span= actions.name.titleize + - actions.each do |build| + %li + = link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do + = icon("play") + %span= build.name.titleize - if artifacts.present? .btn-group %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml new file mode 100644 index 00000000000..9a8d4a63007 --- /dev/null +++ b/app/views/projects/deployments/_actions.haml @@ -0,0 +1,22 @@ +- if can?(current_user, :create_deployment, deployment) && deployment.deployable + .pull-right + - actions = deployment.manual_actions + - if actions.present? + .btn-group.inline + .btn-group + %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} + = icon("play") + %b.caret + %ul.dropdown-menu.dropdown-menu-align-right + - actions.each do |action| + %li + = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do + = icon("play") + %span= action.name.titleize + + - if defined?(allow_rollback) && allow_rollback + = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do + - if deployment.last? + Retry + - else + Rollback diff --git a/app/views/projects/deployments/_deployment.html.haml b/app/views/projects/deployments/_deployment.html.haml index e430d195ea6..baf02f1e6a0 100644 --- a/app/views/projects/deployments/_deployment.html.haml +++ b/app/views/projects/deployments/_deployment.html.haml @@ -7,19 +7,11 @@ %td - if deployment.deployable - = link_to namespace_project_build_path(@project.namespace, @project, deployment.deployable) do + = link_to [@project.namespace.becomes(Namespace), @project, deployment.deployable] do = "#{deployment.deployable.name} (##{deployment.deployable.id})" %td #{time_ago_with_tooltip(deployment.created_at)} %td - - if can?(current_user, :create_deployment, deployment) && deployment.deployable - .pull-right - = link_to retry_namespace_project_build_path(@project.namespace, @project, deployment.deployable), method: :post, class: 'btn btn-build' do - - if deployment.last? - Retry - - else - Rollback - - = render 'playable', deployment: deployment + = render 'projects/deployments/actions', deployment: deployment, allow_rollback: true diff --git a/app/views/projects/deployments/_playable.html.haml b/app/views/projects/deployments/_playable.html.haml deleted file mode 100644 index 4bff21ce7a5..00000000000 --- a/app/views/projects/deployments/_playable.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -- actions = deployment.manual_actions -- if actions.any? - .btn-group.inline - .btn-group - %a.dropdown-toggle.btn.btn-default{type: 'button', 'data-toggle' => 'dropdown'} - = icon("play") - %b.caret - %ul.dropdown-menu.dropdown-menu-align-right - %li - = link_to play_namespace_project_build_path(@project.namespace, @project, build), rel: 'nofollow' do - = icon("play") - %span= actions.name.titleize diff --git a/app/views/projects/environments/_environment.html.haml b/app/views/projects/environments/_environment.html.haml index 8e517196e27..e2453395602 100644 --- a/app/views/projects/environments/_environment.html.haml +++ b/app/views/projects/environments/_environment.html.haml @@ -17,5 +17,4 @@ #{time_ago_with_tooltip(last_deployment.created_at)} %td - - if can?(current_user, :create_deployment, last_deployment) && last_deployment.deployable - = render 'projects/deployments/playable', deployment: last_deployment + = render 'projects/deployments/actions', deployment: last_deployment diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 303d7c23d01..a6dd34653ab 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -28,4 +28,5 @@ %th Environment %th Last deployment %th Date + %th = render @environments diff --git a/config/initializers/relative_naming_ci_namespace.rb b/config/initializers/relative_naming_ci_namespace.rb new file mode 100644 index 00000000000..59abe1b9b91 --- /dev/null +++ b/config/initializers/relative_naming_ci_namespace.rb @@ -0,0 +1,16 @@ +# Description: https://coderwall.com/p/heed_q/rails-routing-and-namespaced-models +# +# This allows us to use CI ActiveRecord objects in all routes and use it: +# - [project.namespace, project, build] +# +# instead of: +# - namespace_project_build_path(project.namespace, project, build) +# +# Without that, Ci:: namespace is used for resolving routes: +# - namespace_project_ci_build_path(project.namespace, project, build) + +module Ci + def self.use_relative_model_naming? + true + end +end diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 50fa263f693..b421bbdec3f 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -485,6 +485,7 @@ failure. 1. `on_failure` - execute build only when at least one build from prior stages fails. 1. `always` - execute build regardless of the status of builds from prior stages. +1. `manual` - execute build manually. For example: @@ -516,6 +517,7 @@ deploy_job: stage: deploy script: - make deploy + when: manual cleanup_job: stage: cleanup @@ -527,7 +529,20 @@ cleanup_job: The above script will: 1. Execute `cleanup_build_job` only when `build_job` fails -2. Always execute `cleanup_job` as the last step in pipeline. +2. Always execute `cleanup_job` as the last step in pipeline +3. Allow you to manually execute `deploy_job` form GitLab + +#### Manual actions + +>**Note:** +Introduced in GitLab 8.10. + +Manual actions are special type of jobs that are not executed automatically in pipeline. +They need to be explicitly started by the user. +Manual actions can be started from pipelines, builds, environments and deployments views. +You can execute the same manual action multiple times. + +Example usage of manual actions is deployment, ex. promote a staging environment to production. ### environment diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index 5fb671df570..fb111889501 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -43,6 +43,11 @@ FactoryGirl.define do status 'pending' end + trait :manual do + status 'skipped' + self.when 'manual' + end + trait :allowed_to_fail do allow_failure true end diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb index 7fb28f4174b..491eec70752 100644 --- a/spec/features/environments_spec.rb +++ b/spec/features/environments_spec.rb @@ -13,6 +13,7 @@ feature 'Environments', feature: true do describe 'when showing environments' do given!(:environment) { } given!(:deployment) { } + given!(:manual) { } before do visit namespace_project_environments_path(project.namespace, project) @@ -43,6 +44,24 @@ feature 'Environments', feature: true do scenario 'does show deployment SHA' do expect(page).to have_link(deployment.short_sha) end + + context 'with build and manual actions' do + given(:pipeline) { create(:ci_pipeline, project: project) } + given(:build) { create(:ci_build, pipeline: pipeline) } + given(:deployment) { create(:deployment, environment: environment, deployable: build) } + given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } + + scenario 'does show a play button' do + expect(page).to have_link(manual.name.titleize) + end + + scenario 'does allow to play manual action' do + expect(manual).to be_skipped + expect{ click_link(manual.name.titleize) }.to change{ Ci::Pipeline.count }.by(0) + expect(page).to have_content(manual.name) + expect(manual.reload).to be_pending + end + end end end @@ -54,6 +73,7 @@ feature 'Environments', feature: true do describe 'when showing the environment' do given(:environment) { create(:environment, project: project) } given!(:deployment) { } + given!(:manual) { } before do visit namespace_project_environment_path(project.namespace, project, environment) @@ -77,7 +97,8 @@ feature 'Environments', feature: true do end context 'with build' do - given(:build) { create(:ci_build, project: project) } + given(:pipeline) { create(:ci_pipeline, project: project) } + given(:build) { create(:ci_build, pipeline: pipeline) } given(:deployment) { create(:deployment, environment: environment, deployable: build) } scenario 'does show build name' do @@ -87,6 +108,21 @@ feature 'Environments', feature: true do scenario 'does show retry button' do expect(page).to have_link('Retry') end + + context 'with manual action' do + given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } + + scenario 'does show a play button' do + expect(page).to have_link(manual.name.titleize) + end + + scenario 'does allow to play manual action' do + expect(manual).to be_skipped + expect{ click_link(manual.name.titleize) }.to change{ Ci::Pipeline.count }.by(0) + expect(page).to have_content(manual.name) + expect(manual.reload).to be_pending + end + end end end end diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb index e7ee0aaea3c..55cecf3d587 100644 --- a/spec/features/pipelines_spec.rb +++ b/spec/features/pipelines_spec.rb @@ -62,6 +62,20 @@ describe "Pipelines" do end end + context 'with manual actions' do + let!(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'manual build', stage: 'test', commands: 'test') } + + before { visit namespace_project_pipelines_path(project.namespace, project) } + + it { expect(page).to have_link('Manual Build') } + + context 'when playing' do + before { click_link('Manual Build') } + + it { expect(manual.reload).to be_pending } + end + end + context 'for generic statuses' do context 'when running' do let!(:running) { create(:generic_commit_status, status: 'running', pipeline: pipeline, stage: 'test') } @@ -117,6 +131,7 @@ describe "Pipelines" do @success = create(:ci_build, :success, pipeline: pipeline, stage: 'build', name: 'build') @failed = create(:ci_build, :failed, pipeline: pipeline, stage: 'test', name: 'test', commands: 'test') @running = create(:ci_build, :running, pipeline: pipeline, stage: 'deploy', name: 'deploy') + @manual = create(:ci_build, :manual, pipeline: pipeline, stage: 'deploy', name: 'manual build') @external = create(:generic_commit_status, status: 'success', pipeline: pipeline, name: 'jenkins', stage: 'external') end @@ -131,6 +146,7 @@ describe "Pipelines" do expect(page).to have_content(@external.id) expect(page).to have_content('Retry failed') expect(page).to have_content('Cancel running') + expect(page).to have_link('Play') end context 'retrying builds' do @@ -154,6 +170,12 @@ describe "Pipelines" do it { expect(page).to have_selector('.ci-canceled') } end end + + context 'playing manual build' do + before { click_link('Play') } + + it { expect(@manual.reload).to be_pending } + end end describe 'POST /:project/pipelines' do diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 481416319dd..4846c87a100 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -670,4 +670,55 @@ describe Ci::Build, models: true do end end end + + describe '#manual?' do + before do + build.update(when: value) + end + + subject { build.manual? } + + context 'when is set to manual' do + let(:value) { 'manual' } + + it { is_expected.to be_truthy } + end + + context 'when set to something else' do + let(:value) { 'something else' } + + it { is_expected.to be_falsey } + end + end + + describe '#other_actions' do + let(:build) { create(:ci_build, :manual, pipeline: pipeline) } + let!(:other_build) { create(:ci_build, :manual, pipeline: pipeline, name: 'other action') } + + subject { build.other_actions } + + it 'returns other actions' do + is_expected.to contain_exactly(other_build) + end + end + + describe '#play' do + let(:build) { create(:ci_build, :manual, pipeline: pipeline) } + + subject { build.play } + + it 'enques a build' do + is_expected.to be_pending + is_expected.to eq(build) + end + + context 'for success build' do + before { build.queue } + + it 'creates a new build' do + is_expected.to be_pending + is_expected.not_to eq(build) + end + end + end end diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 10db79bd15f..887f36db519 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -416,4 +416,28 @@ describe Ci::Pipeline, models: true do end end end + + describe '#manual_actions' do + subject { pipeline.manual_actions } + + it 'when none defined' do + is_expected.to be_empty + end + + context 'when action defined' do + let!(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy') } + + it 'returns one action' do + is_expected.to contain_exactly(manual) + end + + context 'there are multiple of the same name' do + let!(:manual2) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy') } + + it 'returns latest one' do + is_expected.to contain_exactly(manual2) + end + end + end + end end diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb index b273018707f..7df3df4bb9e 100644 --- a/spec/models/deployment_spec.rb +++ b/spec/models/deployment_spec.rb @@ -11,6 +11,7 @@ describe Deployment, models: true do it { is_expected.to delegate_method(:name).to(:environment).with_prefix } it { is_expected.to delegate_method(:commit).to(:project) } it { is_expected.to delegate_method(:commit_title).to(:commit).as(:try) } + it { is_expected.to delegate_method(:manual_actions).to(:deployable).as(:try) } it { is_expected.to validate_presence_of(:ref) } it { is_expected.to validate_presence_of(:sha) } diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb new file mode 100644 index 00000000000..89eca2cd768 --- /dev/null +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -0,0 +1,213 @@ +require 'spec_helper' + +describe Ci::CreatePipelineService, services: true do + let(:project) { FactoryGirl.create(:project) } + let(:user) { create(:admin) } + + before do + stub_ci_pipeline_to_return_yaml_file + end + + describe '#execute' do + def execute(params) + described_class.new(project, user, params).execute + end + + context 'valid params' do + let(:pipeline) do + execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: [{ message: "Message" }]) + end + + it { expect(pipeline).to be_kind_of(Ci::Pipeline) } + it { expect(pipeline).to be_valid } + it { expect(pipeline).to be_persisted } + it { expect(pipeline).to eq(project.pipelines.last) } + it { expect(pipeline).to have_attributes(user: user) } + it { expect(pipeline.builds.first).to be_kind_of(Ci::Build) } + end + + context "skip tag if there is no build for it" do + it "creates commit if there is appropriate job" do + result = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: [{ message: "Message" }]) + expect(result).to be_persisted + end + + it "creates commit if there is no appropriate job but deploy job has right ref setting" do + config = YAML.dump({ deploy: { script: "ls", only: ["master"] } }) + stub_ci_pipeline_yaml_file(config) + result = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: [{ message: "Message" }]) + + expect(result).to be_persisted + end + end + + it 'skips creating pipeline for refs without .gitlab-ci.yml' do + stub_ci_pipeline_yaml_file(nil) + result = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: [{ message: 'Message' }]) + expect(result).not_to be_persisted + expect(Ci::Pipeline.count).to eq(0) + end + + it 'fails commits if yaml is invalid' do + message = 'message' + allow_any_instance_of(Ci::Pipeline).to receive(:git_commit_message) { message } + stub_ci_pipeline_yaml_file('invalid: file: file') + commits = [{ message: message }] + pipeline = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: commits) + + expect(pipeline).to be_persisted + expect(pipeline.builds.any?).to be false + expect(pipeline.status).to eq('failed') + expect(pipeline.yaml_errors).not_to be_nil + end + + context 'when commit contains a [ci skip] directive' do + let(:message) { "some message[ci skip]" } + let(:messageFlip) { "some message[skip ci]" } + let(:capMessage) { "some message[CI SKIP]" } + let(:capMessageFlip) { "some message[SKIP CI]" } + + before do + allow_any_instance_of(Ci::Pipeline).to receive(:git_commit_message) { message } + end + + it "skips builds creation if there is [ci skip] tag in commit message" do + commits = [{ message: message }] + pipeline = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: commits) + + expect(pipeline).to be_persisted + expect(pipeline.builds.any?).to be false + expect(pipeline.status).to eq("skipped") + end + + it "skips builds creation if there is [skip ci] tag in commit message" do + commits = [{ message: messageFlip }] + pipeline = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: commits) + + expect(pipeline).to be_persisted + expect(pipeline.builds.any?).to be false + expect(pipeline.status).to eq("skipped") + end + + it "skips builds creation if there is [CI SKIP] tag in commit message" do + commits = [{ message: capMessage }] + pipeline = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: commits) + + expect(pipeline).to be_persisted + expect(pipeline.builds.any?).to be false + expect(pipeline.status).to eq("skipped") + end + + it "skips builds creation if there is [SKIP CI] tag in commit message" do + commits = [{ message: capMessageFlip }] + pipeline = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: commits) + + expect(pipeline).to be_persisted + expect(pipeline.builds.any?).to be false + expect(pipeline.status).to eq("skipped") + end + + it "does not skips builds creation if there is no [ci skip] or [skip ci] tag in commit message" do + allow_any_instance_of(Ci::Pipeline).to receive(:git_commit_message) { "some message" } + + commits = [{ message: "some message" }] + pipeline = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: commits) + + expect(pipeline).to be_persisted + expect(pipeline.builds.first.name).to eq("rspec") + end + + it "fails builds creation if there is [ci skip] tag in commit message and yaml is invalid" do + stub_ci_pipeline_yaml_file('invalid: file: fiile') + commits = [{ message: message }] + pipeline = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: commits) + + expect(pipeline).to be_persisted + expect(pipeline.builds.any?).to be false + expect(pipeline.status).to eq("failed") + expect(pipeline.yaml_errors).not_to be_nil + end + end + + it "creates commit with failed status if yaml is invalid" do + stub_ci_pipeline_yaml_file('invalid: file') + commits = [{ message: "some message" }] + pipeline = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: commits) + + expect(pipeline).to be_persisted + expect(pipeline.status).to eq("failed") + expect(pipeline.builds.any?).to be false + end + + context 'when there are no jobs for this pipeline' do + before do + config = YAML.dump({ test: { script: 'ls', only: ['feature'] } }) + stub_ci_pipeline_yaml_file(config) + end + + it 'does not create a new pipeline' do + result = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: [{ message: 'some msg' }]) + + expect(result).not_to be_persisted + expect(Ci::Build.all).to be_empty + expect(Ci::Pipeline.count).to eq(0) + end + end + + context 'with manual actions' do + before do + config = YAML.dump({ deploy: { script: 'ls', when: 'manual' } }) + stub_ci_pipeline_yaml_file(config) + end + + it 'does not create a new pipeline' do + result = execute(ref: 'refs/heads/master', + before: '00000000', + after: project.commit.id, + commits: [{ message: 'some msg' }]) + + expect(result).to be_persisted + expect(result.manual_actions).not_to be_empty + end + end + end +end -- cgit v1.2.1 From 4faaa62aad6b71c681fc67c5ae1e3b47cfcf18b2 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sun, 17 Jul 2016 02:03:59 +0200 Subject: Update build fixtures to include manual actions --- db/fixtures/development/14_builds.rb | 63 +++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/db/fixtures/development/14_builds.rb b/db/fixtures/development/14_builds.rb index 51ff451eb4c..44f8a61d608 100644 --- a/db/fixtures/development/14_builds.rb +++ b/db/fixtures/development/14_builds.rb @@ -1,13 +1,34 @@ class Gitlab::Seeder::Builds + STAGES = %w(build notify_build test notify_test deploy notify_deploy) + def initialize(project) @project = project end def seed! - ci_commits.each do |ci_commit| + pipelines.each do |pipeline| begin - build_create!(ci_commit, name: 'test build 1') - build_create!(ci_commit, status: 'success', name: 'test build 2') + build_create!(pipeline, name: 'build:linux', stage: 'build') + build_create!(pipeline, name: 'build:osx', stage: 'build') + + build_create!(pipeline, name: 'slack post build', stage: 'notify_build') + + build_create!(pipeline, name: 'rspec:linux', stage: 'test') + build_create!(pipeline, name: 'rspec:windows', stage: 'test') + build_create!(pipeline, name: 'rspec:windows', stage: 'test') + build_create!(pipeline, name: 'rspec:osx', stage: 'test') + build_create!(pipeline, name: 'spinach:linux', stage: 'test') + build_create!(pipeline, name: 'spinach:osx', stage: 'test') + build_create!(pipeline, name: 'cucumber:linux', stage: 'test') + build_create!(pipeline, name: 'cucumber:osx', stage: 'test') + + build_create!(pipeline, name: 'slack post test', stage: 'notify_test') + + build_create!(pipeline, name: 'staging', stage: 'deploy', environment: 'staging') + build_create!(pipeline, name: 'production', stage: 'deploy', environment: 'production', when: 'manual') + + commit_status_create!(pipeline, name: 'jenkins') + print '.' rescue ActiveRecord::RecordInvalid print 'F' @@ -15,8 +36,8 @@ class Gitlab::Seeder::Builds end end - def ci_commits - commits = @project.repository.commits('master', nil, 5) + def pipelines + commits = @project.repository.commits('master', limit: 5) commits_sha = commits.map { |commit| commit.raw.id } commits_sha.map do |sha| @project.ensure_pipeline(sha, 'master') @@ -25,11 +46,11 @@ class Gitlab::Seeder::Builds [] end - def build_create!(ci_commit, opts = {}) - attributes = build_attributes_for(ci_commit).merge(opts) + def build_create!(pipeline, opts = {}) + attributes = build_attributes_for(pipeline, opts) build = Ci::Build.new(attributes) - if %w(success failed).include?(build.status) + if opts[:name].start_with?('build') artifacts_cache_file(artifacts_archive_path) do |file| build.artifacts_file = file end @@ -40,19 +61,28 @@ class Gitlab::Seeder::Builds end build.save! + build.update(status: build_status) if %w(running success failed).include?(build.status) # We need to set build trace after saving a build (id required) build.trace = FFaker::Lorem.paragraphs(6).join("\n\n") end end + + def commit_status_create!(pipeline, opts = {}) + attributes = commit_status_attributes_for(pipeline, opts) + GenericCommitStatus.create(attributes) + end + + def commit_status_attributes_for(pipeline, opts) + { name: 'test build', stage: 'test', stage_idx: stage_index(opts[:stage]), + ref: 'master', user: build_user, project: @project, pipeline: pipeline, + created_at: Time.now, updated_at: Time.now + }.merge(opts) + end - def build_attributes_for(ci_commit) - { name: 'test build', commands: "$ build command", - stage: 'test', stage_idx: 1, ref: 'master', - user_id: build_user, gl_project_id: @project.id, - status: build_status, commit_id: ci_commit.id, - created_at: Time.now, updated_at: Time.now } + def build_attributes_for(pipeline, opts) + commit_status_attributes_for(pipeline, opts).merge(commands: '$ build command') end def build_user @@ -63,13 +93,16 @@ class Gitlab::Seeder::Builds Ci::Build::AVAILABLE_STATUSES.sample end + def stage_index(stage) + STAGES.index(stage) || 0 + end + def artifacts_archive_path Rails.root + 'spec/fixtures/ci_build_artifacts.zip' end def artifacts_metadata_path Rails.root + 'spec/fixtures/ci_build_artifacts_metadata.gz' - end def artifacts_cache_file(file_path) -- cgit v1.2.1 From 5b119a9dc85943b3f60868a347a814e767c9840c Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sun, 17 Jul 2016 15:59:07 +0200 Subject: Fix rubocop offenses --- app/models/ci/build.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 248ecd71962..c9566560461 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -107,8 +107,8 @@ module Ci def play(current_user = nil) # Try to queue a current build if self.queue - self.update(user: current_user) - self + self.update(user: current_user) + self else # Otherwise we need to create a duplicate Ci::Build.retry(self, current_user) -- cgit v1.2.1 From 640924e4a23dcfe1e8d6b616e822bfc7fce56d8f Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 14:48:36 +0200 Subject: Mark builds with manual actions as skipped --- app/models/concerns/statuseable.rb | 6 +++--- app/services/ci/create_builds_service.rb | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/models/concerns/statuseable.rb b/app/models/concerns/statuseable.rb index 3ef91caad47..44c6b30f278 100644 --- a/app/models/concerns/statuseable.rb +++ b/app/models/concerns/statuseable.rb @@ -16,10 +16,10 @@ module Statuseable deduce_status = "(CASE WHEN (#{builds})=0 THEN NULL - WHEN (#{builds})=(#{success})+(#{ignored}) THEN 'success' - WHEN (#{builds})=(#{pending}) THEN 'pending' - WHEN (#{builds})=(#{canceled})+(#{success})+(#{ignored}) THEN 'canceled' WHEN (#{builds})=(#{skipped}) THEN 'skipped' + WHEN (#{builds})=(#{success})+(#{ignored})+(#{skipped}) THEN 'success' + WHEN (#{builds})=(#{pending})+(#{skipped}) THEN 'pending' + WHEN (#{builds})=(#{canceled})+(#{success})+(#{ignored})+(#{skipped}) THEN 'canceled' WHEN (#{running})+(#{pending})>0 THEN 'running' ELSE 'failed' END)" diff --git a/app/services/ci/create_builds_service.rb b/app/services/ci/create_builds_service.rb index 3b21f0acb96..e4eb75598a2 100644 --- a/app/services/ci/create_builds_service.rb +++ b/app/services/ci/create_builds_service.rb @@ -15,7 +15,7 @@ module Ci status == 'success' when 'on_failure' status == 'failed' - when 'always' + when 'always', 'manual' %w(success failed).include?(status) end end @@ -47,6 +47,8 @@ module Ci user: user, project: @pipeline.project) + build_attrs[:status] = 'skipped' if build_attrs[:when] == 'manual' + ## # We do not persist new builds here. # Those will be persisted when @pipeline is saved. -- cgit v1.2.1 From 20438213d5f16907f0b0ea2cd2722b6ccfdc7556 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 14:56:22 +0200 Subject: Use `capitalize` instead of `titleize` for manual actions --- app/views/projects/ci/pipelines/_pipeline.html.haml | 2 +- app/views/projects/deployments/_actions.haml | 2 +- app/views/projects/environments/show.html.haml | 2 +- spec/features/environments_spec.rb | 8 ++++---- spec/features/pipelines_spec.rb | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 397f26012d4..797e52d1122 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -70,7 +70,7 @@ %li = link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do = icon("play") - %span= build.name.titleize + %span= build.name.capitalize - if artifacts.present? .btn-group %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index 9a8d4a63007..8dd9e70ac67 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -12,7 +12,7 @@ %li = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do = icon("play") - %span= action.name.titleize + %span= action.name.capitalize - if defined?(allow_rollback) && allow_rollback = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index b17aba2431f..b8b1ce52a91 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -5,7 +5,7 @@ %div{ class: container_class } .top-area .col-md-9 - %h3.page-title= @environment.name.titleize + %h3.page-title= @environment.name.capitalize .col-md-3 .nav-controls diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb index 491eec70752..d62b3772fdb 100644 --- a/spec/features/environments_spec.rb +++ b/spec/features/environments_spec.rb @@ -52,12 +52,12 @@ feature 'Environments', feature: true do given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } scenario 'does show a play button' do - expect(page).to have_link(manual.name.titleize) + expect(page).to have_link(manual.name.capitalize) end scenario 'does allow to play manual action' do expect(manual).to be_skipped - expect{ click_link(manual.name.titleize) }.to change{ Ci::Pipeline.count }.by(0) + expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0) expect(page).to have_content(manual.name) expect(manual.reload).to be_pending end @@ -113,12 +113,12 @@ feature 'Environments', feature: true do given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } scenario 'does show a play button' do - expect(page).to have_link(manual.name.titleize) + expect(page).to have_link(manual.name.capitalize) end scenario 'does allow to play manual action' do expect(manual).to be_skipped - expect{ click_link(manual.name.titleize) }.to change{ Ci::Pipeline.count }.by(0) + expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0) expect(page).to have_content(manual.name) expect(manual.reload).to be_pending end diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb index 55cecf3d587..7f861db1969 100644 --- a/spec/features/pipelines_spec.rb +++ b/spec/features/pipelines_spec.rb @@ -67,10 +67,10 @@ describe "Pipelines" do before { visit namespace_project_pipelines_path(project.namespace, project) } - it { expect(page).to have_link('Manual Build') } + it { expect(page).to have_link('Manual build') } context 'when playing' do - before { click_link('Manual Build') } + before { click_link('Manual build') } it { expect(manual.reload).to be_pending } end -- cgit v1.2.1 From 60583bf9db5be7f83863602672e1689853609687 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 14:57:24 +0200 Subject: Make manual actions to work with master code --- app/models/ci/build.rb | 2 +- app/models/commit_status.rb | 4 +++ spec/models/ci/pipeline_spec.rb | 62 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index c9566560461..49a123d488b 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -15,7 +15,7 @@ module Ci scope :with_artifacts, ->() { where.not(artifacts_file: nil) } scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) } scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) } - scope :manual_actions, ->() { where(when: :manual).relevant } + scope :manual_actions, ->() { where(when: :manual) } mount_uploader :artifacts_file, ArtifactUploader mount_uploader :artifacts_metadata, ArtifactUploader diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index e437e3417a8..535db26240a 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -22,6 +22,10 @@ class CommitStatus < ActiveRecord::Base scope :ignored, -> { where(allow_failure: true, status: [:failed, :canceled]) } state_machine :status, initial: :pending do + event :queue do + transition skipped: :pending + end + event :run do transition pending: :running end diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 887f36db519..c29e4811385 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -260,6 +260,68 @@ describe Ci::Pipeline, models: true do expect(pipeline.reload.status).to eq('canceled') end end + + context 'when listing manual actions' do + let(:yaml) do + { + stages: ["build", "test", "test_failure", "deploy", "cleanup"], + build: { + stage: "build", + script: "BUILD", + }, + test: { + stage: "test", + script: "TEST", + }, + test_failure: { + stage: "test_failure", + script: "ON test failure", + when: "on_failure", + }, + deploy: { + stage: "deploy", + script: "PUBLISH", + }, + production: { + stage: "deploy", + script: "PUBLISH", + when: "manual", + }, + cleanup: { + stage: "cleanup", + script: "TIDY UP", + when: "always", + }, + clear_cache: { + stage: "cleanup", + script: "CLEAR CACHE", + when: "manual", + } + } + end + + it 'returns only for skipped builds' do + # currently all builds are created + expect(create_builds).to be_truthy + expect(manual_actions).to be_empty + + # succeed stage build + pipeline.builds.running_or_pending.each(&:success) + expect(manual_actions).to be_empty + + # succeed stage test + pipeline.builds.running_or_pending.each(&:success) + expect(manual_actions).to be_one # production + + # succeed stage deploy + pipeline.builds.running_or_pending.each(&:success) + expect(manual_actions).to be_many # production and clear cache + end + + def manual_actions + pipeline.manual_actions + end + end end context 'when no builds created' do -- cgit v1.2.1 From 410e638bbffeed2f374fcd00f5d002b04451f533 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 14:59:01 +0200 Subject: Add notice implementation --- app/services/ci/create_builds_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/ci/create_builds_service.rb b/app/services/ci/create_builds_service.rb index e4eb75598a2..4946f7076fd 100644 --- a/app/services/ci/create_builds_service.rb +++ b/app/services/ci/create_builds_service.rb @@ -47,6 +47,8 @@ module Ci user: user, project: @pipeline.project) + # TODO: The proper implementation for this is in + # https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5295 build_attrs[:status] = 'skipped' if build_attrs[:when] == 'manual' ## -- cgit v1.2.1 From f08eb7bbb74451363843f2b5b4d31828cb0be16b Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 15:02:26 +0200 Subject: Remove unused create_pipeline_service_spec.rb --- spec/services/ci/create_pipeline_service_spec.rb | 213 ----------------------- 1 file changed, 213 deletions(-) delete mode 100644 spec/services/ci/create_pipeline_service_spec.rb diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb deleted file mode 100644 index 89eca2cd768..00000000000 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ /dev/null @@ -1,213 +0,0 @@ -require 'spec_helper' - -describe Ci::CreatePipelineService, services: true do - let(:project) { FactoryGirl.create(:project) } - let(:user) { create(:admin) } - - before do - stub_ci_pipeline_to_return_yaml_file - end - - describe '#execute' do - def execute(params) - described_class.new(project, user, params).execute - end - - context 'valid params' do - let(:pipeline) do - execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: [{ message: "Message" }]) - end - - it { expect(pipeline).to be_kind_of(Ci::Pipeline) } - it { expect(pipeline).to be_valid } - it { expect(pipeline).to be_persisted } - it { expect(pipeline).to eq(project.pipelines.last) } - it { expect(pipeline).to have_attributes(user: user) } - it { expect(pipeline.builds.first).to be_kind_of(Ci::Build) } - end - - context "skip tag if there is no build for it" do - it "creates commit if there is appropriate job" do - result = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: [{ message: "Message" }]) - expect(result).to be_persisted - end - - it "creates commit if there is no appropriate job but deploy job has right ref setting" do - config = YAML.dump({ deploy: { script: "ls", only: ["master"] } }) - stub_ci_pipeline_yaml_file(config) - result = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: [{ message: "Message" }]) - - expect(result).to be_persisted - end - end - - it 'skips creating pipeline for refs without .gitlab-ci.yml' do - stub_ci_pipeline_yaml_file(nil) - result = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: [{ message: 'Message' }]) - expect(result).not_to be_persisted - expect(Ci::Pipeline.count).to eq(0) - end - - it 'fails commits if yaml is invalid' do - message = 'message' - allow_any_instance_of(Ci::Pipeline).to receive(:git_commit_message) { message } - stub_ci_pipeline_yaml_file('invalid: file: file') - commits = [{ message: message }] - pipeline = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: commits) - - expect(pipeline).to be_persisted - expect(pipeline.builds.any?).to be false - expect(pipeline.status).to eq('failed') - expect(pipeline.yaml_errors).not_to be_nil - end - - context 'when commit contains a [ci skip] directive' do - let(:message) { "some message[ci skip]" } - let(:messageFlip) { "some message[skip ci]" } - let(:capMessage) { "some message[CI SKIP]" } - let(:capMessageFlip) { "some message[SKIP CI]" } - - before do - allow_any_instance_of(Ci::Pipeline).to receive(:git_commit_message) { message } - end - - it "skips builds creation if there is [ci skip] tag in commit message" do - commits = [{ message: message }] - pipeline = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: commits) - - expect(pipeline).to be_persisted - expect(pipeline.builds.any?).to be false - expect(pipeline.status).to eq("skipped") - end - - it "skips builds creation if there is [skip ci] tag in commit message" do - commits = [{ message: messageFlip }] - pipeline = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: commits) - - expect(pipeline).to be_persisted - expect(pipeline.builds.any?).to be false - expect(pipeline.status).to eq("skipped") - end - - it "skips builds creation if there is [CI SKIP] tag in commit message" do - commits = [{ message: capMessage }] - pipeline = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: commits) - - expect(pipeline).to be_persisted - expect(pipeline.builds.any?).to be false - expect(pipeline.status).to eq("skipped") - end - - it "skips builds creation if there is [SKIP CI] tag in commit message" do - commits = [{ message: capMessageFlip }] - pipeline = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: commits) - - expect(pipeline).to be_persisted - expect(pipeline.builds.any?).to be false - expect(pipeline.status).to eq("skipped") - end - - it "does not skips builds creation if there is no [ci skip] or [skip ci] tag in commit message" do - allow_any_instance_of(Ci::Pipeline).to receive(:git_commit_message) { "some message" } - - commits = [{ message: "some message" }] - pipeline = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: commits) - - expect(pipeline).to be_persisted - expect(pipeline.builds.first.name).to eq("rspec") - end - - it "fails builds creation if there is [ci skip] tag in commit message and yaml is invalid" do - stub_ci_pipeline_yaml_file('invalid: file: fiile') - commits = [{ message: message }] - pipeline = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: commits) - - expect(pipeline).to be_persisted - expect(pipeline.builds.any?).to be false - expect(pipeline.status).to eq("failed") - expect(pipeline.yaml_errors).not_to be_nil - end - end - - it "creates commit with failed status if yaml is invalid" do - stub_ci_pipeline_yaml_file('invalid: file') - commits = [{ message: "some message" }] - pipeline = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: commits) - - expect(pipeline).to be_persisted - expect(pipeline.status).to eq("failed") - expect(pipeline.builds.any?).to be false - end - - context 'when there are no jobs for this pipeline' do - before do - config = YAML.dump({ test: { script: 'ls', only: ['feature'] } }) - stub_ci_pipeline_yaml_file(config) - end - - it 'does not create a new pipeline' do - result = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: [{ message: 'some msg' }]) - - expect(result).not_to be_persisted - expect(Ci::Build.all).to be_empty - expect(Ci::Pipeline.count).to eq(0) - end - end - - context 'with manual actions' do - before do - config = YAML.dump({ deploy: { script: 'ls', when: 'manual' } }) - stub_ci_pipeline_yaml_file(config) - end - - it 'does not create a new pipeline' do - result = execute(ref: 'refs/heads/master', - before: '00000000', - after: project.commit.id, - commits: [{ message: 'some msg' }]) - - expect(result).to be_persisted - expect(result.manual_actions).not_to be_empty - end - end - end -end -- cgit v1.2.1 From 4ff3ef6f925633f66a120c4844d93542bb1d6e2a Mon Sep 17 00:00:00 2001 From: ubudzisz Date: Mon, 18 Jul 2016 10:40:33 +0200 Subject: add modification to commit title test add modification to commit title test add empty line --- spec/views/projects/builds/show.html.haml_spec.rb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index 61004d0fed7..42220a20c75 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -4,7 +4,10 @@ describe 'projects/builds/show' do include Devise::TestHelpers let(:project) { create(:project) } - let(:pipeline) { create(:ci_pipeline, project: project) } + let(:pipeline) do + create(:ci_pipeline, project: project, + sha: project.commit.id) + end let(:build) { create(:ci_build, pipeline: pipeline) } before do @@ -36,13 +39,14 @@ describe 'projects/builds/show' do end end - describe 'projects/builds/show/commit title' do - let(:commit_title) {build.project.commit.title} - - it 'shows commit title' do - within('p.build-light-text.append-bottom-0') do - expect(rendered).to have_content(commit_title) - end - end + describe 'commit title in sidebar' do + let(:commit_title) { project.commit.title } + + it 'shows commit title and not show commit message' do + render + + expect(rendered).to have_css('p.build-light-text.append-bottom-0', + text: /\A\n#{Regexp.escape(commit_title)}\n\Z/) + end end end -- cgit v1.2.1 From 87035c294502451708262d68e228f7cb9e244552 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Mon, 18 Jul 2016 11:58:50 +0100 Subject: Don't blow up in tree view on empty repo --- app/controllers/projects_controller.rb | 2 +- spec/controllers/projects_controller_spec.rb | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 1803aa8eab4..4e5bcff9cf8 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -5,7 +5,7 @@ class ProjectsController < Projects::ApplicationController before_action :project, except: [:new, :create] before_action :repository, except: [:new, :create] before_action :assign_ref_vars, only: [:show], if: :repo_exists? - before_action :tree, only: [:show], if: :project_view_files? + before_action :tree, only: [:show], if: [:repo_exists?, :project_view_files?] # Authorize before_action :authorize_admin_project!, only: [:edit, :update, :housekeeping, :download_export, :export, :remove_export, :generate_new_export] diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 1b1b1bdf52d..3edce4d339c 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -43,6 +43,26 @@ describe ProjectsController do end end + context "project with empty repo" do + let(:empty_project) { create(:project_empty_repo, :public) } + + before { sign_in(user) } + + User.project_views.keys.each do |project_view| + context "with #{project_view} view set" do + before do + user.update_attributes(project_view: project_view) + + get :show, namespace_id: empty_project.namespace.path, id: empty_project.path + end + + it "renders the empty project view" do + expect(response).to render_template('empty') + end + end + end + end + context "rendering default project view" do render_views -- cgit v1.2.1 From 70582dbef6c8fe5f72f6ba835fd066a5926f85f8 Mon Sep 17 00:00:00 2001 From: eanplatter Date: Mon, 18 Jul 2016 13:07:24 +0000 Subject: Update CHANGELOG fix indenting. --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 9000bf07e55..6f6f457f3de 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.10.0 (unreleased) - - Fix profile activity heatmap to show correct day name (eanplatter) + - Fix profile activity heatmap to show correct day name (eanplatter) - Expose {should,force}_remove_source_branch (Ben Boeckel) - Disable PostgreSQL statement timeout during migrations - Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho) -- cgit v1.2.1 From de1fa5010f705927ac5f5c01ce9595d3c52d44ef Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Mon, 18 Jul 2016 18:51:59 +0530 Subject: Remove `lock_version` from the `merge_requests` table. - This was introduced (at some point) while rebasing `master` against the "developers can merge" feature branch. - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5310#note_13139705 --- db/schema.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index 453a8fb9e51..6e2f089d426 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -624,7 +624,6 @@ ActiveRecord::Schema.define(version: 20160712171823) do t.integer "merge_user_id" t.string "merge_commit_sha" t.datetime "deleted_at" - t.integer "lock_version", default: 0, null: false t.string "in_progress_merge_commit_sha" end add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree -- cgit v1.2.1 From 7a4d728581e1afb0401f15bca2d3dec0016030e1 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 18 Jul 2016 14:52:31 +0100 Subject: Blurs the clicked link in dropdown menus This fixes an issue where the dropdown menu would stay visible even when clicked out of it --- app/assets/javascripts/gl_dropdown.js.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee index 1b0d0db8954..951530e03a5 100644 --- a/app/assets/javascripts/gl_dropdown.js.coffee +++ b/app/assets/javascripts/gl_dropdown.js.coffee @@ -250,6 +250,8 @@ class GitLabDropdown if self.options.clicked self.options.clicked(selected, $el, e) + $el.trigger('blur') + # Finds an element inside wrapper element getElement: (selector) -> @dropdown.find selector -- cgit v1.2.1 From c6097f24d32610d4c12ae0e9d16b72dc53cda9da Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 18 Jul 2016 14:53:27 +0100 Subject: adds test for update_file method --- spec/models/repository_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 24e49c8def3..75afb0c1022 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -129,6 +129,20 @@ describe Repository, models: true do end end + describe :update_file do + it 'updates filename successfully' do + expect{repository.update_file(user, 'NEWLICENSE', 'Copyright!', + branch: 'master', + previous_path: 'LICENSE', + message: 'Changes filename')}.to change { repository.commits('master').count }.by(1) + + files = repository.ls_files('master') + + expect(files).not_to include('LICENSE') + expect(files).to include('NEWLICENSE') + end + end + describe "search_files" do let(:results) { repository.search_files('feature', 'master') } subject { results } -- cgit v1.2.1 From dd4f50b1874ac066c7e47be223e98d8a9b317fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 18 Jul 2016 16:44:10 +0200 Subject: Fix build duration when build is not finished yet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/helpers/time_helper.rb | 26 +++++++++++----------- app/views/projects/builds/_sidebar.html.haml | 2 +- .../_generic_commit_status.html.haml | 2 +- spec/helpers/time_helper_spec.rb | 25 +++++++++------------ 4 files changed, 26 insertions(+), 29 deletions(-) diff --git a/app/helpers/time_helper.rb b/app/helpers/time_helper.rb index 8cb82c2d5cc..1926f03af07 100644 --- a/app/helpers/time_helper.rb +++ b/app/helpers/time_helper.rb @@ -1,14 +1,4 @@ module TimeHelper - def duration_in_words(finished_at, started_at) - if finished_at && started_at - interval_in_seconds = finished_at.to_i - started_at.to_i - elsif started_at - interval_in_seconds = Time.now.to_i - started_at.to_i - end - - time_interval_in_words(interval_in_seconds) - end - def time_interval_in_words(interval_in_seconds) minutes = interval_in_seconds / 60 seconds = interval_in_seconds - minutes * 60 @@ -25,9 +15,19 @@ module TimeHelper end def duration_in_numbers(finished_at, started_at) - diff_in_seconds = finished_at.to_i - started_at.to_i - time_format = diff_in_seconds < 1.hour ? "%M:%S" : "%H:%M:%S" + interval = interval_in_seconds(started_at, finished_at) + time_format = interval < 1.hour ? "%M:%S" : "%H:%M:%S" - Time.at(diff_in_seconds).utc.strftime(time_format) + Time.at(interval).utc.strftime(time_format) + end + + private + + def interval_in_seconds(started_at, finished_at = nil) + if started_at && finished_at + finished_at.to_i - started_at.to_i + elsif started_at + Time.now.to_i - started_at.to_i + end end end diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index cab21f0cf19..960d43039f4 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -49,7 +49,7 @@ - if @build.duration %p.build-detail-row %span.build-light-text Duration: - #{duration_in_words(@build.finished_at, @build.started_at)} + = time_interval_in_words(@build.duration) - if @build.finished_at %p.build-detail-row %span.build-light-text Finished: diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml index 542827b2f15..331dc1fcc29 100644 --- a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml +++ b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml @@ -51,7 +51,7 @@ %td.duration - if generic_commit_status.duration = icon("clock-o") - #{duration_in_words(generic_commit_status.finished_at, generic_commit_status.started_at)} + = time_interval_in_words(generic_commit_status.duration) %td.timestamp - if generic_commit_status.finished_at diff --git a/spec/helpers/time_helper_spec.rb b/spec/helpers/time_helper_spec.rb index 3f62527c5bb..413ead944b9 100644 --- a/spec/helpers/time_helper_spec.rb +++ b/spec/helpers/time_helper_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe TimeHelper do - describe "#duration_in_words" do + describe "#time_interval_in_words" do it "returns minutes and seconds" do intervals_in_words = { 100 => "1 minute 40 seconds", @@ -11,26 +11,23 @@ describe TimeHelper do } intervals_in_words.each do |interval, expectation| - expect(duration_in_words(Time.now + interval, Time.now)).to eq(expectation) + expect(time_interval_in_words(interval)).to eq(expectation) end end - - it "calculates interval from now if there is no finished_at" do - expect(duration_in_words(nil, Time.now - 5)).to eq("5 seconds") - end end - describe "#time_interval_in_words" do + describe "#duration_in_numbers" do it "returns minutes and seconds" do - intervals_in_words = { - 100 => "1 minute 40 seconds", - 121 => "2 minutes 1 second", - 3721 => "62 minutes 1 second", - 0 => "0 seconds" + duration_in_numbers = { + [100, 0] => "01:40", + [121, 0] => "02:01", + [3721, 0] => "01:02:01", + [0, 0] => "00:00", + [nil, Time.now.to_i - 42] => "00:42" } - intervals_in_words.each do |interval, expectation| - expect(time_interval_in_words(interval)).to eq(expectation) + duration_in_numbers.each do |interval, expectation| + expect(duration_in_numbers(*interval)).to eq(expectation) end end end -- cgit v1.2.1 From 6a06c5cfb92d7d4e390e63104fd42d24a9159048 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 13 Jul 2016 08:43:42 -0600 Subject: Upgrade Gemojione from 2.6.1 to 3.0.1. This adds the 2016 emoji as well as support for using SVG images instead of PNGs. It also fixes a number of incorrectly categorized emoji and other minor issues. Upgrade Rake task for Gemojione 3.0.0 and generate sprites. Upgrade aliases.json by pulling down index.json from the gemojione repository and running the generate_aliases.rb file. Changelog: https://github.com/jonathanwiesel/gemojione/blob/master/CHANGELOG.md#v301-2016-07-16 For the specific emoji added to the Unicode standard, see: http://emojione.com/releases/2.2.4/ Huge kudos to Jonathan Wiesel (@jonathanwiesel) for his work on the gemojione gem! --- CHANGELOG | 1 + Gemfile | 2 +- Gemfile.lock | 4 +- app/assets/images/emoji.png | Bin 1025831 -> 1087659 bytes app/assets/images/emoji@2x.png | Bin 2492919 -> 2652225 bytes app/assets/stylesheets/pages/emojis.scss | 2607 +++--- app/views/emojis/index.html.haml | 2 +- config/application.rb | 2 +- doc/development/rake_tasks.md | 5 + fixtures/emojis/aliases.json | 191 +- fixtures/emojis/digests.json | 2170 +++-- fixtures/emojis/index.json | 13463 ++++++++++++++++++----------- lib/gitlab/award_emoji.rb | 24 +- lib/tasks/gemojione.rake | 17 +- 14 files changed, 11397 insertions(+), 7091 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 39651675e79..ed0f120d557 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -34,6 +34,7 @@ v 8.10.0 (unreleased) - Fix issue, preventing users w/o push access to sort tags !5105 (redetection) - Add Spring EmojiOne updates. - Fix fetching LFS objects for private CI projects + - Add the new 2016 Emoji! Adds 72 new emoji including bacon, facepalm, and selfie. !5237 - Add syntax for multiline blockquote using `>>>` fence !3954 - Fix viewing notification settings when a project is pending deletion - Updated compare dropdown menus to use GL dropdown diff --git a/Gemfile b/Gemfile index 81e8ff60ad5..5b19d2bae7d 100644 --- a/Gemfile +++ b/Gemfile @@ -223,7 +223,7 @@ gem 'jquery-turbolinks', '~> 2.1.0' gem 'addressable', '~> 2.3.8' gem 'bootstrap-sass', '~> 3.3.0' gem 'font-awesome-rails', '~> 4.6.1' -gem 'gemojione', '~> 2.6' +gem 'gemojione', '~> 3.0' gem 'gon', '~> 6.0.1' gem 'jquery-atwho-rails', '~> 1.3.2' gem 'jquery-rails', '~> 4.1.0' diff --git a/Gemfile.lock b/Gemfile.lock index 0987fd5665a..f98b01c15a8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -255,7 +255,7 @@ GEM ruby-progressbar (~> 1.4) gemnasium-gitlab-service (0.2.6) rugged (~> 0.21) - gemojione (2.6.1) + gemojione (3.0.1) json get_process_mem (0.2.0) gherkin-ruby (0.3.2) @@ -857,7 +857,7 @@ DEPENDENCIES foreman (~> 0.78.0) fuubar (~> 2.0.0) gemnasium-gitlab-service (~> 0.2) - gemojione (~> 2.6) + gemojione (~> 3.0) github-linguist (~> 4.7.0) github-markup (~> 1.4) gitlab-flowdock-git-hook (~> 1.0.1) diff --git a/app/assets/images/emoji.png b/app/assets/images/emoji.png index 6bacb0e92b6..6f1a34a5591 100644 Binary files a/app/assets/images/emoji.png and b/app/assets/images/emoji.png differ diff --git a/app/assets/images/emoji@2x.png b/app/assets/images/emoji@2x.png index 99588b56616..dc9cae1d44c 100644 Binary files a/app/assets/images/emoji@2x.png and b/app/assets/images/emoji@2x.png differ diff --git a/app/assets/stylesheets/pages/emojis.scss b/app/assets/stylesheets/pages/emojis.scss index b731abc7450..f17797b2381 100644 --- a/app/assets/stylesheets/pages/emojis.scss +++ b/app/assets/stylesheets/pages/emojis.scss @@ -1,4 +1,4 @@ -.emoji-0023-20E3 { background-position: 0 0; } +.emoji-0023-20E3 { background-position: 0 0px; } .emoji-002A-20E3 { background-position: -20px 0; } .emoji-0030-20E3 { background-position: 0 -20px; } .emoji-0031-20E3 { background-position: -20px -20px; } @@ -452,1271 +452,1344 @@ .emoji-1F391 { background-position: -420px -200px; } .emoji-1F392 { background-position: -420px -220px; } .emoji-1F393 { background-position: -420px -240px; } -.emoji-1F394 { background-position: -420px -260px; } -.emoji-1F395 { background-position: -420px -280px; } -.emoji-1F396 { background-position: -420px -300px; } -.emoji-1F397 { background-position: -420px -320px; } -.emoji-1F398 { background-position: -420px -340px; } -.emoji-1F399 { background-position: -420px -360px; } -.emoji-1F39A { background-position: -420px -380px; } -.emoji-1F39B { background-position: -420px -400px; } -.emoji-1F39C { background-position: 0 -420px; } -.emoji-1F39D { background-position: -20px -420px; } -.emoji-1F39E { background-position: -40px -420px; } -.emoji-1F39F { background-position: -60px -420px; } -.emoji-1F3A0 { background-position: -80px -420px; } -.emoji-1F3A1 { background-position: -100px -420px; } -.emoji-1F3A2 { background-position: -120px -420px; } -.emoji-1F3A3 { background-position: -140px -420px; } -.emoji-1F3A4 { background-position: -160px -420px; } -.emoji-1F3A5 { background-position: -180px -420px; } -.emoji-1F3A6 { background-position: -200px -420px; } -.emoji-1F3A7 { background-position: -220px -420px; } -.emoji-1F3A8 { background-position: -240px -420px; } -.emoji-1F3A9 { background-position: -260px -420px; } -.emoji-1F3AA { background-position: -280px -420px; } -.emoji-1F3AB { background-position: -300px -420px; } -.emoji-1F3AC { background-position: -320px -420px; } -.emoji-1F3AD { background-position: -340px -420px; } -.emoji-1F3AE { background-position: -360px -420px; } -.emoji-1F3AF { background-position: -380px -420px; } -.emoji-1F3B0 { background-position: -400px -420px; } -.emoji-1F3B1 { background-position: -420px -420px; } -.emoji-1F3B2 { background-position: -440px 0; } -.emoji-1F3B3 { background-position: -440px -20px; } -.emoji-1F3B4 { background-position: -440px -40px; } -.emoji-1F3B5 { background-position: -440px -60px; } -.emoji-1F3B6 { background-position: -440px -80px; } -.emoji-1F3B7 { background-position: -440px -100px; } -.emoji-1F3B8 { background-position: -440px -120px; } -.emoji-1F3B9 { background-position: -440px -140px; } -.emoji-1F3BA { background-position: -440px -160px; } -.emoji-1F3BB { background-position: -440px -180px; } -.emoji-1F3BC { background-position: -440px -200px; } -.emoji-1F3BD { background-position: -440px -220px; } -.emoji-1F3BE { background-position: -440px -240px; } -.emoji-1F3BF { background-position: -440px -260px; } -.emoji-1F3C0 { background-position: -440px -280px; } -.emoji-1F3C1 { background-position: -440px -300px; } -.emoji-1F3C2 { background-position: -440px -320px; } -.emoji-1F3C3 { background-position: -440px -340px; } -.emoji-1F3C3-1F3FB { background-position: -440px -360px; } -.emoji-1F3C3-1F3FC { background-position: -440px -380px; } -.emoji-1F3C3-1F3FD { background-position: -440px -400px; } -.emoji-1F3C3-1F3FE { background-position: -440px -420px; } -.emoji-1F3C3-1F3FF { background-position: 0 -440px; } -.emoji-1F3C4 { background-position: -20px -440px; } -.emoji-1F3C4-1F3FB { background-position: -40px -440px; } -.emoji-1F3C4-1F3FC { background-position: -60px -440px; } -.emoji-1F3C4-1F3FD { background-position: -80px -440px; } -.emoji-1F3C4-1F3FE { background-position: -100px -440px; } -.emoji-1F3C4-1F3FF { background-position: -120px -440px; } -.emoji-1F3C5 { background-position: -140px -440px; } -.emoji-1F3C6 { background-position: -160px -440px; } -.emoji-1F3C7 { background-position: -180px -440px; } -.emoji-1F3C7-1F3FB { background-position: -200px -440px; } -.emoji-1F3C7-1F3FC { background-position: -220px -440px; } -.emoji-1F3C7-1F3FD { background-position: -240px -440px; } -.emoji-1F3C7-1F3FE { background-position: -260px -440px; } -.emoji-1F3C7-1F3FF { background-position: -280px -440px; } -.emoji-1F3C8 { background-position: -300px -440px; } -.emoji-1F3C9 { background-position: -320px -440px; } -.emoji-1F3CA { background-position: -340px -440px; } -.emoji-1F3CA-1F3FB { background-position: -360px -440px; } -.emoji-1F3CA-1F3FC { background-position: -380px -440px; } -.emoji-1F3CA-1F3FD { background-position: -400px -440px; } -.emoji-1F3CA-1F3FE { background-position: -420px -440px; } -.emoji-1F3CA-1F3FF { background-position: -440px -440px; } -.emoji-1F3CB { background-position: -460px 0; } -.emoji-1F3CB-1F3FB { background-position: -460px -20px; } -.emoji-1F3CB-1F3FC { background-position: -460px -40px; } -.emoji-1F3CB-1F3FD { background-position: -460px -60px; } -.emoji-1F3CB-1F3FE { background-position: -460px -80px; } -.emoji-1F3CB-1F3FF { background-position: -460px -100px; } -.emoji-1F3CC { background-position: -460px -120px; } -.emoji-1F3CD { background-position: -460px -140px; } -.emoji-1F3CE { background-position: -460px -160px; } -.emoji-1F3CF { background-position: -460px -180px; } -.emoji-1F3D0 { background-position: -460px -200px; } -.emoji-1F3D1 { background-position: -460px -220px; } -.emoji-1F3D2 { background-position: -460px -240px; } -.emoji-1F3D3 { background-position: -460px -260px; } -.emoji-1F3D4 { background-position: -460px -280px; } -.emoji-1F3D5 { background-position: -460px -300px; } -.emoji-1F3D6 { background-position: -460px -320px; } -.emoji-1F3D7 { background-position: -460px -340px; } -.emoji-1F3D8 { background-position: -460px -360px; } -.emoji-1F3D9 { background-position: -460px -380px; } -.emoji-1F3DA { background-position: -460px -400px; } -.emoji-1F3DB { background-position: -460px -420px; } -.emoji-1F3DC { background-position: -460px -440px; } -.emoji-1F3DD { background-position: 0 -460px; } -.emoji-1F3DE { background-position: -20px -460px; } -.emoji-1F3DF { background-position: -40px -460px; } -.emoji-1F3E0 { background-position: -60px -460px; } -.emoji-1F3E1 { background-position: -80px -460px; } -.emoji-1F3E2 { background-position: -100px -460px; } -.emoji-1F3E3 { background-position: -120px -460px; } -.emoji-1F3E4 { background-position: -140px -460px; } -.emoji-1F3E5 { background-position: -160px -460px; } -.emoji-1F3E6 { background-position: -180px -460px; } -.emoji-1F3E7 { background-position: -200px -460px; } -.emoji-1F3E8 { background-position: -220px -460px; } -.emoji-1F3E9 { background-position: -240px -460px; } -.emoji-1F3EA { background-position: -260px -460px; } -.emoji-1F3EB { background-position: -280px -460px; } -.emoji-1F3EC { background-position: -300px -460px; } -.emoji-1F3ED { background-position: -320px -460px; } -.emoji-1F3EE { background-position: -340px -460px; } -.emoji-1F3EF { background-position: -360px -460px; } -.emoji-1F3F0 { background-position: -380px -460px; } -.emoji-1F3F1 { background-position: -400px -460px; } -.emoji-1F3F2 { background-position: -420px -460px; } -.emoji-1F3F3 { background-position: -440px -460px; } -.emoji-1F3F4 { background-position: -460px -460px; } -.emoji-1F3F5 { background-position: -480px 0; } -.emoji-1F3F6 { background-position: -480px -20px; } -.emoji-1F3F7 { background-position: -480px -40px; } -.emoji-1F3F8 { background-position: -480px -60px; } -.emoji-1F3F9 { background-position: -480px -80px; } -.emoji-1F3FA { background-position: -480px -100px; } -.emoji-1F3FB { background-position: -480px -120px; } -.emoji-1F3FC { background-position: -480px -140px; } -.emoji-1F3FD { background-position: -480px -160px; } -.emoji-1F3FE { background-position: -480px -180px; } -.emoji-1F3FF { background-position: -480px -200px; } -.emoji-1F400 { background-position: -480px -220px; } -.emoji-1F401 { background-position: -480px -240px; } -.emoji-1F402 { background-position: -480px -260px; } -.emoji-1F403 { background-position: -480px -280px; } -.emoji-1F404 { background-position: -480px -300px; } -.emoji-1F405 { background-position: -480px -320px; } -.emoji-1F406 { background-position: -480px -340px; } -.emoji-1F407 { background-position: -480px -360px; } -.emoji-1F408 { background-position: -480px -380px; } -.emoji-1F409 { background-position: -480px -400px; } -.emoji-1F40A { background-position: -480px -420px; } -.emoji-1F40B { background-position: -480px -440px; } -.emoji-1F40C { background-position: -480px -460px; } -.emoji-1F40D { background-position: 0 -480px; } -.emoji-1F40E { background-position: -20px -480px; } -.emoji-1F40F { background-position: -40px -480px; } -.emoji-1F410 { background-position: -60px -480px; } -.emoji-1F411 { background-position: -80px -480px; } -.emoji-1F412 { background-position: -100px -480px; } -.emoji-1F413 { background-position: -120px -480px; } -.emoji-1F414 { background-position: -140px -480px; } -.emoji-1F415 { background-position: -160px -480px; } -.emoji-1F416 { background-position: -180px -480px; } -.emoji-1F417 { background-position: -200px -480px; } -.emoji-1F418 { background-position: -220px -480px; } -.emoji-1F419 { background-position: -240px -480px; } -.emoji-1F41A { background-position: -260px -480px; } -.emoji-1F41B { background-position: -280px -480px; } -.emoji-1F41C { background-position: -300px -480px; } -.emoji-1F41D { background-position: -320px -480px; } -.emoji-1F41E { background-position: -340px -480px; } -.emoji-1F41F { background-position: -360px -480px; } -.emoji-1F420 { background-position: -380px -480px; } -.emoji-1F421 { background-position: -400px -480px; } -.emoji-1F422 { background-position: -420px -480px; } -.emoji-1F423 { background-position: -440px -480px; } -.emoji-1F424 { background-position: -460px -480px; } -.emoji-1F425 { background-position: -480px -480px; } -.emoji-1F426 { background-position: -500px 0; } -.emoji-1F427 { background-position: -500px -20px; } -.emoji-1F428 { background-position: -500px -40px; } -.emoji-1F429 { background-position: -500px -60px; } -.emoji-1F42A { background-position: -500px -80px; } -.emoji-1F42B { background-position: -500px -100px; } -.emoji-1F42C { background-position: -500px -120px; } -.emoji-1F42D { background-position: -500px -140px; } -.emoji-1F42E { background-position: -500px -160px; } -.emoji-1F42F { background-position: -500px -180px; } -.emoji-1F430 { background-position: -500px -200px; } -.emoji-1F431 { background-position: -500px -220px; } -.emoji-1F432 { background-position: -500px -240px; } -.emoji-1F433 { background-position: -500px -260px; } -.emoji-1F434 { background-position: -500px -280px; } -.emoji-1F435 { background-position: -500px -300px; } -.emoji-1F436 { background-position: -500px -320px; } -.emoji-1F437 { background-position: -500px -340px; } -.emoji-1F438 { background-position: -500px -360px; } -.emoji-1F439 { background-position: -500px -380px; } -.emoji-1F43A { background-position: -500px -400px; } -.emoji-1F43B { background-position: -500px -420px; } -.emoji-1F43C { background-position: -500px -440px; } -.emoji-1F43D { background-position: -500px -460px; } -.emoji-1F43E { background-position: -500px -480px; } -.emoji-1F43F { background-position: 0 -500px; } -.emoji-1F440 { background-position: -20px -500px; } -.emoji-1F441 { background-position: -40px -500px; } -.emoji-1F441-1F5E8 { background-position: -60px -500px; } -.emoji-1F442 { background-position: -80px -500px; } -.emoji-1F442-1F3FB { background-position: -100px -500px; } -.emoji-1F442-1F3FC { background-position: -120px -500px; } -.emoji-1F442-1F3FD { background-position: -140px -500px; } -.emoji-1F442-1F3FE { background-position: -160px -500px; } -.emoji-1F442-1F3FF { background-position: -180px -500px; } -.emoji-1F443 { background-position: -200px -500px; } -.emoji-1F443-1F3FB { background-position: -220px -500px; } -.emoji-1F443-1F3FC { background-position: -240px -500px; } -.emoji-1F443-1F3FD { background-position: -260px -500px; } -.emoji-1F443-1F3FE { background-position: -280px -500px; } -.emoji-1F443-1F3FF { background-position: -300px -500px; } -.emoji-1F444 { background-position: -320px -500px; } -.emoji-1F445 { background-position: -340px -500px; } -.emoji-1F446 { background-position: -360px -500px; } -.emoji-1F446-1F3FB { background-position: -380px -500px; } -.emoji-1F446-1F3FC { background-position: -400px -500px; } -.emoji-1F446-1F3FD { background-position: -420px -500px; } -.emoji-1F446-1F3FE { background-position: -440px -500px; } -.emoji-1F446-1F3FF { background-position: -460px -500px; } -.emoji-1F447 { background-position: -480px -500px; } -.emoji-1F447-1F3FB { background-position: -500px -500px; } -.emoji-1F447-1F3FC { background-position: -520px 0; } -.emoji-1F447-1F3FD { background-position: -520px -20px; } -.emoji-1F447-1F3FE { background-position: -520px -40px; } -.emoji-1F447-1F3FF { background-position: -520px -60px; } -.emoji-1F448 { background-position: -520px -80px; } -.emoji-1F448-1F3FB { background-position: -520px -100px; } -.emoji-1F448-1F3FC { background-position: -520px -120px; } -.emoji-1F448-1F3FD { background-position: -520px -140px; } -.emoji-1F448-1F3FE { background-position: -520px -160px; } -.emoji-1F448-1F3FF { background-position: -520px -180px; } -.emoji-1F449 { background-position: -520px -200px; } -.emoji-1F449-1F3FB { background-position: -520px -220px; } -.emoji-1F449-1F3FC { background-position: -520px -240px; } -.emoji-1F449-1F3FD { background-position: -520px -260px; } -.emoji-1F449-1F3FE { background-position: -520px -280px; } -.emoji-1F449-1F3FF { background-position: -520px -300px; } -.emoji-1F44A { background-position: -520px -320px; } -.emoji-1F44A-1F3FB { background-position: -520px -340px; } -.emoji-1F44A-1F3FC { background-position: -520px -360px; } -.emoji-1F44A-1F3FD { background-position: -520px -380px; } -.emoji-1F44A-1F3FE { background-position: -520px -400px; } -.emoji-1F44A-1F3FF { background-position: -520px -420px; } -.emoji-1F44B { background-position: -520px -440px; } -.emoji-1F44B-1F3FB { background-position: -520px -460px; } -.emoji-1F44B-1F3FC { background-position: -520px -480px; } -.emoji-1F44B-1F3FD { background-position: -520px -500px; } -.emoji-1F44B-1F3FE { background-position: 0 -520px; } -.emoji-1F44B-1F3FF { background-position: -20px -520px; } -.emoji-1F44C { background-position: -40px -520px; } -.emoji-1F44C-1F3FB { background-position: -60px -520px; } -.emoji-1F44C-1F3FC { background-position: -80px -520px; } -.emoji-1F44C-1F3FD { background-position: -100px -520px; } -.emoji-1F44C-1F3FE { background-position: -120px -520px; } -.emoji-1F44C-1F3FF { background-position: -140px -520px; } -.emoji-1F44D { background-position: -160px -520px; } -.emoji-1F44D-1F3FB { background-position: -180px -520px; } -.emoji-1F44D-1F3FC { background-position: -200px -520px; } -.emoji-1F44D-1F3FD { background-position: -220px -520px; } -.emoji-1F44D-1F3FE { background-position: -240px -520px; } -.emoji-1F44D-1F3FF { background-position: -260px -520px; } -.emoji-1F44E { background-position: -280px -520px; } -.emoji-1F44E-1F3FB { background-position: -300px -520px; } -.emoji-1F44E-1F3FC { background-position: -320px -520px; } -.emoji-1F44E-1F3FD { background-position: -340px -520px; } -.emoji-1F44E-1F3FE { background-position: -360px -520px; } -.emoji-1F44E-1F3FF { background-position: -380px -520px; } -.emoji-1F44F { background-position: -400px -520px; } -.emoji-1F44F-1F3FB { background-position: -420px -520px; } -.emoji-1F44F-1F3FC { background-position: -440px -520px; } -.emoji-1F44F-1F3FD { background-position: -460px -520px; } -.emoji-1F44F-1F3FE { background-position: -480px -520px; } -.emoji-1F44F-1F3FF { background-position: -500px -520px; } -.emoji-1F450 { background-position: -520px -520px; } -.emoji-1F450-1F3FB { background-position: -540px 0; } -.emoji-1F450-1F3FC { background-position: -540px -20px; } -.emoji-1F450-1F3FD { background-position: -540px -40px; } -.emoji-1F450-1F3FE { background-position: -540px -60px; } -.emoji-1F450-1F3FF { background-position: -540px -80px; } -.emoji-1F451 { background-position: -540px -100px; } -.emoji-1F452 { background-position: -540px -120px; } -.emoji-1F453 { background-position: -540px -140px; } -.emoji-1F454 { background-position: -540px -160px; } -.emoji-1F455 { background-position: -540px -180px; } -.emoji-1F456 { background-position: -540px -200px; } -.emoji-1F457 { background-position: -540px -220px; } -.emoji-1F458 { background-position: -540px -240px; } -.emoji-1F459 { background-position: -540px -260px; } -.emoji-1F45A { background-position: -540px -280px; } -.emoji-1F45B { background-position: -540px -300px; } -.emoji-1F45C { background-position: -540px -320px; } -.emoji-1F45D { background-position: -540px -340px; } -.emoji-1F45E { background-position: -540px -360px; } -.emoji-1F45F { background-position: -540px -380px; } -.emoji-1F460 { background-position: -540px -400px; } -.emoji-1F461 { background-position: -540px -420px; } -.emoji-1F462 { background-position: -540px -440px; } -.emoji-1F463 { background-position: -540px -460px; } -.emoji-1F464 { background-position: -540px -480px; } -.emoji-1F465 { background-position: -540px -500px; } -.emoji-1F466 { background-position: -540px -520px; } -.emoji-1F466-1F3FB { background-position: 0 -540px; } -.emoji-1F466-1F3FC { background-position: -20px -540px; } -.emoji-1F466-1F3FD { background-position: -40px -540px; } -.emoji-1F466-1F3FE { background-position: -60px -540px; } -.emoji-1F466-1F3FF { background-position: -80px -540px; } -.emoji-1F467 { background-position: -100px -540px; } -.emoji-1F467-1F3FB { background-position: -120px -540px; } -.emoji-1F467-1F3FC { background-position: -140px -540px; } -.emoji-1F467-1F3FD { background-position: -160px -540px; } -.emoji-1F467-1F3FE { background-position: -180px -540px; } -.emoji-1F467-1F3FF { background-position: -200px -540px; } -.emoji-1F468 { background-position: -220px -540px; } -.emoji-1F468-1F3FB { background-position: -240px -540px; } -.emoji-1F468-1F3FC { background-position: -260px -540px; } -.emoji-1F468-1F3FD { background-position: -280px -540px; } -.emoji-1F468-1F3FE { background-position: -300px -540px; } -.emoji-1F468-1F3FF { background-position: -320px -540px; } -.emoji-1F468-1F468-1F466 { background-position: -340px -540px; } -.emoji-1F468-1F468-1F466-1F466 { background-position: -360px -540px; } -.emoji-1F468-1F468-1F467 { background-position: -380px -540px; } -.emoji-1F468-1F468-1F467-1F466 { background-position: -400px -540px; } -.emoji-1F468-1F468-1F467-1F467 { background-position: -420px -540px; } -.emoji-1F468-1F469-1F466-1F466 { background-position: -440px -540px; } -.emoji-1F468-1F469-1F467 { background-position: -460px -540px; } -.emoji-1F468-1F469-1F467-1F466 { background-position: -480px -540px; } -.emoji-1F468-1F469-1F467-1F467 { background-position: -500px -540px; } -.emoji-1F468-2764-1F468 { background-position: -520px -540px; } -.emoji-1F468-2764-1F48B-1F468 { background-position: -540px -540px; } -.emoji-1F469 { background-position: -560px 0; } -.emoji-1F469-1F3FB { background-position: -560px -20px; } -.emoji-1F469-1F3FC { background-position: -560px -40px; } -.emoji-1F469-1F3FD { background-position: -560px -60px; } -.emoji-1F469-1F3FE { background-position: -560px -80px; } -.emoji-1F469-1F3FF { background-position: -560px -100px; } -.emoji-1F469-1F469-1F466 { background-position: -560px -120px; } -.emoji-1F469-1F469-1F466-1F466 { background-position: -560px -140px; } -.emoji-1F469-1F469-1F467 { background-position: -560px -160px; } -.emoji-1F469-1F469-1F467-1F466 { background-position: -560px -180px; } -.emoji-1F469-1F469-1F467-1F467 { background-position: -560px -200px; } -.emoji-1F469-2764-1F469 { background-position: -560px -220px; } -.emoji-1F469-2764-1F48B-1F469 { background-position: -560px -240px; } -.emoji-1F46A { background-position: -560px -260px; } -.emoji-1F46B { background-position: -560px -280px; } -.emoji-1F46C { background-position: -560px -300px; } -.emoji-1F46D { background-position: -560px -320px; } -.emoji-1F46E { background-position: -560px -340px; } -.emoji-1F46E-1F3FB { background-position: -560px -360px; } -.emoji-1F46E-1F3FC { background-position: -560px -380px; } -.emoji-1F46E-1F3FD { background-position: -560px -400px; } -.emoji-1F46E-1F3FE { background-position: -560px -420px; } -.emoji-1F46E-1F3FF { background-position: -560px -440px; } -.emoji-1F46F { background-position: -560px -460px; } -.emoji-1F470 { background-position: -560px -480px; } -.emoji-1F470-1F3FB { background-position: -560px -500px; } -.emoji-1F470-1F3FC { background-position: -560px -520px; } -.emoji-1F470-1F3FD { background-position: -560px -540px; } -.emoji-1F470-1F3FE { background-position: 0 -560px; } -.emoji-1F470-1F3FF { background-position: -20px -560px; } -.emoji-1F471 { background-position: -40px -560px; } -.emoji-1F471-1F3FB { background-position: -60px -560px; } -.emoji-1F471-1F3FC { background-position: -80px -560px; } -.emoji-1F471-1F3FD { background-position: -100px -560px; } -.emoji-1F471-1F3FE { background-position: -120px -560px; } -.emoji-1F471-1F3FF { background-position: -140px -560px; } -.emoji-1F472 { background-position: -160px -560px; } -.emoji-1F472-1F3FB { background-position: -180px -560px; } -.emoji-1F472-1F3FC { background-position: -200px -560px; } -.emoji-1F472-1F3FD { background-position: -220px -560px; } -.emoji-1F472-1F3FE { background-position: -240px -560px; } -.emoji-1F472-1F3FF { background-position: -260px -560px; } -.emoji-1F473 { background-position: -280px -560px; } -.emoji-1F473-1F3FB { background-position: -300px -560px; } -.emoji-1F473-1F3FC { background-position: -320px -560px; } -.emoji-1F473-1F3FD { background-position: -340px -560px; } -.emoji-1F473-1F3FE { background-position: -360px -560px; } -.emoji-1F473-1F3FF { background-position: -380px -560px; } -.emoji-1F474 { background-position: -400px -560px; } -.emoji-1F474-1F3FB { background-position: -420px -560px; } -.emoji-1F474-1F3FC { background-position: -440px -560px; } -.emoji-1F474-1F3FD { background-position: -460px -560px; } -.emoji-1F474-1F3FE { background-position: -480px -560px; } -.emoji-1F474-1F3FF { background-position: -500px -560px; } -.emoji-1F475 { background-position: -520px -560px; } -.emoji-1F475-1F3FB { background-position: -540px -560px; } -.emoji-1F475-1F3FC { background-position: -560px -560px; } -.emoji-1F475-1F3FD { background-position: -580px 0; } -.emoji-1F475-1F3FE { background-position: -580px -20px; } -.emoji-1F475-1F3FF { background-position: -580px -40px; } -.emoji-1F476 { background-position: -580px -60px; } -.emoji-1F476-1F3FB { background-position: -580px -80px; } -.emoji-1F476-1F3FC { background-position: -580px -100px; } -.emoji-1F476-1F3FD { background-position: -580px -120px; } -.emoji-1F476-1F3FE { background-position: -580px -140px; } -.emoji-1F476-1F3FF { background-position: -580px -160px; } -.emoji-1F477 { background-position: -580px -180px; } -.emoji-1F477-1F3FB { background-position: -580px -200px; } -.emoji-1F477-1F3FC { background-position: -580px -220px; } -.emoji-1F477-1F3FD { background-position: -580px -240px; } -.emoji-1F477-1F3FE { background-position: -580px -260px; } -.emoji-1F477-1F3FF { background-position: -580px -280px; } -.emoji-1F478 { background-position: -580px -300px; } -.emoji-1F478-1F3FB { background-position: -580px -320px; } -.emoji-1F478-1F3FC { background-position: -580px -340px; } -.emoji-1F478-1F3FD { background-position: -580px -360px; } -.emoji-1F478-1F3FE { background-position: -580px -380px; } -.emoji-1F478-1F3FF { background-position: -580px -400px; } -.emoji-1F479 { background-position: -580px -420px; } -.emoji-1F47A { background-position: -580px -440px; } -.emoji-1F47B { background-position: -580px -460px; } -.emoji-1F47C { background-position: -580px -480px; } -.emoji-1F47C-1F3FB { background-position: -580px -500px; } -.emoji-1F47C-1F3FC { background-position: -580px -520px; } -.emoji-1F47C-1F3FD { background-position: -580px -540px; } -.emoji-1F47C-1F3FE { background-position: -580px -560px; } -.emoji-1F47C-1F3FF { background-position: 0 -580px; } -.emoji-1F47D { background-position: -20px -580px; } -.emoji-1F47E { background-position: -40px -580px; } -.emoji-1F47F { background-position: -60px -580px; } -.emoji-1F480 { background-position: -80px -580px; } -.emoji-1F481 { background-position: -100px -580px; } -.emoji-1F481-1F3FB { background-position: -120px -580px; } -.emoji-1F481-1F3FC { background-position: -140px -580px; } -.emoji-1F481-1F3FD { background-position: -160px -580px; } -.emoji-1F481-1F3FE { background-position: -180px -580px; } -.emoji-1F481-1F3FF { background-position: -200px -580px; } -.emoji-1F482 { background-position: -220px -580px; } -.emoji-1F482-1F3FB { background-position: -240px -580px; } -.emoji-1F482-1F3FC { background-position: -260px -580px; } -.emoji-1F482-1F3FD { background-position: -280px -580px; } -.emoji-1F482-1F3FE { background-position: -300px -580px; } -.emoji-1F482-1F3FF { background-position: -320px -580px; } -.emoji-1F483 { background-position: -340px -580px; } -.emoji-1F483-1F3FB { background-position: -360px -580px; } -.emoji-1F483-1F3FC { background-position: -380px -580px; } -.emoji-1F483-1F3FD { background-position: -400px -580px; } -.emoji-1F483-1F3FE { background-position: -420px -580px; } -.emoji-1F483-1F3FF { background-position: -440px -580px; } -.emoji-1F484 { background-position: -460px -580px; } -.emoji-1F485 { background-position: -480px -580px; } -.emoji-1F485-1F3FB { background-position: -500px -580px; } -.emoji-1F485-1F3FC { background-position: -520px -580px; } -.emoji-1F485-1F3FD { background-position: -540px -580px; } -.emoji-1F485-1F3FE { background-position: -560px -580px; } -.emoji-1F485-1F3FF { background-position: -580px -580px; } -.emoji-1F486 { background-position: -600px 0; } -.emoji-1F486-1F3FB { background-position: -600px -20px; } -.emoji-1F486-1F3FC { background-position: -600px -40px; } -.emoji-1F486-1F3FD { background-position: -600px -60px; } -.emoji-1F486-1F3FE { background-position: -600px -80px; } -.emoji-1F486-1F3FF { background-position: -600px -100px; } -.emoji-1F487 { background-position: -600px -120px; } -.emoji-1F487-1F3FB { background-position: -600px -140px; } -.emoji-1F487-1F3FC { background-position: -600px -160px; } -.emoji-1F487-1F3FD { background-position: -600px -180px; } -.emoji-1F487-1F3FE { background-position: -600px -200px; } -.emoji-1F487-1F3FF { background-position: -600px -220px; } -.emoji-1F488 { background-position: -600px -240px; } -.emoji-1F489 { background-position: -600px -260px; } -.emoji-1F48A { background-position: -600px -280px; } -.emoji-1F48B { background-position: -600px -300px; } -.emoji-1F48C { background-position: -600px -320px; } -.emoji-1F48D { background-position: -600px -340px; } -.emoji-1F48E { background-position: -600px -360px; } -.emoji-1F48F { background-position: -600px -380px; } -.emoji-1F490 { background-position: -600px -400px; } -.emoji-1F491 { background-position: -600px -420px; } -.emoji-1F492 { background-position: -600px -440px; } -.emoji-1F493 { background-position: -600px -460px; } -.emoji-1F494 { background-position: -600px -480px; } -.emoji-1F495 { background-position: -600px -500px; } -.emoji-1F496 { background-position: -600px -520px; } -.emoji-1F497 { background-position: -600px -540px; } -.emoji-1F498 { background-position: -600px -560px; } -.emoji-1F499 { background-position: -600px -580px; } -.emoji-1F49A { background-position: 0 -600px; } -.emoji-1F49B { background-position: -20px -600px; } -.emoji-1F49C { background-position: -40px -600px; } -.emoji-1F49D { background-position: -60px -600px; } -.emoji-1F49E { background-position: -80px -600px; } -.emoji-1F49F { background-position: -100px -600px; } -.emoji-1F4A0 { background-position: -120px -600px; } -.emoji-1F4A1 { background-position: -140px -600px; } -.emoji-1F4A2 { background-position: -160px -600px; } -.emoji-1F4A3 { background-position: -180px -600px; } -.emoji-1F4A4 { background-position: -200px -600px; } -.emoji-1F4A5 { background-position: -220px -600px; } -.emoji-1F4A6 { background-position: -240px -600px; } -.emoji-1F4A7 { background-position: -260px -600px; } -.emoji-1F4A8 { background-position: -280px -600px; } -.emoji-1F4A9 { background-position: -300px -600px; } -.emoji-1F4AA { background-position: -320px -600px; } -.emoji-1F4AA-1F3FB { background-position: -340px -600px; } -.emoji-1F4AA-1F3FC { background-position: -360px -600px; } -.emoji-1F4AA-1F3FD { background-position: -380px -600px; } -.emoji-1F4AA-1F3FE { background-position: -400px -600px; } -.emoji-1F4AA-1F3FF { background-position: -420px -600px; } -.emoji-1F4AB { background-position: -440px -600px; } -.emoji-1F4AC { background-position: -460px -600px; } -.emoji-1F4AD { background-position: -480px -600px; } -.emoji-1F4AE { background-position: -500px -600px; } -.emoji-1F4AF { background-position: -520px -600px; } -.emoji-1F4B0 { background-position: -540px -600px; } -.emoji-1F4B1 { background-position: -560px -600px; } -.emoji-1F4B2 { background-position: -580px -600px; } -.emoji-1F4B3 { background-position: -600px -600px; } -.emoji-1F4B4 { background-position: -620px 0; } -.emoji-1F4B5 { background-position: -620px -20px; } -.emoji-1F4B6 { background-position: -620px -40px; } -.emoji-1F4B7 { background-position: -620px -60px; } -.emoji-1F4B8 { background-position: -620px -80px; } -.emoji-1F4B9 { background-position: -620px -100px; } -.emoji-1F4BA { background-position: -620px -120px; } -.emoji-1F4BB { background-position: -620px -140px; } -.emoji-1F4BC { background-position: -620px -160px; } -.emoji-1F4BD { background-position: -620px -180px; } -.emoji-1F4BE { background-position: -620px -200px; } -.emoji-1F4BF { background-position: -620px -220px; } -.emoji-1F4C0 { background-position: -620px -240px; } -.emoji-1F4C1 { background-position: -620px -260px; } -.emoji-1F4C2 { background-position: -620px -280px; } -.emoji-1F4C3 { background-position: -620px -300px; } -.emoji-1F4C4 { background-position: -620px -320px; } -.emoji-1F4C5 { background-position: -620px -340px; } -.emoji-1F4C6 { background-position: -620px -360px; } -.emoji-1F4C7 { background-position: -620px -380px; } -.emoji-1F4C8 { background-position: -620px -400px; } -.emoji-1F4C9 { background-position: -620px -420px; } -.emoji-1F4CA { background-position: -620px -440px; } -.emoji-1F4CB { background-position: -620px -460px; } -.emoji-1F4CC { background-position: -620px -480px; } -.emoji-1F4CD { background-position: -620px -500px; } -.emoji-1F4CE { background-position: -620px -520px; } -.emoji-1F4CF { background-position: -620px -540px; } -.emoji-1F4D0 { background-position: -620px -560px; } -.emoji-1F4D1 { background-position: -620px -580px; } -.emoji-1F4D2 { background-position: -620px -600px; } -.emoji-1F4D3 { background-position: 0 -620px; } -.emoji-1F4D4 { background-position: -20px -620px; } -.emoji-1F4D5 { background-position: -40px -620px; } -.emoji-1F4D6 { background-position: -60px -620px; } -.emoji-1F4D7 { background-position: -80px -620px; } -.emoji-1F4D8 { background-position: -100px -620px; } -.emoji-1F4D9 { background-position: -120px -620px; } -.emoji-1F4DA { background-position: -140px -620px; } -.emoji-1F4DB { background-position: -160px -620px; } -.emoji-1F4DC { background-position: -180px -620px; } -.emoji-1F4DD { background-position: -200px -620px; } -.emoji-1F4DE { background-position: -220px -620px; } -.emoji-1F4DF { background-position: -240px -620px; } -.emoji-1F4E0 { background-position: -260px -620px; } -.emoji-1F4E1 { background-position: -280px -620px; } -.emoji-1F4E2 { background-position: -300px -620px; } -.emoji-1F4E3 { background-position: -320px -620px; } -.emoji-1F4E4 { background-position: -340px -620px; } -.emoji-1F4E5 { background-position: -360px -620px; } -.emoji-1F4E6 { background-position: -380px -620px; } -.emoji-1F4E7 { background-position: -400px -620px; } -.emoji-1F4E8 { background-position: -420px -620px; } -.emoji-1F4E9 { background-position: -440px -620px; } -.emoji-1F4EA { background-position: -460px -620px; } -.emoji-1F4EB { background-position: -480px -620px; } -.emoji-1F4EC { background-position: -500px -620px; } -.emoji-1F4ED { background-position: -520px -620px; } -.emoji-1F4EE { background-position: -540px -620px; } -.emoji-1F4EF { background-position: -560px -620px; } -.emoji-1F4F0 { background-position: -580px -620px; } -.emoji-1F4F1 { background-position: -600px -620px; } -.emoji-1F4F2 { background-position: -620px -620px; } -.emoji-1F4F3 { background-position: -640px 0; } -.emoji-1F4F4 { background-position: -640px -20px; } -.emoji-1F4F5 { background-position: -640px -40px; } -.emoji-1F4F6 { background-position: -640px -60px; } -.emoji-1F4F7 { background-position: -640px -80px; } -.emoji-1F4F8 { background-position: -640px -100px; } -.emoji-1F4F9 { background-position: -640px -120px; } -.emoji-1F4FA { background-position: -640px -140px; } -.emoji-1F4FB { background-position: -640px -160px; } -.emoji-1F4FC { background-position: -640px -180px; } -.emoji-1F4FD { background-position: -640px -200px; } -.emoji-1F4FE { background-position: -640px -220px; } -.emoji-1F4FF { background-position: -640px -240px; } -.emoji-1F500 { background-position: -640px -260px; } -.emoji-1F501 { background-position: -640px -280px; } -.emoji-1F502 { background-position: -640px -300px; } -.emoji-1F503 { background-position: -640px -320px; } -.emoji-1F504 { background-position: -640px -340px; } -.emoji-1F505 { background-position: -640px -360px; } -.emoji-1F506 { background-position: -640px -380px; } -.emoji-1F507 { background-position: -640px -400px; } -.emoji-1F508 { background-position: -640px -420px; } -.emoji-1F509 { background-position: -640px -440px; } -.emoji-1F50A { background-position: -640px -460px; } -.emoji-1F50B { background-position: -640px -480px; } -.emoji-1F50C { background-position: -640px -500px; } -.emoji-1F50D { background-position: -640px -520px; } -.emoji-1F50E { background-position: -640px -540px; } -.emoji-1F50F { background-position: -640px -560px; } -.emoji-1F510 { background-position: -640px -580px; } -.emoji-1F511 { background-position: -640px -600px; } -.emoji-1F512 { background-position: -640px -620px; } -.emoji-1F513 { background-position: 0 -640px; } -.emoji-1F514 { background-position: -20px -640px; } -.emoji-1F515 { background-position: -40px -640px; } -.emoji-1F516 { background-position: -60px -640px; } -.emoji-1F517 { background-position: -80px -640px; } -.emoji-1F518 { background-position: -100px -640px; } -.emoji-1F519 { background-position: -120px -640px; } -.emoji-1F51A { background-position: -140px -640px; } -.emoji-1F51B { background-position: -160px -640px; } -.emoji-1F51C { background-position: -180px -640px; } -.emoji-1F51D { background-position: -200px -640px; } -.emoji-1F51E { background-position: -220px -640px; } -.emoji-1F51F { background-position: -240px -640px; } -.emoji-1F520 { background-position: -260px -640px; } -.emoji-1F521 { background-position: -280px -640px; } -.emoji-1F522 { background-position: -300px -640px; } -.emoji-1F523 { background-position: -320px -640px; } -.emoji-1F524 { background-position: -340px -640px; } -.emoji-1F525 { background-position: -360px -640px; } -.emoji-1F526 { background-position: -380px -640px; } -.emoji-1F527 { background-position: -400px -640px; } -.emoji-1F528 { background-position: -420px -640px; } -.emoji-1F529 { background-position: -440px -640px; } -.emoji-1F52A { background-position: -460px -640px; } -.emoji-1F52B { background-position: -480px -640px; } -.emoji-1F52C { background-position: -500px -640px; } -.emoji-1F52D { background-position: -520px -640px; } -.emoji-1F52E { background-position: -540px -640px; } -.emoji-1F52F { background-position: -560px -640px; } -.emoji-1F530 { background-position: -580px -640px; } -.emoji-1F531 { background-position: -600px -640px; } -.emoji-1F532 { background-position: -620px -640px; } -.emoji-1F533 { background-position: -640px -640px; } -.emoji-1F534 { background-position: -660px 0; } -.emoji-1F535 { background-position: -660px -20px; } -.emoji-1F536 { background-position: -660px -40px; } -.emoji-1F537 { background-position: -660px -60px; } -.emoji-1F538 { background-position: -660px -80px; } -.emoji-1F539 { background-position: -660px -100px; } -.emoji-1F53A { background-position: -660px -120px; } -.emoji-1F53B { background-position: -660px -140px; } -.emoji-1F53C { background-position: -660px -160px; } -.emoji-1F53D { background-position: -660px -180px; } -.emoji-1F546 { background-position: -660px -200px; } -.emoji-1F547 { background-position: -660px -220px; } -.emoji-1F548 { background-position: -660px -240px; } -.emoji-1F549 { background-position: -660px -260px; } -.emoji-1F54A { background-position: -660px -280px; } -.emoji-1F54B { background-position: -660px -300px; } -.emoji-1F54C { background-position: -660px -320px; } -.emoji-1F54D { background-position: -660px -340px; } -.emoji-1F54E { background-position: -660px -360px; } -.emoji-1F550 { background-position: -660px -380px; } -.emoji-1F551 { background-position: -660px -400px; } -.emoji-1F552 { background-position: -660px -420px; } -.emoji-1F553 { background-position: -660px -440px; } -.emoji-1F554 { background-position: -660px -460px; } -.emoji-1F555 { background-position: -660px -480px; } -.emoji-1F556 { background-position: -660px -500px; } -.emoji-1F557 { background-position: -660px -520px; } -.emoji-1F558 { background-position: -660px -540px; } -.emoji-1F559 { background-position: -660px -560px; } -.emoji-1F55A { background-position: -660px -580px; } -.emoji-1F55B { background-position: -660px -600px; } -.emoji-1F55C { background-position: -660px -620px; } -.emoji-1F55D { background-position: -660px -640px; } -.emoji-1F55E { background-position: 0 -660px; } -.emoji-1F55F { background-position: -20px -660px; } -.emoji-1F560 { background-position: -40px -660px; } -.emoji-1F561 { background-position: -60px -660px; } -.emoji-1F562 { background-position: -80px -660px; } -.emoji-1F563 { background-position: -100px -660px; } -.emoji-1F564 { background-position: -120px -660px; } -.emoji-1F565 { background-position: -140px -660px; } -.emoji-1F566 { background-position: -160px -660px; } -.emoji-1F567 { background-position: -180px -660px; } -.emoji-1F568 { background-position: -200px -660px; } -.emoji-1F569 { background-position: -220px -660px; } -.emoji-1F56A { background-position: -240px -660px; } -.emoji-1F56B { background-position: -260px -660px; } -.emoji-1F56C { background-position: -280px -660px; } -.emoji-1F56D { background-position: -300px -660px; } -.emoji-1F56E { background-position: -320px -660px; } -.emoji-1F56F { background-position: -340px -660px; } -.emoji-1F570 { background-position: -360px -660px; } -.emoji-1F571 { background-position: -380px -660px; } -.emoji-1F572 { background-position: -400px -660px; } -.emoji-1F573 { background-position: -420px -660px; } -.emoji-1F574 { background-position: -440px -660px; } -.emoji-1F575 { background-position: -460px -660px; } -.emoji-1F575-1F3FB { background-position: -480px -660px; } -.emoji-1F575-1F3FC { background-position: -500px -660px; } -.emoji-1F575-1F3FD { background-position: -520px -660px; } -.emoji-1F575-1F3FE { background-position: -540px -660px; } -.emoji-1F575-1F3FF { background-position: -560px -660px; } -.emoji-1F576 { background-position: -580px -660px; } -.emoji-1F577 { background-position: -600px -660px; } -.emoji-1F578 { background-position: -620px -660px; } -.emoji-1F579 { background-position: -640px -660px; } -.emoji-1F57B { background-position: -660px -660px; } -.emoji-1F57E { background-position: -680px 0; } -.emoji-1F57F { background-position: -680px -20px; } -.emoji-1F581 { background-position: -680px -40px; } -.emoji-1F582 { background-position: -680px -60px; } -.emoji-1F583 { background-position: -680px -80px; } -.emoji-1F585 { background-position: -680px -100px; } -.emoji-1F586 { background-position: -680px -120px; } -.emoji-1F587 { background-position: -680px -140px; } -.emoji-1F588 { background-position: -680px -160px; } -.emoji-1F589 { background-position: -680px -180px; } -.emoji-1F58A { background-position: -680px -200px; } -.emoji-1F58B { background-position: -680px -220px; } -.emoji-1F58C { background-position: -680px -240px; } -.emoji-1F58D { background-position: -680px -260px; } -.emoji-1F58E { background-position: -680px -280px; } -.emoji-1F58F { background-position: -680px -300px; } -.emoji-1F590 { background-position: -680px -320px; } -.emoji-1F590-1F3FB { background-position: -680px -340px; } -.emoji-1F590-1F3FC { background-position: -680px -360px; } -.emoji-1F590-1F3FD { background-position: -680px -380px; } -.emoji-1F590-1F3FE { background-position: -680px -400px; } -.emoji-1F590-1F3FF { background-position: -680px -420px; } -.emoji-1F591 { background-position: -680px -440px; } -.emoji-1F592 { background-position: -680px -460px; } -.emoji-1F593 { background-position: -680px -480px; } -.emoji-1F594 { background-position: -680px -500px; } -.emoji-1F595 { background-position: -680px -520px; } -.emoji-1F595-1F3FB { background-position: -680px -540px; } -.emoji-1F595-1F3FC { background-position: -680px -560px; } -.emoji-1F595-1F3FD { background-position: -680px -580px; } -.emoji-1F595-1F3FE { background-position: -680px -600px; } -.emoji-1F595-1F3FF { background-position: -680px -620px; } -.emoji-1F596 { background-position: -680px -640px; } -.emoji-1F596-1F3FB { background-position: -680px -660px; } -.emoji-1F596-1F3FC { background-position: 0 -680px; } -.emoji-1F596-1F3FD { background-position: -20px -680px; } -.emoji-1F596-1F3FE { background-position: -40px -680px; } -.emoji-1F596-1F3FF { background-position: -60px -680px; } -.emoji-1F597 { background-position: -80px -680px; } -.emoji-1F598 { background-position: -100px -680px; } -.emoji-1F599 { background-position: -120px -680px; } -.emoji-1F59E { background-position: -140px -680px; } -.emoji-1F59F { background-position: -160px -680px; } -.emoji-1F5A5 { background-position: -180px -680px; } -.emoji-1F5A6 { background-position: -200px -680px; } -.emoji-1F5A7 { background-position: -220px -680px; } -.emoji-1F5A8 { background-position: -240px -680px; } -.emoji-1F5A9 { background-position: -260px -680px; } -.emoji-1F5AA { background-position: -280px -680px; } -.emoji-1F5AB { background-position: -300px -680px; } -.emoji-1F5AD { background-position: -320px -680px; } -.emoji-1F5AE { background-position: -340px -680px; } -.emoji-1F5AF { background-position: -360px -680px; } -.emoji-1F5B1 { background-position: -380px -680px; } -.emoji-1F5B2 { background-position: -400px -680px; } -.emoji-1F5B3 { background-position: -420px -680px; } -.emoji-1F5B4 { background-position: -440px -680px; } -.emoji-1F5B8 { background-position: -460px -680px; } -.emoji-1F5B9 { background-position: -480px -680px; } -.emoji-1F5BC { background-position: -500px -680px; } -.emoji-1F5BD { background-position: -520px -680px; } -.emoji-1F5BE { background-position: -540px -680px; } -.emoji-1F5C0 { background-position: -560px -680px; } -.emoji-1F5C1 { background-position: -580px -680px; } -.emoji-1F5C2 { background-position: -600px -680px; } -.emoji-1F5C3 { background-position: -620px -680px; } -.emoji-1F5C4 { background-position: -640px -680px; } -.emoji-1F5C6 { background-position: -660px -680px; } -.emoji-1F5C7 { background-position: -680px -680px; } -.emoji-1F5C9 { background-position: -700px 0; } -.emoji-1F5CA { background-position: -700px -20px; } -.emoji-1F5CE { background-position: -700px -40px; } -.emoji-1F5CF { background-position: -700px -60px; } -.emoji-1F5D0 { background-position: -700px -80px; } -.emoji-1F5D1 { background-position: -700px -100px; } -.emoji-1F5D2 { background-position: -700px -120px; } -.emoji-1F5D3 { background-position: -700px -140px; } -.emoji-1F5D4 { background-position: -700px -160px; } -.emoji-1F5D8 { background-position: -700px -180px; } -.emoji-1F5D9 { background-position: -700px -200px; } -.emoji-1F5DC { background-position: -700px -220px; } -.emoji-1F5DD { background-position: -700px -240px; } -.emoji-1F5DE { background-position: -700px -260px; } -.emoji-1F5E0 { background-position: -700px -280px; } -.emoji-1F5E1 { background-position: -700px -300px; } -.emoji-1F5E2 { background-position: -700px -320px; } -.emoji-1F5E3 { background-position: -700px -340px; } -.emoji-1F5E8 { background-position: -700px -360px; } -.emoji-1F5E9 { background-position: -700px -380px; } -.emoji-1F5EA { background-position: -700px -400px; } -.emoji-1F5EB { background-position: -700px -420px; } -.emoji-1F5EC { background-position: -700px -440px; } -.emoji-1F5ED { background-position: -700px -460px; } -.emoji-1F5EE { background-position: -700px -480px; } -.emoji-1F5EF { background-position: -700px -500px; } -.emoji-1F5F0 { background-position: -700px -520px; } -.emoji-1F5F1 { background-position: -700px -540px; } -.emoji-1F5F2 { background-position: -700px -560px; } -.emoji-1F5F3 { background-position: -700px -580px; } -.emoji-1F5F4 { background-position: -700px -600px; } -.emoji-1F5F5 { background-position: -700px -620px; } -.emoji-1F5F8 { background-position: -700px -640px; } -.emoji-1F5F9 { background-position: -700px -660px; } -.emoji-1F5FA { background-position: -700px -680px; } -.emoji-1F5FB { background-position: 0 -700px; } -.emoji-1F5FC { background-position: -20px -700px; } -.emoji-1F5FD { background-position: -40px -700px; } -.emoji-1F5FE { background-position: -60px -700px; } -.emoji-1F5FF { background-position: -80px -700px; } -.emoji-1F600 { background-position: -100px -700px; } -.emoji-1F601 { background-position: -120px -700px; } -.emoji-1F602 { background-position: -140px -700px; } -.emoji-1F603 { background-position: -160px -700px; } -.emoji-1F604 { background-position: -180px -700px; } -.emoji-1F605 { background-position: -200px -700px; } -.emoji-1F606 { background-position: -220px -700px; } -.emoji-1F607 { background-position: -240px -700px; } -.emoji-1F608 { background-position: -260px -700px; } -.emoji-1F609 { background-position: -280px -700px; } -.emoji-1F60A { background-position: -300px -700px; } -.emoji-1F60B { background-position: -320px -700px; } -.emoji-1F60C { background-position: -340px -700px; } -.emoji-1F60D { background-position: -360px -700px; } -.emoji-1F60E { background-position: -380px -700px; } -.emoji-1F60F { background-position: -400px -700px; } -.emoji-1F610 { background-position: -420px -700px; } -.emoji-1F611 { background-position: -440px -700px; } -.emoji-1F612 { background-position: -460px -700px; } -.emoji-1F613 { background-position: -480px -700px; } -.emoji-1F614 { background-position: -500px -700px; } -.emoji-1F615 { background-position: -520px -700px; } -.emoji-1F616 { background-position: -540px -700px; } -.emoji-1F617 { background-position: -560px -700px; } -.emoji-1F618 { background-position: -580px -700px; } -.emoji-1F619 { background-position: -600px -700px; } -.emoji-1F61A { background-position: -620px -700px; } -.emoji-1F61B { background-position: -640px -700px; } -.emoji-1F61C { background-position: -660px -700px; } -.emoji-1F61D { background-position: -680px -700px; } -.emoji-1F61E { background-position: -700px -700px; } -.emoji-1F61F { background-position: -720px 0; } -.emoji-1F620 { background-position: -720px -20px; } -.emoji-1F621 { background-position: -720px -40px; } -.emoji-1F622 { background-position: -720px -60px; } -.emoji-1F623 { background-position: -720px -80px; } -.emoji-1F624 { background-position: -720px -100px; } -.emoji-1F625 { background-position: -720px -120px; } -.emoji-1F626 { background-position: -720px -140px; } -.emoji-1F627 { background-position: -720px -160px; } -.emoji-1F628 { background-position: -720px -180px; } -.emoji-1F629 { background-position: -720px -200px; } -.emoji-1F62A { background-position: -720px -220px; } -.emoji-1F62B { background-position: -720px -240px; } -.emoji-1F62C { background-position: -720px -260px; } -.emoji-1F62D { background-position: -720px -280px; } -.emoji-1F62E { background-position: -720px -300px; } -.emoji-1F62F { background-position: -720px -320px; } -.emoji-1F630 { background-position: -720px -340px; } -.emoji-1F631 { background-position: -720px -360px; } -.emoji-1F632 { background-position: -720px -380px; } -.emoji-1F633 { background-position: -720px -400px; } -.emoji-1F634 { background-position: -720px -420px; } -.emoji-1F635 { background-position: -720px -440px; } -.emoji-1F636 { background-position: -720px -460px; } -.emoji-1F637 { background-position: -720px -480px; } -.emoji-1F638 { background-position: -720px -500px; } -.emoji-1F639 { background-position: -720px -520px; } -.emoji-1F63A { background-position: -720px -540px; } -.emoji-1F63B { background-position: -720px -560px; } -.emoji-1F63C { background-position: -720px -580px; } -.emoji-1F63D { background-position: -720px -600px; } -.emoji-1F63E { background-position: -720px -620px; } -.emoji-1F63F { background-position: -720px -640px; } -.emoji-1F640 { background-position: -720px -660px; } -.emoji-1F641 { background-position: -720px -680px; } -.emoji-1F642 { background-position: -720px -700px; } -.emoji-1F643 { background-position: 0 -720px; } -.emoji-1F644 { background-position: -20px -720px; } -.emoji-1F645 { background-position: -40px -720px; } -.emoji-1F645-1F3FB { background-position: -60px -720px; } -.emoji-1F645-1F3FC { background-position: -80px -720px; } -.emoji-1F645-1F3FD { background-position: -100px -720px; } -.emoji-1F645-1F3FE { background-position: -120px -720px; } -.emoji-1F645-1F3FF { background-position: -140px -720px; } -.emoji-1F646 { background-position: -160px -720px; } -.emoji-1F646-1F3FB { background-position: -180px -720px; } -.emoji-1F646-1F3FC { background-position: -200px -720px; } -.emoji-1F646-1F3FD { background-position: -220px -720px; } -.emoji-1F646-1F3FE { background-position: -240px -720px; } -.emoji-1F646-1F3FF { background-position: -260px -720px; } -.emoji-1F647 { background-position: -280px -720px; } -.emoji-1F647-1F3FB { background-position: -300px -720px; } -.emoji-1F647-1F3FC { background-position: -320px -720px; } -.emoji-1F647-1F3FD { background-position: -340px -720px; } -.emoji-1F647-1F3FE { background-position: -360px -720px; } -.emoji-1F647-1F3FF { background-position: -380px -720px; } -.emoji-1F648 { background-position: -400px -720px; } -.emoji-1F649 { background-position: -420px -720px; } -.emoji-1F64A { background-position: -440px -720px; } -.emoji-1F64B { background-position: -460px -720px; } -.emoji-1F64B-1F3FB { background-position: -480px -720px; } -.emoji-1F64B-1F3FC { background-position: -500px -720px; } -.emoji-1F64B-1F3FD { background-position: -520px -720px; } -.emoji-1F64B-1F3FE { background-position: -540px -720px; } -.emoji-1F64B-1F3FF { background-position: -560px -720px; } -.emoji-1F64C { background-position: -580px -720px; } -.emoji-1F64C-1F3FB { background-position: -600px -720px; } -.emoji-1F64C-1F3FC { background-position: -620px -720px; } -.emoji-1F64C-1F3FD { background-position: -640px -720px; } -.emoji-1F64C-1F3FE { background-position: -660px -720px; } -.emoji-1F64C-1F3FF { background-position: -680px -720px; } -.emoji-1F64D { background-position: -700px -720px; } -.emoji-1F64D-1F3FB { background-position: -720px -720px; } -.emoji-1F64D-1F3FC { background-position: -740px 0; } -.emoji-1F64D-1F3FD { background-position: -740px -20px; } -.emoji-1F64D-1F3FE { background-position: -740px -40px; } -.emoji-1F64D-1F3FF { background-position: -740px -60px; } -.emoji-1F64E { background-position: -740px -80px; } -.emoji-1F64E-1F3FB { background-position: -740px -100px; } -.emoji-1F64E-1F3FC { background-position: -740px -120px; } -.emoji-1F64E-1F3FD { background-position: -740px -140px; } -.emoji-1F64E-1F3FE { background-position: -740px -160px; } -.emoji-1F64E-1F3FF { background-position: -740px -180px; } -.emoji-1F64F { background-position: -740px -200px; } -.emoji-1F64F-1F3FB { background-position: -740px -220px; } -.emoji-1F64F-1F3FC { background-position: -740px -240px; } -.emoji-1F64F-1F3FD { background-position: -740px -260px; } -.emoji-1F64F-1F3FE { background-position: -740px -280px; } -.emoji-1F64F-1F3FF { background-position: -740px -300px; } -.emoji-1F680 { background-position: -740px -320px; } -.emoji-1F681 { background-position: -740px -340px; } -.emoji-1F682 { background-position: -740px -360px; } -.emoji-1F683 { background-position: -740px -380px; } -.emoji-1F684 { background-position: -740px -400px; } -.emoji-1F685 { background-position: -740px -420px; } -.emoji-1F686 { background-position: -740px -440px; } -.emoji-1F687 { background-position: -740px -460px; } -.emoji-1F688 { background-position: -740px -480px; } -.emoji-1F689 { background-position: -740px -500px; } -.emoji-1F68A { background-position: -740px -520px; } -.emoji-1F68B { background-position: -740px -540px; } -.emoji-1F68C { background-position: -740px -560px; } -.emoji-1F68D { background-position: -740px -580px; } -.emoji-1F68E { background-position: -740px -600px; } -.emoji-1F68F { background-position: -740px -620px; } -.emoji-1F690 { background-position: -740px -640px; } -.emoji-1F691 { background-position: -740px -660px; } -.emoji-1F692 { background-position: -740px -680px; } -.emoji-1F693 { background-position: -740px -700px; } -.emoji-1F694 { background-position: -740px -720px; } -.emoji-1F695 { background-position: 0 -740px; } -.emoji-1F696 { background-position: -20px -740px; } -.emoji-1F697 { background-position: -40px -740px; } -.emoji-1F698 { background-position: -60px -740px; } -.emoji-1F699 { background-position: -80px -740px; } -.emoji-1F69A { background-position: -100px -740px; } -.emoji-1F69B { background-position: -120px -740px; } -.emoji-1F69C { background-position: -140px -740px; } -.emoji-1F69D { background-position: -160px -740px; } -.emoji-1F69E { background-position: -180px -740px; } -.emoji-1F69F { background-position: -200px -740px; } -.emoji-1F6A0 { background-position: -220px -740px; } -.emoji-1F6A1 { background-position: -240px -740px; } -.emoji-1F6A2 { background-position: -260px -740px; } -.emoji-1F6A3 { background-position: -280px -740px; } -.emoji-1F6A3-1F3FB { background-position: -300px -740px; } -.emoji-1F6A3-1F3FC { background-position: -320px -740px; } -.emoji-1F6A3-1F3FD { background-position: -340px -740px; } -.emoji-1F6A3-1F3FE { background-position: -360px -740px; } -.emoji-1F6A3-1F3FF { background-position: -380px -740px; } -.emoji-1F6A4 { background-position: -400px -740px; } -.emoji-1F6A5 { background-position: -420px -740px; } -.emoji-1F6A6 { background-position: -440px -740px; } -.emoji-1F6A7 { background-position: -460px -740px; } -.emoji-1F6A8 { background-position: -480px -740px; } -.emoji-1F6A9 { background-position: -500px -740px; } -.emoji-1F6AA { background-position: -520px -740px; } -.emoji-1F6AB { background-position: -540px -740px; } -.emoji-1F6AC { background-position: -560px -740px; } -.emoji-1F6AD { background-position: -580px -740px; } -.emoji-1F6AE { background-position: -600px -740px; } -.emoji-1F6AF { background-position: -620px -740px; } -.emoji-1F6B0 { background-position: -640px -740px; } -.emoji-1F6B1 { background-position: -660px -740px; } -.emoji-1F6B2 { background-position: -680px -740px; } -.emoji-1F6B3 { background-position: -700px -740px; } -.emoji-1F6B4 { background-position: -720px -740px; } -.emoji-1F6B4-1F3FB { background-position: -740px -740px; } -.emoji-1F6B4-1F3FC { background-position: -760px 0; } -.emoji-1F6B4-1F3FD { background-position: -760px -20px; } -.emoji-1F6B4-1F3FE { background-position: -760px -40px; } -.emoji-1F6B4-1F3FF { background-position: -760px -60px; } -.emoji-1F6B5 { background-position: -760px -80px; } -.emoji-1F6B5-1F3FB { background-position: -760px -100px; } -.emoji-1F6B5-1F3FC { background-position: -760px -120px; } -.emoji-1F6B5-1F3FD { background-position: -760px -140px; } -.emoji-1F6B5-1F3FE { background-position: -760px -160px; } -.emoji-1F6B5-1F3FF { background-position: -760px -180px; } -.emoji-1F6B6 { background-position: -760px -200px; } -.emoji-1F6B6-1F3FB { background-position: -760px -220px; } -.emoji-1F6B6-1F3FC { background-position: -760px -240px; } -.emoji-1F6B6-1F3FD { background-position: -760px -260px; } -.emoji-1F6B6-1F3FE { background-position: -760px -280px; } -.emoji-1F6B6-1F3FF { background-position: -760px -300px; } -.emoji-1F6B7 { background-position: -760px -320px; } -.emoji-1F6B8 { background-position: -760px -340px; } -.emoji-1F6B9 { background-position: -760px -360px; } -.emoji-1F6BA { background-position: -760px -380px; } -.emoji-1F6BB { background-position: -760px -400px; } -.emoji-1F6BC { background-position: -760px -420px; } -.emoji-1F6BD { background-position: -760px -440px; } -.emoji-1F6BE { background-position: -760px -460px; } -.emoji-1F6BF { background-position: -760px -480px; } -.emoji-1F6C0 { background-position: -760px -500px; } -.emoji-1F6C0-1F3FB { background-position: -760px -520px; } -.emoji-1F6C0-1F3FC { background-position: -760px -540px; } -.emoji-1F6C0-1F3FD { background-position: -760px -560px; } -.emoji-1F6C0-1F3FE { background-position: -760px -580px; } -.emoji-1F6C0-1F3FF { background-position: -760px -600px; } -.emoji-1F6C1 { background-position: -760px -620px; } -.emoji-1F6C2 { background-position: -760px -640px; } -.emoji-1F6C3 { background-position: -760px -660px; } -.emoji-1F6C4 { background-position: -760px -680px; } -.emoji-1F6C5 { background-position: -760px -700px; } -.emoji-1F6C6 { background-position: -760px -720px; } -.emoji-1F6C7 { background-position: -760px -740px; } -.emoji-1F6C8 { background-position: 0 -760px; } -.emoji-1F6C9 { background-position: -20px -760px; } -.emoji-1F6CA { background-position: -40px -760px; } -.emoji-1F6CB { background-position: -60px -760px; } -.emoji-1F6CC { background-position: -80px -760px; } -.emoji-1F6CD { background-position: -100px -760px; } -.emoji-1F6CE { background-position: -120px -760px; } -.emoji-1F6CF { background-position: -140px -760px; } -.emoji-1F6D0 { background-position: -160px -760px; } -.emoji-1F6E0 { background-position: -180px -760px; } -.emoji-1F6E1 { background-position: -200px -760px; } -.emoji-1F6E2 { background-position: -220px -760px; } -.emoji-1F6E3 { background-position: -240px -760px; } -.emoji-1F6E4 { background-position: -260px -760px; } -.emoji-1F6E5 { background-position: -280px -760px; } -.emoji-1F6E6 { background-position: -300px -760px; } -.emoji-1F6E7 { background-position: -320px -760px; } -.emoji-1F6E8 { background-position: -340px -760px; } -.emoji-1F6E9 { background-position: -360px -760px; } -.emoji-1F6EA { background-position: -380px -760px; } -.emoji-1F6EB { background-position: -400px -760px; } -.emoji-1F6EC { background-position: -420px -760px; } -.emoji-1F6F0 { background-position: -440px -760px; } -.emoji-1F6F1 { background-position: -460px -760px; } -.emoji-1F6F2 { background-position: -480px -760px; } -.emoji-1F6F3 { background-position: -500px -760px; } -.emoji-1F910 { background-position: -520px -760px; } -.emoji-1F911 { background-position: -540px -760px; } -.emoji-1F912 { background-position: -560px -760px; } -.emoji-1F913 { background-position: -580px -760px; } -.emoji-1F914 { background-position: -600px -760px; } -.emoji-1F915 { background-position: -620px -760px; } -.emoji-1F916 { background-position: -640px -760px; } -.emoji-1F917 { background-position: -660px -760px; } -.emoji-1F918 { background-position: -680px -760px; } -.emoji-1F918-1F3FB { background-position: -700px -760px; } -.emoji-1F918-1F3FC { background-position: -720px -760px; } -.emoji-1F918-1F3FD { background-position: -740px -760px; } -.emoji-1F918-1F3FE { background-position: -760px -760px; } -.emoji-1F918-1F3FF { background-position: -780px 0; } -.emoji-1F980 { background-position: -780px -20px; } -.emoji-1F981 { background-position: -780px -40px; } -.emoji-1F982 { background-position: -780px -60px; } -.emoji-1F983 { background-position: -780px -80px; } -.emoji-1F984 { background-position: -780px -100px; } -.emoji-1F9C0 { background-position: -780px -120px; } -.emoji-203C { background-position: -780px -140px; } -.emoji-2049 { background-position: -780px -160px; } -.emoji-2122 { background-position: -780px -180px; } -.emoji-2139 { background-position: -780px -200px; } -.emoji-2194 { background-position: -780px -220px; } -.emoji-2195 { background-position: -780px -240px; } -.emoji-2196 { background-position: -780px -260px; } -.emoji-2197 { background-position: -780px -280px; } -.emoji-2198 { background-position: -780px -300px; } -.emoji-2199 { background-position: -780px -320px; } -.emoji-21A9 { background-position: -780px -340px; } -.emoji-21AA { background-position: -780px -360px; } -.emoji-231A { background-position: -780px -380px; } -.emoji-231B { background-position: -780px -400px; } -.emoji-2328 { background-position: -780px -420px; } -.emoji-23E9 { background-position: -780px -440px; } -.emoji-23EA { background-position: -780px -460px; } -.emoji-23EB { background-position: -780px -480px; } -.emoji-23EC { background-position: -780px -500px; } -.emoji-23ED { background-position: -780px -520px; } -.emoji-23EE { background-position: -780px -540px; } -.emoji-23EF { background-position: -780px -560px; } -.emoji-23F0 { background-position: -780px -580px; } -.emoji-23F1 { background-position: -780px -600px; } -.emoji-23F2 { background-position: -780px -620px; } -.emoji-23F3 { background-position: -780px -640px; } -.emoji-23F8 { background-position: -780px -660px; } -.emoji-23F9 { background-position: -780px -680px; } -.emoji-23FA { background-position: -780px -700px; } -.emoji-24C2 { background-position: -780px -720px; } -.emoji-25AA { background-position: -780px -740px; } -.emoji-25AB { background-position: -780px -760px; } -.emoji-25B6 { background-position: 0 -780px; } -.emoji-25C0 { background-position: -20px -780px; } -.emoji-25FB { background-position: -40px -780px; } -.emoji-25FC { background-position: -60px -780px; } -.emoji-25FD { background-position: -80px -780px; } -.emoji-25FE { background-position: -100px -780px; } -.emoji-2600 { background-position: -120px -780px; } -.emoji-2601 { background-position: -140px -780px; } -.emoji-2602 { background-position: -160px -780px; } -.emoji-2603 { background-position: -180px -780px; } -.emoji-2604 { background-position: -200px -780px; } -.emoji-260E { background-position: -220px -780px; } -.emoji-2611 { background-position: -240px -780px; } -.emoji-2614 { background-position: -260px -780px; } -.emoji-2615 { background-position: -280px -780px; } -.emoji-2618 { background-position: -300px -780px; } -.emoji-261D { background-position: -320px -780px; } -.emoji-261D-1F3FB { background-position: -340px -780px; } -.emoji-261D-1F3FC { background-position: -360px -780px; } -.emoji-261D-1F3FD { background-position: -380px -780px; } -.emoji-261D-1F3FE { background-position: -400px -780px; } -.emoji-261D-1F3FF { background-position: -420px -780px; } -.emoji-2620 { background-position: -440px -780px; } -.emoji-2622 { background-position: -460px -780px; } -.emoji-2623 { background-position: -480px -780px; } -.emoji-2626 { background-position: -500px -780px; } -.emoji-262A { background-position: -520px -780px; } -.emoji-262E { background-position: -540px -780px; } -.emoji-262F { background-position: -560px -780px; } -.emoji-2638 { background-position: -580px -780px; } -.emoji-2639 { background-position: -600px -780px; } -.emoji-263A { background-position: -620px -780px; } -.emoji-2648 { background-position: -640px -780px; } -.emoji-2649 { background-position: -660px -780px; } -.emoji-264A { background-position: -680px -780px; } -.emoji-264B { background-position: -700px -780px; } -.emoji-264C { background-position: -720px -780px; } -.emoji-264D { background-position: -740px -780px; } -.emoji-264E { background-position: -760px -780px; } -.emoji-264F { background-position: -780px -780px; } -.emoji-2650 { background-position: -800px 0; } -.emoji-2651 { background-position: -800px -20px; } -.emoji-2652 { background-position: -800px -40px; } -.emoji-2653 { background-position: -800px -60px; } -.emoji-2660 { background-position: -800px -80px; } -.emoji-2663 { background-position: -800px -100px; } -.emoji-2665 { background-position: -800px -120px; } -.emoji-2666 { background-position: -800px -140px; } -.emoji-2668 { background-position: -800px -160px; } -.emoji-267B { background-position: -800px -180px; } -.emoji-267F { background-position: -800px -200px; } -.emoji-2692 { background-position: -800px -220px; } -.emoji-2693 { background-position: -800px -240px; } -.emoji-2694 { background-position: -800px -260px; } -.emoji-2696 { background-position: -800px -280px; } -.emoji-2697 { background-position: -800px -300px; } -.emoji-2699 { background-position: -800px -320px; } -.emoji-269B { background-position: -800px -340px; } -.emoji-269C { background-position: -800px -360px; } -.emoji-26A0 { background-position: -800px -380px; } -.emoji-26A1 { background-position: -800px -400px; } -.emoji-26AA { background-position: -800px -420px; } -.emoji-26AB { background-position: -800px -440px; } -.emoji-26B0 { background-position: -800px -460px; } -.emoji-26B1 { background-position: -800px -480px; } -.emoji-26BD { background-position: -800px -500px; } -.emoji-26BE { background-position: -800px -520px; } -.emoji-26C4 { background-position: -800px -540px; } -.emoji-26C5 { background-position: -800px -560px; } -.emoji-26C8 { background-position: -800px -580px; } -.emoji-26CE { background-position: -800px -600px; } -.emoji-26CF { background-position: -800px -620px; } -.emoji-26D1 { background-position: -800px -640px; } -.emoji-26D3 { background-position: -800px -660px; } -.emoji-26D4 { background-position: -800px -680px; } -.emoji-26E9 { background-position: -800px -700px; } -.emoji-26EA { background-position: -800px -720px; } -.emoji-26F0 { background-position: -800px -740px; } -.emoji-26F1 { background-position: -800px -760px; } -.emoji-26F2 { background-position: -800px -780px; } -.emoji-26F3 { background-position: 0 -800px; } -.emoji-26F4 { background-position: -20px -800px; } -.emoji-26F5 { background-position: -40px -800px; } -.emoji-26F7 { background-position: -60px -800px; } -.emoji-26F8 { background-position: -80px -800px; } -.emoji-26F9 { background-position: -100px -800px; } -.emoji-26F9-1F3FB { background-position: -120px -800px; } -.emoji-26F9-1F3FC { background-position: -140px -800px; } -.emoji-26F9-1F3FD { background-position: -160px -800px; } -.emoji-26F9-1F3FE { background-position: -180px -800px; } -.emoji-26F9-1F3FF { background-position: -200px -800px; } -.emoji-26FA { background-position: -220px -800px; } -.emoji-26FD { background-position: -240px -800px; } -.emoji-2702 { background-position: -260px -800px; } -.emoji-2705 { background-position: -280px -800px; } -.emoji-2708 { background-position: -300px -800px; } -.emoji-2709 { background-position: -320px -800px; } -.emoji-270A { background-position: -340px -800px; } -.emoji-270A-1F3FB { background-position: -360px -800px; } -.emoji-270A-1F3FC { background-position: -380px -800px; } -.emoji-270A-1F3FD { background-position: -400px -800px; } -.emoji-270A-1F3FE { background-position: -420px -800px; } -.emoji-270A-1F3FF { background-position: -440px -800px; } -.emoji-270B { background-position: -460px -800px; } -.emoji-270B-1F3FB { background-position: -480px -800px; } -.emoji-270B-1F3FC { background-position: -500px -800px; } -.emoji-270B-1F3FD { background-position: -520px -800px; } -.emoji-270B-1F3FE { background-position: -540px -800px; } -.emoji-270B-1F3FF { background-position: -560px -800px; } -.emoji-270C { background-position: -580px -800px; } -.emoji-270C-1F3FB { background-position: -600px -800px; } -.emoji-270C-1F3FC { background-position: -620px -800px; } -.emoji-270C-1F3FD { background-position: -640px -800px; } -.emoji-270C-1F3FE { background-position: -660px -800px; } -.emoji-270C-1F3FF { background-position: -680px -800px; } -.emoji-270D { background-position: -700px -800px; } -.emoji-270D-1F3FB { background-position: -720px -800px; } -.emoji-270D-1F3FC { background-position: -740px -800px; } -.emoji-270D-1F3FD { background-position: -760px -800px; } -.emoji-270D-1F3FE { background-position: -780px -800px; } -.emoji-270D-1F3FF { background-position: -800px -800px; } -.emoji-270F { background-position: -820px 0; } -.emoji-2712 { background-position: -820px -20px; } -.emoji-2714 { background-position: -820px -40px; } -.emoji-2716 { background-position: -820px -60px; } -.emoji-271D { background-position: -820px -80px; } -.emoji-2721 { background-position: -820px -100px; } -.emoji-2728 { background-position: -820px -120px; } -.emoji-2733 { background-position: -820px -140px; } -.emoji-2734 { background-position: -820px -160px; } -.emoji-2744 { background-position: -820px -180px; } -.emoji-2747 { background-position: -820px -200px; } -.emoji-274C { background-position: -820px -220px; } -.emoji-274E { background-position: -820px -240px; } -.emoji-2753 { background-position: -820px -260px; } -.emoji-2754 { background-position: -820px -280px; } -.emoji-2755 { background-position: -820px -300px; } -.emoji-2757 { background-position: -820px -320px; } -.emoji-2763 { background-position: -820px -340px; } -.emoji-2764 { background-position: -820px -360px; } -.emoji-2795 { background-position: -820px -380px; } -.emoji-2796 { background-position: -820px -400px; } -.emoji-2797 { background-position: -820px -420px; } -.emoji-27A1 { background-position: -820px -440px; } -.emoji-27B0 { background-position: -820px -460px; } -.emoji-27BF { background-position: -820px -480px; } -.emoji-2934 { background-position: -820px -500px; } -.emoji-2935 { background-position: -820px -520px; } -.emoji-2B05 { background-position: -820px -540px; } -.emoji-2B06 { background-position: -820px -560px; } -.emoji-2B07 { background-position: -820px -580px; } -.emoji-2B1B { background-position: -820px -600px; } -.emoji-2B1C { background-position: -820px -620px; } -.emoji-2B50 { background-position: -820px -640px; } -.emoji-2B55 { background-position: -820px -660px; } -.emoji-3030 { background-position: -820px -680px; } -.emoji-303D { background-position: -820px -700px; } -.emoji-3297 { background-position: -820px -720px; } -.emoji-3299 { background-position: -820px -740px; } +.emoji-1F396 { background-position: -420px -260px; } +.emoji-1F397 { background-position: -420px -280px; } +.emoji-1F399 { background-position: -420px -300px; } +.emoji-1F39A { background-position: -420px -320px; } +.emoji-1F39B { background-position: -420px -340px; } +.emoji-1F39E { background-position: -420px -360px; } +.emoji-1F39F { background-position: -420px -380px; } +.emoji-1F3A0 { background-position: -420px -400px; } +.emoji-1F3A1 { background-position: 0 -420px; } +.emoji-1F3A2 { background-position: -20px -420px; } +.emoji-1F3A3 { background-position: -40px -420px; } +.emoji-1F3A4 { background-position: -60px -420px; } +.emoji-1F3A5 { background-position: -80px -420px; } +.emoji-1F3A6 { background-position: -100px -420px; } +.emoji-1F3A7 { background-position: -120px -420px; } +.emoji-1F3A8 { background-position: -140px -420px; } +.emoji-1F3A9 { background-position: -160px -420px; } +.emoji-1F3AA { background-position: -180px -420px; } +.emoji-1F3AB { background-position: -200px -420px; } +.emoji-1F3AC { background-position: -220px -420px; } +.emoji-1F3AD { background-position: -240px -420px; } +.emoji-1F3AE { background-position: -260px -420px; } +.emoji-1F3AF { background-position: -280px -420px; } +.emoji-1F3B0 { background-position: -300px -420px; } +.emoji-1F3B1 { background-position: -320px -420px; } +.emoji-1F3B2 { background-position: -340px -420px; } +.emoji-1F3B3 { background-position: -360px -420px; } +.emoji-1F3B4 { background-position: -380px -420px; } +.emoji-1F3B5 { background-position: -400px -420px; } +.emoji-1F3B6 { background-position: -420px -420px; } +.emoji-1F3B7 { background-position: -440px 0; } +.emoji-1F3B8 { background-position: -440px -20px; } +.emoji-1F3B9 { background-position: -440px -40px; } +.emoji-1F3BA { background-position: -440px -60px; } +.emoji-1F3BB { background-position: -440px -80px; } +.emoji-1F3BC { background-position: -440px -100px; } +.emoji-1F3BD { background-position: -440px -120px; } +.emoji-1F3BE { background-position: -440px -140px; } +.emoji-1F3BF { background-position: -440px -160px; } +.emoji-1F3C0 { background-position: -440px -180px; } +.emoji-1F3C1 { background-position: -440px -200px; } +.emoji-1F3C2 { background-position: -440px -220px; } +.emoji-1F3C3 { background-position: -440px -240px; } +.emoji-1F3C3-1F3FB { background-position: -440px -260px; } +.emoji-1F3C3-1F3FC { background-position: -440px -280px; } +.emoji-1F3C3-1F3FD { background-position: -440px -300px; } +.emoji-1F3C3-1F3FE { background-position: -440px -320px; } +.emoji-1F3C3-1F3FF { background-position: -440px -340px; } +.emoji-1F3C4 { background-position: -440px -360px; } +.emoji-1F3C4-1F3FB { background-position: -440px -380px; } +.emoji-1F3C4-1F3FC { background-position: -440px -400px; } +.emoji-1F3C4-1F3FD { background-position: -440px -420px; } +.emoji-1F3C4-1F3FE { background-position: 0 -440px; } +.emoji-1F3C4-1F3FF { background-position: -20px -440px; } +.emoji-1F3C5 { background-position: -40px -440px; } +.emoji-1F3C6 { background-position: -60px -440px; } +.emoji-1F3C7 { background-position: -80px -440px; } +.emoji-1F3C7-1F3FB { background-position: -100px -440px; } +.emoji-1F3C7-1F3FC { background-position: -120px -440px; } +.emoji-1F3C7-1F3FD { background-position: -140px -440px; } +.emoji-1F3C7-1F3FE { background-position: -160px -440px; } +.emoji-1F3C7-1F3FF { background-position: -180px -440px; } +.emoji-1F3C8 { background-position: -200px -440px; } +.emoji-1F3C9 { background-position: -220px -440px; } +.emoji-1F3CA { background-position: -240px -440px; } +.emoji-1F3CA-1F3FB { background-position: -260px -440px; } +.emoji-1F3CA-1F3FC { background-position: -280px -440px; } +.emoji-1F3CA-1F3FD { background-position: -300px -440px; } +.emoji-1F3CA-1F3FE { background-position: -320px -440px; } +.emoji-1F3CA-1F3FF { background-position: -340px -440px; } +.emoji-1F3CB { background-position: -360px -440px; } +.emoji-1F3CB-1F3FB { background-position: -380px -440px; } +.emoji-1F3CB-1F3FC { background-position: -400px -440px; } +.emoji-1F3CB-1F3FD { background-position: -420px -440px; } +.emoji-1F3CB-1F3FE { background-position: -440px -440px; } +.emoji-1F3CB-1F3FF { background-position: -460px 0; } +.emoji-1F3CC { background-position: -460px -20px; } +.emoji-1F3CD { background-position: -460px -40px; } +.emoji-1F3CE { background-position: -460px -60px; } +.emoji-1F3CF { background-position: -460px -80px; } +.emoji-1F3D0 { background-position: -460px -100px; } +.emoji-1F3D1 { background-position: -460px -120px; } +.emoji-1F3D2 { background-position: -460px -140px; } +.emoji-1F3D3 { background-position: -460px -160px; } +.emoji-1F3D4 { background-position: -460px -180px; } +.emoji-1F3D5 { background-position: -460px -200px; } +.emoji-1F3D6 { background-position: -460px -220px; } +.emoji-1F3D7 { background-position: -460px -240px; } +.emoji-1F3D8 { background-position: -460px -260px; } +.emoji-1F3D9 { background-position: -460px -280px; } +.emoji-1F3DA { background-position: -460px -300px; } +.emoji-1F3DB { background-position: -460px -320px; } +.emoji-1F3DC { background-position: -460px -340px; } +.emoji-1F3DD { background-position: -460px -360px; } +.emoji-1F3DE { background-position: -460px -380px; } +.emoji-1F3DF { background-position: -460px -400px; } +.emoji-1F3E0 { background-position: -460px -420px; } +.emoji-1F3E1 { background-position: -460px -440px; } +.emoji-1F3E2 { background-position: 0 -460px; } +.emoji-1F3E3 { background-position: -20px -460px; } +.emoji-1F3E4 { background-position: -40px -460px; } +.emoji-1F3E5 { background-position: -60px -460px; } +.emoji-1F3E6 { background-position: -80px -460px; } +.emoji-1F3E7 { background-position: -100px -460px; } +.emoji-1F3E8 { background-position: -120px -460px; } +.emoji-1F3E9 { background-position: -140px -460px; } +.emoji-1F3EA { background-position: -160px -460px; } +.emoji-1F3EB { background-position: -180px -460px; } +.emoji-1F3EC { background-position: -200px -460px; } +.emoji-1F3ED { background-position: -220px -460px; } +.emoji-1F3EE { background-position: -240px -460px; } +.emoji-1F3EF { background-position: -260px -460px; } +.emoji-1F3F0 { background-position: -280px -460px; } +.emoji-1F3F3 { background-position: -300px -460px; } +.emoji-1F3F4 { background-position: -320px -460px; } +.emoji-1F3F5 { background-position: -340px -460px; } +.emoji-1F3F7 { background-position: -360px -460px; } +.emoji-1F3F8 { background-position: -380px -460px; } +.emoji-1F3F9 { background-position: -400px -460px; } +.emoji-1F3FA { background-position: -420px -460px; } +.emoji-1F3FB { background-position: -440px -460px; } +.emoji-1F3FC { background-position: -460px -460px; } +.emoji-1F3FD { background-position: -480px 0; } +.emoji-1F3FE { background-position: -480px -20px; } +.emoji-1F3FF { background-position: -480px -40px; } +.emoji-1F400 { background-position: -480px -60px; } +.emoji-1F401 { background-position: -480px -80px; } +.emoji-1F402 { background-position: -480px -100px; } +.emoji-1F403 { background-position: -480px -120px; } +.emoji-1F404 { background-position: -480px -140px; } +.emoji-1F405 { background-position: -480px -160px; } +.emoji-1F406 { background-position: -480px -180px; } +.emoji-1F407 { background-position: -480px -200px; } +.emoji-1F408 { background-position: -480px -220px; } +.emoji-1F409 { background-position: -480px -240px; } +.emoji-1F40A { background-position: -480px -260px; } +.emoji-1F40B { background-position: -480px -280px; } +.emoji-1F40C { background-position: -480px -300px; } +.emoji-1F40D { background-position: -480px -320px; } +.emoji-1F40E { background-position: -480px -340px; } +.emoji-1F40F { background-position: -480px -360px; } +.emoji-1F410 { background-position: -480px -380px; } +.emoji-1F411 { background-position: -480px -400px; } +.emoji-1F412 { background-position: -480px -420px; } +.emoji-1F413 { background-position: -480px -440px; } +.emoji-1F414 { background-position: -480px -460px; } +.emoji-1F415 { background-position: 0 -480px; } +.emoji-1F416 { background-position: -20px -480px; } +.emoji-1F417 { background-position: -40px -480px; } +.emoji-1F418 { background-position: -60px -480px; } +.emoji-1F419 { background-position: -80px -480px; } +.emoji-1F41A { background-position: -100px -480px; } +.emoji-1F41B { background-position: -120px -480px; } +.emoji-1F41C { background-position: -140px -480px; } +.emoji-1F41D { background-position: -160px -480px; } +.emoji-1F41E { background-position: -180px -480px; } +.emoji-1F41F { background-position: -200px -480px; } +.emoji-1F420 { background-position: -220px -480px; } +.emoji-1F421 { background-position: -240px -480px; } +.emoji-1F422 { background-position: -260px -480px; } +.emoji-1F423 { background-position: -280px -480px; } +.emoji-1F424 { background-position: -300px -480px; } +.emoji-1F425 { background-position: -320px -480px; } +.emoji-1F426 { background-position: -340px -480px; } +.emoji-1F427 { background-position: -360px -480px; } +.emoji-1F428 { background-position: -380px -480px; } +.emoji-1F429 { background-position: -400px -480px; } +.emoji-1F42A { background-position: -420px -480px; } +.emoji-1F42B { background-position: -440px -480px; } +.emoji-1F42C { background-position: -460px -480px; } +.emoji-1F42D { background-position: -480px -480px; } +.emoji-1F42E { background-position: -500px 0; } +.emoji-1F42F { background-position: -500px -20px; } +.emoji-1F430 { background-position: -500px -40px; } +.emoji-1F431 { background-position: -500px -60px; } +.emoji-1F432 { background-position: -500px -80px; } +.emoji-1F433 { background-position: -500px -100px; } +.emoji-1F434 { background-position: -500px -120px; } +.emoji-1F435 { background-position: -500px -140px; } +.emoji-1F436 { background-position: -500px -160px; } +.emoji-1F437 { background-position: -500px -180px; } +.emoji-1F438 { background-position: -500px -200px; } +.emoji-1F439 { background-position: -500px -220px; } +.emoji-1F43A { background-position: -500px -240px; } +.emoji-1F43B { background-position: -500px -260px; } +.emoji-1F43C { background-position: -500px -280px; } +.emoji-1F43D { background-position: -500px -300px; } +.emoji-1F43E { background-position: -500px -320px; } +.emoji-1F43F { background-position: -500px -340px; } +.emoji-1F440 { background-position: -500px -360px; } +.emoji-1F441 { background-position: -500px -380px; } +.emoji-1F441-1F5E8 { background-position: -500px -400px; } +.emoji-1F442 { background-position: -500px -420px; } +.emoji-1F442-1F3FB { background-position: -500px -440px; } +.emoji-1F442-1F3FC { background-position: -500px -460px; } +.emoji-1F442-1F3FD { background-position: -500px -480px; } +.emoji-1F442-1F3FE { background-position: 0 -500px; } +.emoji-1F442-1F3FF { background-position: -20px -500px; } +.emoji-1F443 { background-position: -40px -500px; } +.emoji-1F443-1F3FB { background-position: -60px -500px; } +.emoji-1F443-1F3FC { background-position: -80px -500px; } +.emoji-1F443-1F3FD { background-position: -100px -500px; } +.emoji-1F443-1F3FE { background-position: -120px -500px; } +.emoji-1F443-1F3FF { background-position: -140px -500px; } +.emoji-1F444 { background-position: -160px -500px; } +.emoji-1F445 { background-position: -180px -500px; } +.emoji-1F446 { background-position: -200px -500px; } +.emoji-1F446-1F3FB { background-position: -220px -500px; } +.emoji-1F446-1F3FC { background-position: -240px -500px; } +.emoji-1F446-1F3FD { background-position: -260px -500px; } +.emoji-1F446-1F3FE { background-position: -280px -500px; } +.emoji-1F446-1F3FF { background-position: -300px -500px; } +.emoji-1F447 { background-position: -320px -500px; } +.emoji-1F447-1F3FB { background-position: -340px -500px; } +.emoji-1F447-1F3FC { background-position: -360px -500px; } +.emoji-1F447-1F3FD { background-position: -380px -500px; } +.emoji-1F447-1F3FE { background-position: -400px -500px; } +.emoji-1F447-1F3FF { background-position: -420px -500px; } +.emoji-1F448 { background-position: -440px -500px; } +.emoji-1F448-1F3FB { background-position: -460px -500px; } +.emoji-1F448-1F3FC { background-position: -480px -500px; } +.emoji-1F448-1F3FD { background-position: -500px -500px; } +.emoji-1F448-1F3FE { background-position: -520px 0; } +.emoji-1F448-1F3FF { background-position: -520px -20px; } +.emoji-1F449 { background-position: -520px -40px; } +.emoji-1F449-1F3FB { background-position: -520px -60px; } +.emoji-1F449-1F3FC { background-position: -520px -80px; } +.emoji-1F449-1F3FD { background-position: -520px -100px; } +.emoji-1F449-1F3FE { background-position: -520px -120px; } +.emoji-1F449-1F3FF { background-position: -520px -140px; } +.emoji-1F44A { background-position: -520px -160px; } +.emoji-1F44A-1F3FB { background-position: -520px -180px; } +.emoji-1F44A-1F3FC { background-position: -520px -200px; } +.emoji-1F44A-1F3FD { background-position: -520px -220px; } +.emoji-1F44A-1F3FE { background-position: -520px -240px; } +.emoji-1F44A-1F3FF { background-position: -520px -260px; } +.emoji-1F44B { background-position: -520px -280px; } +.emoji-1F44B-1F3FB { background-position: -520px -300px; } +.emoji-1F44B-1F3FC { background-position: -520px -320px; } +.emoji-1F44B-1F3FD { background-position: -520px -340px; } +.emoji-1F44B-1F3FE { background-position: -520px -360px; } +.emoji-1F44B-1F3FF { background-position: -520px -380px; } +.emoji-1F44C { background-position: -520px -400px; } +.emoji-1F44C-1F3FB { background-position: -520px -420px; } +.emoji-1F44C-1F3FC { background-position: -520px -440px; } +.emoji-1F44C-1F3FD { background-position: -520px -460px; } +.emoji-1F44C-1F3FE { background-position: -520px -480px; } +.emoji-1F44C-1F3FF { background-position: -520px -500px; } +.emoji-1F44D { background-position: 0 -520px; } +.emoji-1F44D-1F3FB { background-position: -20px -520px; } +.emoji-1F44D-1F3FC { background-position: -40px -520px; } +.emoji-1F44D-1F3FD { background-position: -60px -520px; } +.emoji-1F44D-1F3FE { background-position: -80px -520px; } +.emoji-1F44D-1F3FF { background-position: -100px -520px; } +.emoji-1F44E { background-position: -120px -520px; } +.emoji-1F44E-1F3FB { background-position: -140px -520px; } +.emoji-1F44E-1F3FC { background-position: -160px -520px; } +.emoji-1F44E-1F3FD { background-position: -180px -520px; } +.emoji-1F44E-1F3FE { background-position: -200px -520px; } +.emoji-1F44E-1F3FF { background-position: -220px -520px; } +.emoji-1F44F { background-position: -240px -520px; } +.emoji-1F44F-1F3FB { background-position: -260px -520px; } +.emoji-1F44F-1F3FC { background-position: -280px -520px; } +.emoji-1F44F-1F3FD { background-position: -300px -520px; } +.emoji-1F44F-1F3FE { background-position: -320px -520px; } +.emoji-1F44F-1F3FF { background-position: -340px -520px; } +.emoji-1F450 { background-position: -360px -520px; } +.emoji-1F450-1F3FB { background-position: -380px -520px; } +.emoji-1F450-1F3FC { background-position: -400px -520px; } +.emoji-1F450-1F3FD { background-position: -420px -520px; } +.emoji-1F450-1F3FE { background-position: -440px -520px; } +.emoji-1F450-1F3FF { background-position: -460px -520px; } +.emoji-1F451 { background-position: -480px -520px; } +.emoji-1F452 { background-position: -500px -520px; } +.emoji-1F453 { background-position: -520px -520px; } +.emoji-1F454 { background-position: -540px 0; } +.emoji-1F455 { background-position: -540px -20px; } +.emoji-1F456 { background-position: -540px -40px; } +.emoji-1F457 { background-position: -540px -60px; } +.emoji-1F458 { background-position: -540px -80px; } +.emoji-1F459 { background-position: -540px -100px; } +.emoji-1F45A { background-position: -540px -120px; } +.emoji-1F45B { background-position: -540px -140px; } +.emoji-1F45C { background-position: -540px -160px; } +.emoji-1F45D { background-position: -540px -180px; } +.emoji-1F45E { background-position: -540px -200px; } +.emoji-1F45F { background-position: -540px -220px; } +.emoji-1F460 { background-position: -540px -240px; } +.emoji-1F461 { background-position: -540px -260px; } +.emoji-1F462 { background-position: -540px -280px; } +.emoji-1F463 { background-position: -540px -300px; } +.emoji-1F464 { background-position: -540px -320px; } +.emoji-1F465 { background-position: -540px -340px; } +.emoji-1F466 { background-position: -540px -360px; } +.emoji-1F466-1F3FB { background-position: -540px -380px; } +.emoji-1F466-1F3FC { background-position: -540px -400px; } +.emoji-1F466-1F3FD { background-position: -540px -420px; } +.emoji-1F466-1F3FE { background-position: -540px -440px; } +.emoji-1F466-1F3FF { background-position: -540px -460px; } +.emoji-1F467 { background-position: -540px -480px; } +.emoji-1F467-1F3FB { background-position: -540px -500px; } +.emoji-1F467-1F3FC { background-position: -540px -520px; } +.emoji-1F467-1F3FD { background-position: 0 -540px; } +.emoji-1F467-1F3FE { background-position: -20px -540px; } +.emoji-1F467-1F3FF { background-position: -40px -540px; } +.emoji-1F468 { background-position: -60px -540px; } +.emoji-1F468-1F3FB { background-position: -80px -540px; } +.emoji-1F468-1F3FC { background-position: -100px -540px; } +.emoji-1F468-1F3FD { background-position: -120px -540px; } +.emoji-1F468-1F3FE { background-position: -140px -540px; } +.emoji-1F468-1F3FF { background-position: -160px -540px; } +.emoji-1F468-1F468-1F466 { background-position: -180px -540px; } +.emoji-1F468-1F468-1F466-1F466 { background-position: -200px -540px; } +.emoji-1F468-1F468-1F467 { background-position: -220px -540px; } +.emoji-1F468-1F468-1F467-1F466 { background-position: -240px -540px; } +.emoji-1F468-1F468-1F467-1F467 { background-position: -260px -540px; } +.emoji-1F468-1F469-1F466-1F466 { background-position: -280px -540px; } +.emoji-1F468-1F469-1F467 { background-position: -300px -540px; } +.emoji-1F468-1F469-1F467-1F466 { background-position: -320px -540px; } +.emoji-1F468-1F469-1F467-1F467 { background-position: -340px -540px; } +.emoji-1F468-2764-1F468 { background-position: -360px -540px; } +.emoji-1F468-2764-1F48B-1F468 { background-position: -380px -540px; } +.emoji-1F469 { background-position: -400px -540px; } +.emoji-1F469-1F3FB { background-position: -420px -540px; } +.emoji-1F469-1F3FC { background-position: -440px -540px; } +.emoji-1F469-1F3FD { background-position: -460px -540px; } +.emoji-1F469-1F3FE { background-position: -480px -540px; } +.emoji-1F469-1F3FF { background-position: -500px -540px; } +.emoji-1F469-1F469-1F466 { background-position: -520px -540px; } +.emoji-1F469-1F469-1F466-1F466 { background-position: -540px -540px; } +.emoji-1F469-1F469-1F467 { background-position: -560px 0; } +.emoji-1F469-1F469-1F467-1F466 { background-position: -560px -20px; } +.emoji-1F469-1F469-1F467-1F467 { background-position: -560px -40px; } +.emoji-1F469-2764-1F469 { background-position: -560px -60px; } +.emoji-1F469-2764-1F48B-1F469 { background-position: -560px -80px; } +.emoji-1F46A { background-position: -560px -100px; } +.emoji-1F46B { background-position: -560px -120px; } +.emoji-1F46C { background-position: -560px -140px; } +.emoji-1F46D { background-position: -560px -160px; } +.emoji-1F46E { background-position: -560px -180px; } +.emoji-1F46E-1F3FB { background-position: -560px -200px; } +.emoji-1F46E-1F3FC { background-position: -560px -220px; } +.emoji-1F46E-1F3FD { background-position: -560px -240px; } +.emoji-1F46E-1F3FE { background-position: -560px -260px; } +.emoji-1F46E-1F3FF { background-position: -560px -280px; } +.emoji-1F46F { background-position: -560px -300px; } +.emoji-1F470 { background-position: -560px -320px; } +.emoji-1F470-1F3FB { background-position: -560px -340px; } +.emoji-1F470-1F3FC { background-position: -560px -360px; } +.emoji-1F470-1F3FD { background-position: -560px -380px; } +.emoji-1F470-1F3FE { background-position: -560px -400px; } +.emoji-1F470-1F3FF { background-position: -560px -420px; } +.emoji-1F471 { background-position: -560px -440px; } +.emoji-1F471-1F3FB { background-position: -560px -460px; } +.emoji-1F471-1F3FC { background-position: -560px -480px; } +.emoji-1F471-1F3FD { background-position: -560px -500px; } +.emoji-1F471-1F3FE { background-position: -560px -520px; } +.emoji-1F471-1F3FF { background-position: -560px -540px; } +.emoji-1F472 { background-position: 0 -560px; } +.emoji-1F472-1F3FB { background-position: -20px -560px; } +.emoji-1F472-1F3FC { background-position: -40px -560px; } +.emoji-1F472-1F3FD { background-position: -60px -560px; } +.emoji-1F472-1F3FE { background-position: -80px -560px; } +.emoji-1F472-1F3FF { background-position: -100px -560px; } +.emoji-1F473 { background-position: -120px -560px; } +.emoji-1F473-1F3FB { background-position: -140px -560px; } +.emoji-1F473-1F3FC { background-position: -160px -560px; } +.emoji-1F473-1F3FD { background-position: -180px -560px; } +.emoji-1F473-1F3FE { background-position: -200px -560px; } +.emoji-1F473-1F3FF { background-position: -220px -560px; } +.emoji-1F474 { background-position: -240px -560px; } +.emoji-1F474-1F3FB { background-position: -260px -560px; } +.emoji-1F474-1F3FC { background-position: -280px -560px; } +.emoji-1F474-1F3FD { background-position: -300px -560px; } +.emoji-1F474-1F3FE { background-position: -320px -560px; } +.emoji-1F474-1F3FF { background-position: -340px -560px; } +.emoji-1F475 { background-position: -360px -560px; } +.emoji-1F475-1F3FB { background-position: -380px -560px; } +.emoji-1F475-1F3FC { background-position: -400px -560px; } +.emoji-1F475-1F3FD { background-position: -420px -560px; } +.emoji-1F475-1F3FE { background-position: -440px -560px; } +.emoji-1F475-1F3FF { background-position: -460px -560px; } +.emoji-1F476 { background-position: -480px -560px; } +.emoji-1F476-1F3FB { background-position: -500px -560px; } +.emoji-1F476-1F3FC { background-position: -520px -560px; } +.emoji-1F476-1F3FD { background-position: -540px -560px; } +.emoji-1F476-1F3FE { background-position: -560px -560px; } +.emoji-1F476-1F3FF { background-position: -580px 0; } +.emoji-1F477 { background-position: -580px -20px; } +.emoji-1F477-1F3FB { background-position: -580px -40px; } +.emoji-1F477-1F3FC { background-position: -580px -60px; } +.emoji-1F477-1F3FD { background-position: -580px -80px; } +.emoji-1F477-1F3FE { background-position: -580px -100px; } +.emoji-1F477-1F3FF { background-position: -580px -120px; } +.emoji-1F478 { background-position: -580px -140px; } +.emoji-1F478-1F3FB { background-position: -580px -160px; } +.emoji-1F478-1F3FC { background-position: -580px -180px; } +.emoji-1F478-1F3FD { background-position: -580px -200px; } +.emoji-1F478-1F3FE { background-position: -580px -220px; } +.emoji-1F478-1F3FF { background-position: -580px -240px; } +.emoji-1F479 { background-position: -580px -260px; } +.emoji-1F47A { background-position: -580px -280px; } +.emoji-1F47B { background-position: -580px -300px; } +.emoji-1F47C { background-position: -580px -320px; } +.emoji-1F47C-1F3FB { background-position: -580px -340px; } +.emoji-1F47C-1F3FC { background-position: -580px -360px; } +.emoji-1F47C-1F3FD { background-position: -580px -380px; } +.emoji-1F47C-1F3FE { background-position: -580px -400px; } +.emoji-1F47C-1F3FF { background-position: -580px -420px; } +.emoji-1F47D { background-position: -580px -440px; } +.emoji-1F47E { background-position: -580px -460px; } +.emoji-1F47F { background-position: -580px -480px; } +.emoji-1F480 { background-position: -580px -500px; } +.emoji-1F481 { background-position: -580px -520px; } +.emoji-1F481-1F3FB { background-position: -580px -540px; } +.emoji-1F481-1F3FC { background-position: -580px -560px; } +.emoji-1F481-1F3FD { background-position: 0 -580px; } +.emoji-1F481-1F3FE { background-position: -20px -580px; } +.emoji-1F481-1F3FF { background-position: -40px -580px; } +.emoji-1F482 { background-position: -60px -580px; } +.emoji-1F482-1F3FB { background-position: -80px -580px; } +.emoji-1F482-1F3FC { background-position: -100px -580px; } +.emoji-1F482-1F3FD { background-position: -120px -580px; } +.emoji-1F482-1F3FE { background-position: -140px -580px; } +.emoji-1F482-1F3FF { background-position: -160px -580px; } +.emoji-1F483 { background-position: -180px -580px; } +.emoji-1F483-1F3FB { background-position: -200px -580px; } +.emoji-1F483-1F3FC { background-position: -220px -580px; } +.emoji-1F483-1F3FD { background-position: -240px -580px; } +.emoji-1F483-1F3FE { background-position: -260px -580px; } +.emoji-1F483-1F3FF { background-position: -280px -580px; } +.emoji-1F484 { background-position: -300px -580px; } +.emoji-1F485 { background-position: -320px -580px; } +.emoji-1F485-1F3FB { background-position: -340px -580px; } +.emoji-1F485-1F3FC { background-position: -360px -580px; } +.emoji-1F485-1F3FD { background-position: -380px -580px; } +.emoji-1F485-1F3FE { background-position: -400px -580px; } +.emoji-1F485-1F3FF { background-position: -420px -580px; } +.emoji-1F486 { background-position: -440px -580px; } +.emoji-1F486-1F3FB { background-position: -460px -580px; } +.emoji-1F486-1F3FC { background-position: -480px -580px; } +.emoji-1F486-1F3FD { background-position: -500px -580px; } +.emoji-1F486-1F3FE { background-position: -520px -580px; } +.emoji-1F486-1F3FF { background-position: -540px -580px; } +.emoji-1F487 { background-position: -560px -580px; } +.emoji-1F487-1F3FB { background-position: -580px -580px; } +.emoji-1F487-1F3FC { background-position: -600px 0; } +.emoji-1F487-1F3FD { background-position: -600px -20px; } +.emoji-1F487-1F3FE { background-position: -600px -40px; } +.emoji-1F487-1F3FF { background-position: -600px -60px; } +.emoji-1F488 { background-position: -600px -80px; } +.emoji-1F489 { background-position: -600px -100px; } +.emoji-1F48A { background-position: -600px -120px; } +.emoji-1F48B { background-position: -600px -140px; } +.emoji-1F48C { background-position: -600px -160px; } +.emoji-1F48D { background-position: -600px -180px; } +.emoji-1F48E { background-position: -600px -200px; } +.emoji-1F48F { background-position: -600px -220px; } +.emoji-1F490 { background-position: -600px -240px; } +.emoji-1F491 { background-position: -600px -260px; } +.emoji-1F492 { background-position: -600px -280px; } +.emoji-1F493 { background-position: -600px -300px; } +.emoji-1F494 { background-position: -600px -320px; } +.emoji-1F495 { background-position: -600px -340px; } +.emoji-1F496 { background-position: -600px -360px; } +.emoji-1F497 { background-position: -600px -380px; } +.emoji-1F498 { background-position: -600px -400px; } +.emoji-1F499 { background-position: -600px -420px; } +.emoji-1F49A { background-position: -600px -440px; } +.emoji-1F49B { background-position: -600px -460px; } +.emoji-1F49C { background-position: -600px -480px; } +.emoji-1F49D { background-position: -600px -500px; } +.emoji-1F49E { background-position: -600px -520px; } +.emoji-1F49F { background-position: -600px -540px; } +.emoji-1F4A0 { background-position: -600px -560px; } +.emoji-1F4A1 { background-position: -600px -580px; } +.emoji-1F4A2 { background-position: 0 -600px; } +.emoji-1F4A3 { background-position: -20px -600px; } +.emoji-1F4A4 { background-position: -40px -600px; } +.emoji-1F4A5 { background-position: -60px -600px; } +.emoji-1F4A6 { background-position: -80px -600px; } +.emoji-1F4A7 { background-position: -100px -600px; } +.emoji-1F4A8 { background-position: -120px -600px; } +.emoji-1F4A9 { background-position: -140px -600px; } +.emoji-1F4AA { background-position: -160px -600px; } +.emoji-1F4AA-1F3FB { background-position: -180px -600px; } +.emoji-1F4AA-1F3FC { background-position: -200px -600px; } +.emoji-1F4AA-1F3FD { background-position: -220px -600px; } +.emoji-1F4AA-1F3FE { background-position: -240px -600px; } +.emoji-1F4AA-1F3FF { background-position: -260px -600px; } +.emoji-1F4AB { background-position: -280px -600px; } +.emoji-1F4AC { background-position: -300px -600px; } +.emoji-1F4AD { background-position: -320px -600px; } +.emoji-1F4AE { background-position: -340px -600px; } +.emoji-1F4AF { background-position: -360px -600px; } +.emoji-1F4B0 { background-position: -380px -600px; } +.emoji-1F4B1 { background-position: -400px -600px; } +.emoji-1F4B2 { background-position: -420px -600px; } +.emoji-1F4B3 { background-position: -440px -600px; } +.emoji-1F4B4 { background-position: -460px -600px; } +.emoji-1F4B5 { background-position: -480px -600px; } +.emoji-1F4B6 { background-position: -500px -600px; } +.emoji-1F4B7 { background-position: -520px -600px; } +.emoji-1F4B8 { background-position: -540px -600px; } +.emoji-1F4B9 { background-position: -560px -600px; } +.emoji-1F4BA { background-position: -580px -600px; } +.emoji-1F4BB { background-position: -600px -600px; } +.emoji-1F4BC { background-position: -620px 0; } +.emoji-1F4BD { background-position: -620px -20px; } +.emoji-1F4BE { background-position: -620px -40px; } +.emoji-1F4BF { background-position: -620px -60px; } +.emoji-1F4C0 { background-position: -620px -80px; } +.emoji-1F4C1 { background-position: -620px -100px; } +.emoji-1F4C2 { background-position: -620px -120px; } +.emoji-1F4C3 { background-position: -620px -140px; } +.emoji-1F4C4 { background-position: -620px -160px; } +.emoji-1F4C5 { background-position: -620px -180px; } +.emoji-1F4C6 { background-position: -620px -200px; } +.emoji-1F4C7 { background-position: -620px -220px; } +.emoji-1F4C8 { background-position: -620px -240px; } +.emoji-1F4C9 { background-position: -620px -260px; } +.emoji-1F4CA { background-position: -620px -280px; } +.emoji-1F4CB { background-position: -620px -300px; } +.emoji-1F4CC { background-position: -620px -320px; } +.emoji-1F4CD { background-position: -620px -340px; } +.emoji-1F4CE { background-position: -620px -360px; } +.emoji-1F4CF { background-position: -620px -380px; } +.emoji-1F4D0 { background-position: -620px -400px; } +.emoji-1F4D1 { background-position: -620px -420px; } +.emoji-1F4D2 { background-position: -620px -440px; } +.emoji-1F4D3 { background-position: -620px -460px; } +.emoji-1F4D4 { background-position: -620px -480px; } +.emoji-1F4D5 { background-position: -620px -500px; } +.emoji-1F4D6 { background-position: -620px -520px; } +.emoji-1F4D7 { background-position: -620px -540px; } +.emoji-1F4D8 { background-position: -620px -560px; } +.emoji-1F4D9 { background-position: -620px -580px; } +.emoji-1F4DA { background-position: -620px -600px; } +.emoji-1F4DB { background-position: 0 -620px; } +.emoji-1F4DC { background-position: -20px -620px; } +.emoji-1F4DD { background-position: -40px -620px; } +.emoji-1F4DE { background-position: -60px -620px; } +.emoji-1F4DF { background-position: -80px -620px; } +.emoji-1F4E0 { background-position: -100px -620px; } +.emoji-1F4E1 { background-position: -120px -620px; } +.emoji-1F4E2 { background-position: -140px -620px; } +.emoji-1F4E3 { background-position: -160px -620px; } +.emoji-1F4E4 { background-position: -180px -620px; } +.emoji-1F4E5 { background-position: -200px -620px; } +.emoji-1F4E6 { background-position: -220px -620px; } +.emoji-1F4E7 { background-position: -240px -620px; } +.emoji-1F4E8 { background-position: -260px -620px; } +.emoji-1F4E9 { background-position: -280px -620px; } +.emoji-1F4EA { background-position: -300px -620px; } +.emoji-1F4EB { background-position: -320px -620px; } +.emoji-1F4EC { background-position: -340px -620px; } +.emoji-1F4ED { background-position: -360px -620px; } +.emoji-1F4EE { background-position: -380px -620px; } +.emoji-1F4EF { background-position: -400px -620px; } +.emoji-1F4F0 { background-position: -420px -620px; } +.emoji-1F4F1 { background-position: -440px -620px; } +.emoji-1F4F2 { background-position: -460px -620px; } +.emoji-1F4F3 { background-position: -480px -620px; } +.emoji-1F4F4 { background-position: -500px -620px; } +.emoji-1F4F5 { background-position: -520px -620px; } +.emoji-1F4F6 { background-position: -540px -620px; } +.emoji-1F4F7 { background-position: -560px -620px; } +.emoji-1F4F8 { background-position: -580px -620px; } +.emoji-1F4F9 { background-position: -600px -620px; } +.emoji-1F4FA { background-position: -620px -620px; } +.emoji-1F4FB { background-position: -640px 0; } +.emoji-1F4FC { background-position: -640px -20px; } +.emoji-1F4FD { background-position: -640px -40px; } +.emoji-1F4FF { background-position: -640px -60px; } +.emoji-1F500 { background-position: -640px -80px; } +.emoji-1F501 { background-position: -640px -100px; } +.emoji-1F502 { background-position: -640px -120px; } +.emoji-1F503 { background-position: -640px -140px; } +.emoji-1F504 { background-position: -640px -160px; } +.emoji-1F505 { background-position: -640px -180px; } +.emoji-1F506 { background-position: -640px -200px; } +.emoji-1F507 { background-position: -640px -220px; } +.emoji-1F508 { background-position: -640px -240px; } +.emoji-1F509 { background-position: -640px -260px; } +.emoji-1F50A { background-position: -640px -280px; } +.emoji-1F50B { background-position: -640px -300px; } +.emoji-1F50C { background-position: -640px -320px; } +.emoji-1F50D { background-position: -640px -340px; } +.emoji-1F50E { background-position: -640px -360px; } +.emoji-1F50F { background-position: -640px -380px; } +.emoji-1F510 { background-position: -640px -400px; } +.emoji-1F511 { background-position: -640px -420px; } +.emoji-1F512 { background-position: -640px -440px; } +.emoji-1F513 { background-position: -640px -460px; } +.emoji-1F514 { background-position: -640px -480px; } +.emoji-1F515 { background-position: -640px -500px; } +.emoji-1F516 { background-position: -640px -520px; } +.emoji-1F517 { background-position: -640px -540px; } +.emoji-1F518 { background-position: -640px -560px; } +.emoji-1F519 { background-position: -640px -580px; } +.emoji-1F51A { background-position: -640px -600px; } +.emoji-1F51B { background-position: -640px -620px; } +.emoji-1F51C { background-position: 0 -640px; } +.emoji-1F51D { background-position: -20px -640px; } +.emoji-1F51E { background-position: -40px -640px; } +.emoji-1F51F { background-position: -60px -640px; } +.emoji-1F520 { background-position: -80px -640px; } +.emoji-1F521 { background-position: -100px -640px; } +.emoji-1F522 { background-position: -120px -640px; } +.emoji-1F523 { background-position: -140px -640px; } +.emoji-1F524 { background-position: -160px -640px; } +.emoji-1F525 { background-position: -180px -640px; } +.emoji-1F526 { background-position: -200px -640px; } +.emoji-1F527 { background-position: -220px -640px; } +.emoji-1F528 { background-position: -240px -640px; } +.emoji-1F529 { background-position: -260px -640px; } +.emoji-1F52A { background-position: -280px -640px; } +.emoji-1F52B { background-position: -300px -640px; } +.emoji-1F52C { background-position: -320px -640px; } +.emoji-1F52D { background-position: -340px -640px; } +.emoji-1F52E { background-position: -360px -640px; } +.emoji-1F52F { background-position: -380px -640px; } +.emoji-1F530 { background-position: -400px -640px; } +.emoji-1F531 { background-position: -420px -640px; } +.emoji-1F532 { background-position: -440px -640px; } +.emoji-1F533 { background-position: -460px -640px; } +.emoji-1F534 { background-position: -480px -640px; } +.emoji-1F535 { background-position: -500px -640px; } +.emoji-1F536 { background-position: -520px -640px; } +.emoji-1F537 { background-position: -540px -640px; } +.emoji-1F538 { background-position: -560px -640px; } +.emoji-1F539 { background-position: -580px -640px; } +.emoji-1F53A { background-position: -600px -640px; } +.emoji-1F53B { background-position: -620px -640px; } +.emoji-1F53C { background-position: -640px -640px; } +.emoji-1F53D { background-position: -660px 0; } +.emoji-1F549 { background-position: -660px -20px; } +.emoji-1F54A { background-position: -660px -40px; } +.emoji-1F54B { background-position: -660px -60px; } +.emoji-1F54C { background-position: -660px -80px; } +.emoji-1F54D { background-position: -660px -100px; } +.emoji-1F54E { background-position: -660px -120px; } +.emoji-1F550 { background-position: -660px -140px; } +.emoji-1F551 { background-position: -660px -160px; } +.emoji-1F552 { background-position: -660px -180px; } +.emoji-1F553 { background-position: -660px -200px; } +.emoji-1F554 { background-position: -660px -220px; } +.emoji-1F555 { background-position: -660px -240px; } +.emoji-1F556 { background-position: -660px -260px; } +.emoji-1F557 { background-position: -660px -280px; } +.emoji-1F558 { background-position: -660px -300px; } +.emoji-1F559 { background-position: -660px -320px; } +.emoji-1F55A { background-position: -660px -340px; } +.emoji-1F55B { background-position: -660px -360px; } +.emoji-1F55C { background-position: -660px -380px; } +.emoji-1F55D { background-position: -660px -400px; } +.emoji-1F55E { background-position: -660px -420px; } +.emoji-1F55F { background-position: -660px -440px; } +.emoji-1F560 { background-position: -660px -460px; } +.emoji-1F561 { background-position: -660px -480px; } +.emoji-1F562 { background-position: -660px -500px; } +.emoji-1F563 { background-position: -660px -520px; } +.emoji-1F564 { background-position: -660px -540px; } +.emoji-1F565 { background-position: -660px -560px; } +.emoji-1F566 { background-position: -660px -580px; } +.emoji-1F567 { background-position: -660px -600px; } +.emoji-1F56F { background-position: -660px -620px; } +.emoji-1F570 { background-position: -660px -640px; } +.emoji-1F573 { background-position: 0 -660px; } +.emoji-1F574 { background-position: -20px -660px; } +.emoji-1F575 { background-position: -40px -660px; } +.emoji-1F575-1F3FB { background-position: -60px -660px; } +.emoji-1F575-1F3FC { background-position: -80px -660px; } +.emoji-1F575-1F3FD { background-position: -100px -660px; } +.emoji-1F575-1F3FE { background-position: -120px -660px; } +.emoji-1F575-1F3FF { background-position: -140px -660px; } +.emoji-1F576 { background-position: -160px -660px; } +.emoji-1F577 { background-position: -180px -660px; } +.emoji-1F578 { background-position: -200px -660px; } +.emoji-1F579 { background-position: -220px -660px; } +.emoji-1F57A { background-position: -240px -660px; } +.emoji-1F57A-1F3FB { background-position: -260px -660px; } +.emoji-1F57A-1F3FC { background-position: -280px -660px; } +.emoji-1F57A-1F3FD { background-position: -300px -660px; } +.emoji-1F57A-1F3FE { background-position: -320px -660px; } +.emoji-1F57A-1F3FF { background-position: -340px -660px; } +.emoji-1F587 { background-position: -360px -660px; } +.emoji-1F58A { background-position: -380px -660px; } +.emoji-1F58B { background-position: -400px -660px; } +.emoji-1F58C { background-position: -420px -660px; } +.emoji-1F58D { background-position: -440px -660px; } +.emoji-1F590 { background-position: -460px -660px; } +.emoji-1F590-1F3FB { background-position: -480px -660px; } +.emoji-1F590-1F3FC { background-position: -500px -660px; } +.emoji-1F590-1F3FD { background-position: -520px -660px; } +.emoji-1F590-1F3FE { background-position: -540px -660px; } +.emoji-1F590-1F3FF { background-position: -560px -660px; } +.emoji-1F595 { background-position: -580px -660px; } +.emoji-1F595-1F3FB { background-position: -600px -660px; } +.emoji-1F595-1F3FC { background-position: -620px -660px; } +.emoji-1F595-1F3FD { background-position: -640px -660px; } +.emoji-1F595-1F3FE { background-position: -660px -660px; } +.emoji-1F595-1F3FF { background-position: -680px 0; } +.emoji-1F596 { background-position: -680px -20px; } +.emoji-1F596-1F3FB { background-position: -680px -40px; } +.emoji-1F596-1F3FC { background-position: -680px -60px; } +.emoji-1F596-1F3FD { background-position: -680px -80px; } +.emoji-1F596-1F3FE { background-position: -680px -100px; } +.emoji-1F596-1F3FF { background-position: -680px -120px; } +.emoji-1F5A4 { background-position: -680px -140px; } +.emoji-1F5A5 { background-position: -680px -160px; } +.emoji-1F5A8 { background-position: -680px -180px; } +.emoji-1F5B1 { background-position: -680px -200px; } +.emoji-1F5B2 { background-position: -680px -220px; } +.emoji-1F5BC { background-position: -680px -240px; } +.emoji-1F5C2 { background-position: -680px -260px; } +.emoji-1F5C3 { background-position: -680px -280px; } +.emoji-1F5C4 { background-position: -680px -300px; } +.emoji-1F5D1 { background-position: -680px -320px; } +.emoji-1F5D2 { background-position: -680px -340px; } +.emoji-1F5D3 { background-position: -680px -360px; } +.emoji-1F5DC { background-position: -680px -380px; } +.emoji-1F5DD { background-position: -680px -400px; } +.emoji-1F5DE { background-position: -680px -420px; } +.emoji-1F5E1 { background-position: -680px -440px; } +.emoji-1F5E3 { background-position: -680px -460px; } +.emoji-1F5EF { background-position: -680px -480px; } +.emoji-1F5F3 { background-position: -680px -500px; } +.emoji-1F5FA { background-position: -680px -520px; } +.emoji-1F5FB { background-position: -680px -540px; } +.emoji-1F5FC { background-position: -680px -560px; } +.emoji-1F5FD { background-position: -680px -580px; } +.emoji-1F5FE { background-position: -680px -600px; } +.emoji-1F5FF { background-position: -680px -620px; } +.emoji-1F600 { background-position: -680px -640px; } +.emoji-1F601 { background-position: -680px -660px; } +.emoji-1F602 { background-position: 0 -680px; } +.emoji-1F603 { background-position: -20px -680px; } +.emoji-1F604 { background-position: -40px -680px; } +.emoji-1F605 { background-position: -60px -680px; } +.emoji-1F606 { background-position: -80px -680px; } +.emoji-1F607 { background-position: -100px -680px; } +.emoji-1F608 { background-position: -120px -680px; } +.emoji-1F609 { background-position: -140px -680px; } +.emoji-1F60A { background-position: -160px -680px; } +.emoji-1F60B { background-position: -180px -680px; } +.emoji-1F60C { background-position: -200px -680px; } +.emoji-1F60D { background-position: -220px -680px; } +.emoji-1F60E { background-position: -240px -680px; } +.emoji-1F60F { background-position: -260px -680px; } +.emoji-1F610 { background-position: -280px -680px; } +.emoji-1F611 { background-position: -300px -680px; } +.emoji-1F612 { background-position: -320px -680px; } +.emoji-1F613 { background-position: -340px -680px; } +.emoji-1F614 { background-position: -360px -680px; } +.emoji-1F615 { background-position: -380px -680px; } +.emoji-1F616 { background-position: -400px -680px; } +.emoji-1F617 { background-position: -420px -680px; } +.emoji-1F618 { background-position: -440px -680px; } +.emoji-1F619 { background-position: -460px -680px; } +.emoji-1F61A { background-position: -480px -680px; } +.emoji-1F61B { background-position: -500px -680px; } +.emoji-1F61C { background-position: -520px -680px; } +.emoji-1F61D { background-position: -540px -680px; } +.emoji-1F61E { background-position: -560px -680px; } +.emoji-1F61F { background-position: -580px -680px; } +.emoji-1F620 { background-position: -600px -680px; } +.emoji-1F621 { background-position: -620px -680px; } +.emoji-1F622 { background-position: -640px -680px; } +.emoji-1F623 { background-position: -660px -680px; } +.emoji-1F624 { background-position: -680px -680px; } +.emoji-1F625 { background-position: -700px 0; } +.emoji-1F626 { background-position: -700px -20px; } +.emoji-1F627 { background-position: -700px -40px; } +.emoji-1F628 { background-position: -700px -60px; } +.emoji-1F629 { background-position: -700px -80px; } +.emoji-1F62A { background-position: -700px -100px; } +.emoji-1F62B { background-position: -700px -120px; } +.emoji-1F62C { background-position: -700px -140px; } +.emoji-1F62D { background-position: -700px -160px; } +.emoji-1F62E { background-position: -700px -180px; } +.emoji-1F62F { background-position: -700px -200px; } +.emoji-1F630 { background-position: -700px -220px; } +.emoji-1F631 { background-position: -700px -240px; } +.emoji-1F632 { background-position: -700px -260px; } +.emoji-1F633 { background-position: -700px -280px; } +.emoji-1F634 { background-position: -700px -300px; } +.emoji-1F635 { background-position: -700px -320px; } +.emoji-1F636 { background-position: -700px -340px; } +.emoji-1F637 { background-position: -700px -360px; } +.emoji-1F638 { background-position: -700px -380px; } +.emoji-1F639 { background-position: -700px -400px; } +.emoji-1F63A { background-position: -700px -420px; } +.emoji-1F63B { background-position: -700px -440px; } +.emoji-1F63C { background-position: -700px -460px; } +.emoji-1F63D { background-position: -700px -480px; } +.emoji-1F63E { background-position: -700px -500px; } +.emoji-1F63F { background-position: -700px -520px; } +.emoji-1F640 { background-position: -700px -540px; } +.emoji-1F641 { background-position: -700px -560px; } +.emoji-1F642 { background-position: -700px -580px; } +.emoji-1F643 { background-position: -700px -600px; } +.emoji-1F644 { background-position: -700px -620px; } +.emoji-1F645 { background-position: -700px -640px; } +.emoji-1F645-1F3FB { background-position: -700px -660px; } +.emoji-1F645-1F3FC { background-position: -700px -680px; } +.emoji-1F645-1F3FD { background-position: 0 -700px; } +.emoji-1F645-1F3FE { background-position: -20px -700px; } +.emoji-1F645-1F3FF { background-position: -40px -700px; } +.emoji-1F646 { background-position: -60px -700px; } +.emoji-1F646-1F3FB { background-position: -80px -700px; } +.emoji-1F646-1F3FC { background-position: -100px -700px; } +.emoji-1F646-1F3FD { background-position: -120px -700px; } +.emoji-1F646-1F3FE { background-position: -140px -700px; } +.emoji-1F646-1F3FF { background-position: -160px -700px; } +.emoji-1F647 { background-position: -180px -700px; } +.emoji-1F647-1F3FB { background-position: -200px -700px; } +.emoji-1F647-1F3FC { background-position: -220px -700px; } +.emoji-1F647-1F3FD { background-position: -240px -700px; } +.emoji-1F647-1F3FE { background-position: -260px -700px; } +.emoji-1F647-1F3FF { background-position: -280px -700px; } +.emoji-1F648 { background-position: -300px -700px; } +.emoji-1F649 { background-position: -320px -700px; } +.emoji-1F64A { background-position: -340px -700px; } +.emoji-1F64B { background-position: -360px -700px; } +.emoji-1F64B-1F3FB { background-position: -380px -700px; } +.emoji-1F64B-1F3FC { background-position: -400px -700px; } +.emoji-1F64B-1F3FD { background-position: -420px -700px; } +.emoji-1F64B-1F3FE { background-position: -440px -700px; } +.emoji-1F64B-1F3FF { background-position: -460px -700px; } +.emoji-1F64C { background-position: -480px -700px; } +.emoji-1F64C-1F3FB { background-position: -500px -700px; } +.emoji-1F64C-1F3FC { background-position: -520px -700px; } +.emoji-1F64C-1F3FD { background-position: -540px -700px; } +.emoji-1F64C-1F3FE { background-position: -560px -700px; } +.emoji-1F64C-1F3FF { background-position: -580px -700px; } +.emoji-1F64D { background-position: -600px -700px; } +.emoji-1F64D-1F3FB { background-position: -620px -700px; } +.emoji-1F64D-1F3FC { background-position: -640px -700px; } +.emoji-1F64D-1F3FD { background-position: -660px -700px; } +.emoji-1F64D-1F3FE { background-position: -680px -700px; } +.emoji-1F64D-1F3FF { background-position: -700px -700px; } +.emoji-1F64E { background-position: -720px 0; } +.emoji-1F64E-1F3FB { background-position: -720px -20px; } +.emoji-1F64E-1F3FC { background-position: -720px -40px; } +.emoji-1F64E-1F3FD { background-position: -720px -60px; } +.emoji-1F64E-1F3FE { background-position: -720px -80px; } +.emoji-1F64E-1F3FF { background-position: -720px -100px; } +.emoji-1F64F { background-position: -720px -120px; } +.emoji-1F64F-1F3FB { background-position: -720px -140px; } +.emoji-1F64F-1F3FC { background-position: -720px -160px; } +.emoji-1F64F-1F3FD { background-position: -720px -180px; } +.emoji-1F64F-1F3FE { background-position: -720px -200px; } +.emoji-1F64F-1F3FF { background-position: -720px -220px; } +.emoji-1F680 { background-position: -720px -240px; } +.emoji-1F681 { background-position: -720px -260px; } +.emoji-1F682 { background-position: -720px -280px; } +.emoji-1F683 { background-position: -720px -300px; } +.emoji-1F684 { background-position: -720px -320px; } +.emoji-1F685 { background-position: -720px -340px; } +.emoji-1F686 { background-position: -720px -360px; } +.emoji-1F687 { background-position: -720px -380px; } +.emoji-1F688 { background-position: -720px -400px; } +.emoji-1F689 { background-position: -720px -420px; } +.emoji-1F68A { background-position: -720px -440px; } +.emoji-1F68B { background-position: -720px -460px; } +.emoji-1F68C { background-position: -720px -480px; } +.emoji-1F68D { background-position: -720px -500px; } +.emoji-1F68E { background-position: -720px -520px; } +.emoji-1F68F { background-position: -720px -540px; } +.emoji-1F690 { background-position: -720px -560px; } +.emoji-1F691 { background-position: -720px -580px; } +.emoji-1F692 { background-position: -720px -600px; } +.emoji-1F693 { background-position: -720px -620px; } +.emoji-1F694 { background-position: -720px -640px; } +.emoji-1F695 { background-position: -720px -660px; } +.emoji-1F696 { background-position: -720px -680px; } +.emoji-1F697 { background-position: -720px -700px; } +.emoji-1F698 { background-position: 0 -720px; } +.emoji-1F699 { background-position: -20px -720px; } +.emoji-1F69A { background-position: -40px -720px; } +.emoji-1F69B { background-position: -60px -720px; } +.emoji-1F69C { background-position: -80px -720px; } +.emoji-1F69D { background-position: -100px -720px; } +.emoji-1F69E { background-position: -120px -720px; } +.emoji-1F69F { background-position: -140px -720px; } +.emoji-1F6A0 { background-position: -160px -720px; } +.emoji-1F6A1 { background-position: -180px -720px; } +.emoji-1F6A2 { background-position: -200px -720px; } +.emoji-1F6A3 { background-position: -220px -720px; } +.emoji-1F6A3-1F3FB { background-position: -240px -720px; } +.emoji-1F6A3-1F3FC { background-position: -260px -720px; } +.emoji-1F6A3-1F3FD { background-position: -280px -720px; } +.emoji-1F6A3-1F3FE { background-position: -300px -720px; } +.emoji-1F6A3-1F3FF { background-position: -320px -720px; } +.emoji-1F6A4 { background-position: -340px -720px; } +.emoji-1F6A5 { background-position: -360px -720px; } +.emoji-1F6A6 { background-position: -380px -720px; } +.emoji-1F6A7 { background-position: -400px -720px; } +.emoji-1F6A8 { background-position: -420px -720px; } +.emoji-1F6A9 { background-position: -440px -720px; } +.emoji-1F6AA { background-position: -460px -720px; } +.emoji-1F6AB { background-position: -480px -720px; } +.emoji-1F6AC { background-position: -500px -720px; } +.emoji-1F6AD { background-position: -520px -720px; } +.emoji-1F6AE { background-position: -540px -720px; } +.emoji-1F6AF { background-position: -560px -720px; } +.emoji-1F6B0 { background-position: -580px -720px; } +.emoji-1F6B1 { background-position: -600px -720px; } +.emoji-1F6B2 { background-position: -620px -720px; } +.emoji-1F6B3 { background-position: -640px -720px; } +.emoji-1F6B4 { background-position: -660px -720px; } +.emoji-1F6B4-1F3FB { background-position: -680px -720px; } +.emoji-1F6B4-1F3FC { background-position: -700px -720px; } +.emoji-1F6B4-1F3FD { background-position: -720px -720px; } +.emoji-1F6B4-1F3FE { background-position: -740px 0; } +.emoji-1F6B4-1F3FF { background-position: -740px -20px; } +.emoji-1F6B5 { background-position: -740px -40px; } +.emoji-1F6B5-1F3FB { background-position: -740px -60px; } +.emoji-1F6B5-1F3FC { background-position: -740px -80px; } +.emoji-1F6B5-1F3FD { background-position: -740px -100px; } +.emoji-1F6B5-1F3FE { background-position: -740px -120px; } +.emoji-1F6B5-1F3FF { background-position: -740px -140px; } +.emoji-1F6B6 { background-position: -740px -160px; } +.emoji-1F6B6-1F3FB { background-position: -740px -180px; } +.emoji-1F6B6-1F3FC { background-position: -740px -200px; } +.emoji-1F6B6-1F3FD { background-position: -740px -220px; } +.emoji-1F6B6-1F3FE { background-position: -740px -240px; } +.emoji-1F6B6-1F3FF { background-position: -740px -260px; } +.emoji-1F6B7 { background-position: -740px -280px; } +.emoji-1F6B8 { background-position: -740px -300px; } +.emoji-1F6B9 { background-position: -740px -320px; } +.emoji-1F6BA { background-position: -740px -340px; } +.emoji-1F6BB { background-position: -740px -360px; } +.emoji-1F6BC { background-position: -740px -380px; } +.emoji-1F6BD { background-position: -740px -400px; } +.emoji-1F6BE { background-position: -740px -420px; } +.emoji-1F6BF { background-position: -740px -440px; } +.emoji-1F6C0 { background-position: -740px -460px; } +.emoji-1F6C0-1F3FB { background-position: -740px -480px; } +.emoji-1F6C0-1F3FC { background-position: -740px -500px; } +.emoji-1F6C0-1F3FD { background-position: -740px -520px; } +.emoji-1F6C0-1F3FE { background-position: -740px -540px; } +.emoji-1F6C0-1F3FF { background-position: -740px -560px; } +.emoji-1F6C1 { background-position: -740px -580px; } +.emoji-1F6C2 { background-position: -740px -600px; } +.emoji-1F6C3 { background-position: -740px -620px; } +.emoji-1F6C4 { background-position: -740px -640px; } +.emoji-1F6C5 { background-position: -740px -660px; } +.emoji-1F6CB { background-position: -740px -680px; } +.emoji-1F6CC { background-position: -740px -700px; } +.emoji-1F6CD { background-position: -740px -720px; } +.emoji-1F6CE { background-position: 0 -740px; } +.emoji-1F6CF { background-position: -20px -740px; } +.emoji-1F6D0 { background-position: -40px -740px; } +.emoji-1F6D1 { background-position: -60px -740px; } +.emoji-1F6D2 { background-position: -80px -740px; } +.emoji-1F6E0 { background-position: -100px -740px; } +.emoji-1F6E1 { background-position: -120px -740px; } +.emoji-1F6E2 { background-position: -140px -740px; } +.emoji-1F6E3 { background-position: -160px -740px; } +.emoji-1F6E4 { background-position: -180px -740px; } +.emoji-1F6E5 { background-position: -200px -740px; } +.emoji-1F6E9 { background-position: -220px -740px; } +.emoji-1F6EB { background-position: -240px -740px; } +.emoji-1F6EC { background-position: -260px -740px; } +.emoji-1F6F0 { background-position: -280px -740px; } +.emoji-1F6F3 { background-position: -300px -740px; } +.emoji-1F6F4 { background-position: -320px -740px; } +.emoji-1F6F5 { background-position: -340px -740px; } +.emoji-1F6F6 { background-position: -360px -740px; } +.emoji-1F910 { background-position: -380px -740px; } +.emoji-1F911 { background-position: -400px -740px; } +.emoji-1F912 { background-position: -420px -740px; } +.emoji-1F913 { background-position: -440px -740px; } +.emoji-1F914 { background-position: -460px -740px; } +.emoji-1F915 { background-position: -480px -740px; } +.emoji-1F916 { background-position: -500px -740px; } +.emoji-1F917 { background-position: -520px -740px; } +.emoji-1F918 { background-position: -540px -740px; } +.emoji-1F918-1F3FB { background-position: -560px -740px; } +.emoji-1F918-1F3FC { background-position: -580px -740px; } +.emoji-1F918-1F3FD { background-position: -600px -740px; } +.emoji-1F918-1F3FE { background-position: -620px -740px; } +.emoji-1F918-1F3FF { background-position: -640px -740px; } +.emoji-1F919 { background-position: -660px -740px; } +.emoji-1F919-1F3FB { background-position: -680px -740px; } +.emoji-1F919-1F3FC { background-position: -700px -740px; } +.emoji-1F919-1F3FD { background-position: -720px -740px; } +.emoji-1F919-1F3FE { background-position: -740px -740px; } +.emoji-1F919-1F3FF { background-position: -760px 0; } +.emoji-1F91A { background-position: -760px -20px; } +.emoji-1F91A-1F3FB { background-position: -760px -40px; } +.emoji-1F91A-1F3FC { background-position: -760px -60px; } +.emoji-1F91A-1F3FD { background-position: -760px -80px; } +.emoji-1F91A-1F3FE { background-position: -760px -100px; } +.emoji-1F91A-1F3FF { background-position: -760px -120px; } +.emoji-1F91B { background-position: -760px -140px; } +.emoji-1F91B-1F3FB { background-position: -760px -160px; } +.emoji-1F91B-1F3FC { background-position: -760px -180px; } +.emoji-1F91B-1F3FD { background-position: -760px -200px; } +.emoji-1F91B-1F3FE { background-position: -760px -220px; } +.emoji-1F91B-1F3FF { background-position: -760px -240px; } +.emoji-1F91C { background-position: -760px -260px; } +.emoji-1F91C-1F3FB { background-position: -760px -280px; } +.emoji-1F91C-1F3FC { background-position: -760px -300px; } +.emoji-1F91C-1F3FD { background-position: -760px -320px; } +.emoji-1F91C-1F3FE { background-position: -760px -340px; } +.emoji-1F91C-1F3FF { background-position: -760px -360px; } +.emoji-1F91D { background-position: -760px -380px; } +.emoji-1F91D-1F3FB { background-position: -760px -400px; } +.emoji-1F91D-1F3FC { background-position: -760px -420px; } +.emoji-1F91D-1F3FD { background-position: -760px -440px; } +.emoji-1F91D-1F3FE { background-position: -760px -460px; } +.emoji-1F91D-1F3FF { background-position: -760px -480px; } +.emoji-1F91E { background-position: -760px -500px; } +.emoji-1F91E-1F3FB { background-position: -760px -520px; } +.emoji-1F91E-1F3FC { background-position: -760px -540px; } +.emoji-1F91E-1F3FD { background-position: -760px -560px; } +.emoji-1F91E-1F3FE { background-position: -760px -580px; } +.emoji-1F91E-1F3FF { background-position: -760px -600px; } +.emoji-1F920 { background-position: -760px -620px; } +.emoji-1F921 { background-position: -760px -640px; } +.emoji-1F922 { background-position: -760px -660px; } +.emoji-1F923 { background-position: -760px -680px; } +.emoji-1F924 { background-position: -760px -700px; } +.emoji-1F925 { background-position: -760px -720px; } +.emoji-1F926 { background-position: -760px -740px; } +.emoji-1F926-1F3FB { background-position: 0 -760px; } +.emoji-1F926-1F3FC { background-position: -20px -760px; } +.emoji-1F926-1F3FD { background-position: -40px -760px; } +.emoji-1F926-1F3FE { background-position: -60px -760px; } +.emoji-1F926-1F3FF { background-position: -80px -760px; } +.emoji-1F927 { background-position: -100px -760px; } +.emoji-1F930 { background-position: -120px -760px; } +.emoji-1F930-1F3FB { background-position: -140px -760px; } +.emoji-1F930-1F3FC { background-position: -160px -760px; } +.emoji-1F930-1F3FD { background-position: -180px -760px; } +.emoji-1F930-1F3FE { background-position: -200px -760px; } +.emoji-1F930-1F3FF { background-position: -220px -760px; } +.emoji-1F933 { background-position: -240px -760px; } +.emoji-1F933-1F3FB { background-position: -260px -760px; } +.emoji-1F933-1F3FC { background-position: -280px -760px; } +.emoji-1F933-1F3FD { background-position: -300px -760px; } +.emoji-1F933-1F3FE { background-position: -320px -760px; } +.emoji-1F933-1F3FF { background-position: -340px -760px; } +.emoji-1F934 { background-position: -360px -760px; } +.emoji-1F934-1F3FB { background-position: -380px -760px; } +.emoji-1F934-1F3FC { background-position: -400px -760px; } +.emoji-1F934-1F3FD { background-position: -420px -760px; } +.emoji-1F934-1F3FE { background-position: -440px -760px; } +.emoji-1F934-1F3FF { background-position: -460px -760px; } +.emoji-1F935 { background-position: -480px -760px; } +.emoji-1F935-1F3FB { background-position: -500px -760px; } +.emoji-1F935-1F3FC { background-position: -520px -760px; } +.emoji-1F935-1F3FD { background-position: -540px -760px; } +.emoji-1F935-1F3FE { background-position: -560px -760px; } +.emoji-1F935-1F3FF { background-position: -580px -760px; } +.emoji-1F936 { background-position: -600px -760px; } +.emoji-1F936-1F3FB { background-position: -620px -760px; } +.emoji-1F936-1F3FC { background-position: -640px -760px; } +.emoji-1F936-1F3FD { background-position: -660px -760px; } +.emoji-1F936-1F3FE { background-position: -680px -760px; } +.emoji-1F936-1F3FF { background-position: -700px -760px; } +.emoji-1F937 { background-position: -720px -760px; } +.emoji-1F937-1F3FB { background-position: -740px -760px; } +.emoji-1F937-1F3FC { background-position: -760px -760px; } +.emoji-1F937-1F3FD { background-position: -780px 0; } +.emoji-1F937-1F3FE { background-position: -780px -20px; } +.emoji-1F937-1F3FF { background-position: -780px -40px; } +.emoji-1F938 { background-position: -780px -60px; } +.emoji-1F938-1F3FB { background-position: -780px -80px; } +.emoji-1F938-1F3FC { background-position: -780px -100px; } +.emoji-1F938-1F3FD { background-position: -780px -120px; } +.emoji-1F938-1F3FE { background-position: -780px -140px; } +.emoji-1F938-1F3FF { background-position: -780px -160px; } +.emoji-1F939 { background-position: -780px -180px; } +.emoji-1F939-1F3FB { background-position: -780px -200px; } +.emoji-1F939-1F3FC { background-position: -780px -220px; } +.emoji-1F939-1F3FD { background-position: -780px -240px; } +.emoji-1F939-1F3FE { background-position: -780px -260px; } +.emoji-1F939-1F3FF { background-position: -780px -280px; } +.emoji-1F93A { background-position: -780px -300px; } +.emoji-1F93C { background-position: -780px -320px; } +.emoji-1F93C-1F3FB { background-position: -780px -340px; } +.emoji-1F93C-1F3FC { background-position: -780px -360px; } +.emoji-1F93C-1F3FD { background-position: -780px -380px; } +.emoji-1F93C-1F3FE { background-position: -780px -400px; } +.emoji-1F93C-1F3FF { background-position: -780px -420px; } +.emoji-1F93D { background-position: -780px -440px; } +.emoji-1F93D-1F3FB { background-position: -780px -460px; } +.emoji-1F93D-1F3FC { background-position: -780px -480px; } +.emoji-1F93D-1F3FD { background-position: -780px -500px; } +.emoji-1F93D-1F3FE { background-position: -780px -520px; } +.emoji-1F93D-1F3FF { background-position: -780px -540px; } +.emoji-1F93E { background-position: -780px -560px; } +.emoji-1F93E-1F3FB { background-position: -780px -580px; } +.emoji-1F93E-1F3FC { background-position: -780px -600px; } +.emoji-1F93E-1F3FD { background-position: -780px -620px; } +.emoji-1F93E-1F3FE { background-position: -780px -640px; } +.emoji-1F93E-1F3FF { background-position: -780px -660px; } +.emoji-1F940 { background-position: -780px -680px; } +.emoji-1F941 { background-position: -780px -700px; } +.emoji-1F942 { background-position: -780px -720px; } +.emoji-1F943 { background-position: -780px -740px; } +.emoji-1F944 { background-position: -780px -760px; } +.emoji-1F945 { background-position: 0 -780px; } +.emoji-1F947 { background-position: -20px -780px; } +.emoji-1F948 { background-position: -40px -780px; } +.emoji-1F949 { background-position: -60px -780px; } +.emoji-1F94A { background-position: -80px -780px; } +.emoji-1F94B { background-position: -100px -780px; } +.emoji-1F950 { background-position: -120px -780px; } +.emoji-1F951 { background-position: -140px -780px; } +.emoji-1F952 { background-position: -160px -780px; } +.emoji-1F953 { background-position: -180px -780px; } +.emoji-1F954 { background-position: -200px -780px; } +.emoji-1F955 { background-position: -220px -780px; } +.emoji-1F956 { background-position: -240px -780px; } +.emoji-1F957 { background-position: -260px -780px; } +.emoji-1F958 { background-position: -280px -780px; } +.emoji-1F959 { background-position: -300px -780px; } +.emoji-1F95A { background-position: -320px -780px; } +.emoji-1F95B { background-position: -340px -780px; } +.emoji-1F95C { background-position: -360px -780px; } +.emoji-1F95D { background-position: -380px -780px; } +.emoji-1F95E { background-position: -400px -780px; } +.emoji-1F980 { background-position: -420px -780px; } +.emoji-1F981 { background-position: -440px -780px; } +.emoji-1F982 { background-position: -460px -780px; } +.emoji-1F983 { background-position: -480px -780px; } +.emoji-1F984 { background-position: -500px -780px; } +.emoji-1F985 { background-position: -520px -780px; } +.emoji-1F986 { background-position: -540px -780px; } +.emoji-1F987 { background-position: -560px -780px; } +.emoji-1F988 { background-position: -580px -780px; } +.emoji-1F989 { background-position: -600px -780px; } +.emoji-1F98A { background-position: -620px -780px; } +.emoji-1F98B { background-position: -640px -780px; } +.emoji-1F98C { background-position: -660px -780px; } +.emoji-1F98D { background-position: -680px -780px; } +.emoji-1F98E { background-position: -700px -780px; } +.emoji-1F98F { background-position: -720px -780px; } +.emoji-1F990 { background-position: -740px -780px; } +.emoji-1F991 { background-position: -760px -780px; } +.emoji-1F9C0 { background-position: -780px -780px; } +.emoji-203C { background-position: -800px 0; } +.emoji-2049 { background-position: -800px -20px; } +.emoji-2122 { background-position: -800px -40px; } +.emoji-2139 { background-position: -800px -60px; } +.emoji-2194 { background-position: -800px -80px; } +.emoji-2195 { background-position: -800px -100px; } +.emoji-2196 { background-position: -800px -120px; } +.emoji-2197 { background-position: -800px -140px; } +.emoji-2198 { background-position: -800px -160px; } +.emoji-2199 { background-position: -800px -180px; } +.emoji-21A9 { background-position: -800px -200px; } +.emoji-21AA { background-position: -800px -220px; } +.emoji-231A { background-position: -800px -240px; } +.emoji-231B { background-position: -800px -260px; } +.emoji-2328 { background-position: -800px -280px; } +.emoji-23CF { background-position: -800px -300px; } +.emoji-23E9 { background-position: -800px -320px; } +.emoji-23EA { background-position: -800px -340px; } +.emoji-23EB { background-position: -800px -360px; } +.emoji-23EC { background-position: -800px -380px; } +.emoji-23ED { background-position: -800px -400px; } +.emoji-23EE { background-position: -800px -420px; } +.emoji-23EF { background-position: -800px -440px; } +.emoji-23F0 { background-position: -800px -460px; } +.emoji-23F1 { background-position: -800px -480px; } +.emoji-23F2 { background-position: -800px -500px; } +.emoji-23F3 { background-position: -800px -520px; } +.emoji-23F8 { background-position: -800px -540px; } +.emoji-23F9 { background-position: -800px -560px; } +.emoji-23FA { background-position: -800px -580px; } +.emoji-24C2 { background-position: -800px -600px; } +.emoji-25AA { background-position: -800px -620px; } +.emoji-25AB { background-position: -800px -640px; } +.emoji-25B6 { background-position: -800px -660px; } +.emoji-25C0 { background-position: -800px -680px; } +.emoji-25FB { background-position: -800px -700px; } +.emoji-25FC { background-position: -800px -720px; } +.emoji-25FD { background-position: -800px -740px; } +.emoji-25FE { background-position: -800px -760px; } +.emoji-2600 { background-position: -800px -780px; } +.emoji-2601 { background-position: 0 -800px; } +.emoji-2602 { background-position: -20px -800px; } +.emoji-2603 { background-position: -40px -800px; } +.emoji-2604 { background-position: -60px -800px; } +.emoji-260E { background-position: -80px -800px; } +.emoji-2611 { background-position: -100px -800px; } +.emoji-2614 { background-position: -120px -800px; } +.emoji-2615 { background-position: -140px -800px; } +.emoji-2618 { background-position: -160px -800px; } +.emoji-261D { background-position: -180px -800px; } +.emoji-261D-1F3FB { background-position: -200px -800px; } +.emoji-261D-1F3FC { background-position: -220px -800px; } +.emoji-261D-1F3FD { background-position: -240px -800px; } +.emoji-261D-1F3FE { background-position: -260px -800px; } +.emoji-261D-1F3FF { background-position: -280px -800px; } +.emoji-2620 { background-position: -300px -800px; } +.emoji-2622 { background-position: -320px -800px; } +.emoji-2623 { background-position: -340px -800px; } +.emoji-2626 { background-position: -360px -800px; } +.emoji-262A { background-position: -380px -800px; } +.emoji-262E { background-position: -400px -800px; } +.emoji-262F { background-position: -420px -800px; } +.emoji-2638 { background-position: -440px -800px; } +.emoji-2639 { background-position: -460px -800px; } +.emoji-263A { background-position: -480px -800px; } +.emoji-2648 { background-position: -500px -800px; } +.emoji-2649 { background-position: -520px -800px; } +.emoji-264A { background-position: -540px -800px; } +.emoji-264B { background-position: -560px -800px; } +.emoji-264C { background-position: -580px -800px; } +.emoji-264D { background-position: -600px -800px; } +.emoji-264E { background-position: -620px -800px; } +.emoji-264F { background-position: -640px -800px; } +.emoji-2650 { background-position: -660px -800px; } +.emoji-2651 { background-position: -680px -800px; } +.emoji-2652 { background-position: -700px -800px; } +.emoji-2653 { background-position: -720px -800px; } +.emoji-2660 { background-position: -740px -800px; } +.emoji-2663 { background-position: -760px -800px; } +.emoji-2665 { background-position: -780px -800px; } +.emoji-2666 { background-position: -800px -800px; } +.emoji-2668 { background-position: -820px 0; } +.emoji-267B { background-position: -820px -20px; } +.emoji-267F { background-position: -820px -40px; } +.emoji-2692 { background-position: -820px -60px; } +.emoji-2693 { background-position: -820px -80px; } +.emoji-2694 { background-position: -820px -100px; } +.emoji-2696 { background-position: -820px -120px; } +.emoji-2697 { background-position: -820px -140px; } +.emoji-2699 { background-position: -820px -160px; } +.emoji-269B { background-position: -820px -180px; } +.emoji-269C { background-position: -820px -200px; } +.emoji-26A0 { background-position: -820px -220px; } +.emoji-26A1 { background-position: -820px -240px; } +.emoji-26AA { background-position: -820px -260px; } +.emoji-26AB { background-position: -820px -280px; } +.emoji-26B0 { background-position: -820px -300px; } +.emoji-26B1 { background-position: -820px -320px; } +.emoji-26BD { background-position: -820px -340px; } +.emoji-26BE { background-position: -820px -360px; } +.emoji-26C4 { background-position: -820px -380px; } +.emoji-26C5 { background-position: -820px -400px; } +.emoji-26C8 { background-position: -820px -420px; } +.emoji-26CE { background-position: -820px -440px; } +.emoji-26CF { background-position: -820px -460px; } +.emoji-26D1 { background-position: -820px -480px; } +.emoji-26D3 { background-position: -820px -500px; } +.emoji-26D4 { background-position: -820px -520px; } +.emoji-26E9 { background-position: -820px -540px; } +.emoji-26EA { background-position: -820px -560px; } +.emoji-26F0 { background-position: -820px -580px; } +.emoji-26F1 { background-position: -820px -600px; } +.emoji-26F2 { background-position: -820px -620px; } +.emoji-26F3 { background-position: -820px -640px; } +.emoji-26F4 { background-position: -820px -660px; } +.emoji-26F5 { background-position: -820px -680px; } +.emoji-26F7 { background-position: -820px -700px; } +.emoji-26F8 { background-position: -820px -720px; } +.emoji-26F9 { background-position: -820px -740px; } +.emoji-26F9-1F3FB { background-position: -820px -760px; } +.emoji-26F9-1F3FC { background-position: -820px -780px; } +.emoji-26F9-1F3FD { background-position: -820px -800px; } +.emoji-26F9-1F3FE { background-position: 0 -820px; } +.emoji-26F9-1F3FF { background-position: -20px -820px; } +.emoji-26FA { background-position: -40px -820px; } +.emoji-26FD { background-position: -60px -820px; } +.emoji-2702 { background-position: -80px -820px; } +.emoji-2705 { background-position: -100px -820px; } +.emoji-2708 { background-position: -120px -820px; } +.emoji-2709 { background-position: -140px -820px; } +.emoji-270A { background-position: -160px -820px; } +.emoji-270A-1F3FB { background-position: -180px -820px; } +.emoji-270A-1F3FC { background-position: -200px -820px; } +.emoji-270A-1F3FD { background-position: -220px -820px; } +.emoji-270A-1F3FE { background-position: -240px -820px; } +.emoji-270A-1F3FF { background-position: -260px -820px; } +.emoji-270B { background-position: -280px -820px; } +.emoji-270B-1F3FB { background-position: -300px -820px; } +.emoji-270B-1F3FC { background-position: -320px -820px; } +.emoji-270B-1F3FD { background-position: -340px -820px; } +.emoji-270B-1F3FE { background-position: -360px -820px; } +.emoji-270B-1F3FF { background-position: -380px -820px; } +.emoji-270C { background-position: -400px -820px; } +.emoji-270C-1F3FB { background-position: -420px -820px; } +.emoji-270C-1F3FC { background-position: -440px -820px; } +.emoji-270C-1F3FD { background-position: -460px -820px; } +.emoji-270C-1F3FE { background-position: -480px -820px; } +.emoji-270C-1F3FF { background-position: -500px -820px; } +.emoji-270D { background-position: -520px -820px; } +.emoji-270D-1F3FB { background-position: -540px -820px; } +.emoji-270D-1F3FC { background-position: -560px -820px; } +.emoji-270D-1F3FD { background-position: -580px -820px; } +.emoji-270D-1F3FE { background-position: -600px -820px; } +.emoji-270D-1F3FF { background-position: -620px -820px; } +.emoji-270F { background-position: -640px -820px; } +.emoji-2712 { background-position: -660px -820px; } +.emoji-2714 { background-position: -680px -820px; } +.emoji-2716 { background-position: -700px -820px; } +.emoji-271D { background-position: -720px -820px; } +.emoji-2721 { background-position: -740px -820px; } +.emoji-2728 { background-position: -760px -820px; } +.emoji-2733 { background-position: -780px -820px; } +.emoji-2734 { background-position: -800px -820px; } +.emoji-2744 { background-position: -820px -820px; } +.emoji-2747 { background-position: -840px 0; } +.emoji-274C { background-position: -840px -20px; } +.emoji-274E { background-position: -840px -40px; } +.emoji-2753 { background-position: -840px -60px; } +.emoji-2754 { background-position: -840px -80px; } +.emoji-2755 { background-position: -840px -100px; } +.emoji-2757 { background-position: -840px -120px; } +.emoji-2763 { background-position: -840px -140px; } +.emoji-2764 { background-position: -840px -160px; } +.emoji-2795 { background-position: -840px -180px; } +.emoji-2796 { background-position: -840px -200px; } +.emoji-2797 { background-position: -840px -220px; } +.emoji-27A1 { background-position: -840px -240px; } +.emoji-27B0 { background-position: -840px -260px; } +.emoji-27BF { background-position: -840px -280px; } +.emoji-2934 { background-position: -840px -300px; } +.emoji-2935 { background-position: -840px -320px; } +.emoji-2B05 { background-position: -840px -340px; } +.emoji-2B06 { background-position: -840px -360px; } +.emoji-2B07 { background-position: -840px -380px; } +.emoji-2B1B { background-position: -840px -400px; } +.emoji-2B1C { background-position: -840px -420px; } +.emoji-2B50 { background-position: -840px -440px; } +.emoji-2B55 { background-position: -840px -460px; } +.emoji-3030 { background-position: -840px -480px; } +.emoji-303D { background-position: -840px -500px; } +.emoji-3297 { background-position: -840px -520px; } +.emoji-3299 { background-position: -840px -540px; } .emoji-icon { background-image: image-url('emoji.png'); @@ -1731,6 +1804,6 @@ only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { background-image: image-url('emoji@2x.png'); - background-size: 840px 820px; + background-size: 860px 840px; } } diff --git a/app/views/emojis/index.html.haml b/app/views/emojis/index.html.haml index 8b38b4c2bd4..790d90ad3ee 100644 --- a/app/views/emojis/index.html.haml +++ b/app/views/emojis/index.html.haml @@ -1,5 +1,5 @@ .emoji-menu - = text_field_tag :emoji_search, "", class: "emoji-search search-input form-control", placeholder: "Seach emojis" + = text_field_tag :emoji_search, "", class: "emoji-search search-input form-control", placeholder: "Search emoji" .emoji-menu-content - Gitlab::AwardEmoji.emoji_by_category.each do |category, emojis| %h5.emoji-menu-title diff --git a/config/application.rb b/config/application.rb index 5f7b6a3c049..50cc4235eda 100644 --- a/config/application.rb +++ b/config/application.rb @@ -76,7 +76,7 @@ module Gitlab # Enable the asset pipeline config.assets.enabled = true - config.assets.paths << Gemojione.index.images_path + config.assets.paths << Gemojione.images_path config.assets.precompile << "*.png" config.assets.precompile << "print.css" config.assets.precompile << "notify.css" diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md index 41685c7ee41..8852dbcb19e 100644 --- a/doc/development/rake_tasks.md +++ b/doc/development/rake_tasks.md @@ -53,3 +53,8 @@ Generating a sprite file containing all the Emoji can be done by running: ``` bundle exec rake gemojione:sprite ``` + +If new emoji are added, the spritesheet may change size. To compensate for +such changes, first generate the `emoji.png` spritesheet with the above Rake +task, then check the dimensions of the new spritesheet and update the +`SPRITESHEET_WIDTH` and `SPRITESHEET_HEIGHT` constants accordingly. diff --git a/fixtures/emojis/aliases.json b/fixtures/emojis/aliases.json index d3831d8045b..e2f47db0de2 100644 --- a/fixtures/emojis/aliases.json +++ b/fixtures/emojis/aliases.json @@ -1,16 +1,9 @@ { - "northeast_pointing_airplane":"airplane_northeast", "small_airplane":"airplane_small", - "up_pointing_small_airplane":"airplane_small_up", - "up_pointing_airplane":"airplane_up", - "left_anger_bubble":"anger_left", "right_anger_bubble":"anger_right", "keycap_asterisk":"asterisk", "atom_symbol":"atom", "ballot_box_with_ballot":"ballot_box", - "ballot_box_with_bold_check":"ballot_box_check", - "ballot_box_with_script_x":"ballot_box_x", - "ballot_script_x":"ballot_x", "person_with_ball":"basketball_player", "person_with_ball_tone1":"basketball_player_tone1", "person_with_ball_tone2":"basketball_player_tone2", @@ -21,51 +14,65 @@ "umbrella_on_ground":"beach_umbrella", "bellhop_bell":"bellhop", "biohazard_sign":"biohazard", - "bouquet_of_flowers":"bouquet2", "archery":"bow_and_arrow", - "bullhorn_with_sound_waves":"bullhorn_waves", - "pocket calculator":"calculator", + "boxing_gloves":"boxing_glove", "spiral_calendar_pad":"calendar_spiral", + "call_me_hand":"call_me", + "call_me_hand_tone1":"call_me_tone1", + "call_me_hand_tone2":"call_me_tone2", + "call_me_hand_tone3":"call_me_tone3", + "call_me_hand_tone4":"call_me_tone4", + "call_me_hand_tone5":"call_me_tone5", + "kayak":"canoe", "card_file_box":"card_box", - "tape_cartridge":"cartridge", + "person_doing_cartwheel":"cartwheel", + "person_doing_cartwheel_tone1":"cartwheel_tone1", + "person_doing_cartwheel_tone2":"cartwheel_tone2", + "person_doing_cartwheel_tone3":"cartwheel_tone3", + "person_doing_cartwheel_tone4":"cartwheel_tone4", + "person_doing_cartwheel_tone5":"cartwheel_tone5", "bottle_with_popping_cork":"champagne", + "clinking_glass":"champagne_glass", "cheese_wedge":"cheese", "city_sunrise":"city_sunset", "mantlepiece_clock":"clock", - "clockwise_right_and_left_semicircle_arrows":"clockwise_arrows", "cloud_with_lightning":"cloud_lightning", "cloud_with_rain":"cloud_rain", "cloud_with_snow":"cloud_snow", "cloud_with_tornado":"cloud_tornado", - "old_personal_computer":"computer_old", - "building_construction":"contruction_site", + "clown_face":"clown", + "building_construction":"construction_site", "couch_and_lamp":"couch", "couple_with_heart_mm":"couple_mm", "couple_with_heart_ww":"couple_ww", + "face_with_cowboy_hat":"cowboy", "lower_left_crayon":"crayon", "cricket_bat_ball":"cricket", "latin_cross":"cross", - "heavy_latin_cross":"cross_heavy", - "white_latin_cross":"cross_white", - "black_skull_and_crossbones":"crossbones", "passenger_ship":"cruise_ship", "dagger_knife":"dagger", "desktop_computer":"desktop", "card_index_dividers":"dividers", - "document_with_text":"document_text", "dove_of_peace":"dove", + "drool":"drooling_face", + "drum_with_drumsticks":"drum", "email":"e-mail", - "back_of_envelope":"envelope_back", - "flying_envelope":"envelope_flying", - "stamped_envelope":"envelope_stamped", - "pen_over_stamped_envelope":"envelope_stamped_pen", - "white_down_pointing_left_hand_index":"finger_pointing_down", - "sideways_white_down_pointing_index":"finger_pointing_down2", - "sideways_white_left_pointing_index":"finger_pointing_left", - "sideways_white_right_pointing_index":"finger_pointing_right", - "sideways_white_up_pointing_index":"finger_pointing_up", + "eject_symbol":"eject", + "facepalm":"face_palm", + "facepalm_tone1":"face_palm_tone1", + "facepalm_tone2":"face_palm_tone2", + "facepalm_tone3":"face_palm_tone3", + "facepalm_tone4":"face_palm_tone4", + "facepalm_tone5":"face_palm_tone5", + "fencing":"fencer", + "hand_with_index_and_middle_finger_crossed":"fingers_crossed", + "hand_with_index_and_middle_fingers_crossed_tone1":"fingers_crossed_tone1", + "hand_with_index_and_middle_fingers_crossed_tone2":"fingers_crossed_tone2", + "hand_with_index_and_middle_fingers_crossed_tone3":"fingers_crossed_tone3", + "hand_with_index_and_middle_fingers_crossed_tone4":"fingers_crossed_tone4", + "hand_with_index_and_middle_fingers_crossed_tone5":"fingers_crossed_tone5", "flame":"fire", - "oncoming_fire_engine":"fire_engine_oncoming", + "first_place_medal":"first_place", "ac":"flag_ac", "ad":"flag_ad", "ae":"flag_ae", @@ -326,44 +333,51 @@ "za":"flag_za", "zm":"flag_zm", "zw":"flag_zw", - "clamshell_mobile_phone":"flip_phone", - "black_hard_shell_floppy_disk":"floppy_black", - "white_hard_shell_floppy_disk":"floppy_white", - "open_folder":"folder_open", "fork_and_knife_with_plate":"fork_knife_plate", + "fox_face":"fox", "frame_with_picture":"frame_photo", - "frame_with_tiles":"frame_tiles", - "frame_with_an_x":"frame_x", + "baguette_bread":"french_bread", "anguished":"frowning", "white_frowning_face":"frowning2", + "goal_net":"goal", "hammer_and_pick":"hammer_pick", "raised_hand_with_fingers_splayed":"hand_splayed", - "reversed_raised_hand_with_fingers_splayed":"hand_splayed_reverse", "raised_hand_with_fingers_splayed_tone1":"hand_splayed_tone1", "raised_hand_with_fingers_splayed_tone2":"hand_splayed_tone2", "raised_hand_with_fingers_splayed_tone3":"hand_splayed_tone3", "raised_hand_with_fingers_splayed_tone4":"hand_splayed_tone4", "raised_hand_with_fingers_splayed_tone5":"hand_splayed_tone5", - "reversed_victory_hand":"hand_victory", + "shaking_hands":"handshake", + "shaking_hands_tone1":"handshake_tone1", + "shaking_hands_tone2":"handshake_tone2", + "shaking_hands_tone3":"handshake_tone3", + "shaking_hands_tone4":"handshake_tone4", + "shaking_hands_tone5":"handshake_tone5", "face_with_head_bandage":"head_bandage", "heavy_heart_exclamation_mark_ornament":"heart_exclamation", - "heart_with_tip_on_the_left":"heart_tip", "helmet_with_white_cross":"helmet_with_cross", "house_buildings":"homes", "hot_dog":"hotdog", "derelict_house_building":"house_abandoned", "hugging_face":"hugging", - "circled_information_source":"info", "desert_island":"island", - "up_pointing_military_airplane":"jet_up", + "juggler":"juggling", + "juggler_tone1":"juggling_tone1", + "juggler_tone2":"juggling_tone2", + "juggler_tone3":"juggling_tone3", + "juggler_tone4":"juggling_tone4", + "juggler_tone5":"juggling_tone5", "old_key":"key2", - "wired_keyboard":"keyboard", - "keyboard_and_mouse":"keyboard_mouse", - "musical_keyboard_with_jacks":"keyboard_with_jacks", "couplekiss_mm":"kiss_mm", "couplekiss_ww":"kiss_ww", + "kiwifruit":"kiwi", "satisfied":"laughing", - "left_hand_telephone_receiver":"left_receiver", + "left_fist":"left_facing_fist", + "left_fist_tone1":"left_facing_fist_tone1", + "left_fist_tone2":"left_facing_fist_tone2", + "left_fist_tone3":"left_facing_fist_tone3", + "left_fist_tone4":"left_facing_fist_tone4", + "left_fist_tone5":"left_facing_fist_tone5", "man_in_business_suit_levitating":"levitate", "weight_lifter":"lifter", "weight_lifter_tone1":"lifter_tone1", @@ -371,9 +385,21 @@ "weight_lifter_tone3":"lifter_tone3", "weight_lifter_tone4":"lifter_tone4", "weight_lifter_tone5":"lifter_tone5", - "light_mark":"light_check_mark", "lion":"lion_face", + "liar":"lying_face", + "male_dancer":"man_dancing", + "male_dancer_tone1":"man_dancing_tone1", + "male_dancer_tone2":"man_dancing_tone2", + "male_dancer_tone3":"man_dancing_tone3", + "male_dancer_tone4":"man_dancing_tone4", + "male_dancer_tone5":"man_dancing_tone5", + "tuxedo_tone1":"man_in_tuxedo_tone1", + "tuxedo_tone2":"man_in_tuxedo_tone2", + "tuxedo_tone3":"man_in_tuxedo_tone3", + "tuxedo_tone4":"man_in_tuxedo_tone4", + "tuxedo_tone5":"man_in_tuxedo_tone5", "world_map":"map", + "karate_uniform":"martial_arts_uniform", "sports_medal":"medal", "sign_of_the_horns":"metal", "sign_of_the_horns_tone1":"metal_tone1", @@ -388,21 +414,23 @@ "reversed_hand_with_middle_finger_extended_tone3":"middle_finger_tone3", "reversed_hand_with_middle_finger_extended_tone4":"middle_finger_tone4", "reversed_hand_with_middle_finger_extended_tone5":"middle_finger_tone5", + "glass_of_milk":"milk", "money_mouth_face":"money_mouth", - "lightning_mood_bubble":"mood_bubble_lightning", - "lightning_mood":"mood_lightning", + "motorbike":"motor_scooter", "racing_motorcycle":"motorcycle", "snow_capped_mountain":"mountain_snow", - "one_button_mouse":"mouse_one", "three_button_mouse":"mouse_three_button", + "mother_christmas":"mrs_claus", + "mother_christmas_tone1":"mrs_claus_tone1", + "mother_christmas_tone2":"mrs_claus_tone2", + "mother_christmas_tone3":"mrs_claus_tone3", + "mother_christmas_tone4":"mrs_claus_tone4", + "mother_christmas_tone5":"mrs_claus_tone5", + "sick":"nauseated_face", "nerd_face":"nerd", - "three_networked_computers":"network", "rolled_up_newspaper":"newspaper2", - "note_page":"note", - "empty_note_page":"note_empty", - "note_pad":"notepad", - "empty_note_pad":"notepad_empty", "spiral_note_pad":"notepad_spiral", + "stop_sign":"octagonal_sign", "oil_drum":"oil", "grandma":"older_woman", "grandma_tone1":"older_woman_tone1", @@ -410,57 +438,66 @@ "grandma_tone3":"older_woman_tone3", "grandma_tone4":"older_woman_tone4", "grandma_tone5":"older_woman_tone5", - "optical_disc_icon":"optical_disk", "lower_left_paintbrush":"paintbrush", "linked_paperclips":"paperclips", "national_park":"park", "double_vertical_bar":"pause_button", "peace_symbol":"peace", + "shelled_peanut":"peanuts", "lower_left_ballpoint_pen":"pen_ballpoint", "lower_left_fountain_pen":"pen_fountain", "memo":"pencil", - "lower_left_pencil":"pencil3", - "black_pennant":"pennant_black", - "white_pennant":"pennant_white", "table_tennis":"ping_pong", - "no_piracy":"piracy", "worship_symbol":"place_of_worship", "shit":"poop", "hankey":"poop", "poo":"poop", - "prohibited_sign":"prohibited", + "expecting_woman":"pregnant_woman", + "expecting_woman_tone1":"pregnant_woman_tone1", + "expecting_woman_tone2":"pregnant_woman_tone2", + "expecting_woman_tone3":"pregnant_woman_tone3", + "expecting_woman_tone4":"pregnant_woman_tone4", + "expecting_woman_tone5":"pregnant_woman_tone5", "film_projector":"projector", "racing_car":"race_car", "radioactive_sign":"radioactive", "railroad_track":"railway_track", - "right_speaker_with_one_sound_wave":"right_speaker_one", - "right_speaker_with_three_sound_waves":"right_speaker_three", + "back_of_hand":"raised_back_of_hand", + "back_of_hand_tone1":"raised_back_of_hand_tone1", + "back_of_hand_tone2":"raised_back_of_hand_tone2", + "back_of_hand_tone3":"raised_back_of_hand_tone3", + "back_of_hand_tone4":"raised_back_of_hand_tone4", + "back_of_hand_tone5":"raised_back_of_hand_tone5", + "rhinoceros":"rhino", + "right_fist":"right_facing_fist", + "right_fist_tone1":"right_facing_fist_tone1", + "right_fist_tone2":"right_facing_fist_tone2", + "right_fist_tone3":"right_facing_fist_tone3", + "right_fist_tone4":"right_facing_fist_tone4", + "right_fist_tone5":"right_facing_fist_tone5", "robot_face":"robot", + "rolling_on_the_floor_laughing":"rofl", "face_with_rolling_eyes":"rolling_eyes", + "green_salad":"salad", + "second_place_medal":"second_place", + "paella":"shallow_pan_of_food", + "shopping_trolley":"shopping_cart", "skeleton":"skull", "skull_and_crossbones":"skull_crossbones", "slightly_frowning_face":"slight_frown", "slightly_smiling_face":"slight_smile", + "sneeze":"sneezing_face", "speaking_head_in_silhouette":"speaking_head", - "left_speech_bubble":"speech_left", - "right_speech_bubble":"speech_right", - "three_speech_bubbles":"speech_three", - "two_speech_bubbles":"speech_two", "sleuth_or_spy":"spy", "sleuth_or_spy_tone1":"spy_tone1", "sleuth_or_spy_tone2":"spy_tone2", "sleuth_or_spy_tone3":"spy_tone3", "sleuth_or_spy_tone4":"spy_tone4", "sleuth_or_spy_tone5":"spy_tone5", - "portable_stereo":"stereo", - "black_touchtone_telephone":"telephone_black", - "white_touchtone_telephone":"telephone_white", + "stuffed_pita":"stuffed_flatbread", "face_with_thermometer":"thermometer_face", "thinking_face":"thinking", - "left_thought_bubble":"thought_left", - "right_thought_bubble":"thought_right", - "reversed_thumbs_down_sign":"thumbs_down_reverse", - "reversed_thumbs_up_sign":"thumbs_up_reverse", + "third_place_medal":"third_place", "-1":"thumbsdown", "-1_tone1":"thumbsdown_tone1", "-1_tone2":"thumbsdown_tone2", @@ -479,9 +516,7 @@ "hammer_and_wrench":"tools", "next_track":"track_next", "previous_track":"track_previous", - "diesel_locomotive":"train_diesel", - "triangle_with_rounded_corners":"triangle_round", - "turned_ok_hand_sign":"turned_ok_hand", + "whisky":"tumbler_glass", "unicorn_face":"unicorn", "upside_down_face":"upside_down", "funeral_urn":"urn", @@ -494,6 +529,12 @@ "white_sun_behind_cloud":"white_sun_cloud", "white_sun_behind_cloud_with_rain":"white_sun_rain_cloud", "white_sun_with_small_cloud":"white_sun_small_cloud", - "left_writing_hand":"writing_hand", + "wilted_flower":"wilted_rose", + "wrestling":"wrestlers", + "wrestling_tone1":"wrestlers_tone1", + "wrestling_tone2":"wrestlers_tone2", + "wrestling_tone3":"wrestlers_tone3", + "wrestling_tone4":"wrestlers_tone4", + "wrestling_tone5":"wrestlers_tone5", "zipper_mouth_face":"zipper_mouth" } diff --git a/fixtures/emojis/digests.json b/fixtures/emojis/digests.json index 50ee5089d8f..078d3413f33 100644 --- a/fixtures/emojis/digests.json +++ b/fixtures/emojis/digests.json @@ -59,16 +59,6 @@ "unicode": "1F6EB", "digest": "5544eace06b8e1b6ea91940e893e013d33d6b166e14e6d128a87f2cd2de88332" }, - { - "name": "airplane_northeast", - "unicode": "1F6EA", - "digest": "fdddc2cd3618ec6661612581b8b93553cb086b0bb197e96aedf1bee8055e7bb4" - }, - { - "name": "northeast_pointing_airplane", - "unicode": "1F6EA", - "digest": "fdddc2cd3618ec6661612581b8b93553cb086b0bb197e96aedf1bee8055e7bb4" - }, { "name": "airplane_small", "unicode": "1F6E9", @@ -79,26 +69,6 @@ "unicode": "1F6E9", "digest": "1a2e07abbbe90d05cee7ff8dd52f443d595ccb38959f3089fe016b77e5d6de7d" }, - { - "name": "airplane_small_up", - "unicode": "1F6E8", - "digest": "029752b29a757c087dec60f45ea242e974fc181129e20390d5d4a2f90442091a" - }, - { - "name": "up_pointing_small_airplane", - "unicode": "1F6E8", - "digest": "029752b29a757c087dec60f45ea242e974fc181129e20390d5d4a2f90442091a" - }, - { - "name": "airplane_up", - "unicode": "1F6E7", - "digest": "ec45d4dbfce1f75dc59339417b1dcf5f1e1359cd9d04ff233babf359a3330e77" - }, - { - "name": "up_pointing_airplane", - "unicode": "1F6E7", - "digest": "ec45d4dbfce1f75dc59339417b1dcf5f1e1359cd9d04ff233babf359a3330e77" - }, { "name": "alarm_clock", "unicode": "23F0", @@ -164,16 +134,6 @@ "unicode": "1F4A2", "digest": "332493913891aa0eda2743b4bb16c4682400f249998bf34eb292246c9009e17f" }, - { - "name": "anger_left", - "unicode": "1F5EE", - "digest": "f2711991e8b386b2d5b12f296ce20a9b4b00ef91d6d67af2cf4e06abf2faa1dc" - }, - { - "name": "left_anger_bubble", - "unicode": "1F5EE", - "digest": "f2711991e8b386b2d5b12f296ce20a9b4b00ef91d6d67af2cf4e06abf2faa1dc" - }, { "name": "anger_right", "unicode": "1F5EF", @@ -324,11 +284,6 @@ "unicode": "1F69B", "digest": "c115e6613ebd718268aa31d265e017138b9fb58bbb8201eb3f40de2380e460aa" }, - { - "name": "ascending_notes", - "unicode": "1F39C", - "digest": "33432042771d456338dda5d98e49322d3600f2cc9049963480c7c38d9de1ef0a" - }, { "name": "asterisk", "unicode": "002A-20E3", @@ -364,6 +319,11 @@ "unicode": "269B", "digest": "6b6bb83b00707a314e46ff8eefbda40978a291ec7881caba1b1ee273f49c1368" }, + { + "name": "avocado", + "unicode": "1F951", + "digest": "bc1fb203d63b18985598400925de24050bb192afda1cbf0813f85cb139869eff" + }, { "name": "b", "unicode": "1F171", @@ -419,6 +379,11 @@ "unicode": "1F519", "digest": "083e4e48b51092c28efb4532e840e1091b5d4b685c6e0f221aa0228f061cd91e" }, + { + "name": "bacon", + "unicode": "1F953", + "digest": "18ad3817f1f88a69706db5727a58e763dde6c21a2d4f184c3d728c32dc5fa05a" + }, { "name": "badminton", "unicode": "1F3F8", @@ -444,41 +409,11 @@ "unicode": "1F5F3", "digest": "4175a56eca5c6458574a681e109b1403fbb143cf27f69ae6c1917650f3e08892" }, - { - "name": "ballot_box_check", - "unicode": "1F5F9", - "digest": "fc3ba16c009d963a4a0ea20a348ac98eee3c4c18c481df19a5ada0d1de7fcc15" - }, - { - "name": "ballot_box_with_bold_check", - "unicode": "1F5F9", - "digest": "fc3ba16c009d963a4a0ea20a348ac98eee3c4c18c481df19a5ada0d1de7fcc15" - }, { "name": "ballot_box_with_check", "unicode": "2611", "digest": "c98d6f3588dd87e2f318bbfe6c646399a905450edfd814edae4e5b1bddef2134" }, - { - "name": "ballot_box_x", - "unicode": "1F5F5", - "digest": "861dcfc2361298262587b5d0e163fed96a55c44636361f5b4a9ab1d6502b8928" - }, - { - "name": "ballot_box_with_script_x", - "unicode": "1F5F5", - "digest": "861dcfc2361298262587b5d0e163fed96a55c44636361f5b4a9ab1d6502b8928" - }, - { - "name": "ballot_x", - "unicode": "1F5F4", - "digest": "0b73b89847eb82bcad5664644c8af237e0aef6c3d8c94b7a5df94e05d0ebf4e1" - }, - { - "name": "ballot_script_x", - "unicode": "1F5F4", - "digest": "0b73b89847eb82bcad5664644c8af237e0aef6c3d8c94b7a5df94e05d0ebf4e1" - }, { "name": "bamboo", "unicode": "1F38D", @@ -579,6 +514,11 @@ "unicode": "26F9-1F3FF", "digest": "c631cefc5d2a0a31bdb9f0a0d97ea68b1c6928e565468998403034644572a0b0" }, + { + "name": "bat", + "unicode": "1F987", + "digest": "8fc19e0d7d6f80906bdbc06d616a810de66180d96cf28070a53fa61b88904535" + }, { "name": "bath", "unicode": "1F6C0", @@ -759,6 +699,11 @@ "unicode": "26AB", "digest": "c2ba672994ad0f99d7fdc449f3fee45a2dca68a58f9fe95825b38465a30ef44e" }, + { + "name": "black_heart", + "unicode": "1F5A4", + "digest": "f334679168d6dd7328c28e9ae3cb2b1fca0e9c2777938d586bfe623db2a688b9" + }, { "name": "black_joker", "unicode": "1F0CF", @@ -839,11 +784,6 @@ "unicode": "1F4D6", "digest": "9d912a9d1bb10dc7f2645b345ed09e90461e83df0de275acb806f1f75cef1fcf" }, - { - "name": "book2", - "unicode": "1F56E", - "digest": "26d6b66a1957e7750b3e22eb2e46d0cc85932977bbb81d3d8482ec1ec58ee12b" - }, { "name": "bookmark", "unicode": "1F516", @@ -874,16 +814,6 @@ "unicode": "1F490", "digest": "b93751a27b40f6185a22b3e8b413f0fe09b6010d1057c672e1a23088e0b8286f" }, - { - "name": "bouquet2", - "unicode": "1F395", - "digest": "1643ec51ff26fc1ac0c67859e202386398650bf2a996c82b68e1b73fa52abf7d" - }, - { - "name": "bouquet_of_flowers", - "unicode": "1F395", - "digest": "1643ec51ff26fc1ac0c67859e202386398650bf2a996c82b68e1b73fa52abf7d" - }, { "name": "bow", "unicode": "1F647", @@ -929,6 +859,16 @@ "unicode": "1F3B3", "digest": "737f2cdfa4ac964baade585a39771b18080bd5e9b55c8661d3518f468f344662" }, + { + "name": "boxing_glove", + "unicode": "1F94A", + "digest": "c914b2ce45f20afad66ad6f0d1b0750c4469e4f48b686dfc4aad1ec8d289c563" + }, + { + "name": "boxing_gloves", + "unicode": "1F94A", + "digest": "c914b2ce45f20afad66ad6f0d1b0750c4469e4f48b686dfc4aad1ec8d289c563" + }, { "name": "boy", "unicode": "1F466", @@ -959,11 +899,6 @@ "unicode": "1F466-1F3FF", "digest": "0f76e97237203950da36c737dcc6f56dcd6c123401a8c817a0636376c7f38ef5" }, - { - "name": "boys_symbol", - "unicode": "1F6C9", - "digest": "47fadbcb876ca436264ce2f3ebd1472bd68f55cc2b4833bf054335be9dc7a0f2" - }, { "name": "bread", "unicode": "1F35E", @@ -1034,21 +969,6 @@ "unicode": "1F684", "digest": "96e74842e919716b7bbbab57339bfd70f099a9bcb4710dffd7c80cf38a7bbff7" }, - { - "name": "bullhorn", - "unicode": "1F56B", - "digest": "a4ca5cbfe299e8ccd148d17055d2d395cf8515e416bf771044c9a670509a8254" - }, - { - "name": "bullhorn_waves", - "unicode": "1F56C", - "digest": "92493636cf086205d1e12cc19e613b84152ef10b8cd0215619a0fc813bfc9a7c" - }, - { - "name": "bullhorn_with_sound_waves", - "unicode": "1F56C", - "digest": "92493636cf086205d1e12cc19e613b84152ef10b8cd0215619a0fc813bfc9a7c" - }, { "name": "burrito", "unicode": "1F32F", @@ -1074,6 +994,11 @@ "unicode": "1F465", "digest": "7fee96f1b68bb2c6002e47f2ed13c06baa6a3168441b9aca572db7ec45612f7b" }, + { + "name": "butterfly", + "unicode": "1F98B", + "digest": "a91b6598c17b44a8dc8935a1d99e25f4483ea41470cdd2da343039a9eec29ef1" + }, { "name": "cactus", "unicode": "1F335", @@ -1084,16 +1009,6 @@ "unicode": "1F370", "digest": "b928902df8084210d51c1da36f9119164a325393c391b28cd8ea914e0b95c17b" }, - { - "name": "calculator", - "unicode": "1F5A9", - "digest": "01b47b5c69c12b65fa4f4c0d580f2a98280d6116f4ad2cf8be378759008bcc3c" - }, - { - "name": "pocket calculator", - "unicode": "1F5A9", - "digest": "01b47b5c69c12b65fa4f4c0d580f2a98280d6116f4ad2cf8be378759008bcc3c" - }, { "name": "calendar", "unicode": "1F4C6", @@ -1109,6 +1024,66 @@ "unicode": "1F5D3", "digest": "441a0750eade7ce33e28e58bec76958990c412b68409fcdde59ebad1f25361bb" }, + { + "name": "call_me", + "unicode": "1F919", + "digest": "83d2ed96dcb8b4adf4f4d030ffd07e25ca16351e1a4fbefdf9f46f5ca496a55f" + }, + { + "name": "call_me_hand", + "unicode": "1F919", + "digest": "83d2ed96dcb8b4adf4f4d030ffd07e25ca16351e1a4fbefdf9f46f5ca496a55f" + }, + { + "name": "call_me_tone1", + "unicode": "1F919-1F3FB", + "digest": "4a5748efa83e7294e8338b8795d4d315ff1cd31ead6759004d0eb330e50de8cd" + }, + { + "name": "call_me_hand_tone1", + "unicode": "1F919-1F3FB", + "digest": "4a5748efa83e7294e8338b8795d4d315ff1cd31ead6759004d0eb330e50de8cd" + }, + { + "name": "call_me_tone2", + "unicode": "1F919-1F3FC", + "digest": "54feaa6e3c5789ae6e15622127f0e0213234b4b886e1588ce95814348b1f1519" + }, + { + "name": "call_me_hand_tone2", + "unicode": "1F919-1F3FC", + "digest": "54feaa6e3c5789ae6e15622127f0e0213234b4b886e1588ce95814348b1f1519" + }, + { + "name": "call_me_tone3", + "unicode": "1F919-1F3FD", + "digest": "57e949b951e14843b712dab5a828f915ee255f5bb973db33946aab4057427419" + }, + { + "name": "call_me_hand_tone3", + "unicode": "1F919-1F3FD", + "digest": "57e949b951e14843b712dab5a828f915ee255f5bb973db33946aab4057427419" + }, + { + "name": "call_me_tone4", + "unicode": "1F919-1F3FE", + "digest": "f7787e933978a09c7b8ab8d3b1e1ab395aaae998c455e93bb3db24a4c8a60fe0" + }, + { + "name": "call_me_hand_tone4", + "unicode": "1F919-1F3FE", + "digest": "f7787e933978a09c7b8ab8d3b1e1ab395aaae998c455e93bb3db24a4c8a60fe0" + }, + { + "name": "call_me_tone5", + "unicode": "1F919-1F3FF", + "digest": "1fdb7d833d000b117d20d48142d3026a61cc9c8b712ebb498fa66bf75c74d7a5" + }, + { + "name": "call_me_hand_tone5", + "unicode": "1F919-1F3FF", + "digest": "1fdb7d833d000b117d20d48142d3026a61cc9c8b712ebb498fa66bf75c74d7a5" + }, { "name": "calling", "unicode": "1F4F2", @@ -1134,11 +1109,6 @@ "unicode": "1F3D5", "digest": "a42a4ff9521affa72db7b0f01da169b4cb6afb9db1c5dfad47dd4c507bfc30d9" }, - { - "name": "cancellation_x", - "unicode": "1F5D9", - "digest": "cea2f7a48543207615ee06755ded62c2a95a7eaf7d7b68a3fc25e74d94e2c92c" - }, { "name": "cancer", "unicode": "264B", @@ -1154,6 +1124,16 @@ "unicode": "1F36C", "digest": "9cff4538918f60f770fceb96e964f5dc3ce31fd08ddd2ab3bfdf2981bfa74100" }, + { + "name": "canoe", + "unicode": "1F6F6", + "digest": "56ca308cc2ad4827468cf58c4ccf6ef6b3382835a91e935540a2b973e01d2572" + }, + { + "name": "kayak", + "unicode": "1F6F6", + "digest": "56ca308cc2ad4827468cf58c4ccf6ef6b3382835a91e935540a2b973e01d2572" + }, { "name": "capital_abcd", "unicode": "1F520", @@ -1185,14 +1165,69 @@ "digest": "c0e7059efc39a64233f774c02ddb1ab51888fff180f906ce13a6e4f9509672fe" }, { - "name": "cartridge", - "unicode": "1F5AD", - "digest": "0b1625eea118060b51a70905c1eb3313ed632e989f70943eca16aa29fe8a34f2" + "name": "carrot", + "unicode": "1F955", + "digest": "3a6fd98b63ee73d982a9cdacb08cf7b4014368cde8ffce6056b7df25a5a472b1" + }, + { + "name": "cartwheel", + "unicode": "1F938", + "digest": "d78de3435e0b04a9b1a1048ae12e63e3248f9ace3a0db4d3bda584f22af18863" + }, + { + "name": "person_doing_cartwheel", + "unicode": "1F938", + "digest": "d78de3435e0b04a9b1a1048ae12e63e3248f9ace3a0db4d3bda584f22af18863" }, { - "name": "tape_cartridge", - "unicode": "1F5AD", - "digest": "0b1625eea118060b51a70905c1eb3313ed632e989f70943eca16aa29fe8a34f2" + "name": "cartwheel_tone1", + "unicode": "1F938-1F3FB", + "digest": "39a49781a269bb40d8efc8fd73c973b00fb2e192850ea6073062b5dea0cd5b74" + }, + { + "name": "person_doing_cartwheel_tone1", + "unicode": "1F938-1F3FB", + "digest": "39a49781a269bb40d8efc8fd73c973b00fb2e192850ea6073062b5dea0cd5b74" + }, + { + "name": "cartwheel_tone2", + "unicode": "1F938-1F3FC", + "digest": "6231eb35be45457fd648f8f4b79983f03705c9d983a18067f7e6d9ae47bc1958" + }, + { + "name": "person_doing_cartwheel_tone2", + "unicode": "1F938-1F3FC", + "digest": "6231eb35be45457fd648f8f4b79983f03705c9d983a18067f7e6d9ae47bc1958" + }, + { + "name": "cartwheel_tone3", + "unicode": "1F938-1F3FD", + "digest": "ca483c78cc823811a8c279c501d9b283e4c990dafc5995ad40e68ecb0af554df" + }, + { + "name": "person_doing_cartwheel_tone3", + "unicode": "1F938-1F3FD", + "digest": "ca483c78cc823811a8c279c501d9b283e4c990dafc5995ad40e68ecb0af554df" + }, + { + "name": "cartwheel_tone4", + "unicode": "1F938-1F3FE", + "digest": "8253afb672431c84e498014c30babb00b9284bec773009e79f7f06aa7108643e" + }, + { + "name": "person_doing_cartwheel_tone4", + "unicode": "1F938-1F3FE", + "digest": "8253afb672431c84e498014c30babb00b9284bec773009e79f7f06aa7108643e" + }, + { + "name": "cartwheel_tone5", + "unicode": "1F938-1F3FF", + "digest": "6fd92baff57c38b3adb6753d9e7e547e762971a8872fd3f1e71c6aaf0b1d3ab9" + }, + { + "name": "person_doing_cartwheel_tone5", + "unicode": "1F938-1F3FF", + "digest": "6fd92baff57c38b3adb6753d9e7e547e762971a8872fd3f1e71c6aaf0b1d3ab9" }, { "name": "cat", @@ -1209,11 +1244,6 @@ "unicode": "1F4BF", "digest": "16363d8a34b873c12df6354b99f575cae3d80e0d27100ed7eea70f0310953c7b" }, - { - "name": "celtic_cross", - "unicode": "1F548", - "digest": "187aac988d7e02085a15f31c4cc0ff25127be5b088e354e65c7b1152bffb40ff" - }, { "name": "chains", "unicode": "26D3", @@ -1229,6 +1259,16 @@ "unicode": "1F37E", "digest": "9e6e8987f30a37ae0f3d7dab2f5eeb50aa32b4f31402b29315eb2994afc72457" }, + { + "name": "champagne_glass", + "unicode": "1F942", + "digest": "5a2e4773f7eb126a00122cbfa4dc535da51ce00e0bf0d8d6ff8bab8b3365f8d2" + }, + { + "name": "clinking_glass", + "unicode": "1F942", + "digest": "5a2e4773f7eb126a00122cbfa4dc535da51ce00e0bf0d8d6ff8bab8b3365f8d2" + }, { "name": "chart", "unicode": "1F4B9", @@ -1514,16 +1554,6 @@ "unicode": "1F564", "digest": "9fdef6a4939315c017b165e1dbac7710fb335df8c309be3fe2a011ef7fc28d74" }, - { - "name": "clockwise_arrows", - "unicode": "1F5D8", - "digest": "67027b7e1a4d800a3ce7d731c21c098d1109d217159a27665eebb7e080fc2622" - }, - { - "name": "clockwise_right_and_left_semicircle_arrows", - "unicode": "1F5D8", - "digest": "67027b7e1a4d800a3ce7d731c21c098d1109d217159a27665eebb7e080fc2622" - }, { "name": "closed_book", "unicode": "1F4D5", @@ -1584,6 +1614,16 @@ "unicode": "1F32A", "digest": "7cbed2343c280ba3996082b3d0fb9d8cd57d6e62fe6c9ecb159f46b4a2e49151" }, + { + "name": "clown", + "unicode": "1F921", + "digest": "eea95687caabc9e808514c2450ba599e5e24ef47923dbec86f5297a64438e2e5" + }, + { + "name": "clown_face", + "unicode": "1F921", + "digest": "eea95687caabc9e808514c2450ba599e5e24ef47923dbec86f5297a64438e2e5" + }, { "name": "clubs", "unicode": "2663", @@ -1624,16 +1664,6 @@ "unicode": "1F4BB", "digest": "c970ce76b5607434895b0407bdaa93140f887930781a17dd7dcf16f711451d93" }, - { - "name": "computer_old", - "unicode": "1F5B3", - "digest": "b27c30d74f205a8a3bd00a55ca17da7cf6ae3b65ae33e949755a4c6bd69a9fd3" - }, - { - "name": "old_personal_computer", - "unicode": "1F5B3", - "digest": "b27c30d74f205a8a3bd00a55ca17da7cf6ae3b65ae33e949755a4c6bd69a9fd3" - }, { "name": "confetti_ball", "unicode": "1F38A", @@ -1664,6 +1694,11 @@ "unicode": "1F3D7", "digest": "c611f0a5de10f000a0756935f226845c7292f19ff5581d1f7a7554316338bbcb" }, + { + "name": "building_construction", + "unicode": "1F3D7", + "digest": "c611f0a5de10f000a0756935f226845c7292f19ff5581d1f7a7554316338bbcb" + }, { "name": "construction_worker", "unicode": "1F477", @@ -1699,16 +1734,6 @@ "unicode": "1F39B", "digest": "0d7f33ff7acc1cc3a81e6a786ff007df20da145e3070f338505dfed5100e9fcb" }, - { - "name": "contruction_site", - "unicode": "1F3D7", - "digest": "c611f0a5de10f000a0756935f226845c7292f19ff5581d1f7a7554316338bbcb" - }, - { - "name": "building_construction", - "unicode": "1F3D7", - "digest": "c611f0a5de10f000a0756935f226845c7292f19ff5581d1f7a7554316338bbcb" - }, { "name": "convenience_store", "unicode": "1F3EA", @@ -1719,6 +1744,11 @@ "unicode": "1F36A", "digest": "4bed3522bd50091ac5b68ca760661eb484d7f1b9c9d564d2097bd812b7f28ae4" }, + { + "name": "cooking", + "unicode": "1F373", + "digest": "563ffd6cae381ce1e318cdacc54e70040d6a01a50d0db8aeb50edbbe413eac58" + }, { "name": "cool", "unicode": "1F192", @@ -1819,6 +1849,16 @@ "unicode": "1F404", "digest": "e7a5131d7dee0f3356814b0ac1ea8ff280b12a7b580181e20ddb0b7eeb7e7339" }, + { + "name": "cowboy", + "unicode": "1F920", + "digest": "1aabf23f6b95a9b772fdb8eb45b8ec93584a5357f9131c6eabc9d1b83fe67e89" + }, + { + "name": "face_with_cowboy_hat", + "unicode": "1F920", + "digest": "1aabf23f6b95a9b772fdb8eb45b8ec93584a5357f9131c6eabc9d1b83fe67e89" + }, { "name": "crab", "unicode": "1F980", @@ -1859,6 +1899,11 @@ "unicode": "1F40A", "digest": "59cb4164c50b6bc9ae311ce6f7610467c1aaafa848b5fff7614f064715f91992" }, + { + "name": "croissant", + "unicode": "1F950", + "digest": "b751e287157a1e276617a841a5b5f7f1208ca226cfd8fa947f144390b65a5e16" + }, { "name": "cross", "unicode": "271D", @@ -1869,36 +1914,6 @@ "unicode": "271D", "digest": "a6b07c838fb75ef2ebefa2df6005e8d784753239ec03c37695a13e3b1954d653" }, - { - "name": "cross_heavy", - "unicode": "1F547", - "digest": "2e37c26b9bad0beb019c7f3e7a3892352d0ad9ca1b90c4333d42e8d56680be70" - }, - { - "name": "heavy_latin_cross", - "unicode": "1F547", - "digest": "2e37c26b9bad0beb019c7f3e7a3892352d0ad9ca1b90c4333d42e8d56680be70" - }, - { - "name": "cross_white", - "unicode": "1F546", - "digest": "3452e667010d7e49a51d7e1f4ba8ed4f303e33ed43255a051e9a18832a1efba6" - }, - { - "name": "white_latin_cross", - "unicode": "1F546", - "digest": "3452e667010d7e49a51d7e1f4ba8ed4f303e33ed43255a051e9a18832a1efba6" - }, - { - "name": "crossbones", - "unicode": "1F571", - "digest": "f5e7ce293c1a3282711073e68f033a3876e8428d1218cb2f8294630f9124e584" - }, - { - "name": "black_skull_and_crossbones", - "unicode": "1F571", - "digest": "f5e7ce293c1a3282711073e68f033a3876e8428d1218cb2f8294630f9124e584" - }, { "name": "crossed_flags", "unicode": "1F38C", @@ -1939,6 +1954,11 @@ "unicode": "1F52E", "digest": "05f73b30b1e5b0fc66fb5dc6caddd2d547ee7b9d2f97513dc908ba1a2e352e30" }, + { + "name": "cucumber", + "unicode": "1F952", + "digest": "d1196e23f2f155ef5c1330f8497f40957a7357cb177127f457c5c471f0a23727" + }, { "name": "cupid", "unicode": "1F498", @@ -2049,16 +2069,16 @@ "unicode": "1F333", "digest": "3c70f1a77f2754f41c830e88d43b7d53c14311d64626ded164aa9ac7d2695790" }, + { + "name": "deer", + "unicode": "1F98C", + "digest": "7f4302ca68fd121ee73be48d0a0a0fb9e7e2741071a491ad2b7b0eab9f11ad25" + }, { "name": "department_store", "unicode": "1F3EC", "digest": "4be910d2efe74d8ce2c1f41d7753c8873579faca83fcf779a4887d8ab9e5923b" }, - { - "name": "descending_notes", - "unicode": "1F39D", - "digest": "f09c6a2e094b13bf91cc07b7b776e43348ccef9f91247ca36cc02e7d91098af0" - }, { "name": "desert", "unicode": "1F3DC", @@ -2074,11 +2094,6 @@ "unicode": "1F5A5", "digest": "cde5bfb6c71bb7d663808a3561b24cb5b5560f95f510b40f81250cac1b21933e" }, - { - "name": "desktop_window", - "unicode": "1F5D4", - "digest": "d5b6c4a847e2a96f97f50fd353a22cb121915cb1d7bbc0f02df38769819b6b7e" - }, { "name": "diamond_shape_with_a_dot_inside", "unicode": "1F4A0", @@ -2124,21 +2139,6 @@ "unicode": "1F6AF", "digest": "98b07fbbcdb438d1b8a755869fa2de8e180a77fce359ec830eb46d38ec3e67cb" }, - { - "name": "document", - "unicode": "1F5CE", - "digest": "2cbca96cc69306a10f1a9b6505723e027239439d899f6b395dc43f3c37d2d777" - }, - { - "name": "document_text", - "unicode": "1F5B9", - "digest": "29407b12409c9673f3d89ef1f86ee50cbc7ed53b1870e33b4a29bbc609017f72" - }, - { - "name": "document_with_text", - "unicode": "1F5B9", - "digest": "29407b12409c9673f3d89ef1f86ee50cbc7ed53b1870e33b4a29bbc609017f72" - }, { "name": "dog", "unicode": "1F436", @@ -2204,11 +2204,36 @@ "unicode": "1F42A", "digest": "e06ef69c29f0fb12481727c0b4124e700572d3d7955e173279320f43f286518d" }, + { + "name": "drooling_face", + "unicode": "1F924", + "digest": "5203cb05cd266d7a7c929ab40364ad68571d380d9c7ff93a8d6d55261abaa1ba" + }, + { + "name": "drool", + "unicode": "1F924", + "digest": "5203cb05cd266d7a7c929ab40364ad68571d380d9c7ff93a8d6d55261abaa1ba" + }, { "name": "droplet", "unicode": "1F4A7", "digest": "6475b4a4460a672c436a68f282ac97fb31e2934db4b80620063ee816159aa7c3" }, + { + "name": "drum", + "unicode": "1F941", + "digest": "0d0639980b1a5dcbf1c3e7ef47263fb6543b871242c58452a8c2f642525d9dd8" + }, + { + "name": "drum_with_drumsticks", + "unicode": "1F941", + "digest": "0d0639980b1a5dcbf1c3e7ef47263fb6543b871242c58452a8c2f642525d9dd8" + }, + { + "name": "duck", + "unicode": "1F986", + "digest": "8f8373798a7727368b32328e7a9a349727a949e7391ddd243b6456141a4f7e94" + }, { "name": "dvd", "unicode": "1F4C0", @@ -2224,6 +2249,11 @@ "unicode": "1F4E7", "digest": "39b5a57a2376e4a1137e381be02a1775bd580e0371438f5297a401ea634f1830" }, + { + "name": "eagle", + "unicode": "1F985", + "digest": "b44fd4f61b83c5114358a272343ac9b0eabbc70847f739bbdbf8aae3ade5bc1d" + }, { "name": "ear", "unicode": "1F442", @@ -2276,8 +2306,8 @@ }, { "name": "egg", - "unicode": "1F373", - "digest": "563ffd6cae381ce1e318cdacc54e70040d6a01a50d0db8aeb50edbbe413eac58" + "unicode": "1F95A", + "digest": "72b9c841af784e7cbccbbe48ba833df5cecdd284397c199cab079872e879d92f" }, { "name": "eggplant", @@ -2299,6 +2329,16 @@ "unicode": "2733", "digest": "bb0758e7cc0e357285937671a91489bd32ce9d248eecdcc9c275a53a66325b26" }, + { + "name": "eject", + "unicode": "23CF", + "digest": "eeb0cd23ead0c965e307de517a6805265f0c780c3e454e64bc4c1425dfe7548e" + }, + { + "name": "eject_symbol", + "unicode": "23CF", + "digest": "eeb0cd23ead0c965e307de517a6805265f0c780c3e454e64bc4c1425dfe7548e" + }, { "name": "electric_plug", "unicode": "1F50C", @@ -2319,46 +2359,6 @@ "unicode": "2709", "digest": "f5a512022a2f5280f372ff39c22cbda815f698710ca66f8f8c4d08418f98ca78" }, - { - "name": "envelope_back", - "unicode": "1F582", - "digest": "bc60b6d375feee00758a94a05b42eeb165f4084b20eb3e6012b72faa221f7e75" - }, - { - "name": "back_of_envelope", - "unicode": "1F582", - "digest": "bc60b6d375feee00758a94a05b42eeb165f4084b20eb3e6012b72faa221f7e75" - }, - { - "name": "envelope_flying", - "unicode": "1F585", - "digest": "9d6b6ca4c08006062a6f11948de3e15b13cf5c458967e39a9358665a8e13e214" - }, - { - "name": "flying_envelope", - "unicode": "1F585", - "digest": "9d6b6ca4c08006062a6f11948de3e15b13cf5c458967e39a9358665a8e13e214" - }, - { - "name": "envelope_stamped", - "unicode": "1F583", - "digest": "f6102aea7283ddc136bfeb09589573420b9279105045fc6b965c1633c1297468" - }, - { - "name": "stamped_envelope", - "unicode": "1F583", - "digest": "f6102aea7283ddc136bfeb09589573420b9279105045fc6b965c1633c1297468" - }, - { - "name": "envelope_stamped_pen", - "unicode": "1F586", - "digest": "80ea471318d1e04f8e525ff236b3cd4a4c864e66c6246b6aad77d92f56895f33" - }, - { - "name": "pen_over_stamped_envelope", - "unicode": "1F586", - "digest": "80ea471318d1e04f8e525ff236b3cd4a4c864e66c6246b6aad77d92f56895f33" - }, { "name": "envelope_with_arrow", "unicode": "1F4E9", @@ -2414,6 +2414,36 @@ "unicode": "1F440", "digest": "1d5cae0b9b2e51e1de54295685d7f0c72ee794e2e6335a95b1d056c7e77260e8" }, + { + "name": "face_palm", + "unicode": "1F926", + "digest": "4ec873048b34b1bb34430724cf28e4bee6c0a9eee88ce39b9d1565047dc92420" + }, + { + "name": "face_palm_tone1", + "unicode": "1F926-1F3FB", + "digest": "e93ef92b4c01dbea6c400e708e23dd36da92ccfbf5eb4f177b3b20c3a46bdc19" + }, + { + "name": "face_palm_tone2", + "unicode": "1F926-1F3FC", + "digest": "22c8bf9fd9fa2ed9dca7a6397ed00ba6cfe9aeef2b0fb7b516ee4dda0df050ea" + }, + { + "name": "face_palm_tone3", + "unicode": "1F926-1F3FD", + "digest": "c0b8bb9d2423e6787b6bdf1ca5a13f52853e4f48a9a1af0f2d4af1364fff022e" + }, + { + "name": "face_palm_tone4", + "unicode": "1F926-1F3FE", + "digest": "f522ab186adcbb4549ea2c03500cdd7a86add548e43ebf7a54d58cc24deea072" + }, + { + "name": "face_palm_tone5", + "unicode": "1F926-1F3FF", + "digest": "363507ae7178b5ec583635f47bcab10c897346f48b85d8759b1004c32cd8ad65" + }, { "name": "factory", "unicode": "1F3ED", @@ -2519,6 +2549,16 @@ "unicode": "1F43E", "digest": "45aca538d3a9831a0c7de491e5656c17705c07b8f4ac8e85254656b608976016" }, + { + "name": "fencer", + "unicode": "1F93A", + "digest": "5db00fa456af9f6c7cb88d300579dd63e426bcb97ad25486b664aff25c688e21" + }, + { + "name": "fencing", + "unicode": "1F93A", + "digest": "5db00fa456af9f6c7cb88d300579dd63e426bcb97ad25486b664aff25c688e21" + }, { "name": "ferris_wheel", "unicode": "1F3A1", @@ -2550,54 +2590,64 @@ "digest": "4da212148cadb9c4ea91e60d2d8316e38cea99ef4f14afc023711dd7c54ade5a" }, { - "name": "finger_pointing_down", - "unicode": "1F597", - "digest": "0c542ac3141e8f2e74767acd0eb399c2d68c779cb78bf16d437ad3b1f8134ad9" + "name": "fingers_crossed", + "unicode": "1F91E", + "digest": "a5c797ead191b9712e185083266b455cdf09f6a34c10f8c51aa145e6073427e1" }, { - "name": "white_down_pointing_left_hand_index", - "unicode": "1F597", - "digest": "0c542ac3141e8f2e74767acd0eb399c2d68c779cb78bf16d437ad3b1f8134ad9" + "name": "hand_with_index_and_middle_finger_crossed", + "unicode": "1F91E", + "digest": "a5c797ead191b9712e185083266b455cdf09f6a34c10f8c51aa145e6073427e1" }, { - "name": "finger_pointing_down2", - "unicode": "1F59F", - "digest": "c5b128a232cbf518544802a2ae1459368274297163721fa05d0103cf95b2b1ee" + "name": "fingers_crossed_tone1", + "unicode": "1F91E-1F3FB", + "digest": "db56d47bf887f2d8459a3aaba23f15c0087234ae5a54125052e7046e034a4988" }, { - "name": "sideways_white_down_pointing_index", - "unicode": "1F59F", - "digest": "c5b128a232cbf518544802a2ae1459368274297163721fa05d0103cf95b2b1ee" + "name": "hand_with_index_and_middle_fingers_crossed_tone1", + "unicode": "1F91E-1F3FB", + "digest": "db56d47bf887f2d8459a3aaba23f15c0087234ae5a54125052e7046e034a4988" }, { - "name": "finger_pointing_left", - "unicode": "1F598", - "digest": "d178ece691e2091be08db77fda9cf05462934628557358a8cb6222587b291f7e" + "name": "fingers_crossed_tone2", + "unicode": "1F91E-1F3FC", + "digest": "19f1bcca3991db7ed2037278c0baab6cd7f12aeaf2e0074de402c4d9e45c1899" }, { - "name": "sideways_white_left_pointing_index", - "unicode": "1F598", - "digest": "d178ece691e2091be08db77fda9cf05462934628557358a8cb6222587b291f7e" + "name": "hand_with_index_and_middle_fingers_crossed_tone2", + "unicode": "1F91E-1F3FC", + "digest": "19f1bcca3991db7ed2037278c0baab6cd7f12aeaf2e0074de402c4d9e45c1899" }, { - "name": "finger_pointing_right", - "unicode": "1F599", - "digest": "a412a47544d8f401f9181f8826c5fa3d6b42a1d76f6926963c2d9cd2a01be06d" + "name": "fingers_crossed_tone3", + "unicode": "1F91E-1F3FD", + "digest": "895a3314f6a310f31f7e728bcca20ff834fbfac62ce00e27e3ea5ad0dfc1ba35" }, { - "name": "sideways_white_right_pointing_index", - "unicode": "1F599", - "digest": "a412a47544d8f401f9181f8826c5fa3d6b42a1d76f6926963c2d9cd2a01be06d" + "name": "hand_with_index_and_middle_fingers_crossed_tone3", + "unicode": "1F91E-1F3FD", + "digest": "895a3314f6a310f31f7e728bcca20ff834fbfac62ce00e27e3ea5ad0dfc1ba35" }, { - "name": "finger_pointing_up", - "unicode": "1F59E", - "digest": "32c2ccab52aa318a47c816d1bcf9c076e667c9ef3e64ce37d7ba7e827238690d" + "name": "fingers_crossed_tone4", + "unicode": "1F91E-1F3FE", + "digest": "fcb5c4de2001d23a5df1b8702624d134b7f94e93e2dcc8adf6c1033c77722b0e" }, { - "name": "sideways_white_up_pointing_index", - "unicode": "1F59E", - "digest": "32c2ccab52aa318a47c816d1bcf9c076e667c9ef3e64ce37d7ba7e827238690d" + "name": "hand_with_index_and_middle_fingers_crossed_tone4", + "unicode": "1F91E-1F3FE", + "digest": "fcb5c4de2001d23a5df1b8702624d134b7f94e93e2dcc8adf6c1033c77722b0e" + }, + { + "name": "fingers_crossed_tone5", + "unicode": "1F91E-1F3FF", + "digest": "50132c78d530b048c21be4e788b446872a79b3b3a91009db12f4021c44c8469d" + }, + { + "name": "hand_with_index_and_middle_fingers_crossed_tone5", + "unicode": "1F91E-1F3FF", + "digest": "50132c78d530b048c21be4e788b446872a79b3b3a91009db12f4021c44c8469d" }, { "name": "fire", @@ -2615,19 +2665,19 @@ "digest": "c3a518f27d625e3b62dffa227eb82764bf0a147f10ec0e7f4f43f3f96751af20" }, { - "name": "fire_engine_oncoming", - "unicode": "1F6F1", - "digest": "e2482c450136d373f74dfafddf502e0b675eb5d2e1e1c645f163db0e4d15fbb6" + "name": "fireworks", + "unicode": "1F386", + "digest": "b62ae08a00c0cc6eba8f9666c8fd9946ce57c3cfc01fe99542a8690a4a566a65" }, { - "name": "oncoming_fire_engine", - "unicode": "1F6F1", - "digest": "e2482c450136d373f74dfafddf502e0b675eb5d2e1e1c645f163db0e4d15fbb6" + "name": "first_place", + "unicode": "1F947", + "digest": "e3de5d9f14f05544dbee5965cc2baa20e7b417a488c8a18598979038860fd901" }, { - "name": "fireworks", - "unicode": "1F386", - "digest": "b62ae08a00c0cc6eba8f9666c8fd9946ce57c3cfc01fe99542a8690a4a566a65" + "name": "first_place_medal", + "unicode": "1F947", + "digest": "e3de5d9f14f05544dbee5965cc2baa20e7b417a488c8a18598979038860fd901" }, { "name": "first_quarter_moon", @@ -5299,41 +5349,11 @@ "unicode": "269C", "digest": "ebf49007f367dc05580e9dab942e93e9dda12fa1dc2caa410ac7f8d8cd55d2a3" }, - { - "name": "flip_phone", - "unicode": "1F581", - "digest": "be59efba4bc0759af5a726c06619090ef5071bf2541611d71691dedecee6c697" - }, - { - "name": "clamshell_mobile_phone", - "unicode": "1F581", - "digest": "be59efba4bc0759af5a726c06619090ef5071bf2541611d71691dedecee6c697" - }, - { - "name": "floppy_black", - "unicode": "1F5AA", - "digest": "9022f51bb09c5130c6d46bb2accb159bed6f54d6fbffda6ecad62965ebc958ea" - }, - { - "name": "black_hard_shell_floppy_disk", - "unicode": "1F5AA", - "digest": "9022f51bb09c5130c6d46bb2accb159bed6f54d6fbffda6ecad62965ebc958ea" - }, { "name": "floppy_disk", "unicode": "1F4BE", "digest": "4ee0b5bba41b9e301ed125d3ee1c263bef171ca499e6e1b89276b09af2bc03a0" }, - { - "name": "floppy_white", - "unicode": "1F5AB", - "digest": "ec79c400117c4506ef8cf3eebef6c42dd37e60b3079d3e98b6ccd06e517e2af0" - }, - { - "name": "white_hard_shell_floppy_disk", - "unicode": "1F5AB", - "digest": "ec79c400117c4506ef8cf3eebef6c42dd37e60b3079d3e98b6ccd06e517e2af0" - }, { "name": "flower_playing_cards", "unicode": "1F3B4", @@ -5354,21 +5374,6 @@ "unicode": "1F301", "digest": "bc3631a4e9e8473b92e842008937add2cd9ffad5b7d772ce759fb5ff6c0e3dca" }, - { - "name": "folder", - "unicode": "1F5C0", - "digest": "8932141321911032ce8469ba85fe309b78384545c3b9946978b383670b956644" - }, - { - "name": "folder_open", - "unicode": "1F5C1", - "digest": "74f3b484771c3d6ef61cf003de25c1a59b875afa46c057b5b1d92d9f99460685" - }, - { - "name": "open_folder", - "unicode": "1F5C1", - "digest": "74f3b484771c3d6ef61cf003de25c1a59b875afa46c057b5b1d92d9f99460685" - }, { "name": "football", "unicode": "1F3C8", @@ -5409,6 +5414,16 @@ "unicode": "1F340", "digest": "ebee16e86bc9be843dfc72ab5372fb462f06be4486b5b25d7d4cac9b2c8b01c8" }, + { + "name": "fox", + "unicode": "1F98A", + "digest": "e9903cb0396f7e49bdd2c384b38e614c13bfa576b3ecc1ec7b9819e4a40d91d1" + }, + { + "name": "fox_face", + "unicode": "1F98A", + "digest": "e9903cb0396f7e49bdd2c384b38e614c13bfa576b3ecc1ec7b9819e4a40d91d1" + }, { "name": "frame_photo", "unicode": "1F5BC", @@ -5420,29 +5435,19 @@ "digest": "d5074f748a15055ec1fb812c1e5e169e6e3cc73c522c54be1359b0e26c0fc75c" }, { - "name": "frame_tiles", - "unicode": "1F5BD", - "digest": "34a5bb044b4b3ad94b116ad106f7b6747fb8612dc0e9f8ccd4313c2920508df0" - }, - { - "name": "frame_with_tiles", - "unicode": "1F5BD", - "digest": "34a5bb044b4b3ad94b116ad106f7b6747fb8612dc0e9f8ccd4313c2920508df0" - }, - { - "name": "frame_x", - "unicode": "1F5BE", - "digest": "2e427688fd70361c8c59787d0722ad68abe1c3f968258ee99c0c77ce4b8a8e15" + "name": "free", + "unicode": "1F193", + "digest": "9973522457158362fc5bdd7da858e6371e28a8403d1ef9e4b6427195c7f72cfa" }, { - "name": "frame_with_an_x", - "unicode": "1F5BE", - "digest": "2e427688fd70361c8c59787d0722ad68abe1c3f968258ee99c0c77ce4b8a8e15" + "name": "french_bread", + "unicode": "1F956", + "digest": "47518a4312f57207b8e8c38188d4a2bd8b16830a885cfcf2d281cfab50c1bc6e" }, { - "name": "free", - "unicode": "1F193", - "digest": "9973522457158362fc5bdd7da858e6371e28a8403d1ef9e4b6427195c7f72cfa" + "name": "baguette_bread", + "unicode": "1F956", + "digest": "47518a4312f57207b8e8c38188d4a2bd8b16830a885cfcf2d281cfab50c1bc6e" }, { "name": "fried_shrimp", @@ -5559,16 +5564,21 @@ "unicode": "1F467-1F3FF", "digest": "f55e4b16a41b6f5e3c817a301420360ba4486e4e82e1092a56a3e3cc4069087d" }, - { - "name": "girls_symbol", - "unicode": "1F6CA", - "digest": "2c55aee81defd7a1620ffeaad8d9bcc1835f19237c72c79633aec45671ddb9ff" - }, { "name": "globe_with_meridians", "unicode": "1F310", "digest": "725bebeb3c09a9e3701ebe49e672dcfbf2b73575e05f0821263511577b013b75" }, + { + "name": "goal", + "unicode": "1F945", + "digest": "7088c432f276ff6f447dc0d431b9062b394fb401de1072fe59ca56267bfd6717" + }, + { + "name": "goal_net", + "unicode": "1F945", + "digest": "7088c432f276ff6f447dc0d431b9062b394fb401de1072fe59ca56267bfd6717" + }, { "name": "goat", "unicode": "1F410", @@ -5584,6 +5594,11 @@ "unicode": "1F3CC", "digest": "7d7ecc6e226596f646030a4109c2b0001ef0cc690e4863e450bf5d29e7a90344" }, + { + "name": "gorilla", + "unicode": "1F98D", + "digest": "4a564dc14f8ae5450d094f6410ec7f099a7f07dc5254b6395f44a35527bdb4b7" + }, { "name": "grapes", "unicode": "1F347", @@ -5734,16 +5749,6 @@ "unicode": "1F590", "digest": "c51a30cb7e575d29ffed16780a6c95ae3f300b8ac523012f4a6e116d68c1fd15" }, - { - "name": "hand_splayed_reverse", - "unicode": "1F591", - "digest": "ff0af0fe9def7388adca6836e5958492282b1afae99f1b6e1e65d11ba68b96db" - }, - { - "name": "reversed_raised_hand_with_fingers_splayed", - "unicode": "1F591", - "digest": "ff0af0fe9def7388adca6836e5958492282b1afae99f1b6e1e65d11ba68b96db" - }, { "name": "hand_splayed_tone1", "unicode": "1F590-1F3FB", @@ -5795,24 +5800,99 @@ "digest": "4b3a0aba7829772fec09f26d6facc19a2f822d2998015297b18b5cab85190ee2" }, { - "name": "hand_victory", - "unicode": "1F594", - "digest": "2d512ced4e8a438f2a346aed67310d3080f9828c748ade1be95943c32ba1c735" + "name": "handbag", + "unicode": "1F45C", + "digest": "45410a3eed0c2e3f68748d7649fa9e33a90f4e80d5291206bdd0b40380c6da45" }, { - "name": "reversed_victory_hand", - "unicode": "1F594", - "digest": "2d512ced4e8a438f2a346aed67310d3080f9828c748ade1be95943c32ba1c735" + "name": "handball", + "unicode": "1F93E", + "digest": "94ceb28024eb3259d8b137cafd7438773e717fbc04f5da810f85e43ca0fa9e00" }, { - "name": "handbag", - "unicode": "1F45C", - "digest": "45410a3eed0c2e3f68748d7649fa9e33a90f4e80d5291206bdd0b40380c6da45" + "name": "handball_tone1", + "unicode": "1F93E-1F3FB", + "digest": "8bec4de0d05c80e335e44d65598d186ca92696977353c9fd9c2a5efa122cb842" + }, + { + "name": "handball_tone2", + "unicode": "1F93E-1F3FC", + "digest": "2ff4131e1e2f089b315d8e176c9348877c26c2bd03706fb75d41bc61bc99bf93" + }, + { + "name": "handball_tone3", + "unicode": "1F93E-1F3FD", + "digest": "224a71f94dd37d3729325d11412334667a81422e21f6d7c008730ff350f51a80" }, { - "name": "hard_disk", - "unicode": "1F5B4", - "digest": "df8549d4281f5ae70fb6792a02c078e651764b0276aa43b7407236bd38fc21b4" + "name": "handball_tone4", + "unicode": "1F93E-1F3FE", + "digest": "a5f7a9db790565981bad2d0d9e09554c8c509a8179b4705a418300d58a7894b4" + }, + { + "name": "handball_tone5", + "unicode": "1F93E-1F3FF", + "digest": "00404572d4683f2e8e8a494aa733e96fbec1723634d0a8cb8d75f2829a789d27" + }, + { + "name": "handshake", + "unicode": "1F91D", + "digest": "cb4b08b70560908f96bda0aecd2f4c966bea180f9b7200e4c81d342dc8d36087" + }, + { + "name": "shaking_hands", + "unicode": "1F91D", + "digest": "cb4b08b70560908f96bda0aecd2f4c966bea180f9b7200e4c81d342dc8d36087" + }, + { + "name": "handshake_tone1", + "unicode": "1F91D-1F3FB", + "digest": "40470e224683ba375ed8698c0cbd560556be5a8898237ddf504377a3a7e89ff0" + }, + { + "name": "shaking_hands_tone1", + "unicode": "1F91D-1F3FB", + "digest": "40470e224683ba375ed8698c0cbd560556be5a8898237ddf504377a3a7e89ff0" + }, + { + "name": "handshake_tone2", + "unicode": "1F91D-1F3FC", + "digest": "77ed378243bf682f1f4f1a8caeabcbedf772f54631cc40ea46c099e46a499b18" + }, + { + "name": "shaking_hands_tone2", + "unicode": "1F91D-1F3FC", + "digest": "77ed378243bf682f1f4f1a8caeabcbedf772f54631cc40ea46c099e46a499b18" + }, + { + "name": "handshake_tone3", + "unicode": "1F91D-1F3FD", + "digest": "81b95050f0878b617f5d2640e34031c26a0072e46ca5a688eb4356e48bc74c92" + }, + { + "name": "shaking_hands_tone3", + "unicode": "1F91D-1F3FD", + "digest": "81b95050f0878b617f5d2640e34031c26a0072e46ca5a688eb4356e48bc74c92" + }, + { + "name": "handshake_tone4", + "unicode": "1F91D-1F3FE", + "digest": "74919a6f026fbbd0ccdbdbd4288d1b2ef3bda8930e9142c07736db4a7f3ef345" + }, + { + "name": "shaking_hands_tone4", + "unicode": "1F91D-1F3FE", + "digest": "74919a6f026fbbd0ccdbdbd4288d1b2ef3bda8930e9142c07736db4a7f3ef345" + }, + { + "name": "handshake_tone5", + "unicode": "1F91D-1F3FF", + "digest": "a30d662bfad0074ca7e32cf6f7229b643b636c4beaec496777eb7e1d5b6fc470" + }, + { + "name": "shaking_hands_tone5", + "unicode": "1F91D-1F3FF", + "digest": "a30d662bfad0074ca7e32cf6f7229b643b636c4beaec496777eb7e1d5b6fc470" }, { "name": "hash", @@ -5879,16 +5959,6 @@ "unicode": "1F63B", "digest": "8a1f28b97d661ca4cff5ee13889ca61b5fa745ccb590e80832b7d7701df101d6" }, - { - "name": "heart_tip", - "unicode": "1F394", - "digest": "2178829e2c85accda55d2f685544587f6de5c8398a127ae1e08ff1c4ab282204" - }, - { - "name": "heart_with_tip_on_the_left", - "unicode": "1F394", - "digest": "2178829e2c85accda55d2f685544587f6de5c8398a127ae1e08ff1c4ab282204" - }, { "name": "heartbeat", "unicode": "1F493", @@ -6144,16 +6214,6 @@ "unicode": "1F4E8", "digest": "310b7bdcca93452fe10c72c03d0aafa12b98e5d3408896d275d06d3693812c7a" }, - { - "name": "info", - "unicode": "1F6C8", - "digest": "59c35e77d5ee663c5d56f7d8af845ce8aeb9935e526ae4a06e02ae70e71212ca" - }, - { - "name": "circled_information_source", - "unicode": "1F6C8", - "digest": "59c35e77d5ee663c5d56f7d8af845ce8aeb9935e526ae4a06e02ae70e71212ca" - }, { "name": "information_desk_person", "unicode": "1F481", @@ -6249,16 +6309,6 @@ "unicode": "1F456", "digest": "f986ad32e419cca81c995f8371f0189d1490172a97ebbeac60054a1af08949c5" }, - { - "name": "jet_up", - "unicode": "1F6E6", - "digest": "3708e5e034b1c64d1268d66527e13c369aa0f8903bce9172bef773b2d1940948" - }, - { - "name": "up_pointing_military_airplane", - "unicode": "1F6E6", - "digest": "3708e5e034b1c64d1268d66527e13c369aa0f8903bce9172bef773b2d1940948" - }, { "name": "joy", "unicode": "1F602", @@ -6274,6 +6324,66 @@ "unicode": "1F579", "digest": "671ee588f397a96f27056a67e6a06d6e8d22c2109ec57b2859badb5fec9cf8dd" }, + { + "name": "juggling", + "unicode": "1F939", + "digest": "1f5dafa78de8b37f3df88fdf3084d2380666bd74ab2f449754d8724f6f8dbfa5" + }, + { + "name": "juggler", + "unicode": "1F939", + "digest": "1f5dafa78de8b37f3df88fdf3084d2380666bd74ab2f449754d8724f6f8dbfa5" + }, + { + "name": "juggling_tone1", + "unicode": "1F939-1F3FB", + "digest": "b0b4d020148c896be69c28b08e3c486f6db270d138c7ccf4be362b29eb99878d" + }, + { + "name": "juggler_tone1", + "unicode": "1F939-1F3FB", + "digest": "b0b4d020148c896be69c28b08e3c486f6db270d138c7ccf4be362b29eb99878d" + }, + { + "name": "juggling_tone2", + "unicode": "1F939-1F3FC", + "digest": "cfe0c1649b2fdca03673e0e64f3a7d06d4bd49b8954c769aeb7eb88b70ec99f4" + }, + { + "name": "juggler_tone2", + "unicode": "1F939-1F3FC", + "digest": "cfe0c1649b2fdca03673e0e64f3a7d06d4bd49b8954c769aeb7eb88b70ec99f4" + }, + { + "name": "juggling_tone3", + "unicode": "1F939-1F3FD", + "digest": "7f87022722008bb265abe245e8157dc7a61944f5da62b3cf86f26ee1b3bdef63" + }, + { + "name": "juggler_tone3", + "unicode": "1F939-1F3FD", + "digest": "7f87022722008bb265abe245e8157dc7a61944f5da62b3cf86f26ee1b3bdef63" + }, + { + "name": "juggling_tone4", + "unicode": "1F939-1F3FE", + "digest": "1f00da8c05582c95501cc6c3fe5ce0f9bfbc16789dcee59844a8fe7831198583" + }, + { + "name": "juggler_tone4", + "unicode": "1F939-1F3FE", + "digest": "1f00da8c05582c95501cc6c3fe5ce0f9bfbc16789dcee59844a8fe7831198583" + }, + { + "name": "juggling_tone5", + "unicode": "1F939-1F3FF", + "digest": "a195bf734788eb7961c00dbc05255a49da8b9d5042fada29b26cc20393d3ce52" + }, + { + "name": "juggler_tone5", + "unicode": "1F939-1F3FF", + "digest": "a195bf734788eb7961c00dbc05255a49da8b9d5042fada29b26cc20393d3ce52" + }, { "name": "kaaba", "unicode": "1F54B", @@ -6296,38 +6406,8 @@ }, { "name": "keyboard", - "unicode": "1F5AE", - "digest": "3b254cbf19946df3af05e501d11653d89fcda91684b7248d86186f842b83bf16" - }, - { - "name": "wired_keyboard", - "unicode": "1F5AE", - "digest": "3b254cbf19946df3af05e501d11653d89fcda91684b7248d86186f842b83bf16" - }, - { - "name": "keyboard_mouse", - "unicode": "1F5A6", - "digest": "95b523e55d8afeaeb06442bbe20e47f49643bb0c32d89a8cdbbccdead20532b3" - }, - { - "name": "keyboard_and_mouse", - "unicode": "1F5A6", - "digest": "95b523e55d8afeaeb06442bbe20e47f49643bb0c32d89a8cdbbccdead20532b3" - }, - { - "name": "keyboard_with_jacks", - "unicode": "1F398", - "digest": "e29a0d0b8018d13458469edca13c60a882a2817957c1aa11b050684c995a47ee" - }, - { - "name": "musical_keyboard_with_jacks", - "unicode": "1F398", - "digest": "e29a0d0b8018d13458469edca13c60a882a2817957c1aa11b050684c995a47ee" - }, - { - "name": "keycap_ten", - "unicode": "1F51F", - "digest": "c7c9491021740d2c17edddb856f79579b0b943d8dc85a2f48dbaac84f35b8a40" + "unicode": "2328", + "digest": "34da8ff62ca964142f9281b80123dbba74deaac8d77fa61758c30cfb36c31386" }, { "name": "kimono", @@ -6384,6 +6464,16 @@ "unicode": "1F619", "digest": "f0f8636cb1a02b93cc72ce1b194b890fca823d91e35926b889be3ecfae79207f" }, + { + "name": "kiwi", + "unicode": "1F95D", + "digest": "70a3a05f333d9455d2da12eed970bc3baae416286848fed8e5dd31b5be0819be" + }, + { + "name": "kiwifruit", + "unicode": "1F95D", + "digest": "70a3a05f333d9455d2da12eed970bc3baae416286848fed8e5dd31b5be0819be" + }, { "name": "knife", "unicode": "1F52A", @@ -6450,19 +6540,69 @@ "digest": "e58cb714353e96a2891a5d97910ff79660e637af909b81c49c919d3735db55b4" }, { - "name": "left_luggage", - "unicode": "1F6C5", - "digest": "6625077767a51163ea20cbc299f3c13fd5ccf1b5ce365ee702ef1fef6be3dadf" + "name": "left_facing_fist", + "unicode": "1F91B", + "digest": "7861be485beefae0de341df2f21576666e22f63511a033e785752f30c07291da" + }, + { + "name": "left_fist", + "unicode": "1F91B", + "digest": "7861be485beefae0de341df2f21576666e22f63511a033e785752f30c07291da" + }, + { + "name": "left_facing_fist_tone1", + "unicode": "1F91B-1F3FB", + "digest": "2e4c4dd96b0e4b46fe0f9ce5666344d266d0f17a8544cbae73d96638d1955296" + }, + { + "name": "left_fist_tone1", + "unicode": "1F91B-1F3FB", + "digest": "2e4c4dd96b0e4b46fe0f9ce5666344d266d0f17a8544cbae73d96638d1955296" + }, + { + "name": "left_facing_fist_tone2", + "unicode": "1F91B-1F3FC", + "digest": "b96a63a801175ce98a75f0edad7b5574251a3fbbd894d8ab3f21aeeda366cc13" + }, + { + "name": "left_fist_tone2", + "unicode": "1F91B-1F3FC", + "digest": "b96a63a801175ce98a75f0edad7b5574251a3fbbd894d8ab3f21aeeda366cc13" + }, + { + "name": "left_facing_fist_tone3", + "unicode": "1F91B-1F3FD", + "digest": "99df84635513c2ebfef24df1bd3705233e02149eef788c7b82ca0548df6f6ea5" + }, + { + "name": "left_fist_tone3", + "unicode": "1F91B-1F3FD", + "digest": "99df84635513c2ebfef24df1bd3705233e02149eef788c7b82ca0548df6f6ea5" + }, + { + "name": "left_facing_fist_tone4", + "unicode": "1F91B-1F3FE", + "digest": "68954842ca725aec0aa39bce4aa81aad17ac30f5f298561dfa411feb07414cd3" }, { - "name": "left_receiver", - "unicode": "1F57B", - "digest": "8052e44951afee04c87296128744b5019ec783c9ed1a231f659af6c8ddaa50f3" + "name": "left_fist_tone4", + "unicode": "1F91B-1F3FE", + "digest": "68954842ca725aec0aa39bce4aa81aad17ac30f5f298561dfa411feb07414cd3" }, { - "name": "left_hand_telephone_receiver", - "unicode": "1F57B", - "digest": "8052e44951afee04c87296128744b5019ec783c9ed1a231f659af6c8ddaa50f3" + "name": "left_facing_fist_tone5", + "unicode": "1F91B-1F3FF", + "digest": "a419b33fae82612dc860ff48950c0547a1642d4f0c94b6547324440837d3bb21" + }, + { + "name": "left_fist_tone5", + "unicode": "1F91B-1F3FF", + "digest": "a419b33fae82612dc860ff48950c0547a1642d4f0c94b6547324440837d3bb21" + }, + { + "name": "left_luggage", + "unicode": "1F6C5", + "digest": "6625077767a51163ea20cbc299f3c13fd5ccf1b5ce365ee702ef1fef6be3dadf" }, { "name": "left_right_arrow", @@ -6569,16 +6709,6 @@ "unicode": "1F3CB-1F3FF", "digest": "79b0edf6ce1fd024dd7f458e322ad8588af0b789a04cc1cf38380dc8b9c76f55" }, - { - "name": "light_check_mark", - "unicode": "1F5F8", - "digest": "7842b0df8c2b6703bed0cce5d2790d394eec7120b2a245a76f375528f2729a7b" - }, - { - "name": "light_mark", - "unicode": "1F5F8", - "digest": "7842b0df8c2b6703bed0cce5d2790d394eec7120b2a245a76f375528f2729a7b" - }, { "name": "light_rail", "unicode": "1F688", @@ -6604,16 +6734,16 @@ "unicode": "1F444", "digest": "8740d8086525c7a836d64625a6915cc1c59af69ba143456dbb59e0179276895e" }, - { - "name": "lips2", - "unicode": "1F5E2", - "digest": "c6ba915982ac47d8aaf14ad3605949df95588acfb4e147bf608f8c1714cdf19b" - }, { "name": "lipstick", "unicode": "1F484", "digest": "751dcb22706a796033b13a2ccb94304236ec13207ad4d011e02d230ae33ab5c1" }, + { + "name": "lizard", + "unicode": "1F98E", + "digest": "fb9191f9eab58b8403d4c4626ccbb14ba05c1f6944011751a8edcc4dd03c66e6" + }, { "name": "lock", "unicode": "1F512", @@ -6659,6 +6789,16 @@ "unicode": "1F505", "digest": "a065d00a416e297c168b0a675cafcf492fedf94865cb21801a1be5a3914593d4" }, + { + "name": "lying_face", + "unicode": "1F925", + "digest": "ce836170165e1b70938273f289c02c2106873cd9ab5472dbcd487c2f9f53f13d" + }, + { + "name": "liar", + "unicode": "1F925", + "digest": "ce836170165e1b70938273f289c02c2106873cd9ab5472dbcd487c2f9f53f13d" + }, { "name": "m", "unicode": "24C2", @@ -6704,6 +6844,121 @@ "unicode": "1F468", "digest": "42b882d2c6aa095f1afcf901203838d95c1908bdc725519779186b9c33c728d7" }, + { + "name": "man_dancing", + "unicode": "1F57A", + "digest": "9f632ee0c886d5f03c61e5f3a27668262c0cc2693b857a91c23c1e5ea3785b9e" + }, + { + "name": "male_dancer", + "unicode": "1F57A", + "digest": "9f632ee0c886d5f03c61e5f3a27668262c0cc2693b857a91c23c1e5ea3785b9e" + }, + { + "name": "man_dancing_tone1", + "unicode": "1F57A-1F3FB", + "digest": "6c56a16cb105bcdd97472645b3a351cebdbb1132cbfd18b0118f289db5fbe741" + }, + { + "name": "male_dancer_tone1", + "unicode": "1F57A-1F3FB", + "digest": "6c56a16cb105bcdd97472645b3a351cebdbb1132cbfd18b0118f289db5fbe741" + }, + { + "name": "man_dancing_tone2", + "unicode": "1F57A-1F3FC", + "digest": "ed7e78c14d205a03fdd5581e5213add69a55e13b4cbaf76a6d5a0d6c80f53327" + }, + { + "name": "male_dancer_tone2", + "unicode": "1F57A-1F3FC", + "digest": "ed7e78c14d205a03fdd5581e5213add69a55e13b4cbaf76a6d5a0d6c80f53327" + }, + { + "name": "man_dancing_tone3", + "unicode": "1F57A-1F3FD", + "digest": "13b45403e11800163406206eedeb8b579cc83eca2f60246be97e099164387bc8" + }, + { + "name": "male_dancer_tone3", + "unicode": "1F57A-1F3FD", + "digest": "13b45403e11800163406206eedeb8b579cc83eca2f60246be97e099164387bc8" + }, + { + "name": "man_dancing_tone4", + "unicode": "1F57A-1F3FE", + "digest": "f6feb1b0b83565fadcdd1a8737d3daa08893e919547d2a06de899160162d9c4a" + }, + { + "name": "male_dancer_tone4", + "unicode": "1F57A-1F3FE", + "digest": "f6feb1b0b83565fadcdd1a8737d3daa08893e919547d2a06de899160162d9c4a" + }, + { + "name": "man_dancing_tone5", + "unicode": "1F57A-1F3FF", + "digest": "fe20a9ed9ba991653b4d0683de347ed7c226a5d75610307584a2ddd6fcd1e3f2" + }, + { + "name": "male_dancer_tone5", + "unicode": "1F57A-1F3FF", + "digest": "fe20a9ed9ba991653b4d0683de347ed7c226a5d75610307584a2ddd6fcd1e3f2" + }, + { + "name": "man_in_tuxedo", + "unicode": "1F935", + "digest": "4d451a971dfefedc4830ba78e19b123f250e09ae65baddccdc56c0f8aa3a9b50" + }, + { + "name": "man_in_tuxedo_tone1", + "unicode": "1F935-1F3FB", + "digest": "2814833334fb211ae2ecb1fb5964e9752282d0fb4d7f3477de5dd2a4f812a793" + }, + { + "name": "tuxedo_tone1", + "unicode": "1F935-1F3FB", + "digest": "2814833334fb211ae2ecb1fb5964e9752282d0fb4d7f3477de5dd2a4f812a793" + }, + { + "name": "man_in_tuxedo_tone2", + "unicode": "1F935-1F3FC", + "digest": "cd1bab9ee0e2335d3cd99d51216cccdc4fc3c2cf20129b8b7e11a51a77258f68" + }, + { + "name": "tuxedo_tone2", + "unicode": "1F935-1F3FC", + "digest": "cd1bab9ee0e2335d3cd99d51216cccdc4fc3c2cf20129b8b7e11a51a77258f68" + }, + { + "name": "man_in_tuxedo_tone3", + "unicode": "1F935-1F3FD", + "digest": "f387775f925fe60b9f3e7cad63a55d4d196ddd41658029a70440d14c17cb99f9" + }, + { + "name": "tuxedo_tone3", + "unicode": "1F935-1F3FD", + "digest": "f387775f925fe60b9f3e7cad63a55d4d196ddd41658029a70440d14c17cb99f9" + }, + { + "name": "man_in_tuxedo_tone4", + "unicode": "1F935-1F3FE", + "digest": "08debd7a573d1201aee8a2f281ef7cb638d4a2a096222150391f36963f07c622" + }, + { + "name": "tuxedo_tone4", + "unicode": "1F935-1F3FE", + "digest": "08debd7a573d1201aee8a2f281ef7cb638d4a2a096222150391f36963f07c622" + }, + { + "name": "man_in_tuxedo_tone5", + "unicode": "1F935-1F3FF", + "digest": "e3b10e0619f0911cf9b665a265f4ef829b8f6ba6e9c3a021d0539a27e315f8fe" + }, + { + "name": "tuxedo_tone5", + "unicode": "1F935-1F3FF", + "digest": "e3b10e0619f0911cf9b665a265f4ef829b8f6ba6e9c3a021d0539a27e315f8fe" + }, { "name": "man_tone1", "unicode": "1F468-1F3FB", @@ -6809,6 +7064,16 @@ "unicode": "1F341", "digest": "72629a205e33f89337815ad7e51bb5c73947d1a9f98afe5072bdf4846827ae72" }, + { + "name": "martial_arts_uniform", + "unicode": "1F94B", + "digest": "a1ae797b31081425b388ab31efc635d8eb73a40980fd0fae4708aa5313e2a964" + }, + { + "name": "karate_uniform", + "unicode": "1F94B", + "digest": "a1ae797b31081425b388ab31efc635d8eb73a40980fd0fae4708aa5313e2a964" + }, { "name": "mask", "unicode": "1F637", @@ -7029,6 +7294,16 @@ "unicode": "1F396", "digest": "5da18351dc14b66cfc070148c83b7c8e67e6b1e3f515ae501133c38ee5c28d3d" }, + { + "name": "milk", + "unicode": "1F95B", + "digest": "38b28ea40399601fabc95bac5eaaf5a9e4e25548ec80325bd5069395ea884f85" + }, + { + "name": "glass_of_milk", + "unicode": "1F95B", + "digest": "38b28ea40399601fabc95bac5eaaf5a9e4e25548ec80325bd5069395ea884f85" + }, { "name": "milky_way", "unicode": "1F30C", @@ -7084,31 +7359,6 @@ "unicode": "1F69D", "digest": "2c9f185babcb4001fcef2b8dfc4a32126729843084d0076c3e3ccdc845ab23ad" }, - { - "name": "mood_bubble", - "unicode": "1F5F0", - "digest": "1df7061217e478d43ab9a87d4f351c4ca56705acd6b4e0b0bedfdece77635f1b" - }, - { - "name": "mood_bubble_lightning", - "unicode": "1F5F1", - "digest": "4af3e4e53eaa328b0d20542ab31705a74bf9fd368cd0673b706838ce1681d3c9" - }, - { - "name": "lightning_mood_bubble", - "unicode": "1F5F1", - "digest": "4af3e4e53eaa328b0d20542ab31705a74bf9fd368cd0673b706838ce1681d3c9" - }, - { - "name": "mood_lightning", - "unicode": "1F5F2", - "digest": "6784635e81ec722fd50a1c2a23b0f9679e4bf1b5ae2b5a01eeb995bc1f7a426f" - }, - { - "name": "lightning_mood", - "unicode": "1F5F2", - "digest": "6784635e81ec722fd50a1c2a23b0f9679e4bf1b5ae2b5a01eeb995bc1f7a426f" - }, { "name": "mortar_board", "unicode": "1F393", @@ -7119,6 +7369,16 @@ "unicode": "1F54C", "digest": "5f3d3de7feac953a70a318113531c2857d760a516c3d8d6f42d2a3b3b67ed196" }, + { + "name": "motor_scooter", + "unicode": "1F6F5", + "digest": "e2dc7c981744a71f46858bd0858ff91af704ac06425ed80377bc3b119e57c872" + }, + { + "name": "motorbike", + "unicode": "1F6F5", + "digest": "e2dc7c981744a71f46858bd0858ff91af704ac06425ed80377bc3b119e57c872" + }, { "name": "motorboat", "unicode": "1F6E5", @@ -7209,16 +7469,6 @@ "unicode": "1F401", "digest": "f3ed37b639b7c16aae49502bd423f9fdeabaf15bc6f0f74063954b189e176b5d" }, - { - "name": "mouse_one", - "unicode": "1F5AF", - "digest": "e0d2055ccba489d24e0c0b6d2f22793efe48a734b0fd50f5af88f721b40665c0" - }, - { - "name": "one_button_mouse", - "unicode": "1F5AF", - "digest": "e0d2055ccba489d24e0c0b6d2f22793efe48a734b0fd50f5af88f721b40665c0" - }, { "name": "mouse_three_button", "unicode": "1F5B1", @@ -7239,6 +7489,66 @@ "unicode": "1F5FF", "digest": "2c1d0662c95928936e6b9ab5a40c6110ff1cea5339f2803c7b63aabc76115afb" }, + { + "name": "mrs_claus", + "unicode": "1F936", + "digest": "1f72f586ca75bd7ebb4150cdcc8199a930c32fa4b81510cb8d200f1b3ddd4076" + }, + { + "name": "mother_christmas", + "unicode": "1F936", + "digest": "1f72f586ca75bd7ebb4150cdcc8199a930c32fa4b81510cb8d200f1b3ddd4076" + }, + { + "name": "mrs_claus_tone1", + "unicode": "1F936-1F3FB", + "digest": "244596919e0fed050203cf9e040899de323d7821235929f175852439927bd129" + }, + { + "name": "mother_christmas_tone1", + "unicode": "1F936-1F3FB", + "digest": "244596919e0fed050203cf9e040899de323d7821235929f175852439927bd129" + }, + { + "name": "mrs_claus_tone2", + "unicode": "1F936-1F3FC", + "digest": "8cde96e8521f3a90262a7f5f8a2989a9590d9a02cda2c37e92335dc05975c18d" + }, + { + "name": "mother_christmas_tone2", + "unicode": "1F936-1F3FC", + "digest": "8cde96e8521f3a90262a7f5f8a2989a9590d9a02cda2c37e92335dc05975c18d" + }, + { + "name": "mrs_claus_tone3", + "unicode": "1F936-1F3FD", + "digest": "c39cd4346d4581799dd0e9a6447c91a954a75747bf2682c8e4d79c3b0fcf7405" + }, + { + "name": "mother_christmas_tone3", + "unicode": "1F936-1F3FD", + "digest": "c39cd4346d4581799dd0e9a6447c91a954a75747bf2682c8e4d79c3b0fcf7405" + }, + { + "name": "mrs_claus_tone4", + "unicode": "1F936-1F3FE", + "digest": "84c85cf54559ea2d78d196fee96149a249af4f959b78e223a0ec4fb72abdbcab" + }, + { + "name": "mother_christmas_tone4", + "unicode": "1F936-1F3FE", + "digest": "84c85cf54559ea2d78d196fee96149a249af4f959b78e223a0ec4fb72abdbcab" + }, + { + "name": "mrs_claus_tone5", + "unicode": "1F936-1F3FF", + "digest": "ce26c0e0645713b17e7497d9f2d0484cc5477564dae99320cabf04d160d3b2ff" + }, + { + "name": "mother_christmas_tone5", + "unicode": "1F936-1F3FF", + "digest": "ce26c0e0645713b17e7497d9f2d0484cc5477564dae99320cabf04d160d3b2ff" + }, { "name": "muscle", "unicode": "1F4AA", @@ -7329,6 +7639,16 @@ "unicode": "1F4DB", "digest": "f9f6a4895ff0be8fb2ccc7ad195b94e9650f742f66ead999e90724cfb77af628" }, + { + "name": "nauseated_face", + "unicode": "1F922", + "digest": "f8471cf4720948d8246ec9d30e29783e819f90e3cfe8b1ba628671a1aad1a91c" + }, + { + "name": "sick", + "unicode": "1F922", + "digest": "f8471cf4720948d8246ec9d30e29783e819f90e3cfe8b1ba628671a1aad1a91c" + }, { "name": "necktie", "unicode": "1F454", @@ -7349,16 +7669,6 @@ "unicode": "1F913", "digest": "9e5f3c93db25cf1d0f9d6e6bd2993161afec6c30573ba3fe85e13b8c84483d66" }, - { - "name": "network", - "unicode": "1F5A7", - "digest": "1dbaa54deeb2328fd8a3f044e450c97ac3ff39627c598bb2f4312d677482ee06" - }, - { - "name": "three_networked_computers", - "unicode": "1F5A7", - "digest": "1dbaa54deeb2328fd8a3f044e450c97ac3ff39627c598bb2f4312d677482ee06" - }, { "name": "neutral_face", "unicode": "1F610", @@ -7514,26 +7824,6 @@ "unicode": "1F443-1F3FF", "digest": "1e0f9842e0f8ad5805eabd3f35a6038b7a2e49d566a1f5c17271f9cdf467ca60" }, - { - "name": "note", - "unicode": "1F5C9", - "digest": "073660fdaa02ecf98d04f61f8d65d6cc447ccae3825fccaff19a2c99ebba52af" - }, - { - "name": "note_page", - "unicode": "1F5C9", - "digest": "073660fdaa02ecf98d04f61f8d65d6cc447ccae3825fccaff19a2c99ebba52af" - }, - { - "name": "note_empty", - "unicode": "1F5C6", - "digest": "06b56eeaca6349bbcf1020bea98f937450a7e086db65cd5d7497748e0fb607be" - }, - { - "name": "empty_note_page", - "unicode": "1F5C6", - "digest": "06b56eeaca6349bbcf1020bea98f937450a7e086db65cd5d7497748e0fb607be" - }, { "name": "notebook", "unicode": "1F4D3", @@ -7544,26 +7834,6 @@ "unicode": "1F4D4", "digest": "d822eda4b49cbfa399b36f134c1a0b8dcfdd27ed89f12c50bc18f6f0a9aa56ef" }, - { - "name": "notepad", - "unicode": "1F5CA", - "digest": "85069e2d13540886457368a57295072aec44c7137d9223bfcf908ce1f0e5124e" - }, - { - "name": "note_pad", - "unicode": "1F5CA", - "digest": "85069e2d13540886457368a57295072aec44c7137d9223bfcf908ce1f0e5124e" - }, - { - "name": "notepad_empty", - "unicode": "1F5C7", - "digest": "8be5053e74c13d8220917c5aee1f4afdecb001612886438f283b0c2a0fecf6af" - }, - { - "name": "empty_note_pad", - "unicode": "1F5C7", - "digest": "8be5053e74c13d8220917c5aee1f4afdecb001612886438f283b0c2a0fecf6af" - }, { "name": "notepad_spiral", "unicode": "1F5D2", @@ -7599,6 +7869,16 @@ "unicode": "1F30A", "digest": "1a9ca9848d4fb75852addfc10bf84eccf7caa5339714b90e3de4cb6f2518465e" }, + { + "name": "octagonal_sign", + "unicode": "1F6D1", + "digest": "9f6927048e1f9da57f89d1ae1eb86fa4ab7abdbabca756a738a799e948d0b3f9" + }, + { + "name": "stop_sign", + "unicode": "1F6D1", + "digest": "9f6927048e1f9da57f89d1ae1eb86fa4ab7abdbabca756a738a799e948d0b3f9" + }, { "name": "octopus", "unicode": "1F419", @@ -7859,16 +8139,6 @@ "unicode": "26CE", "digest": "6112e2a1656b1cb8bd9a8b0dfa6cbf66d30cae671710a9ef75c821de344aab2b" }, - { - "name": "optical_disk", - "unicode": "1F5B8", - "digest": "df8c10028d29d65f144a6b789d1c3294e7b3293554c4c30d28d72dc7ba8d9a5d" - }, - { - "name": "optical_disc_icon", - "unicode": "1F5B8", - "digest": "df8c10028d29d65f144a6b789d1c3294e7b3293554c4c30d28d72dc7ba8d9a5d" - }, { "name": "orange_book", "unicode": "1F4D9", @@ -7884,6 +8154,11 @@ "unicode": "1F4E4", "digest": "e47cb481a0ffcb39996f32fd313e19b362a91d8dda15ffca48ac23a3b5bb5baf" }, + { + "name": "owl", + "unicode": "1F989", + "digest": "f62ec1ad23ad9038966eea8d8b79660ac212f291af2e89bcdb0fdc683caf41e5" + }, { "name": "ox", "unicode": "1F402", @@ -7894,11 +8169,6 @@ "unicode": "1F4E6", "digest": "e82bf5accebb65136e897c15607eef635fb79fd7b2d8c8e19a9eb00b6786918c" }, - { - "name": "page", - "unicode": "1F5CF", - "digest": "cc745056525f59d9128d1d03b14770376bb09ab64b8ef4ac994ab7f38efd4783" - }, { "name": "page_facing_up", "unicode": "1F4C4", @@ -7914,11 +8184,6 @@ "unicode": "1F4DF", "digest": "e21c756cc1c58ebc1b37ebcd38e22a25b31e2e81306c6f18285d6a7671f9eb12" }, - { - "name": "pages", - "unicode": "1F5D0", - "digest": "05bd47b78f089389356d9d839c736843f56b959ab4277056606ffcbb013390bc" - }, { "name": "paintbrush", "unicode": "1F58C", @@ -7934,6 +8199,11 @@ "unicode": "1F334", "digest": "90fedafd62fe0abf51325174d0f293ebb9a4794913b9ba93b12f2d0119056df1" }, + { + "name": "pancakes", + "unicode": "1F95E", + "digest": "5256b4832431e8a88555796b1a9726f12d909a26fb2bdc3a0abff76412c45903" + }, { "name": "panda_face", "unicode": "1F43C", @@ -8009,6 +8279,16 @@ "unicode": "1F351", "digest": "768d1f4f29e1e06aff5abb29043be83087ded16427ce6a2d0f682814e665e311" }, + { + "name": "peanuts", + "unicode": "1F95C", + "digest": "e2384846b6e4a6c3a56e991ebb749cb68b330ac00a9e9d888b2c39105ff7ff5d" + }, + { + "name": "shelled_peanut", + "unicode": "1F95C", + "digest": "e2384846b6e4a6c3a56e991ebb749cb68b330ac00a9e9d888b2c39105ff7ff5d" + }, { "name": "pear", "unicode": "1F350", @@ -8049,41 +8329,11 @@ "unicode": "270F", "digest": "9ca1b56b5726f472b1f1b23050ed163e213916dac379d22e38e4c8358fe871e0" }, - { - "name": "pencil3", - "unicode": "1F589", - "digest": "52c1ba1228917eb491ac1745a495e0fdafba6b985a81caba250f71d1f94c725c" - }, - { - "name": "lower_left_pencil", - "unicode": "1F589", - "digest": "52c1ba1228917eb491ac1745a495e0fdafba6b985a81caba250f71d1f94c725c" - }, { "name": "penguin", "unicode": "1F427", "digest": "a1800ab931d6dc84a9c89bfab2c815198025c276d952509c55b18dd20bd9d316" }, - { - "name": "pennant_black", - "unicode": "1F3F2", - "digest": "cd3c33bfc3c7fbe84b98d2d481d56a7bf5488ff94afadd8b5a0e454768b80269" - }, - { - "name": "black_pennant", - "unicode": "1F3F2", - "digest": "cd3c33bfc3c7fbe84b98d2d481d56a7bf5488ff94afadd8b5a0e454768b80269" - }, - { - "name": "pennant_white", - "unicode": "1F3F1", - "digest": "818b1be73540f2cfeb1c514e1ee75d18715af317f0db817d9ae081b9ea33d4b0" - }, - { - "name": "white_pennant", - "unicode": "1F3F1", - "digest": "818b1be73540f2cfeb1c514e1ee75d18715af317f0db817d9ae081b9ea33d4b0" - }, { "name": "pensive", "unicode": "1F614", @@ -8226,18 +8476,8 @@ }, { "name": "table_tennis", - "unicode": "1F3D3", - "digest": "943a858bd054c81a08a08951f8351c27c8009b85a9359729c7362868298b58e1" - }, - { - "name": "piracy", - "unicode": "1F572", - "digest": "f42955ba75c598392e5e258be49968d858c876e0d6e7aa9dc795f7e8cff42be9" - }, - { - "name": "no_piracy", - "unicode": "1F572", - "digest": "f42955ba75c598392e5e258be49968d858c876e0d6e7aa9dc795f7e8cff42be9" + "unicode": "1F3D3", + "digest": "943a858bd054c81a08a08951f8351c27c8009b85a9359729c7362868298b58e1" }, { "name": "pisces", @@ -8469,6 +8709,11 @@ "unicode": "1F6B0", "digest": "dbe80d9637837377cc2a290da2e895f81a3108cc18b049e3d87212402c1c2098" }, + { + "name": "potato", + "unicode": "1F954", + "digest": "a56a69f36f3a0793f278726d92c0cea2960554f3062ef1a0904526a04511d8e1" + }, { "name": "pouch", "unicode": "1F45D", @@ -8524,6 +8769,96 @@ "unicode": "1F4FF", "digest": "80177091264430cbcf7c994fbe5ee17319d1a58d933636cc752a54dafcf98a05" }, + { + "name": "pregnant_woman", + "unicode": "1F930", + "digest": "49abb86409103338bdb6ae43c13a78ca2dc9cd158a26df35eadd0da3c84a4352" + }, + { + "name": "expecting_woman", + "unicode": "1F930", + "digest": "49abb86409103338bdb6ae43c13a78ca2dc9cd158a26df35eadd0da3c84a4352" + }, + { + "name": "pregnant_woman_tone1", + "unicode": "1F930-1F3FB", + "digest": "5a9f8ed2b631ecf8af111803a5c11f4c156435a5293cb50329c7b98697c8da25" + }, + { + "name": "expecting_woman_tone1", + "unicode": "1F930-1F3FB", + "digest": "5a9f8ed2b631ecf8af111803a5c11f4c156435a5293cb50329c7b98697c8da25" + }, + { + "name": "pregnant_woman_tone2", + "unicode": "1F930-1F3FC", + "digest": "279a2eafff603b11629c955b05f5bd3d7da9a271d4fb3f02e9ccd457b8d2d815" + }, + { + "name": "expecting_woman_tone2", + "unicode": "1F930-1F3FC", + "digest": "279a2eafff603b11629c955b05f5bd3d7da9a271d4fb3f02e9ccd457b8d2d815" + }, + { + "name": "pregnant_woman_tone3", + "unicode": "1F930-1F3FD", + "digest": "93bb63ec2312db315e3f0065520b715cc413ac0fd65538ec9b5cd97df2a42b20" + }, + { + "name": "expecting_woman_tone3", + "unicode": "1F930-1F3FD", + "digest": "93bb63ec2312db315e3f0065520b715cc413ac0fd65538ec9b5cd97df2a42b20" + }, + { + "name": "pregnant_woman_tone4", + "unicode": "1F930-1F3FE", + "digest": "b8dc3dcec894bfd832a249459b10850f8786b6778d8887a677d1291865623da2" + }, + { + "name": "expecting_woman_tone4", + "unicode": "1F930-1F3FE", + "digest": "b8dc3dcec894bfd832a249459b10850f8786b6778d8887a677d1291865623da2" + }, + { + "name": "pregnant_woman_tone5", + "unicode": "1F930-1F3FF", + "digest": "73ee432752f81980f353a7f9b9f7a5ece62512dca08e15c1876b89227face21c" + }, + { + "name": "expecting_woman_tone5", + "unicode": "1F930-1F3FF", + "digest": "73ee432752f81980f353a7f9b9f7a5ece62512dca08e15c1876b89227face21c" + }, + { + "name": "prince", + "unicode": "1F934", + "digest": "34a0e0625f0a9825d3674192d6233b6cae4d8130451293df09f91a6a4165869c" + }, + { + "name": "prince_tone1", + "unicode": "1F934-1F3FB", + "digest": "ccecdfeccb2ab1fceceae14f3fba875c8c7099785a4c40131c08a697b5b675fc" + }, + { + "name": "prince_tone2", + "unicode": "1F934-1F3FC", + "digest": "c373fd3e0c1798415e3d8d88fab6c98c1bbdedcbe6f52f3a3899f6e2124a768d" + }, + { + "name": "prince_tone3", + "unicode": "1F934-1F3FD", + "digest": "71d15695ca954d55aa69d3c753c7d31a8ba5329713a8ddbc90dafc11e524c4ef" + }, + { + "name": "prince_tone4", + "unicode": "1F934-1F3FE", + "digest": "08f6cb32424f15cc3aaf83c31a5dac7c01a6be2f37ea8f13aed579ce6fb4db19" + }, + { + "name": "prince_tone5", + "unicode": "1F934-1F3FF", + "digest": "77d521148efa33fa4d3409693d050fecfd948411e807327484f174e289834649" + }, { "name": "princess", "unicode": "1F478", @@ -8559,16 +8894,6 @@ "unicode": "1F5A8", "digest": "5e5307e3dc7ec4e16c9978fb00934c99c4adefca7d32732a244d1f2de71ce6f8" }, - { - "name": "prohibited", - "unicode": "1F6C7", - "digest": "bc6cdea2269a0ec39576d98dc4cda2bd9efa4dc330dde870148c6a85ad9cc63f" - }, - { - "name": "prohibited_sign", - "unicode": "1F6C7", - "digest": "bc6cdea2269a0ec39576d98dc4cda2bd9efa4dc330dde870148c6a85ad9cc63f" - }, { "name": "projector", "unicode": "1F4FD", @@ -8624,11 +8949,6 @@ "unicode": "1F4CC", "digest": "c3f7d7008be6bab8dc02284d4d759abf7aafbb3dbbe3a53f0f5b2ff685af88f8" }, - { - "name": "pushpin_black", - "unicode": "1F588", - "digest": "80ebac74edb9e8e1f8a219b32a676d318ed73b359cd8193b91b493d775307f63" - }, { "name": "put_litter_in_its_place", "unicode": "1F6AE", @@ -8709,6 +9029,66 @@ "unicode": "1F308", "digest": "a93aceb54e965f35e397e8c8716b1831614933308d026012d5464ee42783ed4d" }, + { + "name": "raised_back_of_hand", + "unicode": "1F91A", + "digest": "20973a697e826625deba5ee3c4f25eb5e1737f2e860ac6fe4ee4d0e0c84b5e12" + }, + { + "name": "back_of_hand", + "unicode": "1F91A", + "digest": "20973a697e826625deba5ee3c4f25eb5e1737f2e860ac6fe4ee4d0e0c84b5e12" + }, + { + "name": "raised_back_of_hand_tone1", + "unicode": "1F91A-1F3FB", + "digest": "06af5941255ca69d10d99d0a512bbda6141a296453835dbccf259ce0afe1dd3d" + }, + { + "name": "back_of_hand_tone1", + "unicode": "1F91A-1F3FB", + "digest": "06af5941255ca69d10d99d0a512bbda6141a296453835dbccf259ce0afe1dd3d" + }, + { + "name": "raised_back_of_hand_tone2", + "unicode": "1F91A-1F3FC", + "digest": "429ed19555c9e5197b729b3e7bd8013346551051cb0b3fbc8a4372717c9a027d" + }, + { + "name": "back_of_hand_tone2", + "unicode": "1F91A-1F3FC", + "digest": "429ed19555c9e5197b729b3e7bd8013346551051cb0b3fbc8a4372717c9a027d" + }, + { + "name": "raised_back_of_hand_tone3", + "unicode": "1F91A-1F3FD", + "digest": "487a1c3f19e77c99b520ec073de2acc4a9e585b739a84b3989f7de85d2c2045c" + }, + { + "name": "back_of_hand_tone3", + "unicode": "1F91A-1F3FD", + "digest": "487a1c3f19e77c99b520ec073de2acc4a9e585b739a84b3989f7de85d2c2045c" + }, + { + "name": "raised_back_of_hand_tone4", + "unicode": "1F91A-1F3FE", + "digest": "154254d8500c55ec3de698be4a352f9bcf06e2950cabc4eabaccad0f39a1e1e9" + }, + { + "name": "back_of_hand_tone4", + "unicode": "1F91A-1F3FE", + "digest": "154254d8500c55ec3de698be4a352f9bcf06e2950cabc4eabaccad0f39a1e1e9" + }, + { + "name": "raised_back_of_hand_tone5", + "unicode": "1F91A-1F3FF", + "digest": "6e9c0855ecd5f14adca5e5862427c3d39ffcf86f7ddd3aaa1fefc3cefc7483c8" + }, + { + "name": "back_of_hand_tone5", + "unicode": "1F91A-1F3FF", + "digest": "6e9c0855ecd5f14adca5e5862427c3d39ffcf86f7ddd3aaa1fefc3cefc7483c8" + }, { "name": "raised_hand", "unicode": "270B", @@ -8879,6 +9259,16 @@ "unicode": "23EA", "digest": "d20c918c1e528ff0947312738501ca9a6fb6ff4016aad07db7a8125d00fd65cd" }, + { + "name": "rhino", + "unicode": "1F98F", + "digest": "163fa3acd78eead72c431a1f48b8465a6d45272a9169560e456d30b4df93dc6b" + }, + { + "name": "rhinoceros", + "unicode": "1F98F", + "digest": "163fa3acd78eead72c431a1f48b8465a6d45272a9169560e456d30b4df93dc6b" + }, { "name": "ribbon", "unicode": "1F380", @@ -8905,40 +9295,70 @@ "digest": "b942a06d3da0570aca59bab0af57cd8c16863934f12a38f70339fd0a36f675f5" }, { - "name": "right_speaker", - "unicode": "1F568", - "digest": "d268bb84be863c0884620dfc6d2a764b0c7466d2f9810549b138e21ac70add4e" + "name": "right_facing_fist", + "unicode": "1F91C", + "digest": "f815d1cc0c0345ddcc8886ae9c133582d7dc779732ac9b93dde1ab4fdd3b251d" + }, + { + "name": "right_fist", + "unicode": "1F91C", + "digest": "f815d1cc0c0345ddcc8886ae9c133582d7dc779732ac9b93dde1ab4fdd3b251d" + }, + { + "name": "right_facing_fist_tone1", + "unicode": "1F91C-1F3FB", + "digest": "0f9269b70cf68071d97389e059a2bdacffd73f2afd2ce6cfd7447bb1a4e9abbb" + }, + { + "name": "right_fist_tone1", + "unicode": "1F91C-1F3FB", + "digest": "0f9269b70cf68071d97389e059a2bdacffd73f2afd2ce6cfd7447bb1a4e9abbb" }, { - "name": "right_speaker_one", - "unicode": "1F569", - "digest": "5b92daa87bdf6ee15e798bec382a2ee885f4e6e77a68a3f626adcfe4c782b375" + "name": "right_facing_fist_tone2", + "unicode": "1F91C-1F3FC", + "digest": "32a9833db853972e49e65aa227fb0512c57362da190aa1cc40e1d64f238e837e" }, { - "name": "right_speaker_with_one_sound_wave", - "unicode": "1F569", - "digest": "5b92daa87bdf6ee15e798bec382a2ee885f4e6e77a68a3f626adcfe4c782b375" + "name": "right_fist_tone2", + "unicode": "1F91C-1F3FC", + "digest": "32a9833db853972e49e65aa227fb0512c57362da190aa1cc40e1d64f238e837e" }, { - "name": "right_speaker_three", - "unicode": "1F56A", - "digest": "4d00b720a65bd0f4c3682b290b1976ec2388d6ae61225398f4e70556ae9e5f80" + "name": "right_facing_fist_tone3", + "unicode": "1F91C-1F3FD", + "digest": "be4706f8bb088411f5cbbf9065a0ae5b773c97456bd975c2b6789765657847b9" }, { - "name": "right_speaker_with_three_sound_waves", - "unicode": "1F56A", - "digest": "4d00b720a65bd0f4c3682b290b1976ec2388d6ae61225398f4e70556ae9e5f80" + "name": "right_fist_tone3", + "unicode": "1F91C-1F3FD", + "digest": "be4706f8bb088411f5cbbf9065a0ae5b773c97456bd975c2b6789765657847b9" + }, + { + "name": "right_facing_fist_tone4", + "unicode": "1F91C-1F3FE", + "digest": "1680862891a9d85c4b6f76232a80e2ef7428bcec93087c86eae2efaba9c6a3f7" + }, + { + "name": "right_fist_tone4", + "unicode": "1F91C-1F3FE", + "digest": "1680862891a9d85c4b6f76232a80e2ef7428bcec93087c86eae2efaba9c6a3f7" + }, + { + "name": "right_facing_fist_tone5", + "unicode": "1F91C-1F3FF", + "digest": "388715a4bc2178c52bbb3bc2729f57be50acab5d751784c9f3220e86c6b1fbcc" + }, + { + "name": "right_fist_tone5", + "unicode": "1F91C-1F3FF", + "digest": "388715a4bc2178c52bbb3bc2729f57be50acab5d751784c9f3220e86c6b1fbcc" }, { "name": "ring", "unicode": "1F48D", "digest": "b5322907222797b5e1786209cda88513e76cd397a40f0a7da24847245c95ef9d" }, - { - "name": "ringing_bell", - "unicode": "1F56D", - "digest": "d71ab7fa937fc4af507b5b07ea58a4f31e875d9e8304ef2b850d7cebe0e9cd66" - }, { "name": "robot", "unicode": "1F916", @@ -8954,6 +9374,16 @@ "unicode": "1F680", "digest": "b82e68a95aa89a6de344d6e256fef86a848ebc91de560b043b3e1f7fd072d57d" }, + { + "name": "rofl", + "unicode": "1F923", + "digest": "f4f99ba2ac67b97338f904f9384ff03fb832a2e427bf6e74611bf5fee45f1f48" + }, + { + "name": "rolling_on_the_floor_laughing", + "unicode": "1F923", + "digest": "f4f99ba2ac67b97338f904f9384ff03fb832a2e427bf6e74611bf5fee45f1f48" + }, { "name": "roller_coaster", "unicode": "1F3A2", @@ -8984,11 +9414,6 @@ "unicode": "1F3F5", "digest": "2537def4deef422d4e669b28b1a0675259306ab38601019df3ec3482b14e52d5" }, - { - "name": "rosette_black", - "unicode": "1F3F6", - "digest": "ae8675891c88f9d98463d35178445950c39b0deb0f0e8b3f341228a6e0d0e477" - }, { "name": "rotating_light", "unicode": "1F6A8", @@ -9089,6 +9514,16 @@ "unicode": "1F376", "digest": "0a786075f3d9da48ae91afccf6ae0d097888da9509d354ee1d3cb99afcc88fe4" }, + { + "name": "salad", + "unicode": "1F957", + "digest": "fe321487ab847abe670e68a83f1d9e096129741c689c769ee7de4a65aeac29f8" + }, + { + "name": "green_salad", + "unicode": "1F957", + "digest": "fe321487ab847abe670e68a83f1d9e096129741c689c769ee7de4a65aeac29f8" + }, { "name": "sandal", "unicode": "1F461", @@ -9159,6 +9594,11 @@ "unicode": "2702", "digest": "95225be28f05d8b5a6b6e6bf58d973f61f183ad4fef55a558dc1b810796b85c8" }, + { + "name": "scooter", + "unicode": "1F6F4", + "digest": "4a7db148880398db75e059711cb53edefb6b8fa9d442009f52856b887ab1dde4" + }, { "name": "scorpion", "unicode": "1F982", @@ -9189,6 +9629,16 @@ "unicode": "1F4BA", "digest": "ae68d86fc2a07cae332451b23bd1ceba3f6526a6c56d8c1089777fa4632850e1" }, + { + "name": "second_place", + "unicode": "1F948", + "digest": "9e2336fc16e532829b55380252f94655b58817d47c909fc2570002c5b06b9c40" + }, + { + "name": "second_place_medal", + "unicode": "1F948", + "digest": "9e2336fc16e532829b55380252f94655b58817d47c909fc2570002c5b06b9c40" + }, { "name": "secret", "unicode": "3299", @@ -9204,16 +9654,61 @@ "unicode": "1F331", "digest": "c0ec5e6d20e1afdc4e78eeddb1301c8b708ad6278e7287a4e4e825417c858e75" }, + { + "name": "selfie", + "unicode": "1F933", + "digest": "2a1bc9f18ad4d6fb893d91c88ef1b2d9bd063dc2bb1a4b08c248c30f52545d4e" + }, + { + "name": "selfie_tone1", + "unicode": "1F933-1F3FB", + "digest": "26dc212ffed30c276bd6a66a72bc4513e68098a2205fb4ca5b51ccfa1de5b544" + }, + { + "name": "selfie_tone2", + "unicode": "1F933-1F3FC", + "digest": "71eceaefda46e3521f374f76693e7fa8f215067498067900080e2925ca94d7de" + }, + { + "name": "selfie_tone3", + "unicode": "1F933-1F3FD", + "digest": "53eabbd4f6b8ebbd2f7af7bf5cd64309c4039ac1c5b2180290a547deaafcebdf" + }, + { + "name": "selfie_tone4", + "unicode": "1F933-1F3FE", + "digest": "0baad378b09652b99c5d458db2e03b4db14a1557db4ea0969806a0ca1d33d40c" + }, + { + "name": "selfie_tone5", + "unicode": "1F933-1F3FF", + "digest": "9a07608f34ec4dad48764a855f83f3965709d7b2fd2342e6dc9ed61f23f4adfd" + }, { "name": "seven", "unicode": "0037-20E3", "digest": "ae85172d2c76c44afb4e3b45d277d400abb2dc895244b9abfbd1dac1cd7c53c2" }, + { + "name": "shallow_pan_of_food", + "unicode": "1F958", + "digest": "7c7ad9d5d3f7226427d310b5853e8257fad899febe58dcbc5adb4677964f5c6d" + }, + { + "name": "paella", + "unicode": "1F958", + "digest": "7c7ad9d5d3f7226427d310b5853e8257fad899febe58dcbc5adb4677964f5c6d" + }, { "name": "shamrock", "unicode": "2618", "digest": "68ed70c26e04a818439a1742d2da6bc169edd02db86b6e6f8014b651f3235488" }, + { + "name": "shark", + "unicode": "1F988", + "digest": "23a2364b6356e7bbb84c138e9cf58e2c68cd8caabb337a0c4d365ce87bf5d2da" + }, { "name": "shaved_ice", "unicode": "1F367", @@ -9254,11 +9749,56 @@ "unicode": "1F6CD", "digest": "95a3f03c675207bb1354270d02a630c204455c47b3edca23c48523a40cf3ea3b" }, + { + "name": "shopping_cart", + "unicode": "1F6D2", + "digest": "4599b63f6861cdb4d8272cac84435c24c1d4d6a73c66d51e04a1cd14a1d333e6" + }, + { + "name": "shopping_trolley", + "unicode": "1F6D2", + "digest": "4599b63f6861cdb4d8272cac84435c24c1d4d6a73c66d51e04a1cd14a1d333e6" + }, { "name": "shower", "unicode": "1F6BF", "digest": "6b3c767c0eb472d4861c6c3cc2735a5e2c09681872ef42a11dc89f3c80b9da01" }, + { + "name": "shrimp", + "unicode": "1F990", + "digest": "b3651f3be3767125076a013fe903854f5b456a8afae865cb219cf528e0f44caa" + }, + { + "name": "shrug", + "unicode": "1F937", + "digest": "6e264243cc3b6e396069dea4357a958bdcd4081cb1af0ed6aa47235bef88cf27" + }, + { + "name": "shrug_tone1", + "unicode": "1F937-1F3FB", + "digest": "0567b9fd95c8a857914003a5465a500ca79c8111811d45b865021b1b1d92d0b1" + }, + { + "name": "shrug_tone2", + "unicode": "1F937-1F3FC", + "digest": "1557c2f5e3d4599c806d74c0b78afcca940678787534b6862bb89a20601bac8a" + }, + { + "name": "shrug_tone3", + "unicode": "1F937-1F3FD", + "digest": "f02754541a7bf74ba7eebe6c27daf1e3e1dac25172c35b8ba45641e278dfda3d" + }, + { + "name": "shrug_tone4", + "unicode": "1F937-1F3FE", + "digest": "2b5121164cb5f4e253d8fb31f6445cf8afaf30dba41732edc511440cdb78d15c" + }, + { + "name": "shrug_tone5", + "unicode": "1F937-1F3FF", + "digest": "62d99a26bbad479f574f66208c41b9960cd41fb9d79d3a13fbdaa44682077115" + }, { "name": "signal_strength", "unicode": "1F4F6", @@ -9414,6 +9954,16 @@ "unicode": "1F40D", "digest": "18da2d97c771149ef5454dd23470e900903a62ab93f9e2ce301aad5a8181d773" }, + { + "name": "sneezing_face", + "unicode": "1F927", + "digest": "c20ef571dc7e35572fe3c18b7845aefc89af083ea925c48a29de3b7387af6e17" + }, + { + "name": "sneeze", + "unicode": "1F927", + "digest": "c20ef571dc7e35572fe3c18b7845aefc89af083ea925c48a29de3b7387af6e17" + }, { "name": "snowboarder", "unicode": "1F3C2", @@ -9519,46 +10069,6 @@ "unicode": "1F4AC", "digest": "817100d9979456e7d2f253ac22e13b7a2302dc1590566214915b003e403c53ca" }, - { - "name": "speech_left", - "unicode": "1F5E8", - "digest": "912797107d574f5665411498b6e349dbdec69846f085b6dc356548c4155e90b0" - }, - { - "name": "left_speech_bubble", - "unicode": "1F5E8", - "digest": "912797107d574f5665411498b6e349dbdec69846f085b6dc356548c4155e90b0" - }, - { - "name": "speech_right", - "unicode": "1F5E9", - "digest": "8439b13779163c15e678a78b08ebeeb7d131632df21d2a7868de7fed38ca9d8a" - }, - { - "name": "right_speech_bubble", - "unicode": "1F5E9", - "digest": "8439b13779163c15e678a78b08ebeeb7d131632df21d2a7868de7fed38ca9d8a" - }, - { - "name": "speech_three", - "unicode": "1F5EB", - "digest": "55a934f3659b6e75fdce0d0c4e2ea56dd34a43892c85a6666bd1882a0bfb92a9" - }, - { - "name": "three_speech_bubbles", - "unicode": "1F5EB", - "digest": "55a934f3659b6e75fdce0d0c4e2ea56dd34a43892c85a6666bd1882a0bfb92a9" - }, - { - "name": "speech_two", - "unicode": "1F5EA", - "digest": "0563ef0591da243673cf877462acc5d8e1d980a56e81668ac627de74d0c33983" - }, - { - "name": "two_speech_bubbles", - "unicode": "1F5EA", - "digest": "0563ef0591da243673cf877462acc5d8e1d980a56e81668ac627de74d0c33983" - }, { "name": "speedboat", "unicode": "1F6A4", @@ -9574,6 +10084,11 @@ "unicode": "1F578", "digest": "2434bdfbe56dcc4a43699dd59b638af431486b52fb1d6d685451f3b231b2be23" }, + { + "name": "spoon", + "unicode": "1F944", + "digest": "4fa31d59e5bffd2c45a8e01fcd5652e78a5691cbfa744e69882bc67173ddea05" + }, { "name": "spy", "unicode": "1F575", @@ -9634,6 +10149,11 @@ "unicode": "1F575-1F3FF", "digest": "ffc6fefd9a537124ebf0a9ddf387414dce1291335026064644f6cf9315591129" }, + { + "name": "squid", + "unicode": "1F991", + "digest": "65a1b318c2c506b9d26cfd8282a5cf9922109595c8d12e92c3f7481ac7c08c49" + }, { "name": "stadium", "unicode": "1F3DF", @@ -9679,26 +10199,11 @@ "unicode": "1F682", "digest": "52ad0073f37b978faf3884fb193046f2b0614e1557bbcc9de1b020e42aff2dba" }, - { - "name": "stereo", - "unicode": "1F4FE", - "digest": "1ce1f9a83867514b8351ad4fd80c46bba04ad67dfb9874e63d7296e1a21161a5" - }, - { - "name": "portable_stereo", - "unicode": "1F4FE", - "digest": "1ce1f9a83867514b8351ad4fd80c46bba04ad67dfb9874e63d7296e1a21161a5" - }, { "name": "stew", "unicode": "1F372", "digest": "c16f61236db314ad8d9f2dd241ec1e15c8d64e5872cce93ec4d0996490dd39df" }, - { - "name": "stock_chart", - "unicode": "1F5E0", - "digest": "4a0fbf54d19b0b5626f91c932a24e6ac12a65b4fc276d852ff4356c8c579d28a" - }, { "name": "stop_button", "unicode": "23F9", @@ -9734,6 +10239,16 @@ "unicode": "1F61C", "digest": "dbacd6428a2a2933212e6a4dc0c7f302177fb23b963626ccb26f27f91737f03d" }, + { + "name": "stuffed_flatbread", + "unicode": "1F959", + "digest": "9f841f2520640d69be4f20a3199023d5811842b28556b5e1152e5ec11f0fda07" + }, + { + "name": "stuffed_pita", + "unicode": "1F959", + "digest": "9f841f2520640d69be4f20a3199023d5811842b28556b5e1152e5ec11f0fda07" + }, { "name": "sun_with_face", "unicode": "1F31E", @@ -9909,31 +10424,11 @@ "unicode": "260E", "digest": "3a53851e641f8ad938ce3597b1afca2ea63c9314ff81f62563b99937496a13d7" }, - { - "name": "telephone_black", - "unicode": "1F57F", - "digest": "c3a42a653a91d90c6b668f678419d5438f2e546050914b841623e57107e805db" - }, - { - "name": "black_touchtone_telephone", - "unicode": "1F57F", - "digest": "c3a42a653a91d90c6b668f678419d5438f2e546050914b841623e57107e805db" - }, { "name": "telephone_receiver", "unicode": "1F4DE", "digest": "1614d67f3d8814b0d75f39d55f9149e4d28ef57b343498625e62fcfff8365046" }, - { - "name": "telephone_white", - "unicode": "1F57E", - "digest": "62a7e0e50c53e9f85eba51a92882e6064be05997910d3f7700e1e957dbaf0581" - }, - { - "name": "white_touchtone_telephone", - "unicode": "1F57E", - "digest": "62a7e0e50c53e9f85eba51a92882e6064be05997910d3f7700e1e957dbaf0581" - }, { "name": "telescope", "unicode": "1F52D", @@ -9980,55 +10475,25 @@ "digest": "4f0b84e5ab8a650cafb166e93688f0e9b31b9ade22a91035261ac90490edb9d3" }, { - "name": "thought_balloon", - "unicode": "1F4AD", - "digest": "bf59624560c333561d636aedf2c8827089e275895cf434974daaabb3d5cea46e" - }, - { - "name": "thought_left", - "unicode": "1F5EC", - "digest": "4fd591bf4318df73d1b17f434a449d8e95f49cca53a3d8f4d1ca983f3809ef46" - }, - { - "name": "left_thought_bubble", - "unicode": "1F5EC", - "digest": "4fd591bf4318df73d1b17f434a449d8e95f49cca53a3d8f4d1ca983f3809ef46" + "name": "third_place", + "unicode": "1F949", + "digest": "27c9bcba44ad95bee30882cc0722e8b0a798206306655dd648e884447ed26808" }, { - "name": "thought_right", - "unicode": "1F5ED", - "digest": "0e8c0ce26e2d0e30894f5394b0736456e8268f775e0e7eda4c7dc3c2ff9231ae" + "name": "third_place_medal", + "unicode": "1F949", + "digest": "27c9bcba44ad95bee30882cc0722e8b0a798206306655dd648e884447ed26808" }, { - "name": "right_thought_bubble", - "unicode": "1F5ED", - "digest": "0e8c0ce26e2d0e30894f5394b0736456e8268f775e0e7eda4c7dc3c2ff9231ae" + "name": "thought_balloon", + "unicode": "1F4AD", + "digest": "bf59624560c333561d636aedf2c8827089e275895cf434974daaabb3d5cea46e" }, { "name": "three", "unicode": "0033-20E3", "digest": "d3f85828787799c769655c38a519cad0743ab799ab276c7606e6e6894cc442e6" }, - { - "name": "thumbs_down_reverse", - "unicode": "1F593", - "digest": "a8b561e389bc4e4b07fba70994f6445e5ddc6afe68922fcb6e9e7282d19ad958" - }, - { - "name": "reversed_thumbs_down_sign", - "unicode": "1F593", - "digest": "a8b561e389bc4e4b07fba70994f6445e5ddc6afe68922fcb6e9e7282d19ad958" - }, - { - "name": "thumbs_up_reverse", - "unicode": "1F592", - "digest": "b6e52715c5ce590bfd08f6e05058ec3765ea2da341b11f9825d100608b173837" - }, - { - "name": "reversed_thumbs_up_sign", - "unicode": "1F592", - "digest": "b6e52715c5ce590bfd08f6e05058ec3765ea2da341b11f9825d100608b173837" - }, { "name": "thumbsdown", "unicode": "1F44E", @@ -10314,31 +10779,11 @@ "unicode": "1F686", "digest": "06e65d549e771632f3c64287a38ba67236f9800ccb6a23c3b592bc010e24e122" }, - { - "name": "train_diesel", - "unicode": "1F6F2", - "digest": "621bb967cd93fa9f8fd4b155965cc7572d3f91f88d94938ba10c8626718b623c" - }, - { - "name": "diesel_locomotive", - "unicode": "1F6F2", - "digest": "621bb967cd93fa9f8fd4b155965cc7572d3f91f88d94938ba10c8626718b623c" - }, { "name": "tram", "unicode": "1F68A", "digest": "21a7699f1a94f06dcb4d1e896448b98a4205f8efe902a8ac169a5005d11ab100" }, - { - "name": "triangle_round", - "unicode": "1F6C6", - "digest": "e24bb39ecfaaa746b03dc8418697d09ef327d5b077db39014f39d5fb87e23bd5" - }, - { - "name": "triangle_with_rounded_corners", - "unicode": "1F6C6", - "digest": "e24bb39ecfaaa746b03dc8418697d09ef327d5b077db39014f39d5fb87e23bd5" - }, { "name": "triangular_flag_on_post", "unicode": "1F6A9", @@ -10395,19 +10840,19 @@ "digest": "e744e8dbbdc6b126bd5b15aad56b524191de5a604189f4ab6d96730dfef4d086" }, { - "name": "turkey", - "unicode": "1F983", - "digest": "bf5daef15716b66636a5fdb6d059420521443c0603e2d56bd7c99c791a7285f4" + "name": "tumbler_glass", + "unicode": "1F943", + "digest": "7a38658274b9ff28836725a1dbfad49b8fa3af5ec8385e629db6bfdc7d93907a" }, { - "name": "turned_ok_hand", - "unicode": "1F58F", - "digest": "8a6c5b7d4c737866e7e32c6d9f7f447a48a0ac57a8909d43f87367d4a9b59246" + "name": "whisky", + "unicode": "1F943", + "digest": "7a38658274b9ff28836725a1dbfad49b8fa3af5ec8385e629db6bfdc7d93907a" }, { - "name": "turned_ok_hand_sign", - "unicode": "1F58F", - "digest": "8a6c5b7d4c737866e7e32c6d9f7f447a48a0ac57a8909d43f87367d4a9b59246" + "name": "turkey", + "unicode": "1F983", + "digest": "bf5daef15716b66636a5fdb6d059420521443c0603e2d56bd7c99c791a7285f4" }, { "name": "turtle", @@ -10759,6 +11204,36 @@ "unicode": "1F403", "digest": "ba6a840d4f57f8f9f3e9f29b8a030faf02a3a3d912e3e31b067616b2ac48a3d1" }, + { + "name": "water_polo", + "unicode": "1F93D", + "digest": "fc77e1d2a84a9f4cf0cf19c1ea10cf137cf0940b9103a523121eda87677ad148" + }, + { + "name": "water_polo_tone1", + "unicode": "1F93D-1F3FB", + "digest": "3be28384edd29ada8109f07720d601a9d5866ed63e6234efe9ee1a194ed5d0c5" + }, + { + "name": "water_polo_tone2", + "unicode": "1F93D-1F3FC", + "digest": "afcd3f28c6719f869ca79a6fd1ccade2ea976ade844fbc1081fc72865bcb652f" + }, + { + "name": "water_polo_tone3", + "unicode": "1F93D-1F3FD", + "digest": "d19481c9b82d9413e99c2652e020fd763f2b54408dedaffec8dfe80973ded407" + }, + { + "name": "water_polo_tone4", + "unicode": "1F93D-1F3FE", + "digest": "375972d882b627e8d525e632e58b30346fc3e01858d7d08d62a9d3bf8132bbc7" + }, + { + "name": "water_polo_tone5", + "unicode": "1F93D-1F3FF", + "digest": "a8e1ced1c5382a8147a1d1801a133cada9a0e52e41de6272e56c3c1f426f6048" + }, { "name": "watermelon", "unicode": "1F349", @@ -10914,6 +11389,16 @@ "unicode": "1F324", "digest": "0a6164cdadf2413555b7ef47b95f823f5a010f36d2dacfb1a38335a0f59e9601" }, + { + "name": "wilted_rose", + "unicode": "1F940", + "digest": "2c9e01ab9a61d057c71478b09ba7d82ae08f4a5a1c2212b7ad562b74f616677f" + }, + { + "name": "wilted_flower", + "unicode": "1F940", + "digest": "2c9e01ab9a61d057c71478b09ba7d82ae08f4a5a1c2212b7ad562b74f616677f" + }, { "name": "wind_blowing_face", "unicode": "1F32C", @@ -10995,14 +11480,69 @@ "digest": "81aae53bc892035b905bf3ec5b442a8ecc95027c5fa9eb51b7c3e7d8fad3f3f4" }, { - "name": "writing_hand", - "unicode": "1F58E", - "digest": "c4fc18ece6778339ebe14438aaf570e22385c3010c2d341824fa72ac6068cfeb" + "name": "wrestlers", + "unicode": "1F93C", + "digest": "9be983f3f9438f3ab8f6b643a958371d1e710c6d78e728f3465141811f05c2d5" + }, + { + "name": "wrestling", + "unicode": "1F93C", + "digest": "9be983f3f9438f3ab8f6b643a958371d1e710c6d78e728f3465141811f05c2d5" + }, + { + "name": "wrestlers_tone1", + "unicode": "1F93C-1F3FB", + "digest": "60461f83bfc93ce59dd027eab4782b7f206a7b142719fa72f301e047dc83a5d9" + }, + { + "name": "wrestling_tone1", + "unicode": "1F93C-1F3FB", + "digest": "60461f83bfc93ce59dd027eab4782b7f206a7b142719fa72f301e047dc83a5d9" + }, + { + "name": "wrestlers_tone2", + "unicode": "1F93C-1F3FC", + "digest": "67ad93c86e6c58d552c18e7a0105cc81fd9bb0474da51f788eba2e4c14b4a636" + }, + { + "name": "wrestling_tone2", + "unicode": "1F93C-1F3FC", + "digest": "67ad93c86e6c58d552c18e7a0105cc81fd9bb0474da51f788eba2e4c14b4a636" + }, + { + "name": "wrestlers_tone3", + "unicode": "1F93C-1F3FD", + "digest": "6bfd06c4435cabf2def153912040e05bf8db424fa383148ddda6d0ce8a8a3349" + }, + { + "name": "wrestling_tone3", + "unicode": "1F93C-1F3FD", + "digest": "6bfd06c4435cabf2def153912040e05bf8db424fa383148ddda6d0ce8a8a3349" + }, + { + "name": "wrestlers_tone4", + "unicode": "1F93C-1F3FE", + "digest": "597312678834c4d288c238482879856d5eba4620deb1eaef495f428e2ba5f2a5" + }, + { + "name": "wrestling_tone4", + "unicode": "1F93C-1F3FE", + "digest": "597312678834c4d288c238482879856d5eba4620deb1eaef495f428e2ba5f2a5" + }, + { + "name": "wrestlers_tone5", + "unicode": "1F93C-1F3FF", + "digest": "d6aebdf1e44fd825b9a5b3716aefbc53f4b4dbb73cb2a628c0f2994ebfd34614" + }, + { + "name": "wrestling_tone5", + "unicode": "1F93C-1F3FF", + "digest": "d6aebdf1e44fd825b9a5b3716aefbc53f4b4dbb73cb2a628c0f2994ebfd34614" }, { - "name": "left_writing_hand", - "unicode": "1F58E", - "digest": "c4fc18ece6778339ebe14438aaf570e22385c3010c2d341824fa72ac6068cfeb" + "name": "writing_hand", + "unicode": "270D", + "digest": "110517ae4da5587e8b0662881658e27da4120bfacec54734fd6657831d4d782f" }, { "name": "writing_hand_tone1", diff --git a/fixtures/emojis/index.json b/fixtures/emojis/index.json index 7f204c1a8e0..2a990913b9c 100644 --- a/fixtures/emojis/index.json +++ b/fixtures/emojis/index.json @@ -4,7 +4,7 @@ "unicode_alternates": [], "name": "hundred points symbol", "shortname": ":100:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15,12 +15,14 @@ "percent", "a", "plus", - "perfect", "school", "quiz", - "score", "test", - "exam" + "exam", + "symbol", + "wow", + "win", + "parties" ], "moji": "💯" }, @@ -29,12 +31,13 @@ "unicode_alternates": [], "name": "input symbol for numbers", "shortname": ":1234:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "numbers" + "numbers", + "symbol" ], "moji": "🔢" }, @@ -43,16 +46,20 @@ "unicode_alternates": [], "name": "billiards", "shortname": ":8ball:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ "pool", "billiards", "eight ball", - "pool", "pocket ball", - "cue" + "cue", + "game", + "ball", + "sport", + "luck", + "boys night" ], "moji": "🎱" }, @@ -61,13 +68,14 @@ "unicode_alternates": [], "name": "negative squared latin capital letter a", "shortname": ":a:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", "letter", - "red-square" + "red-square", + "symbol" ], "moji": "🅰" }, @@ -76,12 +84,13 @@ "unicode_alternates": [], "name": "negative squared ab", "shortname": ":ab:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", - "red-square" + "red-square", + "symbol" ], "moji": "🆎" }, @@ -90,12 +99,13 @@ "unicode_alternates": [], "name": "input symbol for latin letters", "shortname": ":abc:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", - "blue-square" + "blue-square", + "symbol" ], "moji": "🔤" }, @@ -104,12 +114,13 @@ "unicode_alternates": [], "name": "input symbol for latin small letters", "shortname": ":abcd:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", - "blue-square" + "blue-square", + "symbol" ], "moji": "🔡" }, @@ -118,7 +129,7 @@ "unicode_alternates": [], "name": "circled ideograph accept", "shortname": ":accept:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -127,7 +138,8 @@ "good", "kanji", "ok", - "yes" + "yes", + "symbol" ], "moji": "🉑" }, @@ -136,7 +148,7 @@ "unicode_alternates": [], "name": "aerial tramway", "shortname": ":aerial_tramway:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -146,7 +158,9 @@ "tram", "tramway", "cable", - "transport" + "transport", + "travel", + "train" ], "moji": "🚡" }, @@ -157,7 +171,7 @@ ], "name": "airplane", "shortname": ":airplane:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -173,7 +187,8 @@ "jet", "jumbo", "boeing", - "airbus" + "airbus", + "vacation" ], "moji": "✈" }, @@ -182,7 +197,7 @@ "unicode_alternates": [], "name": "airplane arriving", "shortname": ":airplane_arriving:", - "category": "travel_places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -197,15 +212,17 @@ "jet", "jumbo", "boeing", - "airbus" - ] + "airbus", + "vacation" + ], + "moji": "🛬" }, "airplane_departure": { "unicode": "1F6EB", "unicode_alternates": [], "name": "airplane departure", "shortname": ":airplane_departure:", - "category": "travel_places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -221,30 +238,17 @@ "jumbo", "boeing", "airbus", - "leaving" - ] - }, - "airplane_northeast": { - "unicode": "1F6EA", - "unicode_alternates": [], - "name": "northeast-pointing airplane", - "shortname": ":airplane_northeast:", - "category": "travel_places", - "aliases": [ - ":northeast_pointing_airplane:" + "leaving", + "vacation" ], - "aliases_ascii": [], - "keywords": [ - "plane", - "travel" - ] + "moji": "🛫" }, "airplane_small": { "unicode": "1F6E9", "unicode_alternates": [], "name": "small airplane", "shortname": ":airplane_small:", - "category": "travel_places", + "category": "travel", "aliases": [ ":small_airplane:" ], @@ -261,38 +265,10 @@ "jet", "jumbo", "boeing", - "airbus" - ] - }, - "airplane_small_up": { - "unicode": "1F6E8", - "unicode_alternates": [], - "name": "up-pointing small airplane", - "shortname": ":airplane_small_up:", - "category": "travel_places", - "aliases": [ - ":up_pointing_small_airplane:" - ], - "aliases_ascii": [], - "keywords": [ - "plane", - "travel" - ] - }, - "airplane_up": { - "unicode": "1F6E7", - "unicode_alternates": [], - "name": "up-pointing airplane", - "shortname": ":airplane_up:", - "category": "travel_places", - "aliases": [ - ":up_pointing_airplane:" + "airbus", + "vacation" ], - "aliases_ascii": [], - "keywords": [ - "plane", - "travel" - ] + "moji": "🛩" }, "alarm_clock": { "unicode": "23F0", @@ -304,13 +280,14 @@ "aliases_ascii": [], "keywords": [ "time", - "wake" + "wake", + "object" ], "moji": "⏰" }, "alembic": { "unicode": "2697", - "unicode_alternates": "", + "unicode_alternates": [], "name": "alembic", "shortname": ":alembic:", "category": "objects", @@ -319,22 +296,27 @@ "keywords": [ "chemistry", "object", - "tool" - ] + "tool", + "science" + ], + "moji": "⚗" }, "alien": { "unicode": "1F47D", "unicode_alternates": [], "name": "extraterrestrial alien", "shortname": ":alien:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "UFO", "paul", "alien", - "ufo" + "ufo", + "space", + "monster", + "scientology" ], "moji": "👽" }, @@ -343,7 +325,7 @@ "unicode_alternates": [], "name": "ambulance", "shortname": ":ambulance:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -353,19 +335,23 @@ "emergency", "medical", "help", - "assistance" + "assistance", + "transportation" ], "moji": "🚑" }, "amphora": { "unicode": "1F3FA", - "unicode_alternates": "", + "unicode_alternates": [], "name": "amphora", "shortname": ":amphora:", "category": "objects", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "object" + ], + "moji": "🏺" }, "anchor": { "unicode": "2693", @@ -374,21 +360,23 @@ ], "name": "anchor", "shortname": ":anchor:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "ferry", "ship", "anchor", - "ship", "boat", "ocean", "harbor", "marina", "shipyard", "sailor", - "tattoo" + "tattoo", + "object", + "travel", + "vacation" ], "moji": "⚓" }, @@ -397,7 +385,7 @@ "unicode_alternates": [], "name": "baby angel", "shortname": ":angel:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -406,16 +394,17 @@ "halo", "cupid", "wings", - "halo", "heaven", - "wings", - "jesus" + "jesus", + "people", + "diversity", + "omg" ], "moji": "👼" }, "angel_tone1": { "unicode": "1F47C-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby angel tone 1", "shortname": ":angel_tone1:", "category": "people", @@ -427,11 +416,12 @@ "heaven", "wings", "jesus" - ] + ], + "moji": "👼🏻" }, "angel_tone2": { "unicode": "1F47C-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby angel tone 2", "shortname": ":angel_tone2:", "category": "people", @@ -443,11 +433,12 @@ "heaven", "wings", "jesus" - ] + ], + "moji": "👼🏼" }, "angel_tone3": { "unicode": "1F47C-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby angel tone 3", "shortname": ":angel_tone3:", "category": "people", @@ -459,11 +450,12 @@ "heaven", "wings", "jesus" - ] + ], + "moji": "👼🏽" }, "angel_tone4": { "unicode": "1F47C-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby angel tone 4", "shortname": ":angel_tone4:", "category": "people", @@ -475,11 +467,12 @@ "heaven", "wings", "jesus" - ] + ], + "moji": "👼🏾" }, "angel_tone5": { "unicode": "1F47C-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby angel tone 5", "shortname": ":angel_tone5:", "category": "people", @@ -491,50 +484,31 @@ "heaven", "wings", "jesus" - ] + ], + "moji": "👼🏿" }, "anger": { "unicode": "1F4A2", "unicode_alternates": [], "name": "anger symbol", "shortname": ":anger:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "anger", "angry", - "mad" + "mad", + "symbol" ], "moji": "💢" }, - "anger_left": { - "unicode": "1F5EE", - "unicode_alternates": [], - "name": "left anger bubble", - "shortname": ":anger_left:", - "category": "objects_symbols", - "aliases": [ - ":left_anger_bubble:" - ], - "aliases_ascii": [], - "keywords": [ - "speech", - "balloon", - "talk", - "mood", - "conversation", - "communication", - "comic", - "angry" - ] - }, "anger_right": { "unicode": "1F5EF", "unicode_alternates": [], "name": "right anger bubble", "shortname": ":anger_right:", - "category": "objects_symbols", + "category": "symbols", "aliases": [ ":right_anger_bubble:" ], @@ -547,15 +521,17 @@ "conversation", "communication", "comic", - "angry" - ] + "angry", + "symbol" + ], + "moji": "🗯" }, "angry": { "unicode": "1F620", "unicode_alternates": [], "name": "angry face", "shortname": ":angry:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ">:(", @@ -571,7 +547,8 @@ "annoyed", "face", "frustrated", - "mad" + "smiley", + "emotion" ], "moji": "😠" }, @@ -580,7 +557,7 @@ "unicode_alternates": [], "name": "anguished face", "shortname": ":anguished:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -592,7 +569,11 @@ "ouch", "misery", "distress", - "grief" + "grief", + "sad", + "smiley", + "surprised", + "emotion" ], "moji": "😧" }, @@ -609,8 +590,8 @@ "insect", "ant", "queen", - "insect", - "team" + "team", + "insects" ], "moji": "🐜" }, @@ -619,20 +600,21 @@ "unicode_alternates": [], "name": "red apple", "shortname": ":apple:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ "fruit", "mac", "apple", - "fruit", "electronics", "red", "doctor", "teacher", "school", - "core" + "core", + "food", + "creationism" ], "moji": "🍎" }, @@ -643,7 +625,7 @@ ], "name": "aquarius", "shortname": ":aquarius:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -657,9 +639,8 @@ "zodiac", "sign", "purple-square", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♒" }, @@ -670,7 +651,7 @@ ], "name": "aries", "shortname": ":aries:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -683,9 +664,8 @@ "zodiac", "sign", "purple-square", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♈" }, @@ -696,12 +676,14 @@ ], "name": "black left-pointing triangle", "shortname": ":arrow_backward:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol", + "triangle" ], "moji": "◀" }, @@ -710,12 +692,13 @@ "unicode_alternates": [], "name": "black down-pointing double triangle", "shortname": ":arrow_double_down:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol" ], "moji": "⏬" }, @@ -724,12 +707,13 @@ "unicode_alternates": [], "name": "black up-pointing double triangle", "shortname": ":arrow_double_up:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol" ], "moji": "⏫" }, @@ -740,12 +724,13 @@ ], "name": "downwards black arrow", "shortname": ":arrow_down:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol" ], "moji": "⬇" }, @@ -754,12 +739,14 @@ "unicode_alternates": [], "name": "down-pointing small red triangle", "shortname": ":arrow_down_small:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol", + "triangle" ], "moji": "🔽" }, @@ -770,12 +757,14 @@ ], "name": "black right-pointing triangle", "shortname": ":arrow_forward:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol", + "triangle" ], "moji": "▶" }, @@ -786,12 +775,13 @@ ], "name": "arrow pointing rightwards then curving downwards", "shortname": ":arrow_heading_down:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol" ], "moji": "⤵" }, @@ -802,12 +792,13 @@ ], "name": "arrow pointing rightwards then curving upwards", "shortname": ":arrow_heading_up:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol" ], "moji": "⤴" }, @@ -818,13 +809,14 @@ ], "name": "leftwards black arrow", "shortname": ":arrow_left:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", "blue-square", - "previous" + "previous", + "symbol" ], "moji": "⬅" }, @@ -835,12 +827,13 @@ ], "name": "south west arrow", "shortname": ":arrow_lower_left:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol" ], "moji": "↙" }, @@ -851,12 +844,13 @@ ], "name": "south east arrow", "shortname": ":arrow_lower_right:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "blue-square" + "blue-square", + "symbol" ], "moji": "↘" }, @@ -867,12 +861,14 @@ ], "name": "black rightwards arrow", "shortname": ":arrow_right:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "next" + "next", + "arrow", + "symbol" ], "moji": "➡" }, @@ -883,11 +879,13 @@ ], "name": "rightwards arrow with hook", "shortname": ":arrow_right_hook:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "arrow", + "symbol" ], "moji": "↪" }, @@ -898,11 +896,13 @@ ], "name": "upwards black arrow", "shortname": ":arrow_up:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "arrow", + "symbol" ], "moji": "⬆" }, @@ -913,11 +913,13 @@ ], "name": "up down arrow", "shortname": ":arrow_up_down:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "arrow", + "symbol" ], "moji": "↕" }, @@ -926,11 +928,14 @@ "unicode_alternates": [], "name": "up-pointing small red triangle", "shortname": ":arrow_up_small:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "arrow", + "symbol", + "triangle" ], "moji": "🔼" }, @@ -941,11 +946,13 @@ ], "name": "north west arrow", "shortname": ":arrow_upper_left:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "arrow", + "symbol" ], "moji": "↖" }, @@ -956,11 +963,13 @@ ], "name": "north east arrow", "shortname": ":arrow_upper_right:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "arrow", + "symbol" ], "moji": "↗" }, @@ -969,11 +978,13 @@ "unicode_alternates": [], "name": "clockwise downwards and upwards open circle arrows", "shortname": ":arrows_clockwise:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "sync" + "sync", + "arrow", + "symbol" ], "moji": "🔃" }, @@ -982,12 +993,14 @@ "unicode_alternates": [], "name": "anticlockwise downwards and upwards open circle ar", "shortname": ":arrows_counterclockwise:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "sync" + "sync", + "arrow", + "symbol" ], "moji": "🔄" }, @@ -996,7 +1009,7 @@ "unicode_alternates": [], "name": "artist palette", "shortname": ":art:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1007,8 +1020,6 @@ "palette", "art", "colors", - "paint", - "draw", "brush", "pastels", "oils" @@ -1020,7 +1031,7 @@ "unicode_alternates": [], "name": "articulated lorry", "shortname": ":articulated_lorry:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1035,24 +1046,11 @@ ], "moji": "🚛" }, - "ascending_notes": { - "unicode": "1F39C", - "unicode_alternates": [], - "name": "beamed ascending musical notes", - "shortname": ":ascending_notes:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "score", - "music", - "sound", - "tone" - ] - }, "asterisk": { "unicode": "002A-20E3", - "unicode_alternates": "002a-fe0f-20e3", + "unicode_alternates": [ + "002A-FE0F-20E3" + ], "name": "keycap asterisk", "shortname": ":asterisk:", "category": "symbols", @@ -1064,14 +1062,15 @@ "*", "star", "symbol" - ] + ], + "moji": "*⃣" }, "astonished": { "unicode": "1F632", "unicode_alternates": [], "name": "astonished face", "shortname": ":astonished:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1079,7 +1078,12 @@ "xox", "shocked", "surprise", - "astonished" + "astonished", + "smiley", + "surprised", + "wow", + "emotion", + "omg" ], "moji": "😲" }, @@ -1088,12 +1092,16 @@ "unicode_alternates": [], "name": "athletic shoe", "shortname": ":athletic_shoe:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "shoes", - "sports" + "sports", + "fashion", + "shoe", + "accessories", + "boys night" ], "moji": "👟" }, @@ -1102,7 +1110,7 @@ "unicode_alternates": [], "name": "automated teller machine", "shortname": ":atm:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1115,17 +1123,16 @@ "bank", "adam", "payday", - "bank", "blue-square", - "cash", - "money", - "payment" + "payment", + "electronics", + "symbol" ], "moji": "🏧" }, "atom": { "unicode": "269B", - "unicode_alternates": "", + "unicode_alternates": [], "name": "atom symbol", "shortname": ":atom:", "category": "symbols", @@ -1134,21 +1141,36 @@ ], "aliases_ascii": [], "keywords": [ - "atheist" - ] + "atheist", + "symbol", + "science" + ], + "moji": "⚛" + }, + "avocado": { + "unicode": "1F951", + "unicode_alternates": [], + "name": "avocado", + "shortname": ":avocado:", + "category": "food", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🥑" }, "b": { "unicode": "1F171", "unicode_alternates": [], "name": "negative squared latin capital letter b", "shortname": ":b:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", "letter", - "red-square" + "red-square", + "symbol" ], "moji": "🅱" }, @@ -1157,13 +1179,16 @@ "unicode_alternates": [], "name": "baby", "shortname": ":baby:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "boy", "child", - "infant" + "infant", + "people", + "baby", + "diversity" ], "moji": "👶" }, @@ -1172,7 +1197,7 @@ "unicode_alternates": [], "name": "baby bottle", "shortname": ":baby_bottle:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1184,7 +1209,9 @@ "mother", "nipple", "newborn", - "formula" + "formula", + "drink", + "object" ], "moji": "🍼" }, @@ -1202,7 +1229,6 @@ "chick", "baby", "bird", - "chicken", "young", "woman", "cute" @@ -1214,7 +1240,7 @@ "unicode_alternates": [], "name": "baby symbol", "shortname": ":baby_symbol:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1226,13 +1252,14 @@ "human", "diaper", "small", - "babe" + "babe", + "symbol" ], "moji": "🚼" }, "baby_tone1": { "unicode": "1F476-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby tone 1", "shortname": ":baby_tone1:", "category": "people", @@ -1242,11 +1269,12 @@ "child", "infant", "toddler" - ] + ], + "moji": "👶🏻" }, "baby_tone2": { "unicode": "1F476-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby tone 2", "shortname": ":baby_tone2:", "category": "people", @@ -1256,11 +1284,12 @@ "child", "infant", "toddler" - ] + ], + "moji": "👶🏼" }, "baby_tone3": { "unicode": "1F476-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby tone 3", "shortname": ":baby_tone3:", "category": "people", @@ -1270,11 +1299,12 @@ "child", "infant", "toddler" - ] + ], + "moji": "👶🏽" }, "baby_tone4": { "unicode": "1F476-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby tone 4", "shortname": ":baby_tone4:", "category": "people", @@ -1284,11 +1314,12 @@ "child", "infant", "toddler" - ] + ], + "moji": "👶🏾" }, "baby_tone5": { "unicode": "1F476-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "baby tone 5", "shortname": ":baby_tone5:", "category": "people", @@ -1298,37 +1329,57 @@ "child", "infant", "toddler" - ] + ], + "moji": "👶🏿" }, "back": { "unicode": "1F519", "unicode_alternates": [], "name": "back with leftwards arrow above", "shortname": ":back:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "arrow" + "arrow", + "symbol" ], "moji": "🔙" }, + "bacon": { + "unicode": "1F953", + "unicode_alternates": [], + "name": "bacon", + "shortname": ":bacon:", + "category": "food", + "aliases": [], + "aliases_ascii": [], + "keywords": [ + "pig" + ], + "moji": "🥓" + }, "badminton": { "unicode": "1F3F8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "badminton racquet", "shortname": ":badminton:", "category": "activity", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "game", + "sport", + "badminton" + ], + "moji": "🏸" }, "baggage_claim": { "unicode": "1F6C4", "unicode_alternates": [], "name": "baggage claim", "shortname": ":baggage_claim:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1338,7 +1389,8 @@ "bag", "baggage", "luggage", - "travel" + "travel", + "symbol" ], "moji": "🛄" }, @@ -1355,11 +1407,13 @@ "party", "balloon", "birthday", - "celebration", "helium", "gas", "children", - "float" + "float", + "object", + "good", + "parties" ], "moji": "🎈" }, @@ -1368,29 +1422,17 @@ "unicode_alternates": [], "name": "ballot box with ballot", "shortname": ":ballot_box:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":ballot_box_with_ballot:" ], "aliases_ascii": [], "keywords": [ - "vote" - ] - }, - "ballot_box_check": { - "unicode": "1F5F9", - "unicode_alternates": [], - "name": "ballot box with bold check", - "shortname": ":ballot_box_check:", - "category": "objects_symbols", - "aliases": [ - ":ballot_box_with_bold_check:" + "vote", + "object", + "office" ], - "aliases_ascii": [], - "keywords": [ - "mark", - "vote" - ] + "moji": "🗳" }, "ballot_box_with_check": { "unicode": "2611", @@ -1399,51 +1441,22 @@ ], "name": "ballot box with check", "shortname": ":ballot_box_with_check:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "agree", - "ok" + "ok", + "symbol" ], "moji": "☑" }, - "ballot_box_x": { - "unicode": "1F5F5", - "unicode_alternates": [], - "name": "ballot box with script x", - "shortname": ":ballot_box_x:", - "category": "objects_symbols", - "aliases": [ - ":ballot_box_with_script_x:" - ], - "aliases_ascii": [], - "keywords": [ - "mark", - "vote" - ] - }, - "ballot_x": { - "unicode": "1F5F4", - "unicode_alternates": [], - "name": "ballot script x", - "shortname": ":ballot_x:", - "category": "objects_symbols", - "aliases": [ - ":ballot_script_x:" - ], - "aliases_ascii": [], - "keywords": [ - "mark", - "vote" - ] - }, "bamboo": { "unicode": "1F38D", "unicode_alternates": [], "name": "pine decoration", "shortname": ":bamboo:", - "category": "objects", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1472,7 +1485,7 @@ "unicode_alternates": [], "name": "banana", "shortname": ":banana:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1480,7 +1493,8 @@ "fruit", "banana", "peel", - "bunch" + "bunch", + "penis" ], "moji": "🍌" }, @@ -1491,12 +1505,14 @@ ], "name": "double exclamation mark", "shortname": ":bangbang:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "exclamation", - "surprise" + "surprise", + "symbol", + "punctuation" ], "moji": "‼" }, @@ -1505,11 +1521,12 @@ "unicode_alternates": [], "name": "bank", "shortname": ":bank:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ - "building" + "building", + "places" ], "moji": "🏦" }, @@ -1524,7 +1541,9 @@ "keywords": [ "graph", "presentation", - "stats" + "stats", + "work", + "office" ], "moji": "📊" }, @@ -1533,13 +1552,14 @@ "unicode_alternates": [], "name": "barber pole", "shortname": ":barber:", - "category": "places", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "hair", "salon", - "style" + "style", + "object" ], "moji": "💈" }, @@ -1550,13 +1570,17 @@ ], "name": "baseball", "shortname": ":baseball:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ "MLB", "balls", - "sports" + "sports", + "game", + "ball", + "sport", + "baseball" ], "moji": "⚾" }, @@ -1565,7 +1589,7 @@ "unicode_alternates": [], "name": "basketball and hoop", "shortname": ":basketball:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1578,13 +1602,16 @@ "hoop", "net", "swish", - "rip city" + "rip city", + "game", + "ball", + "sport" ], "moji": "🏀" }, "basketball_player": { "unicode": "26F9", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with ball", "shortname": ":basketball_player:", "category": "activity", @@ -1594,12 +1621,18 @@ "aliases_ascii": [], "keywords": [ "sport", - "travel" - ] + "travel", + "men", + "game", + "ball", + "basketball", + "diversity" + ], + "moji": "⛹" }, "basketball_player_tone1": { "unicode": "26F9-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with ball tone 1", "shortname": ":basketball_player_tone1:", "category": "activity", @@ -1607,11 +1640,19 @@ ":person_with_ball_tone1:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "sport", + "travel", + "men", + "game", + "ball", + "basketball" + ], + "moji": "⛹🏻" }, "basketball_player_tone2": { "unicode": "26F9-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with ball tone 2", "shortname": ":basketball_player_tone2:", "category": "activity", @@ -1619,11 +1660,19 @@ ":person_with_ball_tone2:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "sport", + "travel", + "men", + "game", + "ball", + "basketball" + ], + "moji": "⛹🏼" }, "basketball_player_tone3": { "unicode": "26F9-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with ball tone 3", "shortname": ":basketball_player_tone3:", "category": "activity", @@ -1631,11 +1680,19 @@ ":person_with_ball_tone3:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "sport", + "travel", + "men", + "game", + "ball", + "basketball" + ], + "moji": "⛹🏽" }, "basketball_player_tone4": { "unicode": "26F9-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with ball tone 4", "shortname": ":basketball_player_tone4:", "category": "activity", @@ -1643,11 +1700,19 @@ ":person_with_ball_tone4:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "sport", + "travel", + "men", + "game", + "ball", + "basketball" + ], + "moji": "⛹🏾" }, "basketball_player_tone5": { "unicode": "26F9-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with ball tone 5", "shortname": ":basketball_player_tone5:", "category": "activity", @@ -1655,14 +1720,33 @@ ":person_with_ball_tone5:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "sport", + "travel", + "men", + "game", + "ball", + "basketball" + ], + "moji": "⛹🏿" + }, + "bat": { + "unicode": "1F987", + "unicode_alternates": [], + "name": "bat", + "shortname": ":bat:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦇" }, "bath": { "unicode": "1F6C0", "unicode_alternates": [], "name": "bath", "shortname": ":bath:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1677,16 +1761,17 @@ "bathroom", "soap", "water", - "clean", "shampoo", "lather", - "water" + "tired", + "diversity", + "steam" ], "moji": "🛀" }, "bath_tone1": { "unicode": "1F6C0-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bath tone 1", "shortname": ":bath_tone1:", "category": "activity", @@ -1705,11 +1790,12 @@ "clean", "shampoo", "lather" - ] + ], + "moji": "🛀🏻" }, "bath_tone2": { "unicode": "1F6C0-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bath tone 2", "shortname": ":bath_tone2:", "category": "activity", @@ -1728,11 +1814,12 @@ "clean", "shampoo", "lather" - ] + ], + "moji": "🛀🏼" }, "bath_tone3": { "unicode": "1F6C0-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bath tone 3", "shortname": ":bath_tone3:", "category": "activity", @@ -1751,11 +1838,12 @@ "clean", "shampoo", "lather" - ] + ], + "moji": "🛀🏽" }, "bath_tone4": { "unicode": "1F6C0-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bath tone 4", "shortname": ":bath_tone4:", "category": "activity", @@ -1774,11 +1862,12 @@ "clean", "shampoo", "lather" - ] + ], + "moji": "🛀🏾" }, "bath_tone5": { "unicode": "1F6C0-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bath tone 5", "shortname": ":bath_tone5:", "category": "activity", @@ -1797,7 +1886,8 @@ "clean", "shampoo", "lather" - ] + ], + "moji": "🛀🏿" }, "bathtub": { "unicode": "1F6C1", @@ -1819,10 +1909,11 @@ "bathroom", "soap", "water", - "clean", "shampoo", "lather", - "water" + "object", + "tired", + "steam" ], "moji": "🛁" }, @@ -1837,7 +1928,8 @@ "keywords": [ "energy", "power", - "sustain" + "sustain", + "object" ], "moji": "🔋" }, @@ -1846,7 +1938,7 @@ "unicode_alternates": [], "name": "beach with umbrella", "shortname": ":beach:", - "category": "travel_places", + "category": "travel", "aliases": [ ":beach_with_umbrella:" ], @@ -1859,12 +1951,18 @@ "relaxation", "tanning", "tan", - "swimming" - ] + "swimming", + "places", + "travel", + "tropical", + "beach", + "swim" + ], + "moji": "🏖" }, "beach_umbrella": { "unicode": "26F1", - "unicode_alternates": "", + "unicode_alternates": [], "name": "umbrella on ground", "shortname": ":beach_umbrella:", "category": "objects", @@ -1877,8 +1975,11 @@ "rain", "sun", "travel", - "weather" - ] + "weather", + "vacation", + "tropical" + ], + "moji": "⛱" }, "bear": { "unicode": "1F43B", @@ -1890,7 +1991,9 @@ "aliases_ascii": [], "keywords": [ "animal", - "nature" + "nature", + "wildlife", + "roar" ], "moji": "🐻" }, @@ -1899,7 +2002,7 @@ "unicode_alternates": [], "name": "bed", "shortname": ":bed:", - "category": "travel_places", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1909,8 +2012,11 @@ "full", "twin", "king", - "mattress" - ] + "mattress", + "object", + "tired" + ], + "moji": "🛏" }, "bee": { "unicode": "1F41D", @@ -1932,7 +2038,8 @@ "honey", "hive", "bumble", - "pollination" + "pollination", + "insects" ], "moji": "🐝" }, @@ -1941,7 +2048,7 @@ "unicode_alternates": [], "name": "beer mug", "shortname": ":beer:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1962,7 +2069,9 @@ "brewery", "micro", "pint", - "boot" + "boot", + "alcohol", + "parties" ], "moji": "🍺" }, @@ -1971,7 +2080,7 @@ "unicode_alternates": [], "name": "clinking beer mugs", "shortname": ":beers:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -1987,11 +2096,14 @@ "mug", "toast", "celebrate", - "pub", "bar", "jolly", "hops", - "clink" + "clink", + "alcohol", + "thank you", + "boys night", + "parties" ], "moji": "🍻" }, @@ -2013,8 +2125,9 @@ "beetle", "cow", "lady cow", - "insect", - "endearment" + "endearment", + "insects", + "animal" ], "moji": "🐞" }, @@ -2023,12 +2136,13 @@ "unicode_alternates": [], "name": "japanese symbol for beginner", "shortname": ":beginner:", - "category": "places", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "badge", - "shield" + "shield", + "symbol" ], "moji": "🔰" }, @@ -2037,7 +2151,7 @@ "unicode_alternates": [], "name": "bell", "shortname": ":bell:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2045,7 +2159,10 @@ "christmas", "notification", "sound", - "xmas" + "xmas", + "object", + "alarm", + "symbol" ], "moji": "🔔" }, @@ -2054,7 +2171,7 @@ "unicode_alternates": [], "name": "bellhop bell", "shortname": ":bellhop:", - "category": "travel_places", + "category": "objects", "aliases": [ ":bellhop_bell:" ], @@ -2062,15 +2179,17 @@ "keywords": [ "hotel", "porter", - "ding" - ] + "ding", + "object" + ], + "moji": "🛎" }, "bento": { "unicode": "1F371", "unicode_alternates": [], "name": "bento box", "shortname": ":bento:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2078,13 +2197,14 @@ "food", "japanese", "bento", - "japanese", "rice", "meal", - "box", "obento", "convenient", - "lunchbox" + "lunchbox", + "object", + "sushi", + "japan" ], "moji": "🍱" }, @@ -2093,7 +2213,7 @@ "unicode_alternates": [], "name": "bicyclist", "shortname": ":bicyclist:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2103,16 +2223,19 @@ "sports", "bicyclist", "road", - "bike", "pedal", "bicycle", - "transportation" + "transportation", + "men", + "workout", + "sport", + "diversity" ], "moji": "🚴" }, "bicyclist_tone1": { "unicode": "1F6B4-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bicyclist tone 1", "shortname": ":bicyclist_tone1:", "category": "activity", @@ -2127,11 +2250,12 @@ "pedal", "bicycle", "transportation" - ] + ], + "moji": "🚴🏻" }, "bicyclist_tone2": { "unicode": "1F6B4-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bicyclist tone 2", "shortname": ":bicyclist_tone2:", "category": "activity", @@ -2146,11 +2270,12 @@ "pedal", "bicycle", "transportation" - ] + ], + "moji": "🚴🏼" }, "bicyclist_tone3": { "unicode": "1F6B4-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bicyclist tone 3", "shortname": ":bicyclist_tone3:", "category": "activity", @@ -2165,11 +2290,12 @@ "pedal", "bicycle", "transportation" - ] + ], + "moji": "🚴🏽" }, "bicyclist_tone4": { "unicode": "1F6B4-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bicyclist tone 4", "shortname": ":bicyclist_tone4:", "category": "activity", @@ -2184,11 +2310,12 @@ "pedal", "bicycle", "transportation" - ] + ], + "moji": "🚴🏾" }, "bicyclist_tone5": { "unicode": "1F6B4-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bicyclist tone 5", "shortname": ":bicyclist_tone5:", "category": "activity", @@ -2203,14 +2330,15 @@ "pedal", "bicycle", "transportation" - ] + ], + "moji": "🚴🏿" }, "bike": { "unicode": "1F6B2", "unicode_alternates": [], "name": "bicycle", "shortname": ":bike:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2220,8 +2348,8 @@ "sports", "bike", "pedal", - "bicycle", - "transportation" + "transportation", + "travel" ], "moji": "🚲" }, @@ -2230,7 +2358,7 @@ "unicode_alternates": [], "name": "bikini", "shortname": ":bikini:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2239,13 +2367,18 @@ "female", "girl", "swimming", - "woman" + "woman", + "women", + "sexy", + "vacation", + "tropical", + "swim" ], "moji": "👙" }, "biohazard": { "unicode": "2623", - "unicode_alternates": "", + "unicode_alternates": [], "name": "biohazard sign", "shortname": ":biohazard:", "category": "symbols", @@ -2254,8 +2387,10 @@ ], "aliases_ascii": [], "keywords": [ - "symbol" - ] + "symbol", + "science" + ], + "moji": "☣" }, "bird": { "unicode": "1F426", @@ -2269,7 +2404,8 @@ "animal", "fly", "nature", - "tweet" + "tweet", + "wildlife" ], "moji": "🐦" }, @@ -2278,7 +2414,7 @@ "unicode_alternates": [], "name": "birthday cake", "shortname": ":birthday:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2286,10 +2422,11 @@ "party", "birthday", "birth", - "cake", "dessert", "wish", - "celebrate" + "celebrate", + "food", + "parties" ], "moji": "🎂" }, @@ -2300,26 +2437,42 @@ ], "name": "medium black circle", "shortname": ":black_circle:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "circle" ], "moji": "⚫" }, + "black_heart": { + "unicode": "1F5A4", + "unicode_alternates": [], + "name": "black heart", + "shortname": ":black_heart:", + "category": "symbols", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🖤" + }, "black_joker": { "unicode": "1F0CF", "unicode_alternates": [], "name": "playing card black joker", "shortname": ":black_joker:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "cards", "game", - "poker" + "poker", + "object", + "symbol" ], "moji": "🃏" }, @@ -2330,11 +2483,14 @@ ], "name": "black large square", "shortname": ":black_large_square:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "square" ], "moji": "⬛" }, @@ -2345,10 +2501,14 @@ ], "name": "black medium small square", "shortname": ":black_medium_small_square:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], - "keywords": [], + "keywords": [ + "shapes", + "symbol", + "square" + ], "moji": "◾" }, "black_medium_square": { @@ -2358,11 +2518,14 @@ ], "name": "black medium square", "shortname": ":black_medium_square:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "square" ], "moji": "◼" }, @@ -2378,7 +2541,10 @@ "aliases_ascii": [], "keywords": [ "pen", - "stationery" + "stationery", + "object", + "office", + "write" ], "moji": "✒" }, @@ -2389,10 +2555,14 @@ ], "name": "black small square", "shortname": ":black_small_square:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], - "keywords": [], + "keywords": [ + "shapes", + "symbol", + "square" + ], "moji": "▪" }, "black_square_button": { @@ -2400,11 +2570,14 @@ "unicode_alternates": [], "name": "black square button", "shortname": ":black_square_button:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "frame" + "frame", + "shapes", + "symbol", + "square" ], "moji": "🔲" }, @@ -2422,7 +2595,8 @@ "yellow", "blossom", "daisy", - "flower" + "flower", + "plant" ], "moji": "🌼" }, @@ -2445,7 +2619,9 @@ "ballonfish", "toadfish", "fugu fish", - "sushi" + "sushi", + "wildlife", + "animal" ], "moji": "🐡" }, @@ -2460,7 +2636,11 @@ "keywords": [ "knowledge", "library", - "read" + "read", + "object", + "office", + "write", + "book" ], "moji": "📘" }, @@ -2469,15 +2649,16 @@ "unicode_alternates": [], "name": "recreational vehicle", "shortname": ":blue_car:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "car", "suv", - "car", "wagon", - "automobile" + "automobile", + "transportation", + "travel" ], "moji": "🚙" }, @@ -2486,7 +2667,7 @@ "unicode_alternates": [], "name": "blue heart", "shortname": ":blue_heart:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2496,11 +2677,11 @@ "valentines", "blue", "heart", - "love", "stability", "truth", "loyalty", - "trust" + "trust", + "symbol" ], "moji": "💙" }, @@ -2509,7 +2690,7 @@ "unicode_alternates": [], "name": "smiling face with smiling eyes", "shortname": ":blush:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2521,8 +2702,10 @@ "shy", "smile", "smiling", - "smile", - "smiley" + "smiley", + "emotion", + "good", + "beautiful" ], "moji": "😊" }, @@ -2536,7 +2719,8 @@ "aliases_ascii": [], "keywords": [ "animal", - "nature" + "nature", + "wildlife" ], "moji": "🐗" }, @@ -2550,7 +2734,11 @@ "aliases_ascii": [], "keywords": [ "boom", - "explode" + "explode", + "object", + "weapon", + "dead", + "blast" ], "moji": "💣" }, @@ -2564,26 +2752,14 @@ "aliases_ascii": [], "keywords": [ "library", - "literature" + "literature", + "object", + "office", + "write", + "book" ], "moji": "📖" }, - "book2": { - "unicode": "1F56E", - "unicode_alternates": [], - "name": "book", - "shortname": ":book2:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "library", - "literature", - "novel", - "reading", - "story" - ] - }, "bookmark": { "unicode": "1F516", "unicode_alternates": [], @@ -2593,7 +2769,9 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "favorite" + "favorite", + "object", + "book" ], "moji": "🔖" }, @@ -2606,7 +2784,9 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "favorite" + "favorite", + "office", + "write" ], "moji": "📑" }, @@ -2620,7 +2800,11 @@ "aliases_ascii": [], "keywords": [ "library", - "literature" + "literature", + "object", + "office", + "write", + "book" ], "moji": "📚" }, @@ -2629,7 +2813,7 @@ "unicode_alternates": [], "name": "collision symbol", "shortname": ":boom:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2642,7 +2826,9 @@ "fire", "emphasis", "wow", - "bam" + "bam", + "symbol", + "blast" ], "moji": "💥" }, @@ -2651,12 +2837,16 @@ "unicode_alternates": [], "name": "womans boots", "shortname": ":boot:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "fashion", - "shoes" + "shoes", + "women", + "shoe", + "sexy", + "accessories" ], "moji": "👢" }, @@ -2670,33 +2860,20 @@ "aliases_ascii": [], "keywords": [ "flowers", - "nature" + "nature", + "flower", + "plant", + "rip", + "condolence" ], "moji": "💐" }, - "bouquet2": { - "unicode": "1F395", - "unicode_alternates": [], - "name": "bouquet of flowers", - "shortname": ":bouquet2:", - "category": "celebration", - "aliases": [ - ":bouquet_of_flowers:" - ], - "aliases_ascii": [], - "keywords": [ - "nature", - "marriage", - "wedding", - "bride" - ] - }, "bow": { "unicode": "1F647", "unicode_alternates": [], "name": "person bowing deeply", "shortname": ":bow:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2707,13 +2884,16 @@ "bow", "respect", "curtsy", - "bend" + "bend", + "people", + "pray", + "diversity" ], "moji": "🙇" }, "bow_and_arrow": { "unicode": "1F3F9", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bow and arrow", "shortname": ":bow_and_arrow:", "category": "activity", @@ -2721,11 +2901,15 @@ ":archery:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "weapon", + "sport" + ], + "moji": "🏹" }, "bow_tone1": { "unicode": "1F647-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person bowing deeply tone 1", "shortname": ":bow_tone1:", "category": "people", @@ -2739,11 +2923,12 @@ "bow", "respect", "bend" - ] + ], + "moji": "🙇🏻" }, "bow_tone2": { "unicode": "1F647-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person bowing deeply tone 2", "shortname": ":bow_tone2:", "category": "people", @@ -2757,11 +2942,12 @@ "bow", "respect", "bend" - ] + ], + "moji": "🙇🏼" }, "bow_tone3": { "unicode": "1F647-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person bowing deeply tone 3", "shortname": ":bow_tone3:", "category": "people", @@ -2775,11 +2961,12 @@ "bow", "respect", "bend" - ] + ], + "moji": "🙇🏽" }, "bow_tone4": { "unicode": "1F647-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person bowing deeply tone 4", "shortname": ":bow_tone4:", "category": "people", @@ -2793,11 +2980,12 @@ "bow", "respect", "bend" - ] + ], + "moji": "🙇🏾" }, "bow_tone5": { "unicode": "1F647-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person bowing deeply tone 5", "shortname": ":bow_tone5:", "category": "people", @@ -2811,14 +2999,15 @@ "bow", "respect", "bend" - ] + ], + "moji": "🙇🏿" }, "bowling": { "unicode": "1F3B3", "unicode_alternates": [], "name": "bowling", "shortname": ":bowling:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2831,28 +3020,46 @@ "pin", "strike", "spare", - "game" + "game", + "sport", + "boys night" ], "moji": "🎳" }, + "boxing_glove": { + "unicode": "1F94A", + "unicode_alternates": [], + "name": "boxing glove", + "shortname": ":boxing_glove:", + "category": "activity", + "aliases": [ + ":boxing_gloves:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥊" + }, "boy": { "unicode": "1F466", "unicode_alternates": [], "name": "boy", "shortname": ":boy:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "guy", "male", - "man" + "man", + "people", + "baby", + "diversity" ], "moji": "👦" }, "boy_tone1": { "unicode": "1F466-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "boy tone 1", "shortname": ":boy_tone1:", "category": "people", @@ -2862,11 +3069,12 @@ "male", "kid", "child" - ] + ], + "moji": "👦🏻" }, "boy_tone2": { "unicode": "1F466-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "boy tone 2", "shortname": ":boy_tone2:", "category": "people", @@ -2876,11 +3084,12 @@ "male", "kid", "child" - ] + ], + "moji": "👦🏼" }, "boy_tone3": { "unicode": "1F466-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "boy tone 3", "shortname": ":boy_tone3:", "category": "people", @@ -2890,11 +3099,12 @@ "male", "kid", "child" - ] + ], + "moji": "👦🏽" }, "boy_tone4": { "unicode": "1F466-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "boy tone 4", "shortname": ":boy_tone4:", "category": "people", @@ -2904,11 +3114,12 @@ "male", "kid", "child" - ] + ], + "moji": "👦🏾" }, "boy_tone5": { "unicode": "1F466-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "boy tone 5", "shortname": ":boy_tone5:", "category": "people", @@ -2918,27 +3129,15 @@ "male", "kid", "child" - ] - }, - "boys_symbol": { - "unicode": "1F6C9", - "unicode_alternates": [], - "name": "boys symbol", - "shortname": ":boys_symbol:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "male", - "child" - ] + ], + "moji": "👦🏿" }, "bread": { "unicode": "1F35E", "unicode_alternates": [], "name": "bread", "shortname": ":bread:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2957,7 +3156,7 @@ "unicode_alternates": [], "name": "bride with veil", "shortname": ":bride_with_veil:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -2965,19 +3164,21 @@ "marriage", "wedding", "bride", - "wedding", "planning", "veil", "gown", "dress", "engagement", - "white" + "white", + "people", + "women", + "diversity" ], "moji": "👰" }, "bride_with_veil_tone1": { "unicode": "1F470-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bride with veil tone 1", "shortname": ":bride_with_veil_tone1:", "category": "people", @@ -2987,17 +3188,17 @@ "couple", "marriage", "wedding", - "wedding", "planning", "gown", "dress", "engagement", "white" - ] + ], + "moji": "👰🏻" }, "bride_with_veil_tone2": { "unicode": "1F470-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bride with veil tone 2", "shortname": ":bride_with_veil_tone2:", "category": "people", @@ -3007,17 +3208,17 @@ "couple", "marriage", "wedding", - "wedding", "planning", "gown", "dress", "engagement", "white" - ] + ], + "moji": "👰🏼" }, "bride_with_veil_tone3": { "unicode": "1F470-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bride with veil tone 3", "shortname": ":bride_with_veil_tone3:", "category": "people", @@ -3027,17 +3228,17 @@ "couple", "marriage", "wedding", - "wedding", "planning", "gown", "dress", "engagement", "white" - ] + ], + "moji": "👰🏽" }, "bride_with_veil_tone4": { "unicode": "1F470-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bride with veil tone 4", "shortname": ":bride_with_veil_tone4:", "category": "people", @@ -3047,17 +3248,17 @@ "couple", "marriage", "wedding", - "wedding", "planning", "gown", "dress", "engagement", "white" - ] + ], + "moji": "👰🏾" }, "bride_with_veil_tone5": { "unicode": "1F470-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bride with veil tone 5", "shortname": ":bride_with_veil_tone5:", "category": "people", @@ -3067,20 +3268,20 @@ "couple", "marriage", "wedding", - "wedding", "planning", "gown", "dress", "engagement", "white" - ] + ], + "moji": "👰🏿" }, "bridge_at_night": { "unicode": "1F309", "unicode_alternates": [], "name": "bridge at night", "shortname": ":bridge_at_night:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -3093,7 +3294,11 @@ "evening", "suspension", "golden", - "gate" + "gate", + "places", + "travel", + "vacation", + "goodnight" ], "moji": "🌉" }, @@ -3102,13 +3307,17 @@ "unicode_alternates": [], "name": "briefcase", "shortname": ":briefcase:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "business", "documents", - "work" + "work", + "bag", + "accessories", + "nutcase", + "job" ], "moji": "💼" }, @@ -3117,14 +3326,17 @@ "unicode_alternates": [], "name": "broken heart", "shortname": ":broken_heart:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [ ":\\", @@ -5024,7 +5504,10 @@ "skeptical", "undecided", "uneasy", - "hesitant" + "hesitant", + "smiley", + "surprised", + "emotion" ], "moji": "😕" }, @@ -5035,13 +5518,15 @@ ], "name": "circled ideograph congratulation", "shortname": ":congratulations:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "chinese", "japanese", - "kanji" + "kanji", + "japan", + "symbol" ], "moji": "㊗" }, @@ -5050,19 +5535,20 @@ "unicode_alternates": [], "name": "construction sign", "shortname": ":construction:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "caution", "progress", - "wip" + "wip", + "object" ], "moji": "🚧" }, "construction_site": { "unicode": "1F3D7", - "unicode_alternates": "", + "unicode_alternates": [], "name": "building construction", "shortname": ":construction_site:", "category": "travel", @@ -5073,28 +5559,36 @@ "keywords": [ "site", "work", - "place" - ] + "place", + "building", + "crane" + ], + "moji": "🏗" }, "construction_worker": { "unicode": "1F477", "unicode_alternates": [], "name": "construction worker", "shortname": ":construction_worker:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "human", "male", "man", - "wip" + "wip", + "people", + "hat", + "men", + "diversity", + "job" ], "moji": "👷" }, "construction_worker_tone1": { "unicode": "1F477-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "construction worker tone 1", "shortname": ":construction_worker_tone1:", "category": "people", @@ -5105,11 +5599,12 @@ "male", "man", "wip" - ] + ], + "moji": "👷🏻" }, "construction_worker_tone2": { "unicode": "1F477-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "construction worker tone 2", "shortname": ":construction_worker_tone2:", "category": "people", @@ -5120,11 +5615,12 @@ "male", "man", "wip" - ] + ], + "moji": "👷🏼" }, "construction_worker_tone3": { "unicode": "1F477-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "construction worker tone 3", "shortname": ":construction_worker_tone3:", "category": "people", @@ -5135,11 +5631,12 @@ "male", "man", "wip" - ] + ], + "moji": "👷🏽" }, "construction_worker_tone4": { "unicode": "1F477-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "construction worker tone 4", "shortname": ":construction_worker_tone4:", "category": "people", @@ -5150,11 +5647,12 @@ "male", "man", "wip" - ] + ], + "moji": "👷🏾" }, "construction_worker_tone5": { "unicode": "1F477-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "construction worker tone 5", "shortname": ":construction_worker_tone5:", "category": "people", @@ -5165,45 +5663,34 @@ "male", "man", "wip" - ] + ], + "moji": "👷🏿" }, "control_knobs": { "unicode": "1F39B", "unicode_alternates": [], "name": "control knobs", "shortname": ":control_knobs:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ - "dial" - ] - }, - "contruction_site": { - "unicode": "1F3D7", - "unicode_alternates": [], - "name": "building construction", - "shortname": ":contruction_site:", - "category": "travel_places", - "aliases": [ - ":building_construction:" + "dial", + "time" ], - "aliases_ascii": [], - "keywords": [ - "site", - "work" - ] + "moji": "🎛" }, "convenience_store": { "unicode": "1F3EA", "unicode_alternates": [], "name": "convenience store", "shortname": ":convenience_store:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ - "building" + "building", + "places" ], "moji": "🏪" }, @@ -5212,7 +5699,7 @@ "unicode_alternates": [], "name": "cookie", "shortname": ":cookie:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5224,21 +5711,44 @@ "dessert", "biscuit", "sweet", - "chocolate" + "vagina" ], "moji": "🍪" }, + "cooking": { + "unicode": "1F373", + "unicode_alternates": [], + "name": "cooking", + "shortname": ":cooking:", + "category": "food", + "aliases": [], + "aliases_ascii": [], + "keywords": [ + "breakfast", + "food", + "egg", + "fry", + "pan", + "flat", + "cook", + "frying", + "cooking", + "utensil" + ], + "moji": "🍳" + }, "cool": { "unicode": "1F192", "unicode_alternates": [], "name": "squared cool", "shortname": ":cool:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "words" + "words", + "symbol" ], "moji": "🆒" }, @@ -5247,7 +5757,7 @@ "unicode_alternates": [], "name": "police officer", "shortname": ":cop:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5255,13 +5765,19 @@ "enforcement", "law", "man", - "police" + "police", + "people", + "hat", + "men", + "diversity", + "job", + "911" ], "moji": "👮" }, "cop_tone1": { "unicode": "1F46E-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "police officer tone 1", "shortname": ":cop_tone1:", "category": "people", @@ -5273,11 +5789,12 @@ "law", "man", "cop" - ] + ], + "moji": "👮🏻" }, "cop_tone2": { "unicode": "1F46E-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "police officer tone 2", "shortname": ":cop_tone2:", "category": "people", @@ -5289,11 +5806,12 @@ "law", "man", "cop" - ] + ], + "moji": "👮🏼" }, "cop_tone3": { "unicode": "1F46E-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "police officer tone 3", "shortname": ":cop_tone3:", "category": "people", @@ -5305,11 +5823,12 @@ "law", "man", "cop" - ] + ], + "moji": "👮🏽" }, "cop_tone4": { "unicode": "1F46E-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "police officer tone 4", "shortname": ":cop_tone4:", "category": "people", @@ -5321,11 +5840,12 @@ "law", "man", "cop" - ] + ], + "moji": "👮🏾" }, "cop_tone5": { "unicode": "1F46E-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "police officer tone 5", "shortname": ":cop_tone5:", "category": "people", @@ -5337,7 +5857,8 @@ "law", "man", "cop" - ] + ], + "moji": "👮🏿" }, "copyright": { "moji": "©", @@ -5345,12 +5866,13 @@ "unicode_alternates": [], "name": "copyright sign", "shortname": ":copyright:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "ip", - "license" + "license", + "symbol" ] }, "corn": { @@ -5358,7 +5880,7 @@ "unicode_alternates": [], "name": "ear of maize", "shortname": ":corn:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5367,7 +5889,6 @@ "vegetable", "corn", "maize", - "food", "iowa", "kernel", "popcorn", @@ -5375,7 +5896,8 @@ "yellow", "stalk", "cob", - "ear" + "ear", + "vegetables" ], "moji": "🌽" }, @@ -5384,7 +5906,7 @@ "unicode_alternates": [], "name": "couch and lamp", "shortname": ":couch:", - "category": "travel_places", + "category": "objects", "aliases": [ ":couch_and_lamp:" ], @@ -5397,15 +5919,17 @@ "leather", "microfiber", "sit", - "relax" - ] + "relax", + "object" + ], + "moji": "🛋" }, "couple": { "unicode": "1F46B", "unicode_alternates": [], "name": "man and woman holding hands", "shortname": ":couple:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5417,7 +5941,9 @@ "love", "marriage", "people", - "valentines" + "valentines", + "sex", + "creationism" ], "moji": "👫" }, @@ -5440,15 +5966,21 @@ "like", "love", "marriage", - "valentines" - ] + "valentines", + "people", + "gay", + "men", + "sex", + "lgbt" + ], + "moji": "👨‍❤️‍👨" }, "couple_with_heart": { "unicode": "1F491", "unicode_alternates": [], "name": "couple with heart", "shortname": ":couple_with_heart:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5458,7 +5990,9 @@ "like", "love", "marriage", - "valentines" + "valentines", + "people", + "sex" ], "moji": "💑" }, @@ -5481,15 +6015,20 @@ "like", "love", "marriage", - "valentines" - ] + "valentines", + "people", + "women", + "sex", + "lgbt" + ], + "moji": "👩‍❤️‍👩" }, "couplekiss": { "unicode": "1F48F", "unicode_alternates": [], "name": "kiss", "shortname": ":couplekiss:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5497,7 +6036,9 @@ "like", "love", "marriage", - "valentines" + "valentines", + "people", + "sex" ], "moji": "💏" }, @@ -5532,28 +6073,44 @@ "cow", "milk", "dairy", - "beef", "bessie", "moo" ], "moji": "🐄" }, + "cowboy": { + "unicode": "1F920", + "unicode_alternates": [], + "name": "face with cowboy hat", + "shortname": ":cowboy:", + "category": "people", + "aliases": [ + ":face_with_cowboy_hat:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤠" + }, "crab": { "unicode": "1F980", - "unicode_alternates": "", + "unicode_alternates": [], "name": "crab", "shortname": ":crab:", "category": "nature", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "tropical", + "animal" + ], + "moji": "🦀" }, "crayon": { "unicode": "1F58D", "unicode_alternates": [], "name": "lower left crayon", "shortname": ":crayon:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":lower_left_crayon:" ], @@ -5562,8 +6119,11 @@ "write", "draw", "color", - "wax" - ] + "wax", + "object", + "office" + ], + "moji": "🖍" }, "credit_card": { "unicode": "1F4B3", @@ -5588,7 +6148,9 @@ "visa", "american express", "wallet", - "signature" + "signature", + "object", + "boys night" ], "moji": "💳" }, @@ -5606,15 +6168,16 @@ "crescent", "waxing", "sky", - "night", "cheese", - "phase" + "phase", + "space", + "goodnight" ], "moji": "🌙" }, "cricket": { "unicode": "1F3CF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "cricket bat and ball", "shortname": ":cricket:", "category": "activity", @@ -5622,7 +6185,12 @@ ":cricket_bat_ball:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "ball", + "sport", + "cricket" + ], + "moji": "🏏" }, "crocodile": { "unicode": "1F40A", @@ -5639,13 +6207,26 @@ "croc", "alligator", "gator", - "cranky" + "cranky", + "wildlife", + "reptile" ], "moji": "🐊" }, + "croissant": { + "unicode": "1F950", + "unicode_alternates": [], + "name": "croissant", + "shortname": ":croissant:", + "category": "food", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🥐" + }, "cross": { "unicode": "271D", - "unicode_alternates": "", + "unicode_alternates": [], "name": "latin cross", "shortname": ":cross:", "category": "symbols", @@ -5657,53 +6238,8 @@ "religion", "symbol", "christian" - ] - }, - "cross_heavy": { - "unicode": "1F547", - "unicode_alternates": [], - "name": "heavy latin cross", - "shortname": ":cross_heavy:", - "category": "objects_symbols", - "aliases": [ - ":heavy_latin_cross:" - ], - "aliases_ascii": [], - "keywords": [ - "religion", - "symbol" - ] - }, - "cross_white": { - "unicode": "1F546", - "unicode_alternates": [], - "name": "white latin cross", - "shortname": ":cross_white:", - "category": "objects_symbols", - "aliases": [ - ":white_latin_cross:" - ], - "aliases_ascii": [], - "keywords": [ - "religion", - "symbol" - ] - }, - "crossbones": { - "unicode": "1F571", - "unicode_alternates": [], - "name": "black skull and crossbones", - "shortname": ":crossbones:", - "category": "objects_symbols", - "aliases": [ - ":black_skull_and_crossbones:" ], - "aliases_ascii": [], - "keywords": [ - "poison", - "danger", - "death" - ] + "moji": "✝" }, "crossed_flags": { "unicode": "1F38C", @@ -5714,13 +6250,14 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "japan" + "japan", + "object" ], "moji": "🎌" }, "crossed_swords": { "unicode": "2694", - "unicode_alternates": "", + "unicode_alternates": [], "name": "crossed swords", "shortname": ":crossed_swords:", "category": "objects", @@ -5729,21 +6266,25 @@ "keywords": [ "object", "weapon" - ] + ], + "moji": "⚔" }, "crown": { "unicode": "1F451", "unicode_alternates": [], "name": "crown", "shortname": ":crown:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "king", "kod", "leader", - "royalty" + "royalty", + "object", + "gem", + "accessories" ], "moji": "👑" }, @@ -5752,7 +6293,7 @@ "unicode_alternates": [], "name": "passenger ship", "shortname": ":cruise_ship:", - "category": "travel_places", + "category": "travel", "aliases": [ ":passenger_ship:" ], @@ -5760,15 +6301,18 @@ "keywords": [ "titanic", "transportation", - "boat" - ] + "boat", + "travel", + "vacation" + ], + "moji": "🛳" }, "cry": { "unicode": "1F622", "unicode_alternates": [], "name": "crying face", "shortname": ":cry:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":'(", @@ -5779,11 +6323,14 @@ "keywords": [ "face", "sad", - "sad", "cry", "tear", "weep", - "tears" + "tears", + "smiley", + "emotion", + "rip", + "heartbreak" ], "moji": "😢" }, @@ -5792,7 +6339,7 @@ "unicode_alternates": [], "name": "crying cat face", "shortname": ":crying_cat_face:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5804,8 +6351,6 @@ "cry", "cat", "sob", - "tears", - "sad", "melancholy", "morn", "somber", @@ -5823,16 +6368,29 @@ "aliases_ascii": [], "keywords": [ "disco", - "party" + "party", + "object", + "ball" ], "moji": "🔮" }, + "cucumber": { + "unicode": "1F952", + "unicode_alternates": [], + "name": "cucumber", + "shortname": ":cucumber:", + "category": "food", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🥒" + }, "cupid": { "unicode": "1F498", "unicode_alternates": [], "name": "heart with arrow", "shortname": ":cupid:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5840,7 +6398,8 @@ "heart", "like", "love", - "valentines" + "valentines", + "symbol" ], "moji": "💘" }, @@ -5849,11 +6408,12 @@ "unicode_alternates": [], "name": "curly loop", "shortname": ":curly_loop:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "scribble" + "scribble", + "symbol" ], "moji": "➰" }, @@ -5862,13 +6422,14 @@ "unicode_alternates": [], "name": "currency exchange", "shortname": ":currency_exchange:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "dollar", "money", - "travel" + "travel", + "symbol" ], "moji": "💱" }, @@ -5877,7 +6438,7 @@ "unicode_alternates": [], "name": "curry and rice", "shortname": ":curry:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5888,7 +6449,6 @@ "curry", "spice", "flavor", - "food", "meal" ], "moji": "🍛" @@ -5898,7 +6458,7 @@ "unicode_alternates": [], "name": "custard", "shortname": ":custard:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5920,7 +6480,7 @@ "unicode_alternates": [], "name": "customs", "shortname": ":customs:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5932,7 +6492,8 @@ "goods", "check", "authority", - "government" + "government", + "symbol" ], "moji": "🛃" }, @@ -5942,7 +6503,7 @@ "unicode_alternates": [], "name": "cyclone", "shortname": ":cyclone:", - "category": "nature", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5954,7 +6515,9 @@ "hurricane", "typhoon", "storm", - "ocean" + "ocean", + "symbol", + "drugs" ] }, "dagger": { @@ -5962,22 +6525,25 @@ "unicode_alternates": [], "name": "dagger knife", "shortname": ":dagger:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":dagger_knife:" ], "aliases_ascii": [], "keywords": [ "blade", - "knife" - ] + "knife", + "object", + "weapon" + ], + "moji": "🗡" }, "dancer": { "unicode": "1F483", "unicode_alternates": [], "name": "dancer", "shortname": ":dancer:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -5995,13 +6561,18 @@ "ballet", "tango", "cha cha", - "music" + "music", + "people", + "women", + "sexy", + "diversity", + "girls night" ], "moji": "💃" }, "dancer_tone1": { "unicode": "1F483-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "dancer tone 1", "shortname": ":dancer_tone1:", "category": "people", @@ -6021,11 +6592,12 @@ "tango", "cha cha", "music" - ] + ], + "moji": "💃🏻" }, "dancer_tone2": { "unicode": "1F483-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "dancer tone 2", "shortname": ":dancer_tone2:", "category": "people", @@ -6045,11 +6617,12 @@ "tango", "cha cha", "music" - ] + ], + "moji": "💃🏼" }, "dancer_tone3": { "unicode": "1F483-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "dancer tone 3", "shortname": ":dancer_tone3:", "category": "people", @@ -6069,11 +6642,12 @@ "tango", "cha cha", "music" - ] + ], + "moji": "💃🏽" }, "dancer_tone4": { "unicode": "1F483-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "dancer tone 4", "shortname": ":dancer_tone4:", "category": "people", @@ -6093,11 +6667,12 @@ "tango", "cha cha", "music" - ] + ], + "moji": "💃🏾" }, "dancer_tone5": { "unicode": "1F483-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "dancer tone 5", "shortname": ":dancer_tone5:", "category": "people", @@ -6117,14 +6692,15 @@ "tango", "cha cha", "music" - ] + ], + "moji": "💃🏿" }, "dancers": { "unicode": "1F46F", "unicode_alternates": [], "name": "woman with bunny ears", "shortname": ":dancers:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6137,8 +6713,13 @@ "showgirl", "playboy", "costume", - "bunny", - "cancan" + "cancan", + "people", + "sexy", + "girls night", + "boys night", + "parties", + "dance" ], "moji": "👯" }, @@ -6147,7 +6728,7 @@ "unicode_alternates": [], "name": "dango", "shortname": ":dango:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6166,20 +6747,24 @@ "unicode_alternates": [], "name": "dark sunglasses", "shortname": ":dark_sunglasses:", - "category": "objects_symbols", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "shades", - "eyes" - ] + "eyes", + "fashion", + "glasses", + "accessories" + ], + "moji": "🕶" }, "dart": { "unicode": "1F3AF", "unicode_alternates": [], "name": "direct hit", "shortname": ":dart:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6190,10 +6775,10 @@ "bullseye", "dart", "archery", - "game", "fletching", "arrow", - "sport" + "sport", + "boys night" ], "moji": "🎯" }, @@ -6202,14 +6787,17 @@ "unicode_alternates": [], "name": "dash symbol", "shortname": ":dash:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ "air", "fast", "shoo", - "wind" + "wind", + "cloud", + "cold", + "smoking" ], "moji": "💨" }, @@ -6223,7 +6811,9 @@ "aliases_ascii": [], "keywords": [ "calendar", - "schedule" + "schedule", + "object", + "office" ], "moji": "📅" }, @@ -6242,16 +6832,29 @@ "tree", "leaves", "fall", - "color" + "color", + "camp", + "trees" ], "moji": "🌳" }, + "deer": { + "unicode": "1F98C", + "unicode_alternates": [], + "name": "deer", + "shortname": ":deer:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦌" + }, "department_store": { "unicode": "1F3EC", "unicode_alternates": [], "name": "department store", "shortname": ":department_store:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6262,31 +6865,17 @@ "store", "retail", "sale", - "merchandise" + "merchandise", + "places" ], "moji": "🏬" }, - "descending_notes": { - "unicode": "1F39D", - "unicode_alternates": [], - "name": "beamed descending musical notes", - "shortname": ":descending_notes:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "score", - "music", - "sound", - "tone" - ] - }, "desert": { "unicode": "1F3DC", "unicode_alternates": [], "name": "desert", "shortname": ":desert:", - "category": "travel_places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6295,41 +6884,36 @@ "sandy", "cactus", "sunny", - "barren" - ] + "barren", + "places", + "travel", + "vacation" + ], + "moji": "🏜" }, "desktop": { "unicode": "1F5A5", "unicode_alternates": [], "name": "desktop computer", "shortname": ":desktop:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":desktop_computer:" ], "aliases_ascii": [], "keywords": [ - "cpu" - ] - }, - "desktop_window": { - "unicode": "1F5D4", - "unicode_alternates": [], - "name": "desktop window", - "shortname": ":desktop_window:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "computer" - ] + "cpu", + "electronics", + "work" + ], + "moji": "🖥" }, "diamond_shape_with_a_dot_inside": { "unicode": "1F4A0", "unicode_alternates": [], "name": "diamond shape with a dot inside", "shortname": ":diamond_shape_with_a_dot_inside:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6339,7 +6923,8 @@ "kawaii", "japanese", "glyph", - "adorable" + "adorable", + "symbol" ], "moji": "💠" }, @@ -6350,12 +6935,15 @@ ], "name": "black diamond suit", "shortname": ":diamonds:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "cards", - "poker" + "poker", + "shapes", + "symbol", + "game" ], "moji": "♦" }, @@ -6364,7 +6952,7 @@ "unicode_alternates": [], "name": "disappointed face", "shortname": ":disappointed:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ">:[", @@ -6382,7 +6970,10 @@ "discouraged", "face", "sad", - "upset" + "upset", + "smiley", + "tired", + "emotion" ], "moji": "😞" }, @@ -6391,7 +6982,7 @@ "unicode_alternates": [], "name": "disappointed but relieved face", "shortname": ":disappointed_relieved:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6400,7 +6991,12 @@ "phew", "sweat", "disappoint", - "relief" + "relief", + "sad", + "smiley", + "stressed", + "cry", + "emotion" ], "moji": "😥" }, @@ -6409,22 +7005,25 @@ "unicode_alternates": [], "name": "card index dividers", "shortname": ":dividers:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":card_index_dividers:" ], "aliases_ascii": [], "keywords": [ "stationery", - "rolodex" - ] + "rolodex", + "work", + "office" + ], + "moji": "🗂" }, "dizzy": { "unicode": "1F4AB", "unicode_alternates": [], "name": "dizzy symbol", "shortname": ":dizzy:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6437,7 +7036,7 @@ "intoxicated", "squeans", "starburst", - "star" + "symbol" ], "moji": "💫" }, @@ -6446,7 +7045,7 @@ "unicode_alternates": [], "name": "dizzy face", "shortname": ":dizzy_face:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ "#-)", @@ -6463,7 +7062,13 @@ "face", "spent", "unconscious", - "xox" + "xox", + "smiley", + "surprised", + "dead", + "wow", + "emotion", + "omg" ], "moji": "😵" }, @@ -6472,7 +7077,7 @@ "unicode_alternates": [], "name": "do not litter symbol", "shortname": ":do_not_litter:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6480,40 +7085,13 @@ "garbage", "trash", "litter", - "garbage", "waste", "no", "can", - "trash" + "symbol" ], "moji": "🚯" }, - "document": { - "unicode": "1F5CE", - "unicode_alternates": [], - "name": "document", - "shortname": ":document:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "page" - ] - }, - "document_text": { - "unicode": "1F5B9", - "unicode_alternates": [], - "name": "document with text", - "shortname": ":document_text:", - "category": "objects_symbols", - "aliases": [ - ":document_with_text:" - ], - "aliases_ascii": [], - "keywords": [ - "page" - ] - }, "dog": { "unicode": "1F436", "unicode_alternates": [], @@ -6526,7 +7104,9 @@ "animal", "friend", "nature", - "woof" + "woof", + "dog", + "pug" ], "moji": "🐶" }, @@ -6546,11 +7126,10 @@ "pet", "dog", "puppy", - "pet", - "friend", "woof", "bark", - "fido" + "fido", + "pug" ], "moji": "🐕" }, @@ -6571,8 +7150,6 @@ "canada", "australia", "banknote", - "money", - "currency", "paper", "cash", "bills" @@ -6593,7 +7170,6 @@ "toy", "dolls", "japan", - "japanese", "day", "girls", "emperor", @@ -6602,7 +7178,8 @@ "blessing", "imperial", "family", - "royal" + "royal", + "people" ], "moji": "🎎" }, @@ -6621,7 +7198,9 @@ "flipper", "nature", "ocean", - "sea" + "sea", + "wildlife", + "tropical" ], "moji": "🐬" }, @@ -6641,8 +7220,7 @@ "doorway", "entrance", "enter", - "exit", - "entry" + "object" ], "moji": "🚪" }, @@ -6651,7 +7229,7 @@ "unicode_alternates": [], "name": "doughnut", "shortname": ":doughnut:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6666,8 +7244,7 @@ "dessert", "breakfast", "police", - "homer", - "sweet" + "homer" ], "moji": "🍩" }, @@ -6676,15 +7253,17 @@ "unicode_alternates": [], "name": "dove of peace", "shortname": ":dove:", - "category": "objects_symbols", + "category": "nature", "aliases": [ ":dove_of_peace:" ], "aliases_ascii": [], "keywords": [ "symbol", - "bird" - ] + "bird", + "animal" + ], + "moji": "🕊" }, "dragon": { "unicode": "1F409", @@ -6703,7 +7282,8 @@ "dragon", "fire", "legendary", - "myth" + "roar", + "reptile" ], "moji": "🐉" }, @@ -6725,7 +7305,9 @@ "head", "fire", "legendary", - "myth" + "roar", + "monster", + "reptile" ], "moji": "🐲" }, @@ -6734,12 +7316,15 @@ "unicode_alternates": [], "name": "dress", "shortname": ":dress:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "clothes", - "fashion" + "fashion", + "women", + "sexy", + "girls night" ], "moji": "👗" }, @@ -6758,23 +7343,35 @@ "dromedary", "camel", "hump", - "desert", "middle east", "heat", - "hot", "water", "hump day", "wednesday", - "sex" + "sex", + "wildlife" ], "moji": "🐪" }, + "drooling_face": { + "unicode": "1F924", + "unicode_alternates": [], + "name": "drooling face", + "shortname": ":drooling_face:", + "category": "people", + "aliases": [ + ":drool:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤤" + }, "droplet": { "unicode": "1F4A7", "unicode_alternates": [], "name": "droplet", "shortname": ":droplet:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -6784,7 +7381,6 @@ "drop", "droplet", "h20", - "water", "aqua", "tear", "sweat", @@ -6792,10 +7388,36 @@ "moisture", "wet", "moist", - "spit" + "spit", + "weather", + "sky" ], "moji": "💧" }, + "drum": { + "unicode": "1F941", + "unicode_alternates": [], + "name": "drum with drumsticks", + "shortname": ":drum:", + "category": "activity", + "aliases": [ + ":drum_with_drumsticks:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥁" + }, + "duck": { + "unicode": "1F986", + "unicode_alternates": [], + "name": "duck", + "shortname": ":duck:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦆" + }, "dvd": { "unicode": "1F4C0", "unicode_alternates": [], @@ -6807,7 +7429,8 @@ "keywords": [ "cd", "disc", - "disk" + "disk", + "electronics" ], "moji": "📀" }, @@ -6823,23 +7446,37 @@ "aliases_ascii": [], "keywords": [ "communication", - "inbox" + "inbox", + "office" ], "moji": "📧" }, + "eagle": { + "unicode": "1F985", + "unicode_alternates": [], + "name": "eagle", + "shortname": ":eagle:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦅" + }, "ear": { "unicode": "1F442", "unicode_alternates": [], "name": "ear", "shortname": ":ear:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "face", "hear", "listen", - "sound" + "sound", + "body", + "diversity" ], "moji": "👂" }, @@ -6857,14 +7494,14 @@ "ear", "rice", "food", - "plant", - "seed" + "seed", + "leaf" ], "moji": "🌾" }, "ear_tone1": { "unicode": "1F442-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ear tone 1", "shortname": ":ear_tone1:", "category": "people", @@ -6874,11 +7511,12 @@ "hear", "listen", "sound" - ] + ], + "moji": "👂🏻" }, "ear_tone2": { "unicode": "1F442-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ear tone 2", "shortname": ":ear_tone2:", "category": "people", @@ -6888,11 +7526,12 @@ "hear", "listen", "sound" - ] + ], + "moji": "👂🏼" }, "ear_tone3": { "unicode": "1F442-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ear tone 3", "shortname": ":ear_tone3:", "category": "people", @@ -6902,11 +7541,12 @@ "hear", "listen", "sound" - ] + ], + "moji": "👂🏽" }, "ear_tone4": { "unicode": "1F442-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ear tone 4", "shortname": ":ear_tone4:", "category": "people", @@ -6916,11 +7556,12 @@ "hear", "listen", "sound" - ] + ], + "moji": "👂🏾" }, "ear_tone5": { "unicode": "1F442-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ear tone 5", "shortname": ":ear_tone5:", "category": "people", @@ -6930,7 +7571,8 @@ "hear", "listen", "sound" - ] + ], + "moji": "👂🏿" }, "earth_africa": { "unicode": "1F30D", @@ -6945,12 +7587,13 @@ "international", "world", "earth", - "globe", "space", "planet", "africa", "europe", - "home" + "home", + "map", + "vacation" ], "moji": "🌍" }, @@ -6968,14 +7611,15 @@ "international", "world", "earth", - "globe", "space", "planet", "north", "south", "america", "americas", - "home" + "home", + "map", + "vacation" ], "moji": "🌎" }, @@ -6993,43 +7637,33 @@ "international", "world", "earth", - "globe", "space", "planet", "asia", "australia", - "home" + "home", + "map", + "vacation" ], "moji": "🌏" }, "egg": { - "unicode": "1F373", + "unicode": "1F95A", "unicode_alternates": [], - "name": "cooking", + "name": "egg", "shortname": ":egg:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], - "keywords": [ - "breakfast", - "food", - "egg", - "fry", - "pan", - "flat", - "cook", - "frying", - "cooking", - "utensil" - ], - "moji": "🍳" + "keywords": [], + "moji": "🥚" }, "eggplant": { "unicode": "1F346", "unicode_alternates": [], "name": "aubergine", "shortname": ":eggplant:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -7038,10 +7672,10 @@ "nature", "vegetable", "eggplant", - "aubergine", "fruit", "purple", - "penis" + "penis", + "vegetables" ], "moji": "🍆" }, @@ -7051,15 +7685,18 @@ "unicode_alternates": [ "0038-FE0F-20E3" ], - "name": "digit eight", + "name": "keycap digit eight", "shortname": ":eight:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "8", "blue-square", - "numbers" + "numbers", + "number", + "math", + "symbol" ] }, "eight_pointed_black_star": { @@ -7069,10 +7706,12 @@ ], "name": "eight pointed black star", "shortname": ":eight_pointed_black_star:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], - "keywords": [], + "keywords": [ + "symbol" + ], "moji": "✴" }, "eight_spoked_asterisk": { @@ -7082,16 +7721,32 @@ ], "name": "eight spoked asterisk", "shortname": ":eight_spoked_asterisk:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "green-square", "sparkle", - "star" + "star", + "symbol" ], "moji": "✳" }, + "eject": { + "unicode": "23CF", + "unicode_alternates": [ + "23CF-FE0F" + ], + "name": "eject symbol", + "shortname": ":eject:", + "category": "symbols", + "aliases": [ + ":eject_symbol:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "⏏" + }, "electric_plug": { "unicode": "1F50C", "unicode_alternates": [], @@ -7102,7 +7757,8 @@ "aliases_ascii": [], "keywords": [ "charger", - "power" + "power", + "electronics" ], "moji": "🔌" }, @@ -7118,7 +7774,8 @@ "animal", "nature", "nose", - "thailand" + "thailand", + "wildlife" ], "moji": "🐘" }, @@ -7127,100 +7784,36 @@ "unicode_alternates": [], "name": "end with leftwards arrow above", "shortname": ":end:", - "category": "other", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "arrow", - "words" - ], - "moji": "🔚" - }, - "envelope": { - "unicode": "2709", - "unicode_alternates": [ - "2709-FE0F" - ], - "name": "envelope", - "shortname": ":envelope:", - "category": "objects", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "communication", - "letter", - "mail", - "postal" - ], - "moji": "✉" - }, - "envelope_back": { - "unicode": "1F582", - "unicode_alternates": [], - "name": "back of envelope", - "shortname": ":envelope_back:", - "category": "objects_symbols", - "aliases": [ - ":back_of_envelope:" - ], - "aliases_ascii": [], - "keywords": [ - "communication", - "letter", - "mail", - "postal" - ] - }, - "envelope_flying": { - "unicode": "1F585", - "unicode_alternates": [], - "name": "flying envelope", - "shortname": ":envelope_flying:", - "category": "objects_symbols", - "aliases": [ - ":flying_envelope:" - ], - "aliases_ascii": [], - "keywords": [ - "communication", - "letter", - "mail", - "postal" - ] - }, - "envelope_stamped": { - "unicode": "1F583", - "unicode_alternates": [], - "name": "stamped envelope", - "shortname": ":envelope_stamped:", - "category": "objects_symbols", - "aliases": [ - ":stamped_envelope:" - ], + "category": "symbols", + "aliases": [], "aliases_ascii": [], "keywords": [ - "communication", - "letter", - "mail", - "postal" - ] + "arrow", + "words", + "symbol" + ], + "moji": "🔚" }, - "envelope_stamped_pen": { - "unicode": "1F586", - "unicode_alternates": [], - "name": "pen over stamped envelope", - "shortname": ":envelope_stamped_pen:", - "category": "objects_symbols", - "aliases": [ - ":pen_over_stamped_envelope:" + "envelope": { + "unicode": "2709", + "unicode_alternates": [ + "2709-FE0F" ], + "name": "envelope", + "shortname": ":envelope:", + "category": "objects", + "aliases": [], "aliases_ascii": [], "keywords": [ "communication", "letter", "mail", - "postal" - ] + "postal", + "object", + "office", + "write" + ], + "moji": "✉" }, "envelope_with_arrow": { "unicode": "1F4E9", @@ -7231,7 +7824,9 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "email" + "email", + "object", + "office" ], "moji": "📩" }, @@ -7250,8 +7845,6 @@ "euro", "europe", "banknote", - "money", - "currency", "paper", "cash", "bills" @@ -7263,7 +7856,7 @@ "unicode_alternates": [], "name": "european castle", "shortname": ":european_castle:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -7273,7 +7866,6 @@ "castle", "european", "residence", - "royalty", "disneyland", "disney", "fort", @@ -7287,7 +7879,10 @@ "queen", "fortress", "nobel", - "stronghold" + "stronghold", + "places", + "travel", + "vacation" ], "moji": "🏰" }, @@ -7296,11 +7891,13 @@ "unicode_alternates": [], "name": "european post office", "shortname": ":european_post_office:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ - "building" + "building", + "places", + "post office" ], "moji": "🏤" }, @@ -7318,7 +7915,10 @@ "evergreen", "tree", "needles", - "christmas" + "christmas", + "holidays", + "camp", + "trees" ], "moji": "🌲" }, @@ -7329,11 +7929,13 @@ ], "name": "heavy exclamation mark symbol", "shortname": ":exclamation:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "surprise" + "surprise", + "symbol", + "punctuation" ], "moji": "❗" }, @@ -7342,7 +7944,7 @@ "unicode_alternates": [], "name": "expressionless face", "shortname": ":expressionless:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ "-_-", @@ -7356,7 +7958,11 @@ "vapid", "without expression", "face", - "indifferent" + "indifferent", + "mad", + "smiley", + "neutral", + "emotion" ], "moji": "😑" }, @@ -7371,25 +7977,36 @@ "keywords": [ "look", "peek", - "watch" - ] + "watch", + "body", + "eyes" + ], + "moji": "👁" }, "eye_in_speech_bubble": { "unicode": "1F441-1F5E8", - "unicode_alternates": "1f441-200d-1f5e8", + "unicode_alternates": [ + "1F441-200D-1F5E8" + ], "name": "eye in speech bubble", "shortname": ":eye_in_speech_bubble:", "category": "symbols", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "object", + "symbol", + "eyes", + "talk" + ], + "moji": "👁‍🗨" }, "eyeglasses": { "unicode": "1F453", "unicode_alternates": [], "name": "eyeglasses", "shortname": ":eyeglasses:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -7408,7 +8025,8 @@ "vision", "see", "blurry", - "contacts" + "contacts", + "glasses" ], "moji": "👓" }, @@ -7417,27 +8035,110 @@ "unicode_alternates": [], "name": "eyes", "shortname": ":eyes:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "look", "peek", "stalk", - "watch" + "watch", + "body", + "eyes" ], "moji": "👀" }, + "face_palm": { + "unicode": "1F926", + "unicode_alternates": [], + "name": "face palm", + "shortname": ":face_palm:", + "category": "people", + "aliases": [ + ":facepalm:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤦" + }, + "face_palm_tone1": { + "unicode": "1F926-1F3FB", + "unicode_alternates": [], + "name": "face palm tone 1", + "shortname": ":face_palm_tone1:", + "category": "people", + "aliases": [ + ":facepalm_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤦🏻" + }, + "face_palm_tone2": { + "unicode": "1F926-1F3FC", + "unicode_alternates": [], + "name": "face palm tone 2", + "shortname": ":face_palm_tone2:", + "category": "people", + "aliases": [ + ":facepalm_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤦🏼" + }, + "face_palm_tone3": { + "unicode": "1F926-1F3FD", + "unicode_alternates": [], + "name": "face palm tone 3", + "shortname": ":face_palm_tone3:", + "category": "people", + "aliases": [ + ":facepalm_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤦🏽" + }, + "face_palm_tone4": { + "unicode": "1F926-1F3FE", + "unicode_alternates": [], + "name": "face palm tone 4", + "shortname": ":face_palm_tone4:", + "category": "people", + "aliases": [ + ":facepalm_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤦🏾" + }, + "face_palm_tone5": { + "unicode": "1F926-1F3FF", + "unicode_alternates": [], + "name": "face palm tone 5", + "shortname": ":face_palm_tone5:", + "category": "people", + "aliases": [ + ":facepalm_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤦🏿" + }, "factory": { "unicode": "1F3ED", "unicode_alternates": [], "name": "factory", "shortname": ":factory:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ - "building" + "building", + "places", + "travel", + "steam" ], "moji": "🏭" }, @@ -7467,7 +8168,7 @@ "unicode_alternates": [], "name": "family", "shortname": ":family:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -7479,13 +8180,12 @@ "mother", "parents", "family", - "mother", - "father", - "child", "girl", "boy", "group", - "unit" + "unit", + "people", + "baby" ], "moji": "👪" }, @@ -7509,8 +8209,14 @@ "gay", "homosexual", "man", - "boy" - ] + "boy", + "people", + "family", + "men", + "baby", + "lgbt" + ], + "moji": "👨‍👨‍👦" }, "family_mmbb": { "unicode": "1F468-1F468-1F466-1F466", @@ -7532,8 +8238,14 @@ "gay", "homosexual", "man", - "boy" - ] + "boy", + "people", + "family", + "men", + "baby", + "lgbt" + ], + "moji": "👨‍👨‍👦‍👦" }, "family_mmg": { "unicode": "1F468-1F468-1F467", @@ -7555,8 +8267,14 @@ "gay", "homosexual", "man", - "girl" - ] + "girl", + "people", + "family", + "men", + "baby", + "lgbt" + ], + "moji": "👨‍👨‍👧" }, "family_mmgb": { "unicode": "1F468-1F468-1F467-1F466", @@ -7579,8 +8297,14 @@ "homosexual", "man", "girl", - "boy" - ] + "boy", + "people", + "family", + "men", + "baby", + "lgbt" + ], + "moji": "👨‍👨‍👧‍👦" }, "family_mmgg": { "unicode": "1F468-1F468-1F467-1F467", @@ -7602,8 +8326,14 @@ "gay", "homosexual", "man", - "girl" - ] + "girl", + "people", + "family", + "men", + "baby", + "lgbt" + ], + "moji": "👨‍👨‍👧‍👧" }, "family_mwbb": { "unicode": "1F468-1F469-1F466-1F466", @@ -7626,8 +8356,12 @@ "group", "unit", "man", - "woman" - ] + "woman", + "people", + "family", + "baby" + ], + "moji": "👨‍👩‍👦‍👦" }, "family_mwg": { "unicode": "1F468-1F469-1F467", @@ -7651,8 +8385,12 @@ "group", "unit", "man", - "woman" - ] + "woman", + "people", + "family", + "baby" + ], + "moji": "👨‍👩‍👧" }, "family_mwgb": { "unicode": "1F468-1F469-1F467-1F466", @@ -7676,8 +8414,12 @@ "group", "unit", "man", - "woman" - ] + "woman", + "people", + "family", + "baby" + ], + "moji": "👨‍👩‍👧‍👦" }, "family_mwgg": { "unicode": "1F468-1F469-1F467-1F467", @@ -7700,8 +8442,12 @@ "group", "unit", "man", - "woman" - ] + "woman", + "people", + "family", + "baby" + ], + "moji": "👨‍👩‍👧‍👧" }, "family_wwb": { "unicode": "1F469-1F469-1F466", @@ -7724,8 +8470,14 @@ "gay", "lesbian", "homosexual", - "woman" - ] + "woman", + "people", + "family", + "women", + "baby", + "lgbt" + ], + "moji": "👩‍👩‍👦" }, "family_wwbb": { "unicode": "1F469-1F469-1F466-1F466", @@ -7748,8 +8500,14 @@ "lesbian", "homosexual", "woman", - "boy" - ] + "boy", + "people", + "family", + "women", + "baby", + "lgbt" + ], + "moji": "👩‍👩‍👦‍👦" }, "family_wwg": { "unicode": "1F469-1F469-1F467", @@ -7772,8 +8530,14 @@ "unit", "gay", "lesbian", - "homosexual" - ] + "homosexual", + "people", + "family", + "women", + "baby", + "lgbt" + ], + "moji": "👩‍👩‍👧" }, "family_wwgb": { "unicode": "1F469-1F469-1F467-1F466", @@ -7797,8 +8561,14 @@ "homosexual", "woman", "girl", - "boy" - ] + "boy", + "people", + "family", + "women", + "baby", + "lgbt" + ], + "moji": "👩‍👩‍👧‍👦" }, "family_wwgg": { "unicode": "1F469-1F469-1F467-1F467", @@ -7821,19 +8591,27 @@ "lesbian", "homosexual", "woman", - "girl" - ] + "girl", + "people", + "family", + "women", + "baby", + "lgbt" + ], + "moji": "👩‍👩‍👧‍👧" }, "fast_forward": { "unicode": "23E9", "unicode_alternates": [], "name": "black right-pointing double triangle", "shortname": ":fast_forward:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "arrow", + "symbol" ], "moji": "⏩" }, @@ -7847,7 +8625,10 @@ "aliases_ascii": [], "keywords": [ "communication", - "technology" + "technology", + "electronics", + "work", + "office" ], "moji": "📠" }, @@ -7856,7 +8637,7 @@ "unicode_alternates": [], "name": "fearful face", "shortname": ":fearful:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -7867,8 +8648,10 @@ "terrified", "fear", "fearful", - "scared", - "frightened" + "frightened", + "smiley", + "surprised", + "emotion" ], "moji": "😨" }, @@ -7888,16 +8671,12 @@ "paw", "pet", "tracking", - "paw", "prints", "mark", "imprints", "footsteps", - "animal", "lion", "bear", - "dog", - "cat", "raccoon", "critter", "feet", @@ -7905,12 +8684,25 @@ ], "moji": "🐾" }, + "fencer": { + "unicode": "1F93A", + "unicode_alternates": [], + "name": "fencer", + "shortname": ":fencer:", + "category": "activity", + "aliases": [ + ":fencing:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤺" + }, "ferris_wheel": { "unicode": "1F3A1", "unicode_alternates": [], "name": "ferris wheel", "shortname": ":ferris_wheel:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -7923,13 +8715,16 @@ "park", "fair", "ride", - "entertainment" + "entertainment", + "places", + "vacation", + "ferris wheel" ], "moji": "🎡" }, "ferry": { "unicode": "26F4", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ferry", "shortname": ":ferry:", "category": "travel", @@ -7938,33 +8733,44 @@ "keywords": [ "boat", "place", - "travel" - ] + "travel", + "transportation", + "vacation" + ], + "moji": "⛴" }, "field_hockey": { "unicode": "1F3D1", - "unicode_alternates": "", + "unicode_alternates": [], "name": "field hockey stick and ball", "shortname": ":field_hockey:", "category": "activity", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "ball", + "sport", + "hockey" + ], + "moji": "🏑" }, "file_cabinet": { "unicode": "1F5C4", "unicode_alternates": [], "name": "file cabinet", "shortname": ":file_cabinet:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "folders", "office", "documents", - "storage" - ] + "storage", + "object", + "work" + ], + "moji": "🗄" }, "file_folder": { "unicode": "1F4C1", @@ -7975,7 +8781,9 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "documents" + "documents", + "work", + "office" ], "moji": "📁" }, @@ -7984,7 +8792,7 @@ "unicode_alternates": [], "name": "film frames", "shortname": ":film_frames:", - "category": "activity", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -7993,95 +8801,96 @@ "8mm", "16mm", "reel", - "celluloid" - ] + "celluloid", + "object", + "camera" + ], + "moji": "🎞" }, - "finger_pointing_down": { - "unicode": "1F597", + "fingers_crossed": { + "unicode": "1F91E", "unicode_alternates": [], - "name": "white down pointing left hand index", - "shortname": ":finger_pointing_down:", + "name": "hand with first and index finger crossed", + "shortname": ":fingers_crossed:", "category": "people", "aliases": [ - ":white_down_pointing_left_hand_index:" + ":hand_with_index_and_middle_finger_crossed:" ], "aliases_ascii": [], - "keywords": [ - "direction", - "finger", - "hand" - ] + "keywords": [], + "moji": "🤞" }, - "finger_pointing_down2": { - "unicode": "1F59F", + "fingers_crossed_tone1": { + "unicode": "1F91E-1F3FB", "unicode_alternates": [], - "name": "sideways white down pointing index", - "shortname": ":finger_pointing_down2:", + "name": "hand with index and middle fingers crossed tone 1", + "shortname": ":fingers_crossed_tone1:", "category": "people", "aliases": [ - ":sideways_white_down_pointing_index:" + ":hand_with_index_and_middle_fingers_crossed_tone1:" ], "aliases_ascii": [], - "keywords": [ - "direction", - "finger", - "hand" - ] + "keywords": [], + "moji": "🤞🏻" }, - "finger_pointing_left": { - "unicode": "1F598", + "fingers_crossed_tone2": { + "unicode": "1F91E-1F3FC", "unicode_alternates": [], - "name": "sideways white left pointing index", - "shortname": ":finger_pointing_left:", + "name": "hand with index and middle fingers crossed tone 2", + "shortname": ":fingers_crossed_tone2:", "category": "people", "aliases": [ - ":sideways_white_left_pointing_index:" + ":hand_with_index_and_middle_fingers_crossed_tone2:" ], "aliases_ascii": [], - "keywords": [ - "direction", - "finger", - "hand" - ] + "keywords": [], + "moji": "🤞🏼" }, - "finger_pointing_right": { - "unicode": "1F599", + "fingers_crossed_tone3": { + "unicode": "1F91E-1F3FD", "unicode_alternates": [], - "name": "sideways white right pointing index", - "shortname": ":finger_pointing_right:", + "name": "hand with index and middle fingers crossed tone 3", + "shortname": ":fingers_crossed_tone3:", "category": "people", "aliases": [ - ":sideways_white_right_pointing_index:" + ":hand_with_index_and_middle_fingers_crossed_tone3:" ], "aliases_ascii": [], - "keywords": [ - "direction", - "finger", - "hand" - ] + "keywords": [], + "moji": "🤞🏽" }, - "finger_pointing_up": { - "unicode": "1F59E", + "fingers_crossed_tone4": { + "unicode": "1F91E-1F3FE", "unicode_alternates": [], - "name": "sideways white up pointing index", - "shortname": ":finger_pointing_up:", + "name": "hand with index and middle fingers crossed tone 4", + "shortname": ":fingers_crossed_tone4:", "category": "people", "aliases": [ - ":sideways_white_up_pointing_index:" + ":hand_with_index_and_middle_fingers_crossed_tone4:" ], "aliases_ascii": [], - "keywords": [ - "direction", - "finger", - "hand" - ] + "keywords": [], + "moji": "🤞🏾" + }, + "fingers_crossed_tone5": { + "unicode": "1F91E-1F3FF", + "unicode_alternates": [], + "name": "hand with index and middle fingers crossed tone 5", + "shortname": ":fingers_crossed_tone5:", + "category": "people", + "aliases": [ + ":hand_with_index_and_middle_fingers_crossed_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤞🏿" }, "fire": { "unicode": "1F525", "unicode_alternates": [], "name": "fire", "shortname": ":fire:", - "category": "emoticons", + "category": "nature", "aliases": [ ":flame:" ], @@ -8089,7 +8898,8 @@ "keywords": [ "cook", "hot", - "flame" + "flame", + "wth" ], "moji": "🔥" }, @@ -8098,7 +8908,7 @@ "unicode_alternates": [], "name": "fire engine", "shortname": ":fire_engine:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -8110,34 +8920,17 @@ "engine", "truck", "emergency", - "medical" + "medical", + "911" ], "moji": "🚒" }, - "fire_engine_oncoming": { - "unicode": "1F6F1", - "unicode_alternates": [], - "name": "oncoming fire engine", - "shortname": ":fire_engine_oncoming:", - "category": "travel_places", - "aliases": [ - ":oncoming_fire_engine:" - ], - "aliases_ascii": [], - "keywords": [ - "transportation", - "vehicle", - "fighter", - "truck", - "emergency" - ] - }, "fireworks": { "unicode": "1F386", "unicode_alternates": [], "name": "fireworks", "shortname": ":fireworks:", - "category": "objects", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -8154,10 +8947,24 @@ "rocket", "sky", "idea", - "excitement" + "excitement", + "parties" ], "moji": "🎆" }, + "first_place": { + "unicode": "1F947", + "unicode_alternates": [], + "name": "first place medal", + "shortname": ":first_place:", + "category": "activity", + "aliases": [ + ":first_place_medal:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥇" + }, "first_quarter_moon": { "unicode": "1F313", "unicode_alternates": [], @@ -8174,7 +8981,8 @@ "sky", "night", "cheese", - "phase" + "phase", + "space" ], "moji": "🌓" }, @@ -8196,7 +9004,8 @@ "sky", "night", "cheese", - "phase" + "phase", + "space" ], "moji": "🌛" }, @@ -8211,7 +9020,8 @@ "keywords": [ "animal", "food", - "nature" + "nature", + "wildlife" ], "moji": "🐟" }, @@ -8220,7 +9030,7 @@ "unicode_alternates": [], "name": "fish cake with swirl design", "shortname": ":fish_cake:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -8231,7 +9041,8 @@ "swirl", "ramen", "noodles", - "naruto" + "naruto", + "sushi" ], "moji": "🍥" }, @@ -8240,7 +9051,7 @@ "unicode_alternates": [], "name": "fishing pole and fish", "shortname": ":fishing_pole_and_fish:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -8248,7 +9059,9 @@ "hobby", "fish", "fishing", - "pole" + "pole", + "vacation", + "sport" ], "moji": "🎣" }, @@ -8257,19 +9070,25 @@ "unicode_alternates": [], "name": "raised fist", "shortname": ":fist:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "fingers", "grasp", - "hand" + "hand", + "body", + "hands", + "hi", + "fist bump", + "diversity", + "condolence" ], "moji": "✊" }, "fist_tone1": { "unicode": "270A-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised fist tone 1", "shortname": ":fist_tone1:", "category": "people", @@ -8279,11 +9098,12 @@ "fingers", "grasp", "hand" - ] + ], + "moji": "✊🏻" }, "fist_tone2": { "unicode": "270A-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised fist tone 2", "shortname": ":fist_tone2:", "category": "people", @@ -8293,11 +9113,12 @@ "fingers", "grasp", "hand" - ] + ], + "moji": "✊🏼" }, "fist_tone3": { "unicode": "270A-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised fist tone 3", "shortname": ":fist_tone3:", "category": "people", @@ -8307,11 +9128,12 @@ "fingers", "grasp", "hand" - ] + ], + "moji": "✊🏽" }, "fist_tone4": { "unicode": "270A-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised fist tone 4", "shortname": ":fist_tone4:", "category": "people", @@ -8321,11 +9143,12 @@ "fingers", "grasp", "hand" - ] + ], + "moji": "✊🏾" }, "fist_tone5": { "unicode": "270A-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised fist tone 5", "shortname": ":fist_tone5:", "category": "people", @@ -8335,7 +9158,8 @@ "fingers", "grasp", "hand" - ] + ], + "moji": "✊🏿" }, "five": { "moji": "5️⃣", @@ -8343,15 +9167,18 @@ "unicode_alternates": [ "0035-FE0F-20E3" ], - "name": "digit five", + "name": "keycap digit five", "shortname": ":five:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", "numbers", - "prime" + "prime", + "number", + "math", + "symbol" ] }, "flag_ac": { @@ -8367,8 +9194,10 @@ "keywords": [ "country", "nation", - "ac" - ] + "ac", + "flag" + ], + "moji": "🇦🇨" }, "flag_ad": { "unicode": "1F1E6-1F1E9", @@ -8383,8 +9212,10 @@ "keywords": [ "country", "nation", - "ad" - ] + "ad", + "flag" + ], + "moji": "🇦🇩" }, "flag_ae": { "unicode": "1F1E6-1F1EA", @@ -8399,8 +9230,10 @@ "keywords": [ "country", "nation", - "ae" - ] + "ae", + "flag" + ], + "moji": "🇦🇪" }, "flag_af": { "unicode": "1F1E6-1F1EB", @@ -8416,8 +9249,10 @@ "country", "nation", "afghanestan", - "af" - ] + "af", + "flag" + ], + "moji": "🇦🇫" }, "flag_ag": { "unicode": "1F1E6-1F1EC", @@ -8432,8 +9267,10 @@ "keywords": [ "country", "nation", - "ag" - ] + "ag", + "flag" + ], + "moji": "🇦🇬" }, "flag_ai": { "unicode": "1F1E6-1F1EE", @@ -8448,8 +9285,10 @@ "keywords": [ "country", "nation", - "ai" - ] + "ai", + "flag" + ], + "moji": "🇦🇮" }, "flag_al": { "unicode": "1F1E6-1F1F1", @@ -8465,8 +9304,10 @@ "country", "nation", "shqiperia", - "al" - ] + "al", + "flag" + ], + "moji": "🇦🇱" }, "flag_am": { "unicode": "1F1E6-1F1F2", @@ -8482,8 +9323,10 @@ "country", "nation", "hayastan", - "am" - ] + "am", + "flag" + ], + "moji": "🇦🇲" }, "flag_ao": { "unicode": "1F1E6-1F1F4", @@ -8498,12 +9341,14 @@ "keywords": [ "country", "nation", - "ao" - ] + "ao", + "flag" + ], + "moji": "🇦🇴" }, "flag_aq": { "unicode": "1F1E6-1F1F6", - "unicode_alternates": "", + "unicode_alternates": [], "name": "antarctica", "shortname": ":flag_aq:", "category": "flags", @@ -8511,7 +9356,11 @@ ":aq:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇦🇶" }, "flag_ar": { "unicode": "1F1E6-1F1F7", @@ -8526,12 +9375,14 @@ "keywords": [ "country", "nation", - "ar" - ] + "ar", + "flag" + ], + "moji": "🇦🇷" }, "flag_as": { "unicode": "1F1E6-1F1F8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "american samoa", "shortname": ":flag_as:", "category": "flags", @@ -8539,7 +9390,11 @@ ":as:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇦🇸" }, "flag_at": { "unicode": "1F1E6-1F1F9", @@ -8556,8 +9411,10 @@ "nation", "österreich", "osterreich", - "at" - ] + "at", + "flag" + ], + "moji": "🇦🇹" }, "flag_au": { "unicode": "1F1E6-1F1FA", @@ -8572,8 +9429,10 @@ "keywords": [ "country", "nation", - "au" - ] + "au", + "flag" + ], + "moji": "🇦🇺" }, "flag_aw": { "unicode": "1F1E6-1F1FC", @@ -8588,12 +9447,14 @@ "keywords": [ "country", "nation", - "aw" - ] + "aw", + "flag" + ], + "moji": "🇦🇼" }, "flag_ax": { "unicode": "1F1E6-1F1FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "åland islands", "shortname": ":flag_ax:", "category": "flags", @@ -8601,7 +9462,11 @@ ":ax:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇦🇽" }, "flag_az": { "unicode": "1F1E6-1F1FF", @@ -8617,8 +9482,10 @@ "country", "nation", "azarbaycan", - "az" - ] + "az", + "flag" + ], + "moji": "🇦🇿" }, "flag_ba": { "unicode": "1F1E7-1F1E6", @@ -8634,8 +9501,10 @@ "country", "nation", "bosna i hercegovina", - "ba" - ] + "ba", + "flag" + ], + "moji": "🇧🇦" }, "flag_bb": { "unicode": "1F1E7-1F1E7", @@ -8650,8 +9519,10 @@ "keywords": [ "country", "nation", - "bb" - ] + "bb", + "flag" + ], + "moji": "🇧🇧" }, "flag_bd": { "unicode": "1F1E7-1F1E9", @@ -8666,8 +9537,10 @@ "keywords": [ "country", "nation", - "bd" - ] + "bd", + "flag" + ], + "moji": "🇧🇩" }, "flag_be": { "unicode": "1F1E7-1F1EA", @@ -8684,8 +9557,10 @@ "nation", "belgique", "belgie", - "be" - ] + "be", + "flag" + ], + "moji": "🇧🇪" }, "flag_bf": { "unicode": "1F1E7-1F1EB", @@ -8700,8 +9575,10 @@ "keywords": [ "country", "nation", - "bf" - ] + "bf", + "flag" + ], + "moji": "🇧🇫" }, "flag_bg": { "unicode": "1F1E7-1F1EC", @@ -8716,8 +9593,10 @@ "keywords": [ "country", "nation", - "bg" - ] + "bg", + "flag" + ], + "moji": "🇧🇬" }, "flag_bh": { "unicode": "1F1E7-1F1ED", @@ -8733,8 +9612,10 @@ "country", "nation", "al bahrayn", - "bh" - ] + "bh", + "flag" + ], + "moji": "🇧🇭" }, "flag_bi": { "unicode": "1F1E7-1F1EE", @@ -8749,8 +9630,10 @@ "keywords": [ "country", "nation", - "bi" - ] + "bi", + "flag" + ], + "moji": "🇧🇮" }, "flag_bj": { "unicode": "1F1E7-1F1EF", @@ -8765,12 +9648,14 @@ "keywords": [ "country", "nation", - "bj" - ] + "bj", + "flag" + ], + "moji": "🇧🇯" }, "flag_bl": { "unicode": "1F1E7-1F1F1", - "unicode_alternates": "", + "unicode_alternates": [], "name": "saint barthélemy", "shortname": ":flag_bl:", "category": "flags", @@ -8778,22 +9663,28 @@ ":bl:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇧🇱" }, "flag_black": { "unicode": "1F3F4", "unicode_alternates": [], "name": "waving black flag", "shortname": ":flag_black:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":waving_black_flag:" ], "aliases_ascii": [], "keywords": [ "symbol", - "signal" - ] + "signal", + "object" + ], + "moji": "🏴" }, "flag_bm": { "unicode": "1F1E7-1F1F2", @@ -8808,8 +9699,10 @@ "keywords": [ "country", "nation", - "bm" - ] + "bm", + "flag" + ], + "moji": "🇧🇲" }, "flag_bn": { "unicode": "1F1E7-1F1F3", @@ -8824,8 +9717,10 @@ "keywords": [ "country", "nation", - "bn" - ] + "bn", + "flag" + ], + "moji": "🇧🇳" }, "flag_bo": { "unicode": "1F1E7-1F1F4", @@ -8840,12 +9735,14 @@ "keywords": [ "country", "nation", - "bo" - ] + "bo", + "flag" + ], + "moji": "🇧🇴" }, "flag_bq": { "unicode": "1F1E7-1F1F6", - "unicode_alternates": "", + "unicode_alternates": [], "name": "caribbean netherlands", "shortname": ":flag_bq:", "category": "flags", @@ -8853,7 +9750,11 @@ ":bq:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇧🇶" }, "flag_br": { "unicode": "1F1E7-1F1F7", @@ -8869,8 +9770,10 @@ "country", "nation", "brasil", - "br" - ] + "br", + "flag" + ], + "moji": "🇧🇷" }, "flag_bs": { "unicode": "1F1E7-1F1F8", @@ -8885,8 +9788,10 @@ "keywords": [ "country", "nation", - "bs" - ] + "bs", + "flag" + ], + "moji": "🇧🇸" }, "flag_bt": { "unicode": "1F1E7-1F1F9", @@ -8901,12 +9806,14 @@ "keywords": [ "country", "nation", - "bt" - ] + "bt", + "flag" + ], + "moji": "🇧🇹" }, "flag_bv": { "unicode": "1F1E7-1F1FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "bouvet island", "shortname": ":flag_bv:", "category": "flags", @@ -8914,7 +9821,11 @@ ":bv:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇧🇻" }, "flag_bw": { "unicode": "1F1E7-1F1FC", @@ -8929,8 +9840,10 @@ "keywords": [ "country", "nation", - "bw" - ] + "bw", + "flag" + ], + "moji": "🇧🇼" }, "flag_by": { "unicode": "1F1E7-1F1FE", @@ -8946,8 +9859,10 @@ "country", "nation", "byelarus", - "by" - ] + "by", + "flag" + ], + "moji": "🇧🇾" }, "flag_bz": { "unicode": "1F1E7-1F1FF", @@ -8962,8 +9877,10 @@ "keywords": [ "country", "nation", - "bz" - ] + "bz", + "flag" + ], + "moji": "🇧🇿" }, "flag_ca": { "unicode": "1F1E8-1F1E6", @@ -8978,12 +9895,14 @@ "keywords": [ "country", "nation", - "ca" - ] + "ca", + "flag" + ], + "moji": "🇨🇦" }, "flag_cc": { "unicode": "1F1E8-1F1E8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "cocos (keeling) islands", "shortname": ":flag_cc:", "category": "flags", @@ -8991,7 +9910,11 @@ ":cc:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇨🇨" }, "flag_cd": { "unicode": "1F1E8-1F1E9", @@ -9008,8 +9931,10 @@ "nation", "république démocratique du congo", "republique democratique du congo", - "cd" - ] + "cd", + "flag" + ], + "moji": "🇨🇩" }, "flag_cf": { "unicode": "1F1E8-1F1EB", @@ -9024,8 +9949,10 @@ "keywords": [ "country", "nation", - "cf" - ] + "cf", + "flag" + ], + "moji": "🇨🇫" }, "flag_cg": { "unicode": "1F1E8-1F1EC", @@ -9040,8 +9967,10 @@ "keywords": [ "country", "nation", - "cg" - ] + "cg", + "flag" + ], + "moji": "🇨🇬" }, "flag_ch": { "unicode": "1F1E8-1F1ED", @@ -9056,8 +9985,11 @@ "keywords": [ "country", "nation", - "swiss" - ] + "swiss", + "neutral", + "flag" + ], + "moji": "🇨🇭" }, "flag_ci": { "unicode": "1F1E8-1F1EE", @@ -9072,12 +10004,14 @@ "keywords": [ "country", "nation", - "ci" - ] + "ci", + "flag" + ], + "moji": "🇨🇮" }, "flag_ck": { "unicode": "1F1E8-1F1F0", - "unicode_alternates": "", + "unicode_alternates": [], "name": "cook islands", "shortname": ":flag_ck:", "category": "flags", @@ -9085,7 +10019,11 @@ ":ck:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇨🇰" }, "flag_cl": { "unicode": "1F1E8-1F1F1", @@ -9100,8 +10038,10 @@ "keywords": [ "country", "nation", - "cl" - ] + "cl", + "flag" + ], + "moji": "🇨🇱" }, "flag_cm": { "unicode": "1F1E8-1F1F2", @@ -9116,8 +10056,10 @@ "keywords": [ "country", "nation", - "cm" - ] + "cm", + "flag" + ], + "moji": "🇨🇲" }, "flag_cn": { "unicode": "1F1E8-1F1F3", @@ -9135,8 +10077,10 @@ "zhong guo", "country", "nation", - "cn" - ] + "cn", + "flag" + ], + "moji": "🇨🇳" }, "flag_co": { "unicode": "1F1E8-1F1F4", @@ -9151,12 +10095,14 @@ "keywords": [ "country", "nation", - "co" - ] + "co", + "flag" + ], + "moji": "🇨🇴" }, "flag_cp": { "unicode": "1F1E8-1F1F5", - "unicode_alternates": "", + "unicode_alternates": [], "name": "clipperton island", "shortname": ":flag_cp:", "category": "flags", @@ -9164,7 +10110,11 @@ ":cp:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇨🇵" }, "flag_cr": { "unicode": "1F1E8-1F1F7", @@ -9179,8 +10129,10 @@ "keywords": [ "country", "nation", - "cr" - ] + "cr", + "flag" + ], + "moji": "🇨🇷" }, "flag_cu": { "unicode": "1F1E8-1F1FA", @@ -9195,8 +10147,10 @@ "keywords": [ "country", "nation", - "cu" - ] + "cu", + "flag" + ], + "moji": "🇨🇺" }, "flag_cv": { "unicode": "1F1E8-1F1FB", @@ -9212,12 +10166,14 @@ "country", "nation", "cabo verde", - "cv" - ] + "cv", + "flag" + ], + "moji": "🇨🇻" }, "flag_cw": { "unicode": "1F1E8-1F1FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "curaçao", "shortname": ":flag_cw:", "category": "flags", @@ -9225,11 +10181,15 @@ ":cw:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇨🇼" }, "flag_cx": { "unicode": "1F1E8-1F1FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "christmas island", "shortname": ":flag_cx:", "category": "flags", @@ -9237,7 +10197,11 @@ ":cx:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇨🇽" }, "flag_cy": { "unicode": "1F1E8-1F1FE", @@ -9254,8 +10218,10 @@ "nation", "kibris", "kypros", - "cy" - ] + "cy", + "flag" + ], + "moji": "🇨🇾" }, "flag_cz": { "unicode": "1F1E8-1F1FF", @@ -9271,8 +10237,10 @@ "country", "nation", "ceska republika", - "cz" - ] + "cz", + "flag" + ], + "moji": "🇨🇿" }, "flag_de": { "unicode": "1F1E9-1F1EA", @@ -9289,20 +10257,26 @@ "nation", "deutschland", "country", - "de" - ] + "de", + "flag" + ], + "moji": "🇩🇪" }, "flag_dg": { "unicode": "1F1E9-1F1EC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "diego garcia", "shortname": ":flag_dg:", "category": "flags", "aliases": [ ":dg:" ], - "aliases_ascii": [], - "keywords": [] + "aliases_ascii": [], + "keywords": [ + "country", + "flag" + ], + "moji": "🇩🇬" }, "flag_dj": { "unicode": "1F1E9-1F1EF", @@ -9317,8 +10291,10 @@ "keywords": [ "country", "nation", - "dj" - ] + "dj", + "flag" + ], + "moji": "🇩🇯" }, "flag_dk": { "unicode": "1F1E9-1F1F0", @@ -9334,8 +10310,10 @@ "country", "nation", "danmark", - "dk" - ] + "dk", + "flag" + ], + "moji": "🇩🇰" }, "flag_dm": { "unicode": "1F1E9-1F1F2", @@ -9350,8 +10328,10 @@ "keywords": [ "country", "nation", - "dm" - ] + "dm", + "flag" + ], + "moji": "🇩🇲" }, "flag_do": { "unicode": "1F1E9-1F1F4", @@ -9366,8 +10346,10 @@ "keywords": [ "country", "nation", - "do" - ] + "do", + "flag" + ], + "moji": "🇩🇴" }, "flag_dz": { "unicode": "1F1E9-1F1FF", @@ -9384,12 +10366,14 @@ "nation", "al jaza'ir", "al jazair", - "dz" - ] + "dz", + "flag" + ], + "moji": "🇩🇿" }, "flag_ea": { "unicode": "1F1EA-1F1E6", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ceuta, melilla", "shortname": ":flag_ea:", "category": "flags", @@ -9397,7 +10381,11 @@ ":ea:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇪🇦" }, "flag_ec": { "unicode": "1F1EA-1F1E8", @@ -9412,8 +10400,10 @@ "keywords": [ "country", "nation", - "ec" - ] + "ec", + "flag" + ], + "moji": "🇪🇨" }, "flag_ee": { "unicode": "1F1EA-1F1EA", @@ -9429,8 +10419,10 @@ "country", "nation", "eesti vabariik", - "ee" - ] + "ee", + "flag" + ], + "moji": "🇪🇪" }, "flag_eg": { "unicode": "1F1EA-1F1EC", @@ -9446,8 +10438,10 @@ "country", "nation", "misr", - "eg" - ] + "eg", + "flag" + ], + "moji": "🇪🇬" }, "flag_eh": { "unicode": "1F1EA-1F1ED", @@ -9465,8 +10459,10 @@ "aṣ-Ṣaḥrā’ al-gharbīyah", "sahra", "gharbiyah", - "eh" - ] + "eh", + "flag" + ], + "moji": "🇪🇭" }, "flag_er": { "unicode": "1F1EA-1F1F7", @@ -9482,8 +10478,10 @@ "country", "nation", "hagere ertra", - "er" - ] + "er", + "flag" + ], + "moji": "🇪🇷" }, "flag_es": { "unicode": "1F1EA-1F1F8", @@ -9500,8 +10498,10 @@ "españa", "country", "espana", - "es" - ] + "es", + "flag" + ], + "moji": "🇪🇸" }, "flag_et": { "unicode": "1F1EA-1F1F9", @@ -9518,12 +10518,14 @@ "nation", "ityop'iya", "ityopiya", - "et" - ] + "et", + "flag" + ], + "moji": "🇪🇹" }, "flag_eu": { "unicode": "1F1EA-1F1FA", - "unicode_alternates": "", + "unicode_alternates": [], "name": "european union", "shortname": ":flag_eu:", "category": "flags", @@ -9531,7 +10533,11 @@ ":eu:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇪🇺" }, "flag_fi": { "unicode": "1F1EB-1F1EE", @@ -9547,8 +10553,10 @@ "country", "nation", "suomen tasavalta", - "fi" - ] + "fi", + "flag" + ], + "moji": "🇫🇮" }, "flag_fj": { "unicode": "1F1EB-1F1EF", @@ -9563,8 +10571,10 @@ "keywords": [ "country", "nation", - "fj" - ] + "fj", + "flag" + ], + "moji": "🇫🇯" }, "flag_fk": { "unicode": "1F1EB-1F1F0", @@ -9580,8 +10590,10 @@ "country", "nation", "islas malvinas", - "fk" - ] + "fk", + "flag" + ], + "moji": "🇫🇰" }, "flag_fm": { "unicode": "1F1EB-1F1F2", @@ -9596,8 +10608,10 @@ "keywords": [ "country", "nation", - "fm" - ] + "fm", + "flag" + ], + "moji": "🇫🇲" }, "flag_fo": { "unicode": "1F1EB-1F1F4", @@ -9613,8 +10627,10 @@ "country", "nation", "foroyar", - "fo" - ] + "fo", + "flag" + ], + "moji": "🇫🇴" }, "flag_fr": { "unicode": "1F1EB-1F1F7", @@ -9630,8 +10646,10 @@ "french", "nation", "country", - "fr" - ] + "fr", + "flag" + ], + "moji": "🇫🇷" }, "flag_ga": { "unicode": "1F1EC-1F1E6", @@ -9646,8 +10664,10 @@ "keywords": [ "country", "nation", - "ga" - ] + "ga", + "flag" + ], + "moji": "🇬🇦" }, "flag_gb": { "unicode": "1F1EC-1F1E7", @@ -9666,8 +10686,10 @@ "nation", "united kingdom", "england", - "country" - ] + "country", + "flag" + ], + "moji": "🇬🇧" }, "flag_gd": { "unicode": "1F1EC-1F1E9", @@ -9682,8 +10704,10 @@ "keywords": [ "country", "nation", - "gd" - ] + "gd", + "flag" + ], + "moji": "🇬🇩" }, "flag_ge": { "unicode": "1F1EC-1F1EA", @@ -9700,12 +10724,14 @@ "nation", "sak'art'velo", "sakartvelo", - "ge" - ] + "ge", + "flag" + ], + "moji": "🇬🇪" }, "flag_gf": { "unicode": "1F1EC-1F1EB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "french guiana", "shortname": ":flag_gf:", "category": "flags", @@ -9713,11 +10739,15 @@ ":gf:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇬🇫" }, "flag_gg": { "unicode": "1F1EC-1F1EC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "guernsey", "shortname": ":flag_gg:", "category": "flags", @@ -9725,7 +10755,11 @@ ":gg:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇬🇬" }, "flag_gh": { "unicode": "1F1EC-1F1ED", @@ -9740,8 +10774,10 @@ "keywords": [ "country", "nation", - "gh" - ] + "gh", + "flag" + ], + "moji": "🇬🇭" }, "flag_gi": { "unicode": "1F1EC-1F1EE", @@ -9756,8 +10792,10 @@ "keywords": [ "country", "nation", - "gi" - ] + "gi", + "flag" + ], + "moji": "🇬🇮" }, "flag_gl": { "unicode": "1F1EC-1F1F1", @@ -9773,8 +10811,10 @@ "country", "nation", "kalaallit nunaat", - "gl" - ] + "gl", + "flag" + ], + "moji": "🇬🇱" }, "flag_gm": { "unicode": "1F1EC-1F1F2", @@ -9789,8 +10829,10 @@ "keywords": [ "country", "nation", - "gm" - ] + "gm", + "flag" + ], + "moji": "🇬🇲" }, "flag_gn": { "unicode": "1F1EC-1F1F3", @@ -9806,12 +10848,14 @@ "country", "nation", "guinee", - "gn" - ] + "gn", + "flag" + ], + "moji": "🇬🇳" }, "flag_gp": { "unicode": "1F1EC-1F1F5", - "unicode_alternates": "", + "unicode_alternates": [], "name": "guadeloupe", "shortname": ":flag_gp:", "category": "flags", @@ -9819,7 +10863,11 @@ ":gp:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇬🇵" }, "flag_gq": { "unicode": "1F1EC-1F1F6", @@ -9835,8 +10883,10 @@ "country", "nation", "guinea ecuatorial", - "gq" - ] + "gq", + "flag" + ], + "moji": "🇬🇶" }, "flag_gr": { "unicode": "1F1EC-1F1F7", @@ -9853,12 +10903,14 @@ "nation", "ellas", "ellada", - "gr" - ] + "gr", + "flag" + ], + "moji": "🇬🇷" }, "flag_gs": { "unicode": "1F1EC-1F1F8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "south georgia", "shortname": ":flag_gs:", "category": "flags", @@ -9866,7 +10918,11 @@ ":gs:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇬🇸" }, "flag_gt": { "unicode": "1F1EC-1F1F9", @@ -9881,8 +10937,10 @@ "keywords": [ "country", "nation", - "gt" - ] + "gt", + "flag" + ], + "moji": "🇬🇹" }, "flag_gu": { "unicode": "1F1EC-1F1FA", @@ -9897,8 +10955,10 @@ "keywords": [ "country", "nation", - "gu" - ] + "gu", + "flag" + ], + "moji": "🇬🇺" }, "flag_gw": { "unicode": "1F1EC-1F1FC", @@ -9915,8 +10975,10 @@ "nation", "guine-bissau", "guine bissau", - "gw" - ] + "gw", + "flag" + ], + "moji": "🇬🇼" }, "flag_gy": { "unicode": "1F1EC-1F1FE", @@ -9931,8 +10993,10 @@ "keywords": [ "country", "nation", - "gy" - ] + "gy", + "flag" + ], + "moji": "🇬🇾" }, "flag_hk": { "unicode": "1F1ED-1F1F0", @@ -9948,12 +11012,14 @@ "country", "nation", "xianggang", - "hk" - ] + "hk", + "flag" + ], + "moji": "🇭🇰" }, "flag_hm": { "unicode": "1F1ED-1F1F2", - "unicode_alternates": "", + "unicode_alternates": [], "name": "heard island and mcdonald islands", "shortname": ":flag_hm:", "category": "flags", @@ -9961,7 +11027,11 @@ ":hm:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇭🇲" }, "flag_hn": { "unicode": "1F1ED-1F1F3", @@ -9976,8 +11046,10 @@ "keywords": [ "country", "nation", - "hn" - ] + "hn", + "flag" + ], + "moji": "🇭🇳" }, "flag_hr": { "unicode": "1F1ED-1F1F7", @@ -9993,8 +11065,10 @@ "country", "nation", "hrvatska", - "hr" - ] + "hr", + "flag" + ], + "moji": "🇭🇷" }, "flag_ht": { "unicode": "1F1ED-1F1F9", @@ -10009,8 +11083,10 @@ "keywords": [ "country", "nation", - "ht" - ] + "ht", + "flag" + ], + "moji": "🇭🇹" }, "flag_hu": { "unicode": "1F1ED-1F1FA", @@ -10026,12 +11102,14 @@ "country", "nation", "magyarorszag", - "hu" - ] + "hu", + "flag" + ], + "moji": "🇭🇺" }, "flag_ic": { "unicode": "1F1EE-1F1E8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "canary islands", "shortname": ":flag_ic:", "category": "flags", @@ -10039,7 +11117,11 @@ ":ic:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇮🇨" }, "flag_id": { "unicode": "1F1EE-1F1E9", @@ -10054,8 +11136,10 @@ "keywords": [ "country", "nation", - "id" - ] + "id", + "flag" + ], + "moji": "🇮🇩" }, "flag_ie": { "unicode": "1F1EE-1F1EA", @@ -10072,8 +11156,10 @@ "nation", "éire", "eire", - "ie" - ] + "ie", + "flag" + ], + "moji": "🇮🇪" }, "flag_il": { "unicode": "1F1EE-1F1F1", @@ -10090,12 +11176,15 @@ "nation", "yisra'el", "yisrael", - "il" - ] + "il", + "jew", + "flag" + ], + "moji": "🇮🇱" }, "flag_im": { "unicode": "1F1EE-1F1F2", - "unicode_alternates": "", + "unicode_alternates": [], "name": "isle of man", "shortname": ":flag_im:", "category": "flags", @@ -10103,7 +11192,11 @@ ":im:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇮🇲" }, "flag_in": { "unicode": "1F1EE-1F1F3", @@ -10119,12 +11212,14 @@ "country", "nation", "bharat", - "in" - ] + "in", + "flag" + ], + "moji": "🇮🇳" }, "flag_io": { "unicode": "1F1EE-1F1F4", - "unicode_alternates": "", + "unicode_alternates": [], "name": "british indian ocean territory", "shortname": ":flag_io:", "category": "flags", @@ -10132,7 +11227,11 @@ ":io:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇮🇴" }, "flag_iq": { "unicode": "1F1EE-1F1F6", @@ -10147,8 +11246,10 @@ "keywords": [ "country", "nation", - "iq" - ] + "iq", + "flag" + ], + "moji": "🇮🇶" }, "flag_ir": { "unicode": "1F1EE-1F1F7", @@ -10163,8 +11264,10 @@ "keywords": [ "country", "nation", - "ir" - ] + "ir", + "flag" + ], + "moji": "🇮🇷" }, "flag_is": { "unicode": "1F1EE-1F1F8", @@ -10180,8 +11283,10 @@ "country", "nation", "lyoveldio island", - "is" - ] + "is", + "flag" + ], + "moji": "🇮🇸" }, "flag_it": { "unicode": "1F1EE-1F1F9", @@ -10197,8 +11302,11 @@ "italia", "country", "nation", - "it" - ] + "it", + "italian", + "flag" + ], + "moji": "🇮🇹" }, "flag_je": { "unicode": "1F1EF-1F1EA", @@ -10213,8 +11321,10 @@ "keywords": [ "country", "nation", - "je" - ] + "je", + "flag" + ], + "moji": "🇯🇪" }, "flag_jm": { "unicode": "1F1EF-1F1F2", @@ -10229,8 +11339,10 @@ "keywords": [ "country", "nation", - "jm" - ] + "jm", + "flag" + ], + "moji": "🇯🇲" }, "flag_jo": { "unicode": "1F1EF-1F1F4", @@ -10246,8 +11358,10 @@ "country", "nation", "al urdun", - "jo" - ] + "jo", + "flag" + ], + "moji": "🇯🇴" }, "flag_jp": { "unicode": "1F1EF-1F1F5", @@ -10263,8 +11377,11 @@ "nation", "nippon", "country", - "jp" - ] + "jp", + "japan", + "flag" + ], + "moji": "🇯🇵" }, "flag_ke": { "unicode": "1F1F0-1F1EA", @@ -10279,8 +11396,10 @@ "keywords": [ "country", "nation", - "ke" - ] + "ke", + "flag" + ], + "moji": "🇰🇪" }, "flag_kg": { "unicode": "1F1F0-1F1EC", @@ -10296,8 +11415,10 @@ "country", "nation", "kyrgyz respublikasy", - "kg" - ] + "kg", + "flag" + ], + "moji": "🇰🇬" }, "flag_kh": { "unicode": "1F1F0-1F1ED", @@ -10313,8 +11434,10 @@ "country", "nation", "kampuchea", - "kh" - ] + "kh", + "flag" + ], + "moji": "🇰🇭" }, "flag_ki": { "unicode": "1F1F0-1F1EE", @@ -10331,8 +11454,10 @@ "nation", "kiribati", "kiribas", - "ki" - ] + "ki", + "flag" + ], + "moji": "🇰🇮" }, "flag_km": { "unicode": "1F1F0-1F1F2", @@ -10347,8 +11472,10 @@ "keywords": [ "country", "nation", - "km" - ] + "km", + "flag" + ], + "moji": "🇰🇲" }, "flag_kn": { "unicode": "1F1F0-1F1F3", @@ -10363,8 +11490,10 @@ "keywords": [ "country", "nation", - "kn" - ] + "kn", + "flag" + ], + "moji": "🇰🇳" }, "flag_kp": { "unicode": "1F1F0-1F1F5", @@ -10379,8 +11508,10 @@ "keywords": [ "country", "nation", - "kp" - ] + "kp", + "flag" + ], + "moji": "🇰🇵" }, "flag_kr": { "unicode": "1F1F0-1F1F7", @@ -10396,8 +11527,10 @@ "nation", "country", "south korea", - "kr" - ] + "kr", + "flag" + ], + "moji": "🇰🇷" }, "flag_kw": { "unicode": "1F1F0-1F1FC", @@ -10413,8 +11546,10 @@ "country", "nation", "al kuwayt", - "kw" - ] + "kw", + "flag" + ], + "moji": "🇰🇼" }, "flag_ky": { "unicode": "1F1F0-1F1FE", @@ -10429,8 +11564,10 @@ "keywords": [ "country", "nation", - "ky" - ] + "ky", + "flag" + ], + "moji": "🇰🇾" }, "flag_kz": { "unicode": "1F1F0-1F1FF", @@ -10446,8 +11583,10 @@ "country", "nation", "qazaqstan", - "kz" - ] + "kz", + "flag" + ], + "moji": "🇰🇿" }, "flag_la": { "unicode": "1F1F1-1F1E6", @@ -10462,8 +11601,10 @@ "keywords": [ "country", "nation", - "la" - ] + "la", + "flag" + ], + "moji": "🇱🇦" }, "flag_lb": { "unicode": "1F1F1-1F1E7", @@ -10479,8 +11620,10 @@ "country", "nation", "lubnan", - "lb" - ] + "lb", + "flag" + ], + "moji": "🇱🇧" }, "flag_lc": { "unicode": "1F1F1-1F1E8", @@ -10495,8 +11638,10 @@ "keywords": [ "country", "nation", - "lc" - ] + "lc", + "flag" + ], + "moji": "🇱🇨" }, "flag_li": { "unicode": "1F1F1-1F1EE", @@ -10511,8 +11656,10 @@ "keywords": [ "country", "nation", - "li" - ] + "li", + "flag" + ], + "moji": "🇱🇮" }, "flag_lk": { "unicode": "1F1F1-1F1F0", @@ -10527,8 +11674,10 @@ "keywords": [ "country", "nation", - "lk" - ] + "lk", + "flag" + ], + "moji": "🇱🇰" }, "flag_lr": { "unicode": "1F1F1-1F1F7", @@ -10543,8 +11692,10 @@ "keywords": [ "country", "nation", - "lr" - ] + "lr", + "flag" + ], + "moji": "🇱🇷" }, "flag_ls": { "unicode": "1F1F1-1F1F8", @@ -10559,8 +11710,10 @@ "keywords": [ "country", "nation", - "ls" - ] + "ls", + "flag" + ], + "moji": "🇱🇸" }, "flag_lt": { "unicode": "1F1F1-1F1F9", @@ -10576,8 +11729,10 @@ "country", "nation", "lietuva", - "lt" - ] + "lt", + "flag" + ], + "moji": "🇱🇹" }, "flag_lu": { "unicode": "1F1F1-1F1FA", @@ -10594,8 +11749,10 @@ "nation", "luxembourg", "letzebuerg", - "lu" - ] + "lu", + "flag" + ], + "moji": "🇱🇺" }, "flag_lv": { "unicode": "1F1F1-1F1FB", @@ -10611,8 +11768,10 @@ "country", "nation", "latvija", - "lv" - ] + "lv", + "flag" + ], + "moji": "🇱🇻" }, "flag_ly": { "unicode": "1F1F1-1F1FE", @@ -10628,8 +11787,10 @@ "country", "nation", "libiyah", - "ly" - ] + "ly", + "flag" + ], + "moji": "🇱🇾" }, "flag_ma": { "unicode": "1F1F2-1F1E6", @@ -10645,8 +11806,10 @@ "country", "nation", "al maghrib", - "ma" - ] + "ma", + "flag" + ], + "moji": "🇲🇦" }, "flag_mc": { "unicode": "1F1F2-1F1E8", @@ -10661,8 +11824,10 @@ "keywords": [ "country", "nation", - "mc" - ] + "mc", + "flag" + ], + "moji": "🇲🇨" }, "flag_md": { "unicode": "1F1F2-1F1E9", @@ -10677,8 +11842,10 @@ "keywords": [ "country", "nation", - "md" - ] + "md", + "flag" + ], + "moji": "🇲🇩" }, "flag_me": { "unicode": "1F1F2-1F1EA", @@ -10694,12 +11861,14 @@ "country", "nation", "crna gora", - "me" - ] + "me", + "flag" + ], + "moji": "🇲🇪" }, "flag_mf": { "unicode": "1F1F2-1F1EB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "saint martin", "shortname": ":flag_mf:", "category": "flags", @@ -10707,7 +11876,11 @@ ":mf:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇲🇫" }, "flag_mg": { "unicode": "1F1F2-1F1EC", @@ -10722,8 +11895,10 @@ "keywords": [ "country", "nation", - "mg" - ] + "mg", + "flag" + ], + "moji": "🇲🇬" }, "flag_mh": { "unicode": "1F1F2-1F1ED", @@ -10738,8 +11913,10 @@ "keywords": [ "country", "nation", - "mh" - ] + "mh", + "flag" + ], + "moji": "🇲🇭" }, "flag_mk": { "unicode": "1F1F2-1F1F0", @@ -10754,8 +11931,10 @@ "keywords": [ "country", "nation", - "mk" - ] + "mk", + "flag" + ], + "moji": "🇲🇰" }, "flag_ml": { "unicode": "1F1F2-1F1F1", @@ -10770,8 +11949,10 @@ "keywords": [ "country", "nation", - "ml" - ] + "ml", + "flag" + ], + "moji": "🇲🇱" }, "flag_mm": { "unicode": "1F1F2-1F1F2", @@ -10787,8 +11968,10 @@ "country", "nation", "myanma naingngandaw", - "mm" - ] + "mm", + "flag" + ], + "moji": "🇲🇲" }, "flag_mn": { "unicode": "1F1F2-1F1F3", @@ -10804,8 +11987,10 @@ "country", "nation", "mongol uls", - "mn" - ] + "mn", + "flag" + ], + "moji": "🇲🇳" }, "flag_mo": { "unicode": "1F1F2-1F1F4", @@ -10821,12 +12006,14 @@ "country", "nation", "aomen", - "mo" - ] + "mo", + "flag" + ], + "moji": "🇲🇴" }, "flag_mp": { "unicode": "1F1F2-1F1F5", - "unicode_alternates": "", + "unicode_alternates": [], "name": "northern mariana islands", "shortname": ":flag_mp:", "category": "flags", @@ -10834,11 +12021,15 @@ ":mp:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇲🇵" }, "flag_mq": { "unicode": "1F1F2-1F1F6", - "unicode_alternates": "", + "unicode_alternates": [], "name": "martinique", "shortname": ":flag_mq:", "category": "flags", @@ -10846,7 +12037,11 @@ ":mq:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇲🇶" }, "flag_mr": { "unicode": "1F1F2-1F1F7", @@ -10862,8 +12057,10 @@ "country", "nation", "muritaniyah", - "mr" - ] + "mr", + "flag" + ], + "moji": "🇲🇷" }, "flag_ms": { "unicode": "1F1F2-1F1F8", @@ -10878,8 +12075,10 @@ "keywords": [ "country", "nation", - "ms" - ] + "ms", + "flag" + ], + "moji": "🇲🇸" }, "flag_mt": { "unicode": "1F1F2-1F1F9", @@ -10894,8 +12093,10 @@ "keywords": [ "country", "nation", - "mt" - ] + "mt", + "flag" + ], + "moji": "🇲🇹" }, "flag_mu": { "unicode": "1F1F2-1F1FA", @@ -10910,8 +12111,10 @@ "keywords": [ "country", "nation", - "mu" - ] + "mu", + "flag" + ], + "moji": "🇲🇺" }, "flag_mv": { "unicode": "1F1F2-1F1FB", @@ -10927,8 +12130,10 @@ "country", "nation", "dhivehi raajje", - "mv" - ] + "mv", + "flag" + ], + "moji": "🇲🇻" }, "flag_mw": { "unicode": "1F1F2-1F1FC", @@ -10943,8 +12148,10 @@ "keywords": [ "country", "nation", - "mw" - ] + "mw", + "flag" + ], + "moji": "🇲🇼" }, "flag_mx": { "unicode": "1F1F2-1F1FD", @@ -10959,8 +12166,11 @@ "keywords": [ "country", "nation", - "mx" - ] + "mx", + "mexican", + "flag" + ], + "moji": "🇲🇽" }, "flag_my": { "unicode": "1F1F2-1F1FE", @@ -10975,8 +12185,10 @@ "keywords": [ "country", "nation", - "my" - ] + "my", + "flag" + ], + "moji": "🇲🇾" }, "flag_mz": { "unicode": "1F1F2-1F1FF", @@ -10992,8 +12204,10 @@ "country", "nation", "mocambique", - "mz" - ] + "mz", + "flag" + ], + "moji": "🇲🇿" }, "flag_na": { "unicode": "1F1F3-1F1E6", @@ -11008,8 +12222,10 @@ "keywords": [ "country", "nation", - "na" - ] + "na", + "flag" + ], + "moji": "🇳🇦" }, "flag_nc": { "unicode": "1F1F3-1F1E8", @@ -11027,8 +12243,10 @@ "nouvelle", "calédonie", "caledonie", - "nc" - ] + "nc", + "flag" + ], + "moji": "🇳🇨" }, "flag_ne": { "unicode": "1F1F3-1F1EA", @@ -11043,12 +12261,14 @@ "keywords": [ "country", "nation", - "ne" - ] + "ne", + "flag" + ], + "moji": "🇳🇪" }, "flag_nf": { "unicode": "1F1F3-1F1EB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "norfolk island", "shortname": ":flag_nf:", "category": "flags", @@ -11056,7 +12276,11 @@ ":nf:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇳🇫" }, "flag_ng": { "unicode": "1F1F3-1F1EC", @@ -11071,8 +12295,10 @@ "keywords": [ "country", "nation", - "ng" - ] + "ng", + "flag" + ], + "moji": "🇳🇬" }, "flag_ni": { "unicode": "1F1F3-1F1EE", @@ -11087,8 +12313,10 @@ "keywords": [ "country", "nation", - "ni" - ] + "ni", + "flag" + ], + "moji": "🇳🇮" }, "flag_nl": { "unicode": "1F1F3-1F1F1", @@ -11105,8 +12333,10 @@ "nation", "nederland", "holland", - "nl" - ] + "nl", + "flag" + ], + "moji": "🇳🇱" }, "flag_no": { "unicode": "1F1F3-1F1F4", @@ -11122,8 +12352,10 @@ "country", "nation", "norge", - "no" - ] + "no", + "flag" + ], + "moji": "🇳🇴" }, "flag_np": { "unicode": "1F1F3-1F1F5", @@ -11138,8 +12370,10 @@ "keywords": [ "country", "nation", - "np" - ] + "np", + "flag" + ], + "moji": "🇳🇵" }, "flag_nr": { "unicode": "1F1F3-1F1F7", @@ -11154,8 +12388,10 @@ "keywords": [ "country", "nation", - "nr" - ] + "nr", + "flag" + ], + "moji": "🇳🇷" }, "flag_nu": { "unicode": "1F1F3-1F1FA", @@ -11170,8 +12406,10 @@ "keywords": [ "country", "nation", - "nu" - ] + "nu", + "flag" + ], + "moji": "🇳🇺" }, "flag_nz": { "unicode": "1F1F3-1F1FF", @@ -11187,8 +12425,10 @@ "country", "nation", "aotearoa", - "nz" - ] + "nz", + "flag" + ], + "moji": "🇳🇿" }, "flag_om": { "unicode": "1F1F4-1F1F2", @@ -11204,8 +12444,10 @@ "country", "nation", "saltanat uman", - "om" - ] + "om", + "flag" + ], + "moji": "🇴🇲" }, "flag_pa": { "unicode": "1F1F5-1F1E6", @@ -11220,8 +12462,10 @@ "keywords": [ "country", "nation", - "pa" - ] + "pa", + "flag" + ], + "moji": "🇵🇦" }, "flag_pe": { "unicode": "1F1F5-1F1EA", @@ -11236,8 +12480,10 @@ "keywords": [ "country", "nation", - "pe" - ] + "pe", + "flag" + ], + "moji": "🇵🇪" }, "flag_pf": { "unicode": "1F1F5-1F1EB", @@ -11254,8 +12500,10 @@ "nation", "polynésie française", "polynesie francaise", - "pf" - ] + "pf", + "flag" + ], + "moji": "🇵🇫" }, "flag_pg": { "unicode": "1F1F5-1F1EC", @@ -11271,8 +12519,10 @@ "country", "nation", "papua niu gini", - "pg" - ] + "pg", + "flag" + ], + "moji": "🇵🇬" }, "flag_ph": { "unicode": "1F1F5-1F1ED", @@ -11288,8 +12538,10 @@ "country", "nation", "pilipinas", - "ph" - ] + "ph", + "flag" + ], + "moji": "🇵🇭" }, "flag_pk": { "unicode": "1F1F5-1F1F0", @@ -11304,8 +12556,10 @@ "keywords": [ "country", "nation", - "pk" - ] + "pk", + "flag" + ], + "moji": "🇵🇰" }, "flag_pl": { "unicode": "1F1F5-1F1F1", @@ -11321,12 +12575,14 @@ "country", "nation", "polska", - "pl" - ] + "pl", + "flag" + ], + "moji": "🇵🇱" }, "flag_pm": { "unicode": "1F1F5-1F1F2", - "unicode_alternates": "", + "unicode_alternates": [], "name": "saint pierre and miquelon", "shortname": ":flag_pm:", "category": "flags", @@ -11334,11 +12590,15 @@ ":pm:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇵🇲" }, "flag_pn": { "unicode": "1F1F5-1F1F3", - "unicode_alternates": "", + "unicode_alternates": [], "name": "pitcairn", "shortname": ":flag_pn:", "category": "flags", @@ -11346,7 +12606,11 @@ ":pn:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇵🇳" }, "flag_pr": { "unicode": "1F1F5-1F1F7", @@ -11361,8 +12625,10 @@ "keywords": [ "country", "nation", - "pr" - ] + "pr", + "flag" + ], + "moji": "🇵🇷" }, "flag_ps": { "unicode": "1F1F5-1F1F8", @@ -11377,8 +12643,10 @@ "keywords": [ "country", "nation", - "ps" - ] + "ps", + "flag" + ], + "moji": "🇵🇸" }, "flag_pt": { "unicode": "1F1F5-1F1F9", @@ -11393,8 +12661,10 @@ "keywords": [ "country", "nation", - "pt" - ] + "pt", + "flag" + ], + "moji": "🇵🇹" }, "flag_pw": { "unicode": "1F1F5-1F1FC", @@ -11410,8 +12680,10 @@ "country", "nation", "belau", - "pw" - ] + "pw", + "flag" + ], + "moji": "🇵🇼" }, "flag_py": { "unicode": "1F1F5-1F1FE", @@ -11426,8 +12698,10 @@ "keywords": [ "country", "nation", - "py" - ] + "py", + "flag" + ], + "moji": "🇵🇾" }, "flag_qa": { "unicode": "1F1F6-1F1E6", @@ -11443,12 +12717,14 @@ "country", "nation", "dawlat qatar", - "qa" - ] + "qa", + "flag" + ], + "moji": "🇶🇦" }, "flag_re": { "unicode": "1F1F7-1F1EA", - "unicode_alternates": "", + "unicode_alternates": [], "name": "réunion", "shortname": ":flag_re:", "category": "flags", @@ -11456,7 +12732,11 @@ ":re:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇷🇪" }, "flag_ro": { "unicode": "1F1F7-1F1F4", @@ -11471,8 +12751,10 @@ "keywords": [ "country", "nation", - "ro" - ] + "ro", + "flag" + ], + "moji": "🇷🇴" }, "flag_rs": { "unicode": "1F1F7-1F1F8", @@ -11488,8 +12770,10 @@ "country", "nation", "srbija", - "rs" - ] + "rs", + "flag" + ], + "moji": "🇷🇸" }, "flag_ru": { "unicode": "1F1F7-1F1FA", @@ -11505,8 +12789,10 @@ "nation", "russian", "country", - "ru" - ] + "ru", + "flag" + ], + "moji": "🇷🇺" }, "flag_rw": { "unicode": "1F1F7-1F1FC", @@ -11521,8 +12807,10 @@ "keywords": [ "country", "nation", - "rw" - ] + "rw", + "flag" + ], + "moji": "🇷🇼" }, "flag_sa": { "unicode": "1F1F8-1F1E6", @@ -11539,8 +12827,10 @@ "country", "nation", "al arabiyah as suudiyah", - "sa" - ] + "sa", + "flag" + ], + "moji": "🇸🇦" }, "flag_sb": { "unicode": "1F1F8-1F1E7", @@ -11555,8 +12845,10 @@ "keywords": [ "country", "nation", - "sb" - ] + "sb", + "flag" + ], + "moji": "🇸🇧" }, "flag_sc": { "unicode": "1F1F8-1F1E8", @@ -11572,8 +12864,10 @@ "country", "nation", "seychelles", - "sc" - ] + "sc", + "flag" + ], + "moji": "🇸🇨" }, "flag_sd": { "unicode": "1F1F8-1F1E9", @@ -11589,8 +12883,10 @@ "country", "nation", "as-sudan", - "sd" - ] + "sd", + "flag" + ], + "moji": "🇸🇩" }, "flag_se": { "unicode": "1F1F8-1F1EA", @@ -11606,8 +12902,10 @@ "country", "nation", "sverige", - "se" - ] + "se", + "flag" + ], + "moji": "🇸🇪" }, "flag_sg": { "unicode": "1F1F8-1F1EC", @@ -11622,8 +12920,10 @@ "keywords": [ "country", "nation", - "sg" - ] + "sg", + "flag" + ], + "moji": "🇸🇬" }, "flag_sh": { "unicode": "1F1F8-1F1ED", @@ -11638,8 +12938,10 @@ "keywords": [ "country", "nation", - "sh" - ] + "sh", + "flag" + ], + "moji": "🇸🇭" }, "flag_si": { "unicode": "1F1F8-1F1EE", @@ -11655,12 +12957,14 @@ "country", "nation", "slovenija", - "si" - ] + "si", + "flag" + ], + "moji": "🇸🇮" }, "flag_sj": { "unicode": "1F1F8-1F1EF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "svalbard and jan mayen", "shortname": ":flag_sj:", "category": "flags", @@ -11668,7 +12972,11 @@ ":sj:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇸🇯" }, "flag_sk": { "unicode": "1F1F8-1F1F0", @@ -11683,8 +12991,10 @@ "keywords": [ "country", "nation", - "sk" - ] + "sk", + "flag" + ], + "moji": "🇸🇰" }, "flag_sl": { "unicode": "1F1F8-1F1F1", @@ -11699,8 +13009,10 @@ "keywords": [ "country", "nation", - "sl" - ] + "sl", + "flag" + ], + "moji": "🇸🇱" }, "flag_sm": { "unicode": "1F1F8-1F1F2", @@ -11715,8 +13027,10 @@ "keywords": [ "country", "nation", - "sm" - ] + "sm", + "flag" + ], + "moji": "🇸🇲" }, "flag_sn": { "unicode": "1F1F8-1F1F3", @@ -11731,8 +13045,10 @@ "keywords": [ "country", "nation", - "sn" - ] + "sn", + "flag" + ], + "moji": "🇸🇳" }, "flag_so": { "unicode": "1F1F8-1F1F4", @@ -11747,8 +13063,10 @@ "keywords": [ "country", "nation", - "so" - ] + "so", + "flag" + ], + "moji": "🇸🇴" }, "flag_sr": { "unicode": "1F1F8-1F1F7", @@ -11763,12 +13081,14 @@ "keywords": [ "country", "nation", - "sr" - ] + "sr", + "flag" + ], + "moji": "🇸🇷" }, "flag_ss": { "unicode": "1F1F8-1F1F8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "south sudan", "shortname": ":flag_ss:", "category": "flags", @@ -11776,7 +13096,11 @@ ":ss:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇸🇸" }, "flag_st": { "unicode": "1F1F8-1F1F9", @@ -11792,8 +13116,10 @@ "country", "nation", "sao tome e principe", - "st" - ] + "st", + "flag" + ], + "moji": "🇸🇹" }, "flag_sv": { "unicode": "1F1F8-1F1FB", @@ -11808,12 +13134,14 @@ "keywords": [ "country", "nation", - "sv" - ] + "sv", + "flag" + ], + "moji": "🇸🇻" }, "flag_sx": { "unicode": "1F1F8-1F1FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sint maarten", "shortname": ":flag_sx:", "category": "flags", @@ -11821,7 +13149,11 @@ ":sx:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇸🇽" }, "flag_sy": { "unicode": "1F1F8-1F1FE", @@ -11836,8 +13168,10 @@ "keywords": [ "country", "nation", - "sy" - ] + "sy", + "flag" + ], + "moji": "🇸🇾" }, "flag_sz": { "unicode": "1F1F8-1F1FF", @@ -11852,12 +13186,14 @@ "keywords": [ "country", "nation", - "sz" - ] + "sz", + "flag" + ], + "moji": "🇸🇿" }, "flag_ta": { "unicode": "1F1F9-1F1E6", - "unicode_alternates": "", + "unicode_alternates": [], "name": "tristan da cunha", "shortname": ":flag_ta:", "category": "flags", @@ -11865,11 +13201,15 @@ ":ta:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇹🇦" }, "flag_tc": { "unicode": "1F1F9-1F1E8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "turks and caicos islands", "shortname": ":flag_tc:", "category": "flags", @@ -11877,7 +13217,11 @@ ":tc:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇹🇨" }, "flag_td": { "unicode": "1F1F9-1F1E9", @@ -11893,12 +13237,14 @@ "country", "nation", "tchad", - "td" - ] + "td", + "flag" + ], + "moji": "🇹🇩" }, "flag_tf": { "unicode": "1F1F9-1F1EB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "french southern territories", "shortname": ":flag_tf:", "category": "flags", @@ -11906,7 +13252,11 @@ ":tf:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇹🇫" }, "flag_tg": { "unicode": "1F1F9-1F1EC", @@ -11922,8 +13272,10 @@ "country", "nation", "republique togolaise", - "tg" - ] + "tg", + "flag" + ], + "moji": "🇹🇬" }, "flag_th": { "unicode": "1F1F9-1F1ED", @@ -11939,8 +13291,10 @@ "country", "nation", "prathet thai", - "th" - ] + "th", + "flag" + ], + "moji": "🇹🇭" }, "flag_tj": { "unicode": "1F1F9-1F1EF", @@ -11956,12 +13310,14 @@ "country", "nation", "jumhurii tojikiston", - "tj" - ] + "tj", + "flag" + ], + "moji": "🇹🇯" }, "flag_tk": { "unicode": "1F1F9-1F1F0", - "unicode_alternates": "", + "unicode_alternates": [], "name": "tokelau", "shortname": ":flag_tk:", "category": "flags", @@ -11969,7 +13325,11 @@ ":tk:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇹🇰" }, "flag_tl": { "unicode": "1F1F9-1F1F1", @@ -11984,8 +13344,10 @@ "keywords": [ "country", "nation", - "tl" - ] + "tl", + "flag" + ], + "moji": "🇹🇱" }, "flag_tm": { "unicode": "1F1F9-1F1F2", @@ -12000,8 +13362,10 @@ "keywords": [ "country", "nation", - "tm" - ] + "tm", + "flag" + ], + "moji": "🇹🇲" }, "flag_tn": { "unicode": "1F1F9-1F1F3", @@ -12017,8 +13381,10 @@ "country", "nation", "tunis", - "tn" - ] + "tn", + "flag" + ], + "moji": "🇹🇳" }, "flag_to": { "unicode": "1F1F9-1F1F4", @@ -12033,8 +13399,10 @@ "keywords": [ "country", "nation", - "to" - ] + "to", + "flag" + ], + "moji": "🇹🇴" }, "flag_tr": { "unicode": "1F1F9-1F1F7", @@ -12049,8 +13417,10 @@ "keywords": [ "country", "nation", - "turkiye" - ] + "turkiye", + "flag" + ], + "moji": "🇹🇷" }, "flag_tt": { "unicode": "1F1F9-1F1F9", @@ -12065,8 +13435,10 @@ "keywords": [ "country", "nation", - "tt" - ] + "tt", + "flag" + ], + "moji": "🇹🇹" }, "flag_tv": { "unicode": "1F1F9-1F1FB", @@ -12081,8 +13453,10 @@ "keywords": [ "country", "nation", - "tv" - ] + "tv", + "flag" + ], + "moji": "🇹🇻" }, "flag_tw": { "unicode": "1F1F9-1F1FC", @@ -12098,8 +13472,10 @@ "country", "nation", "taiwan", - "tw" - ] + "tw", + "flag" + ], + "moji": "🇹🇼" }, "flag_tz": { "unicode": "1F1F9-1F1FF", @@ -12114,8 +13490,10 @@ "keywords": [ "country", "nation", - "tz" - ] + "tz", + "flag" + ], + "moji": "🇹🇿" }, "flag_ua": { "unicode": "1F1FA-1F1E6", @@ -12131,8 +13509,10 @@ "country", "nation", "ukrayina", - "ua" - ] + "ua", + "flag" + ], + "moji": "🇺🇦" }, "flag_ug": { "unicode": "1F1FA-1F1EC", @@ -12147,12 +13527,14 @@ "keywords": [ "country", "nation", - "ug" - ] + "ug", + "flag" + ], + "moji": "🇺🇬" }, "flag_um": { "unicode": "1F1FA-1F1F2", - "unicode_alternates": "", + "unicode_alternates": [], "name": "united states minor outlying islands", "shortname": ":flag_um:", "category": "flags", @@ -12160,7 +13542,11 @@ ":um:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇺🇲" }, "flag_us": { "unicode": "1F1FA-1F1F8", @@ -12180,8 +13566,10 @@ "united states of america", "america", "old glory", - "us" - ] + "us", + "flag" + ], + "moji": "🇺🇸" }, "flag_uy": { "unicode": "1F1FA-1F1FE", @@ -12196,8 +13584,10 @@ "keywords": [ "country", "nation", - "uy" - ] + "uy", + "flag" + ], + "moji": "🇺🇾" }, "flag_uz": { "unicode": "1F1FA-1F1FF", @@ -12213,8 +13603,10 @@ "country", "nation", "uzbekiston respublikasi", - "uz" - ] + "uz", + "flag" + ], + "moji": "🇺🇿" }, "flag_va": { "unicode": "1F1FB-1F1E6", @@ -12229,8 +13621,10 @@ "keywords": [ "country", "nation", - "va" - ] + "va", + "flag" + ], + "moji": "🇻🇦" }, "flag_vc": { "unicode": "1F1FB-1F1E8", @@ -12245,8 +13639,10 @@ "keywords": [ "country", "nation", - "vc" - ] + "vc", + "flag" + ], + "moji": "🇻🇨" }, "flag_ve": { "unicode": "1F1FB-1F1EA", @@ -12261,12 +13657,14 @@ "keywords": [ "country", "nation", - "ve" - ] + "ve", + "flag" + ], + "moji": "🇻🇪" }, "flag_vg": { "unicode": "1F1FB-1F1EC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "british virgin islands", "shortname": ":flag_vg:", "category": "flags", @@ -12274,7 +13672,11 @@ ":vg:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇻🇬" }, "flag_vi": { "unicode": "1F1FB-1F1EE", @@ -12289,8 +13691,10 @@ "keywords": [ "country", "nation", - "vi" - ] + "vi", + "flag" + ], + "moji": "🇻🇮" }, "flag_vn": { "unicode": "1F1FB-1F1F3", @@ -12306,8 +13710,10 @@ "country", "nation", "viet nam", - "vn" - ] + "vn", + "flag" + ], + "moji": "🇻🇳" }, "flag_vu": { "unicode": "1F1FB-1F1FA", @@ -12322,8 +13728,10 @@ "keywords": [ "country", "nation", - "vu" - ] + "vu", + "flag" + ], + "moji": "🇻🇺" }, "flag_wf": { "unicode": "1F1FC-1F1EB", @@ -12338,23 +13746,27 @@ "keywords": [ "country", "nation", - "wf" - ] + "wf", + "flag" + ], + "moji": "🇼🇫" }, "flag_white": { "unicode": "1F3F3", "unicode_alternates": [], "name": "waving white flag", "shortname": ":flag_white:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":waving_white_flag:" ], "aliases_ascii": [], "keywords": [ "symbol", - "signal" - ] + "signal", + "object" + ], + "moji": "🏳" }, "flag_ws": { "unicode": "1F1FC-1F1F8", @@ -12370,8 +13782,10 @@ "country", "nation", "american samoa", - "ws" - ] + "ws", + "flag" + ], + "moji": "🇼🇸" }, "flag_xk": { "unicode": "1F1FD-1F1F0", @@ -12386,8 +13800,10 @@ "keywords": [ "country", "nation", - "xk" - ] + "xk", + "flag" + ], + "moji": "🇽🇰" }, "flag_ye": { "unicode": "1F1FE-1F1EA", @@ -12403,12 +13819,14 @@ "country", "nation", "al yaman", - "ye" - ] + "ye", + "flag" + ], + "moji": "🇾🇪" }, "flag_yt": { "unicode": "1F1FE-1F1F9", - "unicode_alternates": "", + "unicode_alternates": [], "name": "mayotte", "shortname": ":flag_yt:", "category": "flags", @@ -12416,7 +13834,11 @@ ":yt:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "country", + "flag" + ], + "moji": "🇾🇹" }, "flag_za": { "unicode": "1F1FF-1F1E6", @@ -12430,8 +13852,10 @@ "aliases_ascii": [], "keywords": [ "country", - "nation" - ] + "nation", + "flag" + ], + "moji": "🇿🇦" }, "flag_zm": { "unicode": "1F1FF-1F1F2", @@ -12446,8 +13870,10 @@ "keywords": [ "country", "nation", - "zm" - ] + "zm", + "flag" + ], + "moji": "🇿🇲" }, "flag_zw": { "unicode": "1F1FF-1F1FC", @@ -12462,8 +13888,10 @@ "keywords": [ "country", "nation", - "zw" - ] + "zw", + "flag" + ], + "moji": "🇿🇼" }, "flags": { "unicode": "1F38F", @@ -12484,11 +13912,11 @@ "boys", "celebration", "happiness", - "carp", "streamers", - "japanese", "holiday", - "flags" + "flags", + "object", + "japan" ], "moji": "🎏" }, @@ -12501,56 +13929,25 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "dark" + "dark", + "electronics", + "object" ], "moji": "🔦" }, "fleur-de-lis": { "unicode": "269C", - "unicode_alternates": "", + "unicode_alternates": [], "name": "fleur-de-lis", "shortname": ":fleur-de-lis:", "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "symbol" - ] - }, - "flip_phone": { - "unicode": "1F581", - "unicode_alternates": [], - "name": "clamshell mobile phone", - "shortname": ":flip_phone:", - "category": "objects_symbols", - "aliases": [ - ":clamshell_mobile_phone:" - ], - "aliases_ascii": [], - "keywords": [ - "cellphone" - ] - }, - "floppy_black": { - "unicode": "1F5AA", - "unicode_alternates": [], - "name": "black hard shell floppy disk", - "shortname": ":floppy_black:", - "category": "objects_symbols", - "aliases": [ - ":black_hard_shell_floppy_disk:" + "symbol", + "object" ], - "aliases_ascii": [], - "keywords": [ - "oldschool", - "save", - "technology", - "storage", - "information", - "computer", - "drive", - "megabyte" - ] + "moji": "⚜" }, "floppy_disk": { "unicode": "1F4BE", @@ -12570,37 +13967,18 @@ "information", "computer", "drive", - "megabyte" - ], - "moji": "💾" - }, - "floppy_white": { - "unicode": "1F5AB", - "unicode_alternates": [], - "name": "white hard shell floppy disk", - "shortname": ":floppy_white:", - "category": "objects_symbols", - "aliases": [ - ":white_hard_shell_floppy_disk:" - ], - "aliases_ascii": [], - "keywords": [ - "oldschool", - "save", - "technology", - "storage", - "information", - "computer", - "drive", - "megabyte" - ] + "megabyte", + "electronics", + "office" + ], + "moji": "💾" }, "flower_playing_cards": { "unicode": "1F3B4", "unicode_alternates": [], "name": "flower playing cards", "shortname": ":flower_playing_cards:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -12610,7 +13988,9 @@ "game", "august", "moon", - "special" + "special", + "object", + "symbol" ], "moji": "🎴" }, @@ -12619,7 +13999,7 @@ "unicode_alternates": [], "name": "flushed face", "shortname": ":flushed:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":$", @@ -12630,11 +14010,13 @@ "face", "flattered", "flush", - "blush", "red", "pink", "cheeks", - "shy" + "shy", + "smiley", + "emotion", + "omg" ], "moji": "😳" }, @@ -12650,15 +14032,18 @@ "weather", "damp", "cloud", - "hazy" - ] + "hazy", + "sky", + "cold" + ], + "moji": "🌫" }, "foggy": { "unicode": "1F301", "unicode_alternates": [], "name": "foggy", "shortname": ":foggy:", - "category": "nature", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -12667,43 +14052,21 @@ "bridge", "weather", "fog", - "foggy" + "foggy", + "places", + "building", + "sky", + "travel", + "vacation" ], "moji": "🌁" }, - "folder": { - "unicode": "1F5C0", - "unicode_alternates": [], - "name": "folder", - "shortname": ":folder:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "documents" - ] - }, - "folder_open": { - "unicode": "1F5C1", - "unicode_alternates": [], - "name": "open folder", - "shortname": ":folder_open:", - "category": "objects_symbols", - "aliases": [ - ":open_folder:" - ], - "aliases_ascii": [], - "keywords": [ - "documents", - "load" - ] - }, "football": { "unicode": "1F3C8", "unicode_alternates": [], "name": "american football", "shortname": ":football:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -12714,7 +14077,8 @@ "ball", "sport", "america", - "american" + "american", + "game" ], "moji": "🏈" }, @@ -12723,7 +14087,7 @@ "unicode_alternates": [], "name": "footprints", "shortname": ":footprints:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -12736,7 +14100,7 @@ "unicode_alternates": [], "name": "fork and knife", "shortname": ":fork_and_knife:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -12747,7 +14111,9 @@ "restaurant", "meal", "food", - "eat" + "eat", + "object", + "weapon" ], "moji": "🍴" }, @@ -12756,7 +14122,7 @@ "unicode_alternates": [], "name": "fork and knife with plate", "shortname": ":fork_knife_plate:", - "category": "travel_places", + "category": "food", "aliases": [ ":fork_and_knife_with_plate:" ], @@ -12768,8 +14134,10 @@ "lunch", "dinner", "utensils", - "setting" - ] + "setting", + "object" + ], + "moji": "🍽" }, "fountain": { "unicode": "26F2", @@ -12778,11 +14146,13 @@ ], "name": "fountain", "shortname": ":fountain:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ - "photo" + "photo", + "travel", + "vacation" ], "moji": "⛲" }, @@ -12792,15 +14162,18 @@ "unicode_alternates": [ "0034-FE0F-20E3" ], - "name": "digit four", + "name": "keycap digit four", "shortname": ":four:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "4", "blue-square", - "numbers" + "numbers", + "number", + "math", + "symbol" ] }, "four_leaf_clover": { @@ -12823,74 +14196,75 @@ "irish", "saint", "patrick", - "green" + "green", + "sol" ], "moji": "🍀" }, - "frame_photo": { - "unicode": "1F5BC", + "fox": { + "unicode": "1F98A", "unicode_alternates": [], - "name": "frame with picture", - "shortname": ":frame_photo:", - "category": "objects_symbols", + "name": "fox face", + "shortname": ":fox:", + "category": "nature", "aliases": [ - ":frame_with_picture:" + ":fox_face:" ], "aliases_ascii": [], - "keywords": [ - "photo" - ] + "keywords": [], + "moji": "🦊" }, - "frame_tiles": { - "unicode": "1F5BD", + "frame_photo": { + "unicode": "1F5BC", "unicode_alternates": [], - "name": "frame with tiles", - "shortname": ":frame_tiles:", - "category": "objects_symbols", + "name": "frame with picture", + "shortname": ":frame_photo:", + "category": "objects", "aliases": [ - ":frame_with_tiles:" + ":frame_with_picture:" ], "aliases_ascii": [], "keywords": [ "photo", - "painting" - ] - }, - "frame_x": { - "unicode": "1F5BE", - "unicode_alternates": [], - "name": "frame with an x", - "shortname": ":frame_x:", - "category": "objects_symbols", - "aliases": [ - ":frame_with_an_x:" + "travel", + "vacation" ], - "aliases_ascii": [], - "keywords": [ - "photo", - "painting" - ] + "moji": "🖼" }, "free": { "unicode": "1F193", "unicode_alternates": [], "name": "squared free", "shortname": ":free:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "words" + "words", + "symbol" ], "moji": "🆓" }, + "french_bread": { + "unicode": "1F956", + "unicode_alternates": [], + "name": "baguette bread", + "shortname": ":french_bread:", + "category": "food", + "aliases": [ + ":baguette_bread:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥖" + }, "fried_shrimp": { "unicode": "1F364", "unicode_alternates": [], "name": "fried shrimp", "shortname": ":fried_shrimp:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -12909,7 +14283,7 @@ "unicode_alternates": [], "name": "french fries", "shortname": ":fries:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -12920,7 +14294,8 @@ "potato", "fry", "russet", - "idaho" + "idaho", + "america" ], "moji": "🍟" }, @@ -12934,7 +14309,8 @@ "aliases_ascii": [], "keywords": [ "animal", - "nature" + "nature", + "wildlife" ], "moji": "🐸" }, @@ -12943,7 +14319,7 @@ "unicode_alternates": [], "name": "frowning face with open mouth", "shortname": ":frowning:", - "category": "emoticons", + "category": "people", "aliases": [ ":anguished:" ], @@ -12955,13 +14331,16 @@ "sad", "pout", "sulk", - "glower" + "glower", + "smiley", + "surprised", + "emotion" ], "moji": "😦" }, "frowning2": { "unicode": "2639", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white frowning face", "shortname": ":frowning2:", "category": "people", @@ -12971,8 +14350,12 @@ "aliases_ascii": [], "keywords": [ "frown", - "person" - ] + "person", + "sad", + "smiley", + "emotion" + ], + "moji": "☹" }, "fuelpump": { "unicode": "26FD", @@ -12981,12 +14364,14 @@ ], "name": "fuel pump", "shortname": ":fuelpump:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "gas station", - "petroleum" + "petroleum", + "object", + "gas pump" ], "moji": "⛽" }, @@ -13010,7 +14395,8 @@ "monster", "spooky", "werewolves", - "twilight" + "twilight", + "space" ], "moji": "🌕" }, @@ -13029,12 +14415,13 @@ "anthropomorphic", "face", "sky", - "night", "cheese", "phase", "spooky", "werewolves", - "monsters" + "monsters", + "space", + "goodnight" ], "moji": "🌝" }, @@ -13043,23 +14430,24 @@ "unicode_alternates": [], "name": "game die", "shortname": ":game_die:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ "dice", "game", "die", - "dice", "craps", "gamble", - "play" + "play", + "object", + "boys night" ], "moji": "🎲" }, "gear": { "unicode": "2699", - "unicode_alternates": "", + "unicode_alternates": [], "name": "gear", "shortname": ":gear:", "category": "objects", @@ -13068,19 +14456,22 @@ "keywords": [ "object", "tool" - ] + ], + "moji": "⚙" }, "gem": { "unicode": "1F48E", "unicode_alternates": [], "name": "gem stone", "shortname": ":gem:", - "category": "emoticons", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "blue", - "ruby" + "ruby", + "object", + "gem" ], "moji": "💎" }, @@ -13091,7 +14482,7 @@ ], "name": "gemini", "shortname": ":gemini:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -13103,9 +14494,8 @@ "stars", "zodiac", "sign", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♊" }, @@ -13114,11 +14504,13 @@ "unicode_alternates": [], "name": "ghost", "shortname": ":ghost:", - "category": "objects", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ - "halloween" + "halloween", + "holidays", + "monster" ], "moji": "👻" }, @@ -13136,11 +14528,12 @@ "present", "xmas", "gift", - "present", "wrap", "package", - "birthday", - "wedding" + "wedding", + "object", + "holidays", + "parties" ], "moji": "🎁" }, @@ -13149,12 +14542,14 @@ "unicode_alternates": [], "name": "heart with ribbon", "shortname": ":gift_heart:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "love", - "valentines" + "valentines", + "symbol", + "condolence" ], "moji": "💝" }, @@ -13163,18 +14558,22 @@ "unicode_alternates": [], "name": "girl", "shortname": ":girl:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "female", - "woman" + "woman", + "people", + "women", + "baby", + "diversity" ], "moji": "👧" }, "girl_tone1": { "unicode": "1F467-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "girl tone 1", "shortname": ":girl_tone1:", "category": "people", @@ -13184,11 +14583,12 @@ "female", "kid", "child" - ] + ], + "moji": "👧🏻" }, "girl_tone2": { "unicode": "1F467-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "girl tone 2", "shortname": ":girl_tone2:", "category": "people", @@ -13198,11 +14598,12 @@ "female", "kid", "child" - ] + ], + "moji": "👧🏼" }, "girl_tone3": { "unicode": "1F467-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "girl tone 3", "shortname": ":girl_tone3:", "category": "people", @@ -13212,11 +14613,12 @@ "female", "kid", "child" - ] + ], + "moji": "👧🏽" }, "girl_tone4": { "unicode": "1F467-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "girl tone 4", "shortname": ":girl_tone4:", "category": "people", @@ -13226,11 +14628,12 @@ "female", "kid", "child" - ] + ], + "moji": "👧🏾" }, "girl_tone5": { "unicode": "1F467-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "girl tone 5", "shortname": ":girl_tone5:", "category": "people", @@ -13240,42 +14643,43 @@ "female", "kid", "child" - ] - }, - "girls_symbol": { - "unicode": "1F6CA", - "unicode_alternates": [], - "name": "girls symbol", - "shortname": ":girls_symbol:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "female", - "child" - ] + ], + "moji": "👧🏿" }, "globe_with_meridians": { "unicode": "1F310", "unicode_alternates": [], "name": "globe with meridians", "shortname": ":globe_with_meridians:", - "category": "nature", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "earth", "international", "world", - "earth", "meridian", "globe", "space", "planet", - "home" + "home", + "symbol" ], "moji": "🌐" }, + "goal": { + "unicode": "1F945", + "unicode_alternates": [], + "name": "goal net", + "shortname": ":goal:", + "category": "activity", + "aliases": [ + ":goal_net:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥅" + }, "goat": { "unicode": "1F410", "unicode_alternates": [], @@ -13302,12 +14706,17 @@ ], "name": "flag in hole", "shortname": ":golf:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ "business", - "sports" + "sports", + "game", + "ball", + "vacation", + "sport", + "golf" ], "moji": "⛳" }, @@ -13324,15 +14733,32 @@ "par", "birdie", "eagle", - "mulligan" - ] + "mulligan", + "men", + "game", + "ball", + "vacation", + "golf" + ], + "moji": "🏌" + }, + "gorilla": { + "unicode": "1F98D", + "unicode_alternates": [], + "name": "gorilla", + "shortname": ":gorilla:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦍" }, "grapes": { "unicode": "1F347", "unicode_alternates": [], "name": "grapes", "shortname": ":grapes:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -13341,7 +14767,6 @@ "grapes", "wine", "vinegar", - "fruit", "cluster", "vine" ], @@ -13352,19 +14777,19 @@ "unicode_alternates": [], "name": "green apple", "shortname": ":green_apple:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ "fruit", "nature", "apple", - "fruit", "green", "pie", "granny", "smith", - "core" + "core", + "food" ], "moji": "🍏" }, @@ -13379,7 +14804,10 @@ "keywords": [ "knowledge", "library", - "read" + "read", + "object", + "office", + "book" ], "moji": "📗" }, @@ -13388,7 +14816,7 @@ "unicode_alternates": [], "name": "green heart", "shortname": ":green_heart:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -13398,14 +14826,14 @@ "valentines", "green", "heart", - "love", "nature", "rebirth", "reborn", "jealous", "clingy", "envious", - "possessive" + "possessive", + "symbol" ], "moji": "💚" }, @@ -13414,11 +14842,13 @@ "unicode_alternates": [], "name": "white exclamation mark ornament", "shortname": ":grey_exclamation:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "surprise" + "surprise", + "symbol", + "punctuation" ], "moji": "❕" }, @@ -13427,11 +14857,13 @@ "unicode_alternates": [], "name": "white question mark ornament", "shortname": ":grey_question:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "doubts" + "doubts", + "symbol", + "punctuation" ], "moji": "❔" }, @@ -13440,16 +14872,19 @@ "unicode_alternates": [], "name": "grimacing face", "shortname": ":grimacing:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "face", "grimace", "teeth", - "grimace", "disapprove", - "pain" + "pain", + "silly", + "smiley", + "emotion", + "selfie" ], "moji": "😬" }, @@ -13458,7 +14893,7 @@ "unicode_alternates": [], "name": "grinning face with smiling eyes", "shortname": ":grin:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -13469,8 +14904,11 @@ "grin", "grinning", "smiling", - "smile", - "smiley" + "smiley", + "silly", + "emotion", + "good", + "selfie" ], "moji": "😁" }, @@ -13479,7 +14917,7 @@ "unicode_alternates": [], "name": "grinning face", "shortname": ":grinning:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -13490,17 +14928,17 @@ "grin", "grinning", "smiling", - "smile", - "smiley" + "smiley", + "emotion" ], - "moji": "🕧" + "moji": "😀" }, "guardsman": { "unicode": "1F482", "unicode_alternates": [], "name": "guardsman", "shortname": ":guardsman:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -13513,16 +14951,19 @@ "guard", "bearskin", "hat", - "british", "queen", "ceremonial", - "military" + "military", + "people", + "men", + "diversity", + "job" ], "moji": "💂" }, "guardsman_tone1": { "unicode": "1F482-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "guardsman tone 1", "shortname": ":guardsman_tone1:", "category": "people", @@ -13537,15 +14978,15 @@ "guard", "bearskin", "hat", - "british", "queen", "ceremonial", "military" - ] + ], + "moji": "💂🏻" }, "guardsman_tone2": { "unicode": "1F482-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "guardsman tone 2", "shortname": ":guardsman_tone2:", "category": "people", @@ -13560,15 +15001,15 @@ "guard", "bearskin", "hat", - "british", "queen", "ceremonial", "military" - ] + ], + "moji": "💂🏼" }, "guardsman_tone3": { "unicode": "1F482-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "guardsman tone 3", "shortname": ":guardsman_tone3:", "category": "people", @@ -13583,15 +15024,15 @@ "guard", "bearskin", "hat", - "british", "queen", "ceremonial", "military" - ] + ], + "moji": "💂🏽" }, "guardsman_tone4": { "unicode": "1F482-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "guardsman tone 4", "shortname": ":guardsman_tone4:", "category": "people", @@ -13606,15 +15047,15 @@ "guard", "bearskin", "hat", - "british", "queen", "ceremonial", "military" - ] + ], + "moji": "💂🏾" }, "guardsman_tone5": { "unicode": "1F482-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "guardsman tone 5", "shortname": ":guardsman_tone5:", "category": "people", @@ -13629,18 +15070,18 @@ "guard", "bearskin", "hat", - "british", "queen", "ceremonial", "military" - ] + ], + "moji": "💂🏿" }, "guitar": { "unicode": "1F3B8", "unicode_alternates": [], "name": "guitar", "shortname": ":guitar:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -13648,12 +15089,11 @@ "music", "guitar", "string", - "music", - "instrument", "jam", "rock", "acoustic", - "electric" + "electric", + "instruments" ], "moji": "🎸" }, @@ -13667,7 +15107,11 @@ "aliases_ascii": [], "keywords": [ "violence", - "weapon" + "weapon", + "object", + "dead", + "gun", + "sarcastic" ], "moji": "🔫" }, @@ -13676,19 +15120,22 @@ "unicode_alternates": [], "name": "haircut", "shortname": ":haircut:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "female", "girl", - "woman" + "woman", + "people", + "women", + "diversity" ], "moji": "💇" }, "haircut_tone1": { "unicode": "1F487-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "haircut tone 1", "shortname": ":haircut_tone1:", "category": "people", @@ -13698,11 +15145,12 @@ "female", "girl", "woman" - ] + ], + "moji": "💇🏻" }, "haircut_tone2": { "unicode": "1F487-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "haircut tone 2", "shortname": ":haircut_tone2:", "category": "people", @@ -13712,11 +15160,12 @@ "female", "girl", "woman" - ] + ], + "moji": "💇🏼" }, "haircut_tone3": { "unicode": "1F487-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "haircut tone 3", "shortname": ":haircut_tone3:", "category": "people", @@ -13726,11 +15175,12 @@ "female", "girl", "woman" - ] + ], + "moji": "💇🏽" }, "haircut_tone4": { "unicode": "1F487-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "haircut tone 4", "shortname": ":haircut_tone4:", "category": "people", @@ -13740,11 +15190,12 @@ "female", "girl", "woman" - ] + ], + "moji": "💇🏾" }, "haircut_tone5": { "unicode": "1F487-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "haircut tone 5", "shortname": ":haircut_tone5:", "category": "people", @@ -13754,14 +15205,15 @@ "female", "girl", "woman" - ] + ], + "moji": "💇🏿" }, "hamburger": { "unicode": "1F354", "unicode_alternates": [], "name": "hamburger", "shortname": ":hamburger:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -13769,9 +15221,9 @@ "meat", "hamburger", "burger", - "meat", "cow", - "beef" + "beef", + "america" ], "moji": "🍔" }, @@ -13789,13 +15241,16 @@ "law", "ruling", "tools", - "verdict" + "verdict", + "object", + "tool", + "weapon" ], "moji": "🔨" }, "hammer_pick": { "unicode": "2692", - "unicode_alternates": "", + "unicode_alternates": [], "name": "hammer and pick", "shortname": ":hammer_pick:", "category": "objects", @@ -13805,8 +15260,10 @@ "aliases_ascii": [], "keywords": [ "object", - "tool" - ] + "tool", + "weapon" + ], + "moji": "⚒" }, "hamster": { "unicode": "1F439", @@ -13836,29 +15293,16 @@ "hi", "five", "stop", - "halt" - ] - }, - "hand_splayed_reverse": { - "unicode": "1F591", - "unicode_alternates": [], - "name": "reversed raised hand with fingers splayed", - "shortname": ":hand_splayed_reverse:", - "category": "people", - "aliases": [ - ":reversed_raised_hand_with_fingers_splayed:" + "halt", + "body", + "hands", + "diversity" ], - "aliases_ascii": [], - "keywords": [ - "hi", - "five", - "stop", - "halt" - ] + "moji": "🖐" }, "hand_splayed_tone1": { "unicode": "1F590-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with fingers splayed tone 1", "shortname": ":hand_splayed_tone1:", "category": "people", @@ -13871,11 +15315,12 @@ "five", "stop", "halt" - ] + ], + "moji": "🖐🏻" }, "hand_splayed_tone2": { "unicode": "1F590-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with fingers splayed tone 2", "shortname": ":hand_splayed_tone2:", "category": "people", @@ -13888,11 +15333,12 @@ "five", "stop", "halt" - ] + ], + "moji": "🖐🏼" }, "hand_splayed_tone3": { "unicode": "1F590-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with fingers splayed tone 3", "shortname": ":hand_splayed_tone3:", "category": "people", @@ -13905,11 +15351,12 @@ "five", "stop", "halt" - ] + ], + "moji": "🖐🏽" }, "hand_splayed_tone4": { "unicode": "1F590-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with fingers splayed tone 4", "shortname": ":hand_splayed_tone4:", "category": "people", @@ -13922,11 +15369,12 @@ "five", "stop", "halt" - ] + ], + "moji": "🖐🏾" }, "hand_splayed_tone5": { "unicode": "1F590-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with fingers splayed tone 5", "shortname": ":hand_splayed_tone5:", "category": "people", @@ -13939,57 +15387,170 @@ "five", "stop", "halt" - ] - }, - "hand_victory": { - "unicode": "1F594", - "unicode_alternates": [], - "name": "reversed victory hand", - "shortname": ":hand_victory:", - "category": "people", - "aliases": [ - ":reversed_victory_hand:" ], - "aliases_ascii": [], - "keywords": [ - "fu" - ] + "moji": "🖐🏿" }, "handbag": { "unicode": "1F45C", "unicode_alternates": [], "name": "handbag", "shortname": ":handbag:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "accessories", "accessory", "bag", - "fashion" + "fashion", + "women", + "vacation" ], "moji": "👜" }, - "hard_disk": { - "unicode": "1F5B4", + "handball": { + "unicode": "1F93E", "unicode_alternates": [], - "name": "hard disk", - "shortname": ":hard_disk:", - "category": "objects_symbols", + "name": "handball", + "shortname": ":handball:", + "category": "activity", "aliases": [], "aliases_ascii": [], - "keywords": [ - "save", - "technology", - "storage", - "information", - "computer", - "drive", - "megabyte", - "gigabyte", - "hd" - ] + "keywords": [], + "moji": "🤾" + }, + "handball_tone1": { + "unicode": "1F93E-1F3FB", + "unicode_alternates": [], + "name": "handball tone 1", + "shortname": ":handball_tone1:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤾🏻" + }, + "handball_tone2": { + "unicode": "1F93E-1F3FC", + "unicode_alternates": [], + "name": "handball tone 2", + "shortname": ":handball_tone2:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤾🏼" + }, + "handball_tone3": { + "unicode": "1F93E-1F3FD", + "unicode_alternates": [], + "name": "handball tone 3", + "shortname": ":handball_tone3:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤾🏽" + }, + "handball_tone4": { + "unicode": "1F93E-1F3FE", + "unicode_alternates": [], + "name": "handball tone 4", + "shortname": ":handball_tone4:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤾🏾" + }, + "handball_tone5": { + "unicode": "1F93E-1F3FF", + "unicode_alternates": [], + "name": "handball tone 5", + "shortname": ":handball_tone5:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤾🏿" + }, + "handshake": { + "unicode": "1F91D", + "unicode_alternates": [], + "name": "handshake", + "shortname": ":handshake:", + "category": "people", + "aliases": [ + ":shaking_hands:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤝" + }, + "handshake_tone1": { + "unicode": "1F91D-1F3FB", + "unicode_alternates": [], + "name": "handshake tone 1", + "shortname": ":handshake_tone1:", + "category": "people", + "aliases": [ + ":shaking_hands_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤝🏻" + }, + "handshake_tone2": { + "unicode": "1F91D-1F3FC", + "unicode_alternates": [], + "name": "handshake tone 2", + "shortname": ":handshake_tone2:", + "category": "people", + "aliases": [ + ":shaking_hands_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤝🏼" + }, + "handshake_tone3": { + "unicode": "1F91D-1F3FD", + "unicode_alternates": [], + "name": "handshake tone 3", + "shortname": ":handshake_tone3:", + "category": "people", + "aliases": [ + ":shaking_hands_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤝🏽" + }, + "handshake_tone4": { + "unicode": "1F91D-1F3FE", + "unicode_alternates": [], + "name": "handshake tone 4", + "shortname": ":handshake_tone4:", + "category": "people", + "aliases": [ + ":shaking_hands_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤝🏾" + }, + "handshake_tone5": { + "unicode": "1F91D-1F3FF", + "unicode_alternates": [], + "name": "handshake tone 5", + "shortname": ":handshake_tone5:", + "category": "people", + "aliases": [ + ":shaking_hands_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤝🏿" }, "hash": { "moji": "#⃣", @@ -13999,11 +15560,12 @@ ], "name": "number sign", "shortname": ":hash:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "symbol" + "symbol", + "number" ] }, "hatched_chick": { @@ -14018,12 +15580,11 @@ "baby", "chicken", "chick", - "baby", "bird", - "chicken", "young", "woman", - "cute" + "cute", + "animal" ], "moji": "🐥" }, @@ -14040,19 +15601,18 @@ "chicken", "egg", "chick", - "egg", "baby", "bird", - "chicken", "young", "woman", - "cute" + "cute", + "animal" ], "moji": "🐣" }, "head_bandage": { "unicode": "1F915", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with head-bandage", "shortname": ":head_bandage:", "category": "people", @@ -14060,14 +15620,20 @@ ":face_with_head_bandage:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "smiley", + "health", + "sick", + "emotion" + ], + "moji": "🤕" }, "headphones": { "unicode": "1F3A7", "unicode_alternates": [], "name": "headphone", "shortname": ":headphones:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14076,12 +15642,12 @@ "score", "headphone", "sound", - "music", "ears", "beats", "buds", "audio", - "listen" + "listen", + "instruments" ], "moji": "🎧" }, @@ -14090,13 +15656,12 @@ "unicode_alternates": [], "name": "hear-no-evil monkey", "shortname": ":hear_no_evil:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ "animal", "monkey", - "monkey", "ears", "hear", "sound", @@ -14112,7 +15677,7 @@ ], "name": "heavy black heart", "shortname": ":heart:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [ "<3" @@ -14124,7 +15689,6 @@ "pink", "black", "heart", - "love", "passion", "romance", "intense", @@ -14132,7 +15696,9 @@ "death", "evil", "cold", - "valentines" + "valentines", + "symbol", + "parties" ] }, "heart_decoration": { @@ -14140,19 +15706,20 @@ "unicode_alternates": [], "name": "heart decoration", "shortname": ":heart_decoration:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "like", "love", - "purple-square" + "purple-square", + "symbol" ], "moji": "💟" }, "heart_exclamation": { "unicode": "2763", - "unicode_alternates": "", + "unicode_alternates": [], "name": "heavy heart exclamation mark ornament", "shortname": ":heart_exclamation:", "category": "symbols", @@ -14163,15 +15730,17 @@ "keywords": [ "emotion", "punctuation", - "symbol" - ] + "symbol", + "love" + ], + "moji": "❣" }, "heart_eyes": { "unicode": "1F60D", "unicode_alternates": [], "name": "smiling face with heart-shaped eyes", "shortname": ":heart_eyes:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14185,10 +15754,15 @@ "smiling", "heart", "lovestruck", - "love", "flirt", "smile", - "heart-shaped" + "heart-shaped", + "happy", + "smiley", + "sex", + "heart eyes", + "emotion", + "beautiful" ], "moji": "😍" }, @@ -14197,7 +15771,7 @@ "unicode_alternates": [], "name": "smiling cat face with heart-shaped eyes", "shortname": ":heart_eyes_cat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14208,41 +15782,27 @@ "love", "valentines", "lovestruck", - "love", - "heart" + "heart", + "heart eyes", + "cat", + "beautiful" ], "moji": "😻" }, - "heart_tip": { - "unicode": "1F394", - "unicode_alternates": [], - "name": "heart with tip on the left", - "shortname": ":heart_tip:", - "category": "celebration", - "aliases": [ - ":heart_with_tip_on_the_left:" - ], - "aliases_ascii": [], - "keywords": [ - "affection", - "like", - "love", - "valentines" - ] - }, "heartbeat": { "unicode": "1F493", "unicode_alternates": [], "name": "beating heart", "shortname": ":heartbeat:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "affection", "like", "love", - "valentines" + "valentines", + "symbol" ], "moji": "💓" }, @@ -14251,14 +15811,15 @@ "unicode_alternates": [], "name": "growing heart", "shortname": ":heartpulse:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "affection", "like", "love", - "valentines" + "valentines", + "symbol" ], "moji": "💗" }, @@ -14269,12 +15830,15 @@ ], "name": "black heart suit", "shortname": ":hearts:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "cards", - "poker" + "poker", + "love", + "symbol", + "game" ], "moji": "♥" }, @@ -14285,12 +15849,13 @@ ], "name": "heavy check mark", "shortname": ":heavy_check_mark:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "nike", - "ok" + "ok", + "symbol" ], "moji": "✔" }, @@ -14299,13 +15864,14 @@ "unicode_alternates": [], "name": "heavy division sign", "shortname": ":heavy_division_sign:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "calculation", "divide", - "math" + "math", + "symbol" ], "moji": "➗" }, @@ -14314,7 +15880,7 @@ "unicode_alternates": [], "name": "heavy dollar sign", "shortname": ":heavy_dollar_sign:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14322,12 +15888,12 @@ "money", "payment", "dollar", - "currency", - "money", "cash", "sale", "purchase", - "value" + "value", + "math", + "symbol" ], "moji": "💲" }, @@ -14336,12 +15902,13 @@ "unicode_alternates": [], "name": "heavy minus sign", "shortname": ":heavy_minus_sign:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "calculation", - "math" + "math", + "symbol" ], "moji": "➖" }, @@ -14352,12 +15919,13 @@ ], "name": "heavy multiplication x", "shortname": ":heavy_multiplication_x:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "calculation", - "math" + "math", + "symbol" ], "moji": "✖" }, @@ -14366,12 +15934,13 @@ "unicode_alternates": [], "name": "heavy plus sign", "shortname": ":heavy_plus_sign:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "calculation", - "math" + "math", + "symbol" ], "moji": "➕" }, @@ -14380,7 +15949,7 @@ "unicode_alternates": [], "name": "helicopter", "shortname": ":helicopter:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14389,13 +15958,16 @@ "helicopter", "helo", "gyro", - "gyrocopter" + "gyrocopter", + "plane", + "travel", + "fly" ], "moji": "🚁" }, "helmet_with_cross": { "unicode": "26D1", - "unicode_alternates": "", + "unicode_alternates": [], "name": "helmet with white cross", "shortname": ":helmet_with_cross:", "category": "people", @@ -14407,8 +15979,12 @@ "aid", "face", "hat", - "person" - ] + "person", + "object", + "accessories", + "job" + ], + "moji": "⛑" }, "herb": { "unicode": "1F33F", @@ -14427,9 +16003,10 @@ "weed", "herb", "spice", - "plant", "cook", - "cooking" + "cooking", + "nature", + "leaf" ], "moji": "🌿" }, @@ -14447,7 +16024,9 @@ "vegetable", "hibiscus", "flower", - "warm" + "warm", + "nature", + "tropical" ], "moji": "🌺" }, @@ -14456,13 +16035,14 @@ "unicode_alternates": [], "name": "high brightness symbol", "shortname": ":high_brightness:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "light", "summer", - "sun" + "sun", + "symbol" ], "moji": "🔆" }, @@ -14471,45 +16051,57 @@ "unicode_alternates": [], "name": "high-heeled shoe", "shortname": ":high_heel:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "fashion", "female", - "shoes" + "shoes", + "women", + "shoe", + "sexy", + "accessories", + "girls night" ], "moji": "👠" }, "hockey": { "unicode": "1F3D2", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ice hockey stick and puck", "shortname": ":hockey:", "category": "activity", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "game", + "sport", + "hockey" + ], + "moji": "🏒" }, "hole": { "unicode": "1F573", "unicode_alternates": [], "name": "hole", "shortname": ":hole:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "pit", - "well" - ] + "well", + "object" + ], + "moji": "🕳" }, "homes": { "unicode": "1F3D8", "unicode_alternates": [], "name": "house buildings", "shortname": ":homes:", - "category": "travel_places", + "category": "travel", "aliases": [ ":house_buildings:" ], @@ -14521,15 +16113,19 @@ "mansion", "bungalow", "ranch", - "craftsman" - ] + "craftsman", + "places", + "building", + "house" + ], + "moji": "🏘" }, "honey_pot": { "unicode": "1F36F", "unicode_alternates": [], "name": "honey pot", "shortname": ":honey_pot:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14537,9 +16133,10 @@ "sweet", "honey", "pot", - "bees", "pooh", - "bear" + "bear", + "food", + "vagina" ], "moji": "🍯" }, @@ -14553,7 +16150,8 @@ "aliases_ascii": [], "keywords": [ "animal", - "brown" + "brown", + "wildlife" ], "moji": "🐴" }, @@ -14562,7 +16160,7 @@ "unicode_alternates": [], "name": "horse racing", "shortname": ":horse_racing:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14573,13 +16171,16 @@ "race", "racing", "jockey", - "triple crown" + "triple crown", + "men", + "sport", + "horse racing" ], "moji": "🏇" }, "horse_racing_tone1": { "unicode": "1F3C7-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "horse racing tone 1", "shortname": ":horse_racing_tone1:", "category": "activity", @@ -14592,11 +16193,12 @@ "race", "jockey", "triple crown" - ] + ], + "moji": "🏇🏻" }, "horse_racing_tone2": { "unicode": "1F3C7-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "horse racing tone 2", "shortname": ":horse_racing_tone2:", "category": "activity", @@ -14609,11 +16211,12 @@ "race", "jockey", "triple crown" - ] + ], + "moji": "🏇🏼" }, "horse_racing_tone3": { "unicode": "1F3C7-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "horse racing tone 3", "shortname": ":horse_racing_tone3:", "category": "activity", @@ -14626,11 +16229,12 @@ "race", "jockey", "triple crown" - ] + ], + "moji": "🏇🏽" }, "horse_racing_tone4": { "unicode": "1F3C7-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "horse racing tone 4", "shortname": ":horse_racing_tone4:", "category": "activity", @@ -14643,11 +16247,12 @@ "race", "jockey", "triple crown" - ] + ], + "moji": "🏇🏾" }, "horse_racing_tone5": { "unicode": "1F3C7-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "horse racing tone 5", "shortname": ":horse_racing_tone5:", "category": "activity", @@ -14660,21 +16265,24 @@ "race", "jockey", "triple crown" - ] + ], + "moji": "🏇🏿" }, "hospital": { "unicode": "1F3E5", "unicode_alternates": [], "name": "hospital", "shortname": ":hospital:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "building", "doctor", "health", - "surgery" + "surgery", + "places", + "911" ], "moji": "🏥" }, @@ -14683,7 +16291,7 @@ "unicode_alternates": [], "name": "hot pepper", "shortname": ":hot_pepper:", - "category": "food_drink", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14693,27 +16301,33 @@ "chili", "cayenne", "habanero", - "jalapeno" - ] + "jalapeno", + "vegetables" + ], + "moji": "🌶" }, "hotdog": { "unicode": "1F32D", - "unicode_alternates": "", + "unicode_alternates": [], "name": "hot dog", "shortname": ":hotdog:", - "category": "foods", + "category": "food", "aliases": [ ":hot_dog:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "america", + "food" + ], + "moji": "🌭" }, "hotel": { "unicode": "1F3E8", "unicode_alternates": [], "name": "hotel", "shortname": ":hotel:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14724,7 +16338,9 @@ "hotel", "motel", "holiday inn", - "hospital" + "hospital", + "places", + "vacation" ], "moji": "🏨" }, @@ -14735,13 +16351,14 @@ ], "name": "hot springs", "shortname": ":hotsprings:", - "category": "places", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "bath", "relax", - "warm" + "warm", + "symbol" ], "moji": "♨" }, @@ -14758,7 +16375,8 @@ "keywords": [ "clock", "oldschool", - "time" + "time", + "object" ], "moji": "⌛" }, @@ -14773,7 +16391,8 @@ "keywords": [ "countdown", "oldschool", - "time" + "time", + "object" ], "moji": "⏳" }, @@ -14782,20 +16401,20 @@ "unicode_alternates": [], "name": "house building", "shortname": ":house:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "building", "home", "house", - "home", "residence", "dwelling", "mansion", "bungalow", "ranch", - "craftsman" + "craftsman", + "places" ], "moji": "🏠" }, @@ -14804,7 +16423,7 @@ "unicode_alternates": [], "name": "derelict house building", "shortname": ":house_abandoned:", - "category": "travel_places", + "category": "travel", "aliases": [ ":derelict_house_building:" ], @@ -14821,27 +16440,34 @@ "abandoned", "vacant", "run down", - "shoddy" - ] + "shoddy", + "places", + "building", + "house" + ], + "moji": "🏚" }, "house_with_garden": { "unicode": "1F3E1", "unicode_alternates": [], "name": "house with garden", "shortname": ":house_with_garden:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "home", "nature", - "plant" + "plant", + "places", + "building", + "house" ], "moji": "🏡" }, "hugging": { "unicode": "1F917", - "unicode_alternates": "", + "unicode_alternates": [], "name": "hugging face", "shortname": ":hugging:", "category": "people", @@ -14849,14 +16475,19 @@ ":hugging_face:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "smiley", + "hug", + "thank you" + ], + "moji": "🤗" }, "hushed": { "unicode": "1F62F", "unicode_alternates": [], "name": "hushed face", "shortname": ":hushed:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14865,7 +16496,10 @@ "quiet", "hush", "whisper", - "silent" + "silent", + "smiley", + "surprised", + "wow" ], "moji": "😯" }, @@ -14874,7 +16508,7 @@ "unicode_alternates": [], "name": "ice cream", "shortname": ":ice_cream:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14896,7 +16530,7 @@ }, "ice_skate": { "unicode": "26F8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ice skate", "shortname": ":ice_skate:", "category": "activity", @@ -14905,15 +16539,18 @@ "keywords": [ "place", "sport", - "travel" - ] + "travel", + "cold", + "ice skating" + ], + "moji": "⛸" }, "icecream": { "unicode": "1F366", "unicode_alternates": [], "name": "soft ice cream", "shortname": ":icecream:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14935,7 +16572,7 @@ }, "id": { "unicode": "1F194", - "unicode_alternates": "", + "unicode_alternates": [], "name": "squared id", "shortname": ":id:", "category": "symbols", @@ -14947,21 +16584,24 @@ "identity", "symbol", "word" - ] + ], + "moji": "🆔" }, "ideograph_advantage": { "unicode": "1F250", "unicode_alternates": [], "name": "circled ideograph advantage", "shortname": ":ideograph_advantage:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "chinese", "get", "kanji", - "obtain" + "obtain", + "japan", + "symbol" ], "moji": "🉐" }, @@ -14970,7 +16610,7 @@ "unicode_alternates": [], "name": "imp", "shortname": ":imp:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -14979,7 +16619,9 @@ "evil", "horns", "cute", - "devil" + "smiley", + "monster", + "wth" ], "moji": "👿" }, @@ -14993,7 +16635,9 @@ "aliases_ascii": [], "keywords": [ "documents", - "email" + "email", + "work", + "office" ], "moji": "📥" }, @@ -15007,30 +16651,17 @@ "aliases_ascii": [], "keywords": [ "email", - "inbox" + "inbox", + "object" ], "moji": "📨" }, - "info": { - "unicode": "1F6C8", - "unicode_alternates": [], - "name": "circled information source", - "shortname": ":info:", - "category": "objects_symbols", - "aliases": [ - ":circled_information_source:" - ], - "aliases_ascii": [], - "keywords": [ - "icon" - ] - }, "information_desk_person": { "unicode": "1F481", "unicode_alternates": [], "name": "information desk person", "shortname": ":information_desk_person:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15045,13 +16676,16 @@ "sassy", "unimpressed", "attitude", - "snarky" + "snarky", + "people", + "women", + "diversity" ], "moji": "💁" }, "information_desk_person_tone1": { "unicode": "1F481-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "information desk person tone 1", "shortname": ":information_desk_person_tone1:", "category": "people", @@ -15069,11 +16703,12 @@ "unimpressed", "attitude", "snarky" - ] + ], + "moji": "💁🏻" }, "information_desk_person_tone2": { "unicode": "1F481-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "information desk person tone 2", "shortname": ":information_desk_person_tone2:", "category": "people", @@ -15091,11 +16726,12 @@ "unimpressed", "attitude", "snarky" - ] + ], + "moji": "💁🏼" }, "information_desk_person_tone3": { "unicode": "1F481-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "information desk person tone 3", "shortname": ":information_desk_person_tone3:", "category": "people", @@ -15113,11 +16749,12 @@ "unimpressed", "attitude", "snarky" - ] + ], + "moji": "💁🏽" }, "information_desk_person_tone4": { "unicode": "1F481-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "information desk person tone 4", "shortname": ":information_desk_person_tone4:", "category": "people", @@ -15135,11 +16772,12 @@ "unimpressed", "attitude", "snarky" - ] + ], + "moji": "💁🏾" }, "information_desk_person_tone5": { "unicode": "1F481-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "information desk person tone 5", "shortname": ":information_desk_person_tone5:", "category": "people", @@ -15157,7 +16795,8 @@ "unimpressed", "attitude", "snarky" - ] + ], + "moji": "💁🏿" }, "information_source": { "unicode": "2139", @@ -15166,13 +16805,14 @@ ], "name": "information source", "shortname": ":information_source:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", "blue-square", - "letter" + "letter", + "symbol" ], "moji": "ℹ" }, @@ -15181,7 +16821,7 @@ "unicode_alternates": [], "name": "smiling face with halo", "shortname": ":innocent:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ "O:-)", @@ -15202,12 +16842,12 @@ "angel", "face", "halo", - "halo", - "angel", "innocent", "ring", "circle", - "heaven" + "heaven", + "smiley", + "emotion" ], "moji": "😇" }, @@ -15218,13 +16858,14 @@ ], "name": "exclamation question mark", "shortname": ":interrobang:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "punctuation", "surprise", - "wat" + "wat", + "symbol" ], "moji": "⁉" }, @@ -15240,7 +16881,10 @@ "apple", "dial", "gadgets", - "technology" + "technology", + "electronics", + "phone", + "selfie" ], "moji": "📱" }, @@ -15249,7 +16893,7 @@ "unicode_alternates": [], "name": "desert island", "shortname": ":island:", - "category": "travel_places", + "category": "travel", "aliases": [ ":desert_island:" ], @@ -15257,15 +16901,22 @@ "keywords": [ "land", "solitude", - "alone" - ] + "alone", + "places", + "travel", + "vacation", + "tropical", + "beach", + "swim" + ], + "moji": "🏝" }, "izakaya_lantern": { "unicode": "1F3EE", "unicode_alternates": [], "name": "izakaya lantern", "shortname": ":izakaya_lantern:", - "category": "places", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15277,7 +16928,9 @@ "alcohol", "bar", "sake", - "restaurant" + "restaurant", + "object", + "japan" ], "moji": "🏮" }, @@ -15286,14 +16939,13 @@ "unicode_alternates": [], "name": "jack-o-lantern", "shortname": ":jack_o_lantern:", - "category": "objects", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ "halloween", "jack-o-lantern", "pumpkin", - "halloween", "holiday", "carve", "autumn", @@ -15305,7 +16957,8 @@ "horror", "scary", "scared", - "dead" + "dead", + "holidays" ], "moji": "🎃" }, @@ -15314,11 +16967,16 @@ "unicode_alternates": [], "name": "silhouette of japan", "shortname": ":japan:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ - "nation" + "nation", + "places", + "travel", + "map", + "vacation", + "tropical" ], "moji": "🗾" }, @@ -15327,7 +16985,7 @@ "unicode_alternates": [], "name": "japanese castle", "shortname": ":japanese_castle:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15339,7 +16997,10 @@ "royalty", "fort", "fortified", - "fortress" + "fortress", + "places", + "travel", + "vacation" ], "moji": "🏯" }, @@ -15348,7 +17009,7 @@ "unicode_alternates": [], "name": "japanese goblin", "shortname": ":japanese_goblin:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15361,13 +17022,14 @@ "avian", "demon", "goblin", - "mask", "theater", "nose", "frown", "mustache", "anger", - "frustration" + "frustration", + "angry", + "monster" ], "moji": "👺" }, @@ -15376,7 +17038,7 @@ "unicode_alternates": [], "name": "japanese ogre", "shortname": ":japanese_ogre:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15387,7 +17049,6 @@ "troll", "ogre", "folklore", - "monster", "devil", "mask", "theater", @@ -15401,7 +17062,7 @@ "unicode_alternates": [], "name": "jeans", "shortname": ":jeans:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15419,26 +17080,12 @@ ], "moji": "👖" }, - "jet_up": { - "unicode": "1F6E6", - "unicode_alternates": [], - "name": "up-pointing military airplane", - "shortname": ":jet_up:", - "category": "travel_places", - "aliases": [ - ":up_pointing_military_airplane:" - ], - "aliases_ascii": [], - "keywords": [ - "jet" - ] - }, "joy": { "unicode": "1F602", "unicode_alternates": [], "name": "face with tears of joy", "shortname": ":joy:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":')", @@ -15450,11 +17097,13 @@ "haha", "happy", "tears", - "tears", - "cry", "joy", - "happy", - "weep" + "weep", + "silly", + "smiley", + "laugh", + "emotion", + "sarcastic" ], "moji": "😂" }, @@ -15463,7 +17112,7 @@ "unicode_alternates": [], "name": "cat face with tears of joy", "shortname": ":joy_cat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15472,36 +17121,126 @@ "haha", "happy", "tears", - "happy", - "tears", "cry", - "joy" + "joy", + "silly", + "laugh", + "cat", + "sarcastic" + ], + "moji": "😹" + }, + "joystick": { + "unicode": "1F579", + "unicode_alternates": [], + "name": "joystick", + "shortname": ":joystick:", + "category": "objects", + "aliases": [], + "aliases_ascii": [], + "keywords": [ + "games", + "atari", + "controller", + "electronics", + "game", + "boys night" + ], + "moji": "🕹" + }, + "juggling": { + "unicode": "1F939", + "unicode_alternates": [], + "name": "juggling", + "shortname": ":juggling:", + "category": "activity", + "aliases": [ + ":juggler:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤹" + }, + "juggling_tone1": { + "unicode": "1F939-1F3FB", + "unicode_alternates": [], + "name": "juggling tone 1", + "shortname": ":juggling_tone1:", + "category": "activity", + "aliases": [ + ":juggler_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤹🏻" + }, + "juggling_tone2": { + "unicode": "1F939-1F3FC", + "unicode_alternates": [], + "name": "juggling tone 2", + "shortname": ":juggling_tone2:", + "category": "activity", + "aliases": [ + ":juggler_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤹🏼" + }, + "juggling_tone3": { + "unicode": "1F939-1F3FD", + "unicode_alternates": [], + "name": "juggling tone 3", + "shortname": ":juggling_tone3:", + "category": "activity", + "aliases": [ + ":juggler_tone3:" ], - "moji": "😹" + "aliases_ascii": [], + "keywords": [], + "moji": "🤹🏽" }, - "joystick": { - "unicode": "1F579", + "juggling_tone4": { + "unicode": "1F939-1F3FE", "unicode_alternates": [], - "name": "joystick", - "shortname": ":joystick:", - "category": "objects_symbols", - "aliases": [], + "name": "juggling tone 4", + "shortname": ":juggling_tone4:", + "category": "activity", + "aliases": [ + ":juggler_tone4:" + ], "aliases_ascii": [], - "keywords": [ - "games", - "atari", - "controller" - ] + "keywords": [], + "moji": "🤹🏾" + }, + "juggling_tone5": { + "unicode": "1F939-1F3FF", + "unicode_alternates": [], + "name": "juggling tone 5", + "shortname": ":juggling_tone5:", + "category": "activity", + "aliases": [ + ":juggler_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤹🏿" }, "kaaba": { "unicode": "1F54B", - "unicode_alternates": "", + "unicode_alternates": [], "name": "kaaba", "shortname": ":kaaba:", "category": "travel", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "places", + "religion", + "building", + "condolence" + ], + "moji": "🕋" }, "key": { "unicode": "1F511", @@ -15514,7 +17253,8 @@ "keywords": [ "door", "lock", - "password" + "password", + "object" ], "moji": "🔑" }, @@ -15523,7 +17263,7 @@ "unicode_alternates": [], "name": "old key", "shortname": ":key2:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":old_key:" ], @@ -15532,79 +17272,34 @@ "door", "lock", "password", - "skeleton" - ] - }, - "keyboard": { - "unicode": "1F5AE", - "unicode_alternates": [], - "name": "wired keyboard", - "shortname": ":keyboard:", - "category": "objects_symbols", - "aliases": [ - ":wired_keyboard:" - ], - "aliases_ascii": [], - "keywords": [ - "typing", - "keys", - "input", - "device" - ] - }, - "keyboard_mouse": { - "unicode": "1F5A6", - "unicode_alternates": [], - "name": "keyboard and mouse", - "shortname": ":keyboard_mouse:", - "category": "objects_symbols", - "aliases": [ - ":keyboard_and_mouse:" + "skeleton", + "object" ], - "aliases_ascii": [], - "keywords": [ - "computer", - "input", - "desktop" - ] + "moji": "🗝" }, - "keyboard_with_jacks": { - "unicode": "1F398", - "unicode_alternates": [], - "name": "musical keyboard with jacks", - "shortname": ":keyboard_with_jacks:", - "category": "objects_symbols", - "aliases": [ - ":musical_keyboard_with_jacks:" + "keyboard": { + "unicode": "2328", + "unicode_alternates": [ + "2328-FE0F" ], - "aliases_ascii": [], - "keywords": [ - "music", - "instrument", - "midi" - ] - }, - "keycap_ten": { - "unicode": "1F51F", - "unicode_alternates": [], - "name": "keycap ten", - "shortname": ":keycap_ten:", - "category": "other", + "name": "keyboard", + "shortname": ":keyboard:", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ - "10", - "blue-square", - "numbers" + "electronics", + "work", + "office" ], - "moji": "🔟" + "moji": "⌨" }, "kimono": { "unicode": "1F458", "unicode_alternates": [], "name": "kimono", "shortname": ":kimono:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15621,7 +17316,7 @@ "unicode_alternates": [], "name": "kiss mark", "shortname": ":kiss:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15630,7 +17325,12 @@ "like", "lips", "love", - "valentines" + "valentines", + "women", + "sexy", + "lip", + "beautiful", + "girls night" ], "moji": "💋" }, @@ -15652,8 +17352,14 @@ "love", "marriage", "valentines", - "couple" - ] + "couple", + "people", + "gay", + "men", + "sex", + "lgbt" + ], + "moji": "👨‍❤️‍💋‍👨" }, "kiss_ww": { "unicode": "1F469-2764-1F48B-1F469", @@ -15673,15 +17379,21 @@ "love", "marriage", "valentines", - "couple" - ] + "couple", + "people", + "women", + "sex", + "lgbt", + "lesbian" + ], + "moji": "👩‍❤️‍💋‍👩" }, "kissing": { "unicode": "1F617", "unicode_alternates": [], "name": "kissing face", "shortname": ":kissing:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15695,7 +17407,9 @@ "kiss", "pucker", "lips", - "smooch" + "smooch", + "smiley", + "sexy" ], "moji": "😗" }, @@ -15704,7 +17418,7 @@ "unicode_alternates": [], "name": "kissing cat face with closed eyes", "shortname": ":kissing_cat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15714,7 +17428,8 @@ "kiss", "puckered", "heart", - "love" + "love", + "cat" ], "moji": "😽" }, @@ -15723,7 +17438,7 @@ "unicode_alternates": [], "name": "kissing face with closed eyes", "shortname": ":kissing_closed_eyes:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15738,8 +17453,9 @@ "passion", "puckered", "heart", - "love", - "smooch" + "smooch", + "smiley", + "sexy" ], "moji": "😚" }, @@ -15748,7 +17464,7 @@ "unicode_alternates": [], "name": "face throwing a kiss", "shortname": ":kissing_heart:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":*", @@ -15766,8 +17482,9 @@ "love", "lips", "like", - "love", - "valentines" + "valentines", + "smiley", + "sexy" ], "moji": "😘" }, @@ -15776,7 +17493,7 @@ "unicode_alternates": [], "name": "kissing face with smiling eyes", "shortname": ":kissing_smiling_eyes:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15789,10 +17506,25 @@ "smile", "pucker", "lips", - "smooch" + "smooch", + "smiley", + "sexy" ], "moji": "😙" }, + "kiwi": { + "unicode": "1F95D", + "unicode_alternates": [], + "name": "kiwifruit", + "shortname": ":kiwi:", + "category": "food", + "aliases": [ + ":kiwifruit:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥝" + }, "knife": { "unicode": "1F52A", "unicode_alternates": [], @@ -15801,7 +17533,10 @@ "category": "objects", "aliases": [], "aliases_ascii": [], - "keywords": [], + "keywords": [ + "object", + "weapon" + ], "moji": "🔪" }, "koala": { @@ -15814,7 +17549,8 @@ "aliases_ascii": [], "keywords": [ "animal", - "nature" + "nature", + "wildlife" ], "moji": "🐨" }, @@ -15823,7 +17559,7 @@ "unicode_alternates": [], "name": "squared katakana koko", "shortname": ":koko:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -15831,7 +17567,8 @@ "destination", "here", "japanese", - "katakana" + "katakana", + "symbol" ], "moji": "🈁" }, @@ -15840,22 +17577,28 @@ "unicode_alternates": [], "name": "label", "shortname": ":label:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ - "tag" - ] + "tag", + "object" + ], + "moji": "🏷" }, "large_blue_circle": { "unicode": "1F535", "unicode_alternates": [], "name": "large blue circle", "shortname": ":large_blue_circle:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], - "keywords": [], + "keywords": [ + "shapes", + "symbol", + "circle" + ], "moji": "🔵" }, "large_blue_diamond": { @@ -15863,11 +17606,13 @@ "unicode_alternates": [], "name": "large blue diamond", "shortname": ":large_blue_diamond:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol" ], "moji": "🔷" }, @@ -15876,11 +17621,13 @@ "unicode_alternates": [], "name": "large orange diamond", "shortname": ":large_orange_diamond:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol" ], "moji": "🔶" }, @@ -15900,7 +17647,8 @@ "sky", "night", "cheese", - "phase" + "phase", + "space" ], "moji": "🌗" }, @@ -15922,7 +17670,8 @@ "sky", "night", "cheese", - "phase" + "phase", + "space" ], "moji": "🌜" }, @@ -15931,7 +17680,7 @@ "unicode_alternates": [], "name": "smiling face with open mouth and tightly-closed ey", "shortname": ":laughing:", - "category": "emoticons", + "category": "people", "aliases": [ ":satisfied:" ], @@ -15947,7 +17696,9 @@ "lol", "smiling", "laughing", - "laugh" + "laugh", + "smiley", + "emotion" ], "moji": "😆" }, @@ -15984,16 +17735,97 @@ "aliases_ascii": [], "keywords": [ "notes", - "paper" + "paper", + "object", + "office", + "write" ], "moji": "📒" }, + "left_facing_fist": { + "unicode": "1F91B", + "unicode_alternates": [], + "name": "left-facing fist", + "shortname": ":left_facing_fist:", + "category": "people", + "aliases": [ + ":left_fist:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤛" + }, + "left_facing_fist_tone1": { + "unicode": "1F91B-1F3FB", + "unicode_alternates": [], + "name": "left facing fist tone 1", + "shortname": ":left_facing_fist_tone1:", + "category": "people", + "aliases": [ + ":left_fist_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤛🏻" + }, + "left_facing_fist_tone2": { + "unicode": "1F91B-1F3FC", + "unicode_alternates": [], + "name": "left facing fist tone 2", + "shortname": ":left_facing_fist_tone2:", + "category": "people", + "aliases": [ + ":left_fist_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤛🏼" + }, + "left_facing_fist_tone3": { + "unicode": "1F91B-1F3FD", + "unicode_alternates": [], + "name": "left facing fist tone 3", + "shortname": ":left_facing_fist_tone3:", + "category": "people", + "aliases": [ + ":left_fist_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤛🏽" + }, + "left_facing_fist_tone4": { + "unicode": "1F91B-1F3FE", + "unicode_alternates": [], + "name": "left facing fist tone 4", + "shortname": ":left_facing_fist_tone4:", + "category": "people", + "aliases": [ + ":left_fist_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤛🏾" + }, + "left_facing_fist_tone5": { + "unicode": "1F91B-1F3FF", + "unicode_alternates": [], + "name": "left facing fist tone 5", + "shortname": ":left_facing_fist_tone5:", + "category": "people", + "aliases": [ + ":left_fist_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤛🏿" + }, "left_luggage": { "unicode": "1F6C5", "unicode_alternates": [], "name": "left luggage", "shortname": ":left_luggage:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16002,26 +17834,10 @@ "bag", "baggage", "luggage", - "travel" + "symbol" ], "moji": "🛅" }, - "left_receiver": { - "unicode": "1F57B", - "unicode_alternates": [], - "name": "left hand telephone receiver", - "shortname": ":left_receiver:", - "category": "objects_symbols", - "aliases": [ - ":left_hand_telephone_receiver:" - ], - "aliases_ascii": [], - "keywords": [ - "communication", - "dial", - "technology" - ] - }, "left_right_arrow": { "unicode": "2194", "unicode_alternates": [ @@ -16029,11 +17845,13 @@ ], "name": "left right arrow", "shortname": ":left_right_arrow:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "arrow", + "symbol" ], "moji": "↔" }, @@ -16044,10 +17862,13 @@ ], "name": "leftwards arrow with hook", "shortname": ":leftwards_arrow_with_hook:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], - "keywords": [], + "keywords": [ + "arrow", + "symbol" + ], "moji": "↩" }, "lemon": { @@ -16055,7 +17876,7 @@ "unicode_alternates": [], "name": "lemon", "shortname": ":lemon:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16063,7 +17884,8 @@ "nature", "lemon", "yellow", - "citrus" + "citrus", + "food" ], "moji": "🍋" }, @@ -16074,7 +17896,7 @@ ], "name": "leo", "shortname": ":leo:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16087,9 +17909,8 @@ "zodiac", "sign", "purple-square", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♌" }, @@ -16108,7 +17929,9 @@ "cat", "spot", "spotted", - "sexy" + "sexy", + "wildlife", + "roar" ], "moji": "🐆" }, @@ -16117,27 +17940,31 @@ "unicode_alternates": [], "name": "level slider", "shortname": ":level_slider:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "controls" - ] + ], + "moji": "🎚" }, "levitate": { "unicode": "1F574", "unicode_alternates": [], "name": "man in business suit levitating", "shortname": ":levitate:", - "category": "people", + "category": "activity", "aliases": [ ":man_in_business_suit_levitating:" ], "aliases_ascii": [], "keywords": [ "hover", - "exclamation" - ] + "exclamation", + "men", + "job" + ], + "moji": "🕴" }, "libra": { "unicode": "264E", @@ -16146,7 +17973,7 @@ ], "name": "libra", "shortname": ":libra:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16159,9 +17986,8 @@ "zodiac", "sign", "purple-square", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♎" }, @@ -16179,12 +18005,20 @@ "bench", "press", "squats", - "deadlift" - ] + "deadlift", + "men", + "workout", + "flex", + "sport", + "weight lifting", + "win", + "diversity" + ], + "moji": "🏋" }, "lifter_tone1": { "unicode": "1F3CB-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "weight lifter tone 1", "shortname": ":lifter_tone1:", "category": "activity", @@ -16197,11 +18031,12 @@ "press", "squats", "deadlift" - ] + ], + "moji": "🏋🏻" }, "lifter_tone2": { "unicode": "1F3CB-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "weight lifter tone 2", "shortname": ":lifter_tone2:", "category": "activity", @@ -16214,11 +18049,12 @@ "press", "squats", "deadlift" - ] + ], + "moji": "🏋🏼" }, "lifter_tone3": { "unicode": "1F3CB-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "weight lifter tone 3", "shortname": ":lifter_tone3:", "category": "activity", @@ -16231,11 +18067,12 @@ "press", "squats", "deadlift" - ] + ], + "moji": "🏋🏽" }, "lifter_tone4": { "unicode": "1F3CB-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "weight lifter tone 4", "shortname": ":lifter_tone4:", "category": "activity", @@ -16248,11 +18085,12 @@ "press", "squats", "deadlift" - ] + ], + "moji": "🏋🏾" }, "lifter_tone5": { "unicode": "1F3CB-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "weight lifter tone 5", "shortname": ":lifter_tone5:", "category": "activity", @@ -16265,28 +18103,15 @@ "press", "squats", "deadlift" - ] - }, - "light_check_mark": { - "unicode": "1F5F8", - "unicode_alternates": [], - "name": "light check mark", - "shortname": ":light_check_mark:", - "category": "objects_symbols", - "aliases": [ - ":light_mark:" ], - "aliases_ascii": [], - "keywords": [ - "vote" - ] + "moji": "🏋🏿" }, "light_rail": { "unicode": "1F688", "unicode_alternates": [], "name": "light rail", "shortname": ":light_rail:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16294,7 +18119,8 @@ "vehicle", "train", "rail", - "light" + "light", + "travel" ], "moji": "🚈" }, @@ -16303,18 +18129,20 @@ "unicode_alternates": [], "name": "link symbol", "shortname": ":link:", - "category": "other", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "rings", - "url" + "url", + "symbol", + "office" ], "moji": "🔗" }, "lion_face": { "unicode": "1F981", - "unicode_alternates": "", + "unicode_alternates": [], "name": "lion face", "shortname": ":lion_face:", "category": "nature", @@ -16322,50 +18150,62 @@ ":lion:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "wildlife", + "roar", + "cat", + "animal" + ], + "moji": "🦁" }, "lips": { "unicode": "1F444", "unicode_alternates": [], "name": "mouth", "shortname": ":lips:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "kiss", - "mouth" + "mouth", + "women", + "body", + "sexy", + "lip" ], "moji": "👄" }, - "lips2": { - "unicode": "1F5E2", - "unicode_alternates": [], - "name": "lips", - "shortname": ":lips2:", - "category": "people", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "kiss", - "mouth" - ] - }, "lipstick": { "unicode": "1F484", "unicode_alternates": [], "name": "lipstick", "shortname": ":lipstick:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "fashion", "female", - "girl" + "girl", + "object", + "women", + "sexy", + "lip" ], "moji": "💄" }, + "lizard": { + "unicode": "1F98E", + "unicode_alternates": [], + "name": "lizard", + "shortname": ":lizard:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦎" + }, "lock": { "unicode": "1F512", "unicode_alternates": [], @@ -16376,7 +18216,9 @@ "aliases_ascii": [], "keywords": [ "password", - "security" + "security", + "object", + "lock" ], "moji": "🔒" }, @@ -16390,7 +18232,9 @@ "aliases_ascii": [], "keywords": [ "secret", - "security" + "security", + "object", + "lock" ], "moji": "🔏" }, @@ -16399,7 +18243,7 @@ "unicode_alternates": [], "name": "lollipop", "shortname": ":lollipop:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16410,9 +18254,8 @@ "lollipop", "stick", "lick", - "sweet", "sugar", - "candy" + "halloween" ], "moji": "🍭" }, @@ -16421,11 +18264,12 @@ "unicode_alternates": [], "name": "double curly loop", "shortname": ":loop:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "curly" + "curly", + "symbol" ], "moji": "➿" }, @@ -16434,10 +18278,13 @@ "unicode_alternates": [], "name": "speaker with three sound waves", "shortname": ":loud_sound:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], - "keywords": [], + "keywords": [ + "alarm", + "symbol" + ], "moji": "🔊" }, "loudspeaker": { @@ -16445,12 +18292,15 @@ "unicode_alternates": [], "name": "public address loudspeaker", "shortname": ":loudspeaker:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "sound", - "volume" + "volume", + "object", + "alarm", + "symbol" ], "moji": "📢" }, @@ -16459,7 +18309,7 @@ "unicode_alternates": [], "name": "love hotel", "shortname": ":love_hotel:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16468,7 +18318,6 @@ "like", "love", "hotel", - "love", "sex", "romance", "leisure", @@ -16476,7 +18325,9 @@ "prostitution", "hospital", "birth", - "happy" + "happy", + "places", + "building" ], "moji": "🏩" }, @@ -16485,7 +18336,7 @@ "unicode_alternates": [], "name": "love letter", "shortname": ":love_letter:", - "category": "emoticons", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16497,7 +18348,8 @@ "love", "letter", "kiss", - "heart" + "heart", + "object" ], "moji": "💌" }, @@ -16506,15 +18358,29 @@ "unicode_alternates": [], "name": "low brightness symbol", "shortname": ":low_brightness:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "summer", - "sun" + "sun", + "symbol" ], "moji": "🔅" }, + "lying_face": { + "unicode": "1F925", + "unicode_alternates": [], + "name": "lying face", + "shortname": ":lying_face:", + "category": "people", + "aliases": [ + ":liar:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤥" + }, "m": { "unicode": "24C2", "unicode_alternates": [ @@ -16522,13 +18388,14 @@ ], "name": "circled latin capital letter m", "shortname": ":m:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", "blue-circle", - "letter" + "letter", + "symbol" ], "moji": "Ⓜ" }, @@ -16546,7 +18413,8 @@ "detective", "investigator", "detail", - "details" + "details", + "object" ], "moji": "🔍" }, @@ -16564,7 +18432,8 @@ "detective", "investigator", "detail", - "details" + "details", + "object" ], "moji": "🔎" }, @@ -16575,13 +18444,15 @@ ], "name": "mahjong tile red dragon", "shortname": ":mahjong:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "chinese", "game", - "kanji" + "kanji", + "object", + "symbol" ], "moji": "🀄" }, @@ -16596,7 +18467,8 @@ "keywords": [ "communication", "email", - "inbox" + "inbox", + "object" ], "moji": "📫" }, @@ -16611,7 +18483,9 @@ "keywords": [ "communication", "email", - "inbox" + "inbox", + "object", + "office" ], "moji": "📪" }, @@ -16626,7 +18500,8 @@ "keywords": [ "communication", "email", - "inbox" + "inbox", + "object" ], "moji": "📬" }, @@ -16640,7 +18515,8 @@ "aliases_ascii": [], "keywords": [ "email", - "inbox" + "inbox", + "object" ], "moji": "📭" }, @@ -16649,7 +18525,7 @@ "unicode_alternates": [], "name": "man", "shortname": ":man:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16657,13 +18533,173 @@ "dad", "father", "guy", - "mustashe" + "mustashe", + "people", + "men", + "sex", + "diversity", + "selfie", + "boys night" ], "moji": "👨" }, + "man_dancing": { + "unicode": "1F57A", + "unicode_alternates": [], + "name": "man dancing", + "shortname": ":man_dancing:", + "category": "people", + "aliases": [ + ":male_dancer:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🕺" + }, + "man_dancing_tone1": { + "unicode": "1F57A-1F3FB", + "unicode_alternates": [], + "name": "man dancing tone 1", + "shortname": ":man_dancing_tone1:", + "category": "activity", + "aliases": [ + ":male_dancer_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🕺🏻" + }, + "man_dancing_tone2": { + "unicode": "1F57A-1F3FC", + "unicode_alternates": [], + "name": "man dancing tone 2", + "shortname": ":man_dancing_tone2:", + "category": "activity", + "aliases": [ + ":male_dancer_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🕺🏼" + }, + "man_dancing_tone3": { + "unicode": "1F57A-1F3FD", + "unicode_alternates": [], + "name": "man dancing tone 3", + "shortname": ":man_dancing_tone3:", + "category": "activity", + "aliases": [ + ":male_dancer_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🕺🏽" + }, + "man_dancing_tone4": { + "unicode": "1F57A-1F3FE", + "unicode_alternates": [], + "name": "man dancing tone 4", + "shortname": ":man_dancing_tone4:", + "category": "activity", + "aliases": [ + ":male_dancer_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🕺🏾" + }, + "man_dancing_tone5": { + "unicode": "1F57A-1F3FF", + "unicode_alternates": [], + "name": "man dancing tone 5", + "shortname": ":man_dancing_tone5:", + "category": "activity", + "aliases": [ + ":male_dancer_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🕺🏿" + }, + "man_in_tuxedo": { + "unicode": "1F935", + "unicode_alternates": [], + "name": "man in tuxedo", + "shortname": ":man_in_tuxedo:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤵" + }, + "man_in_tuxedo_tone1": { + "unicode": "1F935-1F3FB", + "unicode_alternates": [], + "name": "man in tuxedo tone 1", + "shortname": ":man_in_tuxedo_tone1:", + "category": "people", + "aliases": [ + ":tuxedo_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤵🏻" + }, + "man_in_tuxedo_tone2": { + "unicode": "1F935-1F3FC", + "unicode_alternates": [], + "name": "man in tuxedo tone 2", + "shortname": ":man_in_tuxedo_tone2:", + "category": "people", + "aliases": [ + ":tuxedo_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤵🏼" + }, + "man_in_tuxedo_tone3": { + "unicode": "1F935-1F3FD", + "unicode_alternates": [], + "name": "man in tuxedo tone 3", + "shortname": ":man_in_tuxedo_tone3:", + "category": "people", + "aliases": [ + ":tuxedo_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤵🏽" + }, + "man_in_tuxedo_tone4": { + "unicode": "1F935-1F3FE", + "unicode_alternates": [], + "name": "man in tuxedo tone 4", + "shortname": ":man_in_tuxedo_tone4:", + "category": "people", + "aliases": [ + ":tuxedo_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤵🏾" + }, + "man_in_tuxedo_tone5": { + "unicode": "1F935-1F3FF", + "unicode_alternates": [], + "name": "man in tuxedo tone 5", + "shortname": ":man_in_tuxedo_tone5:", + "category": "people", + "aliases": [ + ":tuxedo_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤵🏿" + }, "man_tone1": { "unicode": "1F468-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man tone 1", "shortname": ":man_tone1:", "category": "people", @@ -16675,11 +18711,12 @@ "father", "guy", "mustache" - ] + ], + "moji": "👨🏻" }, "man_tone2": { "unicode": "1F468-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man tone 2", "shortname": ":man_tone2:", "category": "people", @@ -16691,11 +18728,12 @@ "father", "guy", "mustache" - ] + ], + "moji": "👨🏼" }, "man_tone3": { "unicode": "1F468-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man tone 3", "shortname": ":man_tone3:", "category": "people", @@ -16707,11 +18745,12 @@ "father", "guy", "mustache" - ] + ], + "moji": "👨🏽" }, "man_tone4": { "unicode": "1F468-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man tone 4", "shortname": ":man_tone4:", "category": "people", @@ -16723,11 +18762,12 @@ "father", "guy", "mustache" - ] + ], + "moji": "👨🏾" }, "man_tone5": { "unicode": "1F468-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man tone 5", "shortname": ":man_tone5:", "category": "people", @@ -16739,14 +18779,15 @@ "father", "guy", "mustache" - ] + ], + "moji": "👨🏿" }, "man_with_gua_pi_mao": { "unicode": "1F472", "unicode_alternates": [], "name": "man with gua pi mao", "shortname": ":man_with_gua_pi_mao:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16755,13 +18796,17 @@ "skullcap", "chinese", "asian", - "qing" + "qing", + "people", + "hat", + "men", + "diversity" ], "moji": "👲" }, "man_with_gua_pi_mao_tone1": { "unicode": "1F472-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with gua pi mao tone 1", "shortname": ":man_with_gua_pi_mao_tone1:", "category": "people", @@ -16774,11 +18819,12 @@ "chinese", "asian", "qing" - ] + ], + "moji": "👲🏻" }, "man_with_gua_pi_mao_tone2": { "unicode": "1F472-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with gua pi mao tone 2", "shortname": ":man_with_gua_pi_mao_tone2:", "category": "people", @@ -16791,11 +18837,12 @@ "chinese", "asian", "qing" - ] + ], + "moji": "👲🏼" }, "man_with_gua_pi_mao_tone3": { "unicode": "1F472-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with gua pi mao tone 3", "shortname": ":man_with_gua_pi_mao_tone3:", "category": "people", @@ -16808,11 +18855,12 @@ "chinese", "asian", "qing" - ] + ], + "moji": "👲🏽" }, "man_with_gua_pi_mao_tone4": { "unicode": "1F472-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with gua pi mao tone 4", "shortname": ":man_with_gua_pi_mao_tone4:", "category": "people", @@ -16825,11 +18873,12 @@ "chinese", "asian", "qing" - ] + ], + "moji": "👲🏾" }, "man_with_gua_pi_mao_tone5": { "unicode": "1F472-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with gua pi mao tone 5", "shortname": ":man_with_gua_pi_mao_tone5:", "category": "people", @@ -16842,14 +18891,15 @@ "chinese", "asian", "qing" - ] + ], + "moji": "👲🏿" }, "man_with_turban": { "unicode": "1F473", "unicode_alternates": [], "name": "man with turban", "shortname": ":man_with_turban:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -16862,13 +18912,16 @@ "indian", "mummy", "wisdom", - "peace" + "peace", + "people", + "hat", + "diversity" ], "moji": "👳" }, "man_with_turban_tone1": { "unicode": "1F473-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with turban tone 1", "shortname": ":man_with_turban_tone1:", "category": "people", @@ -16884,11 +18937,12 @@ "mummy", "wisdom", "peace" - ] + ], + "moji": "👳🏻" }, "man_with_turban_tone2": { "unicode": "1F473-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with turban tone 2", "shortname": ":man_with_turban_tone2:", "category": "people", @@ -16904,11 +18958,12 @@ "mummy", "wisdom", "peace" - ] + ], + "moji": "👳🏼" }, "man_with_turban_tone3": { "unicode": "1F473-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with turban tone 3", "shortname": ":man_with_turban_tone3:", "category": "people", @@ -16924,11 +18979,12 @@ "mummy", "wisdom", "peace" - ] + ], + "moji": "👳🏽" }, "man_with_turban_tone4": { "unicode": "1F473-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with turban tone 4", "shortname": ":man_with_turban_tone4:", "category": "people", @@ -16944,11 +19000,12 @@ "mummy", "wisdom", "peace" - ] + ], + "moji": "👳🏾" }, "man_with_turban_tone5": { "unicode": "1F473-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "man with turban tone 5", "shortname": ":man_with_turban_tone5:", "category": "people", @@ -16964,19 +19021,22 @@ "mummy", "wisdom", "peace" - ] + ], + "moji": "👳🏿" }, "mans_shoe": { "unicode": "1F45E", "unicode_alternates": [], "name": "mans shoe", "shortname": ":mans_shoe:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "fashion", - "male" + "male", + "shoe", + "accessories" ], "moji": "👞" }, @@ -16985,7 +19045,7 @@ "unicode_alternates": [], "name": "world map", "shortname": ":map:", - "category": "travel_places", + "category": "objects", "aliases": [ ":world_map:" ], @@ -16993,8 +19053,12 @@ "keywords": [ "atlas", "earth", - "cartography" - ] + "cartography", + "travel", + "map", + "vacation" + ], + "moji": "🗺" }, "maple_leaf": { "unicode": "1F341", @@ -17012,28 +19076,42 @@ "maple", "leaf", "syrup", - "canada", "tree" ], "moji": "🍁" }, + "martial_arts_uniform": { + "unicode": "1F94B", + "unicode_alternates": [], + "name": "martial arts uniform", + "shortname": ":martial_arts_uniform:", + "category": "activity", + "aliases": [ + ":karate_uniform:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥋" + }, "mask": { "unicode": "1F637", "unicode_alternates": [], "name": "face with medical mask", "shortname": ":mask:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "face", "ill", "sick", - "sick", "virus", "flu", "medical", - "mask" + "mask", + "smiley", + "dead", + "health" ], "moji": "😷" }, @@ -17042,19 +19120,22 @@ "unicode_alternates": [], "name": "face massage", "shortname": ":massage:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "female", "girl", - "woman" + "woman", + "people", + "women", + "diversity" ], "moji": "💆" }, "massage_tone1": { "unicode": "1F486-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face massage tone 1", "shortname": ":massage_tone1:", "category": "people", @@ -17064,11 +19145,12 @@ "female", "girl", "woman" - ] + ], + "moji": "💆🏻" }, "massage_tone2": { "unicode": "1F486-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face massage tone 2", "shortname": ":massage_tone2:", "category": "people", @@ -17078,11 +19160,12 @@ "female", "girl", "woman" - ] + ], + "moji": "💆🏼" }, "massage_tone3": { "unicode": "1F486-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face massage tone 3", "shortname": ":massage_tone3:", "category": "people", @@ -17092,11 +19175,12 @@ "female", "girl", "woman" - ] + ], + "moji": "💆🏽" }, "massage_tone4": { "unicode": "1F486-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face massage tone 4", "shortname": ":massage_tone4:", "category": "people", @@ -17106,11 +19190,12 @@ "female", "girl", "woman" - ] + ], + "moji": "💆🏾" }, "massage_tone5": { "unicode": "1F486-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face massage tone 5", "shortname": ":massage_tone5:", "category": "people", @@ -17120,14 +19205,15 @@ "female", "girl", "woman" - ] + ], + "moji": "💆🏿" }, "meat_on_bone": { "unicode": "1F356", "unicode_alternates": [], "name": "meat on bone", "shortname": ":meat_on_bone:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17160,21 +19246,27 @@ "first", "show", "reward", - "achievement" - ] + "achievement", + "object", + "sport", + "perfect" + ], + "moji": "🏅" }, "mega": { "unicode": "1F4E3", "unicode_alternates": [], "name": "cheering megaphone", "shortname": ":mega:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "sound", "speaker", - "volume" + "volume", + "object", + "sport" ], "moji": "📣" }, @@ -17183,7 +19275,7 @@ "unicode_alternates": [], "name": "melon", "shortname": ":melon:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17192,26 +19284,34 @@ "nature", "melon", "cantaloupe", - "honeydew" + "honeydew", + "boobs" ], "moji": "🍈" }, "menorah": { "unicode": "1F54E", - "unicode_alternates": "", + "unicode_alternates": [], "name": "menorah with nine branches", "shortname": ":menorah:", "category": "symbols", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "religion", + "object", + "jew", + "symbol", + "holidays" + ], + "moji": "🕎" }, "mens": { "unicode": "1F6B9", "unicode_alternates": [], "name": "mens symbol", "shortname": ":mens:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17220,17 +19320,17 @@ "wc", "men", "bathroom", - "restroom", "sign", "boy", "male", - "avatar" + "avatar", + "symbol" ], "moji": "🚹" }, "metal": { "unicode": "1F918", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sign of the horns", "shortname": ":metal:", "category": "people", @@ -17242,12 +19342,19 @@ "band", "concert", "fingers", - "rocknroll" - ] + "rocknroll", + "body", + "hands", + "hi", + "diversity", + "boys night", + "parties" + ], + "moji": "🤘" }, "metal_tone1": { "unicode": "1F918-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sign of the horns tone 1", "shortname": ":metal_tone1:", "category": "people", @@ -17260,11 +19367,12 @@ "concert", "fingers", "rocknroll" - ] + ], + "moji": "🤘🏻" }, "metal_tone2": { "unicode": "1F918-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sign of the horns tone 2", "shortname": ":metal_tone2:", "category": "people", @@ -17277,11 +19385,12 @@ "concert", "fingers", "rocknroll" - ] + ], + "moji": "🤘🏼" }, "metal_tone3": { "unicode": "1F918-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sign of the horns tone 3", "shortname": ":metal_tone3:", "category": "people", @@ -17294,11 +19403,12 @@ "concert", "fingers", "rocknroll" - ] + ], + "moji": "🤘🏽" }, "metal_tone4": { "unicode": "1F918-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sign of the horns tone 4", "shortname": ":metal_tone4:", "category": "people", @@ -17311,11 +19421,12 @@ "concert", "fingers", "rocknroll" - ] + ], + "moji": "🤘🏾" }, "metal_tone5": { "unicode": "1F918-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sign of the horns tone 5", "shortname": ":metal_tone5:", "category": "people", @@ -17328,14 +19439,15 @@ "concert", "fingers", "rocknroll" - ] + ], + "moji": "🤘🏿" }, "metro": { "unicode": "1F687", "unicode_alternates": [], "name": "metro", "shortname": ":metro:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17346,8 +19458,8 @@ "underground", "metro", "subway", - "underground", - "train" + "train", + "travel" ], "moji": "🚇" }, @@ -17356,7 +19468,7 @@ "unicode_alternates": [], "name": "microphone", "shortname": ":microphone:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17366,9 +19478,9 @@ "microphone", "mic", "audio", - "sound", "voice", - "karaoke" + "karaoke", + "instruments" ], "moji": "🎤" }, @@ -17377,7 +19489,7 @@ "unicode_alternates": [], "name": "studio microphone", "shortname": ":microphone2:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":studio_microphone:" ], @@ -17385,8 +19497,11 @@ "keywords": [ "mic", "audio", - "recording" - ] + "recording", + "electronics", + "object" + ], + "moji": "🎙" }, "microscope": { "unicode": "1F52C", @@ -17399,7 +19514,9 @@ "keywords": [ "experiment", "laboratory", - "zoomin" + "zoomin", + "object", + "science" ], "moji": "🔬" }, @@ -17414,12 +19531,17 @@ ], "aliases_ascii": [], "keywords": [ - "fu" - ] + "fu", + "body", + "hands", + "middle finger", + "diversity" + ], + "moji": "🖕" }, "middle_finger_tone1": { "unicode": "1F595-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "reversed hand with middle finger extended tone 1", "shortname": ":middle_finger_tone1:", "category": "people", @@ -17429,11 +19551,12 @@ "aliases_ascii": [], "keywords": [ "fu" - ] + ], + "moji": "🖕🏻" }, "middle_finger_tone2": { "unicode": "1F595-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "reversed hand with middle finger extended tone 2", "shortname": ":middle_finger_tone2:", "category": "people", @@ -17443,11 +19566,12 @@ "aliases_ascii": [], "keywords": [ "fu" - ] + ], + "moji": "🖕🏼" }, "middle_finger_tone3": { "unicode": "1F595-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "reversed hand with middle finger extended tone 3", "shortname": ":middle_finger_tone3:", "category": "people", @@ -17457,11 +19581,12 @@ "aliases_ascii": [], "keywords": [ "fu" - ] + ], + "moji": "🖕🏽" }, "middle_finger_tone4": { "unicode": "1F595-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "reversed hand with middle finger extended tone 4", "shortname": ":middle_finger_tone4:", "category": "people", @@ -17471,11 +19596,12 @@ "aliases_ascii": [], "keywords": [ "fu" - ] + ], + "moji": "🖕🏾" }, "middle_finger_tone5": { "unicode": "1F595-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "reversed hand with middle finger extended tone 5", "shortname": ":middle_finger_tone5:", "category": "people", @@ -17485,14 +19611,15 @@ "aliases_ascii": [], "keywords": [ "fu" - ] + ], + "moji": "🖕🏿" }, "military_medal": { "unicode": "1F396", "unicode_alternates": [], "name": "military medal", "shortname": ":military_medal:", - "category": "celebration", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17500,15 +19627,32 @@ "acknowledgment", "purple heart", "heroism", - "veteran" - ] + "veteran", + "object", + "award", + "win" + ], + "moji": "🎖" + }, + "milk": { + "unicode": "1F95B", + "unicode_alternates": [], + "name": "glass of milk", + "shortname": ":milk:", + "category": "food", + "aliases": [ + ":glass_of_milk:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥛" }, "milky_way": { "unicode": "1F30C", "unicode_alternates": [], "name": "milky way", "shortname": ":milky_way:", - "category": "nature", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17519,8 +19663,10 @@ "star", "stars", "planets", - "space", - "sky" + "sky", + "places", + "travel", + "vacation" ], "moji": "🌌" }, @@ -17529,7 +19675,7 @@ "unicode_alternates": [], "name": "minibus", "shortname": ":minibus:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17538,8 +19684,7 @@ "vehicle", "bus", "city", - "transport", - "transportation" + "transport" ], "moji": "🚐" }, @@ -17556,7 +19701,8 @@ "disc", "disk", "record", - "technology" + "technology", + "electronics" ], "moji": "💽" }, @@ -17565,17 +19711,18 @@ "unicode_alternates": [], "name": "mobile phone off", "shortname": ":mobile_phone_off:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "mute" + "mute", + "symbol" ], "moji": "📴" }, "money_mouth": { "unicode": "1F911", - "unicode_alternates": "", + "unicode_alternates": [], "name": "money-mouth face", "shortname": ":money_mouth:", "category": "people", @@ -17583,7 +19730,14 @@ ":money_mouth_face:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "smiley", + "win", + "money", + "emotion", + "boys night" + ], + "moji": "🤑" }, "money_with_wings": { "unicode": "1F4B8", @@ -17607,7 +19761,7 @@ "burned", "gift", "cash", - "dollar" + "boys night" ], "moji": "💸" }, @@ -17622,7 +19776,10 @@ "keywords": [ "coins", "dollar", - "payment" + "payment", + "bag", + "award", + "money" ], "moji": "💰" }, @@ -17640,7 +19797,8 @@ "monkey", "primate", "banana", - "silly" + "silly", + "wildlife" ], "moji": "🐒" }, @@ -17663,7 +19821,7 @@ "unicode_alternates": [], "name": "monorail", "shortname": ":monorail:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17672,66 +19830,18 @@ "train", "mono", "rail", - "transport" + "transport", + "travel", + "vacation" ], "moji": "🚝" }, - "mood_bubble": { - "unicode": "1F5F0", - "unicode_alternates": [], - "name": "mood bubble", - "shortname": ":mood_bubble:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "balloon", - "conversation", - "communication", - "comic", - "feeling" - ] - }, - "mood_bubble_lightning": { - "unicode": "1F5F1", - "unicode_alternates": [], - "name": "lightning mood bubble", - "shortname": ":mood_bubble_lightning:", - "category": "objects_symbols", - "aliases": [ - ":lightning_mood_bubble:" - ], - "aliases_ascii": [], - "keywords": [ - "balloon", - "conversation", - "communication", - "comic", - "feeling" - ] - }, - "mood_lightning": { - "unicode": "1F5F2", - "unicode_alternates": [], - "name": "lightning mood", - "shortname": ":mood_lightning:", - "category": "objects_symbols", - "aliases": [ - ":lightning_mood:" - ], - "aliases_ascii": [], - "keywords": [ - "zap", - "electric", - "current" - ] - }, "mortar_board": { "unicode": "1F393", "unicode_alternates": [], "name": "graduation cap", "shortname": ":mortar_board:", - "category": "objects", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17742,33 +19852,55 @@ "hat", "school", "university", - "graduation", - "cap", "mortarboard", "academic", "education", "ceremony", "square", - "tassel" + "tassel", + "office", + "accessories" ], "moji": "🎓" }, "mosque": { "unicode": "1F54C", - "unicode_alternates": "", + "unicode_alternates": [], "name": "mosque", "shortname": ":mosque:", "category": "travel", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "places", + "religion", + "building", + "vacation", + "condolence" + ], + "moji": "🕌" + }, + "motor_scooter": { + "unicode": "1F6F5", + "unicode_alternates": [], + "name": "motor scooter", + "shortname": ":motor_scooter:", + "category": "travel", + "aliases": [ + ":motorbike:" + ], + "aliases_ascii": [], + "keywords": [ + "moped" + ], + "moji": "🛵" }, "motorboat": { "unicode": "1F6E5", "unicode_alternates": [], "name": "motorboat", "shortname": ":motorboat:", - "category": "travel_places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17776,30 +19908,35 @@ "vehicle", "boat", "speedboat", - "powerboat" - ] + "powerboat", + "travel" + ], + "moji": "🛥" }, "motorcycle": { "unicode": "1F3CD", "unicode_alternates": [], "name": "racing motorcycle", "shortname": ":motorcycle:", - "category": "activity", + "category": "travel", "aliases": [ ":racing_motorcycle:" ], "aliases_ascii": [], "keywords": [ "bike", - "speed" - ] + "speed", + "transportation", + "travel" + ], + "moji": "🏍" }, "motorway": { "unicode": "1F6E3", "unicode_alternates": [], "name": "motorway", "shortname": ":motorway:", - "category": "travel_places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17807,43 +19944,56 @@ "highway", "freeway", "traffic", - "travel" - ] + "travel", + "vacation", + "camp" + ], + "moji": "🛣" }, "mount_fuji": { "unicode": "1F5FB", "unicode_alternates": [], "name": "mount fuji", "shortname": ":mount_fuji:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "japan", "mountain", "nature", - "photo" + "photo", + "places", + "travel", + "vacation", + "cold", + "camp" ], "moji": "🗻" }, "mountain": { "unicode": "26F0", - "unicode_alternates": "", + "unicode_alternates": [], "name": "mountain", "shortname": ":mountain:", "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ - "place" - ] + "place", + "places", + "travel", + "vacation", + "camp" + ], + "moji": "⛰" }, "mountain_bicyclist": { "unicode": "1F6B5", "unicode_alternates": [], "name": "mountain bicyclist", "shortname": ":mountain_bicyclist:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17855,13 +20005,15 @@ "bike", "pedal", "bicycle", - "transportation" + "men", + "sport", + "diversity" ], "moji": "🚵" }, "mountain_bicyclist_tone1": { "unicode": "1F6B5-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "mountain bicyclist tone 1", "shortname": ":mountain_bicyclist_tone1:", "category": "activity", @@ -17872,13 +20024,13 @@ "transportation", "bike", "pedal", - "bicycle", - "transportation" - ] + "bicycle" + ], + "moji": "🚵🏻" }, "mountain_bicyclist_tone2": { "unicode": "1F6B5-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "mountain bicyclist tone 2", "shortname": ":mountain_bicyclist_tone2:", "category": "activity", @@ -17889,13 +20041,13 @@ "transportation", "bike", "pedal", - "bicycle", - "transportation" - ] + "bicycle" + ], + "moji": "🚵🏼" }, "mountain_bicyclist_tone3": { "unicode": "1F6B5-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "mountain bicyclist tone 3", "shortname": ":mountain_bicyclist_tone3:", "category": "activity", @@ -17906,13 +20058,13 @@ "transportation", "bike", "pedal", - "bicycle", - "transportation" - ] + "bicycle" + ], + "moji": "🚵🏽" }, "mountain_bicyclist_tone4": { "unicode": "1F6B5-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "mountain bicyclist tone 4", "shortname": ":mountain_bicyclist_tone4:", "category": "activity", @@ -17923,13 +20075,13 @@ "transportation", "bike", "pedal", - "bicycle", - "transportation" - ] + "bicycle" + ], + "moji": "🚵🏾" }, "mountain_bicyclist_tone5": { "unicode": "1F6B5-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "mountain bicyclist tone 5", "shortname": ":mountain_bicyclist_tone5:", "category": "activity", @@ -17940,16 +20092,16 @@ "transportation", "bike", "pedal", - "bicycle", - "transportation" - ] + "bicycle" + ], + "moji": "🚵🏿" }, "mountain_cableway": { "unicode": "1F6A0", "unicode_alternates": [], "name": "mountain cableway", "shortname": ":mountain_cableway:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17959,7 +20111,8 @@ "cable", "rail", "train", - "railway" + "railway", + "travel" ], "moji": "🚠" }, @@ -17968,7 +20121,7 @@ "unicode_alternates": [], "name": "mountain railway", "shortname": ":mountain_railway:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -17977,7 +20130,8 @@ "railway", "rail", "train", - "transport" + "transport", + "travel" ], "moji": "🚞" }, @@ -17986,7 +20140,7 @@ "unicode_alternates": [], "name": "snow capped mountain", "shortname": ":mountain_snow:", - "category": "travel_places", + "category": "travel", "aliases": [ ":snow_capped_mountain:" ], @@ -17995,8 +20149,13 @@ "cold", "elevation", "hiking", - "peak" - ] + "peak", + "places", + "travel", + "vacation", + "camp" + ], + "moji": "🏔" }, "mouse": { "unicode": "1F42D", @@ -18029,25 +20188,9 @@ ], "moji": "🐁" }, - "mouse_one": { - "unicode": "1F5AF", - "unicode_alternates": [], - "name": "one button mouse", - "shortname": ":mouse_one:", - "category": "objects_symbols", - "aliases": [ - ":one_button_mouse:" - ], - "aliases_ascii": [], - "keywords": [ - "computer", - "input", - "device" - ] - }, "mouse_three_button": { "unicode": "1F5B1", - "unicode_alternates": "", + "unicode_alternates": [], "name": "three button mouse", "shortname": ":mouse_three_button:", "category": "objects", @@ -18059,8 +20202,12 @@ "3", "computer", "object", - "office" - ] + "office", + "electronics", + "work", + "game" + ], + "moji": "🖱" }, "movie_camera": { "unicode": "1F3A5", @@ -18078,7 +20225,8 @@ "camcorder", "video", "motion", - "picture" + "picture", + "object" ], "moji": "🎥" }, @@ -18087,21 +20235,101 @@ "unicode_alternates": [], "name": "moyai", "shortname": ":moyai:", - "category": "places", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "island", - "stone" + "stone", + "travel", + "vacation" ], "moji": "🗿" }, + "mrs_claus": { + "unicode": "1F936", + "unicode_alternates": [], + "name": "mother christmas", + "shortname": ":mrs_claus:", + "category": "people", + "aliases": [ + ":mother_christmas:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤶" + }, + "mrs_claus_tone1": { + "unicode": "1F936-1F3FB", + "unicode_alternates": [], + "name": "mother christmas tone 1", + "shortname": ":mrs_claus_tone1:", + "category": "people", + "aliases": [ + ":mother_christmas_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤶🏻" + }, + "mrs_claus_tone2": { + "unicode": "1F936-1F3FC", + "unicode_alternates": [], + "name": "mother christmas tone 2", + "shortname": ":mrs_claus_tone2:", + "category": "people", + "aliases": [ + ":mother_christmas_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤶🏼" + }, + "mrs_claus_tone3": { + "unicode": "1F936-1F3FD", + "unicode_alternates": [], + "name": "mother christmas tone 3", + "shortname": ":mrs_claus_tone3:", + "category": "people", + "aliases": [ + ":mother_christmas_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤶🏽" + }, + "mrs_claus_tone4": { + "unicode": "1F936-1F3FE", + "unicode_alternates": [], + "name": "mother christmas tone 4", + "shortname": ":mrs_claus_tone4:", + "category": "people", + "aliases": [ + ":mother_christmas_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤶🏾" + }, + "mrs_claus_tone5": { + "unicode": "1F936-1F3FF", + "unicode_alternates": [], + "name": "mother christmas tone 5", + "shortname": ":mrs_claus_tone5:", + "category": "people", + "aliases": [ + ":mother_christmas_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤶🏿" + }, "muscle": { "unicode": "1F4AA", "unicode_alternates": [], "name": "flexed biceps", "shortname": ":muscle:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18110,13 +20338,20 @@ "hand", "strong", "muscle", - "bicep" + "bicep", + "body", + "hands", + "workout", + "win", + "diversity", + "feminist", + "boys night" ], "moji": "💪" }, "muscle_tone1": { "unicode": "1F4AA-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "flexed biceps tone 1", "shortname": ":muscle_tone1:", "category": "people", @@ -18129,11 +20364,12 @@ "strong", "muscle", "bicep" - ] + ], + "moji": "💪🏻" }, "muscle_tone2": { "unicode": "1F4AA-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "flexed biceps tone 2", "shortname": ":muscle_tone2:", "category": "people", @@ -18146,11 +20382,12 @@ "strong", "muscle", "bicep" - ] + ], + "moji": "💪🏼" }, "muscle_tone3": { "unicode": "1F4AA-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "flexed biceps tone 3", "shortname": ":muscle_tone3:", "category": "people", @@ -18163,11 +20400,12 @@ "strong", "muscle", "bicep" - ] + ], + "moji": "💪🏽" }, "muscle_tone4": { "unicode": "1F4AA-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "flexed biceps tone 4", "shortname": ":muscle_tone4:", "category": "people", @@ -18180,11 +20418,12 @@ "strong", "muscle", "bicep" - ] + ], + "moji": "💪🏾" }, "muscle_tone5": { "unicode": "1F4AA-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "flexed biceps tone 5", "shortname": ":muscle_tone5:", "category": "people", @@ -18197,7 +20436,8 @@ "strong", "muscle", "bicep" - ] + ], + "moji": "💪🏿" }, "mushroom": { "unicode": "1F344", @@ -18213,7 +20453,9 @@ "mushroom", "fungi", "food", - "fungus" + "fungus", + "nature", + "drugs" ], "moji": "🍄" }, @@ -18222,7 +20464,7 @@ "unicode_alternates": [], "name": "musical keyboard", "shortname": ":musical_keyboard:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18230,10 +20472,9 @@ "piano", "music", "keyboard", - "piano", "organ", - "instrument", - "electric" + "electric", + "instruments" ], "moji": "🎹" }, @@ -18242,7 +20483,7 @@ "unicode_alternates": [], "name": "musical note", "shortname": ":musical_note:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18250,8 +20491,9 @@ "musical", "music", "note", - "music", - "sound" + "sound", + "instruments", + "symbol" ], "moji": "🎵" }, @@ -18260,7 +20502,7 @@ "unicode_alternates": [], "name": "musical score", "shortname": ":musical_score:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18269,10 +20511,10 @@ "music", "musical", "score", - "clef", "g-clef", "stave", - "staff" + "staff", + "instruments" ], "moji": "🎼" }, @@ -18281,12 +20523,14 @@ "unicode_alternates": [], "name": "speaker with cancellation stroke", "shortname": ":mute:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "sound", - "volume" + "volume", + "alarm", + "symbol" ], "moji": "🔇" }, @@ -18295,18 +20539,24 @@ "unicode_alternates": [], "name": "nail polish", "shortname": ":nail_care:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "beauty", - "manicure" + "manicure", + "women", + "body", + "hands", + "nailpolish", + "diversity", + "girls night" ], "moji": "💅" }, "nail_care_tone1": { "unicode": "1F485-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nail polish tone 1", "shortname": ":nail_care_tone1:", "category": "people", @@ -18315,11 +20565,12 @@ "keywords": [ "beauty", "manicure" - ] + ], + "moji": "💅🏻" }, "nail_care_tone2": { "unicode": "1F485-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nail polish tone 2", "shortname": ":nail_care_tone2:", "category": "people", @@ -18328,11 +20579,12 @@ "keywords": [ "beauty", "manicure" - ] + ], + "moji": "💅🏼" }, "nail_care_tone3": { "unicode": "1F485-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nail polish tone 3", "shortname": ":nail_care_tone3:", "category": "people", @@ -18341,11 +20593,12 @@ "keywords": [ "beauty", "manicure" - ] + ], + "moji": "💅🏽" }, "nail_care_tone4": { "unicode": "1F485-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nail polish tone 4", "shortname": ":nail_care_tone4:", "category": "people", @@ -18354,11 +20607,12 @@ "keywords": [ "beauty", "manicure" - ] + ], + "moji": "💅🏾" }, "nail_care_tone5": { "unicode": "1F485-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nail polish tone 5", "shortname": ":nail_care_tone5:", "category": "people", @@ -18367,28 +20621,43 @@ "keywords": [ "beauty", "manicure" - ] + ], + "moji": "💅🏿" }, "name_badge": { "unicode": "1F4DB", "unicode_alternates": [], "name": "name badge", "shortname": ":name_badge:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "fire", - "forbid" + "forbid", + "work" ], "moji": "📛" }, + "nauseated_face": { + "unicode": "1F922", + "unicode_alternates": [], + "name": "nauseated face", + "shortname": ":nauseated_face:", + "category": "people", + "aliases": [ + ":sick:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤢" + }, "necktie": { "unicode": "1F454", "unicode_alternates": [], "name": "necktie", "shortname": ":necktie:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18405,20 +20674,21 @@ "unicode_alternates": [], "name": "negative squared cross mark", "shortname": ":negative_squared_cross_mark:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "deny", "green-square", "no", - "x" + "x", + "symbol" ], "moji": "❎" }, "nerd": { "unicode": "1F913", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nerd face", "shortname": ":nerd:", "category": "people", @@ -18426,31 +20696,18 @@ ":nerd_face:" ], "aliases_ascii": [], - "keywords": [] - }, - "network": { - "unicode": "1F5A7", - "unicode_alternates": [], - "name": "three networked computers", - "shortname": ":network:", - "category": "objects_symbols", - "aliases": [ - ":three_networked_computers:" - ], - "aliases_ascii": [], "keywords": [ - "lan", - "wan", - "network", - "technology" - ] + "smiley", + "glasses" + ], + "moji": "🤓" }, "neutral_face": { "unicode": "1F610", "unicode_alternates": [], "name": "neutral face", "shortname": ":neutral_face:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18459,7 +20716,11 @@ "neutral", "objective", "impartial", - "blank" + "blank", + "mad", + "smiley", + "shrug", + "emotion" ], "moji": "😐" }, @@ -18468,11 +20729,12 @@ "unicode_alternates": [], "name": "squared new", "shortname": ":new:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "symbol" ], "moji": "🆕" }, @@ -18491,7 +20753,8 @@ "sky", "night", "cheese", - "phase" + "phase", + "space" ], "moji": "🌑" }, @@ -18512,7 +20775,9 @@ "sky", "night", "cheese", - "phase" + "phase", + "space", + "goodnight" ], "moji": "🌚" }, @@ -18526,7 +20791,9 @@ "aliases_ascii": [], "keywords": [ "headline", - "press" + "press", + "office", + "write" ], "moji": "📰" }, @@ -18535,19 +20802,22 @@ "unicode_alternates": [], "name": "rolled-up newspaper", "shortname": ":newspaper2:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":rolled_up_newspaper:" ], "aliases_ascii": [], "keywords": [ "headline", - "press" - ] + "press", + "office", + "write" + ], + "moji": "🗞" }, "ng": { "unicode": "1F196", - "unicode_alternates": "", + "unicode_alternates": [], "name": "squared ng", "shortname": ":ng:", "category": "symbols", @@ -18558,14 +20828,15 @@ "no good", "symbol", "word" - ] + ], + "moji": "🆖" }, "night_with_stars": { "unicode": "1F303", "unicode_alternates": [], "name": "night with stars", "shortname": ":night_with_stars:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18575,7 +20846,11 @@ "evening", "planets", "space", - "sky" + "sky", + "places", + "building", + "vacation", + "goodnight" ], "moji": "🌃" }, @@ -18585,15 +20860,18 @@ "unicode_alternates": [ "0039-FE0F-20E3" ], - "name": "digit nine", + "name": "keycap digit nine", "shortname": ":nine:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "9", "blue-square", - "numbers" + "numbers", + "number", + "math", + "symbol" ] }, "no_bell": { @@ -18601,13 +20879,15 @@ "unicode_alternates": [], "name": "bell with cancellation stroke", "shortname": ":no_bell:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "mute", "sound", - "volume" + "volume", + "alarm", + "symbol" ], "moji": "🔕" }, @@ -18616,7 +20896,7 @@ "unicode_alternates": [], "name": "no bicycles", "shortname": ":no_bicycles:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18624,7 +20904,8 @@ "prohibited", "bicycle", "bike pedal", - "no" + "no", + "symbol" ], "moji": "🚳" }, @@ -18635,7 +20916,7 @@ ], "name": "no entry", "shortname": ":no_entry:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18644,7 +20925,9 @@ "limit", "privacy", "security", - "stop" + "stop", + "symbol", + "circle" ], "moji": "⛔" }, @@ -18653,7 +20936,7 @@ "unicode_alternates": [], "name": "no entry sign", "shortname": ":no_entry_sign:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18663,8 +20946,9 @@ "limit", "stop", "no", - "stop", - "entry" + "entry", + "symbol", + "circle" ], "moji": "🚫" }, @@ -18673,7 +20957,7 @@ "unicode_alternates": [], "name": "face with no good gesture", "shortname": ":no_good:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18684,13 +20968,17 @@ "stop", "nope", "don't", - "not" + "not", + "people", + "women", + "diversity", + "girls night" ], "moji": "🙅" }, "no_good_tone1": { "unicode": "1F645-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with no good gesture tone 1", "shortname": ":no_good_tone1:", "category": "people", @@ -18708,11 +20996,12 @@ "hand", "person", "prohibited" - ] + ], + "moji": "🙅🏻" }, "no_good_tone2": { "unicode": "1F645-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with no good gesture tone 2", "shortname": ":no_good_tone2:", "category": "people", @@ -18730,11 +21019,12 @@ "hand", "person", "prohibited" - ] + ], + "moji": "🙅🏼" }, "no_good_tone3": { "unicode": "1F645-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with no good gesture tone 3", "shortname": ":no_good_tone3:", "category": "people", @@ -18752,11 +21042,12 @@ "hand", "person", "prohibited" - ] + ], + "moji": "🙅🏽" }, "no_good_tone4": { "unicode": "1F645-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with no good gesture tone 4", "shortname": ":no_good_tone4:", "category": "people", @@ -18774,11 +21065,12 @@ "hand", "person", "prohibited" - ] + ], + "moji": "🙅🏾" }, "no_good_tone5": { "unicode": "1F645-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with no good gesture tone 5", "shortname": ":no_good_tone5:", "category": "people", @@ -18796,19 +21088,22 @@ "hand", "person", "prohibited" - ] + ], + "moji": "🙅🏿" }, "no_mobile_phones": { "unicode": "1F4F5", "unicode_alternates": [], "name": "no mobile phones", "shortname": ":no_mobile_phones:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "iphone", - "mute" + "mute", + "symbol", + "phone" ], "moji": "📵" }, @@ -18817,7 +21112,7 @@ "unicode_alternates": [], "name": "face without mouth", "shortname": ":no_mouth:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":-X", @@ -18835,7 +21130,11 @@ "hellokitty", "mouth", "silent", - "vapid" + "vapid", + "mad", + "smiley", + "neutral", + "emotion" ], "moji": "😶" }, @@ -18844,7 +21143,7 @@ "unicode_alternates": [], "name": "no pedestrians", "shortname": ":no_pedestrians:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18857,7 +21156,8 @@ "stroll", "stride", "foot", - "feet" + "feet", + "symbol" ], "moji": "🚷" }, @@ -18866,20 +21166,20 @@ "unicode_alternates": [], "name": "no smoking symbol", "shortname": ":no_smoking:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "cigarette", "no", "smoking", - "cigarette", "smoke", "cancer", "lungs", "inhale", "tar", - "nicotine" + "nicotine", + "symbol" ], "moji": "🚭" }, @@ -18888,7 +21188,7 @@ "unicode_alternates": [], "name": "non-potable water symbol", "shortname": ":non-potable_water:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -18901,7 +21201,8 @@ "dirty", "gross", "aqua", - "h20" + "h20", + "symbol" ], "moji": "🚱" }, @@ -18910,18 +21211,20 @@ "unicode_alternates": [], "name": "nose", "shortname": ":nose:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "smell", - "sniff" + "sniff", + "body", + "diversity" ], "moji": "👃" }, "nose_tone1": { "unicode": "1F443-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nose tone 1", "shortname": ":nose_tone1:", "category": "people", @@ -18930,11 +21233,12 @@ "keywords": [ "smell", "sniff" - ] + ], + "moji": "👃🏻" }, "nose_tone2": { "unicode": "1F443-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nose tone 2", "shortname": ":nose_tone2:", "category": "people", @@ -18943,11 +21247,12 @@ "keywords": [ "smell", "sniff" - ] + ], + "moji": "👃🏼" }, "nose_tone3": { "unicode": "1F443-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nose tone 3", "shortname": ":nose_tone3:", "category": "people", @@ -18956,11 +21261,12 @@ "keywords": [ "smell", "sniff" - ] + ], + "moji": "👃🏽" }, "nose_tone4": { "unicode": "1F443-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nose tone 4", "shortname": ":nose_tone4:", "category": "people", @@ -18969,11 +21275,12 @@ "keywords": [ "smell", "sniff" - ] + ], + "moji": "👃🏾" }, "nose_tone5": { "unicode": "1F443-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "nose tone 5", "shortname": ":nose_tone5:", "category": "people", @@ -18982,37 +21289,8 @@ "keywords": [ "smell", "sniff" - ] - }, - "note": { - "unicode": "1F5C9", - "unicode_alternates": [], - "name": "note page", - "shortname": ":note:", - "category": "objects_symbols", - "aliases": [ - ":note_page:" - ], - "aliases_ascii": [], - "keywords": [ - "stationery", - "post-it" - ] - }, - "note_empty": { - "unicode": "1F5C6", - "unicode_alternates": [], - "name": "empty note page", - "shortname": ":note_empty:", - "category": "objects_symbols", - "aliases": [ - ":empty_note_page:" ], - "aliases_ascii": [], - "keywords": [ - "stationery", - "post-it" - ] + "moji": "👃🏿" }, "notebook": { "unicode": "1F4D3", @@ -19026,7 +21304,10 @@ "notes", "paper", "record", - "stationery" + "stationery", + "object", + "office", + "write" ], "moji": "📓" }, @@ -19042,71 +21323,48 @@ "classroom", "notes", "paper", - "record" + "record", + "object", + "office", + "write" ], "moji": "📔" }, - "notepad": { - "unicode": "1F5CA", - "unicode_alternates": [], - "name": "note pad", - "shortname": ":notepad:", - "category": "objects_symbols", - "aliases": [ - ":note_pad:" - ], - "aliases_ascii": [], - "keywords": [ - "stationery", - "post-it" - ] - }, - "notepad_empty": { - "unicode": "1F5C7", - "unicode_alternates": [], - "name": "empty note pad", - "shortname": ":notepad_empty:", - "category": "objects_symbols", - "aliases": [ - ":empty_note_pad:" - ], - "aliases_ascii": [], - "keywords": [ - "stationery", - "post-it" - ] - }, "notepad_spiral": { "unicode": "1F5D2", "unicode_alternates": [], "name": "spiral note pad", "shortname": ":notepad_spiral:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":spiral_note_pad:" ], "aliases_ascii": [], "keywords": [ - "stationery" - ] + "stationery", + "work", + "office", + "write" + ], + "moji": "🗒" }, "notes": { "unicode": "1F3B6", "unicode_alternates": [], "name": "multiple musical notes", "shortname": ":notes:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "music", "score", "musical", - "music", "notes", - "music", "sound", - "melody" + "melody", + "instruments", + "symbol" ], "moji": "🎶" }, @@ -19120,7 +21378,10 @@ "aliases_ascii": [], "keywords": [ "handy", - "tools" + "tools", + "object", + "tool", + "nutcase" ], "moji": "🔩" }, @@ -19131,12 +21392,13 @@ ], "name": "heavy large circle", "shortname": ":o:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "circle", - "round" + "round", + "symbol" ], "moji": "⭕" }, @@ -19145,13 +21407,14 @@ "unicode_alternates": [], "name": "negative squared latin capital letter o", "shortname": ":o2:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", "letter", - "red-square" + "red-square", + "symbol" ], "moji": "🅾" }, @@ -19168,13 +21431,29 @@ "water", "wave", "ocean", - "wave", "surf", "beach", - "tide" + "tide", + "weather", + "boat", + "tropical", + "swim" ], "moji": "🌊" }, + "octagonal_sign": { + "unicode": "1F6D1", + "unicode_alternates": [], + "name": "octagonal sign", + "shortname": ":octagonal_sign:", + "category": "symbols", + "aliases": [ + ":stop_sign:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🛑" + }, "octopus": { "unicode": "1F419", "unicode_alternates": [], @@ -19187,7 +21466,8 @@ "animal", "creature", "ocean", - "sea" + "sea", + "wildlife" ], "moji": "🐙" }, @@ -19196,7 +21476,7 @@ "unicode_alternates": [], "name": "oden", "shortname": ":oden:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -19214,13 +21494,14 @@ "unicode_alternates": [], "name": "office building", "shortname": ":office:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "building", "bureau", - "work" + "work", + "places" ], "moji": "🏢" }, @@ -19229,28 +21510,31 @@ "unicode_alternates": [], "name": "oil drum", "shortname": ":oil:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":oil_drum:" ], "aliases_ascii": [], "keywords": [ - "petroleum" - ] + "petroleum", + "object" + ], + "moji": "🛢" }, "ok": { "unicode": "1F197", "unicode_alternates": [], "name": "squared ok", "shortname": ":ok:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "agree", "blue-square", "good", - "yes" + "yes", + "symbol" ], "moji": "🆗" }, @@ -19259,7 +21543,7 @@ "unicode_alternates": [], "name": "ok hand sign", "shortname": ":ok_hand:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -19273,13 +21557,19 @@ "marijuana", "joint", "pot", - "420" + "420", + "body", + "hands", + "hi", + "diversity", + "good", + "beautiful" ], "moji": "👌" }, "ok_hand_tone1": { "unicode": "1F44C-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ok hand sign tone 1", "shortname": ":ok_hand_tone1:", "category": "people", @@ -19296,11 +21586,12 @@ "joint", "pot", "420" - ] + ], + "moji": "👌🏻" }, "ok_hand_tone2": { "unicode": "1F44C-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ok hand sign tone 2", "shortname": ":ok_hand_tone2:", "category": "people", @@ -19317,11 +21608,12 @@ "joint", "pot", "420" - ] + ], + "moji": "👌🏼" }, "ok_hand_tone3": { "unicode": "1F44C-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ok hand sign tone 3", "shortname": ":ok_hand_tone3:", "category": "people", @@ -19338,11 +21630,12 @@ "joint", "pot", "420" - ] + ], + "moji": "👌🏽" }, "ok_hand_tone4": { "unicode": "1F44C-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ok hand sign tone 4", "shortname": ":ok_hand_tone4:", "category": "people", @@ -19359,11 +21652,12 @@ "joint", "pot", "420" - ] + ], + "moji": "👌🏾" }, "ok_hand_tone5": { "unicode": "1F44C-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "ok hand sign tone 5", "shortname": ":ok_hand_tone5:", "category": "people", @@ -19380,14 +21674,15 @@ "joint", "pot", "420" - ] + ], + "moji": "👌🏿" }, "ok_woman": { "unicode": "1F646", "unicode_alternates": [], "name": "face with ok gesture", "shortname": ":ok_woman:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ "*\\0/*", @@ -19404,13 +21699,15 @@ "yes", "ok", "okay", - "accept" + "accept", + "people", + "diversity" ], "moji": "🙆" }, "ok_woman_tone1": { "unicode": "1F646-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with ok gesture tone1", "shortname": ":ok_woman_tone1:", "category": "people", @@ -19425,11 +21722,12 @@ "yes", "okay", "accept" - ] + ], + "moji": "🙆🏻" }, "ok_woman_tone2": { "unicode": "1F646-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with ok gesture tone2", "shortname": ":ok_woman_tone2:", "category": "people", @@ -19444,11 +21742,12 @@ "yes", "okay", "accept" - ] + ], + "moji": "🙆🏼" }, "ok_woman_tone3": { "unicode": "1F646-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with ok gesture tone3", "shortname": ":ok_woman_tone3:", "category": "people", @@ -19463,11 +21762,12 @@ "yes", "okay", "accept" - ] + ], + "moji": "🙆🏽" }, "ok_woman_tone4": { "unicode": "1F646-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with ok gesture tone4", "shortname": ":ok_woman_tone4:", "category": "people", @@ -19482,11 +21782,12 @@ "yes", "okay", "accept" - ] + ], + "moji": "🙆🏾" }, "ok_woman_tone5": { "unicode": "1F646-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with ok gesture tone5", "shortname": ":ok_woman_tone5:", "category": "people", @@ -19501,26 +21802,30 @@ "yes", "okay", "accept" - ] + ], + "moji": "🙆🏿" }, "older_man": { "unicode": "1F474", "unicode_alternates": [], "name": "older man", "shortname": ":older_man:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "human", "male", - "men" + "men", + "people", + "old people", + "diversity" ], "moji": "👴" }, "older_man_tone1": { "unicode": "1F474-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older man tone 1", "shortname": ":older_man_tone1:", "category": "people", @@ -19531,11 +21836,12 @@ "men", "grandpa", "grandfather" - ] + ], + "moji": "👴🏻" }, "older_man_tone2": { "unicode": "1F474-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older man tone 2", "shortname": ":older_man_tone2:", "category": "people", @@ -19546,11 +21852,12 @@ "men", "grandpa", "grandfather" - ] + ], + "moji": "👴🏼" }, "older_man_tone3": { "unicode": "1F474-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older man tone 3", "shortname": ":older_man_tone3:", "category": "people", @@ -19561,11 +21868,12 @@ "men", "grandpa", "grandfather" - ] + ], + "moji": "👴🏽" }, "older_man_tone4": { "unicode": "1F474-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older man tone 4", "shortname": ":older_man_tone4:", "category": "people", @@ -19576,11 +21884,12 @@ "men", "grandpa", "grandfather" - ] + ], + "moji": "👴🏾" }, "older_man_tone5": { "unicode": "1F474-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older man tone 5", "shortname": ":older_man_tone5:", "category": "people", @@ -19591,14 +21900,15 @@ "men", "grandpa", "grandfather" - ] + ], + "moji": "👴🏿" }, "older_woman": { "unicode": "1F475", "unicode_alternates": [], "name": "older woman", "shortname": ":older_woman:", - "category": "emoticons", + "category": "people", "aliases": [ ":grandma:" ], @@ -19608,13 +21918,16 @@ "girl", "women", "grandma", - "grandmother" + "grandmother", + "people", + "old people", + "diversity" ], "moji": "👵" }, "older_woman_tone1": { "unicode": "1F475-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older woman tone 1", "shortname": ":older_woman_tone1:", "category": "people", @@ -19628,11 +21941,12 @@ "lady", "grandma", "grandmother" - ] + ], + "moji": "👵🏻" }, "older_woman_tone2": { "unicode": "1F475-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older woman tone 2", "shortname": ":older_woman_tone2:", "category": "people", @@ -19646,11 +21960,12 @@ "lady", "grandma", "grandmother" - ] + ], + "moji": "👵🏼" }, "older_woman_tone3": { "unicode": "1F475-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older woman tone 3", "shortname": ":older_woman_tone3:", "category": "people", @@ -19664,11 +21979,12 @@ "lady", "grandma", "grandmother" - ] + ], + "moji": "👵🏽" }, "older_woman_tone4": { "unicode": "1F475-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older woman tone 4", "shortname": ":older_woman_tone4:", "category": "people", @@ -19682,11 +21998,12 @@ "lady", "grandma", "grandmother" - ] + ], + "moji": "👵🏾" }, "older_woman_tone5": { "unicode": "1F475-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "older woman tone 5", "shortname": ":older_woman_tone5:", "category": "people", @@ -19700,14 +22017,15 @@ "lady", "grandma", "grandmother" - ] + ], + "moji": "👵🏿" }, "om_symbol": { "unicode": "1F549", "unicode_alternates": [], "name": "om symbol", "shortname": ":om_symbol:", - "category": "objects_symbols", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -19718,20 +22036,24 @@ "dharmic", "buddhism", "jainism", - "meditate" - ] + "meditate", + "religion", + "symbol" + ], + "moji": "🕉" }, "on": { "unicode": "1F51B", "unicode_alternates": [], "name": "on with exclamation mark with left right arrow abo", "shortname": ":on:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "words" + "words", + "symbol" ], "moji": "🔛" }, @@ -19740,7 +22062,7 @@ "unicode_alternates": [], "name": "oncoming automobile", "shortname": ":oncoming_automobile:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -19748,8 +22070,8 @@ "transportation", "vehicle", "sedan", - "car", - "automobile" + "automobile", + "travel" ], "moji": "🚘" }, @@ -19758,7 +22080,7 @@ "unicode_alternates": [], "name": "oncoming bus", "shortname": ":oncoming_bus:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -19767,8 +22089,8 @@ "bus", "school", "city", - "transportation", - "public" + "public", + "travel" ], "moji": "🚍" }, @@ -19777,7 +22099,7 @@ "unicode_alternates": [], "name": "oncoming police car", "shortname": ":oncoming_police_car:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -19791,7 +22113,9 @@ "citation", "crime", "help", - "officer" + "officer", + "transportation", + "911" ], "moji": "🚔" }, @@ -19800,7 +22124,7 @@ "unicode_alternates": [], "name": "oncoming taxi", "shortname": ":oncoming_taxi:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -19812,7 +22136,9 @@ "automobile", "city", "transport", - "service" + "service", + "transportation", + "travel" ], "moji": "🚖" }, @@ -19822,15 +22148,18 @@ "unicode_alternates": [ "0031-FE0F-20E3" ], - "name": "digit one", + "name": "keycap digit one", "shortname": ":one:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "1", "blue-square", - "numbers" + "numbers", + "number", + "math", + "symbol" ] }, "open_file_folder": { @@ -19843,7 +22172,9 @@ "aliases_ascii": [], "keywords": [ "documents", - "load" + "load", + "work", + "office" ], "moji": "📂" }, @@ -19852,18 +22183,22 @@ "unicode_alternates": [], "name": "open hands sign", "shortname": ":open_hands:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "butterfly", - "fingers" + "fingers", + "body", + "hands", + "diversity", + "condolence" ], "moji": "👐" }, "open_hands_tone1": { "unicode": "1F450-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "open hands sign tone 1", "shortname": ":open_hands_tone1:", "category": "people", @@ -19872,11 +22207,12 @@ "keywords": [ "butterfly", "fingers" - ] + ], + "moji": "👐🏻" }, "open_hands_tone2": { "unicode": "1F450-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "open hands sign tone 2", "shortname": ":open_hands_tone2:", "category": "people", @@ -19885,11 +22221,12 @@ "keywords": [ "butterfly", "fingers" - ] + ], + "moji": "👐🏼" }, "open_hands_tone3": { "unicode": "1F450-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "open hands sign tone 3", "shortname": ":open_hands_tone3:", "category": "people", @@ -19898,11 +22235,12 @@ "keywords": [ "butterfly", "fingers" - ] + ], + "moji": "👐🏽" }, "open_hands_tone4": { "unicode": "1F450-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "open hands sign tone 4", "shortname": ":open_hands_tone4:", "category": "people", @@ -19911,11 +22249,12 @@ "keywords": [ "butterfly", "fingers" - ] + ], + "moji": "👐🏾" }, "open_hands_tone5": { "unicode": "1F450-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "open hands sign tone 5", "shortname": ":open_hands_tone5:", "category": "people", @@ -19924,14 +22263,15 @@ "keywords": [ "butterfly", "fingers" - ] + ], + "moji": "👐🏿" }, "open_mouth": { "unicode": "1F62E", "unicode_alternates": [], "name": "face with open mouth", "shortname": ":open_mouth:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":-O", @@ -19949,7 +22289,10 @@ "jaw", "gapping", "surprise", - "wow" + "wow", + "smiley", + "surprised", + "emotion" ], "moji": "😮" }, @@ -19958,7 +22301,7 @@ "unicode_alternates": [], "name": "ophiuchus", "shortname": ":ophiuchus:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -19972,28 +22315,11 @@ "zodiac", "purple-square", "sign", - "horoscope" + "horoscope", + "symbol" ], "moji": "⛎" }, - "optical_disk": { - "unicode": "1F5B8", - "unicode_alternates": [], - "name": "optical disc icon", - "shortname": ":optical_disk:", - "category": "objects_symbols", - "aliases": [ - ":optical_disc_icon:" - ], - "aliases_ascii": [], - "keywords": [ - "cd", - "dvd", - "disc", - "disk", - "technology" - ] - }, "orange_book": { "unicode": "1F4D9", "unicode_alternates": [], @@ -20005,13 +22331,17 @@ "keywords": [ "knowledge", "library", - "read" + "read", + "object", + "office", + "write", + "book" ], "moji": "📙" }, "orthodox_cross": { "unicode": "2626", - "unicode_alternates": "", + "unicode_alternates": [], "name": "orthodox cross", "shortname": ":orthodox_cross:", "category": "symbols", @@ -20021,7 +22351,8 @@ "christian", "religion", "symbol" - ] + ], + "moji": "☦" }, "outbox_tray": { "unicode": "1F4E4", @@ -20033,10 +22364,23 @@ "aliases_ascii": [], "keywords": [ "email", - "inbox" + "inbox", + "work", + "office" ], "moji": "📤" }, + "owl": { + "unicode": "1F989", + "unicode_alternates": [], + "name": "owl", + "shortname": ":owl:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦉" + }, "ox": { "unicode": "1F402", "unicode_alternates": [], @@ -20062,22 +22406,12 @@ "aliases_ascii": [], "keywords": [ "gift", - "mail" + "mail", + "object", + "office" ], "moji": "📦" }, - "page": { - "unicode": "1F5CF", - "unicode_alternates": [], - "name": "page", - "shortname": ":page:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "document" - ] - }, "page_facing_up": { "unicode": "1F4C4", "unicode_alternates": [], @@ -20087,7 +22421,10 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "documents" + "documents", + "work", + "office", + "write" ], "moji": "📄" }, @@ -20100,7 +22437,9 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "documents" + "documents", + "office", + "write" ], "moji": "📃" }, @@ -20114,28 +22453,18 @@ "aliases_ascii": [], "keywords": [ "bbcall", - "oldschool" + "oldschool", + "electronics", + "work" ], "moji": "📟" }, - "pages": { - "unicode": "1F5D0", - "unicode_alternates": [], - "name": "pages", - "shortname": ":pages:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "documents" - ] - }, "paintbrush": { "unicode": "1F58C", "unicode_alternates": [], "name": "lower left paintbrush", "shortname": ":paintbrush:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":lower_left_paintbrush:" ], @@ -20143,8 +22472,12 @@ "keywords": [ "brush", "art", - "painting" - ] + "painting", + "object", + "office", + "write" + ], + "moji": "🖌" }, "palm_tree": { "unicode": "1F334", @@ -20163,10 +22496,22 @@ "coconuts", "fronds", "warm", - "tropical" + "tropical", + "trees" ], "moji": "🌴" }, + "pancakes": { + "unicode": "1F95E", + "unicode_alternates": [], + "name": "pancakes", + "shortname": ":pancakes:", + "category": "food", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🥞" + }, "panda_face": { "unicode": "1F43C", "unicode_alternates": [], @@ -20189,7 +22534,9 @@ "bamboo", "china", "black", - "white" + "white", + "wildlife", + "roar" ], "moji": "🐼" }, @@ -20203,7 +22550,10 @@ "aliases_ascii": [], "keywords": [ "documents", - "stationery" + "stationery", + "object", + "work", + "office" ], "moji": "📎" }, @@ -20212,22 +22562,26 @@ "unicode_alternates": [], "name": "linked paperclips", "shortname": ":paperclips:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":linked_paperclips:" ], "aliases_ascii": [], "keywords": [ "documents", - "stationery" - ] + "stationery", + "object", + "work", + "office" + ], + "moji": "🖇" }, "park": { "unicode": "1F3DE", "unicode_alternates": [], "name": "national park", "shortname": ":park:", - "category": "travel_places", + "category": "travel", "aliases": [ ":national_park:" ], @@ -20238,8 +22592,13 @@ "wildlife", "forest", "wilderness", - "national" - ] + "national", + "travel", + "vacation", + "park", + "camp" + ], + "moji": "🏞" }, "parking": { "unicode": "1F17F", @@ -20248,14 +22607,15 @@ ], "name": "negative squared latin capital letter p", "shortname": ":parking:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", "blue-square", "cars", - "letter" + "letter", + "symbol" ], "moji": "🅿" }, @@ -20266,7 +22626,7 @@ ], "name": "part alternation mark", "shortname": ":part_alternation_mark:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -20279,7 +22639,8 @@ "cue", "letter", "m", - "japanese" + "japanese", + "symbol" ], "moji": "〽" }, @@ -20297,7 +22658,9 @@ "cloud", "morning", "nature", - "weather" + "weather", + "sky", + "sun" ], "moji": "⛅" }, @@ -20306,7 +22669,7 @@ "unicode_alternates": [], "name": "passport control", "shortname": ":passport_control:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -20317,13 +22680,14 @@ "travel", "control", "foreign", - "identification" + "identification", + "symbol" ], "moji": "🛂" }, "pause_button": { "unicode": "23F8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "double vertical bar", "shortname": ":pause_button:", "category": "symbols", @@ -20335,11 +22699,12 @@ "pause", "sound", "symbol" - ] + ], + "moji": "⏸" }, "peace": { "unicode": "262E", - "unicode_alternates": "", + "unicode_alternates": [], "name": "peace symbol", "shortname": ":peace:", "category": "symbols", @@ -20348,15 +22713,19 @@ ], "aliases_ascii": [], "keywords": [ - "sign" - ] + "sign", + "symbol", + "peace", + "drugs" + ], + "moji": "☮" }, "peach": { "unicode": "1F351", "unicode_alternates": [], "name": "peach", "shortname": ":peach:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -20364,26 +22733,39 @@ "fruit", "nature", "peach", - "fruit", "juicy", - "pit" + "pit", + "butt" ], "moji": "🍑" }, + "peanuts": { + "unicode": "1F95C", + "unicode_alternates": [], + "name": "peanuts", + "shortname": ":peanuts:", + "category": "food", + "aliases": [ + ":shelled_peanut:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥜" + }, "pear": { "unicode": "1F350", "unicode_alternates": [], "name": "pear", "shortname": ":pear:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ "fruit", "nature", "pear", - "fruit", - "shape" + "shape", + "food" ], "moji": "🍐" }, @@ -20392,7 +22774,7 @@ "unicode_alternates": [], "name": "lower left ballpoint pen", "shortname": ":pen_ballpoint:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":lower_left_ballpoint_pen:" ], @@ -20400,15 +22782,18 @@ "keywords": [ "write", "bic", - "ink" - ] + "ink", + "object", + "office" + ], + "moji": "🖊" }, "pen_fountain": { "unicode": "1F58B", "unicode_alternates": [], "name": "lower left fountain pen", "shortname": ":pen_fountain:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":lower_left_fountain_pen:" ], @@ -20416,8 +22801,11 @@ "keywords": [ "write", "calligraphy", - "ink" - ] + "ink", + "object", + "office" + ], + "moji": "🖋" }, "pencil": { "unicode": "1F4DD", @@ -20433,7 +22821,9 @@ "documents", "paper", "station", - "write" + "write", + "work", + "office" ], "moji": "📝" }, @@ -20450,26 +22840,12 @@ "keywords": [ "paper", "stationery", - "write" + "write", + "object", + "office" ], "moji": "✏" }, - "pencil3": { - "unicode": "1F589", - "unicode_alternates": [], - "name": "lower left pencil", - "shortname": ":pencil3:", - "category": "objects_symbols", - "aliases": [ - ":lower_left_pencil:" - ], - "aliases_ascii": [], - "keywords": [ - "paper", - "stationery", - "write" - ] - }, "penguin": { "unicode": "1F427", "unicode_alternates": [], @@ -20480,46 +22856,17 @@ "aliases_ascii": [], "keywords": [ "animal", - "nature" + "nature", + "wildlife" ], "moji": "🐧" }, - "pennant_black": { - "unicode": "1F3F2", - "unicode_alternates": [], - "name": "black pennant", - "shortname": ":pennant_black:", - "category": "objects_symbols", - "aliases": [ - ":black_pennant:" - ], - "aliases_ascii": [], - "keywords": [ - "flag", - "athletics" - ] - }, - "pennant_white": { - "unicode": "1F3F1", - "unicode_alternates": [], - "name": "white pennant", - "shortname": ":pennant_white:", - "category": "objects_symbols", - "aliases": [ - ":white_pennant:" - ], - "aliases_ascii": [], - "keywords": [ - "flag", - "athletics" - ] - }, "pensive": { "unicode": "1F614", "unicode_alternates": [], "name": "pensive face", "shortname": ":pensive:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -20532,7 +22879,10 @@ "reflective", "wistful", "meditate", - "serious" + "serious", + "smiley", + "emotion", + "rip" ], "moji": "😔" }, @@ -20541,7 +22891,7 @@ "unicode_alternates": [], "name": "performing arts", "shortname": ":performing_arts:", - "category": "places", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -20552,10 +22902,11 @@ "arts", "performance", "entertainment", - "acting", "story", "mask", - "masks" + "masks", + "theatre", + "movie" ], "moji": "🎭" }, @@ -20564,7 +22915,7 @@ "unicode_alternates": [], "name": "persevering face", "shortname": ":persevere:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ">.<" @@ -20575,7 +22926,11 @@ "face", "no", "sick", - "upset" + "upset", + "sad", + "smiley", + "angry", + "emotion" ], "moji": "😣" }, @@ -20584,7 +22939,7 @@ "unicode_alternates": [], "name": "person frowning", "shortname": ":person_frowning:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -20594,13 +22949,16 @@ "dejected", "rejected", "sad", - "frown" + "frown", + "people", + "women", + "diversity" ], "moji": "🙍" }, "person_frowning_tone1": { "unicode": "1F64D-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person frowning tone 1", "shortname": ":person_frowning_tone1:", "category": "people", @@ -20614,11 +22972,12 @@ "rejected", "sad", "frown" - ] + ], + "moji": "🙍🏻" }, "person_frowning_tone2": { "unicode": "1F64D-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person frowning tone 2", "shortname": ":person_frowning_tone2:", "category": "people", @@ -20632,11 +22991,12 @@ "rejected", "sad", "frown" - ] + ], + "moji": "🙍🏼" }, "person_frowning_tone3": { "unicode": "1F64D-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person frowning tone 3", "shortname": ":person_frowning_tone3:", "category": "people", @@ -20650,11 +23010,12 @@ "rejected", "sad", "frown" - ] + ], + "moji": "🙍🏽" }, "person_frowning_tone4": { "unicode": "1F64D-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person frowning tone 4", "shortname": ":person_frowning_tone4:", "category": "people", @@ -20668,11 +23029,12 @@ "rejected", "sad", "frown" - ] + ], + "moji": "🙍🏾" }, "person_frowning_tone5": { "unicode": "1F64D-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person frowning tone 5", "shortname": ":person_frowning_tone5:", "category": "people", @@ -20686,14 +23048,15 @@ "rejected", "sad", "frown" - ] + ], + "moji": "🙍🏿" }, "person_with_blond_hair": { "unicode": "1F471", "unicode_alternates": [], "name": "person with blond hair", "shortname": ":person_with_blond_hair:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -20703,13 +23066,16 @@ "young", "western", "westerner", - "occidental" + "occidental", + "people", + "men", + "diversity" ], "moji": "👱" }, "person_with_blond_hair_tone1": { "unicode": "1F471-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with blond hair tone 1", "shortname": ":person_with_blond_hair_tone1:", "category": "people", @@ -20723,11 +23089,12 @@ "western", "westerner", "occidental" - ] + ], + "moji": "👱🏻" }, "person_with_blond_hair_tone2": { "unicode": "1F471-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with blond hair tone 2", "shortname": ":person_with_blond_hair_tone2:", "category": "people", @@ -20741,11 +23108,12 @@ "western", "westerner", "occidental" - ] + ], + "moji": "👱🏼" }, "person_with_blond_hair_tone3": { "unicode": "1F471-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with blond hair tone 3", "shortname": ":person_with_blond_hair_tone3:", "category": "people", @@ -20759,11 +23127,12 @@ "western", "westerner", "occidental" - ] + ], + "moji": "👱🏽" }, "person_with_blond_hair_tone4": { "unicode": "1F471-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with blond hair tone 4", "shortname": ":person_with_blond_hair_tone4:", "category": "people", @@ -20777,11 +23146,12 @@ "western", "westerner", "occidental" - ] + ], + "moji": "👱🏾" }, "person_with_blond_hair_tone5": { "unicode": "1F471-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with blond hair tone 5", "shortname": ":person_with_blond_hair_tone5:", "category": "people", @@ -20795,14 +23165,15 @@ "western", "westerner", "occidental" - ] + ], + "moji": "👱🏿" }, "person_with_pouting_face": { "unicode": "1F64E", "unicode_alternates": [], "name": "person with pouting face", "shortname": ":person_with_pouting_face:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -20812,13 +23183,16 @@ "pout", "sexy", "cute", - "annoyed" + "annoyed", + "people", + "women", + "diversity" ], "moji": "🙎" }, "person_with_pouting_face_tone1": { "unicode": "1F64E-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with pouting face tone1", "shortname": ":person_with_pouting_face_tone1:", "category": "people", @@ -20832,11 +23206,12 @@ "sexy", "cute", "annoyed" - ] + ], + "moji": "🙎🏻" }, "person_with_pouting_face_tone2": { "unicode": "1F64E-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with pouting face tone2", "shortname": ":person_with_pouting_face_tone2:", "category": "people", @@ -20850,11 +23225,12 @@ "sexy", "cute", "annoyed" - ] + ], + "moji": "🙎🏼" }, "person_with_pouting_face_tone3": { "unicode": "1F64E-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with pouting face tone3", "shortname": ":person_with_pouting_face_tone3:", "category": "people", @@ -20868,11 +23244,12 @@ "sexy", "cute", "annoyed" - ] + ], + "moji": "🙎🏽" }, "person_with_pouting_face_tone4": { "unicode": "1F64E-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with pouting face tone4", "shortname": ":person_with_pouting_face_tone4:", "category": "people", @@ -20886,11 +23263,12 @@ "sexy", "cute", "annoyed" - ] + ], + "moji": "🙎🏾" }, "person_with_pouting_face_tone5": { "unicode": "1F64E-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with pouting face tone5", "shortname": ":person_with_pouting_face_tone5:", "category": "people", @@ -20904,11 +23282,12 @@ "sexy", "cute", "annoyed" - ] + ], + "moji": "🙎🏿" }, "pick": { "unicode": "26CF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "pick", "shortname": ":pick:", "category": "objects", @@ -20917,8 +23296,10 @@ "keywords": [ "mining", "object", - "tool" - ] + "tool", + "weapon" + ], + "moji": "⛏" }, "pig": { "unicode": "1F437", @@ -20976,7 +23357,6 @@ "food", "eat", "cute", - "oink", "pink", "smell", "truffle" @@ -20993,7 +23373,9 @@ "aliases_ascii": [], "keywords": [ "health", - "medicine" + "medicine", + "object", + "drugs" ], "moji": "💊" }, @@ -21002,7 +23384,7 @@ "unicode_alternates": [], "name": "pineapple", "shortname": ":pineapple:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21018,7 +23400,7 @@ }, "ping_pong": { "unicode": "1F3D3", - "unicode_alternates": "", + "unicode_alternates": [], "name": "table tennis paddle and ball", "shortname": ":ping_pong:", "category": "activity", @@ -21026,22 +23408,13 @@ ":table_tennis:" ], "aliases_ascii": [], - "keywords": [] - }, - "piracy": { - "unicode": "1F572", - "unicode_alternates": [], - "name": "no piracy", - "shortname": ":piracy:", - "category": "objects_symbols", - "aliases": [ - ":no_piracy:" - ], - "aliases_ascii": [], "keywords": [ - "theft", - "rule" - ] + "game", + "ball", + "sport", + "ping pong" + ], + "moji": "🏓" }, "pisces": { "unicode": "2653", @@ -21050,7 +23423,7 @@ ], "name": "pisces", "shortname": ":pisces:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21063,9 +23436,8 @@ "zodiac", "sign", "purple-square", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♓" }, @@ -21074,7 +23446,7 @@ "unicode_alternates": [], "name": "slice of pizza", "shortname": ":pizza:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21086,13 +23458,14 @@ "italian", "italy", "slice", - "peperoni" + "peperoni", + "boys night" ], "moji": "🍕" }, "place_of_worship": { "unicode": "1F6D0", - "unicode_alternates": "", + "unicode_alternates": [], "name": "place of worship", "shortname": ":place_of_worship:", "category": "symbols", @@ -21100,11 +23473,16 @@ ":worship_symbol:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "religion", + "symbol", + "pray" + ], + "moji": "🛐" }, "play_pause": { "unicode": "23EF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "black right-pointing double triangle with double vertical bar", "shortname": ":play_pause:", "category": "symbols", @@ -21117,26 +23495,30 @@ "right", "sound", "symbol" - ] + ], + "moji": "⏯" }, "point_down": { "unicode": "1F447", "unicode_alternates": [], "name": "white down pointing backhand index", "shortname": ":point_down:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "direction", "fingers", - "hand" + "hand", + "body", + "hands", + "diversity" ], "moji": "👇" }, "point_down_tone1": { "unicode": "1F447-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white down pointing backhand index tone 1", "shortname": ":point_down_tone1:", "category": "people", @@ -21146,11 +23528,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👇🏻" }, "point_down_tone2": { "unicode": "1F447-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white down pointing backhand index tone 2", "shortname": ":point_down_tone2:", "category": "people", @@ -21160,11 +23543,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👇🏼" }, "point_down_tone3": { "unicode": "1F447-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white down pointing backhand index tone 3", "shortname": ":point_down_tone3:", "category": "people", @@ -21174,11 +23558,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👇🏽" }, "point_down_tone4": { "unicode": "1F447-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white down pointing backhand index tone 4", "shortname": ":point_down_tone4:", "category": "people", @@ -21188,11 +23573,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👇🏾" }, "point_down_tone5": { "unicode": "1F447-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white down pointing backhand index tone 5", "shortname": ":point_down_tone5:", "category": "people", @@ -21202,26 +23588,31 @@ "direction", "finger", "hand" - ] + ], + "moji": "👇🏿" }, "point_left": { "unicode": "1F448", "unicode_alternates": [], "name": "white left pointing backhand index", "shortname": ":point_left:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "direction", "fingers", - "hand" + "hand", + "body", + "hands", + "hi", + "diversity" ], "moji": "👈" }, "point_left_tone1": { "unicode": "1F448-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white left pointing backhand index tone 1", "shortname": ":point_left_tone1:", "category": "people", @@ -21231,11 +23622,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👈🏻" }, "point_left_tone2": { "unicode": "1F448-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white left pointing backhand index tone 2", "shortname": ":point_left_tone2:", "category": "people", @@ -21245,11 +23637,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👈🏼" }, "point_left_tone3": { "unicode": "1F448-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white left pointing backhand index tone 3", "shortname": ":point_left_tone3:", "category": "people", @@ -21259,11 +23652,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👈🏽" }, "point_left_tone4": { "unicode": "1F448-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white left pointing backhand index tone 4", "shortname": ":point_left_tone4:", "category": "people", @@ -21273,11 +23667,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👈🏾" }, "point_left_tone5": { "unicode": "1F448-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white left pointing backhand index tone 5", "shortname": ":point_left_tone5:", "category": "people", @@ -21287,26 +23682,31 @@ "direction", "finger", "hand" - ] + ], + "moji": "👈🏿" }, "point_right": { "unicode": "1F449", "unicode_alternates": [], "name": "white right pointing backhand index", "shortname": ":point_right:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "direction", "fingers", - "hand" + "hand", + "body", + "hands", + "hi", + "diversity" ], "moji": "👉" }, "point_right_tone1": { "unicode": "1F449-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white right pointing backhand index tone 1", "shortname": ":point_right_tone1:", "category": "people", @@ -21316,11 +23716,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👉🏻" }, "point_right_tone2": { "unicode": "1F449-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white right pointing backhand index tone 2", "shortname": ":point_right_tone2:", "category": "people", @@ -21330,11 +23731,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👉🏼" }, "point_right_tone3": { "unicode": "1F449-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white right pointing backhand index tone 3", "shortname": ":point_right_tone3:", "category": "people", @@ -21344,11 +23746,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👉🏽" }, "point_right_tone4": { "unicode": "1F449-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white right pointing backhand index tone 4", "shortname": ":point_right_tone4:", "category": "people", @@ -21358,11 +23761,12 @@ "direction", "finger", "hand" - ] + ], + "moji": "👉🏾" }, "point_right_tone5": { "unicode": "1F449-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white right pointing backhand index tone 5", "shortname": ":point_right_tone5:", "category": "people", @@ -21372,7 +23776,8 @@ "direction", "finger", "hand" - ] + ], + "moji": "👉🏿" }, "point_up": { "unicode": "261D", @@ -21381,13 +23786,17 @@ ], "name": "white up pointing index", "shortname": ":point_up:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "direction", "fingers", - "hand" + "hand", + "body", + "hands", + "emojione", + "diversity" ], "moji": "☝" }, @@ -21396,19 +23805,22 @@ "unicode_alternates": [], "name": "white up pointing backhand index", "shortname": ":point_up_2:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "direction", "fingers", - "hand" + "hand", + "body", + "hands", + "diversity" ], "moji": "👆" }, "point_up_2_tone1": { "unicode": "1F446-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing backhand index tone 1", "shortname": ":point_up_2_tone1:", "category": "people", @@ -21419,11 +23831,12 @@ "finger", "hand", "one" - ] + ], + "moji": "👆🏻" }, "point_up_2_tone2": { "unicode": "1F446-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing backhand index tone 2", "shortname": ":point_up_2_tone2:", "category": "people", @@ -21434,11 +23847,12 @@ "finger", "hand", "one" - ] + ], + "moji": "👆🏼" }, "point_up_2_tone3": { "unicode": "1F446-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing backhand index tone 3", "shortname": ":point_up_2_tone3:", "category": "people", @@ -21449,11 +23863,12 @@ "finger", "hand", "one" - ] + ], + "moji": "👆🏽" }, "point_up_2_tone4": { "unicode": "1F446-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing backhand index tone 4", "shortname": ":point_up_2_tone4:", "category": "people", @@ -21464,11 +23879,12 @@ "finger", "hand", "one" - ] + ], + "moji": "👆🏾" }, "point_up_2_tone5": { "unicode": "1F446-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing backhand index tone 5", "shortname": ":point_up_2_tone5:", "category": "people", @@ -21479,11 +23895,12 @@ "finger", "hand", "one" - ] + ], + "moji": "👆🏿" }, "point_up_tone1": { "unicode": "261D-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing index tone 1", "shortname": ":point_up_tone1:", "category": "people", @@ -21494,11 +23911,12 @@ "finger", "hand", "one" - ] + ], + "moji": "☝🏻" }, "point_up_tone2": { "unicode": "261D-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing index tone 2", "shortname": ":point_up_tone2:", "category": "people", @@ -21509,11 +23927,12 @@ "finger", "hand", "one" - ] + ], + "moji": "☝🏼" }, "point_up_tone3": { "unicode": "261D-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing index tone 3", "shortname": ":point_up_tone3:", "category": "people", @@ -21524,11 +23943,12 @@ "finger", "hand", "one" - ] + ], + "moji": "☝🏽" }, "point_up_tone4": { "unicode": "261D-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing index tone 4", "shortname": ":point_up_tone4:", "category": "people", @@ -21539,11 +23959,12 @@ "finger", "hand", "one" - ] + ], + "moji": "☝🏾" }, "point_up_tone5": { "unicode": "261D-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white up pointing index tone 5", "shortname": ":point_up_tone5:", "category": "people", @@ -21554,14 +23975,15 @@ "finger", "hand", "one" - ] + ], + "moji": "☝🏿" }, "police_car": { "unicode": "1F693", "unicode_alternates": [], "name": "police car", "shortname": ":police_car:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21577,7 +23999,8 @@ "citation", "crime", "help", - "officer" + "officer", + "911" ], "moji": "🚓" }, @@ -21595,7 +24018,6 @@ "dog", "nature", "poodle", - "dog", "clip", "showy", "sophisticated", @@ -21608,7 +24030,7 @@ "unicode_alternates": [], "name": "pile of poo", "shortname": ":poop:", - "category": "emoticons", + "category": "people", "aliases": [ ":shit:", ":hankey:", @@ -21620,32 +24042,41 @@ "shit", "shitface", "turd", - "poo" + "poo", + "bathroom", + "sol", + "diarrhea" ], "moji": "💩" }, "popcorn": { "unicode": "1F37F", - "unicode_alternates": "", + "unicode_alternates": [], "name": "popcorn", "shortname": ":popcorn:", - "category": "foods", + "category": "food", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "food", + "parties" + ], + "moji": "🍿" }, "post_office": { "unicode": "1F3E3", "unicode_alternates": [], "name": "japanese post office", "shortname": ":post_office:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "building", "communication", - "email" + "email", + "places", + "post office" ], "moji": "🏣" }, @@ -21659,7 +24090,8 @@ "aliases_ascii": [], "keywords": [ "instrument", - "music" + "music", + "object" ], "moji": "📯" }, @@ -21674,7 +24106,8 @@ "keywords": [ "email", "envelope", - "letter" + "letter", + "object" ], "moji": "📮" }, @@ -21683,7 +24116,7 @@ "unicode_alternates": [], "name": "potable water symbol", "shortname": ":potable_water:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21699,27 +24132,40 @@ "clear", "clean", "aqua", - "h20" + "h20", + "symbol" ], "moji": "🚰" }, + "potato": { + "unicode": "1F954", + "unicode_alternates": [], + "name": "potato", + "shortname": ":potato:", + "category": "food", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🥔" + }, "pouch": { "unicode": "1F45D", "unicode_alternates": [], "name": "pouch", "shortname": ":pouch:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "accessories", "bag", "pouch", - "bag", "cosmetic", "packing", "grandma", - "makeup" + "makeup", + "women", + "fashion" ], "moji": "👝" }, @@ -21728,7 +24174,7 @@ "unicode_alternates": [], "name": "poultry leg", "shortname": ":poultry_leg:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21737,7 +24183,8 @@ "poultry", "leg", "chicken", - "fried" + "fried", + "holidays" ], "moji": "🍗" }, @@ -21759,13 +24206,9 @@ "uk", "pound", "britain", - "british", "banknote", - "money", - "currency", "paper", - "cash", - "bills" + "cash" ], "moji": "💷" }, @@ -21774,7 +24217,7 @@ "unicode_alternates": [], "name": "pouting cat face", "shortname": ":pouting_cat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21784,7 +24227,8 @@ "annoyed", "miffed", "glower", - "frown" + "frown", + "cat" ], "moji": "😾" }, @@ -21793,7 +24237,7 @@ "unicode_alternates": [], "name": "person with folded hands", "shortname": ":pray:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21807,13 +24251,19 @@ "hands", "sorrow", "regret", - "sorry" + "sorry", + "body", + "hi", + "luck", + "thank you", + "diversity", + "scientology" ], "moji": "🙏" }, "pray_tone1": { "unicode": "1F64F-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with folded hands tone 1", "shortname": ":pray_tone1:", "category": "people", @@ -21830,11 +24280,12 @@ "sorrow", "regret", "sorry" - ] + ], + "moji": "🙏🏻" }, "pray_tone2": { "unicode": "1F64F-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with folded hands tone 2", "shortname": ":pray_tone2:", "category": "people", @@ -21851,11 +24302,12 @@ "sorrow", "regret", "sorry" - ] + ], + "moji": "🙏🏼" }, "pray_tone3": { "unicode": "1F64F-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with folded hands tone 3", "shortname": ":pray_tone3:", "category": "people", @@ -21872,11 +24324,12 @@ "sorrow", "regret", "sorry" - ] + ], + "moji": "🙏🏽" }, "pray_tone4": { "unicode": "1F64F-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with folded hands tone 4", "shortname": ":pray_tone4:", "category": "people", @@ -21893,11 +24346,12 @@ "sorrow", "regret", "sorry" - ] + ], + "moji": "🙏🏾" }, "pray_tone5": { "unicode": "1F64F-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person with folded hands tone 5", "shortname": ":pray_tone5:", "category": "people", @@ -21914,24 +24368,173 @@ "sorrow", "regret", "sorry" - ] + ], + "moji": "🙏🏿" }, "prayer_beads": { "unicode": "1F4FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "prayer beads", "shortname": ":prayer_beads:", "category": "objects", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "object", + "rosary" + ], + "moji": "📿" + }, + "pregnant_woman": { + "unicode": "1F930", + "unicode_alternates": [], + "name": "pregnant woman", + "shortname": ":pregnant_woman:", + "category": "people", + "aliases": [ + ":expecting_woman:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤰" + }, + "pregnant_woman_tone1": { + "unicode": "1F930-1F3FB", + "unicode_alternates": [], + "name": "pregnant woman tone 1", + "shortname": ":pregnant_woman_tone1:", + "category": "people", + "aliases": [ + ":expecting_woman_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤰🏻" + }, + "pregnant_woman_tone2": { + "unicode": "1F930-1F3FC", + "unicode_alternates": [], + "name": "pregnant woman tone 2", + "shortname": ":pregnant_woman_tone2:", + "category": "people", + "aliases": [ + ":expecting_woman_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤰🏼" + }, + "pregnant_woman_tone3": { + "unicode": "1F930-1F3FD", + "unicode_alternates": [], + "name": "pregnant woman tone 3", + "shortname": ":pregnant_woman_tone3:", + "category": "people", + "aliases": [ + ":expecting_woman_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤰🏽" + }, + "pregnant_woman_tone4": { + "unicode": "1F930-1F3FE", + "unicode_alternates": [], + "name": "pregnant woman tone 4", + "shortname": ":pregnant_woman_tone4:", + "category": "people", + "aliases": [ + ":expecting_woman_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤰🏾" + }, + "pregnant_woman_tone5": { + "unicode": "1F930-1F3FF", + "unicode_alternates": [], + "name": "pregnant woman tone 5", + "shortname": ":pregnant_woman_tone5:", + "category": "people", + "aliases": [ + ":expecting_woman_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤰🏿" + }, + "prince": { + "unicode": "1F934", + "unicode_alternates": [], + "name": "prince", + "shortname": ":prince:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤴" + }, + "prince_tone1": { + "unicode": "1F934-1F3FB", + "unicode_alternates": [], + "name": "prince tone 1", + "shortname": ":prince_tone1:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤴🏻" + }, + "prince_tone2": { + "unicode": "1F934-1F3FC", + "unicode_alternates": [], + "name": "prince tone 2", + "shortname": ":prince_tone2:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤴🏼" + }, + "prince_tone3": { + "unicode": "1F934-1F3FD", + "unicode_alternates": [], + "name": "prince tone 3", + "shortname": ":prince_tone3:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤴🏽" + }, + "prince_tone4": { + "unicode": "1F934-1F3FE", + "unicode_alternates": [], + "name": "prince tone 4", + "shortname": ":prince_tone4:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤴🏾" + }, + "prince_tone5": { + "unicode": "1F934-1F3FF", + "unicode_alternates": [], + "name": "prince tone 5", + "shortname": ":prince_tone5:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤴🏿" }, "princess": { "unicode": "1F478", "unicode_alternates": [], "name": "princess", "shortname": ":princess:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -21947,13 +24550,18 @@ "queen", "daughter", "disney", - "high-maintenance" + "high-maintenance", + "people", + "women", + "diversity", + "beautiful", + "girls night" ], "moji": "👸" }, "princess_tone1": { "unicode": "1F478-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "princess tone 1", "shortname": ":princess_tone1:", "category": "people", @@ -21972,11 +24580,12 @@ "daughter", "disney", "high-maintenance" - ] + ], + "moji": "👸🏻" }, "princess_tone2": { "unicode": "1F478-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "princess tone 2", "shortname": ":princess_tone2:", "category": "people", @@ -21995,11 +24604,12 @@ "daughter", "disney", "high-maintenance" - ] + ], + "moji": "👸🏼" }, "princess_tone3": { "unicode": "1F478-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "princess tone 3", "shortname": ":princess_tone3:", "category": "people", @@ -22018,11 +24628,12 @@ "daughter", "disney", "high-maintenance" - ] + ], + "moji": "👸🏽" }, "princess_tone4": { "unicode": "1F478-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "princess tone 4", "shortname": ":princess_tone4:", "category": "people", @@ -22041,11 +24652,12 @@ "daughter", "disney", "high-maintenance" - ] + ], + "moji": "👸🏾" }, "princess_tone5": { "unicode": "1F478-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "princess tone 5", "shortname": ":princess_tone5:", "category": "people", @@ -22064,49 +24676,34 @@ "daughter", "disney", "high-maintenance" - ] + ], + "moji": "👸🏿" }, "printer": { "unicode": "1F5A8", "unicode_alternates": [], "name": "printer", "shortname": ":printer:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "hardcopy", "paper", "inkjet", - "laser" - ] - }, - "prohibited": { - "unicode": "1F6C7", - "unicode_alternates": [], - "name": "prohibited sign", - "shortname": ":prohibited:", - "category": "objects_symbols", - "aliases": [ - ":prohibited_sign:" + "laser", + "electronics", + "work", + "office" ], - "aliases_ascii": [], - "keywords": [ - "no", - "not", - "denied", - "disallow", - "forbid", - "limit", - "stop" - ] + "moji": "🖨" }, "projector": { "unicode": "1F4FD", "unicode_alternates": [], "name": "film projector", "shortname": ":projector:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":film_projector:" ], @@ -22117,26 +24714,35 @@ "motion", "picture", "8mm", - "16mm" - ] + "16mm", + "object", + "camera" + ], + "moji": "📽" }, "punch": { "unicode": "1F44A", "unicode_alternates": [], "name": "fisted hand sign", "shortname": ":punch:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "fist", - "hand" + "hand", + "body", + "hands", + "hi", + "fist bump", + "diversity", + "boys night" ], "moji": "👊" }, "punch_tone1": { "unicode": "1F44A-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "fisted hand sign tone 1", "shortname": ":punch_tone1:", "category": "people", @@ -22145,11 +24751,12 @@ "keywords": [ "fist", "punch" - ] + ], + "moji": "👊🏻" }, "punch_tone2": { "unicode": "1F44A-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "fisted hand sign tone 2", "shortname": ":punch_tone2:", "category": "people", @@ -22158,11 +24765,12 @@ "keywords": [ "fist", "punch" - ] + ], + "moji": "👊🏼" }, "punch_tone3": { "unicode": "1F44A-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "fisted hand sign tone 3", "shortname": ":punch_tone3:", "category": "people", @@ -22171,11 +24779,12 @@ "keywords": [ "fist", "punch" - ] + ], + "moji": "👊🏽" }, "punch_tone4": { "unicode": "1F44A-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "fisted hand sign tone 4", "shortname": ":punch_tone4:", "category": "people", @@ -22184,11 +24793,12 @@ "keywords": [ "fist", "punch" - ] + ], + "moji": "👊🏾" }, "punch_tone5": { "unicode": "1F44A-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "fisted hand sign tone 5", "shortname": ":punch_tone5:", "category": "people", @@ -22197,14 +24807,15 @@ "keywords": [ "fist", "punch" - ] + ], + "moji": "👊🏿" }, "purple_heart": { "unicode": "1F49C", "unicode_alternates": [], "name": "purple heart", "shortname": ":purple_heart:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22215,7 +24826,6 @@ "purple", "violet", "heart", - "love", "sensitive", "understanding", "compassionate", @@ -22224,7 +24834,8 @@ "honor", "royalty", "veteran", - "sacrifice" + "sacrifice", + "symbol" ], "moji": "💜" }, @@ -22233,7 +24844,7 @@ "unicode_alternates": [], "name": "purse", "shortname": ":purse:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22246,9 +24857,9 @@ "handbag", "coin bag", "accessory", - "money", "ladies", - "shopping" + "shopping", + "women" ], "moji": "👛" }, @@ -22261,28 +24872,18 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "stationery" + "stationery", + "object", + "office" ], "moji": "📌" }, - "pushpin_black": { - "unicode": "1F588", - "unicode_alternates": [], - "name": "black pushpin", - "shortname": ":pushpin_black:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "stationery" - ] - }, "put_litter_in_its_place": { "unicode": "1F6AE", "unicode_alternates": [], "name": "put litter in its place symbol", "shortname": ":put_litter_in_its_place:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22292,7 +24893,8 @@ "trash", "garbage", "receptacle", - "can" + "can", + "symbol" ], "moji": "🚮" }, @@ -22301,12 +24903,15 @@ "unicode_alternates": [], "name": "black question mark ornament", "shortname": ":question:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "confused", - "doubt" + "doubt", + "symbol", + "punctuation", + "wth" ], "moji": "❓" }, @@ -22320,7 +24925,8 @@ "aliases_ascii": [], "keywords": [ "animal", - "nature" + "nature", + "wildlife" ], "moji": "🐰" }, @@ -22339,7 +24945,8 @@ "bunny", "easter", "reproduction", - "prolific" + "prolific", + "wildlife" ], "moji": "🐇" }, @@ -22348,7 +24955,7 @@ "unicode_alternates": [], "name": "racing car", "shortname": ":race_car:", - "category": "activity", + "category": "travel", "aliases": [ ":racing_car:" ], @@ -22359,8 +24966,11 @@ "stock", "nascar", "speed", - "drive" - ] + "drive", + "transportation", + "car" + ], + "moji": "🏎" }, "racehorse": { "unicode": "1F40E", @@ -22391,7 +25001,8 @@ "gelding", "yearling", "thoroughbred", - "pony" + "pony", + "wildlife" ], "moji": "🐎" }, @@ -22407,7 +25018,8 @@ "communication", "music", "podcast", - "program" + "program", + "electronics" ], "moji": "📻" }, @@ -22416,17 +25028,19 @@ "unicode_alternates": [], "name": "radio button", "shortname": ":radio_button:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "input" + "input", + "symbol", + "circle" ], "moji": "🔘" }, "radioactive": { "unicode": "2622", - "unicode_alternates": "", + "unicode_alternates": [], "name": "radioactive sign", "shortname": ":radioactive:", "category": "symbols", @@ -22435,15 +25049,17 @@ ], "aliases_ascii": [], "keywords": [ - "symbol" - ] + "symbol", + "science" + ], + "moji": "☢" }, "rage": { "unicode": "1F621", "unicode_alternates": [], "name": "pouting face", "shortname": ":rage:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22454,7 +25070,9 @@ "pout", "anger", "rage", - "irate" + "irate", + "smiley", + "emotion" ], "moji": "😡" }, @@ -22463,7 +25081,7 @@ "unicode_alternates": [], "name": "railway car", "shortname": ":railway_car:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22473,7 +25091,8 @@ "rail", "car", "coach", - "train" + "train", + "travel" ], "moji": "🚃" }, @@ -22482,7 +25101,7 @@ "unicode_alternates": [], "name": "railway track", "shortname": ":railway_track:", - "category": "travel_places", + "category": "travel", "aliases": [ ":railroad_track:" ], @@ -22492,15 +25111,18 @@ "trolley", "subway", "locomotive", - "transit" - ] + "transit", + "travel", + "vacation" + ], + "moji": "🛤" }, "rainbow": { "unicode": "1F308", "unicode_alternates": [], "name": "rainbow", "shortname": ":rainbow:", - "category": "nature", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22516,28 +25138,114 @@ "spectrum", "refract", "leprechaun", - "gold" + "gold", + "weather", + "gay", + "rain" ], "moji": "🌈" }, + "raised_back_of_hand": { + "unicode": "1F91A", + "unicode_alternates": [], + "name": "raised back of hand", + "shortname": ":raised_back_of_hand:", + "category": "people", + "aliases": [ + ":back_of_hand:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤚" + }, + "raised_back_of_hand_tone1": { + "unicode": "1F91A-1F3FB", + "unicode_alternates": [], + "name": "raised back of hand tone 1", + "shortname": ":raised_back_of_hand_tone1:", + "category": "people", + "aliases": [ + ":back_of_hand_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤚🏻" + }, + "raised_back_of_hand_tone2": { + "unicode": "1F91A-1F3FC", + "unicode_alternates": [], + "name": "raised back of hand tone 2", + "shortname": ":raised_back_of_hand_tone2:", + "category": "people", + "aliases": [ + ":back_of_hand_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤚🏼" + }, + "raised_back_of_hand_tone3": { + "unicode": "1F91A-1F3FD", + "unicode_alternates": [], + "name": "raised back of hand tone 3", + "shortname": ":raised_back_of_hand_tone3:", + "category": "people", + "aliases": [ + ":back_of_hand_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤚🏽" + }, + "raised_back_of_hand_tone4": { + "unicode": "1F91A-1F3FE", + "unicode_alternates": [], + "name": "raised back of hand tone 4", + "shortname": ":raised_back_of_hand_tone4:", + "category": "people", + "aliases": [ + ":back_of_hand_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤚🏾" + }, + "raised_back_of_hand_tone5": { + "unicode": "1F91A-1F3FF", + "unicode_alternates": [], + "name": "raised back of hand tone 5", + "shortname": ":raised_back_of_hand_tone5:", + "category": "people", + "aliases": [ + ":back_of_hand_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤚🏿" + }, "raised_hand": { "unicode": "270B", "unicode_alternates": [], "name": "raised hand", "shortname": ":raised_hand:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "female", "girl", - "woman" + "woman", + "body", + "hands", + "hi", + "diversity", + "girls night" ], "moji": "✋" }, "raised_hand_tone1": { "unicode": "270B-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand tone 1", "shortname": ":raised_hand_tone1:", "category": "people", @@ -22547,11 +25255,12 @@ "female", "girl", "woman" - ] + ], + "moji": "✋🏻" }, "raised_hand_tone2": { "unicode": "270B-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand tone 2", "shortname": ":raised_hand_tone2:", "category": "people", @@ -22561,11 +25270,12 @@ "female", "girl", "woman" - ] + ], + "moji": "✋🏼" }, "raised_hand_tone3": { "unicode": "270B-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand tone 3", "shortname": ":raised_hand_tone3:", "category": "people", @@ -22575,11 +25285,12 @@ "female", "girl", "woman" - ] + ], + "moji": "✋🏽" }, "raised_hand_tone4": { "unicode": "270B-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand tone 4", "shortname": ":raised_hand_tone4:", "category": "people", @@ -22589,11 +25300,12 @@ "female", "girl", "woman" - ] + ], + "moji": "✋🏾" }, "raised_hand_tone5": { "unicode": "270B-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand tone 5", "shortname": ":raised_hand_tone5:", "category": "people", @@ -22603,14 +25315,15 @@ "female", "girl", "woman" - ] + ], + "moji": "✋🏿" }, "raised_hands": { "unicode": "1F64C", "unicode_alternates": [], "name": "person raising both hands in celebration", "shortname": ":raised_hands:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22619,13 +25332,19 @@ "winning", "woot", "yay", - "banzai" + "banzai", + "body", + "hands", + "diversity", + "perfect", + "good", + "parties" ], "moji": "🙌" }, "raised_hands_tone1": { "unicode": "1F64C-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person raising both hands in celebration tone 1", "shortname": ":raised_hands_tone1:", "category": "people", @@ -22639,11 +25358,12 @@ "yay", "banzai", "raised" - ] + ], + "moji": "🙌🏻" }, "raised_hands_tone2": { "unicode": "1F64C-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person raising both hands in celebration tone 2", "shortname": ":raised_hands_tone2:", "category": "people", @@ -22657,11 +25377,12 @@ "yay", "banzai", "raised" - ] + ], + "moji": "🙌🏼" }, "raised_hands_tone3": { "unicode": "1F64C-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person raising both hands in celebration tone 3", "shortname": ":raised_hands_tone3:", "category": "people", @@ -22675,11 +25396,12 @@ "yay", "banzai", "raised" - ] + ], + "moji": "🙌🏽" }, "raised_hands_tone4": { "unicode": "1F64C-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person raising both hands in celebration tone 4", "shortname": ":raised_hands_tone4:", "category": "people", @@ -22693,11 +25415,12 @@ "yay", "banzai", "raised" - ] + ], + "moji": "🙌🏾" }, "raised_hands_tone5": { "unicode": "1F64C-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "person raising both hands in celebration tone 5", "shortname": ":raised_hands_tone5:", "category": "people", @@ -22711,14 +25434,15 @@ "yay", "banzai", "raised" - ] + ], + "moji": "🙌🏿" }, "raising_hand": { "unicode": "1F64B", "unicode_alternates": [], "name": "happy person raising one hand", "shortname": ":raising_hand:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22729,13 +25453,16 @@ "raise", "notice", "attention", - "answer" + "answer", + "people", + "women", + "diversity" ], "moji": "🙋" }, "raising_hand_tone1": { "unicode": "1F64B-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "happy person raising one hand tone1", "shortname": ":raising_hand_tone1:", "category": "people", @@ -22749,11 +25476,12 @@ "notice", "attention", "answer" - ] + ], + "moji": "🙋🏻" }, "raising_hand_tone2": { "unicode": "1F64B-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "happy person raising one hand tone2", "shortname": ":raising_hand_tone2:", "category": "people", @@ -22767,11 +25495,12 @@ "notice", "attention", "answer" - ] + ], + "moji": "🙋🏼" }, "raising_hand_tone3": { "unicode": "1F64B-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "happy person raising one hand tone3", "shortname": ":raising_hand_tone3:", "category": "people", @@ -22785,11 +25514,12 @@ "notice", "attention", "answer" - ] + ], + "moji": "🙋🏽" }, "raising_hand_tone4": { "unicode": "1F64B-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "happy person raising one hand tone4", "shortname": ":raising_hand_tone4:", "category": "people", @@ -22803,11 +25533,12 @@ "notice", "attention", "answer" - ] + ], + "moji": "🙋🏾" }, "raising_hand_tone5": { "unicode": "1F64B-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "happy person raising one hand tone5", "shortname": ":raising_hand_tone5:", "category": "people", @@ -22821,7 +25552,8 @@ "notice", "attention", "answer" - ] + ], + "moji": "🙋🏿" }, "ram": { "unicode": "1F40F", @@ -22836,10 +25568,10 @@ "nature", "sheep", "ram", - "sheep", "male", "horn", - "horns" + "horns", + "wildlife" ], "moji": "🐏" }, @@ -22848,7 +25580,7 @@ "unicode_alternates": [], "name": "steaming bowl", "shortname": ":ramen:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22860,7 +25592,8 @@ "noodles", "bowl", "steaming", - "soup" + "soup", + "japan" ], "moji": "🍜" }, @@ -22884,7 +25617,7 @@ }, "record_button": { "unicode": "23FA", - "unicode_alternates": "", + "unicode_alternates": [], "name": "black circle for record", "shortname": ":record_button:", "category": "symbols", @@ -22892,8 +25625,10 @@ "aliases_ascii": [], "keywords": [ "sound", - "symbol" - ] + "symbol", + "circle" + ], + "moji": "⏺" }, "recycle": { "unicode": "267B", @@ -22902,14 +25637,15 @@ ], "name": "black universal recycling symbol", "shortname": ":recycle:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", "environment", "garbage", - "trash" + "trash", + "symbol" ], "moji": "♻" }, @@ -22918,12 +25654,14 @@ "unicode_alternates": [], "name": "automobile", "shortname": ":red_car:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "transportation", - "vehicle" + "vehicle", + "car", + "travel" ], "moji": "🚗" }, @@ -22932,11 +25670,14 @@ "unicode_alternates": [], "name": "large red circle", "shortname": ":red_circle:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "circle" ], "moji": "🔴" }, @@ -22946,12 +25687,13 @@ "unicode_alternates": [], "name": "registered sign", "shortname": ":registered:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "alphabet", - "circle" + "circle", + "symbol" ] }, "relaxed": { @@ -22961,7 +25703,7 @@ ], "name": "white smiling face", "shortname": ":relaxed:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22969,7 +25711,9 @@ "face", "happiness", "massage", - "smile" + "smile", + "happy", + "smiley" ], "moji": "☺" }, @@ -22978,7 +25722,7 @@ "unicode_alternates": [], "name": "relieved face", "shortname": ":relieved:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -22989,8 +25733,9 @@ "relaxed", "relieved", "satisfied", - "phew", - "relief" + "relief", + "smiley", + "emotion" ], "moji": "😌" }, @@ -22999,24 +25744,28 @@ "unicode_alternates": [], "name": "reminder ribbon", "shortname": ":reminder_ribbon:", - "category": "celebration", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ - "awareness" - ] + "awareness", + "award" + ], + "moji": "🎗" }, "repeat": { "unicode": "1F501", "unicode_alternates": [], "name": "clockwise rightwards and leftwards open circle arr", "shortname": ":repeat:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "loop", - "record" + "record", + "arrow", + "symbol" ], "moji": "🔁" }, @@ -23025,12 +25774,14 @@ "unicode_alternates": [], "name": "clockwise rightwards and leftwards open circle arr", "shortname": ":repeat_one:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "loop" + "loop", + "arrow", + "symbol" ], "moji": "🔂" }, @@ -23039,7 +25790,7 @@ "unicode_alternates": [], "name": "restroom", "shortname": ":restroom:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23051,7 +25802,8 @@ "restroom", "sign", "shared", - "toilet" + "toilet", + "symbol" ], "moji": "🚻" }, @@ -23060,7 +25812,7 @@ "unicode_alternates": [], "name": "revolving hearts", "shortname": ":revolving_hearts:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23074,7 +25826,8 @@ "moving", "circle", "multiple", - "lovers" + "lovers", + "symbol" ], "moji": "💞" }, @@ -23083,21 +25836,36 @@ "unicode_alternates": [], "name": "black left-pointing double triangle", "shortname": ":rewind:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "play" + "play", + "arrow", + "symbol" ], "moji": "⏪" }, + "rhino": { + "unicode": "1F98F", + "unicode_alternates": [], + "name": "rhinoceros", + "shortname": ":rhino:", + "category": "nature", + "aliases": [ + ":rhinoceros:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🦏" + }, "ribbon": { "unicode": "1F380", "unicode_alternates": [], "name": "ribbon", "shortname": ":ribbon:", - "category": "emoticons", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23108,7 +25876,10 @@ "ribbon", "lace", "wrap", - "decorate" + "decorate", + "object", + "gift", + "birthday" ], "moji": "🎀" }, @@ -23117,7 +25888,7 @@ "unicode_alternates": [], "name": "cooked rice", "shortname": ":rice:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23125,8 +25896,9 @@ "rice", "white", "grain", - "food", - "bowl" + "bowl", + "sushi", + "japan" ], "moji": "🍚" }, @@ -23135,7 +25907,7 @@ "unicode_alternates": [], "name": "rice ball", "shortname": ":rice_ball:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23146,7 +25918,8 @@ "white", "nori", "seaweed", - "japanese" + "sushi", + "japan" ], "moji": "🍙" }, @@ -23155,7 +25928,7 @@ "unicode_alternates": [], "name": "rice cracker", "shortname": ":rice_cracker:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23164,8 +25937,7 @@ "rice", "cracker", "seaweed", - "food", - "japanese" + "sushi" ], "moji": "🍘" }, @@ -23174,7 +25946,7 @@ "unicode_alternates": [], "name": "moon viewing ceremony", "shortname": ":rice_scene:", - "category": "objects", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23187,92 +25959,115 @@ "rice", "scene", "festival", - "autumn" + "autumn", + "places", + "space", + "sky", + "travel" ], "moji": "🎑" }, - "right_speaker": { - "unicode": "1F568", + "right_facing_fist": { + "unicode": "1F91C", "unicode_alternates": [], - "name": "right speaker", - "shortname": ":right_speaker:", - "category": "objects_symbols", - "aliases": [], + "name": "right-facing fist", + "shortname": ":right_facing_fist:", + "category": "people", + "aliases": [ + ":right_fist:" + ], "aliases_ascii": [], - "keywords": [ - "sound", - "listen", - "hear", - "noise", - "volume" - ] + "keywords": [], + "moji": "🤜" }, - "right_speaker_one": { - "unicode": "1F569", + "right_facing_fist_tone1": { + "unicode": "1F91C-1F3FB", "unicode_alternates": [], - "name": "right speaker with one sound wave", - "shortname": ":right_speaker_one:", - "category": "objects_symbols", + "name": "right facing fist tone 1", + "shortname": ":right_facing_fist_tone1:", + "category": "people", "aliases": [ - ":right_speaker_with_one_sound_wave:" + ":right_fist_tone1:" ], "aliases_ascii": [], - "keywords": [ - "low", - "volume" - ] + "keywords": [], + "moji": "🤜🏻" }, - "right_speaker_three": { - "unicode": "1F56A", + "right_facing_fist_tone2": { + "unicode": "1F91C-1F3FC", "unicode_alternates": [], - "name": "right speaker with three sound waves", - "shortname": ":right_speaker_three:", - "category": "objects_symbols", + "name": "right facing fist tone 2", + "shortname": ":right_facing_fist_tone2:", + "category": "people", "aliases": [ - ":right_speaker_with_three_sound_waves:" + ":right_fist_tone2:" ], "aliases_ascii": [], - "keywords": [ - "loud", - "high", - "volume" - ] + "keywords": [], + "moji": "🤜🏼" + }, + "right_facing_fist_tone3": { + "unicode": "1F91C-1F3FD", + "unicode_alternates": [], + "name": "right facing fist tone 3", + "shortname": ":right_facing_fist_tone3:", + "category": "people", + "aliases": [ + ":right_fist_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤜🏽" + }, + "right_facing_fist_tone4": { + "unicode": "1F91C-1F3FE", + "unicode_alternates": [], + "name": "right facing fist tone 4", + "shortname": ":right_facing_fist_tone4:", + "category": "people", + "aliases": [ + ":right_fist_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤜🏾" + }, + "right_facing_fist_tone5": { + "unicode": "1F91C-1F3FF", + "unicode_alternates": [], + "name": "right facing fist tone 5", + "shortname": ":right_facing_fist_tone5:", + "category": "people", + "aliases": [ + ":right_fist_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤜🏿" }, "ring": { "unicode": "1F48D", "unicode_alternates": [], "name": "ring", "shortname": ":ring:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "marriage", "propose", "valentines", - "wedding" + "wedding", + "object", + "fashion", + "gem", + "accessories" ], "moji": "💍" }, - "ringing_bell": { - "unicode": "1F56D", - "unicode_alternates": [], - "name": "ringing bell", - "shortname": ":ringing_bell:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "alert", - "ding", - "volume", - "sound", - "chime" - ] - }, "robot": { "unicode": "1F916", - "unicode_alternates": "", + "unicode_alternates": [], "name": "robot face", "shortname": ":robot:", "category": "people", @@ -23280,14 +26075,18 @@ ":robot_face:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "monster", + "robot" + ], + "moji": "🤖" }, "rocket": { "unicode": "1F680", "unicode_alternates": [], "name": "rocket", "shortname": ":rocket:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23298,16 +26097,33 @@ "space", "spacecraft", "astronaut", - "cosmonaut" + "cosmonaut", + "transportation", + "object", + "fly", + "blast" ], "moji": "🚀" }, + "rofl": { + "unicode": "1F923", + "unicode_alternates": [], + "name": "rolling on the floor laughing", + "shortname": ":rofl:", + "category": "people", + "aliases": [ + ":rolling_on_the_floor_laughing:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤣" + }, "roller_coaster": { "unicode": "1F3A2", "unicode_alternates": [], "name": "roller coaster", "shortname": ":roller_coaster:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23322,13 +26138,16 @@ "park", "fair", "ride", - "entertainment" + "entertainment", + "places", + "vacation", + "roller coaster" ], "moji": "🎢" }, "rolling_eyes": { "unicode": "1F644", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with rolling eyes", "shortname": ":rolling_eyes:", "category": "people", @@ -23336,7 +26155,14 @@ ":face_with_rolling_eyes:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "mad", + "smiley", + "rolling eyes", + "emotion", + "sarcastic" + ], + "moji": "🙄" }, "rooster": { "unicode": "1F413", @@ -23375,9 +26201,13 @@ "fragrant", "flower", "thorns", - "love", "petals", - "romance" + "romance", + "nature", + "plant", + "rip", + "condolence", + "beautiful" ], "moji": "🌹" }, @@ -23386,31 +26216,21 @@ "unicode_alternates": [], "name": "rosette", "shortname": ":rosette:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "flower" - ] - }, - "rosette_black": { - "unicode": "1F3F6", - "unicode_alternates": [], - "name": "black rosette", - "shortname": ":rosette_black:", - "category": "objects_symbols", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ - "flower" - ] + "flower", + "tropical" + ], + "moji": "🏵" }, "rotating_light": { "unicode": "1F6A8", "unicode_alternates": [], "name": "police cars revolving light", "shortname": ":rotating_light:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23419,8 +26239,8 @@ "emergency", "police", "light", - "police", - "emergency" + "transportation", + "object" ], "moji": "🚨" }, @@ -23429,11 +26249,13 @@ "unicode_alternates": [], "name": "round pushpin", "shortname": ":round_pushpin:", - "category": "places", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ - "stationery" + "stationery", + "object", + "office" ], "moji": "📍" }, @@ -23442,7 +26264,7 @@ "unicode_alternates": [], "name": "rowboat", "shortname": ":rowboat:", - "category": "places", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23453,13 +26275,18 @@ "boat", "row", "oar", - "paddle" + "paddle", + "men", + "workout", + "sport", + "rowing", + "diversity" ], "moji": "🚣" }, "rowboat_tone1": { "unicode": "1F6A3-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "rowboat tone 1", "shortname": ":rowboat_tone1:", "category": "activity", @@ -23473,11 +26300,12 @@ "row", "oar", "paddle" - ] + ], + "moji": "🚣🏻" }, "rowboat_tone2": { "unicode": "1F6A3-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "rowboat tone 2", "shortname": ":rowboat_tone2:", "category": "activity", @@ -23491,11 +26319,12 @@ "row", "oar", "paddle" - ] + ], + "moji": "🚣🏼" }, "rowboat_tone3": { "unicode": "1F6A3-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "rowboat tone 3", "shortname": ":rowboat_tone3:", "category": "activity", @@ -23509,11 +26338,12 @@ "row", "oar", "paddle" - ] + ], + "moji": "🚣🏽" }, "rowboat_tone4": { "unicode": "1F6A3-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "rowboat tone 4", "shortname": ":rowboat_tone4:", "category": "activity", @@ -23527,11 +26357,12 @@ "row", "oar", "paddle" - ] + ], + "moji": "🚣🏾" }, "rowboat_tone5": { "unicode": "1F6A3-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "rowboat tone 5", "shortname": ":rowboat_tone5:", "category": "activity", @@ -23545,14 +26376,15 @@ "row", "oar", "paddle" - ] + ], + "moji": "🚣🏿" }, "rugby_football": { "unicode": "1F3C9", "unicode_alternates": [], "name": "rugby football", "shortname": ":rugby_football:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23562,7 +26394,8 @@ "ball", "sport", "team", - "england" + "england", + "game" ], "moji": "🏉" }, @@ -23571,7 +26404,7 @@ "unicode_alternates": [], "name": "runner", "shortname": ":runner:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23581,16 +26414,19 @@ "run", "runner", "jog", - "exercise", "sprint", "race", - "dash" + "dash", + "people", + "men", + "diversity", + "boys night" ], "moji": "🏃" }, "runner_tone1": { "unicode": "1F3C3-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "runner tone 1", "shortname": ":runner_tone1:", "category": "people", @@ -23605,11 +26441,12 @@ "race", "dash", "marathon" - ] + ], + "moji": "🏃🏻" }, "runner_tone2": { "unicode": "1F3C3-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "runner tone 2", "shortname": ":runner_tone2:", "category": "people", @@ -23624,11 +26461,12 @@ "race", "dash", "marathon" - ] + ], + "moji": "🏃🏼" }, "runner_tone3": { "unicode": "1F3C3-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "runner tone 3", "shortname": ":runner_tone3:", "category": "people", @@ -23643,11 +26481,12 @@ "race", "dash", "marathon" - ] + ], + "moji": "🏃🏽" }, "runner_tone4": { "unicode": "1F3C3-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "runner tone 4", "shortname": ":runner_tone4:", "category": "people", @@ -23662,11 +26501,12 @@ "race", "dash", "marathon" - ] + ], + "moji": "🏃🏾" }, "runner_tone5": { "unicode": "1F3C3-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "runner tone 5", "shortname": ":runner_tone5:", "category": "people", @@ -23681,14 +26521,15 @@ "race", "dash", "marathon" - ] + ], + "moji": "🏃🏿" }, "running_shirt_with_sash": { "unicode": "1F3BD", "unicode_alternates": [], "name": "running shirt with sash", "shortname": ":running_shirt_with_sash:", - "category": "emoticons", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23699,13 +26540,14 @@ "shirt", "cloths", "compete", - "sports" + "sports", + "award" ], "moji": "🎽" }, "sa": { "unicode": "1F202", - "unicode_alternates": "", + "unicode_alternates": [], "name": "squared katakana sa", "shortname": ":sa:", "category": "symbols", @@ -23716,7 +26558,8 @@ "japanese", "symbol", "word" - ] + ], + "moji": "🈂" }, "sagittarius": { "unicode": "2650", @@ -23725,7 +26568,7 @@ ], "name": "sagittarius", "shortname": ":sagittarius:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23738,9 +26581,8 @@ "stars", "zodiac", "sign", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♐" }, @@ -23751,12 +26593,15 @@ ], "name": "sailboat", "shortname": ":sailboat:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "ship", - "transportation" + "transportation", + "travel", + "boat", + "vacation" ], "moji": "⛵" }, @@ -23765,7 +26610,7 @@ "unicode_alternates": [], "name": "sake bottle and cup", "shortname": ":sake:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23774,26 +26619,41 @@ "drunk", "wine", "sake", - "wine", "rice", "ferment", "alcohol", "japanese", - "drink" + "japan", + "girls night" ], "moji": "🍶" }, + "salad": { + "unicode": "1F957", + "unicode_alternates": [], + "name": "green salad", + "shortname": ":salad:", + "category": "food", + "aliases": [ + ":green_salad:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥗" + }, "sandal": { "unicode": "1F461", "unicode_alternates": [], "name": "womans sandal", "shortname": ":sandal:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "fashion", - "shoes" + "shoes", + "shoe", + "accessories" ], "moji": "👡" }, @@ -23802,7 +26662,7 @@ "unicode_alternates": [], "name": "father christmas", "shortname": ":santa:", - "category": "objects", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23823,14 +26683,18 @@ "nice", "sleigh", "father", - "christmas", - "holiday" + "holiday", + "people", + "hat", + "winter", + "holidays", + "diversity" ], "moji": "🎅" }, "santa_tone1": { "unicode": "1F385-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "father christmas tone 1", "shortname": ":santa_tone1:", "category": "people", @@ -23852,11 +26716,12 @@ "nice", "sleigh", "holiday" - ] + ], + "moji": "🎅🏻" }, "santa_tone2": { "unicode": "1F385-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "father christmas tone 2", "shortname": ":santa_tone2:", "category": "people", @@ -23878,11 +26743,12 @@ "nice", "sleigh", "holiday" - ] + ], + "moji": "🎅🏼" }, "santa_tone3": { "unicode": "1F385-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "father christmas tone 3", "shortname": ":santa_tone3:", "category": "people", @@ -23904,11 +26770,12 @@ "nice", "sleigh", "holiday" - ] + ], + "moji": "🎅🏽" }, "santa_tone4": { "unicode": "1F385-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "father christmas tone 4", "shortname": ":santa_tone4:", "category": "people", @@ -23930,11 +26797,12 @@ "nice", "sleigh", "holiday" - ] + ], + "moji": "🎅🏾" }, "santa_tone5": { "unicode": "1F385-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "father christmas tone 5", "shortname": ":santa_tone5:", "category": "people", @@ -23956,7 +26824,8 @@ "nice", "sleigh", "holiday" - ] + ], + "moji": "🎅🏿" }, "satellite": { "unicode": "1F4E1", @@ -23967,7 +26836,8 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "communication" + "communication", + "object" ], "moji": "📡" }, @@ -23976,21 +26846,23 @@ "unicode_alternates": [], "name": "satellite", "shortname": ":satellite_orbital:", - "category": "objects_symbols", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "communication", "orbital", - "space" - ] + "space", + "object" + ], + "moji": "🛰" }, "saxophone": { "unicode": "1F3B7", "unicode_alternates": [], "name": "saxophone", "shortname": ":saxophone:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -23998,15 +26870,14 @@ "music", "saxophone", "sax", - "music", - "instrument", - "woodwind" + "woodwind", + "instruments" ], "moji": "🎷" }, "scales": { "unicode": "2696", - "unicode_alternates": "", + "unicode_alternates": [], "name": "scales", "shortname": ":scales:", "category": "objects", @@ -24020,14 +26891,15 @@ "tool", "weight", "zodiac" - ] + ], + "moji": "⚖" }, "school": { "unicode": "1F3EB", "unicode_alternates": [], "name": "school", "shortname": ":school:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24039,7 +26911,8 @@ "high", "college", "teach", - "education" + "education", + "places" ], "moji": "🏫" }, @@ -24048,7 +26921,7 @@ "unicode_alternates": [], "name": "school satchel", "shortname": ":school_satchel:", - "category": "objects", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24058,14 +26931,16 @@ "school", "satchel", "backpack", - "bag", "packing", "pack", "hike", - "education", "adventure", "travel", - "sightsee" + "sightsee", + "fashion", + "office", + "vacation", + "accessories" ], "moji": "🎒" }, @@ -24081,19 +26956,39 @@ "aliases_ascii": [], "keywords": [ "cut", - "stationery" + "stationery", + "object", + "tool", + "weapon", + "office" ], "moji": "✂" }, + "scooter": { + "unicode": "1F6F4", + "unicode_alternates": [], + "name": "scooter", + "shortname": ":scooter:", + "category": "travel", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🛴" + }, "scorpion": { "unicode": "1F982", - "unicode_alternates": "", + "unicode_alternates": [], "name": "scorpion", "shortname": ":scorpion:", "category": "nature", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "insects", + "reptile", + "animal" + ], + "moji": "🦂" }, "scorpius": { "unicode": "264F", @@ -24102,7 +26997,7 @@ ], "name": "scorpius", "shortname": ":scorpius:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24115,9 +27010,8 @@ "stars", "zodiac", "sign", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♏" }, @@ -24126,7 +27020,7 @@ "unicode_alternates": [], "name": "face screaming in fear", "shortname": ":scream:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24135,7 +27029,12 @@ "scream", "painting", "artist", - "alien" + "alien", + "smiley", + "surprised", + "wow", + "emotion", + "omg" ], "moji": "😱" }, @@ -24144,7 +27043,7 @@ "unicode_alternates": [], "name": "weary cat face", "shortname": ":scream_cat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24161,7 +27060,8 @@ "exhausted", "scream", "painting", - "artist" + "artist", + "cat" ], "moji": "🙀" }, @@ -24174,7 +27074,9 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "documents" + "documents", + "object", + "office" ], "moji": "📜" }, @@ -24183,14 +27085,31 @@ "unicode_alternates": [], "name": "seat", "shortname": ":seat:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ - "sit" + "sit", + "transportation", + "object", + "travel", + "vacation" ], "moji": "💺" }, + "second_place": { + "unicode": "1F948", + "unicode_alternates": [], + "name": "second place medal", + "shortname": ":second_place:", + "category": "activity", + "aliases": [ + ":second_place_medal:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥈" + }, "secret": { "unicode": "3299", "unicode_alternates": [ @@ -24198,11 +27117,13 @@ ], "name": "circled ideograph secret", "shortname": ":secret:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "privacy" + "privacy", + "japan", + "symbol" ], "moji": "㊙" }, @@ -24211,14 +27132,13 @@ "unicode_alternates": [], "name": "see-no-evil monkey", "shortname": ":see_no_evil:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ "animal", "monkey", "nature", - "monkey", "see", "eyes", "vision", @@ -24241,34 +27161,118 @@ "nature", "plant", "seedling", - "plant", "new", "start", - "grow" + "grow", + "leaf" ], "moji": "🌱" }, + "selfie": { + "unicode": "1F933", + "unicode_alternates": [], + "name": "selfie", + "shortname": ":selfie:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤳" + }, + "selfie_tone1": { + "unicode": "1F933-1F3FB", + "unicode_alternates": [], + "name": "selfie tone 1", + "shortname": ":selfie_tone1:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤳🏻" + }, + "selfie_tone2": { + "unicode": "1F933-1F3FC", + "unicode_alternates": [], + "name": "selfie tone 2", + "shortname": ":selfie_tone2:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤳🏼" + }, + "selfie_tone3": { + "unicode": "1F933-1F3FD", + "unicode_alternates": [], + "name": "selfie tone 3", + "shortname": ":selfie_tone3:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤳🏽" + }, + "selfie_tone4": { + "unicode": "1F933-1F3FE", + "unicode_alternates": [], + "name": "selfie tone 4", + "shortname": ":selfie_tone4:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤳🏾" + }, + "selfie_tone5": { + "unicode": "1F933-1F3FF", + "unicode_alternates": [], + "name": "selfie tone 5", + "shortname": ":selfie_tone5:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤳🏿" + }, "seven": { "moji": "7️⃣", "unicode": "0037-20E3", "unicode_alternates": [ "0037-FE0F-20E3" ], - "name": "digit seven", + "name": "keycap digit seven", "shortname": ":seven:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "7", "blue-square", "numbers", - "prime" + "prime", + "number", + "math", + "symbol" ] }, + "shallow_pan_of_food": { + "unicode": "1F958", + "unicode_alternates": [], + "name": "shallow pan of food", + "shortname": ":shallow_pan_of_food:", + "category": "food", + "aliases": [ + ":paella:" + ], + "aliases_ascii": [], + "keywords": [ + "pan of food" + ], + "moji": "🥘" + }, "shamrock": { "unicode": "2618", - "unicode_alternates": "", + "unicode_alternates": [], "name": "shamrock", "shortname": ":shamrock:", "category": "nature", @@ -24276,15 +27280,29 @@ "aliases_ascii": [], "keywords": [ "nature", - "plant" - ] + "plant", + "luck", + "leaf" + ], + "moji": "☘" + }, + "shark": { + "unicode": "1F988", + "unicode_alternates": [], + "name": "shark", + "shortname": ":shark:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦈" }, "shaved_ice": { "unicode": "1F367", "unicode_alternates": [], "name": "shaved ice", "shortname": ":shaved_ice:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24295,7 +27313,8 @@ "dessert", "treat", "syrup", - "flavoring" + "flavoring", + "food" ], "moji": "🍧" }, @@ -24334,7 +27353,6 @@ "sea", "shell", "spiral", - "beach", "sand", "crab", "nautilus" @@ -24346,7 +27364,7 @@ "unicode_alternates": [], "name": "shield", "shortname": ":shield:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24354,12 +27372,13 @@ "route", "sign", "highway", - "interstate" - ] + "object" + ], + "moji": "🛡" }, "shinto_shrine": { "unicode": "26E9", - "unicode_alternates": "", + "unicode_alternates": [], "name": "shinto shrine", "shortname": ":shinto_shrine:", "category": "travel", @@ -24367,15 +27386,20 @@ "aliases_ascii": [], "keywords": [ "religion", - "symbol" - ] + "symbol", + "places", + "building", + "travel", + "vacation" + ], + "moji": "⛩" }, "ship": { "unicode": "1F6A2", "unicode_alternates": [], "name": "ship", "shortname": ":ship:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24383,7 +27407,9 @@ "transportation", "ferry", "ship", - "boat" + "boat", + "travel", + "vacation" ], "moji": "🚢" }, @@ -24392,7 +27418,7 @@ "unicode_alternates": [], "name": "t-shirt", "shortname": ":shirt:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24406,7 +27432,7 @@ "unicode_alternates": [], "name": "shopping bags", "shortname": ":shopping_bags:", - "category": "travel_places", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24414,8 +27440,25 @@ "mall", "buy", "store", - "shop" - ] + "shop", + "object", + "birthday", + "parties" + ], + "moji": "🛍" + }, + "shopping_cart": { + "unicode": "1F6D2", + "unicode_alternates": [], + "name": "shopping trolley", + "shortname": ":shopping_cart:", + "category": "objects", + "aliases": [ + ":shopping_trolley:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🛒" }, "shower": { "unicode": "1F6BF", @@ -24433,22 +27476,100 @@ "shower", "soap", "water", - "clean", "shampoo", - "lather" + "lather", + "object" ], "moji": "🚿" }, + "shrimp": { + "unicode": "1F990", + "unicode_alternates": [], + "name": "shrimp", + "shortname": ":shrimp:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦐" + }, + "shrug": { + "unicode": "1F937", + "unicode_alternates": [], + "name": "shrug", + "shortname": ":shrug:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤷" + }, + "shrug_tone1": { + "unicode": "1F937-1F3FB", + "unicode_alternates": [], + "name": "shrug tone 1", + "shortname": ":shrug_tone1:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤷🏻" + }, + "shrug_tone2": { + "unicode": "1F937-1F3FC", + "unicode_alternates": [], + "name": "shrug tone 2", + "shortname": ":shrug_tone2:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤷🏼" + }, + "shrug_tone3": { + "unicode": "1F937-1F3FD", + "unicode_alternates": [], + "name": "shrug tone 3", + "shortname": ":shrug_tone3:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤷🏽" + }, + "shrug_tone4": { + "unicode": "1F937-1F3FE", + "unicode_alternates": [], + "name": "shrug tone 4", + "shortname": ":shrug_tone4:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤷🏾" + }, + "shrug_tone5": { + "unicode": "1F937-1F3FF", + "unicode_alternates": [], + "name": "shrug tone 5", + "shortname": ":shrug_tone5:", + "category": "people", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤷🏿" + }, "signal_strength": { "unicode": "1F4F6", "unicode_alternates": [], "name": "antenna with bars", "shortname": ":signal_strength:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "symbol" ], "moji": "📶" }, @@ -24458,15 +27579,18 @@ "unicode_alternates": [ "0036-FE0F-20E3" ], - "name": "digit six", + "name": "keycap digit six", "shortname": ":six:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "6", "blue-square", - "numbers" + "numbers", + "number", + "math", + "symbol" ] }, "six_pointed_star": { @@ -24474,11 +27598,15 @@ "unicode_alternates": [], "name": "six pointed star with middle dot", "shortname": ":six_pointed_star:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "purple-square" + "purple-square", + "religion", + "jew", + "star", + "symbol" ], "moji": "🔯" }, @@ -24487,7 +27615,7 @@ "unicode_alternates": [], "name": "ski and ski boot", "shortname": ":ski:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24499,18 +27627,19 @@ "cross-country", "poles", "snow", - "winter", "mountain", "alpine", "powder", "slalom", - "freestyle" + "freestyle", + "sport", + "skiing" ], "moji": "🎿" }, "skier": { "unicode": "26F7", - "unicode_alternates": "", + "unicode_alternates": [], "name": "skier", "shortname": ":skier:", "category": "activity", @@ -24521,15 +27650,20 @@ "ski", "snow", "sport", - "travel" - ] + "travel", + "hat", + "vacation", + "cold", + "skiing" + ], + "moji": "⛷" }, "skull": { "unicode": "1F480", "unicode_alternates": [], "name": "skull", "shortname": ":skull:", - "category": "emoticons", + "category": "people", "aliases": [ ":skeleton:" ], @@ -24537,13 +27671,15 @@ "keywords": [ "dead", "skeleton", - "dying" + "dying", + "halloween", + "skull" ], "moji": "💀" }, "skull_crossbones": { "unicode": "2620", - "unicode_alternates": "", + "unicode_alternates": [], "name": "skull and crossbones", "shortname": ":skull_crossbones:", "category": "objects", @@ -24556,15 +27692,19 @@ "death", "face", "monster", - "person" - ] + "person", + "symbol", + "dead", + "skull" + ], + "moji": "☠" }, "sleeping": { "unicode": "1F634", "unicode_alternates": [], "name": "sleeping face", "shortname": ":sleeping:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24572,9 +27712,11 @@ "sleepy", "tired", "sleep", - "sleepy", "sleeping", - "snore" + "snore", + "smiley", + "emotion", + "goodnight" ], "moji": "😴" }, @@ -24583,21 +27725,23 @@ "unicode_alternates": [], "name": "sleeping accommodation", "shortname": ":sleeping_accommodation:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "hotel", "motel", - "rest" - ] + "rest", + "tired" + ], + "moji": "🛌" }, "sleepy": { "unicode": "1F62A", "unicode_alternates": [], "name": "sleepy face", "shortname": ":sleepy:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24605,8 +27749,10 @@ "rest", "tired", "sleepy", - "tired", - "exhausted" + "exhausted", + "smiley", + "sick", + "emotion" ], "moji": "😪" }, @@ -24624,8 +27770,12 @@ "slight", "frown", "unhappy", - "disappointed" - ] + "disappointed", + "sad", + "smiley", + "emotion" + ], + "moji": "🙁" }, "slight_smile": { "unicode": "1F642", @@ -24640,15 +27790,17 @@ "keywords": [ "slight", "smile", - "happy" - ] + "happy", + "smiley" + ], + "moji": "🙂" }, "slot_machine": { "unicode": "1F3B0", "unicode_alternates": [], "name": "slot machine", "shortname": ":slot_machine:", - "category": "places", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24657,10 +27809,11 @@ "vegas", "slot", "machine", - "gamble", "one-armed bandit", "slots", - "luck" + "luck", + "game", + "boys night" ], "moji": "🎰" }, @@ -24669,11 +27822,13 @@ "unicode_alternates": [], "name": "small blue diamond", "shortname": ":small_blue_diamond:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol" ], "moji": "🔹" }, @@ -24682,11 +27837,13 @@ "unicode_alternates": [], "name": "small orange diamond", "shortname": ":small_orange_diamond:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol" ], "moji": "🔸" }, @@ -24695,11 +27852,14 @@ "unicode_alternates": [], "name": "up-pointing red triangle", "shortname": ":small_red_triangle:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "triangle" ], "moji": "🔺" }, @@ -24708,11 +27868,14 @@ "unicode_alternates": [], "name": "down-pointing red triangle", "shortname": ":small_red_triangle_down:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "triangle" ], "moji": "🔻" }, @@ -24721,7 +27884,7 @@ "unicode_alternates": [], "name": "smiling face with open mouth and smiling eyes", "shortname": ":smile:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":)", @@ -24739,7 +27902,8 @@ "laugh", "smile", "smiley", - "smiling" + "smiling", + "emotion" ], "moji": "😄" }, @@ -24748,7 +27912,7 @@ "unicode_alternates": [], "name": "grinning cat face with smiling eyes", "shortname": ":smile_cat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24757,7 +27921,8 @@ "cat", "smile", "grin", - "grinning" + "grinning", + "happy" ], "moji": "😸" }, @@ -24766,7 +27931,7 @@ "unicode_alternates": [], "name": "smiling face with open mouth", "shortname": ":smiley:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":D", @@ -24780,7 +27945,9 @@ "joy", "smiling", "smile", - "smiley" + "smiley", + "emotion", + "good" ], "moji": "😃" }, @@ -24789,7 +27956,7 @@ "unicode_alternates": [], "name": "smiling cat face with open mouth", "shortname": ":smiley_cat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24798,8 +27965,7 @@ "happy", "smile", "smiley", - "cat", - "happy" + "cat" ], "moji": "😺" }, @@ -24808,16 +27974,19 @@ "unicode_alternates": [], "name": "smiling face with horns", "shortname": ":smiling_imp:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "devil", "horns", - "horns", - "devil", "impish", - "trouble" + "trouble", + "silly", + "smiley", + "angry", + "monster", + "boys night" ], "moji": "😈" }, @@ -24826,7 +27995,7 @@ "unicode_alternates": [], "name": "smirking face", "shortname": ":smirk:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24836,10 +28005,12 @@ "smug", "smirking", "smirk", - "smug", - "smile", "half-smile", - "conceited" + "conceited", + "silly", + "smiley", + "sexy", + "sarcastic" ], "moji": "😏" }, @@ -24848,7 +28019,7 @@ "unicode_alternates": [], "name": "cat face with wry smile", "shortname": ":smirk_cat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24858,7 +28029,8 @@ "smirking", "wry", "confident", - "confidence" + "confidence", + "cat" ], "moji": "😼" }, @@ -24875,13 +28047,14 @@ "kills", "tobacco", "smoking", - "cigarette", "smoke", "cancer", "lungs", "inhale", "tar", - "nicotine" + "nicotine", + "symbol", + "drugs" ], "moji": "🚬" }, @@ -24898,10 +28071,10 @@ "shell", "slow", "snail", - "slow", "escargot", "french", - "appetizer" + "appetizer", + "insects" ], "moji": "🐌" }, @@ -24915,16 +28088,32 @@ "aliases_ascii": [], "keywords": [ "animal", - "evil" + "evil", + "wildlife", + "reptile", + "creationism" ], "moji": "🐍" }, + "sneezing_face": { + "unicode": "1F927", + "unicode_alternates": [], + "name": "sneezing face", + "shortname": ":sneezing_face:", + "category": "people", + "aliases": [ + ":sneeze:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤧" + }, "snowboarder": { "unicode": "1F3C2", "unicode_alternates": [], "name": "snowboarder", "shortname": ":snowboarder:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -24932,13 +28121,16 @@ "winter", "snow", "boarding", - "sports", "freestyle", "halfpipe", "board", "mountain", "alpine", - "winter" + "hat", + "vacation", + "cold", + "sport", + "snowboarding" ], "moji": "🏂" }, @@ -24965,13 +28157,13 @@ "droplet", "ice", "crystal", - "cold", "chilly", - "winter", "unique", "special", "below zero", - "elsa" + "elsa", + "sky", + "holidays" ], "moji": "❄" }, @@ -24991,13 +28183,15 @@ "season", "weather", "winter", - "xmas" + "xmas", + "holidays", + "snow" ], "moji": "⛄" }, "snowman2": { "unicode": "2603", - "unicode_alternates": "", + "unicode_alternates": [], "name": "snowman", "shortname": ":snowman2:", "category": "nature", @@ -25007,15 +28201,19 @@ "cold", "nature", "snow", - "weather" - ] + "weather", + "winter", + "holidays", + "christmas" + ], + "moji": "☃" }, "sob": { "unicode": "1F62D", "unicode_alternates": [], "name": "loudly crying face", "shortname": ":sob:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25024,14 +28222,14 @@ "sad", "tears", "upset", - "cry", "sob", - "tears", - "sad", "melancholy", "morn", "somber", - "hurt" + "hurt", + "smiley", + "emotion", + "heartbreak" ], "moji": "😭" }, @@ -25042,7 +28240,7 @@ ], "name": "soccer ball", "shortname": ":soccer:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25051,7 +28249,10 @@ "football", "sports", "european", - "football" + "game", + "ball", + "sport", + "soccer" ], "moji": "⚽" }, @@ -25060,12 +28261,13 @@ "unicode_alternates": [], "name": "soon with rightwards arrow above", "shortname": ":soon:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "arrow", - "words" + "words", + "symbol" ], "moji": "🔜" }, @@ -25074,14 +28276,15 @@ "unicode_alternates": [], "name": "squared sos", "shortname": ":sos:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "emergency", "help", "red-square", - "words" + "words", + "symbol" ], "moji": "🆘" }, @@ -25090,12 +28293,14 @@ "unicode_alternates": [], "name": "speaker with one sound wave", "shortname": ":sound:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "speaker", - "volume" + "volume", + "alarm", + "symbol" ], "moji": "🔉" }, @@ -25104,12 +28309,14 @@ "unicode_alternates": [], "name": "alien monster", "shortname": ":space_invader:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ "arcade", - "game" + "game", + "monster", + "alien" ], "moji": "👾" }, @@ -25120,12 +28327,14 @@ ], "name": "black spade suit", "shortname": ":spades:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "cards", - "poker" + "poker", + "symbol", + "game" ], "moji": "♠" }, @@ -25134,7 +28343,7 @@ "unicode_alternates": [], "name": "spaghetti", "shortname": ":spaghetti:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25145,7 +28354,7 @@ "noodles", "tomato", "sauce", - "italian" + "pasta" ], "moji": "🍝" }, @@ -25156,12 +28365,13 @@ ], "name": "sparkle", "shortname": ":sparkle:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "green-square", - "stars" + "stars", + "symbol" ], "moji": "❇" }, @@ -25170,13 +28380,14 @@ "unicode_alternates": [], "name": "firework sparkler", "shortname": ":sparkler:", - "category": "objects", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "night", "shine", - "stars" + "stars", + "parties" ], "moji": "🎇" }, @@ -25185,14 +28396,16 @@ "unicode_alternates": [], "name": "sparkles", "shortname": ":sparkles:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ "cool", "shine", "shiny", - "stars" + "stars", + "star", + "girls night" ], "moji": "✨" }, @@ -25201,14 +28414,16 @@ "unicode_alternates": [], "name": "sparkling heart", "shortname": ":sparkling_heart:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "affection", "like", "love", - "valentines" + "valentines", + "symbol", + "girls night" ], "moji": "💖" }, @@ -25217,13 +28432,12 @@ "unicode_alternates": [], "name": "speak-no-evil monkey", "shortname": ":speak_no_evil:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ "animal", "monkey", - "monkey", "mouth", "talk", "say", @@ -25240,36 +28454,41 @@ "unicode_alternates": [], "name": "speaker", "shortname": ":speaker:", - "category": "objects", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "sound", "listen", "hear", - "noise" - ] + "noise", + "alarm", + "symbol" + ], + "moji": "🔈" }, "speaking_head": { "unicode": "1F5E3", "unicode_alternates": [], "name": "speaking head in silhouette", "shortname": ":speaking_head:", - "category": "objects_symbols", + "category": "people", "aliases": [ ":speaking_head_in_silhouette:" ], "aliases_ascii": [], "keywords": [ - "talk" - ] + "talk", + "people" + ], + "moji": "🗣" }, "speech_balloon": { "unicode": "1F4AC", "unicode_alternates": [], "name": "speech balloon", "shortname": ":speech_balloon:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25281,96 +28500,18 @@ "conversation", "communication", "comic", - "dialogue" + "dialogue", + "symbol", + "free speech" ], "moji": "💬" }, - "speech_left": { - "unicode": "1F5E8", - "unicode_alternates": [], - "name": "left speech bubble", - "shortname": ":speech_left:", - "category": "objects_symbols", - "aliases": [ - ":left_speech_bubble:" - ], - "aliases_ascii": [], - "keywords": [ - "balloon", - "words", - "talk", - "conversation", - "communication", - "comic", - "dialogue" - ] - }, - "speech_right": { - "unicode": "1F5E9", - "unicode_alternates": [], - "name": "right speech bubble", - "shortname": ":speech_right:", - "category": "objects_symbols", - "aliases": [ - ":right_speech_bubble:" - ], - "aliases_ascii": [], - "keywords": [ - "balloon", - "words", - "talk", - "conversation", - "communication", - "comic", - "dialogue" - ] - }, - "speech_three": { - "unicode": "1F5EB", - "unicode_alternates": [], - "name": "three speech bubbles", - "shortname": ":speech_three:", - "category": "objects_symbols", - "aliases": [ - ":three_speech_bubbles:" - ], - "aliases_ascii": [], - "keywords": [ - "balloon", - "words", - "talk", - "conversation", - "communication", - "comic", - "dialogue" - ] - }, - "speech_two": { - "unicode": "1F5EA", - "unicode_alternates": [], - "name": "two speech bubbles", - "shortname": ":speech_two:", - "category": "objects_symbols", - "aliases": [ - ":two_speech_bubbles:" - ], - "aliases_ascii": [], - "keywords": [ - "balloon", - "words", - "talk", - "conversation", - "communication", - "comic", - "dialogue" - ] - }, "speedboat": { "unicode": "1F6A4", "unicode_alternates": [], "name": "speedboat", "shortname": ":speedboat:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25381,7 +28522,10 @@ "speed", "ski", "power", - "boat" + "boat", + "travel", + "vacation", + "tropical" ], "moji": "🚤" }, @@ -25395,8 +28539,12 @@ "aliases_ascii": [], "keywords": [ "arachnid", - "eight-legged" - ] + "eight-legged", + "insects", + "halloween", + "animal" + ], + "moji": "🕷" }, "spider_web": { "unicode": "1F578", @@ -25407,8 +28555,21 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "cobweb" - ] + "cobweb", + "halloween" + ], + "moji": "🕸" + }, + "spoon": { + "unicode": "1F944", + "unicode_alternates": [], + "name": "spoon", + "shortname": ":spoon:", + "category": "food", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🥄" }, "spy": { "unicode": "1F575", @@ -25423,12 +28584,19 @@ "keywords": [ "pi", "undercover", - "investigator" - ] + "investigator", + "people", + "hat", + "men", + "glasses", + "diversity", + "job" + ], + "moji": "🕵" }, "spy_tone1": { "unicode": "1F575-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sleuth or spy tone 1", "shortname": ":spy_tone1:", "category": "people", @@ -25441,11 +28609,12 @@ "undercover", "investigator", "person" - ] + ], + "moji": "🕵🏻" }, "spy_tone2": { "unicode": "1F575-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sleuth or spy tone 2", "shortname": ":spy_tone2:", "category": "people", @@ -25458,11 +28627,12 @@ "undercover", "investigator", "person" - ] + ], + "moji": "🕵🏼" }, "spy_tone3": { "unicode": "1F575-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sleuth or spy tone 3", "shortname": ":spy_tone3:", "category": "people", @@ -25475,11 +28645,12 @@ "undercover", "investigator", "person" - ] + ], + "moji": "🕵🏽" }, "spy_tone4": { "unicode": "1F575-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sleuth or spy tone 4", "shortname": ":spy_tone4:", "category": "people", @@ -25492,11 +28663,12 @@ "undercover", "investigator", "person" - ] + ], + "moji": "🕵🏾" }, "spy_tone5": { "unicode": "1F575-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "sleuth or spy tone 5", "shortname": ":spy_tone5:", "category": "people", @@ -25509,14 +28681,26 @@ "undercover", "investigator", "person" - ] + ], + "moji": "🕵🏿" + }, + "squid": { + "unicode": "1F991", + "unicode_alternates": [], + "name": "squid", + "shortname": ":squid:", + "category": "nature", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🦑" }, "stadium": { "unicode": "1F3DF", "unicode_alternates": [], "name": "stadium", "shortname": ":stadium:", - "category": "travel_places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25524,8 +28708,14 @@ "event", "concert", "convention", - "game" - ] + "game", + "places", + "building", + "travel", + "vacation", + "boys night" + ], + "moji": "🏟" }, "star": { "unicode": "2B50", @@ -25539,7 +28729,10 @@ "aliases_ascii": [], "keywords": [ "night", - "yellow" + "yellow", + "space", + "sky", + "star" ], "moji": "⭐" }, @@ -25548,7 +28741,7 @@ "unicode_alternates": [], "name": "glowing star", "shortname": ":star2:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25559,13 +28752,15 @@ "star", "five", "points", - "classic" + "classic", + "space", + "sky" ], "moji": "🌟" }, "star_and_crescent": { "unicode": "262A", - "unicode_alternates": "", + "unicode_alternates": [], "name": "star and crescent", "shortname": ":star_and_crescent:", "category": "symbols", @@ -25576,11 +28771,12 @@ "muslim", "religion", "symbol" - ] + ], + "moji": "☪" }, "star_of_david": { "unicode": "2721", - "unicode_alternates": "", + "unicode_alternates": [], "name": "star of david", "shortname": ":star_of_david:", "category": "symbols", @@ -25590,15 +28786,17 @@ "jew", "jewish", "religion", - "symbol" - ] + "symbol", + "star" + ], + "moji": "✡" }, "stars": { "unicode": "1F320", "unicode_alternates": [], "name": "shooting star", "shortname": ":stars:", - "category": "nature", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25608,9 +28806,9 @@ "shoot", "star", "sky", - "night", "comet", - "meteoroid" + "meteoroid", + "space" ], "moji": "🌠" }, @@ -25619,7 +28817,7 @@ "unicode_alternates": [], "name": "station", "shortname": ":station:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25628,7 +28826,8 @@ "vehicle", "station", "train", - "subway" + "subway", + "travel" ], "moji": "🚉" }, @@ -25637,12 +28836,18 @@ "unicode_alternates": [], "name": "statue of liberty", "shortname": ":statue_of_liberty:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "american", - "newyork" + "newyork", + "places", + "america", + "travel", + "vacation", + "statue of liberty", + "free speech" ], "moji": "🗽" }, @@ -25651,7 +28856,7 @@ "unicode_alternates": [], "name": "steam locomotive", "shortname": ":steam_locomotive:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25660,35 +28865,17 @@ "vehicle", "locomotive", "steam", - "train", - "engine" + "engine", + "travel" ], "moji": "🚂" }, - "stereo": { - "unicode": "1F4FE", - "unicode_alternates": [], - "name": "portable stereo", - "shortname": ":stereo:", - "category": "objects_symbols", - "aliases": [ - ":portable_stereo:" - ], - "aliases_ascii": [], - "keywords": [ - "communication", - "music", - "program", - "boom", - "box" - ] - }, "stew": { "unicode": "1F372", "unicode_alternates": [], "name": "pot of food", "shortname": ":stew:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25697,30 +28884,16 @@ "stew", "hearty", "soup", - "thick", - "hot", - "pot" - ], - "moji": "🍲" - }, - "stock_chart": { - "unicode": "1F5E0", - "unicode_alternates": [], - "name": "stock chart", - "shortname": ":stock_chart:", - "category": "objects_symbols", - "aliases": [], - "aliases_ascii": [], - "keywords": [ - "graph", - "presentation", - "stats", - "business" - ] + "thick", + "hot", + "pot", + "steam" + ], + "moji": "🍲" }, "stop_button": { "unicode": "23F9", - "unicode_alternates": "", + "unicode_alternates": [], "name": "black square for stop", "shortname": ":stop_button:", "category": "symbols", @@ -25728,12 +28901,14 @@ "aliases_ascii": [], "keywords": [ "sound", - "symbol" - ] + "symbol", + "square" + ], + "moji": "⏹" }, "stopwatch": { "unicode": "23F1", - "unicode_alternates": "", + "unicode_alternates": [], "name": "stopwatch", "shortname": ":stopwatch:", "category": "objects", @@ -25742,8 +28917,10 @@ "keywords": [ "clock", "object", - "time" - ] + "time", + "electronics" + ], + "moji": "⏱" }, "straight_ruler": { "unicode": "1F4CF", @@ -25754,7 +28931,10 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "stationery" + "stationery", + "object", + "tool", + "office" ], "moji": "📏" }, @@ -25763,7 +28943,7 @@ "unicode_alternates": [], "name": "strawberry", "shortname": ":strawberry:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25782,7 +28962,7 @@ "unicode_alternates": [], "name": "face with stuck-out tongue", "shortname": ":stuck_out_tongue:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ":P", @@ -25807,8 +28987,10 @@ "prank", "tongue", "silly", - "playful", - "cheeky" + "cheeky", + "smiley", + "sex", + "emotion" ], "moji": "😛" }, @@ -25817,7 +28999,7 @@ "unicode_alternates": [], "name": "face with stuck-out tongue and tightly-closed eyes", "shortname": ":stuck_out_tongue_closed_eyes:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25828,8 +29010,10 @@ "tongue", "kidding", "silly", - "playful", - "ecstatic" + "ecstatic", + "happy", + "smiley", + "emotion" ], "moji": "😝" }, @@ -25838,7 +29022,7 @@ "unicode_alternates": [], "name": "face with stuck-out tongue and winking eye", "shortname": ":stuck_out_tongue_winking_eye:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ">:P", @@ -25856,11 +29040,27 @@ "winking", "kidding", "silly", - "playful", - "crazy" + "crazy", + "happy", + "smiley", + "emotion", + "parties" ], "moji": "😜" }, + "stuffed_flatbread": { + "unicode": "1F959", + "unicode_alternates": [], + "name": "stuffed flatbread", + "shortname": ":stuffed_flatbread:", + "category": "food", + "aliases": [ + ":stuffed_pita:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥙" + }, "sun_with_face": { "unicode": "1F31E", "unicode_alternates": [], @@ -25874,7 +29074,9 @@ "sun", "anthropomorphic", "face", - "sky" + "sky", + "day", + "hump day" ], "moji": "🌞" }, @@ -25902,7 +29104,7 @@ "unicode_alternates": [], "name": "smiling face with sunglasses", "shortname": ":sunglasses:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ "B-)", @@ -25920,8 +29122,11 @@ "sun", "glasses", "sunny", - "cool", - "smooth" + "smooth", + "silly", + "smiley", + "emojione", + "boys night" ], "moji": "😎" }, @@ -25937,15 +29142,21 @@ "aliases_ascii": [], "keywords": [ "brightness", - "weather" - ] + "weather", + "sky", + "day", + "sun", + "hot", + "morning" + ], + "moji": "☀" }, "sunrise": { "unicode": "1F305", "unicode_alternates": [], "name": "sunrise", "shortname": ":sunrise:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25955,9 +29166,13 @@ "view", "sunrise", "sun", - "morning", "color", - "sky" + "sky", + "places", + "travel", + "tropical", + "day", + "hump day" ], "moji": "🌅" }, @@ -25966,7 +29181,7 @@ "unicode_alternates": [], "name": "sunrise over mountains", "shortname": ":sunrise_over_mountains:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25979,7 +29194,11 @@ "mountain", "rural", "color", - "sky" + "sky", + "places", + "travel", + "day", + "camp" ], "moji": "🌄" }, @@ -25988,7 +29207,7 @@ "unicode_alternates": [], "name": "surfer", "shortname": ":surfer:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -25998,15 +29217,19 @@ "surfer", "surf", "wave", - "ocean", "ride", - "swell" + "swell", + "men", + "vacation", + "tropical", + "sport", + "diversity" ], "moji": "🏄" }, "surfer_tone1": { "unicode": "1F3C4-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "surfer tone 1", "shortname": ":surfer_tone1:", "category": "activity", @@ -26018,14 +29241,14 @@ "sport", "surf", "wave", - "ocean", "ride", "swell" - ] + ], + "moji": "🏄🏻" }, "surfer_tone2": { "unicode": "1F3C4-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "surfer tone 2", "shortname": ":surfer_tone2:", "category": "activity", @@ -26037,14 +29260,14 @@ "sport", "surf", "wave", - "ocean", "ride", "swell" - ] + ], + "moji": "🏄🏼" }, "surfer_tone3": { "unicode": "1F3C4-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "surfer tone 3", "shortname": ":surfer_tone3:", "category": "activity", @@ -26056,14 +29279,14 @@ "sport", "surf", "wave", - "ocean", "ride", "swell" - ] + ], + "moji": "🏄🏽" }, "surfer_tone4": { "unicode": "1F3C4-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "surfer tone 4", "shortname": ":surfer_tone4:", "category": "activity", @@ -26075,14 +29298,14 @@ "sport", "surf", "wave", - "ocean", "ride", "swell" - ] + ], + "moji": "🏄🏾" }, "surfer_tone5": { "unicode": "1F3C4-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "surfer tone 5", "shortname": ":surfer_tone5:", "category": "activity", @@ -26094,17 +29317,17 @@ "sport", "surf", "wave", - "ocean", "ride", "swell" - ] + ], + "moji": "🏄🏿" }, "sushi": { "unicode": "1F363", "unicode_alternates": [], "name": "sushi", "shortname": ":sushi:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26114,7 +29337,7 @@ "fish", "raw", "nigiri", - "japanese" + "japan" ], "moji": "🍣" }, @@ -26123,7 +29346,7 @@ "unicode_alternates": [], "name": "suspension railway", "shortname": ":suspension_railway:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26133,7 +29356,7 @@ "railway", "rail", "train", - "transportation" + "travel" ], "moji": "🚟" }, @@ -26142,7 +29365,7 @@ "unicode_alternates": [], "name": "face with cold sweat", "shortname": ":sweat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ "':(", @@ -26158,7 +29381,11 @@ "clammy", "diaphoresis", "face", - "hot" + "hot", + "sad", + "smiley", + "stressed", + "emotion" ], "moji": "😓" }, @@ -26167,11 +29394,14 @@ "unicode_alternates": [], "name": "splashing sweat symbol", "shortname": ":sweat_drops:", - "category": "emoticons", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ - "water" + "water", + "rain", + "stressed", + "sweat" ], "moji": "💦" }, @@ -26180,7 +29410,7 @@ "unicode_alternates": [], "name": "smiling face with open mouth and cold sweat", "shortname": ":sweat_smile:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ "':)", @@ -26197,7 +29427,10 @@ "smiling", "cold", "sweat", - "perspiration" + "perspiration", + "smiley", + "workout", + "emotion" ], "moji": "😅" }, @@ -26206,7 +29439,7 @@ "unicode_alternates": [], "name": "roasted sweet potato", "shortname": ":sweet_potato:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26216,7 +29449,8 @@ "potato", "potassium", "roasted", - "roast" + "roast", + "vegetables" ], "moji": "🍠" }, @@ -26225,7 +29459,7 @@ "unicode_alternates": [], "name": "swimmer", "shortname": ":swimmer:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26238,13 +29472,16 @@ "freestyle", "butterfly", "breaststroke", - "backstroke" + "backstroke", + "workout", + "sport", + "diversity" ], "moji": "🏊" }, "swimmer_tone1": { "unicode": "1F3CA-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "swimmer tone 1", "shortname": ":swimmer_tone1:", "category": "activity", @@ -26260,11 +29497,12 @@ "butterfly", "breaststroke", "backstroke" - ] + ], + "moji": "🏊🏻" }, "swimmer_tone2": { "unicode": "1F3CA-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "swimmer tone 2", "shortname": ":swimmer_tone2:", "category": "activity", @@ -26280,11 +29518,12 @@ "butterfly", "breaststroke", "backstroke" - ] + ], + "moji": "🏊🏼" }, "swimmer_tone3": { "unicode": "1F3CA-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "swimmer tone 3", "shortname": ":swimmer_tone3:", "category": "activity", @@ -26300,11 +29539,12 @@ "butterfly", "breaststroke", "backstroke" - ] + ], + "moji": "🏊🏽" }, "swimmer_tone4": { "unicode": "1F3CA-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "swimmer tone 4", "shortname": ":swimmer_tone4:", "category": "activity", @@ -26320,11 +29560,12 @@ "butterfly", "breaststroke", "backstroke" - ] + ], + "moji": "🏊🏾" }, "swimmer_tone5": { "unicode": "1F3CA-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "swimmer tone 5", "shortname": ":swimmer_tone5:", "category": "activity", @@ -26340,30 +29581,40 @@ "butterfly", "breaststroke", "backstroke" - ] + ], + "moji": "🏊🏿" }, "symbols": { "unicode": "1F523", "unicode_alternates": [], "name": "input symbol for symbols", "shortname": ":symbols:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "symbol" ], "moji": "🔣" }, "synagogue": { "unicode": "1F54D", - "unicode_alternates": "", + "unicode_alternates": [], "name": "synagogue", "shortname": ":synagogue:", "category": "travel", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "places", + "religion", + "building", + "travel", + "vacation", + "condolence" + ], + "moji": "🕍" }, "syringe": { "unicode": "1F489", @@ -26379,19 +29630,26 @@ "health", "hospital", "medicine", - "needle" + "needle", + "object", + "weapon" ], "moji": "💉" }, "taco": { "unicode": "1F32E", - "unicode_alternates": "", + "unicode_alternates": [], "name": "taco", "shortname": ":taco:", - "category": "foods", + "category": "food", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "food", + "mexican", + "vagina" + ], + "moji": "🌮" }, "tada": { "unicode": "1F389", @@ -26404,14 +29662,21 @@ "keywords": [ "contulations", "party", - "party", "popper", "tada", "celebration", "victory", "announcement", "climax", - "congratulations" + "congratulations", + "object", + "birthday", + "holidays", + "cheers", + "good", + "girls night", + "boys night", + "parties" ], "moji": "🎉" }, @@ -26420,7 +29685,7 @@ "unicode_alternates": [], "name": "tanabata tree", "shortname": ":tanabata_tree:", - "category": "objects", + "category": "nature", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26431,7 +29696,8 @@ "festival", "star", "wish", - "holiday" + "holiday", + "trees" ], "moji": "🎋" }, @@ -26440,7 +29706,7 @@ "unicode_alternates": [], "name": "tangerine", "shortname": ":tangerine:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26460,7 +29726,7 @@ ], "name": "taurus", "shortname": ":taurus:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26473,9 +29739,8 @@ "constellation", "stars", "zodiac", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♉" }, @@ -26484,7 +29749,7 @@ "unicode_alternates": [], "name": "taxi", "shortname": ":taxi:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26497,7 +29762,8 @@ "automobile", "city", "transport", - "service" + "service", + "travel" ], "moji": "🚕" }, @@ -26506,7 +29772,7 @@ "unicode_alternates": [], "name": "teacup without handle", "shortname": ":tea:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26517,10 +29783,13 @@ "green", "tea", "leaf", - "drink", "teacup", "hot", - "beverage" + "beverage", + "japan", + "caffeine", + "steam", + "morning" ], "moji": "🍵" }, @@ -26537,26 +29806,12 @@ "keywords": [ "communication", "dial", - "technology" + "technology", + "electronics", + "phone" ], "moji": "☎" }, - "telephone_black": { - "unicode": "1F57F", - "unicode_alternates": [], - "name": "black touchtone telephone", - "shortname": ":telephone_black:", - "category": "objects_symbols", - "aliases": [ - ":black_touchtone_telephone:" - ], - "aliases_ascii": [], - "keywords": [ - "communication", - "dial", - "technology" - ] - }, "telephone_receiver": { "unicode": "1F4DE", "unicode_alternates": [], @@ -26568,26 +29823,12 @@ "keywords": [ "communication", "dial", - "technology" + "technology", + "electronics", + "phone" ], "moji": "📞" }, - "telephone_white": { - "unicode": "1F57E", - "unicode_alternates": [], - "name": "white touchtone telephone", - "shortname": ":telephone_white:", - "category": "objects_symbols", - "aliases": [ - ":white_touchtone_telephone:" - ], - "aliases_ascii": [], - "keywords": [ - "communication", - "dial", - "technology" - ] - }, "telescope": { "unicode": "1F52D", "unicode_alternates": [], @@ -26598,13 +29839,15 @@ "aliases_ascii": [], "keywords": [ "space", - "stars" + "stars", + "object", + "science" ], "moji": "🔭" }, "ten": { "unicode": "1F51F", - "unicode_alternates": "", + "unicode_alternates": [], "name": "keycap ten", "shortname": ":ten:", "category": "symbols", @@ -26615,15 +29858,18 @@ "blue-square", "numbers", "symbol", - "word" - ] + "word", + "number", + "math" + ], + "moji": "🔟" }, "tennis": { "unicode": "1F3BE", "unicode_alternates": [], "name": "tennis racquet and ball", "shortname": ":tennis:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -26637,7 +29883,8 @@ "game", "net", "court", - "love" + "love", + "sport" ], "moji": "🎾" }, @@ -26648,13 +29895,16 @@ ], "name": "tent", "shortname": ":tent:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "camp", "outdoors", - "photo" + "photo", + "places", + "travel", + "vacation" ], "moji": "⛺" }, @@ -26663,16 +29913,21 @@ "unicode_alternates": [], "name": "thermometer", "shortname": ":thermometer:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ - "temperature" - ] + "temperature", + "object", + "science", + "health", + "hot" + ], + "moji": "🌡" }, "thermometer_face": { "unicode": "1F912", - "unicode_alternates": "", + "unicode_alternates": [], "name": "face with thermometer", "shortname": ":thermometer_face:", "category": "people", @@ -26680,11 +29935,17 @@ ":face_with_thermometer:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "smiley", + "health", + "sick", + "emotion" + ], + "moji": "🤒" }, "thinking": { "unicode": "1F914", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thinking face", "shortname": ":thinking:", "category": "people", @@ -26692,66 +29953,47 @@ ":thinking_face:" ], "aliases_ascii": [], - "keywords": [] - }, - "thought_balloon": { - "unicode": "1F4AD", - "unicode_alternates": [], - "name": "thought balloon", - "shortname": ":thought_balloon:", - "category": "emoticons", - "aliases": [], - "aliases_ascii": [], "keywords": [ - "bubble", - "cloud", - "speech", - "thought", - "balloon", - "comic", - "think", - "day dream", - "wonder" + "smiley", + "thinking", + "boys night" ], - "moji": "💭" + "moji": "🤔" }, - "thought_left": { - "unicode": "1F5EC", + "third_place": { + "unicode": "1F949", "unicode_alternates": [], - "name": "left thought bubble", - "shortname": ":thought_left:", - "category": "objects_symbols", + "name": "third place medal", + "shortname": ":third_place:", + "category": "activity", "aliases": [ - ":left_thought_bubble:" + ":third_place_medal:" ], "aliases_ascii": [], - "keywords": [ - "balloon", - "cloud", - "comic", - "think", - "day dream", - "wonder" - ] + "keywords": [], + "moji": "🥉" }, - "thought_right": { - "unicode": "1F5ED", - "unicode_alternates": [], - "name": "right thought bubble", - "shortname": ":thought_right:", - "category": "objects_symbols", - "aliases": [ - ":right_thought_bubble:" - ], + "thought_balloon": { + "unicode": "1F4AD", + "unicode_alternates": [], + "name": "thought balloon", + "shortname": ":thought_balloon:", + "category": "symbols", + "aliases": [], "aliases_ascii": [], "keywords": [ - "balloon", + "bubble", "cloud", + "speech", + "thought", + "balloon", "comic", "think", "day dream", - "wonder" - ] + "wonder", + "symbol" + ], + "moji": "💭" }, "three": { "moji": "3️⃣", @@ -26759,50 +30001,19 @@ "unicode_alternates": [ "0033-FE0F-20E3" ], - "name": "digit three", + "name": "keycap digit three", "shortname": ":three:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "3", "blue-square", "numbers", - "prime" - ] - }, - "thumbs_down_reverse": { - "unicode": "1F593", - "unicode_alternates": [], - "name": "reversed thumbs down sign", - "shortname": ":thumbs_down_reverse:", - "category": "people", - "aliases": [ - ":reversed_thumbs_down_sign:" - ], - "aliases_ascii": [], - "keywords": [ - "hand", - "no", - "-1" - ] - }, - "thumbs_up_reverse": { - "unicode": "1F592", - "unicode_alternates": [], - "name": "reversed thumbs up sign", - "shortname": ":thumbs_up_reverse:", - "category": "people", - "aliases": [ - ":reversed_thumbs_up_sign:" - ], - "aliases_ascii": [], - "keywords": [ - "cool", - "hand", - "like", - "yes", - "+1" + "prime", + "number", + "math", + "symbol" ] }, "thumbsdown": { @@ -26810,20 +30021,23 @@ "unicode_alternates": [], "name": "thumbs down sign", "shortname": ":thumbsdown:", - "category": "emoticons", + "category": "people", "aliases": [ ":-1:" ], "aliases_ascii": [], "keywords": [ "hand", - "no" + "no", + "body", + "hands", + "diversity" ], "moji": "👎" }, "thumbsdown_tone1": { "unicode": "1F44E-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs down sign tone 1", "shortname": ":thumbsdown_tone1:", "category": "people", @@ -26835,11 +30049,12 @@ "hand", "no", "-1" - ] + ], + "moji": "👎🏻" }, "thumbsdown_tone2": { "unicode": "1F44E-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs down sign tone 2", "shortname": ":thumbsdown_tone2:", "category": "people", @@ -26851,11 +30066,12 @@ "hand", "no", "-1" - ] + ], + "moji": "👎🏼" }, "thumbsdown_tone3": { "unicode": "1F44E-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs down sign tone 3", "shortname": ":thumbsdown_tone3:", "category": "people", @@ -26867,11 +30083,12 @@ "hand", "no", "-1" - ] + ], + "moji": "👎🏽" }, "thumbsdown_tone4": { "unicode": "1F44E-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs down sign tone 4", "shortname": ":thumbsdown_tone4:", "category": "people", @@ -26883,11 +30100,12 @@ "hand", "no", "-1" - ] + ], + "moji": "👎🏾" }, "thumbsdown_tone5": { "unicode": "1F44E-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs down sign tone 5", "shortname": ":thumbsdown_tone5:", "category": "people", @@ -26899,14 +30117,15 @@ "hand", "no", "-1" - ] + ], + "moji": "👎🏿" }, "thumbsup": { "unicode": "1F44D", "unicode_alternates": [], "name": "thumbs up sign", "shortname": ":thumbsup:", - "category": "emoticons", + "category": "people", "aliases": [ ":+1:" ], @@ -26915,13 +30134,22 @@ "cool", "hand", "like", - "yes" + "yes", + "body", + "hands", + "hi", + "luck", + "thank you", + "diversity", + "perfect", + "good", + "beautiful" ], "moji": "👍" }, "thumbsup_tone1": { "unicode": "1F44D-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs up sign tone 1", "shortname": ":thumbsup_tone1:", "category": "people", @@ -26935,11 +30163,12 @@ "like", "yes", "+1" - ] + ], + "moji": "👍🏻" }, "thumbsup_tone2": { "unicode": "1F44D-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs up sign tone 2", "shortname": ":thumbsup_tone2:", "category": "people", @@ -26953,11 +30182,12 @@ "like", "yes", "+1" - ] + ], + "moji": "👍🏼" }, "thumbsup_tone3": { "unicode": "1F44D-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs up sign tone 3", "shortname": ":thumbsup_tone3:", "category": "people", @@ -26971,11 +30201,12 @@ "like", "yes", "+1" - ] + ], + "moji": "👍🏽" }, "thumbsup_tone4": { "unicode": "1F44D-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs up sign tone 4", "shortname": ":thumbsup_tone4:", "category": "people", @@ -26989,11 +30220,12 @@ "like", "yes", "+1" - ] + ], + "moji": "👍🏾" }, "thumbsup_tone5": { "unicode": "1F44D-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thumbs up sign tone 5", "shortname": ":thumbsup_tone5:", "category": "people", @@ -27007,11 +30239,12 @@ "like", "yes", "+1" - ] + ], + "moji": "👍🏿" }, "thunder_cloud_rain": { "unicode": "26C8", - "unicode_alternates": "", + "unicode_alternates": [], "name": "thunder cloud and rain", "shortname": ":thunder_cloud_rain:", "category": "nature", @@ -27021,15 +30254,20 @@ "aliases_ascii": [], "keywords": [ "nature", - "weather" - ] + "weather", + "sky", + "cloud", + "cold", + "rain" + ], + "moji": "⛈" }, "ticket": { "unicode": "1F3AB", "unicode_alternates": [], "name": "ticket", "shortname": ":ticket:", - "category": "places", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27042,7 +30280,10 @@ "stub", "admission", "proof", - "purchase" + "purchase", + "theatre", + "movie", + "parties" ], "moji": "🎫" }, @@ -27064,8 +30305,12 @@ "entertainment", "stub", "proof", - "purchase" - ] + "purchase", + "theatre", + "movie", + "parties" + ], + "moji": "🎟" }, "tiger": { "unicode": "1F42F", @@ -27076,7 +30321,10 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "animal" + "animal", + "wildlife", + "roar", + "cat" ], "moji": "🐯" }, @@ -27096,13 +30344,15 @@ "striped", "tony", "tigger", - "hobs" + "hobs", + "wildlife", + "roar" ], "moji": "🐅" }, "timer": { "unicode": "23F2", - "unicode_alternates": "", + "unicode_alternates": [], "name": "timer clock", "shortname": ":timer:", "category": "objects", @@ -27113,14 +30363,15 @@ "keywords": [ "object", "time" - ] + ], + "moji": "⏲" }, "tired_face": { "unicode": "1F62B", "unicode_alternates": [], "name": "tired face", "shortname": ":tired_face:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27131,13 +30382,18 @@ "whine", "exhausted", "sleepy", - "tired" + "tired", + "sad", + "smiley", + "emotion" ], "moji": "😫" }, "tm": { "unicode": "2122", - "unicode_alternates": "2122-fe0f", + "unicode_alternates": [ + "2122-FE0F" + ], "name": "trade mark sign", "shortname": ":tm:", "category": "symbols", @@ -27149,7 +30405,8 @@ "symbol", "tm", "word" - ] + ], + "moji": "™" }, "toilet": { "unicode": "1F6BD", @@ -27168,7 +30425,8 @@ "porcelain", "waste", "flush", - "plumbing" + "plumbing", + "object" ], "moji": "🚽" }, @@ -27177,12 +30435,16 @@ "unicode_alternates": [], "name": "tokyo tower", "shortname": ":tokyo_tower:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "japan", - "photo" + "photo", + "places", + "travel", + "vacation", + "eiffel tower" ], "moji": "🗼" }, @@ -27191,7 +30453,7 @@ "unicode_alternates": [], "name": "tomato", "shortname": ":tomato:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27200,80 +30462,83 @@ "nature", "vegetable", "tomato", - "fruit", "sauce", - "italian" + "italian", + "vegetables" ], "moji": "🍅" }, "tone1": { "unicode": "1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "emoji modifier Fitzpatrick type-1-2", "shortname": ":tone1:", "category": "modifier", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [], + "moji": "🏻" }, "tone2": { "unicode": "1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "emoji modifier Fitzpatrick type-3", "shortname": ":tone2:", "category": "modifier", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [], + "moji": "🏼" }, "tone3": { "unicode": "1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "emoji modifier Fitzpatrick type-4", "shortname": ":tone3:", "category": "modifier", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [], + "moji": "🏽" }, "tone4": { "unicode": "1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "emoji modifier Fitzpatrick type-5", "shortname": ":tone4:", "category": "modifier", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [], + "moji": "🏾" }, "tone5": { "unicode": "1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "emoji modifier Fitzpatrick type-6", "shortname": ":tone5:", "category": "modifier", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [], + "moji": "🏿" }, "tongue": { "unicode": "1F445", "unicode_alternates": [], "name": "tongue", "shortname": ":tongue:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "mouth", "playful", "tongue", - "mouth", "taste", "buds", "food", "silly", - "playful", "tease", "kiss", "french kiss", @@ -27281,7 +30546,10 @@ "tasty", "playfulness", "silliness", - "intimacy" + "intimacy", + "body", + "sexy", + "lip" ], "moji": "👅" }, @@ -27290,26 +30558,31 @@ "unicode_alternates": [], "name": "hammer and wrench", "shortname": ":tools:", - "category": "objects_symbols", + "category": "objects", "aliases": [ ":hammer_and_wrench:" ], "aliases_ascii": [], "keywords": [ - "tools" - ] + "tools", + "object", + "tool" + ], + "moji": "🛠" }, "top": { "unicode": "1F51D", "unicode_alternates": [], "name": "top with upwards arrow above", "shortname": ":top:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "words" + "words", + "arrow", + "symbol" ], "moji": "🔝" }, @@ -27318,7 +30591,7 @@ "unicode_alternates": [], "name": "top hat", "shortname": ":tophat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27337,14 +30610,15 @@ "topper", "london", "period piece", - "magic", - "magician" + "magician", + "fashion", + "accessories" ], "moji": "🎩" }, "track_next": { "unicode": "23ED", - "unicode_alternates": "", + "unicode_alternates": [], "name": "black right-pointing double triangle with vertical bar", "shortname": ":track_next:", "category": "symbols", @@ -27358,11 +30632,12 @@ "next track", "sound", "symbol" - ] + ], + "moji": "⏭" }, "track_previous": { "unicode": "23EE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "black left-pointing double triangle with vertical bar", "shortname": ":track_previous:", "category": "symbols", @@ -27376,28 +30651,34 @@ "previous track", "sound", "symbol" - ] + ], + "moji": "⏮" }, "trackball": { "unicode": "1F5B2", "unicode_alternates": [], "name": "trackball", "shortname": ":trackball:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "input", "device", - "gadget" - ] + "gadget", + "electronics", + "work", + "game", + "office" + ], + "moji": "🖲" }, "tractor": { "unicode": "1F69C", "unicode_alternates": [], "name": "tractor", "shortname": ":tractor:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27409,7 +30690,8 @@ "farm", "construction", "machine", - "digger" + "digger", + "transportation" ], "moji": "🚜" }, @@ -27418,18 +30700,19 @@ "unicode_alternates": [], "name": "horizontal traffic light", "shortname": ":traffic_light:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "traffic", "transportation", - "traffic", "light", "stop", "go", "yield", - "horizontal" + "horizontal", + "object", + "stop light" ], "moji": "🚥" }, @@ -27438,20 +30721,24 @@ "unicode_alternates": [], "name": "Tram Car", "shortname": ":train:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "tram", - "rail" - ] + "rail", + "transportation", + "travel", + "train" + ], + "moji": "🚋" }, "train2": { "unicode": "1F686", "unicode_alternates": [], "name": "train", "shortname": ":train2:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27459,66 +30746,35 @@ "vehicle", "train", "locomotive", - "rail" + "rail", + "travel" ], "moji": "🚆" }, - "train_diesel": { - "unicode": "1F6F2", - "unicode_alternates": [], - "name": "diesel locomotive", - "shortname": ":train_diesel:", - "category": "travel_places", - "aliases": [ - ":diesel_locomotive:" - ], - "aliases_ascii": [], - "keywords": [ - "train", - "transportation", - "engine", - "rail" - ] - }, "tram": { "unicode": "1F68A", "unicode_alternates": [], "name": "tram", "shortname": ":tram:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ "transportation", "vehicle", "tram", - "transportation", - "transport" + "transport", + "travel", + "train" ], "moji": "🚊" }, - "triangle_round": { - "unicode": "1F6C6", - "unicode_alternates": [], - "name": "triangle with rounded corners", - "shortname": ":triangle_round:", - "category": "objects_symbols", - "aliases": [ - ":triangle_with_rounded_corners:" - ], - "aliases_ascii": [], - "keywords": [ - "caution", - "warning", - "alert" - ] - }, "triangular_flag_on_post": { "unicode": "1F6A9", "unicode_alternates": [], "name": "triangular flag on post", "shortname": ":triangular_flag_on_post:", - "category": "places", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27527,7 +30783,8 @@ "flag", "golf", "post", - "flagpole" + "flagpole", + "object" ], "moji": "🚩" }, @@ -27543,7 +30800,10 @@ "architect", "math", "sketch", - "stationery" + "stationery", + "object", + "tool", + "office" ], "moji": "📐" }, @@ -27552,12 +30812,14 @@ "unicode_alternates": [], "name": "trident emblem", "shortname": ":trident:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "spear", - "weapon" + "weapon", + "object", + "symbol" ], "moji": "🔱" }, @@ -27566,7 +30828,7 @@ "unicode_alternates": [], "name": "face with look of triumph", "shortname": ":triumph:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27575,7 +30837,11 @@ "phew", "triumph", "steam", - "breath" + "breath", + "mad", + "smiley", + "angry", + "emotion" ], "moji": "😤" }, @@ -27584,7 +30850,7 @@ "unicode_alternates": [], "name": "trolleybus", "shortname": ":trolleybus:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27595,7 +30861,7 @@ "bus", "city", "transport", - "transportation" + "travel" ], "moji": "🚎" }, @@ -27604,7 +30870,7 @@ "unicode_alternates": [], "name": "trophy", "shortname": ":trophy:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27617,11 +30883,13 @@ "trophy", "first", "show", - "place", - "win", "reward", "achievement", - "medal" + "medal", + "object", + "game", + "perfect", + "parties" ], "moji": "🏆" }, @@ -27630,7 +30898,7 @@ "unicode_alternates": [], "name": "tropical drink", "shortname": ":tropical_drink:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27642,7 +30910,9 @@ "coconut", "pina", "fruit", - "umbrella" + "umbrella", + "cocktail", + "alcohol" ], "moji": "🍹" }, @@ -27656,7 +30926,8 @@ "aliases_ascii": [], "keywords": [ "animal", - "swim" + "swim", + "wildlife" ], "moji": "🐠" }, @@ -27665,7 +30936,7 @@ "unicode_alternates": [], "name": "delivery truck", "shortname": ":truck:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27682,16 +30953,15 @@ "unicode_alternates": [], "name": "trumpet", "shortname": ":trumpet:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ "brass", "music", "trumpet", - "brass", - "music", - "instrument" + "instrument", + "instruments" ], "moji": "🎺" }, @@ -27711,34 +30981,40 @@ "flower", "bulb", "spring", - "easter" + "easter", + "vagina", + "girls night" ], "moji": "🌷" }, - "turkey": { - "unicode": "1F983", - "unicode_alternates": "", - "name": "turkey", - "shortname": ":turkey:", - "category": "nature", - "aliases": [], - "aliases_ascii": [], - "keywords": [] - }, - "turned_ok_hand": { - "unicode": "1F58F", + "tumbler_glass": { + "unicode": "1F943", "unicode_alternates": [], - "name": "turned ok hand sign", - "shortname": ":turned_ok_hand:", - "category": "people", + "name": "tumbler glass", + "shortname": ":tumbler_glass:", + "category": "food", "aliases": [ - ":turned_ok_hand_sign:" + ":whisky:" + ], + "aliases_ascii": [], + "keywords": [ + "booze" ], + "moji": "🥃" + }, + "turkey": { + "unicode": "1F983", + "unicode_alternates": [], + "name": "turkey", + "shortname": ":turkey:", + "category": "nature", + "aliases": [], "aliases_ascii": [], "keywords": [ - "perfect", - "okay" - ] + "wildlife", + "animal" + ], + "moji": "🦃" }, "turtle": { "unicode": "1F422", @@ -27756,15 +31032,15 @@ "tortoise", "chelonian", "reptile", - "slow", "snap", - "steady" + "steady", + "wildlife" ], "moji": "🐢" }, "tv": { "unicode": "1F4FA", - "unicode_alternates": "", + "unicode_alternates": [], "name": "television", "shortname": ":tv:", "category": "objects", @@ -27778,19 +31054,23 @@ "tv", "entertainment", "object", - "video" - ] + "video", + "electronics" + ], + "moji": "📺" }, "twisted_rightwards_arrows": { "unicode": "1F500", "unicode_alternates": [], "name": "twisted rightwards arrows", "shortname": ":twisted_rightwards_arrows:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "arrow", + "symbol" ], "moji": "🔀" }, @@ -27800,16 +31080,19 @@ "unicode_alternates": [ "0032-FE0F-20E3" ], - "name": "digit two", + "name": "keycap digit two", "shortname": ":two:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "2", "blue-square", "numbers", - "prime" + "prime", + "number", + "math", + "symbol" ] }, "two_hearts": { @@ -27817,7 +31100,7 @@ "unicode_alternates": [], "name": "two hearts", "shortname": ":two_hearts:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27828,8 +31111,8 @@ "heart", "hearts", "two", - "love", - "emotion" + "emotion", + "symbol" ], "moji": "💕" }, @@ -27838,7 +31121,7 @@ "unicode_alternates": [], "name": "two men holding hands", "shortname": ":two_men_holding_hands:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27850,11 +31133,13 @@ "men", "gay", "homosexual", - "friends", "hands", "holding", "team", - "unity" + "unity", + "people", + "sex", + "lgbt" ], "moji": "👬" }, @@ -27863,7 +31148,7 @@ "unicode_alternates": [], "name": "two women holding hands", "shortname": ":two_women_holding_hands:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27875,14 +31160,17 @@ "women", "hands", "girlfriends", - "friends", "sisters", "mother", "daughter", "gay", "homosexual", - "couple", - "unity" + "unity", + "people", + "sex", + "lgbt", + "lesbian", + "girls night" ], "moji": "👭" }, @@ -27891,7 +31179,7 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-5272", "shortname": ":u5272:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27899,7 +31187,8 @@ "cut", "divide", "kanji", - "pink" + "pink", + "symbol" ], "moji": "🈹" }, @@ -27908,14 +31197,16 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-5408", "shortname": ":u5408:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "chinese", "japanese", "join", - "kanji" + "kanji", + "japan", + "symbol" ], "moji": "🈴" }, @@ -27924,12 +31215,13 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-55b6", "shortname": ":u55b6:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "japanese", - "opening hours" + "opening hours", + "symbol" ], "moji": "🈺" }, @@ -27940,14 +31232,15 @@ ], "name": "squared cjk unified ideograph-6307", "shortname": ":u6307:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "chinese", "green-square", "kanji", - "point" + "point", + "symbol" ], "moji": "🈯" }, @@ -27956,7 +31249,7 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-6708", "shortname": ":u6708:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27964,7 +31257,8 @@ "japanese", "kanji", "moon", - "orange-square" + "orange-square", + "symbol" ], "moji": "🈷" }, @@ -27973,14 +31267,15 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-6709", "shortname": ":u6709:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "chinese", "have", "kanji", - "orange-square" + "orange-square", + "symbol" ], "moji": "🈶" }, @@ -27989,7 +31284,7 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-6e80", "shortname": ":u6e80:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -27997,7 +31292,9 @@ "full", "japanese", "kanji", - "red-square" + "red-square", + "japan", + "symbol" ], "moji": "🈵" }, @@ -28008,7 +31305,7 @@ ], "name": "squared cjk unified ideograph-7121", "shortname": ":u7121:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28017,7 +31314,8 @@ "kanji", "no", "nothing", - "orange-square" + "orange-square", + "symbol" ], "moji": "🈚" }, @@ -28026,13 +31324,14 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-7533", "shortname": ":u7533:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "chinese", "japanese", - "kanji" + "kanji", + "symbol" ], "moji": "🈸" }, @@ -28041,7 +31340,7 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-7981", "shortname": ":u7981:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28050,7 +31349,9 @@ "japanese", "kanji", "limit", - "restricted" + "restricted", + "japan", + "symbol" ], "moji": "🈲" }, @@ -28059,14 +31360,15 @@ "unicode_alternates": [], "name": "squared cjk unified ideograph-7a7a", "shortname": ":u7a7a:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "chinese", "empty", "japanese", - "kanji" + "kanji", + "symbol" ], "moji": "🈳" }, @@ -28082,13 +31384,15 @@ "aliases_ascii": [], "keywords": [ "rain", - "weather" + "weather", + "sky", + "cold" ], "moji": "☔" }, "umbrella2": { "unicode": "2602", - "unicode_alternates": "", + "unicode_alternates": [], "name": "umbrella", "shortname": ":umbrella2:", "category": "nature", @@ -28098,15 +31402,19 @@ "clothing", "nature", "rain", - "weather" - ] + "weather", + "object", + "sky", + "cold" + ], + "moji": "☂" }, "unamused": { "unicode": "1F612", "unicode_alternates": [], "name": "unamused face", "shortname": ":unamused:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28120,7 +31428,12 @@ "depressed", "unhappy", "disapprove", - "lame" + "lame", + "sad", + "mad", + "smiley", + "tired", + "emotion" ], "moji": "😒" }, @@ -28129,20 +31442,21 @@ "unicode_alternates": [], "name": "no one under eighteen symbol", "shortname": ":underage:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "18", "drink", "night", - "pub" + "pub", + "symbol" ], "moji": "🔞" }, "unicorn": { "unicode": "1F984", - "unicode_alternates": "", + "unicode_alternates": [], "name": "unicorn face", "shortname": ":unicorn:", "category": "nature", @@ -28150,7 +31464,10 @@ ":unicorn_face:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "animal" + ], + "moji": "🦄" }, "unlock": { "unicode": "1F513", @@ -28162,7 +31479,9 @@ "aliases_ascii": [], "keywords": [ "privacy", - "security" + "security", + "object", + "lock" ], "moji": "🔓" }, @@ -28171,17 +31490,18 @@ "unicode_alternates": [], "name": "squared up with exclamation mark", "shortname": ":up:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "blue-square" + "blue-square", + "symbol" ], "moji": "🆙" }, "upside_down": { "unicode": "1F643", - "unicode_alternates": "", + "unicode_alternates": [], "name": "upside-down face", "shortname": ":upside_down:", "category": "people", @@ -28189,11 +31509,16 @@ ":upside_down_face:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "silly", + "smiley", + "sarcastic" + ], + "moji": "🙃" }, "urn": { "unicode": "26B1", - "unicode_alternates": "", + "unicode_alternates": [], "name": "funeral urn", "shortname": ":urn:", "category": "objects", @@ -28203,8 +31528,11 @@ "aliases_ascii": [], "keywords": [ "death", - "object" - ] + "object", + "dead", + "rip" + ], + "moji": "⚱" }, "v": { "unicode": "270C", @@ -28213,7 +31541,7 @@ ], "name": "victory hand", "shortname": ":v:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28222,13 +31550,19 @@ "ohyeah", "peace", "two", - "victory" + "victory", + "body", + "hands", + "hi", + "thank you", + "diversity", + "girls night" ], "moji": "✌" }, "v_tone1": { "unicode": "270C-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "victory hand tone 1", "shortname": ":v_tone1:", "category": "people", @@ -28240,11 +31574,12 @@ "peace", "two", "v" - ] + ], + "moji": "✌🏻" }, "v_tone2": { "unicode": "270C-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "victory hand tone 2", "shortname": ":v_tone2:", "category": "people", @@ -28256,11 +31591,12 @@ "peace", "two", "v" - ] + ], + "moji": "✌🏼" }, "v_tone3": { "unicode": "270C-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "victory hand tone 3", "shortname": ":v_tone3:", "category": "people", @@ -28272,11 +31608,12 @@ "peace", "two", "v" - ] + ], + "moji": "✌🏽" }, "v_tone4": { "unicode": "270C-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "victory hand tone 4", "shortname": ":v_tone4:", "category": "people", @@ -28288,11 +31625,12 @@ "peace", "two", "v" - ] + ], + "moji": "✌🏾" }, "v_tone5": { "unicode": "270C-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "victory hand tone 5", "shortname": ":v_tone5:", "category": "people", @@ -28304,14 +31642,15 @@ "peace", "two", "v" - ] + ], + "moji": "✌🏿" }, "vertical_traffic_light": { "unicode": "1F6A6", "unicode_alternates": [], "name": "vertical traffic light", "shortname": ":vertical_traffic_light:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28321,7 +31660,9 @@ "stop", "go", "yield", - "vertical" + "vertical", + "object", + "stop light" ], "moji": "🚦" }, @@ -28336,7 +31677,8 @@ "keywords": [ "oldschool", "record", - "video" + "video", + "electronics" ], "moji": "📼" }, @@ -28345,12 +31687,13 @@ "unicode_alternates": [], "name": "vibration mode", "shortname": ":vibration_mode:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "orange-square", - "phone" + "phone", + "symbol" ], "moji": "📳" }, @@ -28364,7 +31707,10 @@ "aliases_ascii": [], "keywords": [ "film", - "record" + "record", + "electronics", + "camera", + "movie" ], "moji": "📹" }, @@ -28373,7 +31719,7 @@ "unicode_alternates": [], "name": "video game", "shortname": ":video_game:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28383,11 +31729,11 @@ "play", "video", "game", - "console", - "controller", "nintendo", "xbox", - "playstation" + "playstation", + "electronics", + "boys night" ], "moji": "🎮" }, @@ -28396,7 +31742,7 @@ "unicode_alternates": [], "name": "violin", "shortname": ":violin:", - "category": "objects", + "category": "activity", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28404,8 +31750,8 @@ "music", "violin", "fiddle", - "music", - "instrument" + "instruments", + "sarcastic" ], "moji": "🎻" }, @@ -28416,7 +31762,7 @@ ], "name": "virgo", "shortname": ":virgo:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28428,9 +31774,8 @@ "constellation", "stars", "zodiac", - "sign", - "zodiac", - "horoscope" + "horoscope", + "symbol" ], "moji": "♍" }, @@ -28439,7 +31784,7 @@ "unicode_alternates": [], "name": "volcano", "shortname": ":volcano:", - "category": "nature", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28449,31 +31794,40 @@ "lava", "magma", "hot", - "explode" + "explode", + "places", + "tropical" ], "moji": "🌋" }, "volleyball": { "unicode": "1F3D0", - "unicode_alternates": "", + "unicode_alternates": [], "name": "volleyball", "shortname": ":volleyball:", "category": "activity", "aliases": [], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "game", + "ball", + "sport", + "volleyball" + ], + "moji": "🏐" }, "vs": { "unicode": "1F19A", "unicode_alternates": [], "name": "squared vs", "shortname": ":vs:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "orange-square", - "words" + "words", + "symbol" ], "moji": "🆚" }, @@ -28493,12 +31847,17 @@ "leonard", "nimoy", "star trek", - "live long" - ] + "live long", + "body", + "hands", + "hi", + "diversity" + ], + "moji": "🖖" }, "vulcan_tone1": { "unicode": "1F596-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with part between middle and ring fingers tone 1", "shortname": ":vulcan_tone1:", "category": "people", @@ -28513,11 +31872,12 @@ "nimoy", "star trek", "live long" - ] + ], + "moji": "🖖🏻" }, "vulcan_tone2": { "unicode": "1F596-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with part between middle and ring fingers tone 2", "shortname": ":vulcan_tone2:", "category": "people", @@ -28532,11 +31892,12 @@ "nimoy", "star trek", "live long" - ] + ], + "moji": "🖖🏼" }, "vulcan_tone3": { "unicode": "1F596-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with part between middle and ring fingers tone 3", "shortname": ":vulcan_tone3:", "category": "people", @@ -28551,11 +31912,12 @@ "nimoy", "star trek", "live long" - ] + ], + "moji": "🖖🏽" }, "vulcan_tone4": { "unicode": "1F596-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with part between middle and ring fingers tone 4", "shortname": ":vulcan_tone4:", "category": "people", @@ -28570,11 +31932,12 @@ "nimoy", "star trek", "live long" - ] + ], + "moji": "🖖🏾" }, "vulcan_tone5": { "unicode": "1F596-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "raised hand with part between middle and ring fingers tone 5", "shortname": ":vulcan_tone5:", "category": "people", @@ -28589,14 +31952,15 @@ "nimoy", "star trek", "live long" - ] + ], + "moji": "🖖🏿" }, "walking": { "unicode": "1F6B6", "unicode_alternates": [], "name": "pedestrian", "shortname": ":walking:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28607,13 +31971,16 @@ "stroll", "stride", "foot", - "feet" + "feet", + "people", + "men", + "diversity" ], "moji": "🚶" }, "walking_tone1": { "unicode": "1F6B6-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "pedestrian tone 1", "shortname": ":walking_tone1:", "category": "people", @@ -28626,11 +31993,12 @@ "stride", "hiking", "hike" - ] + ], + "moji": "🚶🏻" }, "walking_tone2": { "unicode": "1F6B6-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "pedestrian tone 2", "shortname": ":walking_tone2:", "category": "people", @@ -28643,11 +32011,12 @@ "stride", "hiking", "hike" - ] + ], + "moji": "🚶🏼" }, "walking_tone3": { "unicode": "1F6B6-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "pedestrian tone 3", "shortname": ":walking_tone3:", "category": "people", @@ -28660,11 +32029,12 @@ "stride", "hiking", "hike" - ] + ], + "moji": "🚶🏽" }, "walking_tone4": { "unicode": "1F6B6-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "pedestrian tone 4", "shortname": ":walking_tone4:", "category": "people", @@ -28677,11 +32047,12 @@ "stride", "hiking", "hike" - ] + ], + "moji": "🚶🏾" }, "walking_tone5": { "unicode": "1F6B6-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "pedestrian tone 5", "shortname": ":walking_tone5:", "category": "people", @@ -28694,7 +32065,8 @@ "stride", "hiking", "hike" - ] + ], + "moji": "🚶🏿" }, "waning_crescent_moon": { "unicode": "1F318", @@ -28712,7 +32084,8 @@ "sky", "night", "cheese", - "phase" + "phase", + "space" ], "moji": "🌘" }, @@ -28732,7 +32105,8 @@ "sky", "night", "cheese", - "phase" + "phase", + "space" ], "moji": "🌖" }, @@ -28743,12 +32117,14 @@ ], "name": "warning sign", "shortname": ":warning:", - "category": "places", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "exclamation", - "wip" + "wip", + "symbol", + "punctuation" ], "moji": "⚠" }, @@ -28757,14 +32133,17 @@ "unicode_alternates": [], "name": "wastebasket", "shortname": ":wastebasket:", - "category": "objects_symbols", + "category": "objects", "aliases": [], "aliases_ascii": [], "keywords": [ "trash", "garbage", - "dispose" - ] + "dispose", + "object", + "work" + ], + "moji": "🗑" }, "watch": { "unicode": "231A", @@ -28778,7 +32157,8 @@ "aliases_ascii": [], "keywords": [ "accessories", - "time" + "time", + "electronics" ], "moji": "⌚" }, @@ -28800,16 +32180,83 @@ "asia", "bovine", "milk", - "dairy" + "dairy", + "wildlife" ], "moji": "🐃" }, + "water_polo": { + "unicode": "1F93D", + "unicode_alternates": [], + "name": "water polo", + "shortname": ":water_polo:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤽" + }, + "water_polo_tone1": { + "unicode": "1F93D-1F3FB", + "unicode_alternates": [], + "name": "water polo tone 1", + "shortname": ":water_polo_tone1:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤽🏻" + }, + "water_polo_tone2": { + "unicode": "1F93D-1F3FC", + "unicode_alternates": [], + "name": "water polo tone 2", + "shortname": ":water_polo_tone2:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤽🏼" + }, + "water_polo_tone3": { + "unicode": "1F93D-1F3FD", + "unicode_alternates": [], + "name": "water polo tone 3", + "shortname": ":water_polo_tone3:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤽🏽" + }, + "water_polo_tone4": { + "unicode": "1F93D-1F3FE", + "unicode_alternates": [], + "name": "water polo tone 4", + "shortname": ":water_polo_tone4:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤽🏾" + }, + "water_polo_tone5": { + "unicode": "1F93D-1F3FF", + "unicode_alternates": [], + "name": "water polo tone 5", + "shortname": ":water_polo_tone5:", + "category": "activity", + "aliases": [], + "aliases_ascii": [], + "keywords": [], + "moji": "🤽🏿" + }, "watermelon": { "unicode": "1F349", "unicode_alternates": [], "name": "watermelon", "shortname": ":watermelon:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28818,7 +32265,6 @@ "melon", "watermelon", "summer", - "fruit", "large" ], "moji": "🍉" @@ -28828,7 +32274,7 @@ "unicode_alternates": [], "name": "waving hand sign", "shortname": ":wave:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28836,13 +32282,16 @@ "gesture", "goodbye", "hands", - "solong" + "solong", + "body", + "hi", + "diversity" ], "moji": "👋" }, "wave_tone1": { "unicode": "1F44B-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "waving hand sign tone 1", "shortname": ":wave_tone1:", "category": "people", @@ -28855,11 +32304,12 @@ "solong", "hi", "wave" - ] + ], + "moji": "👋🏻" }, "wave_tone2": { "unicode": "1F44B-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "waving hand sign tone 2", "shortname": ":wave_tone2:", "category": "people", @@ -28872,11 +32322,12 @@ "solong", "hi", "wave" - ] + ], + "moji": "👋🏼" }, "wave_tone3": { "unicode": "1F44B-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "waving hand sign tone 3", "shortname": ":wave_tone3:", "category": "people", @@ -28889,11 +32340,12 @@ "solong", "hi", "wave" - ] + ], + "moji": "👋🏽" }, "wave_tone4": { "unicode": "1F44B-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "waving hand sign tone 4", "shortname": ":wave_tone4:", "category": "people", @@ -28906,11 +32358,12 @@ "solong", "hi", "wave" - ] + ], + "moji": "👋🏾" }, "wave_tone5": { "unicode": "1F44B-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "waving hand sign tone 5", "shortname": ":wave_tone5:", "category": "people", @@ -28923,19 +32376,21 @@ "solong", "hi", "wave" - ] + ], + "moji": "👋🏿" }, "wavy_dash": { "unicode": "3030", "unicode_alternates": [], "name": "wavy dash", "shortname": ":wavy_dash:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "draw", - "line" + "line", + "symbol" ], "moji": "〰" }, @@ -28954,7 +32409,8 @@ "sky", "night", "cheese", - "phase" + "phase", + "space" ], "moji": "🌒" }, @@ -28967,7 +32423,10 @@ "aliases": [], "aliases_ascii": [], "keywords": [ - "nature" + "nature", + "space", + "sky", + "moon" ], "moji": "🌔" }, @@ -28976,7 +32435,7 @@ "unicode_alternates": [], "name": "water closet", "shortname": ":wc:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -28985,13 +32444,13 @@ "toilet", "water", "closet", - "toilet", "bathroom", "throne", "porcelain", "waste", "flush", - "plumbing" + "plumbing", + "symbol" ], "moji": "🚾" }, @@ -29000,7 +32459,7 @@ "unicode_alternates": [], "name": "weary face", "shortname": ":weary:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29010,13 +32469,14 @@ "sleepy", "tired", "weary", - "sleepy", - "tired", "tiredness", "study", "finals", "school", - "exhausted" + "exhausted", + "smiley", + "stressed", + "emotion" ], "moji": "😩" }, @@ -29025,7 +32485,7 @@ "unicode_alternates": [], "name": "wedding", "shortname": ":wedding:", - "category": "places", + "category": "travel", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29035,7 +32495,11 @@ "groom", "like", "love", - "marriage" + "marriage", + "places", + "wedding", + "building", + "parties" ], "moji": "💒" }, @@ -29051,7 +32515,10 @@ "animal", "nature", "ocean", - "sea" + "sea", + "wildlife", + "tropical", + "whales" ], "moji": "🐳" }, @@ -29073,13 +32540,16 @@ "bloated", "fat", "large", - "massive" + "massive", + "wildlife", + "tropical", + "whales" ], "moji": "🐋" }, "wheel_of_dharma": { "unicode": "2638", - "unicode_alternates": "", + "unicode_alternates": [], "name": "wheel of dharma", "shortname": ":wheel_of_dharma:", "category": "symbols", @@ -29089,7 +32559,8 @@ "buddhist", "religion", "symbol" - ] + ], + "moji": "☸" }, "wheelchair": { "unicode": "267F", @@ -29098,12 +32569,13 @@ ], "name": "wheelchair symbol", "shortname": ":wheelchair:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", - "disabled" + "disabled", + "symbol" ], "moji": "♿" }, @@ -29112,13 +32584,14 @@ "unicode_alternates": [], "name": "white heavy check mark", "shortname": ":white_check_mark:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "agree", "green-square", - "ok" + "ok", + "symbol" ], "moji": "✅" }, @@ -29129,11 +32602,14 @@ ], "name": "medium white circle", "shortname": ":white_circle:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "circle" ], "moji": "⚪" }, @@ -29142,7 +32618,7 @@ "unicode_alternates": [], "name": "white flower", "shortname": ":white_flower:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29158,7 +32634,8 @@ "homework", "student", "assignment", - "praise" + "praise", + "symbol" ], "moji": "💮" }, @@ -29169,11 +32646,14 @@ ], "name": "white large square", "shortname": ":white_large_square:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "square" ], "moji": "⬜" }, @@ -29184,11 +32664,14 @@ ], "name": "white medium small square", "shortname": ":white_medium_small_square:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "square" ], "moji": "◽" }, @@ -29199,11 +32682,14 @@ ], "name": "white medium square", "shortname": ":white_medium_square:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "square" ], "moji": "◻" }, @@ -29214,11 +32700,14 @@ ], "name": "white small square", "shortname": ":white_small_square:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "square" ], "moji": "▫" }, @@ -29227,17 +32716,20 @@ "unicode_alternates": [], "name": "white square button", "shortname": ":white_square_button:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ - "shape" + "shape", + "shapes", + "symbol", + "square" ], "moji": "🔳" }, "white_sun_cloud": { "unicode": "1F325", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white sun behind cloud", "shortname": ":white_sun_cloud:", "category": "nature", @@ -29247,12 +32739,17 @@ "aliases_ascii": [], "keywords": [ "nature", - "weather" - ] + "weather", + "sky", + "cloud", + "cold", + "sun" + ], + "moji": "🌥" }, "white_sun_rain_cloud": { "unicode": "1F326", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white sun behind cloud with rain", "shortname": ":white_sun_rain_cloud:", "category": "nature", @@ -29262,12 +32759,18 @@ "aliases_ascii": [], "keywords": [ "nature", - "weather" - ] + "weather", + "sky", + "cloud", + "cold", + "rain", + "sun" + ], + "moji": "🌦" }, "white_sun_small_cloud": { "unicode": "1F324", - "unicode_alternates": "", + "unicode_alternates": [], "name": "white sun with small cloud", "shortname": ":white_sun_small_cloud:", "category": "nature", @@ -29277,8 +32780,25 @@ "aliases_ascii": [], "keywords": [ "nature", - "weather" - ] + "weather", + "sky", + "cloud", + "sun" + ], + "moji": "🌤" + }, + "wilted_rose": { + "unicode": "1F940", + "unicode_alternates": [], + "name": "wilted flower", + "shortname": ":wilted_rose:", + "category": "nature", + "aliases": [ + ":wilted_flower:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🥀" }, "wind_blowing_face": { "unicode": "1F32C", @@ -29290,8 +32810,11 @@ "aliases_ascii": [], "keywords": [ "mother", - "nature" - ] + "nature", + "weather", + "cold" + ], + "moji": "🌬" }, "wind_chime": { "unicode": "1F390", @@ -29314,7 +32837,9 @@ "soothing", "protective", "spiritual", - "sound" + "sound", + "object", + "japan" ], "moji": "🎐" }, @@ -29323,7 +32848,7 @@ "unicode_alternates": [], "name": "wine glass", "shortname": ":wine_glass:", - "category": "objects", + "category": "food", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29338,7 +32863,10 @@ "grapes", "tasting", "wine", - "winery" + "winery", + "italian", + "girls night", + "parties" ], "moji": "🍷" }, @@ -29347,7 +32875,7 @@ "unicode_alternates": [], "name": "winking face", "shortname": ":wink:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [ ";)", @@ -29367,7 +32895,10 @@ "wink", "winking", "friendly", - "joke" + "joke", + "silly", + "smiley", + "emotion" ], "moji": "😉" }, @@ -29381,7 +32912,9 @@ "aliases_ascii": [], "keywords": [ "animal", - "nature" + "nature", + "wildlife", + "roar" ], "moji": "🐺" }, @@ -29390,18 +32923,25 @@ "unicode_alternates": [], "name": "woman", "shortname": ":woman:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "female", - "girls" + "girls", + "people", + "women", + "sex", + "diversity", + "feminist", + "selfie", + "girls night" ], "moji": "👩" }, "woman_tone1": { "unicode": "1F469-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "woman tone 1", "shortname": ":woman_tone1:", "category": "people", @@ -29411,11 +32951,12 @@ "female", "girl", "lady" - ] + ], + "moji": "👩🏻" }, "woman_tone2": { "unicode": "1F469-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "woman tone 2", "shortname": ":woman_tone2:", "category": "people", @@ -29425,11 +32966,12 @@ "female", "girl", "lady" - ] + ], + "moji": "👩🏼" }, "woman_tone3": { "unicode": "1F469-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "woman tone 3", "shortname": ":woman_tone3:", "category": "people", @@ -29439,11 +32981,12 @@ "female", "girl", "lady" - ] + ], + "moji": "👩🏽" }, "woman_tone4": { "unicode": "1F469-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "woman tone 4", "shortname": ":woman_tone4:", "category": "people", @@ -29453,11 +32996,12 @@ "female", "girl", "lady" - ] + ], + "moji": "👩🏾" }, "woman_tone5": { "unicode": "1F469-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "woman tone 5", "shortname": ":woman_tone5:", "category": "people", @@ -29467,14 +33011,15 @@ "female", "girl", "lady" - ] + ], + "moji": "👩🏿" }, "womans_clothes": { "unicode": "1F45A", "unicode_alternates": [], "name": "womans clothes", "shortname": ":womans_clothes:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29490,7 +33035,8 @@ "shopping", "shop", "dressing", - "dressed" + "dressed", + "women" ], "moji": "👚" }, @@ -29499,13 +33045,14 @@ "unicode_alternates": [], "name": "womans hat", "shortname": ":womans_hat:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "accessories", "fashion", - "female" + "female", + "women" ], "moji": "👒" }, @@ -29514,7 +33061,7 @@ "unicode_alternates": [], "name": "womens symbol", "shortname": ":womens:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29525,7 +33072,8 @@ "sign", "girl", "female", - "avatar" + "avatar", + "symbol" ], "moji": "🚺" }, @@ -29534,7 +33082,7 @@ "unicode_alternates": [], "name": "worried face", "shortname": ":worried:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29544,8 +33092,10 @@ "worried", "anxious", "distressed", - "nervous", - "tense" + "tense", + "sad", + "smiley", + "emotion" ], "moji": "😟" }, @@ -29560,30 +33110,111 @@ "keywords": [ "diy", "ikea", - "tools" + "tools", + "object", + "tool" ], "moji": "🔧" }, - "writing_hand": { - "unicode": "1F58E", + "wrestlers": { + "unicode": "1F93C", "unicode_alternates": [], - "name": "left writing hand", - "shortname": ":writing_hand:", - "category": "people", + "name": "wrestlers", + "shortname": ":wrestlers:", + "category": "activity", + "aliases": [ + ":wrestling:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤼" + }, + "wrestlers_tone1": { + "unicode": "1F93C-1F3FB", + "unicode_alternates": [], + "name": "wrestlers tone 1", + "shortname": ":wrestlers_tone1:", + "category": "activity", + "aliases": [ + ":wrestling_tone1:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤼🏻" + }, + "wrestlers_tone2": { + "unicode": "1F93C-1F3FC", + "unicode_alternates": [], + "name": "wrestlers tone 2", + "shortname": ":wrestlers_tone2:", + "category": "activity", + "aliases": [ + ":wrestling_tone2:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤼🏼" + }, + "wrestlers_tone3": { + "unicode": "1F93C-1F3FD", + "unicode_alternates": [], + "name": "wrestlers tone 3", + "shortname": ":wrestlers_tone3:", + "category": "activity", + "aliases": [ + ":wrestling_tone3:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤼🏽" + }, + "wrestlers_tone4": { + "unicode": "1F93C-1F3FE", + "unicode_alternates": [], + "name": "wrestlers tone 4", + "shortname": ":wrestlers_tone4:", + "category": "activity", + "aliases": [ + ":wrestling_tone4:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤼🏾" + }, + "wrestlers_tone5": { + "unicode": "1F93C-1F3FF", + "unicode_alternates": [], + "name": "wrestlers tone 5", + "shortname": ":wrestlers_tone5:", + "category": "activity", "aliases": [ - ":left_writing_hand:" + ":wrestling_tone5:" + ], + "aliases_ascii": [], + "keywords": [], + "moji": "🤼🏿" + }, + "writing_hand": { + "unicode": "270D", + "unicode_alternates": [ + "270D-FE0F" ], + "name": "writing hand", + "shortname": ":writing_hand:", + "category": "people", + "aliases": [], "aliases_ascii": [], "keywords": [ + "body", + "hands", "write", - "sign", - "signature", - "draw" - ] + "diversity" + ], + "moji": "✍" }, "writing_hand_tone1": { "unicode": "270D-1F3FB", - "unicode_alternates": "", + "unicode_alternates": [], "name": "writing hand tone 1", "shortname": ":writing_hand_tone1:", "category": "people", @@ -29594,11 +33225,12 @@ "sign", "signature", "draw" - ] + ], + "moji": "✍🏻" }, "writing_hand_tone2": { "unicode": "270D-1F3FC", - "unicode_alternates": "", + "unicode_alternates": [], "name": "writing hand tone 2", "shortname": ":writing_hand_tone2:", "category": "people", @@ -29609,11 +33241,12 @@ "sign", "signature", "draw" - ] + ], + "moji": "✍🏼" }, "writing_hand_tone3": { "unicode": "270D-1F3FD", - "unicode_alternates": "", + "unicode_alternates": [], "name": "writing hand tone 3", "shortname": ":writing_hand_tone3:", "category": "people", @@ -29624,11 +33257,12 @@ "sign", "signature", "draw" - ] + ], + "moji": "✍🏽" }, "writing_hand_tone4": { "unicode": "270D-1F3FE", - "unicode_alternates": "", + "unicode_alternates": [], "name": "writing hand tone 4", "shortname": ":writing_hand_tone4:", "category": "people", @@ -29639,11 +33273,12 @@ "sign", "signature", "draw" - ] + ], + "moji": "✍🏾" }, "writing_hand_tone5": { "unicode": "270D-1F3FF", - "unicode_alternates": "", + "unicode_alternates": [], "name": "writing hand tone 5", "shortname": ":writing_hand_tone5:", "category": "people", @@ -29654,20 +33289,23 @@ "sign", "signature", "draw" - ] + ], + "moji": "✍🏿" }, "x": { "unicode": "274C", "unicode_alternates": [], "name": "cross mark", "shortname": ":x:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "delete", "no", - "remove" + "remove", + "symbol", + "sol" ], "moji": "❌" }, @@ -29676,7 +33314,7 @@ "unicode_alternates": [], "name": "yellow heart", "shortname": ":yellow_heart:", - "category": "emoticons", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29687,7 +33325,6 @@ "yellow", "gold", "heart", - "love", "friendship", "happy", "happiness", @@ -29696,7 +33333,8 @@ "respectful", "honest", "caring", - "selfless" + "selfless", + "symbol" ], "moji": "💛" }, @@ -29715,10 +33353,7 @@ "money", "yen", "japan", - "japanese", "banknote", - "money", - "currency", "paper", "cash", "bill" @@ -29727,7 +33362,7 @@ }, "yin_yang": { "unicode": "262F", - "unicode_alternates": "", + "unicode_alternates": [], "name": "yin yang", "shortname": ":yin_yang:", "category": "symbols", @@ -29739,14 +33374,15 @@ "symbol", "tao", "taoist" - ] + ], + "moji": "☯" }, "yum": { "unicode": "1F60B", "unicode_alternates": [], "name": "face savouring delicious food", "shortname": ":yum:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ @@ -29762,7 +33398,12 @@ "yummy", "yum", "tasty", - "savory" + "savory", + "silly", + "smiley", + "emotion", + "sarcastic", + "good" ], "moji": "😋" }, @@ -29779,7 +33420,9 @@ "keywords": [ "lightning bolt", "thunder", - "weather" + "weather", + "sky", + "diarrhea" ], "moji": "⚡" }, @@ -29789,20 +33432,23 @@ "unicode_alternates": [ "0030-FE0F-20E3" ], - "name": "digit zero", + "name": "keycap digit zero", "shortname": ":zero:", - "category": "other", + "category": "symbols", "aliases": [], "aliases_ascii": [], "keywords": [ "blue-square", "null", - "numbers" + "numbers", + "number", + "math", + "symbol" ] }, "zipper_mouth": { "unicode": "1F910", - "unicode_alternates": "", + "unicode_alternates": [], "name": "zipper-mouth face", "shortname": ":zipper_mouth:", "category": "people", @@ -29810,19 +33456,24 @@ ":zipper_mouth_face:" ], "aliases_ascii": [], - "keywords": [] + "keywords": [ + "mad", + "smiley" + ], + "moji": "🤐" }, "zzz": { "unicode": "1F4A4", "unicode_alternates": [], "name": "sleeping symbol", "shortname": ":zzz:", - "category": "emoticons", + "category": "people", "aliases": [], "aliases_ascii": [], "keywords": [ "sleepy", - "tired" + "tired", + "goodnight" ], "moji": "💤" } diff --git a/lib/gitlab/award_emoji.rb b/lib/gitlab/award_emoji.rb index c94bfc0e65f..39b43ab5489 100644 --- a/lib/gitlab/award_emoji.rb +++ b/lib/gitlab/award_emoji.rb @@ -1,24 +1,14 @@ module Gitlab class AwardEmoji CATEGORIES = { - other: "Other", objects: "Objects", - places: "Places", - travel_places: "Travel", - emoticons: "Emoticons", - objects_symbols: "Symbols", + travel: "Travel", + symbols: "Symbols", nature: "Nature", - celebration: "Celebration", people: "People", activity: "Activity", flags: "Flags", - food_drink: "Food" - }.with_indifferent_access - - CATEGORY_ALIASES = { - symbols: "objects_symbols", - foods: "food_drink", - travel: "travel_places" + food: "Food" }.with_indifferent_access def self.normalize_emoji_name(name) @@ -35,7 +25,7 @@ module Gitlab # Skip Fitzpatrick(tone) modifiers next if data["category"] == "modifier" - category = CATEGORY_ALIASES[data["category"]] || data["category"] + category = data["category"] @emoji_by_category[category] << data end @@ -57,9 +47,9 @@ module Gitlab def self.aliases @aliases ||= begin - json_path = File.join(Rails.root, 'fixtures', 'emojis', 'aliases.json' ) - JSON.parse(File.read(json_path)) - end + json_path = File.join(Rails.root, 'fixtures', 'emojis', 'aliases.json') + JSON.parse(File.read(json_path)) + end end # Returns an Array of Emoji names and their asset URLs. diff --git a/lib/tasks/gemojione.rake b/lib/tasks/gemojione.rake index e930ace1041..993112aee3b 100644 --- a/lib/tasks/gemojione.rake +++ b/lib/tasks/gemojione.rake @@ -4,7 +4,7 @@ namespace :gemojione do require 'digest/sha2' require 'json' - dir = Gemojione.index.images_path + dir = Gemojione.images_path digests = [] aliases = Hash.new { |hash, key| hash[key] = [] } aliases_path = File.join(Rails.root, 'fixtures', 'emojis', 'aliases.json') @@ -50,9 +50,14 @@ namespace :gemojione do SIZE = 20 RETINA = SIZE * 2 + # Update these values to the width and height of the spritesheet when + # new emoji are added. + SPRITESHEET_WIDTH = 860 + SPRITESHEET_HEIGHT = 840 + Dir.mktmpdir do |tmpdir| # Copy the Gemojione assets to the temporary folder for resizing - FileUtils.cp_r(Gemojione.index.images_path, tmpdir) + FileUtils.cp_r(Gemojione.images_path, tmpdir) Dir.chdir(tmpdir) do Dir["**/*.png"].each do |png| @@ -64,7 +69,7 @@ namespace :gemojione do # Combine the resized assets into a packed sprite and re-generate the SCSS SpriteFactory.cssurl = "image-url('$IMAGE')" - SpriteFactory.run!(File.join(tmpdir, 'images'), { + SpriteFactory.run!(File.join(tmpdir, 'png'), { output_style: style_path, output_image: "app/assets/images/emoji.png", selector: '.emoji-', @@ -97,7 +102,7 @@ namespace :gemojione do only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { background-image: image-url('emoji@2x.png'); - background-size: 840px 820px; + background-size: #{SPRITESHEET_WIDTH}px #{SPRITESHEET_HEIGHT}px; } } CSS @@ -107,7 +112,7 @@ namespace :gemojione do # Now do it again but for Retina Dir.mktmpdir do |tmpdir| # Copy the Gemojione assets to the temporary folder for resizing - FileUtils.cp_r(Gemojione.index.images_path, tmpdir) + FileUtils.cp_r(Gemojione.images_path, tmpdir) Dir.chdir(tmpdir) do Dir["**/*.png"].each do |png| @@ -116,7 +121,7 @@ namespace :gemojione do end # Combine the resized assets into a packed sprite and re-generate the SCSS - SpriteFactory.run!(File.join(tmpdir, 'images'), { + SpriteFactory.run!(File.join(tmpdir), { output_image: "app/assets/images/emoji@2x.png", style: false, nocomments: true, -- cgit v1.2.1 From f12faae8b841189fb3f8693fc4880fdb9688b5d2 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 18:42:03 +0200 Subject: Improve code design --- app/controllers/projects/builds_controller.rb | 8 ++------ db/fixtures/development/14_builds.rb | 2 +- doc/ci/yaml/README.md | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index d64d1e52e2c..553b62741a5 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -49,18 +49,14 @@ class Projects::BuildsController < Projects::ApplicationController end def retry - unless @build.retryable? - return render_404 - end + return render_404 unless @build.retryable? build = Ci::Build.retry(@build, current_user) redirect_to build_path(build) end def play - unless @build.playable? - return render_404 - end + return render_404 unless @build.playable? build = @build.play(current_user) redirect_to build_path(build) diff --git a/db/fixtures/development/14_builds.rb b/db/fixtures/development/14_builds.rb index 44f8a61d608..124704cb451 100644 --- a/db/fixtures/development/14_builds.rb +++ b/db/fixtures/development/14_builds.rb @@ -1,5 +1,5 @@ class Gitlab::Seeder::Builds - STAGES = %w(build notify_build test notify_test deploy notify_deploy) + STAGES = %w[build notify_build test notify_test deploy notify_deploy] def initialize(project) @project = project diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index b421bbdec3f..143d2f175ef 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -530,7 +530,7 @@ The above script will: 1. Execute `cleanup_build_job` only when `build_job` fails 2. Always execute `cleanup_job` as the last step in pipeline -3. Allow you to manually execute `deploy_job` form GitLab +3. Allow you to manually execute `deploy_job` from GitLab #### Manual actions -- cgit v1.2.1 From d92054dd660fba766282ad382ca6f541b5e1bad6 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 18:42:57 +0200 Subject: Use `humanize` --- app/views/projects/ci/pipelines/_pipeline.html.haml | 2 +- app/views/projects/deployments/_actions.haml | 2 +- spec/features/environments_spec.rb | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 797e52d1122..f26d93e265b 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -70,7 +70,7 @@ %li = link_to play_namespace_project_build_path(@project.namespace, @project, build), method: :post, rel: 'nofollow' do = icon("play") - %span= build.name.capitalize + %span= build.name.humanize - if artifacts.present? .btn-group %a.dropdown-toggle.btn.btn-default.build-artifacts{type: 'button', 'data-toggle' => 'dropdown'} diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index 8dd9e70ac67..213d74972f1 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -12,7 +12,7 @@ %li = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do = icon("play") - %span= action.name.capitalize + %span= action.name.humanize - if defined?(allow_rollback) && allow_rollback = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb index d62b3772fdb..9c018be14b7 100644 --- a/spec/features/environments_spec.rb +++ b/spec/features/environments_spec.rb @@ -52,12 +52,12 @@ feature 'Environments', feature: true do given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } scenario 'does show a play button' do - expect(page).to have_link(manual.name.capitalize) + expect(page).to have_link(manual.name.humanize) end scenario 'does allow to play manual action' do expect(manual).to be_skipped - expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0) + expect{ click_link(manual.name.humanize) }.not_to change { Ci::Pipeline.count } expect(page).to have_content(manual.name) expect(manual.reload).to be_pending end @@ -113,12 +113,12 @@ feature 'Environments', feature: true do given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production') } scenario 'does show a play button' do - expect(page).to have_link(manual.name.capitalize) + expect(page).to have_link(manual.name.humanize) end scenario 'does allow to play manual action' do expect(manual).to be_skipped - expect{ click_link(manual.name.capitalize) }.to change{ Ci::Pipeline.count }.by(0) + expect{ click_link(manual.name.humanize) }.not_to change { Ci::Pipeline.count } expect(page).to have_content(manual.name) expect(manual.reload).to be_pending end -- cgit v1.2.1 From 7dbb1952fdca3c1a2e14ee0fc139d78ef98db708 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 19:00:55 +0200 Subject: Use local_assigns --- app/views/projects/deployments/_actions.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index 213d74972f1..65d68aa2985 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -14,7 +14,7 @@ = icon("play") %span= action.name.humanize - - if defined?(allow_rollback) && allow_rollback + - if local_assigns.fetch(:allow_rollback, false) = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do - if deployment.last? Retry -- cgit v1.2.1 From cc0d15a8869e25eb02b5e829e24ae3933419760f Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Fri, 17 Jun 2016 15:03:30 -0600 Subject: Initial secure_headers config after some testing. --- Gemfile | 3 +++ Gemfile.lock | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Gemfile b/Gemfile index 81e8ff60ad5..fbd899ccf09 100644 --- a/Gemfile +++ b/Gemfile @@ -349,3 +349,6 @@ gem 'health_check', '~> 2.1.0' # System information gem 'vmstat', '~> 2.1.0' gem 'sys-filesystem', '~> 1.1.6' + +# Secure headers for Content Security Policy +gem 'secure_headers', '~> 3.3' diff --git a/Gemfile.lock b/Gemfile.lock index 0987fd5665a..ace9f103b58 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -645,6 +645,8 @@ GEM sdoc (0.3.20) json (>= 1.1.3) rdoc (~> 3.10) + secure_headers (3.3.2) + useragent seed-fu (2.3.6) activerecord (>= 3.1) activesupport (>= 3.1) @@ -767,6 +769,7 @@ GEM get_process_mem (~> 0) unicorn (>= 4, < 6) uniform_notifier (1.9.0) + useragent (0.16.7) uuid (2.3.8) macaddr (~> 1.0) version_sorter (2.0.0) @@ -944,6 +947,7 @@ DEPENDENCIES sass-rails (~> 5.0.0) scss_lint (~> 0.47.0) sdoc (~> 0.3.20) + secure_headers (~> 3.3) seed-fu (~> 2.3.5) select2-rails (~> 3.5.9) sentry-raven (~> 1.1.0) -- cgit v1.2.1 From e8e608765e875814b89847d59b4699175746596a Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Fri, 17 Jun 2016 15:26:21 -0600 Subject: Fix that which hath been broken. Except the sidekiq admin iframe. --- .../admin/background_jobs_controller.rb | 4 +++ config/initializers/secure_headers.rb | 38 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 config/initializers/secure_headers.rb diff --git a/app/controllers/admin/background_jobs_controller.rb b/app/controllers/admin/background_jobs_controller.rb index 338496013a0..7ccbe7c4232 100644 --- a/app/controllers/admin/background_jobs_controller.rb +++ b/app/controllers/admin/background_jobs_controller.rb @@ -2,5 +2,9 @@ class Admin::BackgroundJobsController < Admin::ApplicationController def show ps_output, _ = Gitlab::Popen.popen(%W(ps -U #{Gitlab.config.gitlab.user} -o pid,pcpu,pmem,stat,start,command)) @sidekiq_processes = ps_output.split("\n").grep(/sidekiq/) + + override_x_frame_options("SAMEORIGIN") + + override_content_security_policy_directives(frame_ancestors: %w('self')) end end diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb new file mode 100644 index 00000000000..7ac4c7ace8e --- /dev/null +++ b/config/initializers/secure_headers.rb @@ -0,0 +1,38 @@ +SecureHeaders::Configuration.default do |config| + config.cookies = { + secure: true, # mark all cookies as "Secure" + httponly: true, # mark all cookies as "HttpOnly" + samesite: { + strict: true # mark all cookies as SameSite=Strict + } + } + config.x_frame_options = "DENY" + config.x_content_type_options = "nosniff" + config.x_xss_protection = "1; mode=block" + config.x_download_options = "noopen" + config.x_permitted_cross_domain_policies = "none" + config.referrer_policy = "origin-when-cross-origin" + config.csp = { + # "meta" values. these will shaped the header, but the values are not included in the header. + report_only: true, # default: false + preserve_schemes: true, # default: false. Schemes are removed from host sources to save bytes and discourage mixed content. + + # directive values: these values will directly translate into source directives + default_src: %w('none'), + frame_src: %w('self'), + connect_src: %w('self'), + font_src: %w('self'), + img_src: %w('self' www.gravatar.com secure.gravatar.com), + media_src: %w('none'), + object_src: %w('none'), + script_src: %w('unsafe-inline' 'unsafe-eval' 'self' maxcdn.bootstrapcdn.com), + style_src: %w('unsafe-inline' 'self'), + base_uri: %w('self'), + child_src: %w('self'), + form_action: %w('self'), + frame_ancestors: %w('none'), + block_all_mixed_content: true, # see http://www.w3.org/TR/mixed-content/ + upgrade_insecure_requests: true, # see https://www.w3.org/TR/upgrade-insecure-requests/ + report_uri: %w('') + } +end -- cgit v1.2.1 From 4984d1a6484017ea33778c8f743e47b9162aee21 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Fri, 17 Jun 2016 15:47:26 -0600 Subject: Remove unsafe eval directive from scripts. --- config/initializers/secure_headers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 7ac4c7ace8e..075a5fc1876 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -25,7 +25,7 @@ SecureHeaders::Configuration.default do |config| img_src: %w('self' www.gravatar.com secure.gravatar.com), media_src: %w('none'), object_src: %w('none'), - script_src: %w('unsafe-inline' 'unsafe-eval' 'self' maxcdn.bootstrapcdn.com), + script_src: %w('unsafe-inline' 'self' maxcdn.bootstrapcdn.com), style_src: %w('unsafe-inline' 'self'), base_uri: %w('self'), child_src: %w('self'), -- cgit v1.2.1 From e5d6f33378c302bc65b5637dfeff9d5a852647d5 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 20 Jun 2016 15:53:17 -0600 Subject: Update image policy to allow external images over HTTPS. --- config/initializers/secure_headers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 075a5fc1876..3788dbf9473 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -22,7 +22,7 @@ SecureHeaders::Configuration.default do |config| frame_src: %w('self'), connect_src: %w('self'), font_src: %w('self'), - img_src: %w('self' www.gravatar.com secure.gravatar.com), + img_src: %w('self' www.gravatar.com secure.gravatar.com https:), media_src: %w('none'), object_src: %w('none'), script_src: %w('unsafe-inline' 'self' maxcdn.bootstrapcdn.com), -- cgit v1.2.1 From e0ffbf0edb7bdda290225259945e0fb6e7b270bb Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 5 Jul 2016 14:20:50 -0600 Subject: Add the CSP reporting URI of Sentry. --- config/initializers/secure_headers.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 3788dbf9473..66aca5fb46b 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -1,3 +1,10 @@ +require 'gitlab/current_settings' +include Gitlab::CurrentSettings + +uri = URI.parse(current_application_settings.sentry_dsn) + +CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}" + SecureHeaders::Configuration.default do |config| config.cookies = { secure: true, # mark all cookies as "Secure" @@ -33,6 +40,6 @@ SecureHeaders::Configuration.default do |config| frame_ancestors: %w('none'), block_all_mixed_content: true, # see http://www.w3.org/TR/mixed-content/ upgrade_insecure_requests: true, # see https://www.w3.org/TR/upgrade-insecure-requests/ - report_uri: %w('') + report_uri: %W(#{CSP_REPORT_URI}) } end -- cgit v1.2.1 From 2e9bf6a750e92a729266ac6ed2f8e32385aa4ec4 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 5 Jul 2016 15:06:43 -0600 Subject: Add Sidekiq-specific headers. --- app/controllers/admin/background_jobs_controller.rb | 6 ++---- config/initializers/secure_headers.rb | 12 ++++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/controllers/admin/background_jobs_controller.rb b/app/controllers/admin/background_jobs_controller.rb index 7ccbe7c4232..133c6bc012b 100644 --- a/app/controllers/admin/background_jobs_controller.rb +++ b/app/controllers/admin/background_jobs_controller.rb @@ -1,10 +1,8 @@ class Admin::BackgroundJobsController < Admin::ApplicationController def show + use_secure_headers_override(:background_jobs) + ps_output, _ = Gitlab::Popen.popen(%W(ps -U #{Gitlab.config.gitlab.user} -o pid,pcpu,pmem,stat,start,command)) @sidekiq_processes = ps_output.split("\n").grep(/sidekiq/) - - override_x_frame_options("SAMEORIGIN") - - override_content_security_policy_directives(frame_ancestors: %w('self')) end end diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 66aca5fb46b..e69117e0521 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -2,7 +2,6 @@ require 'gitlab/current_settings' include Gitlab::CurrentSettings uri = URI.parse(current_application_settings.sentry_dsn) - CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}" SecureHeaders::Configuration.default do |config| @@ -32,7 +31,7 @@ SecureHeaders::Configuration.default do |config| img_src: %w('self' www.gravatar.com secure.gravatar.com https:), media_src: %w('none'), object_src: %w('none'), - script_src: %w('unsafe-inline' 'self' maxcdn.bootstrapcdn.com), + script_src: %w('unsafe-inline' 'self'), style_src: %w('unsafe-inline' 'self'), base_uri: %w('self'), child_src: %w('self'), @@ -42,4 +41,13 @@ SecureHeaders::Configuration.default do |config| upgrade_insecure_requests: true, # see https://www.w3.org/TR/upgrade-insecure-requests/ report_uri: %W(#{CSP_REPORT_URI}) } + + if Rails.env.development? + config.csp[:script_src] << "maxcdn.bootstrapcdn.com" + end +end + +SecureHeaders::Configuration.override(:background_jobs) do |config| + config.csp[:frame_ancestors] = %w('self') + config.x_frame_options = 'SAMEORIGIN' end -- cgit v1.2.1 From 3ee8eb113d019df8e5312af42fb2f369577c324c Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 5 Jul 2016 15:15:29 -0600 Subject: Only report to Sentry when it's enabled. --- config/initializers/secure_headers.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index e69117e0521..6cc7484d748 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -1,8 +1,12 @@ require 'gitlab/current_settings' include Gitlab::CurrentSettings -uri = URI.parse(current_application_settings.sentry_dsn) -CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}" +if Rails.env.production? && current_application_settings.sentry_enabled + uri = URI.parse(current_application_settings.sentry_dsn) + CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}" +else + CSP_REPORT_URI = '' +end SecureHeaders::Configuration.default do |config| config.cookies = { -- cgit v1.2.1 From fa56c34b478c39639abfc51fbde6f55b5641ab1e Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 5 Jul 2016 15:24:10 -0600 Subject: Remove background_jobs-specific headers. --- app/controllers/admin/background_jobs_controller.rb | 2 -- config/initializers/secure_headers.rb | 5 ----- 2 files changed, 7 deletions(-) diff --git a/app/controllers/admin/background_jobs_controller.rb b/app/controllers/admin/background_jobs_controller.rb index 133c6bc012b..338496013a0 100644 --- a/app/controllers/admin/background_jobs_controller.rb +++ b/app/controllers/admin/background_jobs_controller.rb @@ -1,7 +1,5 @@ class Admin::BackgroundJobsController < Admin::ApplicationController def show - use_secure_headers_override(:background_jobs) - ps_output, _ = Gitlab::Popen.popen(%W(ps -U #{Gitlab.config.gitlab.user} -o pid,pcpu,pmem,stat,start,command)) @sidekiq_processes = ps_output.split("\n").grep(/sidekiq/) end diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 6cc7484d748..a704dd2ee7e 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -50,8 +50,3 @@ SecureHeaders::Configuration.default do |config| config.csp[:script_src] << "maxcdn.bootstrapcdn.com" end end - -SecureHeaders::Configuration.override(:background_jobs) do |config| - config.csp[:frame_ancestors] = %w('self') - config.x_frame_options = 'SAMEORIGIN' -end -- cgit v1.2.1 From b2752c46f4884681b09f6562920d177918e66278 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 5 Jul 2016 17:52:44 -0600 Subject: Only enable CSP policies when relevant features are enabled. Gravatar, Google Analytics, Piwik, Recaptcha, etc. --- config/initializers/secure_headers.rb | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index a704dd2ee7e..44425b74d43 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -32,7 +32,7 @@ SecureHeaders::Configuration.default do |config| frame_src: %w('self'), connect_src: %w('self'), font_src: %w('self'), - img_src: %w('self' www.gravatar.com secure.gravatar.com https:), + img_src: %w('self' https:), media_src: %w('none'), object_src: %w('none'), script_src: %w('unsafe-inline' 'self'), @@ -46,7 +46,33 @@ SecureHeaders::Configuration.default do |config| report_uri: %W(#{CSP_REPORT_URI}) } + # Allow Bootstrap Linter in development mode. if Rails.env.development? config.csp[:script_src] << "maxcdn.bootstrapcdn.com" end + + # Recaptcha + if current_application_settings.recaptcha_enabled + config.csp[:script_src] << "https://www.google.com/recaptcha/" + config.csp[:script_src] << "https://www.gstatic.com/recaptcha/" + config.csp[:frame_src] << "https://www.google.com/recaptcha/" + end + + # Gravatar + if current_application_settings.gravatar_enabled? + config.csp[:img_src] << "www.gravatar.com" + config.csp[:img_src] << "secure.gravatar.com" + config.csp[:img_src] << Gitlab.config.gravatar.host + end + + # Piwik + if Gitlab.config.extra.has_key?('piwik_url') && Gitlab.config.extra.has_key?('piwik_site_id') + config.csp[:script_src] << Gitlab.config.extra.piwik_url + config.csp[:img_src] << Gitlab.config.extra.piwik_url + end + + # Google Analytics + if Gitlab.config.extra.has_key?('google_analytics_id') + config.csp[:script_src] << "https://www.google-analytics.com" + end end -- cgit v1.2.1 From 460fc6c4f38120a4aa58f243bd3f0c8244902837 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 6 Jul 2016 16:00:55 -0600 Subject: Document the CSP file. --- config/initializers/secure_headers.rb | 49 +++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 44425b74d43..7a2f0eab3c0 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -1,6 +1,8 @@ require 'gitlab/current_settings' include Gitlab::CurrentSettings +# If Sentry is enabled and the Rails app is running in production mode, +# this will construct the Report URI for Sentry. if Rails.env.production? && current_application_settings.sentry_enabled uri = URI.parse(current_application_settings.sentry_dsn) CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}" @@ -8,14 +10,20 @@ else CSP_REPORT_URI = '' end +# Content Security Policy Headers +# For more information on CSP see: +# - https://gitlab.com/gitlab-org/gitlab-ce/issues/18231 +# - https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives SecureHeaders::Configuration.default do |config| + # Mark all cookies as "Secure", "HttpOnly", and "SameSite=Strict". config.cookies = { - secure: true, # mark all cookies as "Secure" - httponly: true, # mark all cookies as "HttpOnly" + secure: true, + httponly: true, samesite: { - strict: true # mark all cookies as SameSite=Strict + strict: true } } + # Disallow iframes. config.x_frame_options = "DENY" config.x_content_type_options = "nosniff" config.x_xss_protection = "1; mode=block" @@ -23,26 +31,44 @@ SecureHeaders::Configuration.default do |config| config.x_permitted_cross_domain_policies = "none" config.referrer_policy = "origin-when-cross-origin" config.csp = { - # "meta" values. these will shaped the header, but the values are not included in the header. - report_only: true, # default: false - preserve_schemes: true, # default: false. Schemes are removed from host sources to save bytes and discourage mixed content. + # "Meta" values. + report_only: true, + preserve_schemes: true, - # directive values: these values will directly translate into source directives + # "Directive" values. + # Default source allows nothing, more permissive values are set per-policy. default_src: %w('none'), - frame_src: %w('self'), + # (Deprecated) Don't allow iframes. + frame_src: %w('none'), + # Only allow XMLHTTPRequests from the GitLab instance itself. connect_src: %w('self'), + # Only load local fonts. font_src: %w('self'), + # Load local images, any external image available over HTTPS. img_src: %w('self' https:), + # Audio and video can't be played on GitLab currently, so it's disabled. media_src: %w('none'), + # Don't allow , , or elements. object_src: %w('none'), + # Allow local scripts and inline scripts. script_src: %w('unsafe-inline' 'self'), + # Allow local stylesheets and inline styles. style_src: %w('unsafe-inline' 'self'), + # The URIs that a user agent may use as the document base URL. base_uri: %w('self'), + # Only allow local iframes and service workers child_src: %w('self'), + # Only submit form information to the GitLab instance. form_action: %w('self'), + # Disallow any parents from embedding a page in an iframe. frame_ancestors: %w('none'), - block_all_mixed_content: true, # see http://www.w3.org/TR/mixed-content/ - upgrade_insecure_requests: true, # see https://www.w3.org/TR/upgrade-insecure-requests/ + # Don't allow any plugins (Flash, Shockwave, etc.) + plugin_types: %w('none'), + # Blocks all mixed (HTTP) content. + block_all_mixed_content: true, + # Upgrades insecure requests to HTTPS when possible. + upgrade_insecure_requests: true, + # Reports are sent to Sentry if it's enabled, nowhere otherwise. report_uri: %W(#{CSP_REPORT_URI}) } @@ -51,11 +77,12 @@ SecureHeaders::Configuration.default do |config| config.csp[:script_src] << "maxcdn.bootstrapcdn.com" end - # Recaptcha + # reCAPTCHA if current_application_settings.recaptcha_enabled config.csp[:script_src] << "https://www.google.com/recaptcha/" config.csp[:script_src] << "https://www.gstatic.com/recaptcha/" config.csp[:frame_src] << "https://www.google.com/recaptcha/" + config.x_frame_options = "SAMEORIGIN" end # Gravatar -- cgit v1.2.1 From b472027bc2df8e4784cd5f7d8d2b1b6630aceb73 Mon Sep 17 00:00:00 2001 From: tauriedavis Date: Mon, 18 Jul 2016 11:50:04 -0700 Subject: Change color of today issue highlight --- app/assets/stylesheets/pages/issues.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index 0e4d8c140aa..9807c5a808d 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -63,7 +63,7 @@ form.edit-issue { .merge-request, .issue { &.today { - background: #f8feef; + background: #f3fff2; border-color: #e1e8d5; } -- cgit v1.2.1 From 967b75ba92937deefc6da1d139825ac52cdbcc68 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Mon, 18 Jul 2016 14:48:26 -0500 Subject: Remove white background on clipboard button; position icon --- app/assets/stylesheets/framework/sidebar.scss | 4 ++++ app/assets/stylesheets/pages/issuable.scss | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss index d52e8f00172..3fa4a22258d 100644 --- a/app/assets/stylesheets/framework/sidebar.scss +++ b/app/assets/stylesheets/framework/sidebar.scss @@ -198,6 +198,10 @@ header.header-pinned-nav { .sidebar-collapsed-icon { cursor: pointer; + + .btn { + background-color: $gray-light; + } } } diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 542fa244689..ded437625ee 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -122,7 +122,8 @@ button { float: right; - padding: 3px 5px; + padding: 1px 5px; + background-color: $gray-light; } } -- cgit v1.2.1 From b81171a8500f2585fceb17da7914300a2c5e0cef Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Mon, 18 Jul 2016 15:08:58 -0500 Subject: Fix styling of tag page --- app/assets/stylesheets/pages/tags.scss | 7 ++++ app/views/projects/tags/show.html.haml | 67 ++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 32 deletions(-) create mode 100644 app/assets/stylesheets/pages/tags.scss diff --git a/app/assets/stylesheets/pages/tags.scss b/app/assets/stylesheets/pages/tags.scss new file mode 100644 index 00000000000..24ebd3e7cfa --- /dev/null +++ b/app/assets/stylesheets/pages/tags.scss @@ -0,0 +1,7 @@ +.tag-buttons { + line-height: 40px; + + .btn:not(.dropdown-toggle) { + margin-left: 10px; + } +} diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index b7d7d5c5382..395d7af6cbb 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -1,36 +1,39 @@ +- @no_container = true - page_title @tag.name, "Tags" = render "projects/commits/head" -.row-content-block - .pull-right - - if can?(current_user, :push_code, @project) - = link_to edit_namespace_project_tag_release_path(@project.namespace, @project, @tag.name), class: 'btn-grouped btn has-tooltip', title: 'Edit release notes' do - = icon("pencil") - = link_to namespace_project_tree_path(@project.namespace, @project, @tag.name), class: 'btn btn-grouped has-tooltip', title: 'Browse files' do - = icon('files-o') - = link_to namespace_project_commits_path(@project.namespace, @project, @tag.name), class: 'btn btn-grouped has-tooltip', title: 'Browse commits' do - = icon('history') - - if can? current_user, :download_code, @project - = render 'projects/tags/download', ref: @tag.name, project: @project - - if can?(current_user, :admin_project, @project) - .pull-right - = link_to namespace_project_tag_path(@project.namespace, @project, @tag.name), class: 'btn btn-remove remove-row grouped has-tooltip', title: "Delete tag", method: :delete, data: { confirm: "Deleting the '#{@tag.name}' tag cannot be undone. Are you sure?" } do - %i.fa.fa-trash-o - .title - %span.item-title= @tag.name - - if @commit - = render 'projects/branches/commit', commit: @commit, project: @project - - else - Cant find HEAD commit for this tag - - if @tag.message.present? - %pre.body - = strip_gpg_signature(@tag.message) +%div{ class: container_class } + .sub-header-block + .pull-right.tag-buttons + - if can?(current_user, :push_code, @project) + = link_to edit_namespace_project_tag_release_path(@project.namespace, @project, @tag.name), class: 'btn has-tooltip', title: 'Edit release notes' do + = icon("pencil") + = link_to namespace_project_tree_path(@project.namespace, @project, @tag.name), class: 'btn has-tooltip', title: 'Browse files' do + = icon('files-o') + = link_to namespace_project_commits_path(@project.namespace, @project, @tag.name), class: 'btn has-tooltip', title: 'Browse commits' do + = icon('history') + - if can? current_user, :download_code, @project + = render 'projects/tags/download', ref: @tag.name, project: @project + - if can?(current_user, :admin_project, @project) + .pull-right + = link_to namespace_project_tag_path(@project.namespace, @project, @tag.name), class: 'btn btn-remove remove-row grouped has-tooltip', title: "Delete tag", method: :delete, data: { confirm: "Deleting the '#{@tag.name}' tag cannot be undone. Are you sure?" } do + %i.fa.fa-trash-o + .tag-info.append-bottom-10 + .title + %span.item-title= @tag.name + - if @commit + = render 'projects/branches/commit', commit: @commit, project: @project + - else + Cant find HEAD commit for this tag + - if @tag.message.present? + %pre.body + = strip_gpg_signature(@tag.message) -.append-bottom-default.prepend-top-default - - if @release.description.present? - .description - .wiki - = preserve do - = markdown @release.description - - else - This tag has no release notes. + .append-bottom-default.prepend-top-default + - if @release.description.present? + .description + .wiki + = preserve do + = markdown @release.description + - else + This tag has no release notes. -- cgit v1.2.1 From a404ab380db5959ab22b09bc586607b1f6c507cd Mon Sep 17 00:00:00 2001 From: Paco Guzman Date: Fri, 15 Jul 2016 09:04:18 +0200 Subject: Collapsed diffs lines/size don't accumulate to overflow diffs. --- CHANGELOG | 1 + Gemfile | 2 +- Gemfile.lock | 4 +-- app/controllers/concerns/diff_for_path.rb | 1 - app/helpers/diff_helper.rb | 9 +++--- app/views/projects/diffs/_content.html.haml | 10 +++---- app/views/projects/diffs/_diffs.html.haml | 2 +- lib/gitlab/diff/file.rb | 6 +--- spec/features/expand_collapse_diffs_spec.rb | 43 ++++++++++++++++++++++++++++- spec/helpers/diff_helper_spec.rb | 23 +++++++++++++-- spec/lib/gitlab/diff/file_spec.rb | 14 ++++++++++ spec/support/test_env.rb | 4 ++- 12 files changed, 96 insertions(+), 23 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 57ee5361281..80cd8b61e8a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -92,6 +92,7 @@ v 8.10.0 (unreleased) - Add min value for project limit field on user's form !3622 (jastkand) - Reset project pushes_since_gc when we enqueue the git gc call - Add reminder to not paste private SSH keys !4399 (Ingo Blechschmidt) + - Collapsed diffs lines/size don't acumulate to overflow diffs. - Remove duplicate `description` field in `MergeRequest` entities (Ben Boeckel) - Style of import project buttons were fixed in the new project page. !5183 (rdemirbay) - Fix GitHub client requests when rate limit is disabled diff --git a/Gemfile b/Gemfile index 81e8ff60ad5..6ae9086a541 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem 'gitlab_git', '~> 10.2' +gem 'gitlab_git', '~> 10.3.2' # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 0987fd5665a..9ec5fe12820 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -274,7 +274,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.2.3) + gitlab_git (10.3.2) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) @@ -861,7 +861,7 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.4) gitlab-flowdock-git-hook (~> 1.0.1) - gitlab_git (~> 10.2) + gitlab_git (~> 10.3.2) gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.2) diff --git a/app/controllers/concerns/diff_for_path.rb b/app/controllers/concerns/diff_for_path.rb index e09b8789eb2..026d8b2e1e0 100644 --- a/app/controllers/concerns/diff_for_path.rb +++ b/app/controllers/concerns/diff_for_path.rb @@ -10,7 +10,6 @@ module DiffForPath diff_commit = commit_for_diff(diff_file) blob = diff_file.blob(diff_commit) - @expand_all_diffs = true locals = { diff_file: diff_file, diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index adab901700c..75b029365f9 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -9,7 +9,7 @@ module DiffHelper end def expand_all_diffs? - @expand_all_diffs || params[:expand_all_diffs].present? + params[:expand_all_diffs].present? end def diff_view @@ -23,13 +23,14 @@ module DiffHelper end def diff_options - default_options = Commit.max_diff_options + options = { ignore_whitespace_change: hide_whitespace?, no_collapse: expand_all_diffs? } if action_name == 'diff_for_path' - default_options[:paths] = params.values_at(:old_path, :new_path) + options[:no_collapse] = true + options[:paths] = params.values_at(:old_path, :new_path) end - default_options.merge(ignore_whitespace_change: hide_whitespace?) + Commit.max_diff_options.merge(options) end def safe_diff_files(diffs, diff_refs: nil, repository: nil) diff --git a/app/views/projects/diffs/_content.html.haml b/app/views/projects/diffs/_content.html.haml index 0c0424edffd..a1b071f130c 100644 --- a/app/views/projects/diffs/_content.html.haml +++ b/app/views/projects/diffs/_content.html.haml @@ -8,12 +8,12 @@ - elsif blob_text_viewable?(blob) - if !project.repository.diffable?(blob) .nothing-here-block This diff was suppressed by a .gitattributes entry. + - elsif diff_file.collapsed? + - url = url_for(params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path)) + .nothing-here-block.diff-collapsed{data: { diff_for_path: url } } + This diff is collapsed. Click to expand it. - elsif diff_file.diff_lines.length > 0 - - if diff_file.collapsed_by_default? && !expand_all_diffs? - - url = url_for(params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path)) - .nothing-here-block.diff-collapsed{data: { diff_for_path: url } } - This diff is collapsed. Click to expand it. - - elsif diff_view == 'parallel' + - if diff_view == 'parallel' = render "projects/diffs/parallel_view", diff_file: diff_file, project: project, blob: blob - else = render "projects/diffs/text_file", diff_file: diff_file diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 20aaab5accf..8ae433b4823 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -6,7 +6,7 @@ .content-block.oneline-block.files-changed .inline-parallel-buttons - - unless expand_all_diffs? + - if !expand_all_diffs? && diff_files.any? { |diff_file| diff_file.collapsed? } = link_to 'Expand all', url_for(params.merge(expand_all_diffs: 1, format: 'html')), class: 'btn btn-default' - if show_whitespace_toggle - if current_controller?(:commit) diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb index 7e01f7b61fb..b09ca1fb8b0 100644 --- a/lib/gitlab/diff/file.rb +++ b/lib/gitlab/diff/file.rb @@ -5,7 +5,7 @@ module Gitlab delegate :new_file, :deleted_file, :renamed_file, :old_path, :new_path, :a_mode, :b_mode, - :submodule?, :too_large?, to: :diff, prefix: false + :submodule?, :too_large?, :collapsed?, to: :diff, prefix: false def initialize(diff, repository:, diff_refs: nil) @diff = diff @@ -68,10 +68,6 @@ module Gitlab @lines ||= Gitlab::Diff::Parser.new.parse(raw_diff.each_line).to_a end - def collapsed_by_default? - diff.diff.bytesize > 10240 # 10 KB - end - def highlighted_diff_lines @highlighted_diff_lines ||= Gitlab::Diff::Highlight.new(self, repository: self.repository).highlight end diff --git a/spec/features/expand_collapse_diffs_spec.rb b/spec/features/expand_collapse_diffs_spec.rb index 78bc888f2a6..688f68d3cff 100644 --- a/spec/features/expand_collapse_diffs_spec.rb +++ b/spec/features/expand_collapse_diffs_spec.rb @@ -3,10 +3,11 @@ require 'spec_helper' feature 'Expand and collapse diffs', js: true, feature: true do include WaitForAjax + let(:branch) { 'expand-collapse-diffs' } + before do login_as :admin project = create(:project) - branch = 'expand-collapse-diffs' # Ensure that undiffable.md is in .gitattributes project.repository.copy_gitattributes(branch) @@ -167,6 +168,46 @@ feature 'Expand and collapse diffs', js: true, feature: true do end end + context 'visiting a commit without collapsed diffs' do + let(:branch) { 'feature' } + + it 'does not show Expand all button' do + expect(page).not_to have_link('Expand all') + end + end + + context 'visiting a commit with more than safe files' do + let(:branch) { 'expand-collapse-files' } + + # safe-files -> 100 | safe-lines -> 5000 | commit-files -> 105 + it 'does collapsing from the safe number of files to the end on small files' do + expect(page).to have_link('Expand all') + + expect(page).to have_selector('.diff-content', count: 105) + expect(page).to have_selector('.diff-collapsed', count: 5) + + %w(file-95.txt file-96.txt file-97.txt file-98.txt file-99.txt).each do |filename| + expect(find("[data-blob-diff-path*='#{filename}']")).to have_selector('.diff-collapsed') + end + end + end + + context 'visiting a commit with more than safe lines' do + let(:branch) { 'expand-collapse-lines' } + + # safe-files -> 100 | safe-lines -> 5000 | commit_files -> 8 (each 1250 lines) + it 'does collapsing from the safe number of lines to the end' do + expect(page).to have_link('Expand all') + + expect(page).to have_selector('.diff-content', count: 6) + expect(page).to have_selector('.diff-collapsed', count: 2) + + %w(file-4.txt file-5.txt).each do |filename| + expect(find("[data-blob-diff-path*='#{filename}']")).to have_selector('.diff-collapsed') + end + end + end + context 'expanding all diffs' do before do click_link('Expand all') diff --git a/spec/helpers/diff_helper_spec.rb b/spec/helpers/diff_helper_spec.rb index 4b134a48410..c2fd2c8a533 100644 --- a/spec/helpers/diff_helper_spec.rb +++ b/spec/helpers/diff_helper_spec.rb @@ -30,12 +30,31 @@ describe DiffHelper do expect(helper.diff_view).to eq 'inline' end end - + describe 'diff_options' do - it 'should return hard limit for a diff' do + it 'should return hard limit for a diff if force diff is true' do allow(controller).to receive(:params) { { force_show_diff: true } } expect(diff_options).to include(Commit.max_diff_options) end + + it 'should return hard limit for a diff if expand_all_diffs is true' do + allow(controller).to receive(:params) { { expand_all_diffs: true } } + expect(diff_options).to include(Commit.max_diff_options) + end + + it 'should return no collapse false' do + expect(diff_options).to include(no_collapse: false) + end + + it 'should return no collapse true if expand_all_diffs' do + allow(controller).to receive(:params) { { expand_all_diffs: true } } + expect(diff_options).to include(no_collapse: true) + end + + it 'should return no collapse true if action name diff_for_path' do + allow(controller).to receive(:action_name) { 'diff_for_path' } + expect(diff_options).to include(no_collapse: true) + end end describe 'unfold_bottom_class' do diff --git a/spec/lib/gitlab/diff/file_spec.rb b/spec/lib/gitlab/diff/file_spec.rb index 0460dcf4658..e883a6eb9c2 100644 --- a/spec/lib/gitlab/diff/file_spec.rb +++ b/spec/lib/gitlab/diff/file_spec.rb @@ -32,4 +32,18 @@ describe Gitlab::Diff::File, lib: true do expect(diff_file.too_large?).to eq(false) end end + + describe '#collapsed?' do + it 'returns true for a file that is quite big' do + expect(diff).to receive(:collapsed?).and_return(true) + + expect(diff_file.collapsed?).to eq(true) + end + + it 'returns false for a file that is small enough' do + expect(diff).to receive(:collapsed?).and_return(false) + + expect(diff_file.collapsed?).to eq(false) + end + end end diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index bb6c84262f6..83f2ad96fd8 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -18,7 +18,9 @@ module TestEnv 'orphaned-branch' => '45127a9', 'binary-encoding' => '7b1cf43', 'gitattributes' => '5a62481', - 'expand-collapse-diffs' => '4842455' + 'expand-collapse-diffs' => '4842455', + 'expand-collapse-files' => '025db92', + 'expand-collapse-lines' => '238e82d' } # gitlab-test-fork is a fork of gitlab-fork, but we don't necessarily -- cgit v1.2.1 From c2fe22f8f419a8e562f0f34e8c0f478aefc34ec0 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 18 Jul 2016 12:30:23 -0600 Subject: Minor policy refinements. --- config/initializers/secure_headers.rb | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 7a2f0eab3c0..9fd24a667cc 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -1,3 +1,6 @@ +# CSP headers have to have single quotes, so failures relating to quotes +# inside Ruby string arrays are irrelevant. +# rubocop:disable Lint/PercentStringArray require 'gitlab/current_settings' include Gitlab::CurrentSettings @@ -23,8 +26,6 @@ SecureHeaders::Configuration.default do |config| strict: true } } - # Disallow iframes. - config.x_frame_options = "DENY" config.x_content_type_options = "nosniff" config.x_xss_protection = "1; mode=block" config.x_download_options = "noopen" @@ -45,13 +46,13 @@ SecureHeaders::Configuration.default do |config| # Only load local fonts. font_src: %w('self'), # Load local images, any external image available over HTTPS. - img_src: %w('self' https:), + img_src: %w(* 'self' data:), # Audio and video can't be played on GitLab currently, so it's disabled. media_src: %w('none'), # Don't allow , , or elements. object_src: %w('none'), # Allow local scripts and inline scripts. - script_src: %w('unsafe-inline' 'self'), + script_src: %w('unsafe-inline' 'unsafe-eval' 'self'), # Allow local stylesheets and inline styles. style_src: %w('unsafe-inline' 'self'), # The URIs that a user agent may use as the document base URL. @@ -63,15 +64,18 @@ SecureHeaders::Configuration.default do |config| # Disallow any parents from embedding a page in an iframe. frame_ancestors: %w('none'), # Don't allow any plugins (Flash, Shockwave, etc.) - plugin_types: %w('none'), + plugin_types: %w(), # Blocks all mixed (HTTP) content. block_all_mixed_content: true, # Upgrades insecure requests to HTTPS when possible. - upgrade_insecure_requests: true, - # Reports are sent to Sentry if it's enabled, nowhere otherwise. - report_uri: %W(#{CSP_REPORT_URI}) + upgrade_insecure_requests: true } + # Reports are sent to Sentry if it's enabled. + if current_application_settings.sentry_enabled + config.csp[:report_uri] = %W(#{CSP_REPORT_URI}) + end + # Allow Bootstrap Linter in development mode. if Rails.env.development? config.csp[:script_src] << "maxcdn.bootstrapcdn.com" -- cgit v1.2.1 From e9305ca5741ae92ae80fb3d9e32f843aab97a08a Mon Sep 17 00:00:00 2001 From: Mark Pundsack Date: Mon, 18 Jul 2016 14:21:43 -0700 Subject: Update documentation for build artifact dependencies --- doc/ci/yaml/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 50fa263f693..5f77888f631 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -757,12 +757,13 @@ Introduced in GitLab 8.6 and GitLab Runner v1.1.1. This feature should be used in conjunction with [`artifacts`](#artifacts) and allows you to define the artifacts to pass between different builds. -Note that `artifacts` from previous [stages](#stages) are passed by default. +Note that `artifacts` from all previous [stages](#stages) are passed by default. To use this feature, define `dependencies` in context of the job and pass a list of all previous builds from which the artifacts should be downloaded. You can only define builds from stages that are executed before the current one. An error will be shown if you define builds from the current stage or next ones. +Defining an empty array will skip downloading any artifacts for that job. --- -- cgit v1.2.1 From aaba9ebbb196ae421178e962ccc1078fdcb98843 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Mon, 18 Jul 2016 12:57:57 +0200 Subject: Improve cron_jobs loading error messages --- CHANGELOG | 1 + config/initializers/sidekiq.rb | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index d8ef5866a1a..7bf2c7a5587 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -116,6 +116,7 @@ v 8.10.0 (unreleased) - Fix last update timestamp on issues not preserved on gitlab.com and project imports - Fix issues importing projects from EE to CE - Fix creating group with space in group path + - Improve cron_jobs loading error messages !5318 - Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska) - Limit the number of retries on error to 3 for exporting projects - Allow empty repositories on project import/export diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 593c14a289f..b40fd81ff96 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -13,7 +13,14 @@ Sidekiq.configure_server do |config| # UGLY Hack to get nested hash from settingslogic cron_jobs = JSON.parse(Gitlab.config.cron_jobs.to_json) # UGLY hack: Settingslogic doesn't allow 'class' key - cron_jobs.each { |k, v| cron_jobs[k]['class'] = cron_jobs[k].delete('job_class') } + cron_jobs_required_keys = %w(job_class cron) + cron_jobs.each do |k, v| + if cron_jobs[k] && cron_jobs_required_keys.all? { |s| cron_jobs[k].key?(s) } + cron_jobs[k]['class'] = cron_jobs[k].delete('job_class') + else + raise("Invalid cron_jobs config key: '#{k}'. Check your gitlab config file.") + end + end Sidekiq::Cron::Job.load_from_hash! cron_jobs # Database pool should be at least `sidekiq_concurrency` + 2 -- cgit v1.2.1 From 28f85155f5125131d109629871a3257a471ad5af Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Mon, 18 Jul 2016 23:13:21 +0100 Subject: fixes rubocop issues and implements create_commit test --- Gemfile.lock | 1 - spec/models/repository_spec.rb | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4f6a8f67a4d..7851f93485d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -389,7 +389,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index c1ebbf9ac4e..eb71a62ec56 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -129,12 +129,28 @@ describe Repository, models: true do end end + describe :create_file do + it 'commits change to a file successfully' do + expect do + repository.commit_file(user, 'LICENSE', 'Copyright!', + 'Updates filename', + 'master', true) + end.to change { repository.commits('master').count }.by(1) + + blob = Blob.decorate(repository.blob_at(repository.commits('master').first.id, 'LICENSE')) + + expect(blob.data).to eq('Copyright!') + end + end + describe :update_file do it 'updates filename successfully' do - expect{repository.update_file(user, 'NEWLICENSE', 'Copyright!', + expect do + repository.update_file(user, 'NEWLICENSE', 'Copyright!', branch: 'master', previous_path: 'LICENSE', - message: 'Changes filename')}.to change { repository.commits('master').count }.by(1) + message: 'Changes filename') + end.to change { repository.commits('master').count }.by(1) files = repository.ls_files('master') -- cgit v1.2.1 From defb8660c08a904a385b584280f72fc6a5a94c6e Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Thu, 14 Jul 2016 13:19:40 -0500 Subject: Added the ability to block sign ups using a domain blacklist. --- .../admin/application_settings_controller.rb | 4 ++ app/models/application_setting.rb | 35 +++++++++-- app/models/user.rb | 40 ++++++++---- .../admin/application_settings/_form.html.haml | 73 ++++++++++++++++++---- ...add_domain_blacklist_to_application_settings.rb | 22 +++++++ db/schema.rb | 2 + lib/api/entities.rb | 2 + spec/fixtures/blacklist.txt | 3 + spec/models/application_setting_spec.rb | 27 ++++++++ spec/models/user_spec.rb | 53 +++++++++++++++- 10 files changed, 228 insertions(+), 33 deletions(-) create mode 100644 db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb create mode 100644 spec/fixtures/blacklist.txt diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 23ba83aba0e..3e27320ee5c 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -64,6 +64,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController params[:application_setting][:disabled_oauth_sign_in_sources] = AuthHelper.button_based_providers.map(&:to_s) - Array(enabled_oauth_sign_in_sources) + params.delete(:domain_blacklist_raw) if params[:domain_blacklist_file] params.require(:application_setting).permit( :default_projects_limit, @@ -112,6 +113,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :container_registry_token_expire_delay, :repository_storage, :enabled_git_access_protocol, + :domain_blacklist_enabled, + :domain_blacklist_raw, + :domain_blacklist_file, restricted_visibility_levels: [], import_sources: [], disabled_oauth_sign_in_sources: [] diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index c6f77cc055f..84b1b54eeae 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -9,7 +9,9 @@ class ApplicationSetting < ActiveRecord::Base serialize :import_sources serialize :disabled_oauth_sign_in_sources, Array serialize :restricted_signup_domains, Array - attr_accessor :restricted_signup_domains_raw + serialize :domain_blacklist, Array + + attr_accessor :restricted_signup_domains_raw, :domain_blacklist_raw validates :session_expire_delay, presence: true, @@ -62,6 +64,10 @@ class ApplicationSetting < ActiveRecord::Base validates :enabled_git_access_protocol, inclusion: { in: %w(ssh http), allow_blank: true, allow_nil: true } + validates :domain_blacklist, + presence: true, + if: :domain_blacklist_enabled? + validates_each :restricted_visibility_levels do |record, attr, value| unless value.nil? value.each do |level| @@ -154,18 +160,35 @@ class ApplicationSetting < ActiveRecord::Base self.restricted_signup_domains.join("\n") unless self.restricted_signup_domains.nil? end - def restricted_signup_domains_raw=(values) - self.restricted_signup_domains = [] - self.restricted_signup_domains = values.split( - /\s*[,;]\s* # comma or semicolon, optionally surrounded by whitespace + def domain_blacklist_raw + self.domain_blacklist.join("\n") unless self.domain_blacklist.nil? + end + + def splitter + /\s*[,;]\s* # comma or semicolon, optionally surrounded by whitespace | # or \s # any whitespace character | # or [\r\n] # any number of newline characters - /x) + /x + end + + def restricted_signup_domains_raw=(values) + self.restricted_signup_domains = [] + self.restricted_signup_domains = values.split(splitter) self.restricted_signup_domains.reject! { |d| d.empty? } end + def domain_blacklist_raw=(values) + self.domain_blacklist = [] + self.domain_blacklist = values.split(splitter) + self.domain_blacklist.reject! { |d| d.empty? } + end + + def domain_blacklist_file=(file) + self.domain_blacklist_raw = file.read + end + def runners_registration_token ensure_runners_registration_token! end diff --git a/app/models/user.rb b/app/models/user.rb index 3d0a033785c..b0c5d84fc40 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -111,7 +111,7 @@ class User < ActiveRecord::Base validates :avatar, file_size: { maximum: 200.kilobytes.to_i } before_validation :generate_password, on: :create - before_validation :restricted_signup_domains, on: :create + before_validation :signup_domain_valid?, on: :create before_validation :sanitize_attrs before_validation :set_notification_email, if: ->(user) { user.email_changed? } before_validation :set_public_email, if: ->(user) { user.public_email_changed? } @@ -760,27 +760,41 @@ class User < ActiveRecord::Base Project.where(id: events) end - def restricted_signup_domains - email_domains = current_application_settings.restricted_signup_domains + def match_domain(email_domains) + email_domains.any? do |domain| + escaped = Regexp.escape(domain).gsub('\*', '.*?') + regexp = Regexp.new "^#{escaped}$", Regexp::IGNORECASE + email_domain = Mail::Address.new(self.email).domain + email_domain =~ regexp + end + end + + def signup_domain_valid? + valid = true - unless email_domains.blank? - match_found = email_domains.any? do |domain| - escaped = Regexp.escape(domain).gsub('\*', '.*?') - regexp = Regexp.new "^#{escaped}$", Regexp::IGNORECASE - email_domain = Mail::Address.new(self.email).domain - email_domain =~ regexp + if current_application_settings.domain_blacklist_enabled? + blocked_domains = current_application_settings.domain_blacklist + if match_domain(blocked_domains) + self.errors.add :email, 'is not from an allowed domain.' + valid = false end + end - unless match_found + allowed_domains = current_application_settings.restricted_signup_domains + unless allowed_domains.blank? + if match_domain(allowed_domains) + self.errors.clear + valid = true + else self.errors.add :email, 'is not whitelisted. ' + 'Email domains valid for registration are: ' + - email_domains.join(', ') - return false + allowed_domains.join(', ') + valid = false end end - true + return valid end def can_be_removed? diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 538d8176ce7..9443fe5e1d3 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -109,7 +109,7 @@ Newly registered users will by default be external %fieldset - %legend Sign-in Restrictions + %legend Sign-up Restrictions .form-group .col-sm-offset-2.col-sm-10 .checkbox @@ -122,6 +122,49 @@ = f.label :send_user_confirmation_email do = f.check_box :send_user_confirmation_email Send confirmation email on sign-up + .form-group + = f.label :restricted_signup_domains, 'Restricted domains for sign-ups', class: 'control-label col-sm-2' + .col-sm-10 + = f.text_area :restricted_signup_domains_raw, placeholder: 'domain.com', class: 'form-control' + .help-block ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com + .form-group + = f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'control-label col-sm-2' + .col-sm-10 + .checkbox + = f.label :domain_blacklist_enabled do + = f.check_box :domain_blacklist_enabled + Enable domain blacklist for sign ups + .form-group + .col-sm-offset-2.col-sm-10 + .radio + = label_tag :blacklist_type_file do + = radio_button_tag :blacklist_type, :file, @application_setting.domain_blacklist.blank? + .option-title + Upload blacklist file + .radio + = label_tag :blacklist_type_raw do + = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? + .option-title + Enter blacklist manually + .form-group.blacklist-file + = f.label :domain_blacklist_file, 'Blacklist file', class: 'control-label col-sm-2' + .col-sm-10 + = f.file_field :domain_blacklist_file, class: 'form-control', accept: '.txt,.conf' + .help-block Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines or commas for multiple entries. + .form-group.blacklist-raw + = f.label :domain_blacklist, 'Blacklisted domains', class: 'control-label col-sm-2' + .col-sm-10 + = f.text_area :domain_blacklist_raw, placeholder: 'domain.com', class: 'form-control', rows: 10 + .help-block Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com + + .form-group + = f.label :after_sign_up_text, class: 'control-label col-sm-2' + .col-sm-10 + = f.text_area :after_sign_up_text, class: 'form-control', rows: 4 + .help-block Markdown enabled + + %fieldset + %legend Sign-in Restrictions .form-group .col-sm-offset-2.col-sm-10 .checkbox @@ -147,11 +190,6 @@ .col-sm-10 = f.number_field :two_factor_grace_period, min: 0, class: 'form-control', placeholder: '0' .help-block Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication - .form-group - = f.label :restricted_signup_domains, 'Restricted domains for sign-ups', class: 'control-label col-sm-2' - .col-sm-10 - = f.text_area :restricted_signup_domains_raw, placeholder: 'domain.com', class: 'form-control' - .help-block Only users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com .form-group = f.label :home_page_url, 'Home page URL', class: 'control-label col-sm-2' .col-sm-10 @@ -167,11 +205,6 @@ .col-sm-10 = f.text_area :sign_in_text, class: 'form-control', rows: 4 .help-block Markdown enabled - .form-group - = f.label :after_sign_up_text, class: 'control-label col-sm-2' - .col-sm-10 - = f.text_area :after_sign_up_text, class: 'form-control', rows: 4 - .help-block Markdown enabled .form-group = f.label :help_page_text, class: 'control-label col-sm-2' .col-sm-10 @@ -353,3 +386,21 @@ .form-actions = f.submit 'Save', class: 'btn btn-save' + +:javascript + function showBlacklistType() { + if ($("input[name='blacklist_type']:checked").val() == "file") + { + $(".blacklist-file").show(); + $(".blacklist-raw").hide(); + } + else + { + $(".blacklist-file").hide(); + $(".blacklist-raw").show(); + } + } + + $("input[name='blacklist_type']").click(showBlacklistType); + + showBlacklistType(); \ No newline at end of file diff --git a/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb b/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb new file mode 100644 index 00000000000..ecdd1bd7e5e --- /dev/null +++ b/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb @@ -0,0 +1,22 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddDomainBlacklistToApplicationSettings < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + add_column :application_settings, :domain_blacklist_enabled, :boolean, default: false + add_column :application_settings, :domain_blacklist, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 8882377f9f4..25d94f283c9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -88,6 +88,8 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.text "after_sign_up_text" t.string "repository_storage", default: "default" t.string "enabled_git_access_protocol" + t.boolean "domain_blacklist_enabled", default: false + t.text "domain_blacklist" end create_table "audit_events", force: :cascade do |t| diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 3c79a00eb8c..4cd388658be 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -413,6 +413,8 @@ module API expose :default_snippet_visibility expose :default_group_visibility expose :restricted_signup_domains + expose :domain_blacklist_enabled + expose :domain_blacklist expose :user_oauth_applications expose :after_sign_out_path expose :container_registry_token_expire_delay diff --git a/spec/fixtures/blacklist.txt b/spec/fixtures/blacklist.txt new file mode 100644 index 00000000000..baeb11eda9a --- /dev/null +++ b/spec/fixtures/blacklist.txt @@ -0,0 +1,3 @@ +example.com +test.com +foo.bar \ No newline at end of file diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 2ea1320267c..582d9a8d8cd 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -73,4 +73,31 @@ describe ApplicationSetting, models: true do expect(setting.restricted_signup_domains).to eq(['example.com', '*.example.com']) end end + + context 'blacklisted signup domains' do + it 'set single domain' do + setting.domain_blacklist_raw = 'example.com' + expect(setting.domain_blacklist).to eq(['example.com']) + end + + it 'set multiple domains with spaces' do + setting.domain_blacklist_raw = 'example.com *.example.com' + expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + end + + it 'set multiple domains with newlines and a space' do + setting.domain_blacklist_raw = "example.com\n *.example.com" + expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + end + + it 'set multiple domains with commas' do + setting.domain_blacklist_raw = "example.com, *.example.com" + expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + end + + it 'set multiple domain with file' do + setting.domain_blacklist_file = File.open(Rails.root.join('spec/fixtures/', 'blacklist.txt')) + expect(setting.domain_blacklist).to eq(%w(example.com test.com foo.bar)) + end + end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index fc74488ac0e..79f77d116a7 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -89,7 +89,7 @@ describe User, models: true do end describe 'email' do - context 'when no signup domains listed' do + context 'when no signup domains white listed' do before do allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return([]) end @@ -100,7 +100,7 @@ describe User, models: true do end end - context 'when a signup domain is listed and subdomains are allowed' do + context 'when a signup domain is white listed and subdomains are allowed' do before do allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['example.com', '*.example.com']) end @@ -121,7 +121,7 @@ describe User, models: true do end end - context 'when a signup domain is listed and subdomains are not allowed' do + context 'when a signup domain is white listed and subdomains are not allowed' do before do allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['example.com']) end @@ -142,6 +142,53 @@ describe User, models: true do end end + context 'domain blacklist' do + before do + allow_any_instance_of(ApplicationSetting).to receive(:domain_blacklist_enabled?).and_return(true) + allow_any_instance_of(ApplicationSetting).to receive(:domain_blacklist).and_return(['example.com']) + end + + context 'when a signup domain is black listed' do + it 'accepts info@test.com' do + user = build(:user, email: 'info@test.com') + expect(user).to be_valid + end + + it 'rejects info@example.com' do + user = build(:user, email: 'info@example.com') + expect(user).not_to be_valid + end + end + + context 'when a signup domain is black listed but a wildcard subdomain is allowed' do + before do + allow_any_instance_of(ApplicationSetting).to receive(:domain_blacklist).and_return(['test.example.com']) + allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['*.example.com']) + end + + it 'should give priority to whitelist and allow info@test.example.com' do + user = build(:user, email: 'info@test.example.com') + expect(user).to be_valid + end + end + + context 'with both lists containing a domain' do + before do + allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['test.com']) + end + + it 'accepts info@test.com' do + user = build(:user, email: 'info@test.com') + expect(user).to be_valid + end + + it 'rejects info@example.com' do + user = build(:user, email: 'info@example.com') + expect(user).not_to be_valid + end + end + end + context 'owns_notification_email' do it 'accepts temp_oauth_email emails' do user = build(:user, email: "temp-email-for-oauth@example.com") -- cgit v1.2.1 From 8382cff34590648c76fad4ff18a1e1ad74418501 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Thu, 14 Jul 2016 13:24:39 -0500 Subject: Added CHANGELOG item. --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 7bf2c7a5587..4c8eb90151e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,6 +21,7 @@ v 8.10.0 (unreleased) - Display last commit of deleted branch in push events !4699 (winniehell) - Escape file extension when parsing search results !5141 (winniehell) - Apply the trusted_proxies config to the rack request object for use with rack_attack + - Added the ability to block sign ups using a domain blacklist !5259 - Upgrade to Rails 4.2.7. !5236 - Add Sidekiq queue duration to transaction metrics. - Add a new column `artifacts_size` to table `ci_builds` !4964 -- cgit v1.2.1 From ce58437cfad3c82371b1790e47f97bc5e1d9a889 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Thu, 14 Jul 2016 22:47:36 -0500 Subject: Fixed `signup_domain_valid?` flow and added documentation. --- app/models/user.rb | 37 ++++++++++++++-------------- doc/administration/access_restrictions.md | 22 +++++++++++++++-- doc/administration/img/domain_blacklist.png | Bin 0 -> 178444 bytes 3 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 doc/administration/img/domain_blacklist.png diff --git a/app/models/user.rb b/app/models/user.rb index b0c5d84fc40..d27e2374f18 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -760,41 +760,31 @@ class User < ActiveRecord::Base Project.where(id: events) end - def match_domain(email_domains) - email_domains.any? do |domain| - escaped = Regexp.escape(domain).gsub('\*', '.*?') - regexp = Regexp.new "^#{escaped}$", Regexp::IGNORECASE - email_domain = Mail::Address.new(self.email).domain - email_domain =~ regexp - end - end - def signup_domain_valid? valid = true + error = nil if current_application_settings.domain_blacklist_enabled? blocked_domains = current_application_settings.domain_blacklist - if match_domain(blocked_domains) - self.errors.add :email, 'is not from an allowed domain.' + if match_domain(blocked_domains, self.email) + error = 'is not from an allowed domain.' valid = false end end allowed_domains = current_application_settings.restricted_signup_domains unless allowed_domains.blank? - if match_domain(allowed_domains) - self.errors.clear + if match_domain(allowed_domains, self.email) valid = true else - self.errors.add :email, - 'is not whitelisted. ' + - 'Email domains valid for registration are: ' + - allowed_domains.join(', ') + error = "is not whitelisted. Email domains valid for registration are: #{allowed_domains.join(', ')}" valid = false end end - return valid + self.errors.add(:email, error) unless valid + + valid end def can_be_removed? @@ -895,4 +885,15 @@ class User < ActiveRecord::Base self.can_create_group = false self.projects_limit = 0 end + + private + + def match_domain(email_domains, email) + signup_domain = Mail::Address.new(email).domain + email_domains.any? do |domain| + escaped = Regexp.escape(domain).gsub('\*', '.*?') + regexp = Regexp.new "^#{escaped}$", Regexp::IGNORECASE + signup_domain =~ regexp + end + end end diff --git a/doc/administration/access_restrictions.md b/doc/administration/access_restrictions.md index 51d7996effd..08bb8ff4e19 100644 --- a/doc/administration/access_restrictions.md +++ b/doc/administration/access_restrictions.md @@ -1,6 +1,6 @@ # Access Restrictions -> **Note:** This feature is only available on versions 8.10 and above. +> **Note:** These features are only available on versions 8.10 and above. With GitLab's Access restrictions you can choose which Git access protocols you want your users to use to communicate with GitLab. This feature can be enabled @@ -35,4 +35,22 @@ not selected. > **Note:** Please keep in mind that disabling an access protocol does not actually block access to the server itself. The ports used for the protocol, be it SSH or HTTP, will still be accessible. What GitLab does is restrict access on the - application level. \ No newline at end of file + application level. + +## Blacklist email domains + +With this feature enabled, you can block email addresses of an specific domain +from creating an account on your GitLab server. This is particularly useful to +prevent spam. Disposable email addresses are usually used by malicious users to +create dummy accounts and spam issues. + +This feature can be activated via the `Application Settings` in the Admin area, +and you have the option of entering the list manually, or uploading a file with +the list. + +The blacklist accepts wildcards, so you can use `*.test.com` to block every +`test.com` subdomain, or `*.io` to block all domains ending in `.io`. Domains +should be separated by a whitespace, semicolon, comma, or a new line. + +![Domain Blacklist](img/domain_blacklist.png) + diff --git a/doc/administration/img/domain_blacklist.png b/doc/administration/img/domain_blacklist.png new file mode 100644 index 00000000000..a7894e5f08d Binary files /dev/null and b/doc/administration/img/domain_blacklist.png differ -- cgit v1.2.1 From e15fa67c9894ccb52aeb1f0116e083c9dbba24f5 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Fri, 15 Jul 2016 09:54:04 -0500 Subject: Make sure email domain validation method is private. --- app/models/user.rb | 54 ++++++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index d27e2374f18..0168008355b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -760,33 +760,6 @@ class User < ActiveRecord::Base Project.where(id: events) end - def signup_domain_valid? - valid = true - error = nil - - if current_application_settings.domain_blacklist_enabled? - blocked_domains = current_application_settings.domain_blacklist - if match_domain(blocked_domains, self.email) - error = 'is not from an allowed domain.' - valid = false - end - end - - allowed_domains = current_application_settings.restricted_signup_domains - unless allowed_domains.blank? - if match_domain(allowed_domains, self.email) - valid = true - else - error = "is not whitelisted. Email domains valid for registration are: #{allowed_domains.join(', ')}" - valid = false - end - end - - self.errors.add(:email, error) unless valid - - valid - end - def can_be_removed? !solo_owned_groups.present? end @@ -886,7 +859,32 @@ class User < ActiveRecord::Base self.projects_limit = 0 end - private + def signup_domain_valid? + valid = true + error = nil + + if current_application_settings.domain_blacklist_enabled? + blocked_domains = current_application_settings.domain_blacklist + if match_domain(blocked_domains, self.email) + error = 'is not from an allowed domain.' + valid = false + end + end + + allowed_domains = current_application_settings.restricted_signup_domains + unless allowed_domains.blank? + if match_domain(allowed_domains, self.email) + valid = true + else + error = "is not whitelisted. Email domains valid for registration are: #{allowed_domains.join(', ')}" + valid = false + end + end + + self.errors.add(:email, error) unless valid + + valid + end def match_domain(email_domains, email) signup_domain = Mail::Address.new(email).domain -- cgit v1.2.1 From 7943767267873423acb1eddbf00b6c5684f7849f Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Fri, 15 Jul 2016 13:20:45 -0500 Subject: Refactored the domain separator regex, plus syntax and grammar fixes. --- app/models/application_setting.rb | 21 ++++++++++----------- doc/administration/access_restrictions.md | 2 +- spec/models/application_setting_spec.rb | 10 +++++----- spec/models/user_spec.rb | 6 +++--- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 84b1b54eeae..03c2bc0b57d 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -4,6 +4,12 @@ class ApplicationSetting < ActiveRecord::Base add_authentication_token_field :health_check_access_token CACHE_KEY = 'application_setting.last' + DOMAIN_LIST_SEPARATOR = %r{\s*[,;]\s* # comma or semicolon, optionally surrounded by whitespace + | # or + \s # any whitespace character + | # or + [\r\n] # any number of newline characters + }x serialize :restricted_visibility_levels serialize :import_sources @@ -164,25 +170,18 @@ class ApplicationSetting < ActiveRecord::Base self.domain_blacklist.join("\n") unless self.domain_blacklist.nil? end - def splitter - /\s*[,;]\s* # comma or semicolon, optionally surrounded by whitespace - | # or - \s # any whitespace character - | # or - [\r\n] # any number of newline characters - /x - end - def restricted_signup_domains_raw=(values) self.restricted_signup_domains = [] - self.restricted_signup_domains = values.split(splitter) + self.restricted_signup_domains = values.split(DOMAIN_LIST_SEPARATOR) self.restricted_signup_domains.reject! { |d| d.empty? } + self.restricted_signup_domains end def domain_blacklist_raw=(values) self.domain_blacklist = [] - self.domain_blacklist = values.split(splitter) + self.domain_blacklist = values.split(DOMAIN_LIST_SEPARATOR) self.domain_blacklist.reject! { |d| d.empty? } + self.domain_blacklist end def domain_blacklist_file=(file) diff --git a/doc/administration/access_restrictions.md b/doc/administration/access_restrictions.md index 08bb8ff4e19..eb08cf139d4 100644 --- a/doc/administration/access_restrictions.md +++ b/doc/administration/access_restrictions.md @@ -39,7 +39,7 @@ not selected. ## Blacklist email domains -With this feature enabled, you can block email addresses of an specific domain +With this feature enabled, you can block email addresses of a specific domain from creating an account on your GitLab server. This is particularly useful to prevent spam. Disposable email addresses are usually used by malicious users to create dummy accounts and spam issues. diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 582d9a8d8cd..ebcd9b0f947 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -77,27 +77,27 @@ describe ApplicationSetting, models: true do context 'blacklisted signup domains' do it 'set single domain' do setting.domain_blacklist_raw = 'example.com' - expect(setting.domain_blacklist).to eq(['example.com']) + expect(setting.domain_blacklist).to contain_exactly('example.com') end it 'set multiple domains with spaces' do setting.domain_blacklist_raw = 'example.com *.example.com' - expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com') end it 'set multiple domains with newlines and a space' do setting.domain_blacklist_raw = "example.com\n *.example.com" - expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com') end it 'set multiple domains with commas' do setting.domain_blacklist_raw = "example.com, *.example.com" - expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com') end it 'set multiple domain with file' do setting.domain_blacklist_file = File.open(Rails.root.join('spec/fixtures/', 'blacklist.txt')) - expect(setting.domain_blacklist).to eq(%w(example.com test.com foo.bar)) + expect(setting.domain_blacklist).to contain_exactly('example.com', 'test.com', 'foo.bar') end end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 79f77d116a7..5f130234df1 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -89,7 +89,7 @@ describe User, models: true do end describe 'email' do - context 'when no signup domains white listed' do + context 'when no signup domains whitelisted' do before do allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return([]) end @@ -100,7 +100,7 @@ describe User, models: true do end end - context 'when a signup domain is white listed and subdomains are allowed' do + context 'when a signup domain is whitelisted and subdomains are allowed' do before do allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['example.com', '*.example.com']) end @@ -121,7 +121,7 @@ describe User, models: true do end end - context 'when a signup domain is white listed and subdomains are not allowed' do + context 'when a signup domain is whitelisted and subdomains are not allowed' do before do allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['example.com']) end -- cgit v1.2.1 From a3f0f2cc4d9a4c689ae0eeae73e6d4ef19c39cce Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Fri, 15 Jul 2016 18:29:23 -0500 Subject: Move inline JS to admin.js.coffee specific file. --- app/assets/javascripts/admin.js.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee index b2b8e1b7ffb..4dd30973d11 100644 --- a/app/assets/javascripts/admin.js.coffee +++ b/app/assets/javascripts/admin.js.coffee @@ -38,3 +38,15 @@ class @Admin $('li.group_member').bind 'ajax:success', -> Turbolinks.visit(location.href) + + showBlacklistType = -> + if $('input[name=\'blacklist_type\']:checked').val() == 'file' + $('.blacklist-file').show() + $('.blacklist-raw').hide() + else + $('.blacklist-file').hide() + $('.blacklist-raw').show() + return + + $('input[name=\'blacklist_type\']').click showBlacklistType + showBlacklistType() -- cgit v1.2.1 From c71e658ccac85f111517e04b79d915c10867c7e3 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Fri, 15 Jul 2016 18:30:38 -0500 Subject: Refactor and rename `restricted_signup_domains` to `domain_whitelist` to better conform to its behavior and newly introduced behavior. --- .../admin/application_settings_controller.rb | 2 +- app/models/application_setting.rb | 20 ++++++++--------- app/models/user.rb | 2 +- .../admin/application_settings/_form.html.haml | 26 ++++------------------ config/initializers/1_settings.rb | 2 +- ...plication_settings_restricted_signup_domains.rb | 21 +++++++++++++++++ db/schema.rb | 2 +- doc/api/settings.md | 6 ++--- doc/development/doc_styleguide.md | 2 +- lib/api/entities.rb | 2 +- lib/gitlab/current_settings.rb | 2 +- spec/models/application_setting_spec.rb | 16 ++++++------- spec/models/user_spec.rb | 10 ++++----- 13 files changed, 58 insertions(+), 55 deletions(-) create mode 100644 db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 3e27320ee5c..c5b44ff8c44 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -84,7 +84,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :default_project_visibility, :default_snippet_visibility, :default_group_visibility, - :restricted_signup_domains_raw, + :domain_whitelist_raw, :version_check_enabled, :admin_notification_email, :user_oauth_applications, diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 03c2bc0b57d..d923b4d5235 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -14,10 +14,10 @@ class ApplicationSetting < ActiveRecord::Base serialize :restricted_visibility_levels serialize :import_sources serialize :disabled_oauth_sign_in_sources, Array - serialize :restricted_signup_domains, Array + serialize :domain_whitelist, Array serialize :domain_blacklist, Array - attr_accessor :restricted_signup_domains_raw, :domain_blacklist_raw + attr_accessor :domain_whitelist_raw, :domain_blacklist_raw validates :session_expire_delay, presence: true, @@ -141,7 +141,7 @@ class ApplicationSetting < ActiveRecord::Base session_expire_delay: Settings.gitlab['session_expire_delay'], default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'], default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'], - restricted_signup_domains: Settings.gitlab['restricted_signup_domains'], + domain_whitelist: Settings.gitlab['domain_whitelist'], import_sources: %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project], shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'], max_artifacts_size: Settings.artifacts['max_size'], @@ -162,19 +162,19 @@ class ApplicationSetting < ActiveRecord::Base ActiveRecord::Base.connection.column_exists?(:application_settings, :home_page_url) end - def restricted_signup_domains_raw - self.restricted_signup_domains.join("\n") unless self.restricted_signup_domains.nil? + def domain_whitelist_raw + self.domain_whitelist.join("\n") unless self.domain_whitelist.nil? end def domain_blacklist_raw self.domain_blacklist.join("\n") unless self.domain_blacklist.nil? end - def restricted_signup_domains_raw=(values) - self.restricted_signup_domains = [] - self.restricted_signup_domains = values.split(DOMAIN_LIST_SEPARATOR) - self.restricted_signup_domains.reject! { |d| d.empty? } - self.restricted_signup_domains + def domain_whitelist_raw=(values) + self.domain_whitelist = [] + self.domain_whitelist = values.split(DOMAIN_LIST_SEPARATOR) + self.domain_whitelist.reject! { |d| d.empty? } + self.domain_whitelist end def domain_blacklist_raw=(values) diff --git a/app/models/user.rb b/app/models/user.rb index 0168008355b..6932e750fe0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -871,7 +871,7 @@ class User < ActiveRecord::Base end end - allowed_domains = current_application_settings.restricted_signup_domains + allowed_domains = current_application_settings.domain_whitelist unless allowed_domains.blank? if match_domain(allowed_domains, self.email) valid = true diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 9443fe5e1d3..35fea2d8fa9 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -123,9 +123,9 @@ = f.check_box :send_user_confirmation_email Send confirmation email on sign-up .form-group - = f.label :restricted_signup_domains, 'Restricted domains for sign-ups', class: 'control-label col-sm-2' + = f.label :domain_whitelist, 'Whitelisted domains for sign-ups', class: 'control-label col-sm-2' .col-sm-10 - = f.text_area :restricted_signup_domains_raw, placeholder: 'domain.com', class: 'form-control' + = f.text_area :domain_whitelist_raw, placeholder: 'domain.com', class: 'form-control' .help-block ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com .form-group = f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'control-label col-sm-2' @@ -152,7 +152,7 @@ = f.file_field :domain_blacklist_file, class: 'form-control', accept: '.txt,.conf' .help-block Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines or commas for multiple entries. .form-group.blacklist-raw - = f.label :domain_blacklist, 'Blacklisted domains', class: 'control-label col-sm-2' + = f.label :domain_blacklist, 'Blacklisted domains for sign-ups', class: 'control-label col-sm-2' .col-sm-10 = f.text_area :domain_blacklist_raw, placeholder: 'domain.com', class: 'form-control', rows: 10 .help-block Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com @@ -385,22 +385,4 @@ .form-actions - = f.submit 'Save', class: 'btn btn-save' - -:javascript - function showBlacklistType() { - if ($("input[name='blacklist_type']:checked").val() == "file") - { - $(".blacklist-file").show(); - $(".blacklist-raw").hide(); - } - else - { - $(".blacklist-file").hide(); - $(".blacklist-raw").show(); - } - } - - $("input[name='blacklist_type']").click(showBlacklistType); - - showBlacklistType(); \ No newline at end of file + = f.submit 'Save', class: 'btn btn-save' \ No newline at end of file diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 51d93e8cde0..693507e0bec 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -212,7 +212,7 @@ Settings.gitlab.default_projects_features['builds'] = true if Settin Settings.gitlab.default_projects_features['container_registry'] = true if Settings.gitlab.default_projects_features['container_registry'].nil? Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE) Settings.gitlab['repository_downloads_path'] = File.join(Settings.shared['path'], 'cache/archive') if Settings.gitlab['repository_downloads_path'].nil? -Settings.gitlab['restricted_signup_domains'] ||= [] +Settings.gitlab['domain_whitelist'] ||= [] Settings.gitlab['import_sources'] ||= %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project] Settings.gitlab['trusted_proxies'] ||= [] diff --git a/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb b/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb new file mode 100644 index 00000000000..dd15704800a --- /dev/null +++ b/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb @@ -0,0 +1,21 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class RenameApplicationSettingsRestrictedSignupDomains < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + rename_column :application_settings, :restricted_signup_domains, :domain_whitelist + end +end diff --git a/db/schema.rb b/db/schema.rb index 25d94f283c9..3d769ccac50 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -49,7 +49,7 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.integer "max_attachment_size", default: 10, null: false t.integer "default_project_visibility" t.integer "default_snippet_visibility" - t.text "restricted_signup_domains" + t.text "domain_whitelist" t.boolean "user_oauth_applications", default: true t.string "after_sign_out_path" t.integer "session_expire_delay", default: 10080, null: false diff --git a/doc/api/settings.md b/doc/api/settings.md index d9b68eaeadf..c925fa1861e 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -33,7 +33,7 @@ Example response: "session_expire_delay" : 10080, "home_page_url" : null, "default_snippet_visibility" : 0, - "restricted_signup_domains" : [], + "domain_whitelist" : [], "created_at" : "2016-01-04T15:44:55.176Z", "default_project_visibility" : 0, "gravatar_enabled" : true, @@ -63,7 +63,7 @@ PUT /application/settings | `session_expire_delay` | integer | no | Session duration in minutes. GitLab restart is required to apply changes | | `default_project_visibility` | integer | no | What visibility level new projects receive. Can take `0` _(Private)_, `1` _(Internal)_ and `2` _(Public)_ as a parameter. Default is `0`.| | `default_snippet_visibility` | integer | no | What visibility level new snippets receive. Can take `0` _(Private)_, `1` _(Internal)_ and `2` _(Public)_ as a parameter. Default is `0`.| -| `restricted_signup_domains` | array of strings | no | Force people to use only corporate emails for sign-up. Default is null, meaning there is no restriction. | +| `domain_whitelist` | array of strings | no | Force people to use only corporate emails for sign-up. Default is null, meaning there is no restriction. | | `user_oauth_applications` | boolean | no | Allow users to register any application to use GitLab as an OAuth provider | | `after_sign_out_path` | string | no | Where to redirect users after logout | | `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes | @@ -93,7 +93,7 @@ Example response: "session_expire_delay": 10080, "default_project_visibility": 1, "default_snippet_visibility": 0, - "restricted_signup_domains": [], + "domain_whitelist": [], "user_oauth_applications": true, "after_sign_out_path": "", "container_registry_token_expire_delay": 5, diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index fac35ec964d..6ee7b3cfeeb 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -359,7 +359,7 @@ restrict the sign-up e-mail domains of a GitLab instance to `*.example.com` and `example.net`, you would do something like this: ```bash -curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -d "restricted_signup_domains[]=*.example.com" -d "restricted_signup_domains[]=example.net" https://gitlab.example.com/api/v3/application/settings +curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -d "domain_whitelist[]=*.example.com" -d "domain_whitelist[]=example.net" https://gitlab.example.com/api/v3/application/settings ``` [cURL]: http://curl.haxx.se/ "cURL website" diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 4cd388658be..ec9a56afde8 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -412,7 +412,7 @@ module API expose :default_project_visibility expose :default_snippet_visibility expose :default_group_visibility - expose :restricted_signup_domains + expose :domain_whitelist expose :domain_blacklist_enabled expose :domain_blacklist expose :user_oauth_applications diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb index ffc1814b29d..735331df66c 100644 --- a/lib/gitlab/current_settings.rb +++ b/lib/gitlab/current_settings.rb @@ -39,7 +39,7 @@ module Gitlab session_expire_delay: Settings.gitlab['session_expire_delay'], default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'], default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'], - restricted_signup_domains: Settings.gitlab['restricted_signup_domains'], + domain_whitelist: Settings.gitlab['domain_whitelist'], import_sources: %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project], shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'], max_artifacts_size: Settings.artifacts['max_size'], diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index ebcd9b0f947..a780c04abde 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -54,23 +54,23 @@ describe ApplicationSetting, models: true do context 'restricted signup domains' do it 'set single domain' do - setting.restricted_signup_domains_raw = 'example.com' - expect(setting.restricted_signup_domains).to eq(['example.com']) + setting.domain_whitelist_raw = 'example.com' + expect(setting.domain_whitelist).to eq(['example.com']) end it 'set multiple domains with spaces' do - setting.restricted_signup_domains_raw = 'example.com *.example.com' - expect(setting.restricted_signup_domains).to eq(['example.com', '*.example.com']) + setting.domain_whitelist_raw = 'example.com *.example.com' + expect(setting.domain_whitelist).to eq(['example.com', '*.example.com']) end it 'set multiple domains with newlines and a space' do - setting.restricted_signup_domains_raw = "example.com\n *.example.com" - expect(setting.restricted_signup_domains).to eq(['example.com', '*.example.com']) + setting.domain_whitelist_raw = "example.com\n *.example.com" + expect(setting.domain_whitelist).to eq(['example.com', '*.example.com']) end it 'set multiple domains with commas' do - setting.restricted_signup_domains_raw = "example.com, *.example.com" - expect(setting.restricted_signup_domains).to eq(['example.com', '*.example.com']) + setting.domain_whitelist_raw = "example.com, *.example.com" + expect(setting.domain_whitelist).to eq(['example.com', '*.example.com']) end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 5f130234df1..41e531c684b 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -91,7 +91,7 @@ describe User, models: true do describe 'email' do context 'when no signup domains whitelisted' do before do - allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return([]) + allow_any_instance_of(ApplicationSetting).to receive(:domain_whitelist).and_return([]) end it 'accepts any email' do @@ -102,7 +102,7 @@ describe User, models: true do context 'when a signup domain is whitelisted and subdomains are allowed' do before do - allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['example.com', '*.example.com']) + allow_any_instance_of(ApplicationSetting).to receive(:domain_whitelist).and_return(['example.com', '*.example.com']) end it 'accepts info@example.com' do @@ -123,7 +123,7 @@ describe User, models: true do context 'when a signup domain is whitelisted and subdomains are not allowed' do before do - allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['example.com']) + allow_any_instance_of(ApplicationSetting).to receive(:domain_whitelist).and_return(['example.com']) end it 'accepts info@example.com' do @@ -163,7 +163,7 @@ describe User, models: true do context 'when a signup domain is black listed but a wildcard subdomain is allowed' do before do allow_any_instance_of(ApplicationSetting).to receive(:domain_blacklist).and_return(['test.example.com']) - allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['*.example.com']) + allow_any_instance_of(ApplicationSetting).to receive(:domain_whitelist).and_return(['*.example.com']) end it 'should give priority to whitelist and allow info@test.example.com' do @@ -174,7 +174,7 @@ describe User, models: true do context 'with both lists containing a domain' do before do - allow_any_instance_of(ApplicationSetting).to receive(:restricted_signup_domains).and_return(['test.com']) + allow_any_instance_of(ApplicationSetting).to receive(:domain_whitelist).and_return(['test.com']) end it 'accepts info@test.com' do -- cgit v1.2.1 From 23afb02aaa957dd1a5ce35a141e4e8ecd80052ca Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Sat, 16 Jul 2016 11:44:50 -0500 Subject: Refactor `match_domain` to a predicate: `domain_matches?` --- app/models/user.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 6932e750fe0..516934c295c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -865,7 +865,7 @@ class User < ActiveRecord::Base if current_application_settings.domain_blacklist_enabled? blocked_domains = current_application_settings.domain_blacklist - if match_domain(blocked_domains, self.email) + if domain_matches?(blocked_domains, self.email) error = 'is not from an allowed domain.' valid = false end @@ -873,7 +873,7 @@ class User < ActiveRecord::Base allowed_domains = current_application_settings.domain_whitelist unless allowed_domains.blank? - if match_domain(allowed_domains, self.email) + if domain_matches?(allowed_domains, self.email) valid = true else error = "is not whitelisted. Email domains valid for registration are: #{allowed_domains.join(', ')}" @@ -886,7 +886,7 @@ class User < ActiveRecord::Base valid end - def match_domain(email_domains, email) + def domain_matches?(email_domains, email) signup_domain = Mail::Address.new(email).domain email_domains.any? do |domain| escaped = Regexp.escape(domain).gsub('\*', '.*?') -- cgit v1.2.1 From 6b8eceda395ae25b7ea189627b04da1f223c57d7 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Mon, 18 Jul 2016 17:49:33 -0500 Subject: Default to manual input for `domain_whitelist`, syntax fixes and added new tests. --- app/assets/javascripts/admin.js.coffee | 3 +-- app/models/application_setting.rb | 2 +- app/views/admin/application_settings/_form.html.haml | 8 ++++---- spec/fixtures/blacklist.txt | 3 --- spec/fixtures/domain_blacklist.txt | 3 +++ spec/models/application_setting_spec.rb | 12 +++++++++++- spec/models/user_spec.rb | 4 ++-- 7 files changed, 22 insertions(+), 13 deletions(-) delete mode 100644 spec/fixtures/blacklist.txt create mode 100644 spec/fixtures/domain_blacklist.txt diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee index 4dd30973d11..d5d34e6eca6 100644 --- a/app/assets/javascripts/admin.js.coffee +++ b/app/assets/javascripts/admin.js.coffee @@ -46,7 +46,6 @@ class @Admin else $('.blacklist-file').hide() $('.blacklist-raw').show() - return - $('input[name=\'blacklist_type\']').click showBlacklistType + $("input[name='blacklist_type']").click showBlacklistType showBlacklistType() diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index d923b4d5235..8c19d9dc9c8 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -71,7 +71,7 @@ class ApplicationSetting < ActiveRecord::Base inclusion: { in: %w(ssh http), allow_blank: true, allow_nil: true } validates :domain_blacklist, - presence: true, + presence: { message: 'Domain blacklist cannot be empty if Blacklist is enabled.' }, if: :domain_blacklist_enabled? validates_each :restricted_visibility_levels do |record, attr, value| diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 35fea2d8fa9..23b52d08df7 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -125,7 +125,7 @@ .form-group = f.label :domain_whitelist, 'Whitelisted domains for sign-ups', class: 'control-label col-sm-2' .col-sm-10 - = f.text_area :domain_whitelist_raw, placeholder: 'domain.com', class: 'form-control' + = f.text_area :domain_whitelist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8 .help-block ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com .form-group = f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'control-label col-sm-2' @@ -138,12 +138,12 @@ .col-sm-offset-2.col-sm-10 .radio = label_tag :blacklist_type_file do - = radio_button_tag :blacklist_type, :file, @application_setting.domain_blacklist.blank? + = radio_button_tag :blacklist_type, :file .option-title Upload blacklist file .radio = label_tag :blacklist_type_raw do - = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? + = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank? .option-title Enter blacklist manually .form-group.blacklist-file @@ -154,7 +154,7 @@ .form-group.blacklist-raw = f.label :domain_blacklist, 'Blacklisted domains for sign-ups', class: 'control-label col-sm-2' .col-sm-10 - = f.text_area :domain_blacklist_raw, placeholder: 'domain.com', class: 'form-control', rows: 10 + = f.text_area :domain_blacklist_raw, placeholder: 'domain.com', class: 'form-control', rows: 8 .help-block Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com .form-group diff --git a/spec/fixtures/blacklist.txt b/spec/fixtures/blacklist.txt deleted file mode 100644 index baeb11eda9a..00000000000 --- a/spec/fixtures/blacklist.txt +++ /dev/null @@ -1,3 +0,0 @@ -example.com -test.com -foo.bar \ No newline at end of file diff --git a/spec/fixtures/domain_blacklist.txt b/spec/fixtures/domain_blacklist.txt new file mode 100644 index 00000000000..baeb11eda9a --- /dev/null +++ b/spec/fixtures/domain_blacklist.txt @@ -0,0 +1,3 @@ +example.com +test.com +foo.bar \ No newline at end of file diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index a780c04abde..fb040ba82bc 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -95,8 +95,18 @@ describe ApplicationSetting, models: true do expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com') end + it 'set multiple domains with semicolon' do + setting.domain_blacklist_raw = "example.com; *.example.com" + expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com') + end + + it 'set multiple domains with mixture of everything' do + setting.domain_blacklist_raw = "example.com; *.example.com\n test.com\sblock.com yes.com" + expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com', 'test.com', 'block.com', 'yes.com') + end + it 'set multiple domain with file' do - setting.domain_blacklist_file = File.open(Rails.root.join('spec/fixtures/', 'blacklist.txt')) + setting.domain_blacklist_file = File.open(Rails.root.join('spec/fixtures/', 'domain_blacklist.txt')) expect(setting.domain_blacklist).to contain_exactly('example.com', 'test.com', 'foo.bar') end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 41e531c684b..8dacd1db447 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -148,7 +148,7 @@ describe User, models: true do allow_any_instance_of(ApplicationSetting).to receive(:domain_blacklist).and_return(['example.com']) end - context 'when a signup domain is black listed' do + context 'when a signup domain is blacklisted' do it 'accepts info@test.com' do user = build(:user, email: 'info@test.com') expect(user).to be_valid @@ -160,7 +160,7 @@ describe User, models: true do end end - context 'when a signup domain is black listed but a wildcard subdomain is allowed' do + context 'when a signup domain is blacklisted but a wildcard subdomain is allowed' do before do allow_any_instance_of(ApplicationSetting).to receive(:domain_blacklist).and_return(['test.example.com']) allow_any_instance_of(ApplicationSetting).to receive(:domain_whitelist).and_return(['*.example.com']) -- cgit v1.2.1 From 4be1adea21a5994be948b42a04cb20ecd3714db1 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Mon, 18 Jul 2016 17:57:19 -0500 Subject: Removed escaping characters by using double quotes. --- app/assets/javascripts/admin.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee index d5d34e6eca6..90c09619f8c 100644 --- a/app/assets/javascripts/admin.js.coffee +++ b/app/assets/javascripts/admin.js.coffee @@ -40,7 +40,7 @@ class @Admin Turbolinks.visit(location.href) showBlacklistType = -> - if $('input[name=\'blacklist_type\']:checked').val() == 'file' + if $("input[name='blacklist_type']:checked").val() == 'file' $('.blacklist-file').show() $('.blacklist-raw').hide() else -- cgit v1.2.1 From c7ffc71224dd8e1ce42372c9310bbcc937a00d2c Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Fri, 15 Jul 2016 02:02:09 +0300 Subject: Revert "Refactored .prev and .next methods" This reverts commit ec37d9553274e3bca58e4de44b932cdc72a37325. --- app/assets/javascripts/files_comment_button.js.coffee | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/files_comment_button.js.coffee b/app/assets/javascripts/files_comment_button.js.coffee index db0bf7082a9..2b9dc6419d5 100644 --- a/app/assets/javascripts/files_comment_button.js.coffee +++ b/app/assets/javascripts/files_comment_button.js.coffee @@ -7,7 +7,6 @@ class @FilesCommentButton UNFOLDABLE_LINE_CLASS = 'js-unfold' EMPTY_CELL_CLASS = 'empty-cell' OLD_LINE_CLASS = 'old_line' - NEW_CLASS = 'new' LINE_COLUMN_CLASSES = ".#{LINE_NUMBER_CLASS}, .line_content" TEXT_FILE_SELECTOR = '.text-file' DEBOUNCE_TIMEOUT_DURATION = 100 @@ -64,20 +63,17 @@ class @FilesCommentButton getLineContent: (hoveredElement) -> return hoveredElement if hoveredElement.hasClass LINE_CONTENT_CLASS - $(".#{LINE_CONTENT_CLASS + @diffTypeClass hoveredElement}", hoveredElement.parent()) + $(hoveredElement).next ".#{LINE_CONTENT_CLASS}" getButtonParent: (hoveredElement) -> if @VIEW_TYPE is 'inline' return hoveredElement if hoveredElement.hasClass OLD_LINE_CLASS - $(".#{OLD_LINE_CLASS}", hoveredElement.parent()) + hoveredElement.parent().find ".#{OLD_LINE_CLASS}" else return hoveredElement if hoveredElement.hasClass LINE_NUMBER_CLASS - $(".#{LINE_NUMBER_CLASS + @diffTypeClass hoveredElement}", hoveredElement.parent()) - - diffTypeClass: (hoveredElement) -> - if hoveredElement.hasClass(NEW_CLASS) then '.new' else '.old' + $(hoveredElement).prev ".#{LINE_NUMBER_CLASS}" isMovingToSameType: (e) -> newButtonParent = @getButtonParent $(e.toElement) -- cgit v1.2.1 From 159135291af0066b6c1fdbae04e2f05a785986aa Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Fri, 15 Jul 2016 02:15:32 +0300 Subject: Fix inline view for comment button selector. --- app/assets/javascripts/files_comment_button.js.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/files_comment_button.js.coffee b/app/assets/javascripts/files_comment_button.js.coffee index 2b9dc6419d5..63d453fa411 100644 --- a/app/assets/javascripts/files_comment_button.js.coffee +++ b/app/assets/javascripts/files_comment_button.js.coffee @@ -63,7 +63,10 @@ class @FilesCommentButton getLineContent: (hoveredElement) -> return hoveredElement if hoveredElement.hasClass LINE_CONTENT_CLASS - $(hoveredElement).next ".#{LINE_CONTENT_CLASS}" + if @VIEW_TYPE is 'inline' + return $(hoveredElement).closest(LINE_HOLDER_CLASS).find ".#{LINE_CONTENT_CLASS}" + else + return $(hoveredElement).next ".#{LINE_CONTENT_CLASS}" getButtonParent: (hoveredElement) -> if @VIEW_TYPE is 'inline' -- cgit v1.2.1 From 4d302859a2504689318c409a82844b046b61b08c Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Fri, 15 Jul 2016 03:05:50 +0300 Subject: Off mouse listener from document for diff comment button. --- app/assets/javascripts/files_comment_button.js.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/files_comment_button.js.coffee b/app/assets/javascripts/files_comment_button.js.coffee index 63d453fa411..5ab82c39fcd 100644 --- a/app/assets/javascripts/files_comment_button.js.coffee +++ b/app/assets/javascripts/files_comment_button.js.coffee @@ -17,6 +17,8 @@ class @FilesCommentButton debounce = _.debounce @render, DEBOUNCE_TIMEOUT_DURATION $(document) + .off 'mouseover', LINE_COLUMN_CLASSES + .off 'mouseleave', LINE_COLUMN_CLASSES .on 'mouseover', LINE_COLUMN_CLASSES, debounce .on 'mouseleave', LINE_COLUMN_CLASSES, @destroy @@ -64,7 +66,7 @@ class @FilesCommentButton return hoveredElement if hoveredElement.hasClass LINE_CONTENT_CLASS if @VIEW_TYPE is 'inline' - return $(hoveredElement).closest(LINE_HOLDER_CLASS).find ".#{LINE_CONTENT_CLASS}" + return $(hoveredElement).closest(LINE_HOLDER_CLASS).find ".#{LINE_CONTENT_CLASS}" else return $(hoveredElement).next ".#{LINE_CONTENT_CLASS}" -- cgit v1.2.1 From baeaad566f1db7dcc9fc2fcaba30020702554095 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Mon, 18 Jul 2016 20:11:55 +0300 Subject: Updated CHANGELOG. --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 7bf2c7a5587..bb186f5f263 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -111,6 +111,7 @@ v 8.10.0 (unreleased) - Optimistic locking for Issues and Merge Requests (Title and description overriding prevention) - Redesign Builds and Pipelines pages - Change status color and icon for running builds + - Fix commenting issue in side by side diff view for unchanged lines - Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.` - Project export filename now includes the project and namespace path - Fix last update timestamp on issues not preserved on gitlab.com and project imports -- cgit v1.2.1 From 501ce37f838205cfd588eed47d57ca4a90c68e51 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 18 Jul 2016 17:06:49 +0300 Subject: Fix of 'Commits being passed to custom hooks are already reachable when using the UI' --- CHANGELOG | 2 + app/models/repository.rb | 72 ++++++++++++++--------------------- app/services/create_branch_service.rb | 28 +++++++------- 3 files changed, 43 insertions(+), 59 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1b35a67832c..56b7d2a485f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,6 @@ Please view this file on the master branch, on stable branches it's out of date. +v 8.11.0 (unreleased) + - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' v 8.10.0 (unreleased) - Fix profile activity heatmap to show correct day name (eanplatter) diff --git a/app/models/repository.rb b/app/models/repository.rb index 09487b62f98..c187bad39ad 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -704,6 +704,7 @@ class Repository options[:commit] = { message: message, branch: ref, + update_ref: false, } raw_repository.mkdir(path, options) @@ -719,6 +720,7 @@ class Repository options[:commit] = { message: message, branch: ref, + update_ref: false, } options[:file] = { @@ -739,7 +741,8 @@ class Repository options[:author] = committer options[:commit] = { message: message, - branch: ref + branch: ref, + update_ref: false, } options[:file] = { @@ -779,11 +782,10 @@ class Repository merge_index = rugged.merge_commits(our_commit, their_commit) return false if merge_index.conflicts? - commit_with_hooks(user, merge_request.target_branch) do |tmp_ref| + commit_with_hooks(user, merge_request.target_branch) do actual_options = options.merge( parents: [our_commit, their_commit], tree: merge_index.write_tree(rugged), - update_ref: tmp_ref ) commit_id = Rugged::Commit.create(rugged, actual_options) @@ -798,15 +800,14 @@ class Repository return false unless revert_tree_id - commit_with_hooks(user, base_branch) do |ref| + commit_with_hooks(user, base_branch) do committer = user_to_committer(user) source_sha = Rugged::Commit.create(rugged, message: commit.revert_message, author: committer, committer: committer, tree: revert_tree_id, - parents: [rugged.lookup(source_sha)], - update_ref: ref) + parents: [rugged.lookup(source_sha)]) end end @@ -816,7 +817,7 @@ class Repository return false unless cherry_pick_tree_id - commit_with_hooks(user, base_branch) do |ref| + commit_with_hooks(user, base_branch) do committer = user_to_committer(user) source_sha = Rugged::Commit.create(rugged, message: commit.message, @@ -827,8 +828,7 @@ class Repository }, committer: committer, tree: cherry_pick_tree_id, - parents: [rugged.lookup(source_sha)], - update_ref: ref) + parents: [rugged.lookup(source_sha)]) end end @@ -929,20 +929,6 @@ class Repository Gitlab::Popen.popen(args, path_to_repo) end - def with_tmp_ref(oldrev = nil) - random_string = SecureRandom.hex - tmp_ref = "refs/tmp/#{random_string}/head" - - if oldrev && !Gitlab::Git.blank_ref?(oldrev) - rugged.references.create(tmp_ref, oldrev) - end - - # Make commit in tmp ref - yield(tmp_ref) - ensure - rugged.references.delete(tmp_ref) rescue nil - end - def commit_with_hooks(current_user, branch) update_autocrlf_option @@ -955,33 +941,31 @@ class Repository oldrev = target_branch.target end - with_tmp_ref(oldrev) do |tmp_ref| - # Make commit in tmp ref - newrev = yield(tmp_ref) + # Make commit + newrev = yield(ref) - unless newrev - raise CommitError.new('Failed to create commit') - end + unless newrev + raise CommitError.new('Failed to create commit') + end + + GitHooksService.new.execute(current_user, path_to_repo, oldrev, newrev, ref) do + if was_empty || !target_branch + # Create branch + rugged.references.create(ref, newrev) + else + # Update head + current_head = find_branch(branch).target - GitHooksService.new.execute(current_user, path_to_repo, oldrev, newrev, ref) do - if was_empty || !target_branch - # Create branch - rugged.references.create(ref, newrev) + # Make sure target branch was not changed during pre-receive hook + if current_head == oldrev + rugged.references.update(ref, newrev) else - # Update head - current_head = find_branch(branch).target - - # Make sure target branch was not changed during pre-receive hook - if current_head == oldrev - rugged.references.update(ref, newrev) - else - raise CommitError.new('Commit was rejected because branch received new push') - end + raise CommitError.new('Commit was rejected because branch received new push') end end - - newrev end + + newrev end def ls_files(ref) diff --git a/app/services/create_branch_service.rb b/app/services/create_branch_service.rb index d874582d54f..757fc35a78f 100644 --- a/app/services/create_branch_service.rb +++ b/app/services/create_branch_service.rb @@ -15,21 +15,19 @@ class CreateBranchService < BaseService return error('Branch already exists') end - new_branch = nil - - if source_project != @project - repository.with_tmp_ref do |tmp_ref| - repository.fetch_ref( - source_project.repository.path_to_repo, - "refs/heads/#{ref}", - tmp_ref - ) - - new_branch = repository.add_branch(current_user, branch_name, tmp_ref) - end - else - new_branch = repository.add_branch(current_user, branch_name, ref) - end + new_branch = if source_project != @project + repository.fetch_ref( + source_project.repository.path_to_repo, + "refs/heads/#{ref}", + "refs/heads/#{branch_name}" + ) + + repository.after_create_branch + + repository.find_branch(branch_name) + else + repository.add_branch(current_user, branch_name, ref) + end if new_branch success(new_branch) -- cgit v1.2.1 From f17679dbcddd72a03e96c718223bb40cf72bca36 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 19 Jul 2016 09:00:56 +0300 Subject: Update MAINTENANCE.md with our latest policy [ci skip] --- MAINTENANCE.md | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/MAINTENANCE.md b/MAINTENANCE.md index d3d36670693..1efb2a35f6d 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -1,15 +1,35 @@ # GitLab Maintenance Policy -GitLab is a fast moving and evolving project. We currently don't have the resources to support many releases concurrently. We support exactly one stable release at any given time. +GitLab follows the [Semantic Versioning](http://semver.org/) for its releases: +`(Major).(Minor).(Patch)` in a [pragmatic way]. -GitLab follows the [Semantic Versioning](http://semver.org/) for its releases: `(Major).(Minor).(Patch)` in a [pragmatic way](https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e). +- **Major version**: Whenever there is something significant or any backwards + incompatible changes are introduced to the public API. +- **Minor version**: When new, backwards compatible functionality is introduced + to the public API or a minor feature is introduced, or when a set of smaller + features is rolled out. +- **Patch number**: When backwards compatible bug fixes are introduced that fix + incorrect behavior. -- **Major version**: Whenever there is something significant or any backwards incompatible changes are introduced to the public API. -- **Minor version**: When new, backwards compatible functionality is introduced to the public API or a minor feature is introduced, or when a set of smaller features is rolled out. -- **Patch number**: When backwards compatible bug fixes are introduced that fix incorrect behavior. +The current stable release will receive security patches and bug fixes +(eg. `8.9.0` -> `8.9.1`). Feature releases will mark the next supported stable +release where the minor version is increased numerically by increments of one +(eg. `8.9 -> 8.10`). -The current stable release will receive security patches and bug fixes (eg. `5.0` -> `5.0.1`). Feature releases will mark the next supported stable release where the minor version is increased numerically by increments of one (eg. `5.0 -> 5.1`). +Our current policy is to support one stable release at any given time, but for +medium-level security issues, we may consider [backporting to the previous two +monthly releases][rel-sec]. -We encourage everyone to run the latest stable release to ensure that you can easily upgrade to the most secure and feature rich GitLab experience. In order to make sure you can easily run the most recent stable release, we are working hard to keep the update process simple and reliable. +We encourage everyone to run the latest stable release to ensure that you can +easily upgrade to the most secure and feature-rich GitLab experience. In order +to make sure you can easily run the most recent stable release, we are working +hard to keep the update process simple and reliable. -More information about the release procedures can be found in the doc/release directory. +More information about the release procedures can be found in our +[release-tools documentation][rel]. You may also want to read our +[Responsible Disclosure Policy][disclosure]. + +[rel-sec]: https://gitlab.com/gitlab-org/release-tools/blob/master/doc/security.md#backporting +[rel]: https://gitlab.com/gitlab-org/release-tools/blob/master/doc/ +[disclosure]: https://about.gitlab.com/disclosure/ +[pragmatic way]: https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e -- cgit v1.2.1 From bf1ea8c6fe34abe7bde8913f6a6d88eff4d77fc3 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Fri, 1 Jul 2016 13:03:37 +0200 Subject: Squashed - fix encoding issue WIP - trying to replicate UTF-8 error fix spec fixing encoding issue and another spec, to do with MR diffs fix issue and spec failure Add changelog and bumped up I/E version fix spec based on feedback - omitted target project --- CHANGELOG | 1 + app/models/merge_request_diff.rb | 9 +++++++++ lib/gitlab/import_export.rb | 2 +- lib/gitlab/import_export/import_export.yml | 6 +++++- lib/gitlab/import_export/relation_factory.rb | 5 +++++ spec/lib/gitlab/import_export/project.json | 18 +++++++++--------- .../gitlab/import_export/project_tree_restorer_spec.rb | 7 +++++++ .../gitlab/import_export/project_tree_saver_spec.rb | 9 +++++++-- 8 files changed, 44 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 56b7d2a485f..0192c593288 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -125,6 +125,7 @@ v 8.10.0 (unreleased) - Allow empty repositories on project import/export - Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska) - Allow bulk (un)subscription from issues in issue index + - Fix MR diff encoding issues exporting GitLab projects v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index feaba925bad..3f520c8f3ff 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -1,6 +1,7 @@ class MergeRequestDiff < ActiveRecord::Base include Sortable include Importable + include EncodingHelper # Prevent store of diff if commits amount more then 500 COMMITS_SAFE_SIZE = 100 @@ -211,6 +212,14 @@ class MergeRequestDiff < ActiveRecord::Base branch_base_commit.try(:sha) end + def utf8_st_diffs + st_diffs.map do |diff| + diff.each do |k, v| + diff[k] = encode_utf8(v) if v.respond_to?(:encoding) + end + end + end + # # #save or #update_attributes providing changes on serialized attributes do a lot of # serialization and deserialization calls resulting in bad performance. diff --git a/lib/gitlab/import_export.rb b/lib/gitlab/import_export.rb index bab2ea73c4f..d6d14bd98a0 100644 --- a/lib/gitlab/import_export.rb +++ b/lib/gitlab/import_export.rb @@ -2,7 +2,7 @@ module Gitlab module ImportExport extend self - VERSION = '0.1.1' + VERSION = '0.1.2' FILENAME_LIMIT = 50 def export_path(relative_path:) diff --git a/lib/gitlab/import_export/import_export.yml b/lib/gitlab/import_export/import_export.yml index 05f4ad527ac..15afe8174a4 100644 --- a/lib/gitlab/import_export/import_export.yml +++ b/lib/gitlab/import_export/import_export.yml @@ -53,7 +53,11 @@ included_attributes: excluded_attributes: snippets: - :expired_at + merge_request_diff: + - :st_diffs methods: statuses: - - :type \ No newline at end of file + - :type + merge_request_diff: + - :utf8_st_diffs \ No newline at end of file diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb index 6ba25a31641..e41c7e6bf4f 100644 --- a/lib/gitlab/import_export/relation_factory.rb +++ b/lib/gitlab/import_export/relation_factory.rb @@ -33,6 +33,7 @@ module Gitlab update_project_references reset_ci_tokens if @relation_name == 'Ci::Trigger' @relation_hash['data'].deep_symbolize_keys! if @relation_name == :events && @relation_hash['data'] + set_st_diffs if @relation_name == :merge_request_diff generate_imported_object end @@ -129,6 +130,10 @@ module Gitlab def parsed_relation_hash @relation_hash.reject { |k, _v| !relation_class.attribute_method?(k) } end + + def set_st_diffs + @relation_hash['st_diffs'] = @relation_hash.delete('utf8_st_diffs') + end end end end diff --git a/spec/lib/gitlab/import_export/project.json b/spec/lib/gitlab/import_export/project.json index 4113d829c3c..b1a5d72c624 100644 --- a/spec/lib/gitlab/import_export/project.json +++ b/spec/lib/gitlab/import_export/project.json @@ -2765,7 +2765,7 @@ "committer_email": "dmitriy.zaporozhets@gmail.com" } ], - "st_diffs": [ + "utf8_st_diffs": [ { "diff": "Binary files a/.DS_Store and /dev/null differ\n", "new_path": ".DS_Store", @@ -3138,7 +3138,7 @@ "committer_email": "dmitriy.zaporozhets@gmail.com" } ], - "st_diffs": [ + "utf8_st_diffs": [ { "diff": "--- /dev/null\n+++ b/files/ruby/feature.rb\n@@ -0,0 +1,5 @@\n+class Feature\n+ def foo\n+ puts 'bar'\n+ end\n+end\n", "new_path": "files/ruby/feature.rb", @@ -3423,7 +3423,7 @@ "committer_email": "james@jameslopez.es" } ], - "st_diffs": [ + "utf8_st_diffs": [ { "diff": "--- /dev/null\n+++ b/test\n", "new_path": "test", @@ -3960,7 +3960,7 @@ "committer_email": "dmitriy.zaporozhets@gmail.com" } ], - "st_diffs": [ + "utf8_st_diffs": [ { "diff": "Binary files a/.DS_Store and /dev/null differ\n", "new_path": ".DS_Store", @@ -4597,7 +4597,7 @@ "committer_email": "marmis85@gmail.com" } ], - "st_diffs": [ + "utf8_st_diffs": [ { "diff": "--- a/CHANGELOG\n+++ b/CHANGELOG\n@@ -1,4 +1,6 @@\n-v 6.7.0\n+v6.8.0\n+\n+v6.7.0\n - Add support for Gemnasium as a Project Service (Olivier Gonzalez)\n - Add edit file button to MergeRequest diff\n - Public groups (Jason Hollingsworth)\n", "new_path": "CHANGELOG", @@ -5108,7 +5108,7 @@ "committer_email": "stanhu@packetzoom.com" } ], - "st_diffs": [ + "utf8_st_diffs": [ { "diff": "--- a/CHANGELOG\n+++ b/CHANGELOG\n@@ -1,4 +1,6 @@\n-v 6.7.0\n+v6.8.0\n+\n+v6.7.0\n - Add support for Gemnasium as a Project Service (Olivier Gonzalez)\n - Add edit file button to MergeRequest diff\n - Public groups (Jason Hollingsworth)\n", "new_path": "CHANGELOG", @@ -5434,7 +5434,7 @@ "id": 11, "state": "empty", "st_commits": null, - "st_diffs": [ + "utf8_st_diffs": [ ], "merge_request_id": 11, @@ -5961,7 +5961,7 @@ "committer_email": "dmitriy.zaporozhets@gmail.com" } ], - "st_diffs": [ + "utf8_st_diffs": [ { "diff": "Binary files a/.DS_Store and /dev/null differ\n", "new_path": ".DS_Store", @@ -6400,7 +6400,7 @@ "committer_email": "james@jameslopez.es" } ], - "st_diffs": [ + "utf8_st_diffs": [ { "diff": "--- /dev/null\n+++ b/test\n", "new_path": "test", diff --git a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb index 877be300262..6ae20c943b1 100644 --- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do describe 'restore project tree' do + let(:user) { create(:user) } let(:namespace) { create(:namespace, owner: user) } let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: "", project_path: 'path') } @@ -53,6 +54,12 @@ describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do expect(event.note.noteable.project).not_to be_nil end end + + it 'has the correct data for merge request st_diffs' do + # makes sure we are renaming the custom method +utf8_st_diffs+ into +st_diffs+ + + expect { restored_project_json }.to change(MergeRequestDiff.where.not(st_diffs: nil), :count).by(9) + end end end end diff --git a/spec/lib/gitlab/import_export/project_tree_saver_spec.rb b/spec/lib/gitlab/import_export/project_tree_saver_spec.rb index 1424de9e60b..057ef6e76a0 100644 --- a/spec/lib/gitlab/import_export/project_tree_saver_spec.rb +++ b/spec/lib/gitlab/import_export/project_tree_saver_spec.rb @@ -102,12 +102,17 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do it 'has ci pipeline notes' do expect(saved_project_json['pipelines'].first['notes']).not_to be_empty end + + it 'does not complain about non UTF-8 characters in MR diffs' do + ActiveRecord::Base.connection.execute("UPDATE merge_request_diffs SET st_diffs = '---\n- :diff: !binary |-\n LS0tIC9kZXYvbnVsbAorKysgYi9pbWFnZXMvbnVjb3IucGRmCkBAIC0wLDAg\n KzEsMTY3OSBAQAorJVBERi0xLjUNJeLjz9MNCisxIDAgb2JqDTw8L01ldGFk\n YXR'") + + expect(project_tree_saver.save).to be true + end end end def setup_project issue = create(:issue, assignee: user) - merge_request = create(:merge_request) label = create(:label) snippet = create(:project_snippet) release = create(:release) @@ -115,12 +120,12 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do project = create(:project, :public, issues: [issue], - merge_requests: [merge_request], labels: [label], snippets: [snippet], releases: [release] ) + merge_request = create(:merge_request, source_project: project) commit_status = create(:commit_status, project: project) ci_pipeline = create(:ci_pipeline, -- cgit v1.2.1 From 54d26c89f66abb2bfec7403fd6b3ed7700e73766 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Tue, 12 Jul 2016 16:31:55 +0200 Subject: API: Expose 'developers_can_push' for branches --- CHANGELOG | 1 + doc/api/branches.md | 14 ++++++--- lib/api/branches.rb | 12 ++++++-- lib/api/entities.rb | 10 ++++-- lib/api/helpers.rb | 7 +++++ spec/requests/api/api_helpers_spec.rb | 23 ++++++++++++++ spec/requests/api/branches_spec.rb | 57 +++++++++++++++++++++++++++++++++-- 7 files changed, 114 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 56b7d2a485f..e30b61c40a4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,6 +57,7 @@ v 8.10.0 (unreleased) - API: Expose `due_date` for issues (Robert Schilling) - API: Todos !3188 (Robert Schilling) - API: Expose shared groups for projects and shared projects for groups !5050 (Robert Schilling) + - API: Expose 'developers_can_push' for branches !5208 (Robert Schilling) - Add "Enabled Git access protocols" to Application Settings - Diffs will create button/diff form on demand no on server side - Reduce size of HTML used by diff comment forms diff --git a/doc/api/branches.md b/doc/api/branches.md index abc4732c395..e5a1e12ffb9 100644 --- a/doc/api/branches.md +++ b/doc/api/branches.md @@ -23,6 +23,7 @@ Example response: { "name": "master", "protected": true, + "developers_can_push": false, "commit": { "author_email": "john@example.com", "author_name": "John Smith", @@ -64,6 +65,7 @@ Example response: { "name": "master", "protected": true, + "developers_can_push": false, "commit": { "author_email": "john@example.com", "author_name": "John Smith", @@ -91,13 +93,14 @@ PUT /projects/:id/repository/branches/:branch/protect ``` ```bash -curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/protect +curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/protect?developers_can_push=true ``` | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `id` | integer | yes | The ID of a project | | `branch` | string | yes | The name of the branch | +| `developers_can_push` | boolean | no | Flag if developers can push to the branch | Example response: @@ -117,7 +120,8 @@ Example response: ] }, "name": "master", - "protected": true + "protected": true, + "developers_can_push": true } ``` @@ -158,7 +162,8 @@ Example response: ] }, "name": "master", - "protected": false + "protected": false, + "developers_can_push": false } ``` @@ -196,7 +201,8 @@ Example response: ] }, "name": "newbranch", - "protected": false + "protected": false, + "developers_can_push": false } ``` diff --git a/lib/api/branches.rb b/lib/api/branches.rb index d467eb9d474..cd33091d9f4 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -36,6 +36,7 @@ module API # Parameters: # id (required) - The ID of a project # branch (required) - The name of the branch + # developers_can_push (optional) - Flag if developers can push to that branch # Example Request: # PUT /projects/:id/repository/branches/:branch/protect put ':id/repository/branches/:branch/protect', @@ -43,9 +44,16 @@ module API authorize_admin_project @branch = user_project.repository.find_branch(params[:branch]) - not_found!("Branch") unless @branch + not_found!('Branch') unless @branch protected_branch = user_project.protected_branches.find_by(name: @branch.name) - user_project.protected_branches.create(name: @branch.name) unless protected_branch + developers_can_push = to_boolean(params[:developers_can_push]) + + if protected_branch + protected_branch.update(developers_can_push: developers_can_push) unless developers_can_push.nil? + else + user_project.protected_branches.create(name: @branch.name, + developers_can_push: developers_can_push || false) + end present @branch, with: Entities::RepoObject, project: user_project end diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 3c79a00eb8c..e4ae5adafd6 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -125,9 +125,15 @@ module API end end - expose :protected do |repo, options| + expose :protected do |repo_obj, options| if options[:project] - options[:project].protected_branch? repo.name + options[:project].protected_branch? repo_obj.name + end + end + + expose :developers_can_push do |repo_obj, options| + if options[:project] + options[:project].developers_can_push_to_protected_branch? repo_obj.name end end end diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 73557cf7db6..d6e4eb2afd7 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -9,6 +9,13 @@ module API [ true, 1, '1', 't', 'T', 'true', 'TRUE', 'on', 'ON' ].include?(value) end + def to_boolean(value) + return true if value =~ /^(true|t|yes|y|1|on)$/i + return false if value =~ /^(false|f|no|n|0|off)$/i + + nil + end + def find_user_by_private_token token_string = (params[PRIVATE_TOKEN_PARAM] || env[PRIVATE_TOKEN_HEADER]).to_s User.find_by_authentication_token(token_string) || User.find_by_personal_access_token(token_string) diff --git a/spec/requests/api/api_helpers_spec.rb b/spec/requests/api/api_helpers_spec.rb index 3d5c19aeff3..831889afb6c 100644 --- a/spec/requests/api/api_helpers_spec.rb +++ b/spec/requests/api/api_helpers_spec.rb @@ -211,4 +211,27 @@ describe API::Helpers, api: true do expect(sudo_identifier).to eq(' 123') end end + + describe '.to_boolean' do + it 'converts a valid string to a boolean' do + expect(to_boolean('true')).to be_truthy + expect(to_boolean('YeS')).to be_truthy + expect(to_boolean('t')).to be_truthy + expect(to_boolean('1')).to be_truthy + expect(to_boolean('ON')).to be_truthy + expect(to_boolean('FaLse')).to be_falsy + expect(to_boolean('F')).to be_falsy + expect(to_boolean('NO')).to be_falsy + expect(to_boolean('n')).to be_falsy + expect(to_boolean('0')).to be_falsy + expect(to_boolean('oFF')).to be_falsy + end + + it 'converts an invalid string to nil' do + expect(to_boolean('fals')).to be_nil + expect(to_boolean('yeah')).to be_nil + expect(to_boolean('')).to be_nil + expect(to_boolean(nil)).to be_nil + end + end end diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index b11ca26ee68..c843e8cf7be 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -32,6 +32,7 @@ describe API::API, api: true do expect(json_response['name']).to eq(branch_name) expect(json_response['commit']['id']).to eq(branch_sha) expect(json_response['protected']).to eq(false) + expect(json_response['developers_can_push']).to eq(false) end it "should return a 403 error if guest" do @@ -45,14 +46,66 @@ describe API::API, api: true do end end - describe "PUT /projects/:id/repository/branches/:branch/protect" do - it "should protect a single branch" do + describe 'PUT /projects/:id/repository/branches/:branch/protect' do + it 'protects a single branch' do put api("/projects/#{project.id}/repository/branches/#{branch_name}/protect", user) + expect(response).to have_http_status(200) + expect(json_response['name']).to eq(branch_name) + expect(json_response['commit']['id']).to eq(branch_sha) + expect(json_response['protected']).to eq(true) + expect(json_response['developers_can_push']).to eq(false) + end + + it 'protects a single branch and developers can push' do + put api("/projects/#{project.id}/repository/branches/#{branch_name}/protect", user), + developers_can_push: true + expect(response).to have_http_status(200) expect(json_response['name']).to eq(branch_name) expect(json_response['commit']['id']).to eq(branch_sha) expect(json_response['protected']).to eq(true) + expect(json_response['developers_can_push']).to eq(true) + end + + it 'protects a single branch and developers cannot push' do + put api("/projects/#{project.id}/repository/branches/#{branch_name}/protect", user), + developers_can_push: 'tru' + + expect(response).to have_http_status(200) + expect(json_response['name']).to eq(branch_name) + expect(json_response['commit']['id']).to eq(branch_sha) + expect(json_response['protected']).to eq(true) + expect(json_response['developers_can_push']).to eq(false) + end + + context 'on a protected branch' do + let(:protected_branch) { 'foo' } + + before do + project.repository.add_branch(user, protected_branch, 'master') + create(:protected_branch, project: project, name: protected_branch, developers_can_push: true) + end + + it 'updates that a developer can push' do + put api("/projects/#{project.id}/repository/branches/#{protected_branch}/protect", user), + developers_can_push: false + + expect(response).to have_http_status(200) + expect(json_response['name']).to eq(protected_branch) + expect(json_response['protected']).to eq(true) + expect(json_response['developers_can_push']).to eq(false) + end + + it 'does not update that a developer can push' do + put api("/projects/#{project.id}/repository/branches/#{protected_branch}/protect", user), + developers_can_push: 'foobar' + + expect(response).to have_http_status(200) + expect(json_response['name']).to eq(protected_branch) + expect(json_response['protected']).to eq(true) + expect(json_response['developers_can_push']).to eq(true) + end end it "should return a 404 error if branch not found" do -- cgit v1.2.1 From e552b4af26b68a8b4bedc775a128a8ecd59ff689 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Tue, 19 Jul 2016 10:36:18 +0200 Subject: API: Expose 'developers_can_merge' for branches --- CHANGELOG | 2 +- doc/api/branches.md | 14 +++++++++---- lib/api/branches.rb | 6 +++++- lib/api/entities.rb | 6 ++++++ spec/requests/api/branches_spec.rb | 40 +++++++++++++++++++++++++++++++++----- 5 files changed, 57 insertions(+), 11 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e30b61c40a4..2892631560b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,7 +57,7 @@ v 8.10.0 (unreleased) - API: Expose `due_date` for issues (Robert Schilling) - API: Todos !3188 (Robert Schilling) - API: Expose shared groups for projects and shared projects for groups !5050 (Robert Schilling) - - API: Expose 'developers_can_push' for branches !5208 (Robert Schilling) + - API: Expose `developers_can_push` and `developers_can_merge` for branches !5208 (Robert Schilling) - Add "Enabled Git access protocols" to Application Settings - Diffs will create button/diff form on demand no on server side - Reduce size of HTML used by diff comment forms diff --git a/doc/api/branches.md b/doc/api/branches.md index e5a1e12ffb9..dbe8306c66f 100644 --- a/doc/api/branches.md +++ b/doc/api/branches.md @@ -24,6 +24,7 @@ Example response: "name": "master", "protected": true, "developers_can_push": false, + "developers_can_merge": false, "commit": { "author_email": "john@example.com", "author_name": "John Smith", @@ -66,6 +67,7 @@ Example response: "name": "master", "protected": true, "developers_can_push": false, + "developers_can_merge": false, "commit": { "author_email": "john@example.com", "author_name": "John Smith", @@ -93,7 +95,7 @@ PUT /projects/:id/repository/branches/:branch/protect ``` ```bash -curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/protect?developers_can_push=true +curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/repository/branches/master/protect?developers_can_push=true&developers_can_merge=true ``` | Attribute | Type | Required | Description | @@ -101,6 +103,7 @@ curl -X PUT -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/ | `id` | integer | yes | The ID of a project | | `branch` | string | yes | The name of the branch | | `developers_can_push` | boolean | no | Flag if developers can push to the branch | +| `developers_can_merge` | boolean | no | Flag if developers can merge to the branch | Example response: @@ -121,7 +124,8 @@ Example response: }, "name": "master", "protected": true, - "developers_can_push": true + "developers_can_push": true, + "developers_can_merge": true } ``` @@ -163,7 +167,8 @@ Example response: }, "name": "master", "protected": false, - "developers_can_push": false + "developers_can_push": false, + "developers_can_merge": false } ``` @@ -202,7 +207,8 @@ Example response: }, "name": "newbranch", "protected": false, - "developers_can_push": false + "developers_can_push": false, + "developers_can_merge": false } ``` diff --git a/lib/api/branches.rb b/lib/api/branches.rb index cd33091d9f4..b77eebc729a 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -37,6 +37,7 @@ module API # id (required) - The ID of a project # branch (required) - The name of the branch # developers_can_push (optional) - Flag if developers can push to that branch + # developers_can_merge (optional) - Flag if developers can merge to that branch # Example Request: # PUT /projects/:id/repository/branches/:branch/protect put ':id/repository/branches/:branch/protect', @@ -47,12 +48,15 @@ module API not_found!('Branch') unless @branch protected_branch = user_project.protected_branches.find_by(name: @branch.name) developers_can_push = to_boolean(params[:developers_can_push]) + developers_can_merge = to_boolean(params[:developers_can_merge]) if protected_branch protected_branch.update(developers_can_push: developers_can_push) unless developers_can_push.nil? + protected_branch.update(developers_can_merge: developers_can_merge) unless developers_can_merge.nil? else user_project.protected_branches.create(name: @branch.name, - developers_can_push: developers_can_push || false) + developers_can_push: developers_can_push || false, + developers_can_merge: developers_can_merge || false) end present @branch, with: Entities::RepoObject, project: user_project diff --git a/lib/api/entities.rb b/lib/api/entities.rb index e4ae5adafd6..d6fed1a1eed 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -136,6 +136,12 @@ module API options[:project].developers_can_push_to_protected_branch? repo_obj.name end end + + expose :developers_can_merge do |repo_obj, options| + if options[:project] + options[:project].developers_can_merge_to_protected_branch? repo_obj.name + end + end end class RepoTreeObject < Grape::Entity diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index c843e8cf7be..719da27f919 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -33,6 +33,7 @@ describe API::API, api: true do expect(json_response['commit']['id']).to eq(branch_sha) expect(json_response['protected']).to eq(false) expect(json_response['developers_can_push']).to eq(false) + expect(json_response['developers_can_merge']).to eq(false) end it "should return a 403 error if guest" do @@ -55,6 +56,7 @@ describe API::API, api: true do expect(json_response['commit']['id']).to eq(branch_sha) expect(json_response['protected']).to eq(true) expect(json_response['developers_can_push']).to eq(false) + expect(json_response['developers_can_merge']).to eq(false) end it 'protects a single branch and developers can push' do @@ -66,17 +68,43 @@ describe API::API, api: true do expect(json_response['commit']['id']).to eq(branch_sha) expect(json_response['protected']).to eq(true) expect(json_response['developers_can_push']).to eq(true) + expect(json_response['developers_can_merge']).to eq(false) end - it 'protects a single branch and developers cannot push' do + it 'protects a single branch and developers can merge' do put api("/projects/#{project.id}/repository/branches/#{branch_name}/protect", user), - developers_can_push: 'tru' + developers_can_merge: true expect(response).to have_http_status(200) expect(json_response['name']).to eq(branch_name) expect(json_response['commit']['id']).to eq(branch_sha) expect(json_response['protected']).to eq(true) expect(json_response['developers_can_push']).to eq(false) + expect(json_response['developers_can_merge']).to eq(true) + end + + it 'protects a single branch and developers can push and merge' do + put api("/projects/#{project.id}/repository/branches/#{branch_name}/protect", user), + developers_can_push: true, developers_can_merge: true + + expect(response).to have_http_status(200) + expect(json_response['name']).to eq(branch_name) + expect(json_response['commit']['id']).to eq(branch_sha) + expect(json_response['protected']).to eq(true) + expect(json_response['developers_can_push']).to eq(true) + expect(json_response['developers_can_merge']).to eq(true) + end + + it 'protects a single branch and developers cannot push and merge' do + put api("/projects/#{project.id}/repository/branches/#{branch_name}/protect", user), + developers_can_push: 'tru', developers_can_merge: 'tr' + + expect(response).to have_http_status(200) + expect(json_response['name']).to eq(branch_name) + expect(json_response['commit']['id']).to eq(branch_sha) + expect(json_response['protected']).to eq(true) + expect(json_response['developers_can_push']).to eq(false) + expect(json_response['developers_can_merge']).to eq(false) end context 'on a protected branch' do @@ -84,27 +112,29 @@ describe API::API, api: true do before do project.repository.add_branch(user, protected_branch, 'master') - create(:protected_branch, project: project, name: protected_branch, developers_can_push: true) + create(:protected_branch, project: project, name: protected_branch, developers_can_push: true, developers_can_merge: true) end it 'updates that a developer can push' do put api("/projects/#{project.id}/repository/branches/#{protected_branch}/protect", user), - developers_can_push: false + developers_can_push: false, developers_can_merge: false expect(response).to have_http_status(200) expect(json_response['name']).to eq(protected_branch) expect(json_response['protected']).to eq(true) expect(json_response['developers_can_push']).to eq(false) + expect(json_response['developers_can_merge']).to eq(false) end it 'does not update that a developer can push' do put api("/projects/#{project.id}/repository/branches/#{protected_branch}/protect", user), - developers_can_push: 'foobar' + developers_can_push: 'foobar', developers_can_merge: 'foo' expect(response).to have_http_status(200) expect(json_response['name']).to eq(protected_branch) expect(json_response['protected']).to eq(true) expect(json_response['developers_can_push']).to eq(true) + expect(json_response['developers_can_merge']).to eq(true) end end -- cgit v1.2.1 From 3e281f95907686ba4a923b8825dc32afb22df038 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Tue, 19 Jul 2016 11:33:47 +0200 Subject: Only update once --- lib/api/branches.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/api/branches.rb b/lib/api/branches.rb index b77eebc729a..35efe4f2e4a 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -51,8 +51,9 @@ module API developers_can_merge = to_boolean(params[:developers_can_merge]) if protected_branch - protected_branch.update(developers_can_push: developers_can_push) unless developers_can_push.nil? - protected_branch.update(developers_can_merge: developers_can_merge) unless developers_can_merge.nil? + protected_branch.developers_can_push = developers_can_push unless developers_can_push.nil? + protected_branch.developers_can_merge = developers_can_merge unless developers_can_merge.nil? + protected_branch.save else user_project.protected_branches.create(name: @branch.name, developers_can_push: developers_can_push || false, -- cgit v1.2.1 From 2532ec9edcf9a961c2020c7180c24ec44a8b8308 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Jul 2016 12:36:44 +0200 Subject: Allow to pull code with deploy key from public projects --- CHANGELOG | 1 + lib/gitlab/git_access.rb | 1 + spec/lib/gitlab/git_access_spec.rb | 72 ++++++++++++++++++++++++++++++++------ 3 files changed, 63 insertions(+), 11 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0192c593288..70d5155c8e1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -24,6 +24,7 @@ v 8.10.0 (unreleased) - Escape file extension when parsing search results !5141 (winniehell) - Apply the trusted_proxies config to the rack request object for use with rack_attack - Upgrade to Rails 4.2.7. !5236 + - Allow to pull code with deploy key from public projects - Add Sidekiq queue duration to transaction metrics. - Add a new column `artifacts_size` to table `ci_builds` !4964 - Let Workhorse serve format-patch diffs diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index 308f23bc9bc..8e8f39d9cb2 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -110,6 +110,7 @@ module Gitlab def deploy_key_can_read_project? if deploy_key + return true if project.public? deploy_key.projects.include?(project) else false diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index db33c7a22bb..ae064a878b0 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -44,12 +44,12 @@ describe Gitlab::GitAccess, lib: true do end describe 'download_access_check' do + subject { access.check('git-upload-pack') } + describe 'master permissions' do before { project.team << [user, :master] } context 'pull code' do - subject { access.download_access_check } - it { expect(subject.allowed?).to be_truthy } end end @@ -58,8 +58,6 @@ describe Gitlab::GitAccess, lib: true do before { project.team << [user, :guest] } context 'pull code' do - subject { access.download_access_check } - it { expect(subject.allowed?).to be_falsey } end end @@ -71,16 +69,12 @@ describe Gitlab::GitAccess, lib: true do end context 'pull code' do - subject { access.download_access_check } - it { expect(subject.allowed?).to be_falsey } end end describe 'without acccess to project' do context 'pull code' do - subject { access.download_access_check } - it { expect(subject.allowed?).to be_falsey } end end @@ -90,10 +84,31 @@ describe Gitlab::GitAccess, lib: true do let(:actor) { key } context 'pull code' do - before { key.projects << project } - subject { access.download_access_check } + context 'when project is authorized' do + before { key.projects << project } - it { expect(subject.allowed?).to be_truthy } + it { expect(subject).to be_allowed } + end + + context 'when unauthorized' do + context 'from public project' do + let(:project) { create(:project, :public) } + + it { expect(subject).to be_allowed } + end + + context 'from internal project' do + let(:project) { create(:project, :internal) } + + it { expect(subject).not_to be_allowed } + end + + context 'from private project' do + let(:project) { create(:project, :internal) } + + it { expect(subject).not_to be_allowed } + end + end end end end @@ -240,5 +255,40 @@ describe Gitlab::GitAccess, lib: true do run_permission_checks(permissions_matrix.deep_merge(developer: { push_protected_branch: true, push_all: true, merge_into_protected_branch: true })) end end + + describe 'deploy key permissions' do + let(:key) { create(:deploy_key) } + let(:actor) { key } + + context 'push code' do + subject { access.check('git-receive-pack') } + + context 'when project is authorized' do + before { key.projects << project } + + it { expect(subject).not_to be_allowed } + end + + context 'when unauthorized' do + context 'to public project' do + let(:project) { create(:project, :public) } + + it { expect(subject).not_to be_allowed } + end + + context 'to internal project' do + let(:project) { create(:project, :internal) } + + it { expect(subject).not_to be_allowed } + end + + context 'to private project' do + let(:project) { create(:project, :internal) } + + it { expect(subject).not_to be_allowed } + end + end + end + end end end -- cgit v1.2.1 From 5c69043e7534fdb04d62b7e1f7efe72de9b33b5e Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 19 Jul 2016 12:03:27 +0100 Subject: fixes commit_file test on repository_spec --- spec/models/repository_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index d55fd36548a..110df6bbd22 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -130,17 +130,17 @@ describe Repository, models: true do end end - describe :create_file do + describe :commit_file do it 'commits change to a file successfully' do expect do - repository.commit_file(user, 'LICENSE', 'Copyright!', - 'Updates filename', + repository.commit_file(user, 'CHANGELOG', 'Changelog!', + 'Updates file content', 'master', true) end.to change { repository.commits('master').count }.by(1) - blob = Blob.decorate(repository.blob_at(repository.commits('master').first.id, 'LICENSE')) + blob = repository.blob_at('master', 'CHANGELOG') - expect(blob.data).to eq('Copyright!') + expect(blob.data).to eq('Changelog!') end end -- cgit v1.2.1 From 76771c294694bb7bae02778c30ad3c4aff27b782 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Fri, 15 Jul 2016 16:03:31 +0200 Subject: squashed - added avatar saver/restorer and specs added spec for avatar saver avatar saver! added avatar restorer spec fix spec added avatar restorer class fix export service fix warnings, added changelog fix spec some refactoring based on feedback fixed a few issues after testing i/e avatar --- CHANGELOG | 1 + .../projects/import_export/export_service.rb | 6 ++++- app/uploaders/avatar_uploader.rb | 4 +++ lib/gitlab/import_export/avatar_restorer.rb | 31 ++++++++++++++++++++++ lib/gitlab/import_export/avatar_saver.rb | 31 ++++++++++++++++++++++ lib/gitlab/import_export/command_line_util.rb | 9 +++++++ lib/gitlab/import_export/importer.rb | 6 ++++- lib/gitlab/import_export/uploads_saver.rb | 8 ++---- .../gitlab/import_export/avatar_restorer_spec.rb | 25 +++++++++++++++++ spec/lib/gitlab/import_export/avatar_saver_spec.rb | 27 +++++++++++++++++++ 10 files changed, 140 insertions(+), 8 deletions(-) create mode 100644 lib/gitlab/import_export/avatar_restorer.rb create mode 100644 lib/gitlab/import_export/avatar_saver.rb create mode 100644 spec/lib/gitlab/import_export/avatar_restorer_spec.rb create mode 100644 spec/lib/gitlab/import_export/avatar_saver_spec.rb diff --git a/CHANGELOG b/CHANGELOG index 9f3a9cad83f..3f7e06b6955 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -127,6 +127,7 @@ v 8.10.0 (unreleased) - Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska) - Allow bulk (un)subscription from issues in issue index - Fix MR diff encoding issues exporting GitLab projects + - Export and import avatar as part of project import/export v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 diff --git a/app/services/projects/import_export/export_service.rb b/app/services/projects/import_export/export_service.rb index 998789d64d2..06252c7b625 100644 --- a/app/services/projects/import_export/export_service.rb +++ b/app/services/projects/import_export/export_service.rb @@ -9,7 +9,7 @@ module Projects private def save_all - if [version_saver, project_tree_saver, uploads_saver, repo_saver, wiki_repo_saver].all?(&:save) + if [version_saver, avatar_saver, project_tree_saver, uploads_saver, repo_saver, wiki_repo_saver].all?(&:save) Gitlab::ImportExport::Saver.save(project: project, shared: @shared) notify_success else @@ -21,6 +21,10 @@ module Projects Gitlab::ImportExport::VersionSaver.new(shared: @shared) end + def avatar_saver + Gitlab::ImportExport::AvatarSaver.new(project: project, shared: @shared) + end + def project_tree_saver Gitlab::ImportExport::ProjectTreeSaver.new(project: project, shared: @shared) end diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb index 6135c3ad96f..03d9329a14e 100644 --- a/app/uploaders/avatar_uploader.rb +++ b/app/uploaders/avatar_uploader.rb @@ -14,4 +14,8 @@ class AvatarUploader < CarrierWave::Uploader::Base def reset_events_cache(file) model.reset_events_cache if model.is_a?(User) end + + def exists? + model.avatar.file && model.avatar.file.exists? + end end diff --git a/lib/gitlab/import_export/avatar_restorer.rb b/lib/gitlab/import_export/avatar_restorer.rb new file mode 100644 index 00000000000..352539eb594 --- /dev/null +++ b/lib/gitlab/import_export/avatar_restorer.rb @@ -0,0 +1,31 @@ +module Gitlab + module ImportExport + class AvatarRestorer + + def initialize(project:, shared:) + @project = project + @shared = shared + end + + def restore + return true unless avatar_export_file + + @project.avatar = File.open(avatar_export_file) + @project.save! + rescue => e + @shared.error(e) + false + end + + private + + def avatar_export_file + @avatar_export_file ||= Dir["#{avatar_export_path}/*"].first + end + + def avatar_export_path + File.join(@shared.export_path, 'avatar') + end + end + end +end diff --git a/lib/gitlab/import_export/avatar_saver.rb b/lib/gitlab/import_export/avatar_saver.rb new file mode 100644 index 00000000000..998c21e2586 --- /dev/null +++ b/lib/gitlab/import_export/avatar_saver.rb @@ -0,0 +1,31 @@ +module Gitlab + module ImportExport + class AvatarSaver + include Gitlab::ImportExport::CommandLineUtil + + def initialize(project:, shared:) + @project = project + @shared = shared + end + + def save + return true unless @project.avatar.exists? + + copy_files(avatar_path, avatar_export_path) + rescue => e + @shared.error(e) + false + end + + private + + def avatar_export_path + File.join(@shared.export_path, 'avatar', @project.avatar_identifier) + end + + def avatar_path + @project.avatar.path + end + end + end +end diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb index 2249904145c..5dd0e34c18e 100644 --- a/lib/gitlab/import_export/command_line_util.rb +++ b/lib/gitlab/import_export/command_line_util.rb @@ -36,6 +36,15 @@ module Gitlab def git_bin_path Gitlab.config.git.bin_path end + + def copy_files(source, destination) + # if we are copying files, create the destination folder + destination_folder = File.file?(source) ? File.dirname(destination) : destination + + FileUtils.mkdir_p(destination_folder) + FileUtils.copy_entry(source, destination) + true + end end end end diff --git a/lib/gitlab/import_export/importer.rb b/lib/gitlab/import_export/importer.rb index 6b69a653f12..e9ee47fc090 100644 --- a/lib/gitlab/import_export/importer.rb +++ b/lib/gitlab/import_export/importer.rb @@ -9,7 +9,7 @@ module Gitlab end def execute - if import_file && check_version! && [project_tree, repo_restorer, wiki_restorer, uploads_restorer].all?(&:restore) + if import_file && check_version! && [project_tree, avatar_restorer, repo_restorer, wiki_restorer, uploads_restorer].all?(&:restore) project_tree.restored_project else raise Projects::ImportService::Error.new(@shared.errors.join(', ')) @@ -35,6 +35,10 @@ module Gitlab project: @project) end + def avatar_restorer + Gitlab::ImportExport::AvatarRestorer.new(project: project_tree.restored_project, shared: @shared) + end + def repo_restorer Gitlab::ImportExport::RepoRestorer.new(path_to_bundle: repo_path, shared: @shared, diff --git a/lib/gitlab/import_export/uploads_saver.rb b/lib/gitlab/import_export/uploads_saver.rb index d6f4fa57510..62a2553675c 100644 --- a/lib/gitlab/import_export/uploads_saver.rb +++ b/lib/gitlab/import_export/uploads_saver.rb @@ -1,6 +1,8 @@ module Gitlab module ImportExport class UploadsSaver + include Gitlab::ImportExport::CommandLineUtil + def initialize(project:, shared:) @project = project @shared = shared @@ -17,12 +19,6 @@ module Gitlab private - def copy_files(source, destination) - FileUtils.mkdir_p(destination) - FileUtils.copy_entry(source, destination) - true - end - def uploads_export_path File.join(@shared.export_path, 'uploads') end diff --git a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb new file mode 100644 index 00000000000..15131c0653e --- /dev/null +++ b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper' + +describe Gitlab::ImportExport::AvatarRestorer, lib: true do + let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: 'test') } + let(:project) { create(:empty_project) } + + before do + allow_any_instance_of(described_class).to receive(:avatar_export_path) + .and_return(Rails.root + "spec/fixtures/dk.png") + end + + after do + project.remove_avatar! + end + + it 'restores a project avatar' do + expect(described_class.new(project: project, shared: shared).restore).to be true + end + + it 'saves the avatar into the project' do + described_class.new(project: project, shared: shared).restore + + expect(project.reload.avatar.file.exists?).to be true + end +end diff --git a/spec/lib/gitlab/import_export/avatar_saver_spec.rb b/spec/lib/gitlab/import_export/avatar_saver_spec.rb new file mode 100644 index 00000000000..d6ee94442cb --- /dev/null +++ b/spec/lib/gitlab/import_export/avatar_saver_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper' + +describe Gitlab::ImportExport::AvatarSaver, lib: true do + let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: 'test') } + let(:export_path) { "#{Dir::tmpdir}/project_tree_saver_spec" } + let(:project_with_avatar) { create(:empty_project, avatar: fixture_file_upload(Rails.root + "spec/fixtures/dk.png", "image/png")) } + let(:project) { create(:empty_project) } + + before do + FileUtils.mkdir_p("#{shared.export_path}/avatar/") + allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path) + end + + after do + FileUtils.rm_rf("#{shared.export_path}/avatar") + end + + it 'saves a project avatar' do + described_class.new(project: project_with_avatar, shared: shared).save + + expect(File).to exist("#{shared.export_path}/avatar/dk.png") + end + + it 'is fine not to have an avatar' do + expect(described_class.new(project: project, shared: shared).save).to be true + end +end -- cgit v1.2.1 From baa9ce848070e76ebec12322f938ac8ec7178cf0 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Tue, 19 Jul 2016 13:05:56 +0200 Subject: Return the number of marked todos --- doc/api/todos.md | 152 +--------------------------------------- lib/api/todos.rb | 2 +- spec/requests/api/todos_spec.rb | 3 +- 3 files changed, 4 insertions(+), 153 deletions(-) diff --git a/doc/api/todos.md b/doc/api/todos.md index 23f6e35f2a4..937c71de386 100644 --- a/doc/api/todos.md +++ b/doc/api/todos.md @@ -277,8 +277,7 @@ Example Response: ## Mark all todos as done -Marks all pending todos for the current user as done. All todos marked as done -are returned in the response. +Marks all pending todos for the current user as done. It returns the number of marked todos. ``` DELETE /todos @@ -291,154 +290,7 @@ curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.c Example Response: ```json -[ - { - "id": 102, - "project": { - "id": 2, - "name": "Gitlab Ce", - "name_with_namespace": "Gitlab Org / Gitlab Ce", - "path": "gitlab-ce", - "path_with_namespace": "gitlab-org/gitlab-ce" - }, - "author": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/u/root" - }, - "action_name": "marked", - "target_type": "MergeRequest", - "target": { - "id": 34, - "iid": 7, - "project_id": 2, - "title": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "description": "Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.", - "state": "opened", - "created_at": "2016-06-17T07:49:24.419Z", - "updated_at": "2016-06-17T07:52:43.484Z", - "target_branch": "tutorials_git_tricks", - "source_branch": "DNSBL_docs", - "upvotes": 0, - "downvotes": 0, - "author": { - "name": "Maxie Medhurst", - "username": "craig_rutherford", - "id": 12, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon", - "web_url": "https://gitlab.example.com/u/craig_rutherford" - }, - "assignee": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/u/root" - }, - "source_project_id": 2, - "target_project_id": 2, - "labels": [], - "work_in_progress": false, - "milestone": { - "id": 32, - "iid": 2, - "project_id": 2, - "title": "v1.0", - "description": "Assumenda placeat ea voluptatem voluptate qui.", - "state": "active", - "created_at": "2016-06-17T07:47:34.163Z", - "updated_at": "2016-06-17T07:47:34.163Z", - "due_date": null - }, - "merge_when_build_succeeds": false, - "merge_status": "cannot_be_merged", - "subscribed": true, - "user_notes_count": 7 - }, - "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7", - "body": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "state": "done", - "created_at": "2016-06-17T07:52:35.225Z" - }, - { - "id": 98, - "project": { - "id": 2, - "name": "Gitlab Ce", - "name_with_namespace": "Gitlab Org / Gitlab Ce", - "path": "gitlab-ce", - "path_with_namespace": "gitlab-org/gitlab-ce" - }, - "author": { - "name": "Maxie Medhurst", - "username": "craig_rutherford", - "id": 12, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon", - "web_url": "https://gitlab.example.com/u/craig_rutherford" - }, - "action_name": "assigned", - "target_type": "MergeRequest", - "target": { - "id": 34, - "iid": 7, - "project_id": 2, - "title": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "description": "Et ea et omnis illum cupiditate. Dolor aspernatur tenetur ducimus facilis est nihil. Quo esse cupiditate molestiae illo corrupti qui quidem dolor.", - "state": "opened", - "created_at": "2016-06-17T07:49:24.419Z", - "updated_at": "2016-06-17T07:52:43.484Z", - "target_branch": "tutorials_git_tricks", - "source_branch": "DNSBL_docs", - "upvotes": 0, - "downvotes": 0, - "author": { - "name": "Maxie Medhurst", - "username": "craig_rutherford", - "id": 12, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/a0d477b3ea21970ce6ffcbb817b0b435?s=80&d=identicon", - "web_url": "https://gitlab.example.com/u/craig_rutherford" - }, - "assignee": { - "name": "Administrator", - "username": "root", - "id": 1, - "state": "active", - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "https://gitlab.example.com/u/root" - }, - "source_project_id": 2, - "target_project_id": 2, - "labels": [], - "work_in_progress": false, - "milestone": { - "id": 32, - "iid": 2, - "project_id": 2, - "title": "v1.0", - "description": "Assumenda placeat ea voluptatem voluptate qui.", - "state": "active", - "created_at": "2016-06-17T07:47:34.163Z", - "updated_at": "2016-06-17T07:47:34.163Z", - "due_date": null - }, - "merge_when_build_succeeds": false, - "merge_status": "cannot_be_merged", - "subscribed": true, - "user_notes_count": 7 - }, - "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ce/merge_requests/7", - "body": "Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat.", - "state": "done", - "created_at": "2016-06-17T07:49:24.624Z" - }, -] +3 ``` [ce-3188]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3188 diff --git a/lib/api/todos.rb b/lib/api/todos.rb index 2a6bfa98ca4..26c24c3baff 100644 --- a/lib/api/todos.rb +++ b/lib/api/todos.rb @@ -75,7 +75,7 @@ module API todos = find_todos todos.each(&:done) - present paginate(Kaminari.paginate_array(todos)), with: Entities::Todo, current_user: current_user + todos.length end end end diff --git a/spec/requests/api/todos_spec.rb b/spec/requests/api/todos_spec.rb index 92a4fa216cd..3ccd0af652f 100644 --- a/spec/requests/api/todos_spec.rb +++ b/spec/requests/api/todos_spec.rb @@ -134,8 +134,7 @@ describe API::Todos, api: true do delete api('/todos', john_doe) expect(response.status).to eq(200) - expect(json_response).to be_an Array - expect(json_response.length).to eq(3) + expect(response.body).to eq('3') expect(pending_1.reload).to be_done expect(pending_2.reload).to be_done expect(pending_3.reload).to be_done -- cgit v1.2.1 From 499cdf1d19343c985b5a0f21f2333a1b45900b13 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 18 Jul 2016 14:11:36 +0200 Subject: Added Rake task for tracking deployments This simply inserts the current GitLab version in the "deployments" measurement. Fixes gitlab-com/infrastructure#98 --- CHANGELOG | 1 + doc/raketasks/maintenance.md | 19 +++++++++++++++++++ lib/tasks/gitlab/track_deployment.rake | 9 +++++++++ 3 files changed, 29 insertions(+) create mode 100644 lib/tasks/gitlab/track_deployment.rake diff --git a/CHANGELOG b/CHANGELOG index 94f212324f7..dedf6f97253 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -31,6 +31,7 @@ v 8.10.0 (unreleased) - Support U2F devices in Firefox. !5177 - Fix issue, preventing users w/o push access to sort tags !5105 (redetection) - Add Spring EmojiOne updates. + - Added Rake task for tracking deployments !5320 - Fix fetching LFS objects for private CI projects - Add syntax for multiline blockquote using `>>>` fence !3954 - Fix viewing notification settings when a project is pending deletion diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md index d9dce2af480..315cb56a089 100644 --- a/doc/raketasks/maintenance.md +++ b/doc/raketasks/maintenance.md @@ -167,3 +167,22 @@ of those assets. Unless you are modifying the JavaScript / CSS code on your production machine after installing the package, there should be no reason to redo rake assets:precompile on the production machine. If you suspect that assets have been corrupted, you should reinstall the omnibus package. + +## Tracking Deployments + +GitLab provides a Rake task that lets you track deployments in GitLab +Performance Monitoring. This Rake task simply stores the current GitLab version +in the GitLab Performance Monitoring database. + +For Omnibus-packages: + +``` +sudo gitlab-rake gitlab:track_deployment +``` + +For installations from source: + +``` +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:track_deployment RAILS_ENV=production +``` diff --git a/lib/tasks/gitlab/track_deployment.rake b/lib/tasks/gitlab/track_deployment.rake new file mode 100644 index 00000000000..84aa2e8507a --- /dev/null +++ b/lib/tasks/gitlab/track_deployment.rake @@ -0,0 +1,9 @@ +namespace :gitlab do + desc 'GitLab | Tracks a deployment in GitLab Performance Monitoring' + task track_deployment: :environment do + metric = Gitlab::Metrics::Metric. + new('deployments', version: Gitlab::VERSION) + + Gitlab::Metrics.submit_metrics([metric.to_hash]) + end +end -- cgit v1.2.1 From 3413f6fa50ec4275fac99b59d3fa44608141149c Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Tue, 19 Jul 2016 13:30:23 +0200 Subject: Simplify entities for branches and tags API --- lib/api/branches.rb | 12 +++++++----- lib/api/entities.rb | 51 ++++++++++++++------------------------------------- 2 files changed, 21 insertions(+), 42 deletions(-) diff --git a/lib/api/branches.rb b/lib/api/branches.rb index 35efe4f2e4a..66b853eb342 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -15,7 +15,8 @@ module API # GET /projects/:id/repository/branches get ":id/repository/branches" do branches = user_project.repository.branches.sort_by(&:name) - present branches, with: Entities::RepoObject, project: user_project + + present branches, with: Entities::RepoBranch, project: user_project end # Get a single branch @@ -28,7 +29,8 @@ module API get ':id/repository/branches/:branch', requirements: { branch: /.+/ } do @branch = user_project.repository.branches.find { |item| item.name == params[:branch] } not_found!("Branch") unless @branch - present @branch, with: Entities::RepoObject, project: user_project + + present @branch, with: Entities::RepoBranch, project: user_project end # Protect a single branch @@ -60,7 +62,7 @@ module API developers_can_merge: developers_can_merge || false) end - present @branch, with: Entities::RepoObject, project: user_project + present @branch, with: Entities::RepoBranch, project: user_project end # Unprotect a single branch @@ -79,7 +81,7 @@ module API protected_branch = user_project.protected_branches.find_by(name: @branch.name) protected_branch.destroy if protected_branch - present @branch, with: Entities::RepoObject, project: user_project + present @branch, with: Entities::RepoBranch, project: user_project end # Create branch @@ -97,7 +99,7 @@ module API if result[:status] == :success present result[:branch], - with: Entities::RepoObject, + with: Entities::RepoBranch, project: user_project else render_api_error!(result[:message], 400) diff --git a/lib/api/entities.rb b/lib/api/entities.rb index d6fed1a1eed..d7e74582459 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -114,33 +114,23 @@ module API end end - class RepoObject < Grape::Entity + class RepoBranch < Grape::Entity expose :name - expose :commit do |repo_obj, options| - if repo_obj.respond_to?(:commit) - repo_obj.commit - elsif options[:project] - options[:project].repository.commit(repo_obj.target) - end + expose :commit do |repo_branch, options| + options[:project].repository.commit(repo_branch.target) end - expose :protected do |repo_obj, options| - if options[:project] - options[:project].protected_branch? repo_obj.name - end + expose :protected do |repo_branch, options| + options[:project].protected_branch? repo_branch.name end - expose :developers_can_push do |repo_obj, options| - if options[:project] - options[:project].developers_can_push_to_protected_branch? repo_obj.name - end + expose :developers_can_push do |repo_branch, options| + options[:project].developers_can_push_to_protected_branch? repo_branch.name end - expose :developers_can_merge do |repo_obj, options| - if options[:project] - options[:project].developers_can_merge_to_protected_branch? repo_obj.name - end + expose :developers_can_merge do |repo_branch, options| + options[:project].developers_can_merge_to_protected_branch? repo_branch.name end end @@ -437,27 +427,14 @@ module API end class RepoTag < Grape::Entity - expose :name - expose :message do |repo_obj, _options| - if repo_obj.respond_to?(:message) - repo_obj.message - else - nil - end - end + expose :name, :message - expose :commit do |repo_obj, options| - if repo_obj.respond_to?(:commit) - repo_obj.commit - elsif options[:project] - options[:project].repository.commit(repo_obj.target) - end + expose :commit do |repo_tag, options| + options[:project].repository.commit(repo_tag.target) end - expose :release, using: Entities::Release do |repo_obj, options| - if options[:project] - options[:project].releases.find_by(tag: repo_obj.name) - end + expose :release, using: Entities::Release do |repo_tag, options| + options[:project].releases.find_by(tag: repo_tag.name) end end -- cgit v1.2.1 From d705537634e1bd94fb24108a8a35da0a0441a0ef Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 19 Jul 2016 13:27:11 +0100 Subject: Added redirect_to_referer to login link on issues Closes #19968 --- app/views/projects/notes/_notes_with_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/notes/_notes_with_form.html.haml b/app/views/projects/notes/_notes_with_form.html.haml index 56d302fab82..74538a9723e 100644 --- a/app/views/projects/notes/_notes_with_form.html.haml +++ b/app/views/projects/notes/_notes_with_form.html.haml @@ -14,9 +14,9 @@ .disabled-comment.text-center .disabled-comment-text.inline Please - = link_to "register",new_user_session_path + = link_to "register", new_session_path(:user, redirect_to_referer: 'yes') or - = link_to "login",new_user_session_path + = link_to "login", new_session_path(:user, redirect_to_referer: 'yes') to post a comment :javascript -- cgit v1.2.1 From 8bd7f6da6f50bd75a66e33ebe09536fd7f10bea6 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 13 Jul 2016 20:09:50 -0500 Subject: Remove builds settings from project settings; add builds settings route; add new controller action; put badge stuff under builds settings controller action --- app/controllers/projects/builds_controller.rb | 7 +- app/views/layouts/nav/_project_settings.html.haml | 4 + app/views/projects/_builds_settings.html.haml | 65 ---------------- app/views/projects/builds/settings.html.haml | 93 +++++++++++++++++++++++ app/views/projects/edit.html.haml | 2 - config/routes.rb | 3 +- 6 files changed, 105 insertions(+), 69 deletions(-) delete mode 100644 app/views/projects/_builds_settings.html.haml create mode 100644 app/views/projects/builds/settings.html.haml diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index d7513d75f01..b03a37d8148 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -1,5 +1,5 @@ class Projects::BuildsController < Projects::ApplicationController - before_action :build, except: [:index, :cancel_all] + before_action :build, except: [:index, :cancel_all, :settings] before_action :authorize_read_build!, except: [:cancel, :cancel_all, :retry] before_action :authorize_update_build!, except: [:index, :show, :status, :raw] layout 'project' @@ -27,6 +27,11 @@ class Projects::BuildsController < Projects::ApplicationController redirect_to namespace_project_builds_path(project.namespace, project) end + def settings + @ref = params[:ref] || @project.default_branch || 'master' + @build_badge = Gitlab::Badge::Build.new(@project, @ref) + end + def show @builds = @project.pipelines.find_by_sha(@build.sha).builds.order('id DESC') @builds = @builds.where("id not in (?)", @build.id) diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 51a54b4f262..020c3c47856 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -27,6 +27,10 @@ Protected Branches - if @project.builds_enabled? + = nav_link(controller: :builds) do + = link_to settings_namespace_project_builds_path(@project.namespace, @project), title: 'Builds' do + %span + Builds = nav_link(controller: :runners) do = link_to namespace_project_runners_path(@project.namespace, @project), title: 'Runners' do %span diff --git a/app/views/projects/_builds_settings.html.haml b/app/views/projects/_builds_settings.html.haml deleted file mode 100644 index fff30f11d82..00000000000 --- a/app/views/projects/_builds_settings.html.haml +++ /dev/null @@ -1,65 +0,0 @@ -%fieldset.builds-feature - %h5.prepend-top-0 - Builds - - unless @repository.gitlab_ci_yml - .form-group - %p Builds need to be configured before you can begin using Continuous Integration. - = link_to 'Get started with Builds', help_page_path('ci/quick_start/README'), class: 'btn btn-info' - .form-group - %p Get recent application code using the following command: - .radio - = f.label :build_allow_git_fetch_false do - = f.radio_button :build_allow_git_fetch, 'false' - %strong git clone - %br - %span.descr Slower but makes sure you have a clean dir before every build - .radio - = f.label :build_allow_git_fetch_true do - = f.radio_button :build_allow_git_fetch, 'true' - %strong git fetch - %br - %span.descr Faster - - .form-group - = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light' - = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0' - %p.help-block per build in minutes - .form-group - = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' - .input-group - %span.input-group-addon / - = f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered' - %span.input-group-addon / - %p.help-block - We will use this regular expression to find test coverage output in build trace. - Leave blank if you want to disable this feature - .bs-callout.bs-callout-info - %p Below are examples of regex for existing tools: - %ul - %li - Simplecov (Ruby) - - %code \(\d+.\d+\%\) covered - %li - pytest-cov (Python) - - %code \d+\%\s*$ - %li - phpunit --coverage-text --colors=never (PHP) - - %code ^\s*Lines:\s*\d+.\d+\% - %li - gcovr (C/C++) - - %code ^TOTAL.*\s+(\d+\%)$ - %li - tap --coverage-report=text-summary (Node.js) - - %code ^Statements\s*:\s*([^%]+) - - .form-group - .checkbox - = f.label :public_builds do - = f.check_box :public_builds - %strong Public builds - .help-block Allow everyone to access builds for Public and Internal projects - - .form-group.append-bottom-0 - = f.label :runners_token, "Runners token", class: 'label-light' - = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' - %p.help-block The secure token used to checkout project. diff --git a/app/views/projects/builds/settings.html.haml b/app/views/projects/builds/settings.html.haml new file mode 100644 index 00000000000..cb62990a790 --- /dev/null +++ b/app/views/projects/builds/settings.html.haml @@ -0,0 +1,93 @@ += form_for [@project.namespace.becomes(Namespace), @project], remote: true, authenticity_token: true do |f| + + %fieldset.builds-feature + %h5.prepend-top-0 + Builds + - unless @repository.gitlab_ci_yml + .form-group + %p Builds need to be configured before you can begin using Continuous Integration. + = link_to 'Get started with Builds', help_page_path('ci/quick_start/README'), class: 'btn btn-info' + .form-group + %p Get recent application code using the following command: + .radio + = f.label :build_allow_git_fetch_false do + = f.radio_button :build_allow_git_fetch, 'false' + %strong git clone + %br + %span.descr Slower but makes sure you have a clean dir before every build + .radio + = f.label :build_allow_git_fetch_true do + = f.radio_button :build_allow_git_fetch, 'true' + %strong git fetch + %br + %span.descr Faster + + .form-group + = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light' + = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0' + %p.help-block per build in minutes + .form-group + = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' + .input-group + %span.input-group-addon / + = f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered' + %span.input-group-addon / + %p.help-block + We will use this regular expression to find test coverage output in build trace. + Leave blank if you want to disable this feature + .bs-callout.bs-callout-info + %p Below are examples of regex for existing tools: + %ul + %li + Simplecov (Ruby) - + %code \(\d+.\d+\%\) covered + %li + pytest-cov (Python) - + %code \d+\%\s*$ + %li + phpunit --coverage-text --colors=never (PHP) - + %code ^\s*Lines:\s*\d+.\d+\% + %li + gcovr (C/C++) - + %code ^TOTAL.*\s+(\d+\%)$ + %li + tap --coverage-report=text-summary (Node.js) - + %code ^Statements\s*:\s*([^%]+) + + .form-group + .checkbox + = f.label :public_builds do + = f.check_box :public_builds + %strong Public builds + .help-block Allow everyone to access builds for Public and Internal projects + + .form-group.append-bottom-0 + = f.label :runners_token, "Runners token", class: 'label-light' + = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' + %p.help-block The secure token used to checkout project. + + = f.submit 'Save changes', class: "btn btn-save" + + +- badges_path = namespace_project_badges_path(@project.namespace, @project) + +.prepend-top-10 + .panel.panel-default + .panel-heading + %b Builds badge · + = @build_badge.to_html + .pull-right + = render 'shared/ref_switcher', destination: 'badges', align_right: true + .panel-body + .row + .col-md-2.text-center + Markdown + .col-md-10.code.js-syntax-highlight + = highlight('.md', @build_badge.to_markdown) + .row + %hr + .row + .col-md-2.text-center + HTML + .col-md-10.code.js-syntax-highlight + = highlight('.html', @build_badge.to_html) diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 57af167180b..cecad9c47a0 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -86,8 +86,6 @@ %hr = render 'merge_request_settings', f: f %hr - = render 'builds_settings', f: f - %hr %fieldset.features.append-bottom-default %h5.prepend-top-0 Project avatar diff --git a/config/routes.rb b/config/routes.rb index 3160fd767b8..d09c021dac7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -89,7 +89,7 @@ Rails.application.routes.draw do mount Grack::AuthSpawner, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\/(info\/lfs|gitlab-lfs)/.match(request.path_info) }, via: [:get, :post, :put] # Help - + get 'help' => 'help#index' get 'help/*path' => 'help#show', as: :help_page get 'help/shortcuts' @@ -744,6 +744,7 @@ Rails.application.routes.draw do resources :builds, only: [:index, :show], constraints: { id: /\d+/ } do collection do post :cancel_all + get :settings end member do -- cgit v1.2.1 From 5434080975321fa3eff0127f4a9197fa700a30ae Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 13 Jul 2016 20:14:26 -0500 Subject: Rename to CI Pipeline --- app/views/layouts/nav/_project_settings.html.haml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 020c3c47856..96725ff5e5a 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -27,10 +27,6 @@ Protected Branches - if @project.builds_enabled? - = nav_link(controller: :builds) do - = link_to settings_namespace_project_builds_path(@project.namespace, @project), title: 'Builds' do - %span - Builds = nav_link(controller: :runners) do = link_to namespace_project_runners_path(@project.namespace, @project), title: 'Runners' do %span @@ -43,7 +39,7 @@ = link_to namespace_project_triggers_path(@project.namespace, @project), title: 'Triggers' do %span Triggers - = nav_link(controller: :badges) do - = link_to namespace_project_badges_path(@project.namespace, @project), title: 'Badges' do + = nav_link(controller: :builds) do + = link_to settings_namespace_project_builds_path(@project.namespace, @project), title: 'CI Pipeline' do %span - Badges + CI Pipeline -- cgit v1.2.1 From be18faee02a79094c0cfab0fdd3a2a248f140010 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 13 Jul 2016 20:22:45 -0500 Subject: Align pipelines settings to match other settings pages --- app/views/projects/builds/settings.html.haml | 176 ++++++++++++++------------- 1 file changed, 93 insertions(+), 83 deletions(-) diff --git a/app/views/projects/builds/settings.html.haml b/app/views/projects/builds/settings.html.haml index cb62990a790..5a7cabbbcef 100644 --- a/app/views/projects/builds/settings.html.haml +++ b/app/views/projects/builds/settings.html.haml @@ -1,93 +1,103 @@ -= form_for [@project.namespace.becomes(Namespace), @project], remote: true, authenticity_token: true do |f| +- page_title "Pipelines Settings" - %fieldset.builds-feature +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + = page_title + .col-lg-9 %h5.prepend-top-0 Builds - - unless @repository.gitlab_ci_yml - .form-group - %p Builds need to be configured before you can begin using Continuous Integration. - = link_to 'Get started with Builds', help_page_path('ci/quick_start/README'), class: 'btn btn-info' - .form-group - %p Get recent application code using the following command: - .radio - = f.label :build_allow_git_fetch_false do - = f.radio_button :build_allow_git_fetch, 'false' - %strong git clone - %br - %span.descr Slower but makes sure you have a clean dir before every build - .radio - = f.label :build_allow_git_fetch_true do - = f.radio_button :build_allow_git_fetch, 'true' - %strong git fetch - %br - %span.descr Faster + = form_for [@project.namespace.becomes(Namespace), @project], remote: true, authenticity_token: true do |f| + %fieldset.builds-feature + - unless @repository.gitlab_ci_yml + .form-group + %p Builds need to be configured before you can begin using Continuous Integration. + = link_to 'Get started with Builds', help_page_path('ci/quick_start/README'), class: 'btn btn-info' + .form-group + %p Get recent application code using the following command: + .radio + = f.label :build_allow_git_fetch_false do + = f.radio_button :build_allow_git_fetch, 'false' + %strong git clone + %br + %span.descr Slower but makes sure you have a clean dir before every build + .radio + = f.label :build_allow_git_fetch_true do + = f.radio_button :build_allow_git_fetch, 'true' + %strong git fetch + %br + %span.descr Faster - .form-group - = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light' - = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0' - %p.help-block per build in minutes - .form-group - = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' - .input-group - %span.input-group-addon / - = f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered' - %span.input-group-addon / - %p.help-block - We will use this regular expression to find test coverage output in build trace. - Leave blank if you want to disable this feature - .bs-callout.bs-callout-info - %p Below are examples of regex for existing tools: - %ul - %li - Simplecov (Ruby) - - %code \(\d+.\d+\%\) covered - %li - pytest-cov (Python) - - %code \d+\%\s*$ - %li - phpunit --coverage-text --colors=never (PHP) - - %code ^\s*Lines:\s*\d+.\d+\% - %li - gcovr (C/C++) - - %code ^TOTAL.*\s+(\d+\%)$ - %li - tap --coverage-report=text-summary (Node.js) - - %code ^Statements\s*:\s*([^%]+) + .form-group + = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light' + = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0' + %p.help-block per build in minutes + .form-group + = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' + .input-group + %span.input-group-addon / + = f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered' + %span.input-group-addon / + %p.help-block + We will use this regular expression to find test coverage output in build trace. + Leave blank if you want to disable this feature + .bs-callout.bs-callout-info + %p Below are examples of regex for existing tools: + %ul + %li + Simplecov (Ruby) - + %code \(\d+.\d+\%\) covered + %li + pytest-cov (Python) - + %code \d+\%\s*$ + %li + phpunit --coverage-text --colors=never (PHP) - + %code ^\s*Lines:\s*\d+.\d+\% + %li + gcovr (C/C++) - + %code ^TOTAL.*\s+(\d+\%)$ + %li + tap --coverage-report=text-summary (Node.js) - + %code ^Statements\s*:\s*([^%]+) - .form-group - .checkbox - = f.label :public_builds do - = f.check_box :public_builds - %strong Public builds - .help-block Allow everyone to access builds for Public and Internal projects + .form-group + .checkbox + = f.label :public_builds do + = f.check_box :public_builds + %strong Public builds + .help-block Allow everyone to access builds for Public and Internal projects - .form-group.append-bottom-0 - = f.label :runners_token, "Runners token", class: 'label-light' - = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' - %p.help-block The secure token used to checkout project. + .form-group.append-bottom-0 + = f.label :runners_token, "Runners token", class: 'label-light' + = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' + %p.help-block The secure token used to checkout project. - = f.submit 'Save changes', class: "btn btn-save" + = f.submit 'Save changes', class: "btn btn-save" - badges_path = namespace_project_badges_path(@project.namespace, @project) - -.prepend-top-10 - .panel.panel-default - .panel-heading - %b Builds badge · - = @build_badge.to_html - .pull-right - = render 'shared/ref_switcher', destination: 'badges', align_right: true - .panel-body - .row - .col-md-2.text-center - Markdown - .col-md-10.code.js-syntax-highlight - = highlight('.md', @build_badge.to_markdown) - .row - %hr - .row - .col-md-2.text-center - HTML - .col-md-10.code.js-syntax-highlight - = highlight('.html', @build_badge.to_html) +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + Builds Badge + .col-lg-9 + .prepend-top-10 + .panel.panel-default + .panel-heading + %b Builds badge · + = @build_badge.to_html + .pull-right + = render 'shared/ref_switcher', destination: 'badges', align_right: true + .panel-body + .row + .col-md-2.text-center + Markdown + .col-md-10.code.js-syntax-highlight + = highlight('.md', @build_badge.to_markdown) + .row + %hr + .row + .col-md-2.text-center + HTML + .col-md-10.code.js-syntax-highlight + = highlight('.html', @build_badge.to_html) -- cgit v1.2.1 From 8ae4b8619bdf3f8d966416624464d5f6408d1cd6 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 14 Jul 2016 09:26:10 -0500 Subject: Change builds to pipelines; settings formatting --- CHANGELOG | 2 ++ app/views/projects/builds/settings.html.haml | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9f3a9cad83f..725667e0d52 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -127,6 +127,8 @@ v 8.10.0 (unreleased) - Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska) - Allow bulk (un)subscription from issues in issue index - Fix MR diff encoding issues exporting GitLab projects + - Move builds settings out of project settings and rename Pipelines + - Add builds badge to Pipelines settings page v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 diff --git a/app/views/projects/builds/settings.html.haml b/app/views/projects/builds/settings.html.haml index 5a7cabbbcef..9d267ea1ddf 100644 --- a/app/views/projects/builds/settings.html.haml +++ b/app/views/projects/builds/settings.html.haml @@ -1,4 +1,4 @@ -- page_title "Pipelines Settings" +- page_title "CI pipelines" .row.prepend-top-default .col-lg-3.profile-settings-sidebar @@ -6,13 +6,13 @@ = page_title .col-lg-9 %h5.prepend-top-0 - Builds + Pipelines = form_for [@project.namespace.becomes(Namespace), @project], remote: true, authenticity_token: true do |f| %fieldset.builds-feature - unless @repository.gitlab_ci_yml .form-group - %p Builds need to be configured before you can begin using Continuous Integration. - = link_to 'Get started with Builds', help_page_path('ci/quick_start/README'), class: 'btn btn-info' + %p Pipelines need to be configured before you can begin using Continuous Integration. + = link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' .form-group %p Get recent application code using the following command: .radio @@ -64,16 +64,17 @@ .checkbox = f.label :public_builds do = f.check_box :public_builds - %strong Public builds - .help-block Allow everyone to access builds for Public and Internal projects + %strong Public pipelines + .help-block Allow everyone to access pipelines for Public and Internal projects - .form-group.append-bottom-0 + .form-group.append-bottom-default = f.label :runners_token, "Runners token", class: 'label-light' = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' %p.help-block The secure token used to checkout project. = f.submit 'Save changes', class: "btn btn-save" +%hr - badges_path = namespace_project_badges_path(@project.namespace, @project) .row.prepend-top-default -- cgit v1.2.1 From 667aba6f3b6443c11ab99043c692b446abf10460 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 14 Jul 2016 14:27:24 -0500 Subject: Remove unused badges page and delete badges index controller action --- app/controllers/projects/badges_controller.rb | 5 ----- app/views/projects/badges/index.html.haml | 23 ----------------------- 2 files changed, 28 deletions(-) delete mode 100644 app/views/projects/badges/index.html.haml diff --git a/app/controllers/projects/badges_controller.rb b/app/controllers/projects/badges_controller.rb index 824aa41db51..a9f482c8787 100644 --- a/app/controllers/projects/badges_controller.rb +++ b/app/controllers/projects/badges_controller.rb @@ -3,11 +3,6 @@ class Projects::BadgesController < Projects::ApplicationController before_action :authorize_admin_project!, only: [:index] before_action :no_cache_headers, except: [:index] - def index - @ref = params[:ref] || @project.default_branch || 'master' - @build_badge = Gitlab::Badge::Build.new(@project, @ref) - end - def build badge = Gitlab::Badge::Build.new(project, params[:ref]) diff --git a/app/views/projects/badges/index.html.haml b/app/views/projects/badges/index.html.haml deleted file mode 100644 index ac80951dd4f..00000000000 --- a/app/views/projects/badges/index.html.haml +++ /dev/null @@ -1,23 +0,0 @@ -- page_title 'Badges' -- badges_path = namespace_project_badges_path(@project.namespace, @project) - -.prepend-top-10 - .panel.panel-default - .panel-heading - %b Builds badge · - = @build_badge.to_html - .pull-right - = render 'shared/ref_switcher', destination: 'badges', align_right: true - .panel-body - .row - .col-md-2.text-center - Markdown - .col-md-10.code.js-syntax-highlight - = highlight('.md', @build_badge.to_markdown) - .row - %hr - .row - .col-md-2.text-center - HTML - .col-md-10.code.js-syntax-highlight - = highlight('.html', @build_badge.to_html) -- cgit v1.2.1 From 6445cec718fd9bcfd2944aab9f88c6760d27dcd4 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 14 Jul 2016 16:19:28 -0500 Subject: Update badges path --- app/controllers/projects/refs_controller.rb | 2 +- app/views/projects/builds/settings.html.haml | 1 - features/steps/project/badges/build.rb | 2 +- spec/features/projects/badges/list_spec.rb | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index d79f16e6a5a..3b08573ca99 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -25,7 +25,7 @@ class Projects::RefsController < Projects::ApplicationController when "graphs_commits" commits_namespace_project_graph_path(@project.namespace, @project, @id) when "badges" - namespace_project_badges_path(@project.namespace, @project, ref: @id) + settings_namespace_project_builds_path(@project.namespace, @project, ref: @id) else namespace_project_commits_path(@project.namespace, @project, @id) end diff --git a/app/views/projects/builds/settings.html.haml b/app/views/projects/builds/settings.html.haml index 9d267ea1ddf..c7d96de8661 100644 --- a/app/views/projects/builds/settings.html.haml +++ b/app/views/projects/builds/settings.html.haml @@ -76,7 +76,6 @@ %hr -- badges_path = namespace_project_badges_path(@project.namespace, @project) .row.prepend-top-default .col-lg-3.profile-settings-sidebar %h4.prepend-top-0 diff --git a/features/steps/project/badges/build.rb b/features/steps/project/badges/build.rb index 66a48a176e5..d8ca0d8fd5c 100644 --- a/features/steps/project/badges/build.rb +++ b/features/steps/project/badges/build.rb @@ -5,7 +5,7 @@ class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps include RepoHelpers step 'I display builds badge for a master branch' do - visit build_namespace_project_badges_path(@project.namespace, @project, ref: :master, format: :svg) + visit settings_namespace_project_builds_path(@project.namespace, @project, ref: :master, format: :svg) end step 'I should see a build success badge' do diff --git a/spec/features/projects/badges/list_spec.rb b/spec/features/projects/badges/list_spec.rb index 01e90618a98..e5e900b5202 100644 --- a/spec/features/projects/badges/list_spec.rb +++ b/spec/features/projects/badges/list_spec.rb @@ -6,7 +6,7 @@ feature 'list of badges' do project = create(:project) project.team << [user, :master] login_as(user) - visit namespace_project_badges_path(project.namespace, project) + visit settings_namespace_project_builds_path(project.namespace, project) end scenario 'user displays list of badges' do -- cgit v1.2.1 From dccdc9fd7865dbac98c9e7a4e83cf57c98fa8a7b Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 14 Jul 2016 18:33:36 -0500 Subject: Fix badge test --- features/steps/project/badges/build.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/steps/project/badges/build.rb b/features/steps/project/badges/build.rb index d8ca0d8fd5c..66a48a176e5 100644 --- a/features/steps/project/badges/build.rb +++ b/features/steps/project/badges/build.rb @@ -5,7 +5,7 @@ class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps include RepoHelpers step 'I display builds badge for a master branch' do - visit settings_namespace_project_builds_path(@project.namespace, @project, ref: :master, format: :svg) + visit build_namespace_project_badges_path(@project.namespace, @project, ref: :master, format: :svg) end step 'I should see a build success badge' do -- cgit v1.2.1 From f85b78c1e996431c52bba185641d1b426580c3ad Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 19 Jul 2016 14:31:22 +0200 Subject: fix spec --- spec/lib/gitlab/import_export/avatar_restorer_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb index 15131c0653e..5ae178414cc 100644 --- a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb @@ -5,7 +5,7 @@ describe Gitlab::ImportExport::AvatarRestorer, lib: true do let(:project) { create(:empty_project) } before do - allow_any_instance_of(described_class).to receive(:avatar_export_path) + allow_any_instance_of(described_class).to receive(:avatar_export_file) .and_return(Rails.root + "spec/fixtures/dk.png") end -- cgit v1.2.1 From c7fcd061f52c4502af906dcde219f704322f7efe Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 19 Jul 2016 13:35:23 +0100 Subject: CHANGELOG item --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 9f3a9cad83f..488531a4729 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -41,6 +41,7 @@ v 8.10.0 (unreleased) - Add syntax for multiline blockquote using `>>>` fence !3954 - Fix viewing notification settings when a project is pending deletion - Updated compare dropdown menus to use GL dropdown + - Redirects back to issue after clicking login link - Eager load award emoji on notes - Fix pagination when sorting by columns with lots of ties (like priority) - The Markdown reference parsers now re-use query results to prevent running the same queries multiple times !5020 -- cgit v1.2.1 From c11e4d1539d0e3acd393bd1b384aa821bb5b3d30 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Tue, 19 Jul 2016 07:23:23 +0100 Subject: Added diff comments feature test --- spec/features/merge_requests/diffs_spec.rb | 94 ++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/spec/features/merge_requests/diffs_spec.rb b/spec/features/merge_requests/diffs_spec.rb index c9a0059645d..35f5bfe46be 100644 --- a/spec/features/merge_requests/diffs_spec.rb +++ b/spec/features/merge_requests/diffs_spec.rb @@ -22,4 +22,98 @@ feature 'Diffs URL', js: true, feature: true do expect(page).to have_css('.diffs.tab-pane.active') end end + + context 'when hovering over the parallel view diff file' do + let(:comment_button_class) { '.add-diff-note' } + + before(:each) do + visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request + click_link 'Side-by-side' + @old_line_number = first '.diff-line-num.old_line:not(.empty-cell)' + @new_line_number = first '.diff-line-num.new_line:not(.empty-cell)' + @old_line = first '.line_content[data-line-type="old"]' + @new_line = first '.line_content[data-line-type="new"]' + end + + it 'shows a comment button on the old side when hovering over an old line number' do + @old_line_number.hover + expect(@old_line_number).to have_css comment_button_class + expect(@new_line_number).not_to have_css comment_button_class + end + + it 'shows a comment button on the old side when hovering over an old line' do + @old_line.hover + expect(@old_line_number).to have_css comment_button_class + expect(@new_line_number).not_to have_css comment_button_class + end + + it 'shows a comment button on the new side when hovering over a new line number' do + @new_line_number.hover + expect(@new_line_number).to have_css comment_button_class + expect(@old_line_number).not_to have_css comment_button_class + end + + it 'shows a comment button on the new side when hovering over a new line' do + @new_line.hover + expect(@new_line_number).to have_css comment_button_class + expect(@old_line_number).not_to have_css comment_button_class + end + end + + context 'when hovering over the inline view diff file' do + let(:comment_button_class) { '.add-diff-note' } + + before(:each) do + visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request + click_link 'Inline' + @old_line_number = first '.diff-line-num.old_line:not(.unfold)' + @new_line_number = first '.diff-line-num.new_line:not(.unfold)' + @new_line = first '.line_content:not(.match)' + end + + it 'shows a comment button on the old side when hovering over an old line number' do + @old_line_number.hover + expect(@old_line_number).to have_css comment_button_class + expect(@new_line_number).not_to have_css comment_button_class + end + + it 'shows a comment button on the new side when hovering over a new line number' do + @new_line_number.hover + expect(@old_line_number).to have_css comment_button_class + expect(@new_line_number).not_to have_css comment_button_class + end + + it 'shows a comment button on the new side when hovering over a new line' do + @new_line.hover + expect(@old_line_number).to have_css comment_button_class + expect(@new_line_number).not_to have_css comment_button_class + end + end + + context 'when clicking a comment button' do + let(:test_note_comment) { 'this is a test note!' } + let(:note_class) { '.new-note' } + + before(:each) do + visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request + click_link 'Inline' + first('.diff-line-num.old_line:not(.unfold)').hover + find('.add-diff-note').click + end + + it 'shows a note form' do + expect(page).to have_css note_class + end + + it 'can be submitted and viewed' do + fill_in 'note[note]', with: :test_note_comment + click_button 'Comment' + expect(page).to have_content :test_note_comment + end + + it 'can be closed' do + find('.note-form-actions .btn-cancel').click + expect(page).not_to have_css note_class + end + end end -- cgit v1.2.1 From 72229c375fb3efe9dd28c0bf98f0df7696d99fc2 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 19 Jul 2016 14:43:45 +0200 Subject: Add CHANGELOG entry [ci skip] --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index fcfc2d7aa30..1e4411064d1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -37,6 +37,7 @@ v 8.10.0 (unreleased) - Fix viewing notification settings when a project is pending deletion - Updated compare dropdown menus to use GL dropdown - Eager load award emoji on notes + - Allow to define manual actions/builds on Pipelines and Environments - Fix pagination when sorting by columns with lots of ties (like priority) - The Markdown reference parsers now re-use query results to prevent running the same queries multiple times !5020 - Updated project header design -- cgit v1.2.1 From 5028b3a79691537ace5335ae9358952bcce300ea Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Tue, 19 Jul 2016 05:47:19 -0700 Subject: Capitalize CI Pipelines --- app/views/projects/builds/settings.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/builds/settings.html.haml b/app/views/projects/builds/settings.html.haml index c7d96de8661..0f330c587e9 100644 --- a/app/views/projects/builds/settings.html.haml +++ b/app/views/projects/builds/settings.html.haml @@ -1,4 +1,4 @@ -- page_title "CI pipelines" +- page_title "CI Pipelines" .row.prepend-top-default .col-lg-3.profile-settings-sidebar -- cgit v1.2.1 From 41fa516bb67e97e59ad8a38fe8296bbd3a091c82 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 19 Jul 2016 13:23:14 +0200 Subject: Use value of `yaml_variables` and `when` from config_processor if undefined --- app/models/ci/build.rb | 20 +++++-- lib/ci/gitlab_ci_yaml_processor.rb | 65 +++++++++++---------- spec/factories/ci/builds.rb | 2 + spec/lib/gitlab/badge/build_spec.rb | 2 +- spec/models/build_spec.rb | 113 +++++++++++++++++++++++++++++++++--- 5 files changed, 154 insertions(+), 48 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 49a123d488b..775e2d363ea 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -145,12 +145,7 @@ module Ci end def variables - variables = [] - variables += predefined_variables - variables += yaml_variables if yaml_variables - variables += project_variables - variables += trigger_variables - variables + predefined_variables + yaml_variables + project_variables + trigger_variables end def merge_request @@ -409,6 +404,14 @@ module Ci self.update(artifacts_expire_at: nil) end + def when + read_attribute(:when) || build_attributes_from_config[:when] || 'on_success' + end + + def yaml_variables + read_attribute(:yaml_variables) || build_attributes_from_config[:yaml_variables] || [] + end + private def update_artifacts_size @@ -451,5 +454,10 @@ module Ci variables << { key: :CI_BUILD_TRIGGERED, value: 'true', public: true } if trigger_request variables end + + def build_attributes_from_config + return {} unless pipeline.config_processor + pipeline.config_processor.build_attributes(name) + end end end diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index 41449d720b3..c45e3a95c7f 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -45,22 +45,50 @@ module Ci def builds_for_ref(ref, tag = false, trigger_request = nil) jobs_for_ref(ref, tag, trigger_request).map do |name, job| - build_job(name, job) + build_attributes(name, _) end end def builds_for_stage_and_ref(stage, ref, tag = false, trigger_request = nil) - jobs_for_stage_and_ref(stage, ref, tag, trigger_request).map do |name, job| - build_job(name, job) + jobs_for_stage_and_ref(stage, ref, tag, trigger_request).map do |name, _| + build_attributes(name) end end def builds - @jobs.map do |name, job| - build_job(name, job) + @jobs.map do |name, _| + build_attributes(name) end end + def build_attributes(name) + job = @jobs[name.to_sym] || {} + { + stage_idx: @stages.index(job[:stage]), + stage: job[:stage], + ## + # Refactoring note: + # - before script behaves differently than after script + # - after script returns an array of commands + # - before script should be a concatenated command + commands: [job[:before_script] || @before_script, job[:script]].flatten.compact.join("\n"), + tag_list: job[:tags] || [], + name: name, + allow_failure: job[:allow_failure] || false, + when: job[:when] || 'on_success', + environment: job[:environment], + yaml_variables: yaml_variables(name), + options: { + image: job[:image] || @image, + services: job[:services] || @services, + artifacts: job[:artifacts], + cache: job[:cache] || @cache, + dependencies: job[:dependencies], + after_script: job[:after_script] || @after_script, + }.compact + } + end + private def initial_parsing @@ -89,33 +117,6 @@ module Ci @jobs[name] = { stage: stage }.merge(job) end - def build_job(name, job) - { - stage_idx: @stages.index(job[:stage]), - stage: job[:stage], - ## - # Refactoring note: - # - before script behaves differently than after script - # - after script returns an array of commands - # - before script should be a concatenated command - commands: [job[:before_script] || @before_script, job[:script]].flatten.compact.join("\n"), - tag_list: job[:tags] || [], - name: name, - allow_failure: job[:allow_failure] || false, - when: job[:when] || 'on_success', - environment: job[:environment], - yaml_variables: yaml_variables(name), - options: { - image: job[:image] || @image, - services: job[:services] || @services, - artifacts: job[:artifacts], - cache: job[:cache] || @cache, - dependencies: job[:dependencies], - after_script: job[:after_script] || @after_script, - }.compact - } - end - def yaml_variables(name) variables = global_variables.merge(job_variables(name)) variables.map do |key, value| diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index fb111889501..5e19e403c6b 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -3,6 +3,8 @@ include ActionDispatch::TestProcess FactoryGirl.define do factory :ci_build, class: Ci::Build do name 'test' + stage 'test' + stage_idx 0 ref 'master' tag false created_at 'Di 29. Okt 09:50:00 CET 2013' diff --git a/spec/lib/gitlab/badge/build_spec.rb b/spec/lib/gitlab/badge/build_spec.rb index 2034445a197..f3b522a02f5 100644 --- a/spec/lib/gitlab/badge/build_spec.rb +++ b/spec/lib/gitlab/badge/build_spec.rb @@ -113,7 +113,7 @@ describe Gitlab::Badge::Build do sha: sha, ref: branch) - create(:ci_build, pipeline: pipeline) + create(:ci_build, pipeline: pipeline, stage: 'notify') end def status_node(data, status) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 4846c87a100..7f301d7ef00 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -191,16 +191,16 @@ describe Ci::Build, models: true do end describe '#variables' do - context 'returns variables' do - subject { build.variables } + let(:predefined_variables) do + [ + { key: :CI_BUILD_NAME, value: 'test', public: true }, + { key: :CI_BUILD_STAGE, value: 'test', public: true }, + ] + end - let(:predefined_variables) do - [ - { key: :CI_BUILD_NAME, value: 'test', public: true }, - { key: :CI_BUILD_STAGE, value: 'stage', public: true }, - ] - end + subject { build.variables } + context 'returns variables' do let(:yaml_variables) do [ { key: :DB_NAME, value: 'postgres', public: true } @@ -208,7 +208,7 @@ describe Ci::Build, models: true do end before do - build.update_attributes(stage: 'stage', yaml_variables: yaml_variables) + build.yaml_variables = yaml_variables end it { is_expected.to eq(predefined_variables + yaml_variables) } @@ -262,6 +262,54 @@ describe Ci::Build, models: true do end end end + + context 'when yaml_variables is undefined' do + before do + build.yaml_variables = nil + end + + context 'use from gitlab-ci.yml' do + before do + stub_ci_pipeline_yaml_file(config) + end + + context 'if config is not found' do + let(:config) { nil } + + it { is_expected.to eq(predefined_variables) } + end + + context 'if config does not have a questioned job' do + let(:config) do + YAML.dump({ + test_other: { + script: 'Hello World' + } + }) + end + + it { is_expected.to eq(predefined_variables) } + end + + context 'if config has variables' do + let(:config) do + YAML.dump({ + test: { + script: 'Hello World', + variables: { + KEY: 'value' + } + } + }) + end + let(:variables) do + [{ key: :KEY, value: 'value', public: true }] + end + + it { is_expected.to eq(predefined_variables + variables) } + end + end + end end describe '#has_tags?' do @@ -721,4 +769,51 @@ describe Ci::Build, models: true do end end end + + describe '#when' do + subject { build.when } + + context 'if is undefined' do + before do + build.when = nil + end + + context 'use from gitlab-ci.yml' do + before do + stub_ci_pipeline_yaml_file(config) + end + + context 'if config is not found' do + let(:config) { nil } + + it { is_expected.to eq('on_success') } + end + + context 'if config does not have a questioned job' do + let(:config) do + YAML.dump({ + test_other: { + script: 'Hello World' + } + }) + end + + it { is_expected.to eq('on_success') } + end + + context 'if config has when' do + let(:config) do + YAML.dump({ + test: { + script: 'Hello World', + when: 'always' + } + }) + end + + it { is_expected.to eq('always') } + end + end + end + end end -- cgit v1.2.1 From 6208c24d1f3ba4ac341c969bc61996903c2b4ff7 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 19 Jul 2016 14:30:09 +0200 Subject: Move when tests before to make it no conflict with manual-actions --- spec/models/build_spec.rb | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 7f301d7ef00..06d984c7a40 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -792,10 +792,10 @@ describe Ci::Build, models: true do context 'if config does not have a questioned job' do let(:config) do YAML.dump({ - test_other: { - script: 'Hello World' - } - }) + test_other: { + script: 'Hello World' + } + }) end it { is_expected.to eq('on_success') } @@ -804,11 +804,11 @@ describe Ci::Build, models: true do context 'if config has when' do let(:config) do YAML.dump({ - test: { - script: 'Hello World', - when: 'always' - } - }) + test: { + script: 'Hello World', + when: 'always' + } + }) end it { is_expected.to eq('always') } @@ -816,4 +816,22 @@ describe Ci::Build, models: true do end end end + + describe '#retryable?' do + context 'when build is running' do + before { build.run! } + + it 'should return false' do + expect(build.retryable?).to be false + end + end + + context 'when build is finished' do + before { build.success! } + + it 'should return true' do + expect(build.retryable?).to be true + end + end + end end -- cgit v1.2.1 From 276d28a60fe0276ce5aa72f323fc25935f5c720d Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 19 Jul 2016 14:52:12 +0200 Subject: Fix broken builds_for_ref --- lib/ci/gitlab_ci_yaml_processor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index c45e3a95c7f..d1ce6de5a7d 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -45,7 +45,7 @@ module Ci def builds_for_ref(ref, tag = false, trigger_request = nil) jobs_for_ref(ref, tag, trigger_request).map do |name, job| - build_attributes(name, _) + build_attributes(name) end end -- cgit v1.2.1 From 6b07a5b26c115e0844e6e74efe6c6405c5a82812 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 19 Jul 2016 14:53:31 +0200 Subject: Improve code design --- app/models/ci/build.rb | 1 + lib/ci/gitlab_ci_yaml_processor.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 775e2d363ea..e02351ce339 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -457,6 +457,7 @@ module Ci def build_attributes_from_config return {} unless pipeline.config_processor + pipeline.config_processor.build_attributes(name) end end diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index d1ce6de5a7d..83afed9f49f 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -44,7 +44,7 @@ module Ci end def builds_for_ref(ref, tag = false, trigger_request = nil) - jobs_for_ref(ref, tag, trigger_request).map do |name, job| + jobs_for_ref(ref, tag, trigger_request).map do |name, _| build_attributes(name) end end -- cgit v1.2.1 From 08b9532e376eae369cd04d9f86ea560acfd19ed0 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 19 Jul 2016 20:59:38 +0800 Subject: API for downloading latest successful build: This was extracted from !5142 and implementing part of #4255. We split it from !5142 because we want to ship it in 8.10 while !5142 was not ready yet. --- app/models/ci/build.rb | 3 + app/models/ci/pipeline.rb | 10 +- app/models/project.rb | 7 ++ lib/api/builds.rb | 58 +++++++----- spec/models/build_spec.rb | 63 +++++++++++-- spec/models/project_spec.rb | 2 +- spec/requests/api/builds_spec.rb | 196 +++++++++++++++++++++++++++++++++++---- 7 files changed, 290 insertions(+), 49 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index ffac3a22efc..65dfe4f0190 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -15,6 +15,9 @@ module Ci scope :with_artifacts, ->() { where.not(artifacts_file: nil) } scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) } scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) } + scope :latest_successful_with_artifacts, ->() do + with_artifacts.success.order(id: :desc) + end mount_uploader :artifacts_file, ArtifactUploader mount_uploader :artifacts_metadata, ArtifactUploader diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index a65a826536d..f5b4124d1ee 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -20,6 +20,14 @@ module Ci after_touch :update_state after_save :keep_around_commits + # ref can't be HEAD, can only be branch/tag name or SHA + scope :latest_successful_for, ->(ref) do + table = quoted_table_name + # TODO: Use `where(ref: ref).or(sha: ref)` in Rails 5 + where("#{table}.ref = ? OR #{table}.sha = ?", ref, ref). + success.order(id: :desc) + end + def self.truncate_sha(sha) sha[0...8] end @@ -222,7 +230,7 @@ module Ci def keep_around_commits return unless project - + project.repository.keep_around(self.sha) project.repository.keep_around(self.before_sha) end diff --git a/app/models/project.rb b/app/models/project.rb index a805f5d97bc..29aaaf5117f 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -429,6 +429,13 @@ class Project < ActiveRecord::Base repository.commit(ref) end + # ref can't be HEAD, can only be branch/tag name or SHA + def latest_successful_builds_for(ref = 'master') + Ci::Build.joins(:pipeline). + merge(pipelines.latest_successful_for(ref)). + latest_successful_with_artifacts + end + def merge_base_commit(first_commit_id, second_commit_id) sha = repository.merge_base(first_commit_id, second_commit_id) repository.commit(sha) if sha diff --git a/lib/api/builds.rb b/lib/api/builds.rb index d36047acd1f..bb9e8f1ae6e 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -52,8 +52,7 @@ module API get ':id/builds/:build_id' do authorize_read_builds! - build = get_build(params[:build_id]) - return not_found!(build) unless build + build = get_build!(params[:build_id]) present build, with: Entities::Build, user_can_download_artifacts: can?(current_user, :read_build, user_project) @@ -69,18 +68,25 @@ module API get ':id/builds/:build_id/artifacts' do authorize_read_builds! - build = get_build(params[:build_id]) - return not_found!(build) unless build + build = get_build!(params[:build_id]) - artifacts_file = build.artifacts_file - - unless artifacts_file.file_storage? - return redirect_to build.artifacts_file.url - end + present_artifact!(build.artifacts_file) + end - return not_found! unless artifacts_file.exists? + # Download the artifacts file from ref_name and job + # + # Parameters: + # id (required) - The ID of a project + # ref_name (required) - The ref from repository + # job (required) - The name for the build + # Example Request: + # GET /projects/:id/artifacts/:ref_name/download?job=name + get ':id/builds/artifacts/:ref_name/download', + requirements: { ref_name: /.+/ } do + builds = user_project.latest_successful_builds_for(params[:ref_name]) + latest_build = builds.find_by!(name: params[:job]) - present_file!(artifacts_file.path, artifacts_file.filename) + present_artifact!(latest_build.artifacts_file) end # Get a trace of a specific build of a project @@ -97,8 +103,7 @@ module API get ':id/builds/:build_id/trace' do authorize_read_builds! - build = get_build(params[:build_id]) - return not_found!(build) unless build + build = get_build!(params[:build_id]) header 'Content-Disposition', "infile; filename=\"#{build.id}.log\"" content_type 'text/plain' @@ -118,8 +123,7 @@ module API post ':id/builds/:build_id/cancel' do authorize_update_builds! - build = get_build(params[:build_id]) - return not_found!(build) unless build + build = get_build!(params[:build_id]) build.cancel @@ -137,8 +141,7 @@ module API post ':id/builds/:build_id/retry' do authorize_update_builds! - build = get_build(params[:build_id]) - return not_found!(build) unless build + build = get_build!(params[:build_id]) return forbidden!('Build is not retryable') unless build.retryable? build = Ci::Build.retry(build, current_user) @@ -157,8 +160,7 @@ module API post ':id/builds/:build_id/erase' do authorize_update_builds! - build = get_build(params[:build_id]) - return not_found!(build) unless build + build = get_build!(params[:build_id]) return forbidden!('Build is not erasable!') unless build.erasable? build.erase(erased_by: current_user) @@ -176,8 +178,8 @@ module API post ':id/builds/:build_id/artifacts/keep' do authorize_update_builds! - build = get_build(params[:build_id]) - return not_found!(build) unless build && build.artifacts? + build = get_build!(params[:build_id]) + return not_found!(build) unless build.artifacts? build.keep_artifacts! @@ -192,6 +194,20 @@ module API user_project.builds.find_by(id: id.to_i) end + def get_build!(id) + get_build(id) || not_found! + end + + def present_artifact!(artifacts_file) + if !artifacts_file.file_storage? + redirect_to(build.artifacts_file.url) + elsif artifacts_file.exists? + present_file!(artifacts_file.path, artifacts_file.filename) + else + not_found! + end + end + def filter_builds(builds, scope) return builds if scope.nil? || scope.empty? diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 481416319dd..355cb8fdfff 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -5,7 +5,9 @@ describe Ci::Build, models: true do let(:pipeline) do create(:ci_pipeline, project: project, - sha: project.commit.id) + sha: project.commit.id, + ref: 'fix', + status: 'success') end let(:build) { create(:ci_build, pipeline: pipeline) } @@ -612,7 +614,7 @@ describe Ci::Build, models: true do describe '#erasable?' do subject { build.erasable? } - it { is_expected.to eq true } + it { is_expected.to be_truthy } end describe '#erased?' do @@ -620,7 +622,7 @@ describe Ci::Build, models: true do subject { build.erased? } context 'build has not been erased' do - it { is_expected.to be false } + it { is_expected.to be_falsey } end context 'build has been erased' do @@ -628,12 +630,13 @@ describe Ci::Build, models: true do build.erase end - it { is_expected.to be true } + it { is_expected.to be_truthy } end end context 'metadata and build trace are not available' do let!(:build) { create(:ci_build, :success, :artifacts) } + before do build.remove_artifacts_metadata! end @@ -655,18 +658,58 @@ describe Ci::Build, models: true do describe '#retryable?' do context 'when build is running' do - before { build.run! } + before do + build.run! + end - it 'should return false' do - expect(build.retryable?).to be false + it 'returns false' do + expect(build).not_to be_retryable end end context 'when build is finished' do - before { build.success! } + before do + build.success! + end + + it 'returns true' do + expect(build).to be_retryable + end + end + end + + describe 'Project#latest_successful_builds_for' do + let(:build) do + create(:ci_build, :artifacts, :success, pipeline: pipeline) + end + + before do + build + end + + context 'with succeed pipeline' do + it 'returns builds from ref' do + builds = project.latest_successful_builds_for('fix') + + expect(builds).to contain_exactly(build) + end + + it 'returns empty relation if the build cannot be found' do + builds = project.latest_successful_builds_for('TAIL').all + + expect(builds).to be_empty + end + end + + context 'with pending pipeline' do + before do + pipeline.update(status: 'pending') + end + + it 'returns empty relation' do + builds = project.latest_successful_builds_for('fix').all - it 'should return true' do - expect(build.retryable?).to be true + expect(builds).to be_empty end end end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 9dc34276f18..53b420d808f 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -377,7 +377,7 @@ describe Project, models: true do describe '#repository' do let(:project) { create(:project) } - it 'should return valid repo' do + it 'returns valid repo' do expect(project.repository).to be_kind_of(Repository) end end diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index f5b39c3d698..47bcc0eebdd 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -1,21 +1,26 @@ require 'spec_helper' -describe API::API, api: true do +describe API::API, api: true do include ApiHelpers let(:user) { create(:user) } let(:api_user) { user } let(:user2) { create(:user) } - let!(:project) { create(:project, creator_id: user.id) } - let!(:developer) { create(:project_member, :developer, user: user, project: project) } - let!(:reporter) { create(:project_member, :reporter, user: user2, project: project) } - let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id) } - let!(:build) { create(:ci_build, pipeline: pipeline) } + let(:project) { create(:project, creator_id: user.id) } + let(:developer) { create(:project_member, :developer, user: user, project: project) } + let(:reporter) { create(:project_member, :reporter, user: user2, project: project) } + let(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id) } + let(:build) { create(:ci_build, pipeline: pipeline) } describe 'GET /projects/:id/builds ' do let(:query) { '' } - before { get api("/projects/#{project.id}/builds?#{query}", api_user) } + before do + developer + build + + get api("/projects/#{project.id}/builds?#{query}", api_user) + end context 'authorized user' do it 'should return project builds' do @@ -77,9 +82,9 @@ describe API::API, api: true do context 'when user is authorized' do context 'when pipeline has builds' do before do - create(:ci_pipeline, project: project, sha: project.commit.id) + developer + build create(:ci_build, pipeline: pipeline) - create(:ci_build) get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", api_user) end @@ -93,6 +98,8 @@ describe API::API, api: true do context 'when pipeline has no builds' do before do + developer + branch_head = project.commit('feature').id get api("/projects/#{project.id}/repository/commits/#{branch_head}/builds", api_user) end @@ -107,8 +114,7 @@ describe API::API, api: true do context 'when user is not authorized' do before do - create(:ci_pipeline, project: project, sha: project.commit.id) - create(:ci_build, pipeline: pipeline) + build get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", nil) end @@ -122,7 +128,11 @@ describe API::API, api: true do end describe 'GET /projects/:id/builds/:build_id' do - before { get api("/projects/#{project.id}/builds/#{build.id}", api_user) } + before do + developer + + get api("/projects/#{project.id}/builds/#{build.id}", api_user) + end context 'authorized user' do it 'should return specific build data' do @@ -141,7 +151,11 @@ describe API::API, api: true do end describe 'GET /projects/:id/builds/:build_id/artifacts' do - before { get api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user) } + before do + developer + + get api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user) + end context 'build with artifacts' do let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) } @@ -172,10 +186,146 @@ describe API::API, api: true do end end + describe 'GET /projects/:id/artifacts/:ref_name/download?job=name' do + let(:user) { create(:user) } + let(:project) { create(:project) } + let(:pipeline) do + create(:ci_pipeline, + project: project, + sha: project.commit('fix').sha, + ref: 'fix') + end + let(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) } + + before do + project.team << [user, :developer] + end + + def path_from_ref(ref = pipeline.ref, job = build.name) + api("/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}", user) + end + + context 'not logging in' do + let(:user) { nil } + + before do + get path_from_ref + end + + it 'gives 401 for unauthorized user' do + expect(response).to have_http_status(401) + end + end + + context 'non-existing build' do + def verify + expect(response).to have_http_status(404) + end + + context 'has no such ref' do + before do + get path_from_ref('TAIL', build.name) + end + + it('gives 404') { verify } + end + + context 'has no such build' do + before do + get path_from_ref(pipeline.ref, 'NOBUILD') + end + + it('gives 404') { verify } + end + end + + context 'find proper build' do + def verify + download_headers = + { 'Content-Transfer-Encoding' => 'binary', + 'Content-Disposition' => + "attachment; filename=#{build.artifacts_file.filename}" } + + expect(response).to have_http_status(200) + expect(response.headers).to include(download_headers) + end + + def create_new_pipeline(status) + new_pipeline = create(:ci_pipeline, status: 'success') + create(:ci_build, status, :artifacts, pipeline: new_pipeline) + end + + context 'with sha' do + before do + get path_from_ref(pipeline.sha) + end + + it('gives the file') { verify } + end + + context 'with regular branch' do + before do + pipeline.update(ref: 'master', + sha: project.commit('master').sha) + end + + before do + get path_from_ref('master') + end + + it('gives the file') { verify } + end + + context 'with branch name containing slash' do + before do + pipeline.update(ref: 'improve/awesome', + sha: project.commit('improve/awesome').sha) + end + + before do + get path_from_ref('improve/awesome') + end + + it('gives the file') { verify } + end + + context 'with latest pipeline' do + before do + 3.times do # creating some old pipelines + create_new_pipeline(:success) + end + end + + before do + get path_from_ref + end + + it('gives the file') { verify } + end + + context 'with success pipeline' do + before do + build # make sure pipeline was old, but still the latest success one + create_new_pipeline(:pending) + end + + before do + get path_from_ref + end + + it('gives the file') { verify } + end + end + end + describe 'GET /projects/:id/builds/:build_id/trace' do let(:build) { create(:ci_build, :trace, pipeline: pipeline) } - before { get api("/projects/#{project.id}/builds/#{build.id}/trace", api_user) } + before do + developer + + get api("/projects/#{project.id}/builds/#{build.id}/trace", api_user) + end context 'authorized user' do it 'should return specific build trace' do @@ -194,7 +344,12 @@ describe API::API, api: true do end describe 'POST /projects/:id/builds/:build_id/cancel' do - before { post api("/projects/#{project.id}/builds/#{build.id}/cancel", api_user) } + before do + developer + reporter + + post api("/projects/#{project.id}/builds/#{build.id}/cancel", api_user) + end context 'authorized user' do context 'user with :update_build persmission' do @@ -225,7 +380,12 @@ describe API::API, api: true do describe 'POST /projects/:id/builds/:build_id/retry' do let(:build) { create(:ci_build, :canceled, pipeline: pipeline) } - before { post api("/projects/#{project.id}/builds/#{build.id}/retry", api_user) } + before do + developer + reporter + + post api("/projects/#{project.id}/builds/#{build.id}/retry", api_user) + end context 'authorized user' do context 'user with :update_build permission' do @@ -256,6 +416,8 @@ describe API::API, api: true do describe 'POST /projects/:id/builds/:build_id/erase' do before do + developer + post api("/projects/#{project.id}/builds/#{build.id}/erase", user) end @@ -286,6 +448,8 @@ describe API::API, api: true do describe 'POST /projects/:id/builds/:build_id/artifacts/keep' do before do + developer + post api("/projects/#{project.id}/builds/#{build.id}/artifacts/keep", user) end -- cgit v1.2.1 From da55496b6fc3ef1c65c4369cabb89b874dbc79e6 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 15 Jul 2016 10:26:15 -0500 Subject: Add new running icon; add a bunch of styles to get svg to match existing fa icons --- app/assets/stylesheets/pages/pipelines.scss | 9 +++++++++ app/assets/stylesheets/pages/projects.scss | 7 +++++++ app/assets/stylesheets/pages/status.scss | 8 ++++++++ app/helpers/ci_status_helper.rb | 4 ++-- app/views/projects/ci/pipelines/_pipeline.html.haml | 2 +- app/views/shared/icons/_icon_running.svg | 12 ++++++++++++ app/views/shared/icons/_icon_status_cancel.svg | 12 ++++++++++++ app/views/shared/icons/_icon_status_failed.svg | 12 ++++++++++++ app/views/shared/icons/_icon_status_passed.svg | 15 +++++++++++++++ app/views/shared/icons/_icon_status_pending.svg | 13 +++++++++++++ app/views/shared/icons/_icon_status_warning.svg | 15 +++++++++++++++ 11 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 app/views/shared/icons/_icon_running.svg create mode 100644 app/views/shared/icons/_icon_status_cancel.svg create mode 100644 app/views/shared/icons/_icon_status_failed.svg create mode 100644 app/views/shared/icons/_icon_status_passed.svg create mode 100644 app/views/shared/icons/_icon_status_pending.svg create mode 100644 app/views/shared/icons/_icon_status_warning.svg diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index a3b72ec9574..8d411bd658b 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -123,6 +123,15 @@ right: 1px; } } + + .stage-cell { + + svg { + height: 13px; + width: 13px; + margin-left: 3px; + } + } .duration, .finished-at { diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index ea9f7cf0540..5572999d19c 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -536,6 +536,13 @@ pre.light-well { .ci-status { margin-right: $gl-padding; + + &.ci-running { + + svg { + margin-right: 3px; + } + } } .commit-row-message { diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index c6b053150be..8f3d9362a0a 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -41,6 +41,14 @@ color: $blue-normal; border-color: $blue-normal; } + + svg { + width: 13px; + height: 13px; + position: relative; + top: 1px; + margin-left: 3px; + } } .ci-status-icon-success { diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index e6c99c9959e..5219a0ff47b 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -32,12 +32,12 @@ module CiStatusHelper when 'pending' 'clock-o' when 'running' - 'spinner' + 'icon_running' else 'circle' end - icon(icon_name + ' fw') + status == 'running' ? custom_icon(icon_name) : icon(icon_name + ' fw') end def render_commit_status(commit, tooltip_placement: 'auto left', cssclass: '') diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 7ae699832f6..26c4ffd2bd4 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -35,7 +35,7 @@ - stages_status = pipeline.statuses.latest.stages_status - stages.each do |stage| - %td + %td.stage-cell - status = stages_status[stage] - tooltip = "#{stage.titleize}: #{status || 'not found'}" - if status diff --git a/app/views/shared/icons/_icon_running.svg b/app/views/shared/icons/_icon_running.svg new file mode 100644 index 00000000000..1b6a29958e6 --- /dev/null +++ b/app/views/shared/icons/_icon_running.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_cancel.svg b/app/views/shared/icons/_icon_status_cancel.svg new file mode 100644 index 00000000000..6a0bc1490c4 --- /dev/null +++ b/app/views/shared/icons/_icon_status_cancel.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_failed.svg b/app/views/shared/icons/_icon_status_failed.svg new file mode 100644 index 00000000000..c41ca18cae7 --- /dev/null +++ b/app/views/shared/icons/_icon_status_failed.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_passed.svg b/app/views/shared/icons/_icon_status_passed.svg new file mode 100644 index 00000000000..260eab013a3 --- /dev/null +++ b/app/views/shared/icons/_icon_status_passed.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_pending.svg b/app/views/shared/icons/_icon_status_pending.svg new file mode 100644 index 00000000000..035cd8b4ccc --- /dev/null +++ b/app/views/shared/icons/_icon_status_pending.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_warning.svg b/app/views/shared/icons/_icon_status_warning.svg new file mode 100644 index 00000000000..d47e7a1c93f --- /dev/null +++ b/app/views/shared/icons/_icon_status_warning.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + -- cgit v1.2.1 From 068f2f4f161c40310687198dbcec243b1361264f Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 15 Jul 2016 10:39:27 -0500 Subject: Align running icon in merge request --- app/assets/stylesheets/pages/merge_requests.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index fbff0c97355..ed45ac87f54 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -196,6 +196,16 @@ .merge-request-title { margin-bottom: 2px; + + .ci-status-link { + + svg { + height: 13px; + width: 13px; + position: relative; + top: 2px; + } + } } } -- cgit v1.2.1 From 5b5cafe024c4437a17a219708c9ec00376e98ece Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Fri, 15 Jul 2016 11:05:06 -0500 Subject: Add global style for running icon --- app/assets/stylesheets/pages/merge_requests.scss | 10 ---------- app/assets/stylesheets/pages/pipelines.scss | 10 +++++++++- app/assets/stylesheets/pages/projects.scss | 7 ------- app/assets/stylesheets/pages/status.scss | 23 ++++++++++++++-------- .../projects/ci/pipelines/_pipeline.html.haml | 2 +- 5 files changed, 25 insertions(+), 27 deletions(-) diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index ed45ac87f54..fbff0c97355 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -196,16 +196,6 @@ .merge-request-title { margin-bottom: 2px; - - .ci-status-link { - - svg { - height: 13px; - width: 13px; - position: relative; - top: 2px; - } - } } } diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 8d411bd658b..9cfd8d49318 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -49,6 +49,14 @@ .commit-link { + .ci-running { + + svg { + top: 1px; + margin-right: 0; + } + } + a:hover { text-decoration: none; } @@ -123,7 +131,7 @@ right: 1px; } } - + .stage-cell { svg { diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 5572999d19c..ea9f7cf0540 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -536,13 +536,6 @@ pre.light-well { .ci-status { margin-right: $gl-padding; - - &.ci-running { - - svg { - margin-right: 3px; - } - } } .commit-row-message { diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index 8f3d9362a0a..a0e008c98e5 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -41,14 +41,6 @@ color: $blue-normal; border-color: $blue-normal; } - - svg { - width: 13px; - height: 13px; - position: relative; - top: 1px; - margin-left: 3px; - } } .ci-status-icon-success { @@ -70,3 +62,18 @@ color: $gl-gray; } } + +.ci-running, +.ci-status-icon-running { + svg { + height: 13px; + width: 13px; + position: relative; + top: 2px; + margin: 0 3px; + } + + &:hover { + text-decoration: none; + } +} diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 26c4ffd2bd4..7ae699832f6 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -35,7 +35,7 @@ - stages_status = pipeline.statuses.latest.stages_status - stages.each do |stage| - %td.stage-cell + %td - status = stages_status[stage] - tooltip = "#{stage.titleize}: #{status || 'not found'}" - if status -- cgit v1.2.1 From 13e74543f9d0f91b7b3ef14279fd78d83f442750 Mon Sep 17 00:00:00 2001 From: Eugene Howe Date: Sun, 17 Jul 2016 10:32:11 -0400 Subject: speed up ExternalWikiService#get_project_wiki_path * This method previously iterated over all services in a project. Now it will directly query the ExternalWikiService for the project and filter by active state. * The presence of an external wiki is also cached * When an external wiki is added or removed, the cached value is updated --- CHANGELOG | 1 + app/helpers/external_wiki_helper.rb | 5 ++- app/models/project.rb | 16 +++++++++ app/models/service.rb | 8 +++++ ...0718153603_add_has_external_wiki_to_projects.rb | 7 ++++ db/schema.rb | 3 +- spec/models/project_spec.rb | 41 ++++++++++++++++++++++ 7 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20160718153603_add_has_external_wiki_to_projects.rb diff --git a/CHANGELOG b/CHANGELOG index 428d41178d4..d305d996cac 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ v 8.11.0 (unreleased) v 8.10.0 (unreleased) - Fix profile activity heatmap to show correct day name (eanplatter) + - Speed up ExternalWikiHelper#get_project_wiki_path - Expose {should,force}_remove_source_branch (Ben Boeckel) - Disable PostgreSQL statement timeout during migrations - Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho) diff --git a/app/helpers/external_wiki_helper.rb b/app/helpers/external_wiki_helper.rb index 1f3401f2906..defd87d6bbe 100644 --- a/app/helpers/external_wiki_helper.rb +++ b/app/helpers/external_wiki_helper.rb @@ -1,8 +1,7 @@ module ExternalWikiHelper def get_project_wiki_path(project) - external_wiki_service = project.services. - find { |service| service.to_param == 'external_wiki' } - if external_wiki_service.present? && external_wiki_service.active? + external_wiki_service = project.external_wiki + if external_wiki_service external_wiki_service.properties['external_wiki_url'] else namespace_project_wiki_path(project.namespace, project, :home) diff --git a/app/models/project.rb b/app/models/project.rb index a805f5d97bc..d08b737e813 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -650,6 +650,22 @@ class Project < ActiveRecord::Base update_column(:has_external_issue_tracker, services.external_issue_trackers.any?) end + def external_wiki + if has_external_wiki.nil? + cache_has_external_wiki # Populate + end + + if has_external_wiki + @external_wiki ||= services.external_wikis.first + else + nil + end + end + + def cache_has_external_wiki + update_column(:has_external_wiki, services.external_wikis.any?) + end + def build_missing_services services_templates = Service.where(template: true) diff --git a/app/models/service.rb b/app/models/service.rb index 5432f8c7ab4..4821096379c 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -17,6 +17,7 @@ class Service < ActiveRecord::Base after_commit :reset_updated_properties after_commit :cache_project_has_external_issue_tracker + after_commit :cache_project_has_external_wiki belongs_to :project, inverse_of: :services has_one :service_hook @@ -25,6 +26,7 @@ class Service < ActiveRecord::Base scope :visible, -> { where.not(type: ['GitlabIssueTrackerService', 'GitlabCiService']) } scope :issue_trackers, -> { where(category: 'issue_tracker') } + scope :external_wikis, -> { where(type: 'ExternalWikiService') } scope :active, -> { where(active: true) } scope :without_defaults, -> { where(default: false) } @@ -212,4 +214,10 @@ class Service < ActiveRecord::Base project.cache_has_external_issue_tracker end end + + def cache_project_has_external_wiki + if project && !project.destroyed? + project.cache_has_external_wiki + end + end end diff --git a/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb b/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb new file mode 100644 index 00000000000..55a3e954292 --- /dev/null +++ b/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb @@ -0,0 +1,7 @@ +class AddHasExternalWikiToProjects < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + def change + add_column :projects, :has_external_wiki, :boolean + end +end diff --git a/db/schema.rb b/db/schema.rb index 8882377f9f4..ebf31ded369 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160716115710) do +ActiveRecord::Schema.define(version: 20160718153603) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -842,6 +842,7 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.boolean "only_allow_merge_if_build_succeeds", default: false, null: false t.boolean "has_external_issue_tracker" t.string "repository_storage", default: "default", null: false + t.boolean "has_external_wiki" end add_index "projects", ["builds_enabled", "shared_runners_enabled"], name: "index_projects_on_builds_enabled_and_shared_runners_enabled", using: :btree diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 9dc34276f18..e3e7319beb2 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -458,6 +458,47 @@ describe Project, models: true do end end + describe "#cache_has_external_wiki" do + let(:project) { create(:project) } + + it "stores true if there is an external wiki" do + services = double(:service, external_wikis: [ExternalWikiService.new]) + expect(project).to receive(:services).and_return(services) + + expect do + project.cache_has_external_wiki + end.to change { project.has_external_wiki }.to(true) + end + + it "stores false if there is no external wiki" do + services = double(:service, external_wikis: []) + expect(project).to receive(:services).and_return(services) + + expect do + project.cache_has_external_wiki + end.to change { project.has_external_wiki }.to(false) + end + + it "changes to true if an external wiki service is created later" do + expect do + project.cache_has_external_wiki + end.to change { project.has_external_wiki }.to(false) + + expect do + create(:service, type: "ExternalWikiService", project: project) + end.to change { project.has_external_wiki }.to(true) + end + + it "changes to false if an external wiki service is destroyed later" do + service = create(:service, type: "ExternalWikiService", project: project) + expect(project.has_external_wiki).to be_truthy + + expect do + service.destroy + end.to change { project.has_external_wiki }.to(false) + end + end + describe '#open_branches' do let(:project) { create(:project) } -- cgit v1.2.1 From 0301fa8d9c67623c3311eab64d174123bba4b943 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Tue, 19 Jul 2016 06:47:26 -0700 Subject: Add new icons for every CI status --- app/assets/stylesheets/pages/issues.scss | 8 ++++++++ app/assets/stylesheets/pages/merge_requests.scss | 14 ++++++++++++- app/assets/stylesheets/pages/pipelines.scss | 7 +++---- app/assets/stylesheets/pages/status.scss | 23 ++++++++-------------- app/helpers/ci_status_helper.rb | 14 +++++++------ .../projects/ci/pipelines/_pipeline.html.haml | 2 +- app/views/shared/icons/_icon_running.svg | 12 ----------- app/views/shared/icons/_icon_status_passed.svg | 15 -------------- app/views/shared/icons/_icon_status_running.svg | 12 +++++++++++ app/views/shared/icons/_icon_status_success.svg | 15 ++++++++++++++ 10 files changed, 68 insertions(+), 54 deletions(-) delete mode 100644 app/views/shared/icons/_icon_running.svg delete mode 100644 app/views/shared/icons/_icon_status_passed.svg create mode 100644 app/views/shared/icons/_icon_status_running.svg create mode 100644 app/views/shared/icons/_icon_status_success.svg diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index 9807c5a808d..ee3b2d2b801 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -78,6 +78,14 @@ form.edit-issue { } } +.merge-request-ci-status { + svg { + margin-right: 4px; + position: relative; + top: 1px; + } +} + @media (max-width: $screen-xs-max) { .issue-btn-group { width: 100%; diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index fbff0c97355..5254faf723d 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -60,8 +60,10 @@ .ci_widget { border-bottom: 1px solid #eef0f2; - i { + svg { margin-right: 4px; + position: relative; + top: 1px; } &.ci-success { @@ -196,6 +198,16 @@ .merge-request-title { margin-bottom: 2px; + + .ci-status-link { + + svg { + height: 16px; + width: 16px; + position: relative; + top: 3px; + } + } } } diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 9cfd8d49318..1ff9b90c85e 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -49,7 +49,7 @@ .commit-link { - .ci-running { + .ci-status { svg { top: 1px; @@ -135,9 +135,8 @@ .stage-cell { svg { - height: 13px; - width: 13px; - margin-left: 3px; + height: 18px; + width: 18px; } } diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index a0e008c98e5..a22d4b6f6be 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -41,6 +41,14 @@ color: $blue-normal; border-color: $blue-normal; } + + svg { + height: 13px; + width: 13px; + position: relative; + top: 1px; + margin: 0 3px; + } } .ci-status-icon-success { @@ -62,18 +70,3 @@ color: $gl-gray; } } - -.ci-running, -.ci-status-icon-running { - svg { - height: 13px; - width: 13px; - position: relative; - top: 2px; - margin: 0 3px; - } - - &:hover { - text-decoration: none; - } -} diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index 5219a0ff47b..59a8365d60b 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -26,18 +26,20 @@ module CiStatusHelper icon_name = case status when 'success' - 'check' + 'icon_status_success' + when 'success_with_warnings' + 'icon_status_warning' when 'failed' - 'close' + 'icon_status_failed' when 'pending' - 'clock-o' + 'icon_status_pending' when 'running' - 'icon_running' + 'icon_status_running' else - 'circle' + 'icon_status_cancel' end - status == 'running' ? custom_icon(icon_name) : icon(icon_name + ' fw') + custom_icon(icon_name) end def render_commit_status(commit, tooltip_placement: 'auto left', cssclass: '') diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 7ae699832f6..26c4ffd2bd4 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -35,7 +35,7 @@ - stages_status = pipeline.statuses.latest.stages_status - stages.each do |stage| - %td + %td.stage-cell - status = stages_status[stage] - tooltip = "#{stage.titleize}: #{status || 'not found'}" - if status diff --git a/app/views/shared/icons/_icon_running.svg b/app/views/shared/icons/_icon_running.svg deleted file mode 100644 index 1b6a29958e6..00000000000 --- a/app/views/shared/icons/_icon_running.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/app/views/shared/icons/_icon_status_passed.svg b/app/views/shared/icons/_icon_status_passed.svg deleted file mode 100644 index 260eab013a3..00000000000 --- a/app/views/shared/icons/_icon_status_passed.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/views/shared/icons/_icon_status_running.svg b/app/views/shared/icons/_icon_status_running.svg new file mode 100644 index 00000000000..a48b3a25099 --- /dev/null +++ b/app/views/shared/icons/_icon_status_running.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/app/views/shared/icons/_icon_status_success.svg b/app/views/shared/icons/_icon_status_success.svg new file mode 100644 index 00000000000..260eab013a3 --- /dev/null +++ b/app/views/shared/icons/_icon_status_success.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + -- cgit v1.2.1 From 293d31ca87f07a75a8402931b8116dc8666da55d Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Tue, 19 Jul 2016 06:52:06 -0700 Subject: Vertically align status icon within table --- app/assets/stylesheets/pages/pipelines.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 1ff9b90c85e..a404f108dc4 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -137,6 +137,7 @@ svg { height: 18px; width: 18px; + vertical-align: middle; } } -- cgit v1.2.1 From 6054c855a082fd822611d358914ac20695608e5b Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 19 Jul 2016 22:08:16 +0800 Subject: Only allow branches/tags, disallow SHA: Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13170854 --- app/models/ci/pipeline.rb | 7 ++----- spec/requests/api/builds_spec.rb | 8 -------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index fab91bdae5a..7efa67466c1 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -20,12 +20,9 @@ module Ci after_touch :update_state after_save :keep_around_commits - # ref can't be HEAD, can only be branch/tag name or SHA + # ref can't be HEAD or SHA, can only be branch/tag name scope :latest_successful_for, ->(ref) do - table = quoted_table_name - # TODO: Use `where(ref: ref).or(sha: ref)` in Rails 5 - where("#{table}.ref = ? OR #{table}.sha = ?", ref, ref). - success.order(id: :desc) + where(ref: ref).success.order(id: :desc) end def self.truncate_sha(sha) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 47bcc0eebdd..20d3ed61123 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -255,14 +255,6 @@ describe API::API, api: true do create(:ci_build, status, :artifacts, pipeline: new_pipeline) end - context 'with sha' do - before do - get path_from_ref(pipeline.sha) - end - - it('gives the file') { verify } - end - context 'with regular branch' do before do pipeline.update(ref: 'master', -- cgit v1.2.1 From 0882355db354e295fe541d823433d0f43969380e Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 19 Jul 2016 22:12:28 +0800 Subject: CHANGELOG for downloading latest successful build API --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 93a47b87d63..490ff151b76 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,7 @@ v 8.10.0 (unreleased) - Add Application Setting to configure default Repository Path for new projects - Delete award emoji when deleting a user - Remove pinTo from Flash and make inline flash messages look nicer !4854 (winniehell) + - Add an API for downloading latest successful build from a particular branch or tag !5347 - Wrap code blocks on Activies and Todos page. !4783 (winniehell) - Align flash messages with left side of page content !4959 (winniehell) - Display tooltip for "Copy to Clipboard" button !5164 (winniehell) -- cgit v1.2.1 From ff059360587f61907fb0a2691984ddd05fe049b9 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 19 Jul 2016 15:27:29 +0100 Subject: fixes an issue cause by a bad merge --- app/models/repository.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 48a68b44975..1a2ac90da51 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -741,7 +741,8 @@ class Repository options[:author] = committer options[:commit] = { message: message, - branch: ref + branch: ref, + update_ref: false } options[:file] = { -- cgit v1.2.1 From f2969b1bb08cbe1d2111e975a2a75d66c16acbef Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:23:45 +0800 Subject: Artifacts are plural, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173284 --- lib/api/builds.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/api/builds.rb b/lib/api/builds.rb index bb9e8f1ae6e..7e5114052c4 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -70,7 +70,7 @@ module API build = get_build!(params[:build_id]) - present_artifact!(build.artifacts_file) + present_artifacts!(build.artifacts_file) end # Download the artifacts file from ref_name and job @@ -86,7 +86,7 @@ module API builds = user_project.latest_successful_builds_for(params[:ref_name]) latest_build = builds.find_by!(name: params[:job]) - present_artifact!(latest_build.artifacts_file) + present_artifacts!(latest_build.artifacts_file) end # Get a trace of a specific build of a project @@ -198,7 +198,7 @@ module API get_build(id) || not_found! end - def present_artifact!(artifacts_file) + def present_artifacts!(artifacts_file) if !artifacts_file.file_storage? redirect_to(build.artifacts_file.url) elsif artifacts_file.exists? -- cgit v1.2.1 From cd449a736b375094d26d5fc62f973e00e0fb207a Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:26:40 +0800 Subject: Remove descriptions for simple case, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173304 --- spec/models/build_spec.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index bd120e84c8f..ac148cec6b0 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -662,9 +662,7 @@ describe Ci::Build, models: true do build.run! end - it 'returns false' do - expect(build).not_to be_retryable - end + it { expect(build).not_to be_retryable } end context 'when build is finished' do @@ -672,9 +670,7 @@ describe Ci::Build, models: true do build.success! end - it 'returns true' do - expect(build).to be_retryable - end + it { expect(build).to be_retryable } end end -- cgit v1.2.1 From c3c0406a7e4ead20aae1b06a590ee346cb2f4b75 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:29:36 +0800 Subject: Use let! feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173336 let! is not very flexible but I guess it's fine since this is not in top-level anyway. --- spec/models/build_spec.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index ac148cec6b0..7333a8151cc 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -675,14 +675,10 @@ describe Ci::Build, models: true do end describe 'Project#latest_successful_builds_for' do - let(:build) do + let!(:build) do create(:ci_build, :artifacts, :success, pipeline: pipeline) end - before do - build - end - context 'with succeed pipeline' do it 'returns builds from ref' do builds = project.latest_successful_builds_for('fix') -- cgit v1.2.1 From 42656104864ce2078f587ad35cb89942d7b48c6d Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:30:33 +0800 Subject: Use for, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173345 --- spec/models/build_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 7333a8151cc..157b11d9130 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -680,7 +680,7 @@ describe Ci::Build, models: true do end context 'with succeed pipeline' do - it 'returns builds from ref' do + it 'returns builds for ref' do builds = project.latest_successful_builds_for('fix') expect(builds).to contain_exactly(build) -- cgit v1.2.1 From 43b6a3eac14a3fb96ed248120c31b41ba8cd6a06 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:33:31 +0800 Subject: Check against type explicit, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173368 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173370 --- spec/models/build_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 157b11d9130..e4fdfdcf03e 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -687,8 +687,9 @@ describe Ci::Build, models: true do end it 'returns empty relation if the build cannot be found' do - builds = project.latest_successful_builds_for('TAIL').all + builds = project.latest_successful_builds_for('TAIL') + expect(builds).to be_kind_of(ActiveRecord::Relation) expect(builds).to be_empty end end @@ -699,8 +700,9 @@ describe Ci::Build, models: true do end it 'returns empty relation' do - builds = project.latest_successful_builds_for('fix').all + builds = project.latest_successful_builds_for('fix') + expect(builds).to be_kind_of(ActiveRecord::Relation) expect(builds).to be_empty end end -- cgit v1.2.1 From 361f3d067cd69df9ab4f9f5af0b72bc213edc283 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:37:42 +0800 Subject: when unauthorized, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173429 --- spec/requests/api/builds_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 20d3ed61123..6505a75e9c8 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -205,7 +205,7 @@ describe API::API, api: true do api("/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}", user) end - context 'not logging in' do + context 'when unauthorized' do let(:user) { nil } before do -- cgit v1.2.1 From 6da27aa6a583ddb4d73b9dfaaaa3e9fdf98e9a6d Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:38:50 +0800 Subject: Drop description for simple case, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173445 --- spec/requests/api/builds_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 6505a75e9c8..ef489a1ee90 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -212,9 +212,7 @@ describe API::API, api: true do get path_from_ref end - it 'gives 401 for unauthorized user' do - expect(response).to have_http_status(401) - end + it { expect(response).to have_http_status(401) } end context 'non-existing build' do -- cgit v1.2.1 From ae83ac9969973fe58bc0ec3b65bd6071fad8623f Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:39:41 +0800 Subject: path_from_ref -> path_for_ref, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173404 --- spec/requests/api/builds_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index ef489a1ee90..f28c027287f 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -201,7 +201,7 @@ describe API::API, api: true do project.team << [user, :developer] end - def path_from_ref(ref = pipeline.ref, job = build.name) + def path_for_ref(ref = pipeline.ref, job = build.name) api("/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}", user) end @@ -209,7 +209,7 @@ describe API::API, api: true do let(:user) { nil } before do - get path_from_ref + get path_for_ref end it { expect(response).to have_http_status(401) } @@ -222,7 +222,7 @@ describe API::API, api: true do context 'has no such ref' do before do - get path_from_ref('TAIL', build.name) + get path_for_ref('TAIL', build.name) end it('gives 404') { verify } @@ -230,7 +230,7 @@ describe API::API, api: true do context 'has no such build' do before do - get path_from_ref(pipeline.ref, 'NOBUILD') + get path_for_ref(pipeline.ref, 'NOBUILD') end it('gives 404') { verify } @@ -260,7 +260,7 @@ describe API::API, api: true do end before do - get path_from_ref('master') + get path_for_ref('master') end it('gives the file') { verify } @@ -273,7 +273,7 @@ describe API::API, api: true do end before do - get path_from_ref('improve/awesome') + get path_for_ref('improve/awesome') end it('gives the file') { verify } @@ -287,7 +287,7 @@ describe API::API, api: true do end before do - get path_from_ref + get path_for_ref end it('gives the file') { verify } @@ -300,7 +300,7 @@ describe API::API, api: true do end before do - get path_from_ref + get path_for_ref end it('gives the file') { verify } -- cgit v1.2.1 From c266c7fa18848586cd6ee903cc4c4d4f9049100e Mon Sep 17 00:00:00 2001 From: Eric Hayes Date: Sat, 2 Apr 2016 22:00:06 -0700 Subject: First support of videos in issues, MRs and notes * Registered video MIME types * Currently supporting browser-supported formats with extensions that match the mime type --- app/assets/javascripts/application.js.coffee | 1 + app/assets/javascripts/video_setup.js.coffee | 3 + app/assets/stylesheets/application.scss | 5 + app/controllers/projects/uploads_controller.rb | 8 +- app/uploaders/file_uploader.rb | 6 +- app/uploaders/uploader_helper.rb | 26 +- config/initializers/mime_types.rb | 10 +- lib/banzai/filter/video_link_filter.rb | 42 + lib/banzai/pipeline/gfm_pipeline.rb | 1 + spec/fixtures/video_sample.mp4 | Bin 0 -> 59122 bytes spec/lib/banzai/filter/video_link_filter_spec.rb | 36 + spec/uploaders/file_uploader_spec.rb | 42 + vendor/assets/javascripts/videojs/font/VideoJS.eot | Bin 0 -> 5780 bytes vendor/assets/javascripts/videojs/font/VideoJS.svg | 99 + vendor/assets/javascripts/videojs/font/VideoJS.ttf | Bin 0 -> 5616 bytes .../assets/javascripts/videojs/font/VideoJS.woff | Bin 0 -> 3632 bytes vendor/assets/javascripts/videojs/video-js.css | 1264 + vendor/assets/javascripts/videojs/video-js.min.css | 1 + vendor/assets/javascripts/videojs/video-js.swf | Bin 0 -> 16794 bytes vendor/assets/javascripts/videojs/video.js | 22872 +++++++++++++++++++ vendor/assets/javascripts/videojs/video.js.map | 303 + vendor/assets/javascripts/videojs/video.min.js | 23 + vendor/assets/javascripts/videojs/video.min.js.map | 1 + 23 files changed, 24729 insertions(+), 14 deletions(-) create mode 100644 app/assets/javascripts/video_setup.js.coffee create mode 100644 lib/banzai/filter/video_link_filter.rb create mode 100644 spec/fixtures/video_sample.mp4 create mode 100644 spec/lib/banzai/filter/video_link_filter_spec.rb create mode 100644 spec/uploaders/file_uploader_spec.rb create mode 100755 vendor/assets/javascripts/videojs/font/VideoJS.eot create mode 100755 vendor/assets/javascripts/videojs/font/VideoJS.svg create mode 100755 vendor/assets/javascripts/videojs/font/VideoJS.ttf create mode 100755 vendor/assets/javascripts/videojs/font/VideoJS.woff create mode 100755 vendor/assets/javascripts/videojs/video-js.css create mode 100755 vendor/assets/javascripts/videojs/video-js.min.css create mode 100755 vendor/assets/javascripts/videojs/video-js.swf create mode 100755 vendor/assets/javascripts/videojs/video.js create mode 100755 vendor/assets/javascripts/videojs/video.js.map create mode 100755 vendor/assets/javascripts/videojs/video.min.js create mode 100755 vendor/assets/javascripts/videojs/video.min.js.map diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index eceff6d91d5..c98763d6271 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -53,6 +53,7 @@ #= require_directory ./u2f #= require_directory . #= require fuzzaldrin-plus +#= require u2f window.slugify = (text) -> text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase() diff --git a/app/assets/javascripts/video_setup.js.coffee b/app/assets/javascripts/video_setup.js.coffee new file mode 100644 index 00000000000..01aea2d5c99 --- /dev/null +++ b/app/assets/javascripts/video_setup.js.coffee @@ -0,0 +1,3 @@ +# Disables dynamic sizing of video tag, which defaults to 300px. +# Without this the video naturally fills the container. +window.VIDEOJS_NO_DYNAMIC_STYLE = true diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 8b93665d085..c39c2947dd0 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -29,6 +29,11 @@ */ @import "font-awesome"; +/* + * Styles for VideoJS. + */ +@import "videojs/video-js"; + /* * Page specific styles (issues, projects etc): */ diff --git a/app/controllers/projects/uploads_controller.rb b/app/controllers/projects/uploads_controller.rb index caed064dfbc..e617be8f9fb 100644 --- a/app/controllers/projects/uploads_controller.rb +++ b/app/controllers/projects/uploads_controller.rb @@ -1,6 +1,6 @@ class Projects::UploadsController < Projects::ApplicationController skip_before_action :reject_blocked!, :project, - :repository, if: -> { action_name == 'show' && image? } + :repository, if: -> { action_name == 'show' && image_or_video? } before_action :authorize_upload_file!, only: [:create] @@ -24,7 +24,7 @@ class Projects::UploadsController < Projects::ApplicationController def show return render_404 if uploader.nil? || !uploader.file.exists? - disposition = uploader.image? ? 'inline' : 'attachment' + disposition = uploader.image_or_video? ? 'inline' : 'attachment' send_file uploader.file.path, disposition: disposition end @@ -49,7 +49,7 @@ class Projects::UploadsController < Projects::ApplicationController @uploader end - def image? - uploader && uploader.file.exists? && uploader.image? + def image_or_video? + uploader && uploader.file.exists? && uploader.image_or_video? end end diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb index 1af9e9b0edb..80284fa294a 100644 --- a/app/uploaders/file_uploader.rb +++ b/app/uploaders/file_uploader.rb @@ -33,16 +33,16 @@ class FileUploader < CarrierWave::Uploader::Base end def to_h - filename = image? ? self.file.basename : self.file.filename + filename = image_or_video? ? self.file.basename : self.file.filename escaped_filename = filename.gsub("]", "\\]") markdown = "[#{escaped_filename}](#{self.secure_url})" - markdown.prepend("!") if image? + markdown.prepend("!") if image_or_video? { alt: filename, url: self.secure_url, - is_image: image?, + is_image: image_or_video?, markdown: markdown } end diff --git a/app/uploaders/uploader_helper.rb b/app/uploaders/uploader_helper.rb index 5ef440f3367..6d510fe7dde 100644 --- a/app/uploaders/uploader_helper.rb +++ b/app/uploaders/uploader_helper.rb @@ -1,16 +1,32 @@ # Extra methods for uploader module UploaderHelper + IMAGE_EXT = %w(png jpg jpeg gif bmp tiff) + VIDEO_EXT = %w(mov mp4 ogg webm flv) + def image? - img_ext = %w(png jpg jpeg gif bmp tiff) + extension_match?(IMAGE_EXT) + rescue + false + end + + def video? + extension_match?(VIDEO_EXT) + rescue + false + end + + def image_or_video? + image? || video? + end + + def extension_match?(extensions) if file.respond_to?(:extension) - img_ext.include?(file.extension.downcase) + extensions.include?(file.extension.downcase) else # Not all CarrierWave storages respond to :extension ext = file.path.split('.').last.downcase - img_ext.include?(ext) + extensions.include?(ext) end - rescue - false end def file_storage? diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index ca58ae92d1b..4c6de622f17 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -6,5 +6,11 @@ Mime::Type.register_alias "text/plain", :diff Mime::Type.register_alias "text/plain", :patch -Mime::Type.register_alias 'text/html', :markdown -Mime::Type.register_alias 'text/html', :md +Mime::Type.register_alias "text/html", :markdown +Mime::Type.register_alias "text/html", :md + +Mime::Type.register "video/webm", :webm +Mime::Type.register "video/ogg", :ogg +Mime::Type.register "video/ogg", :ogv +Mime::Type.register "video/mp4", :mp4 +Mime::Type.register "video/mp4", :m4v diff --git a/lib/banzai/filter/video_link_filter.rb b/lib/banzai/filter/video_link_filter.rb new file mode 100644 index 00000000000..0ae885708f7 --- /dev/null +++ b/lib/banzai/filter/video_link_filter.rb @@ -0,0 +1,42 @@ +module Banzai + module Filter + + # HTML Filter that handles video uploads. + + class VideoLinkFilter < HTML::Pipeline::Filter + include ActionView::Helpers::TagHelper + include ActionView::Context + + EXTENSIONS = %w(.mov .mp4 .ogg .webm .flv) + + def call + doc.search('img').each do |el| + if video?(el) + el.replace video_node(el) + end + end + + doc + end + + private + + def video?(element) + EXTENSIONS.include? File.extname(element.attribute('src').value) + end + + # Return a video tag Nokogiri node + # + def video_node(element) + vtag = content_tag(:video, "", { + src: element.attribute('src').value, + class: 'video-js', preload: 'auto', + controls: true + }) + + Nokogiri::HTML::DocumentFragment.parse(vtag) + end + end + + end +end diff --git a/lib/banzai/pipeline/gfm_pipeline.rb b/lib/banzai/pipeline/gfm_pipeline.rb index b27ecf3c923..d9edca7046c 100644 --- a/lib/banzai/pipeline/gfm_pipeline.rb +++ b/lib/banzai/pipeline/gfm_pipeline.rb @@ -8,6 +8,7 @@ module Banzai Filter::UploadLinkFilter, Filter::ImageLinkFilter, + Filter::VideoLinkFilter, Filter::EmojiFilter, Filter::TableOfContentsFilter, Filter::AutolinkFilter, diff --git a/spec/fixtures/video_sample.mp4 b/spec/fixtures/video_sample.mp4 new file mode 100644 index 00000000000..acd45190998 Binary files /dev/null and b/spec/fixtures/video_sample.mp4 differ diff --git a/spec/lib/banzai/filter/video_link_filter_spec.rb b/spec/lib/banzai/filter/video_link_filter_spec.rb new file mode 100644 index 00000000000..8ccfb9c0fca --- /dev/null +++ b/spec/lib/banzai/filter/video_link_filter_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper' + +describe Banzai::Filter::VideoLinkFilter, lib: true do + def filter(doc, contexts = {}) + contexts.reverse_merge!({ + project: project + }) + + described_class.call(doc, contexts) + end + + def image(path) + %() + end + + let(:project) { create(:project) } + + context 'when the element src has a video extension' do + it 'replaces the image tag with a video tag' do + doc = filter(image("/path/video.mov")) + element = doc.children.first + expect(element.name).to eq( "video" ) + expect(element['src']).to eq( "/path/video.mov" ) + end + end + + context 'when the element src is an image' do + it 'leaves the document unchanged' do + doc = filter(image("/path/my_image.jpg")) + element = doc.children.first + expect(element.name).to eq( "img" ) + end + end + + +end diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb new file mode 100644 index 00000000000..b59f44e0a65 --- /dev/null +++ b/spec/uploaders/file_uploader_spec.rb @@ -0,0 +1,42 @@ +require "spec_helper" + +# provides matchers like `have_dimensions` +# https://github.com/carrierwaveuploader/carrierwave#testing-with-carrierwave +# require "carrierwave/test/matchers" + + +describe FileUploader do + # include CarrierWave::Test::Matchers + + let(:project){ create(:project) } + + let(:image_file){ File.new Rails.root.join("spec", "fixtures", "rails_sample.jpg") } + let(:video_file){ File.new Rails.root.join("spec", "fixtures", "video_sample.mp4") } + let(:text_file) { File.new Rails.root.join("spec", "fixtures", "doc_sample.txt") } + + before do + FileUploader.enable_processing = false + @uploader = FileUploader.new(project) + end + + after do + FileUploader.enable_processing = true + @uploader.remove! + end + + it "should detect an image based on file extension" do + @uploader.store!(image_file) + expect(@uploader.image_or_video?).to be true + end + + it "should detect a video based on file extension" do + @uploader.store!(video_file) + expect(@uploader.image_or_video?).to be true + end + + it "should not return image_or_video? for other types" do + @uploader.store!(text_file) + expect(@uploader.image_or_video?).to be false + end + +end diff --git a/vendor/assets/javascripts/videojs/font/VideoJS.eot b/vendor/assets/javascripts/videojs/font/VideoJS.eot new file mode 100755 index 00000000000..a47889f9303 Binary files /dev/null and b/vendor/assets/javascripts/videojs/font/VideoJS.eot differ diff --git a/vendor/assets/javascripts/videojs/font/VideoJS.svg b/vendor/assets/javascripts/videojs/font/VideoJS.svg new file mode 100755 index 00000000000..7741c677803 --- /dev/null +++ b/vendor/assets/javascripts/videojs/font/VideoJS.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/assets/javascripts/videojs/font/VideoJS.ttf b/vendor/assets/javascripts/videojs/font/VideoJS.ttf new file mode 100755 index 00000000000..6ddd3f26d79 Binary files /dev/null and b/vendor/assets/javascripts/videojs/font/VideoJS.ttf differ diff --git a/vendor/assets/javascripts/videojs/font/VideoJS.woff b/vendor/assets/javascripts/videojs/font/VideoJS.woff new file mode 100755 index 00000000000..a85d38e8751 Binary files /dev/null and b/vendor/assets/javascripts/videojs/font/VideoJS.woff differ diff --git a/vendor/assets/javascripts/videojs/video-js.css b/vendor/assets/javascripts/videojs/video-js.css new file mode 100755 index 00000000000..a5c93724df3 --- /dev/null +++ b/vendor/assets/javascripts/videojs/video-js.css @@ -0,0 +1,1264 @@ +.video-js .vjs-big-play-button:before, .video-js .vjs-control:before, .video-js .vjs-modal-dialog, .vjs-modal-dialog .vjs-modal-dialog-content { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } + +.video-js .vjs-big-play-button:before, .video-js .vjs-control:before { + text-align: center; } + +@font-face { + font-family: VideoJS; + src: url("font/VideoJS.eot?#iefix") format("eot"); } + +@font-face { + font-family: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AAAAAAAAAAAAAAAAAAAAAAB4AAAECAQMBBAEFAQYBBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4EcGxheQtwbGF5LWNpcmNsZQVwYXVzZQt2b2x1bWUtbXV0ZQp2b2x1bWUtbG93CnZvbHVtZS1taWQLdm9sdW1lLWhpZ2gQZnVsbHNjcmVlbi1lbnRlcg9mdWxsc2NyZWVuLWV4aXQGc3F1YXJlB3NwaW5uZXIJc3VidGl0bGVzCGNhcHRpb25zCGNoYXB0ZXJzBXNoYXJlA2NvZwZjaXJjbGUOY2lyY2xlLW91dGxpbmUTY2lyY2xlLWlubmVyLWNpcmNsZQJoZAZjYW5jZWwGcmVwbGF5CGZhY2Vib29rBWdwbHVzCGxpbmtlZGluB3R3aXR0ZXIGdHVtYmxyCXBpbnRlcmVzdBFhdWRpby1kZXNjcmlwdGlvbgAAAAAA) format("truetype"); + font-weight: normal; + font-style: normal; } + +.vjs-icon-play, .video-js .vjs-big-play-button, .video-js .vjs-play-control { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-play:before, .video-js .vjs-big-play-button:before, .video-js .vjs-play-control:before { + content: '\f101'; } + +.vjs-icon-play-circle { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-play-circle:before { + content: '\f102'; } + +.vjs-icon-pause, .video-js .vjs-play-control.vjs-playing { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-pause:before, .video-js .vjs-play-control.vjs-playing:before { + content: '\f103'; } + +.vjs-icon-volume-mute, .video-js .vjs-mute-control.vjs-vol-0, +.video-js .vjs-volume-menu-button.vjs-vol-0 { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-volume-mute:before, .video-js .vjs-mute-control.vjs-vol-0:before, + .video-js .vjs-volume-menu-button.vjs-vol-0:before { + content: '\f104'; } + +.vjs-icon-volume-low, .video-js .vjs-mute-control.vjs-vol-1, +.video-js .vjs-volume-menu-button.vjs-vol-1 { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-volume-low:before, .video-js .vjs-mute-control.vjs-vol-1:before, + .video-js .vjs-volume-menu-button.vjs-vol-1:before { + content: '\f105'; } + +.vjs-icon-volume-mid, .video-js .vjs-mute-control.vjs-vol-2, +.video-js .vjs-volume-menu-button.vjs-vol-2 { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-volume-mid:before, .video-js .vjs-mute-control.vjs-vol-2:before, + .video-js .vjs-volume-menu-button.vjs-vol-2:before { + content: '\f106'; } + +.vjs-icon-volume-high, .video-js .vjs-mute-control, +.video-js .vjs-volume-menu-button { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-volume-high:before, .video-js .vjs-mute-control:before, + .video-js .vjs-volume-menu-button:before { + content: '\f107'; } + +.vjs-icon-fullscreen-enter, .video-js .vjs-fullscreen-control { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-fullscreen-enter:before, .video-js .vjs-fullscreen-control:before { + content: '\f108'; } + +.vjs-icon-fullscreen-exit, .video-js.vjs-fullscreen .vjs-fullscreen-control { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-fullscreen-exit:before, .video-js.vjs-fullscreen .vjs-fullscreen-control:before { + content: '\f109'; } + +.vjs-icon-square { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-square:before { + content: '\f10a'; } + +.vjs-icon-spinner { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-spinner:before { + content: '\f10b'; } + +.vjs-icon-subtitles, .video-js .vjs-subtitles-button { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-subtitles:before, .video-js .vjs-subtitles-button:before { + content: '\f10c'; } + +.vjs-icon-captions, .video-js .vjs-captions-button { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-captions:before, .video-js .vjs-captions-button:before { + content: '\f10d'; } + +.vjs-icon-chapters, .video-js .vjs-chapters-button { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-chapters:before, .video-js .vjs-chapters-button:before { + content: '\f10e'; } + +.vjs-icon-share { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-share:before { + content: '\f10f'; } + +.vjs-icon-cog { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-cog:before { + content: '\f110'; } + +.vjs-icon-circle, .video-js .vjs-mouse-display, .video-js .vjs-play-progress, .video-js .vjs-volume-level { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-circle:before, .video-js .vjs-mouse-display:before, .video-js .vjs-play-progress:before, .video-js .vjs-volume-level:before { + content: '\f111'; } + +.vjs-icon-circle-outline { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-circle-outline:before { + content: '\f112'; } + +.vjs-icon-circle-inner-circle { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-circle-inner-circle:before { + content: '\f113'; } + +.vjs-icon-hd { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-hd:before { + content: '\f114'; } + +.vjs-icon-cancel, .video-js .vjs-control.vjs-close-button { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-cancel:before, .video-js .vjs-control.vjs-close-button:before { + content: '\f115'; } + +.vjs-icon-replay { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-replay:before { + content: '\f116'; } + +.vjs-icon-facebook { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-facebook:before { + content: '\f117'; } + +.vjs-icon-gplus { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-gplus:before { + content: '\f118'; } + +.vjs-icon-linkedin { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-linkedin:before { + content: '\f119'; } + +.vjs-icon-twitter { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-twitter:before { + content: '\f11a'; } + +.vjs-icon-tumblr { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-tumblr:before { + content: '\f11b'; } + +.vjs-icon-pinterest { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-pinterest:before { + content: '\f11c'; } + +.vjs-icon-audio-description, .video-js .vjs-descriptions-button { + font-family: VideoJS; + font-weight: normal; + font-style: normal; } + .vjs-icon-audio-description:before, .video-js .vjs-descriptions-button:before { + content: '\f11d'; } + +.video-js { + display: block; + vertical-align: top; + box-sizing: border-box; + color: #fff; + background-color: #000; + position: relative; + padding: 0; + font-size: 10px; + line-height: 1; + font-weight: normal; + font-style: normal; + font-family: Arial, Helvetica, sans-serif; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .video-js:-moz-full-screen { + position: absolute; } + .video-js:-webkit-full-screen { + width: 100% !important; + height: 100% !important; } + +.video-js *, +.video-js *:before, +.video-js *:after { + box-sizing: inherit; } + +.video-js ul { + font-family: inherit; + font-size: inherit; + line-height: inherit; + list-style-position: outside; + margin-left: 0; + margin-right: 0; + margin-top: 0; + margin-bottom: 0; } + +.video-js.vjs-fluid, +.video-js.vjs-16-9, +.video-js.vjs-4-3 { + width: 100%; + max-width: 100%; + height: 0; } + +.video-js.vjs-16-9 { + padding-top: 56.25%; } + +.video-js.vjs-4-3 { + padding-top: 75%; } + +.video-js.vjs-fill { + width: 100%; + height: 100%; } + +.video-js .vjs-tech { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } + +body.vjs-full-window { + padding: 0; + margin: 0; + height: 100%; + overflow-y: auto; } + +.vjs-full-window .video-js.vjs-fullscreen { + position: fixed; + overflow: hidden; + z-index: 1000; + left: 0; + top: 0; + bottom: 0; + right: 0; } + +.video-js.vjs-fullscreen { + width: 100% !important; + height: 100% !important; + padding-top: 0 !important; } + +.video-js.vjs-fullscreen.vjs-user-inactive { + cursor: none; } + +.vjs-hidden { + display: none !important; } + +.vjs-disabled { + opacity: 0.5; + cursor: default; } + +.video-js .vjs-offscreen { + height: 1px; + left: -9999px; + position: absolute; + top: 0; + width: 1px; } + +.vjs-lock-showing { + display: block !important; + opacity: 1; + visibility: visible; } + +.vjs-no-js { + padding: 20px; + color: #fff; + background-color: #000; + font-size: 18px; + font-family: Arial, Helvetica, sans-serif; + text-align: center; + width: 300px; + height: 150px; + margin: 0px auto; } + +.vjs-no-js a, +.vjs-no-js a:visited { + color: #66A8CC; } + +.video-js .vjs-big-play-button { + font-size: 3em; + line-height: 1.5em; + height: 1.5em; + width: 3em; + display: block; + position: absolute; + top: 10px; + left: 10px; + padding: 0; + cursor: pointer; + opacity: 1; + border: 0.06666em solid #fff; + background-color: #2B333F; + background-color: rgba(43, 51, 63, 0.7); + -webkit-border-radius: 0.3em; + -moz-border-radius: 0.3em; + border-radius: 0.3em; + -webkit-transition: all 0.4s; + -moz-transition: all 0.4s; + -o-transition: all 0.4s; + transition: all 0.4s; } + +.vjs-big-play-centered .vjs-big-play-button { + top: 50%; + left: 50%; + margin-top: -0.75em; + margin-left: -1.5em; } + +.video-js:hover .vjs-big-play-button, +.video-js .vjs-big-play-button:focus { + outline: 0; + border-color: #fff; + background-color: #73859f; + background-color: rgba(115, 133, 159, 0.5); + -webkit-transition: all 0s; + -moz-transition: all 0s; + -o-transition: all 0s; + transition: all 0s; } + +.vjs-controls-disabled .vjs-big-play-button, +.vjs-has-started .vjs-big-play-button, +.vjs-using-native-controls .vjs-big-play-button, +.vjs-error .vjs-big-play-button { + display: none; } + +.video-js button { + background: none; + border: none; + color: inherit; + display: inline-block; + overflow: visible; + font-size: inherit; + line-height: inherit; + text-transform: none; + text-decoration: none; + transition: none; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; } + +.video-js .vjs-control.vjs-close-button { + cursor: pointer; + height: 3em; + position: absolute; + right: 0; + top: 0.5em; + z-index: 2; } + +.vjs-menu-button { + cursor: pointer; } + +.vjs-menu-button.vjs-disabled { + cursor: default; } + +.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu { + display: none; } + +.vjs-menu .vjs-menu-content { + display: block; + padding: 0; + margin: 0; + overflow: auto; } + +.vjs-scrubbing .vjs-menu-button:hover .vjs-menu { + display: none; } + +.vjs-menu li { + list-style: none; + margin: 0; + padding: 0.2em 0; + line-height: 1.4em; + font-size: 1.2em; + text-align: center; + text-transform: lowercase; } + +.vjs-menu li:focus, +.vjs-menu li:hover { + outline: 0; + background-color: #73859f; + background-color: rgba(115, 133, 159, 0.5); } + +.vjs-menu li.vjs-selected, +.vjs-menu li.vjs-selected:focus, +.vjs-menu li.vjs-selected:hover { + background-color: #fff; + color: #2B333F; } + +.vjs-menu li.vjs-menu-title { + text-align: center; + text-transform: uppercase; + font-size: 1em; + line-height: 2em; + padding: 0; + margin: 0 0 0.3em 0; + font-weight: bold; + cursor: default; } + +.vjs-menu-button-popup .vjs-menu { + display: none; + position: absolute; + bottom: 0; + width: 10em; + left: -3em; + height: 0em; + margin-bottom: 1.5em; + border-top-color: rgba(43, 51, 63, 0.7); } + +.vjs-menu-button-popup .vjs-menu .vjs-menu-content { + background-color: #2B333F; + background-color: rgba(43, 51, 63, 0.7); + position: absolute; + width: 100%; + bottom: 1.5em; + max-height: 15em; } + +.vjs-workinghover .vjs-menu-button-popup:hover .vjs-menu, +.vjs-menu-button-popup .vjs-menu.vjs-lock-showing { + display: block; } + +.video-js .vjs-menu-button-inline { + -webkit-transition: all 0.4s; + -moz-transition: all 0.4s; + -o-transition: all 0.4s; + transition: all 0.4s; + overflow: hidden; } + +.video-js .vjs-menu-button-inline:before { + width: 2.222222222em; } + +.video-js .vjs-menu-button-inline:hover, +.video-js .vjs-menu-button-inline:focus, +.video-js .vjs-menu-button-inline.vjs-slider-active, +.video-js.vjs-no-flex .vjs-menu-button-inline { + width: 12em; } + +.video-js .vjs-menu-button-inline.vjs-slider-active { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; } + +.vjs-menu-button-inline .vjs-menu { + opacity: 0; + height: 100%; + width: auto; + position: absolute; + left: 4em; + top: 0; + padding: 0; + margin: 0; + -webkit-transition: all 0.4s; + -moz-transition: all 0.4s; + -o-transition: all 0.4s; + transition: all 0.4s; } + +.vjs-menu-button-inline:hover .vjs-menu, +.vjs-menu-button-inline:focus .vjs-menu, +.vjs-menu-button-inline.vjs-slider-active .vjs-menu { + display: block; + opacity: 1; } + +.vjs-no-flex .vjs-menu-button-inline .vjs-menu { + display: block; + opacity: 1; + position: relative; + width: auto; } + +.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu, +.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu, +.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu { + width: auto; } + +.vjs-menu-button-inline .vjs-menu-content { + width: auto; + height: 100%; + margin: 0; + overflow: hidden; } + +.video-js .vjs-control-bar { + display: none; + width: 100%; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 3.0em; + background-color: #2B333F; + background-color: rgba(43, 51, 63, 0.7); } + +.vjs-has-started .vjs-control-bar { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + visibility: visible; + opacity: 1; + -webkit-transition: visibility 0.1s, opacity 0.1s; + -moz-transition: visibility 0.1s, opacity 0.1s; + -o-transition: visibility 0.1s, opacity 0.1s; + transition: visibility 0.1s, opacity 0.1s; } + +.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar { + visibility: hidden; + opacity: 0; + -webkit-transition: visibility 1s, opacity 1s; + -moz-transition: visibility 1s, opacity 1s; + -o-transition: visibility 1s, opacity 1s; + transition: visibility 1s, opacity 1s; } + +.vjs-controls-disabled .vjs-control-bar, +.vjs-using-native-controls .vjs-control-bar, +.vjs-error .vjs-control-bar { + display: none !important; } + +.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar { + opacity: 1; + visibility: visible; } + +@media \0screen { + .vjs-user-inactive.vjs-playing .vjs-control-bar :before { + content: ""; } } + +.vjs-has-started.vjs-no-flex .vjs-control-bar { + display: table; } + +.video-js .vjs-control { + outline: none; + position: relative; + text-align: center; + margin: 0; + padding: 0; + height: 100%; + width: 4em; + -webkit-box-flex: none; + -moz-box-flex: none; + -webkit-flex: none; + -ms-flex: none; + flex: none; } + .video-js .vjs-control:before { + font-size: 1.8em; + line-height: 1.67; } + +.video-js .vjs-control:focus:before, +.video-js .vjs-control:hover:before, +.video-js .vjs-control:focus { + text-shadow: 0em 0em 1em white; } + +.video-js .vjs-control-text { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; } + +.vjs-no-flex .vjs-control { + display: table-cell; + vertical-align: middle; } + +.video-js .vjs-custom-control-spacer { + display: none; } + +.video-js .vjs-progress-control { + -webkit-box-flex: auto; + -moz-box-flex: auto; + -webkit-flex: auto; + -ms-flex: auto; + flex: auto; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + min-width: 4em; } + +.vjs-live .vjs-progress-control { + display: none; } + +.video-js .vjs-progress-holder { + -webkit-box-flex: auto; + -moz-box-flex: auto; + -webkit-flex: auto; + -ms-flex: auto; + flex: auto; + -webkit-transition: all 0.2s; + -moz-transition: all 0.2s; + -o-transition: all 0.2s; + transition: all 0.2s; + height: 0.3em; } + +.video-js .vjs-progress-control:hover .vjs-progress-holder { + font-size: 1.666666666666666666em; } + +/* If we let the font size grow as much as everything else, the current time tooltip ends up + ginormous. If you'd like to enable the current time tooltip all the time, this should be disabled + to avoid a weird hitch when you roll off the hover. */ +.video-js .vjs-progress-control:hover .vjs-time-tooltip, +.video-js .vjs-progress-control:hover .vjs-mouse-display:after, +.video-js .vjs-progress-control:hover .vjs-play-progress:after { + font-family: Arial, Helvetica, sans-serif; + visibility: visible; + font-size: 0.6em; } + +.video-js .vjs-progress-holder .vjs-play-progress, +.video-js .vjs-progress-holder .vjs-load-progress, +.video-js .vjs-progress-holder .vjs-tooltip-progress-bar, +.video-js .vjs-progress-holder .vjs-load-progress div { + position: absolute; + display: block; + height: 0.3em; + margin: 0; + padding: 0; + width: 0; + left: 0; + top: 0; } + +.video-js .vjs-mouse-display:before { + display: none; } + +.video-js .vjs-play-progress { + background-color: #fff; } + .video-js .vjs-play-progress:before { + position: absolute; + top: -0.333333333333333em; + right: -0.5em; + font-size: 0.9em; } + +.video-js .vjs-time-tooltip, +.video-js .vjs-mouse-display:after, +.video-js .vjs-play-progress:after { + visibility: hidden; + pointer-events: none; + position: absolute; + top: -3.4em; + right: -1.9em; + font-size: 0.9em; + color: #000; + content: attr(data-current-time); + padding: 6px 8px 8px 8px; + background-color: #fff; + background-color: rgba(255, 255, 255, 0.8); + -webkit-border-radius: 0.3em; + -moz-border-radius: 0.3em; + border-radius: 0.3em; } + +.video-js .vjs-time-tooltip, +.video-js .vjs-play-progress:before, +.video-js .vjs-play-progress:after { + z-index: 1; } + +.video-js .vjs-progress-control .vjs-keep-tooltips-inside:after { + display: none; } + +.video-js .vjs-load-progress { + background: #bfc7d3; + background: rgba(115, 133, 159, 0.5); } + +.video-js .vjs-load-progress div { + background: white; + background: rgba(115, 133, 159, 0.75); } + +.video-js.vjs-no-flex .vjs-progress-control { + width: auto; } + +.video-js .vjs-time-tooltip { + display: inline-block; + height: 2.4em; + position: relative; + float: right; + right: -1.9em; } + +.vjs-tooltip-progress-bar { + visibility: hidden; } + +.video-js .vjs-progress-control .vjs-mouse-display { + display: none; + position: absolute; + width: 1px; + height: 100%; + background-color: #000; + z-index: 1; } + +.vjs-no-flex .vjs-progress-control .vjs-mouse-display { + z-index: 0; } + +.video-js .vjs-progress-control:hover .vjs-mouse-display { + display: block; } + +.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display, +.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display:after { + visibility: hidden; + opacity: 0; + -webkit-transition: visibility 1s, opacity 1s; + -moz-transition: visibility 1s, opacity 1s; + -o-transition: visibility 1s, opacity 1s; + transition: visibility 1s, opacity 1s; } + +.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display, +.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display:after { + display: none; } + +.vjs-mouse-display .vjs-time-tooltip, +.video-js .vjs-progress-control .vjs-mouse-display:after { + color: #fff; + background-color: #000; + background-color: rgba(0, 0, 0, 0.8); } + +.video-js .vjs-slider { + outline: 0; + position: relative; + cursor: pointer; + padding: 0; + margin: 0 0.45em 0 0.45em; + background-color: #73859f; + background-color: rgba(115, 133, 159, 0.5); } + +.video-js .vjs-slider:focus { + text-shadow: 0em 0em 1em white; + -webkit-box-shadow: 0 0 1em #fff; + -moz-box-shadow: 0 0 1em #fff; + box-shadow: 0 0 1em #fff; } + +.video-js .vjs-mute-control, +.video-js .vjs-volume-menu-button { + cursor: pointer; + -webkit-box-flex: none; + -moz-box-flex: none; + -webkit-flex: none; + -ms-flex: none; + flex: none; } + +.video-js .vjs-volume-control { + width: 5em; + -webkit-box-flex: none; + -moz-box-flex: none; + -webkit-flex: none; + -ms-flex: none; + flex: none; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; } + +.video-js .vjs-volume-bar { + margin: 1.35em 0.45em; } + +.vjs-volume-bar.vjs-slider-horizontal { + width: 5em; + height: 0.3em; } + +.vjs-volume-bar.vjs-slider-vertical { + width: 0.3em; + height: 5em; + margin: 1.35em auto; } + +.video-js .vjs-volume-level { + position: absolute; + bottom: 0; + left: 0; + background-color: #fff; } + .video-js .vjs-volume-level:before { + position: absolute; + font-size: 0.9em; } + +.vjs-slider-vertical .vjs-volume-level { + width: 0.3em; } + .vjs-slider-vertical .vjs-volume-level:before { + top: -0.5em; + left: -0.3em; } + +.vjs-slider-horizontal .vjs-volume-level { + height: 0.3em; } + .vjs-slider-horizontal .vjs-volume-level:before { + top: -0.3em; + right: -0.5em; } + +.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level { + height: 100%; } + +.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level { + width: 100%; } + +.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu { + display: block; + width: 0; + height: 0; + border-top-color: transparent; } + +.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu { + left: 0.5em; + height: 8em; } + +.vjs-menu-button-popup.vjs-volume-menu-button-horizontal .vjs-menu { + left: -2em; } + +.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu-content { + height: 0; + width: 0; + overflow-x: hidden; + overflow-y: hidden; } + +.vjs-volume-menu-button-vertical:hover .vjs-menu-content, +.vjs-volume-menu-button-vertical:focus .vjs-menu-content, +.vjs-volume-menu-button-vertical.vjs-slider-active .vjs-menu-content, +.vjs-volume-menu-button-vertical .vjs-lock-showing .vjs-menu-content { + height: 8em; + width: 2.9em; } + +.vjs-volume-menu-button-horizontal:hover .vjs-menu-content, +.vjs-volume-menu-button-horizontal:focus .vjs-menu-content, +.vjs-volume-menu-button-horizontal .vjs-slider-active .vjs-menu-content, +.vjs-volume-menu-button-horizontal .vjs-lock-showing .vjs-menu-content { + height: 2.9em; + width: 8em; } + +.vjs-volume-menu-button.vjs-menu-button-inline .vjs-menu-content { + background-color: transparent !important; } + +.vjs-poster { + display: inline-block; + vertical-align: middle; + background-repeat: no-repeat; + background-position: 50% 50%; + background-size: contain; + cursor: pointer; + margin: 0; + padding: 0; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + height: 100%; } + +.vjs-poster img { + display: block; + vertical-align: middle; + margin: 0 auto; + max-height: 100%; + padding: 0; + width: 100%; } + +.vjs-has-started .vjs-poster { + display: none; } + +.vjs-audio.vjs-has-started .vjs-poster { + display: block; } + +.vjs-controls-disabled .vjs-poster { + display: none; } + +.vjs-using-native-controls .vjs-poster { + display: none; } + +.video-js .vjs-live-control { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: flex-start; + -webkit-align-items: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; + -webkit-box-flex: auto; + -moz-box-flex: auto; + -webkit-flex: auto; + -ms-flex: auto; + flex: auto; + font-size: 1em; + line-height: 3em; } + +.vjs-no-flex .vjs-live-control { + display: table-cell; + width: auto; + text-align: left; } + +.video-js .vjs-time-control { + -webkit-box-flex: none; + -moz-box-flex: none; + -webkit-flex: none; + -ms-flex: none; + flex: none; + font-size: 1em; + line-height: 3em; + min-width: 2em; + width: auto; + padding-left: 1em; + padding-right: 1em; } + +.vjs-live .vjs-time-control { + display: none; } + +.video-js .vjs-current-time, +.vjs-no-flex .vjs-current-time { + display: none; } + +.video-js .vjs-duration, +.vjs-no-flex .vjs-duration { + display: none; } + +.vjs-time-divider { + display: none; + line-height: 3em; } + +.vjs-live .vjs-time-divider { + display: none; } + +.video-js .vjs-play-control { + cursor: pointer; + -webkit-box-flex: none; + -moz-box-flex: none; + -webkit-flex: none; + -ms-flex: none; + flex: none; } + +.vjs-text-track-display { + position: absolute; + bottom: 3em; + left: 0; + right: 0; + top: 0; + pointer-events: none; } + +.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display { + bottom: 1em; } + +.video-js .vjs-text-track { + font-size: 1.4em; + text-align: center; + margin-bottom: 0.1em; + background-color: #000; + background-color: rgba(0, 0, 0, 0.5); } + +.vjs-subtitles { + color: #fff; } + +.vjs-captions { + color: #fc6; } + +.vjs-tt-cue { + display: block; } + +video::-webkit-media-text-track-display { + -moz-transform: translateY(-3em); + -ms-transform: translateY(-3em); + -o-transform: translateY(-3em); + -webkit-transform: translateY(-3em); + transform: translateY(-3em); } + +.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display { + -moz-transform: translateY(-1.5em); + -ms-transform: translateY(-1.5em); + -o-transform: translateY(-1.5em); + -webkit-transform: translateY(-1.5em); + transform: translateY(-1.5em); } + +.video-js .vjs-fullscreen-control { + cursor: pointer; + -webkit-box-flex: none; + -moz-box-flex: none; + -webkit-flex: none; + -ms-flex: none; + flex: none; } + +.vjs-playback-rate .vjs-playback-rate-value { + font-size: 1.5em; + line-height: 2; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + text-align: center; } + +.vjs-playback-rate .vjs-menu { + width: 4em; + left: 0em; } + +.vjs-error .vjs-error-display .vjs-modal-dialog-content { + font-size: 1.4em; + text-align: center; } + +.vjs-error .vjs-error-display:before { + color: #fff; + content: 'X'; + font-family: Arial, Helvetica, sans-serif; + font-size: 4em; + left: 0; + line-height: 1; + margin-top: -0.5em; + position: absolute; + text-shadow: 0.05em 0.05em 0.1em #000; + text-align: center; + top: 50%; + vertical-align: middle; + width: 100%; } + +.vjs-loading-spinner { + display: none; + position: absolute; + top: 50%; + left: 50%; + margin: -25px 0 0 -25px; + opacity: 0.85; + text-align: left; + border: 6px solid rgba(43, 51, 63, 0.7); + box-sizing: border-box; + background-clip: padding-box; + width: 50px; + height: 50px; + border-radius: 25px; } + +.vjs-seeking .vjs-loading-spinner, +.vjs-waiting .vjs-loading-spinner { + display: block; } + +.vjs-loading-spinner:before, +.vjs-loading-spinner:after { + content: ""; + position: absolute; + margin: -6px; + box-sizing: inherit; + width: inherit; + height: inherit; + border-radius: inherit; + opacity: 1; + border: inherit; + border-color: transparent; + border-top-color: white; } + +.vjs-seeking .vjs-loading-spinner:before, +.vjs-seeking .vjs-loading-spinner:after, +.vjs-waiting .vjs-loading-spinner:before, +.vjs-waiting .vjs-loading-spinner:after { + -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; + animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; } + +.vjs-seeking .vjs-loading-spinner:before, +.vjs-waiting .vjs-loading-spinner:before { + border-top-color: white; } + +.vjs-seeking .vjs-loading-spinner:after, +.vjs-waiting .vjs-loading-spinner:after { + border-top-color: white; + -webkit-animation-delay: 0.44s; + animation-delay: 0.44s; } + +@keyframes vjs-spinner-spin { + 100% { + transform: rotate(360deg); } } + +@-webkit-keyframes vjs-spinner-spin { + 100% { + -webkit-transform: rotate(360deg); } } + +@keyframes vjs-spinner-fade { + 0% { + border-top-color: #73859f; } + 20% { + border-top-color: #73859f; } + 35% { + border-top-color: white; } + 60% { + border-top-color: #73859f; } + 100% { + border-top-color: #73859f; } } + +@-webkit-keyframes vjs-spinner-fade { + 0% { + border-top-color: #73859f; } + 20% { + border-top-color: #73859f; } + 35% { + border-top-color: white; } + 60% { + border-top-color: #73859f; } + 100% { + border-top-color: #73859f; } } + +.vjs-chapters-button .vjs-menu ul { + width: 24em; } + +.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-custom-control-spacer { + -webkit-box-flex: auto; + -moz-box-flex: auto; + -webkit-flex: auto; + -ms-flex: auto; + flex: auto; } + +.video-js.vjs-layout-tiny:not(.vjs-fullscreen).vjs-no-flex .vjs-custom-control-spacer { + width: auto; } + +.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-remaining-time, +.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-playback-rate, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-progress-control, +.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-menu-button, +.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subtitles-button { + display: none; } + +.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-remaining-time, +.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-playback-rate, +.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-menu-button, +.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subtitles-button { + display: none; } + +.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-remaining-time, +.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-playback-rate, +.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-control, +.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-subtitles-button { + display: none; } + +.vjs-caption-settings { + position: relative; + top: 1em; + background-color: #2B333F; + background-color: rgba(43, 51, 63, 0.75); + color: #fff; + margin: 0 auto; + padding: 0.5em; + height: 15em; + font-size: 12px; + width: 40em; } + +.vjs-caption-settings .vjs-tracksettings { + top: 0; + bottom: 2em; + left: 0; + right: 0; + position: absolute; + overflow: auto; } + +.vjs-caption-settings .vjs-tracksettings-colors, +.vjs-caption-settings .vjs-tracksettings-font { + float: left; } + +.vjs-caption-settings .vjs-tracksettings-colors:after, +.vjs-caption-settings .vjs-tracksettings-font:after, +.vjs-caption-settings .vjs-tracksettings-controls:after { + clear: both; } + +.vjs-caption-settings .vjs-tracksettings-controls { + position: absolute; + bottom: 1em; + right: 1em; } + +.vjs-caption-settings .vjs-tracksetting { + margin: 5px; + padding: 3px; + min-height: 40px; } + +.vjs-caption-settings .vjs-tracksetting label { + display: block; + width: 100px; + margin-bottom: 5px; } + +.vjs-caption-settings .vjs-tracksetting span { + display: inline; + margin-left: 5px; } + +.vjs-caption-settings .vjs-tracksetting > div { + margin-bottom: 5px; + min-height: 20px; } + +.vjs-caption-settings .vjs-tracksetting > div:last-child { + margin-bottom: 0; + padding-bottom: 0; + min-height: 0; } + +.vjs-caption-settings label > input { + margin-right: 10px; } + +.vjs-caption-settings input[type="button"] { + width: 40px; + height: 40px; } + +.video-js .vjs-modal-dialog { + background: rgba(0, 0, 0, 0.8); + background: -webkit-linear-gradient(-90deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0)); + background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0)); } + +.vjs-modal-dialog .vjs-modal-dialog-content { + font-size: 1.2em; + line-height: 1.5; + padding: 20px 24px; + z-index: 1; } diff --git a/vendor/assets/javascripts/videojs/video-js.min.css b/vendor/assets/javascripts/videojs/video-js.min.css new file mode 100755 index 00000000000..face351b1a7 --- /dev/null +++ b/vendor/assets/javascripts/videojs/video-js.min.css @@ -0,0 +1 @@ +.video-js .vjs-big-play-button:before,.video-js .vjs-control:before,.video-js .vjs-modal-dialog,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button:before,.video-js .vjs-control:before{text-align:center}@font-face{font-family:VideoJS;src:url(font/VideoJS.eot?#iefix) format("eot")}@font-face{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AAAAAAAAAAAAAAAAAAAAAAAAAB4AAAECAQMBBAEFAQYBBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4EcGxheQtwbGF5LWNpcmNsZQVwYXVzZQt2b2x1bWUtbXV0ZQp2b2x1bWUtbG93CnZvbHVtZS1taWQLdm9sdW1lLWhpZ2gQZnVsbHNjcmVlbi1lbnRlcg9mdWxsc2NyZWVuLWV4aXQGc3F1YXJlB3NwaW5uZXIJc3VidGl0bGVzCGNhcHRpb25zCGNoYXB0ZXJzBXNoYXJlA2NvZwZjaXJjbGUOY2lyY2xlLW91dGxpbmUTY2lyY2xlLWlubmVyLWNpcmNsZQJoZAZjYW5jZWwGcmVwbGF5CGZhY2Vib29rBWdwbHVzCGxpbmtlZGluB3R3aXR0ZXIGdHVtYmxyCXBpbnRlcmVzdBFhdWRpby1kZXNjcmlwdGlvbgAAAAAA) format("truetype");font-weight:400;font-style:normal}.vjs-icon-play,.video-js .vjs-big-play-button,.video-js .vjs-play-control{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play:before,.video-js .vjs-big-play-button:before,.video-js .vjs-play-control:before{content:'\f101'}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:'\f102'}.vjs-icon-pause,.video-js .vjs-play-control.vjs-playing{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pause:before,.video-js .vjs-play-control.vjs-playing:before{content:'\f103'}.vjs-icon-volume-mute,.video-js .vjs-mute-control.vjs-vol-0,.video-js .vjs-volume-menu-button.vjs-vol-0{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mute:before,.video-js .vjs-mute-control.vjs-vol-0:before,.video-js .vjs-volume-menu-button.vjs-vol-0:before{content:'\f104'}.vjs-icon-volume-low,.video-js .vjs-mute-control.vjs-vol-1,.video-js .vjs-volume-menu-button.vjs-vol-1{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-low:before,.video-js .vjs-mute-control.vjs-vol-1:before,.video-js .vjs-volume-menu-button.vjs-vol-1:before{content:'\f105'}.vjs-icon-volume-mid,.video-js .vjs-mute-control.vjs-vol-2,.video-js .vjs-volume-menu-button.vjs-vol-2{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mid:before,.video-js .vjs-mute-control.vjs-vol-2:before,.video-js .vjs-volume-menu-button.vjs-vol-2:before{content:'\f106'}.vjs-icon-volume-high,.video-js .vjs-mute-control,.video-js .vjs-volume-menu-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-high:before,.video-js .vjs-mute-control:before,.video-js .vjs-volume-menu-button:before{content:'\f107'}.vjs-icon-fullscreen-enter,.video-js .vjs-fullscreen-control{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-enter:before,.video-js .vjs-fullscreen-control:before{content:'\f108'}.vjs-icon-fullscreen-exit,.video-js.vjs-fullscreen .vjs-fullscreen-control{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-exit:before,.video-js.vjs-fullscreen .vjs-fullscreen-control:before{content:'\f109'}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:'\f10a'}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:'\f10b'}.vjs-icon-subtitles,.video-js .vjs-subtitles-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-subtitles:before,.video-js .vjs-subtitles-button:before{content:'\f10c'}.vjs-icon-captions,.video-js .vjs-captions-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-captions:before,.video-js .vjs-captions-button:before{content:'\f10d'}.vjs-icon-chapters,.video-js .vjs-chapters-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-chapters:before,.video-js .vjs-chapters-button:before{content:'\f10e'}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:'\f10f'}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:'\f110'}.vjs-icon-circle,.video-js .vjs-mouse-display,.video-js .vjs-play-progress,.video-js .vjs-volume-level{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle:before,.video-js .vjs-mouse-display:before,.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before{content:'\f111'}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:'\f112'}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:'\f113'}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:'\f114'}.vjs-icon-cancel,.video-js .vjs-control.vjs-close-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cancel:before,.video-js .vjs-control.vjs-close-button:before{content:'\f115'}.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay:before{content:'\f116'}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:'\f117'}.vjs-icon-gplus{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-gplus:before{content:'\f118'}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:'\f119'}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:'\f11a'}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:'\f11b'}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:'\f11c'}.vjs-icon-audio-description,.video-js .vjs-descriptions-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio-description:before,.video-js .vjs-descriptions-button:before{content:'\f11d'}.video-js{display:block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js *,.video-js :before,.video-js :after{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.video-js.vjs-fluid,.video-js.vjs-16-9,.video-js.vjs-4-3{width:100%;max-width:100%;height:0}.video-js.vjs-16-9{padding-top:56.25%}.video-js.vjs-4-3{padding-top:75%}.video-js.vjs-fill{width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}body.vjs-full-window{padding:0;margin:0;height:100%;overflow-y:auto}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen{width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66A8CC}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.5em;width:3em;display:block;position:absolute;top:10px;left:10px;padding:0;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2B333F;background-color:rgba(43,51,63,.7);-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-big-play-centered .vjs-big-play-button{top:50%;left:50%;margin-top:-.75em;margin-left:-1.5em}.video-js:hover .vjs-big-play-button,.video-js .vjs-big-play-button:focus{outline:0;border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button,.vjs-error .vjs-big-play-button{display:none}.video-js button{background:0 0;border:0;color:inherit;display:inline-block;overflow:visible;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;overflow:auto}.vjs-scrubbing .vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-menu li:focus,.vjs-menu li:hover{outline:0;background-color:#73859f;background-color:rgba(115,133,159,.5)}.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2B333F}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2B333F;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-workinghover .vjs-menu-button-popup:hover .vjs-menu,.vjs-menu-button-popup .vjs-menu.vjs-lock-showing{display:block}.video-js .vjs-menu-button-inline{-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline:hover,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js.vjs-no-flex .vjs-menu-button-inline{width:12em}.video-js .vjs-menu-button-inline.vjs-slider-active{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-menu-button-inline:hover .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline.vjs-slider-active .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2B333F;background-color:rgba(43,51,63,.7)}.vjs-has-started .vjs-control-bar{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;visibility:visible;opacity:1;-webkit-transition:visibility .1s,opacity .1s;-moz-transition:visibility .1s,opacity .1s;-o-transition:visibility .1s,opacity .1s;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar,.vjs-error .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}@media \0screen{.vjs-user-inactive.vjs-playing .vjs-control-bar :before{content:""}}.vjs-has-started.vjs-no-flex .vjs-control-bar{display:table}.video-js .vjs-control{outline:0;position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none}.video-js .vjs-control:before{font-size:1.8em;line-height:1.67}.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before,.video-js .vjs-control:focus{text-shadow:0 0 1em #fff}.video-js .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{-webkit-box-flex:auto;-moz-box-flex:auto;-webkit-flex:auto;-ms-flex:auto;flex:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-width:4em}.vjs-live .vjs-progress-control{display:none}.video-js .vjs-progress-holder{-webkit-box-flex:auto;-moz-box-flex:auto;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;transition:all .2s;height:.3em}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.666666666666666666em}.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-mouse-display:after,.video-js .vjs-progress-control:hover .vjs-play-progress:after{font-family:Arial,Helvetica,sans-serif;visibility:visible;font-size:.6em}.video-js .vjs-progress-holder .vjs-play-progress,.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-tooltip-progress-bar,.video-js .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:.3em;margin:0;padding:0;width:0;left:0;top:0}.video-js .vjs-mouse-display:before{display:none}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{position:absolute;top:-.333333333333333em;right:-.5em;font-size:.9em}.video-js .vjs-time-tooltip,.video-js .vjs-mouse-display:after,.video-js .vjs-play-progress:after{visibility:hidden;pointer-events:none;position:absolute;top:-3.4em;right:-1.9em;font-size:.9em;color:#000;content:attr(data-current-time);padding:6px 8px 8px;background-color:#fff;background-color:rgba(255,255,255,.8);-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em}.video-js .vjs-time-tooltip,.video-js .vjs-play-progress:before,.video-js .vjs-play-progress:after{z-index:1}.video-js .vjs-progress-control .vjs-keep-tooltips-inside:after{display:none}.video-js .vjs-load-progress{background:#bfc7d3;background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:#fff;background:rgba(115,133,159,.75)}.video-js.vjs-no-flex .vjs-progress-control{width:auto}.video-js .vjs-time-tooltip{display:inline-block;height:2.4em;position:relative;float:right;right:-1.9em}.vjs-tooltip-progress-bar{visibility:hidden}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display:after{visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display:after{display:none}.vjs-mouse-display .vjs-time-tooltip,.video-js .vjs-progress-control .vjs-mouse-display:after{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{outline:0;position:relative;cursor:pointer;padding:0;margin:0 .45em;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control,.video-js .vjs-volume-menu-button{cursor:pointer;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none}.video-js .vjs-volume-control{width:5em;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu{display:block;width:0;height:0;border-top-color:transparent}.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu{left:.5em;height:8em}.vjs-menu-button-popup.vjs-volume-menu-button-horizontal .vjs-menu{left:-2em}.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu-content{height:0;width:0;overflow-x:hidden;overflow-y:hidden}.vjs-volume-menu-button-vertical:hover .vjs-menu-content,.vjs-volume-menu-button-vertical:focus .vjs-menu-content,.vjs-volume-menu-button-vertical.vjs-slider-active .vjs-menu-content,.vjs-volume-menu-button-vertical .vjs-lock-showing .vjs-menu-content{height:8em;width:2.9em}.vjs-volume-menu-button-horizontal:hover .vjs-menu-content,.vjs-volume-menu-button-horizontal:focus .vjs-menu-content,.vjs-volume-menu-button-horizontal .vjs-slider-active .vjs-menu-content,.vjs-volume-menu-button-horizontal .vjs-lock-showing .vjs-menu-content{height:2.9em;width:8em}.vjs-volume-menu-button.vjs-menu-button-inline .vjs-menu-content{background-color:transparent!important}.vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-poster img{display:block;vertical-align:middle;margin:0 auto;max-height:100%;padding:0;width:100%}.vjs-has-started .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster{display:block}.vjs-controls-disabled .vjs-poster{display:none}.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-live-control{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-flex:auto;-moz-box-flex:auto;-webkit-flex:auto;-ms-flex:auto;flex:auto;font-size:1em;line-height:3em}.vjs-no-flex .vjs-live-control{display:table-cell;width:auto;text-align:left}.video-js .vjs-time-control{-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control{display:none}.video-js .vjs-current-time,.vjs-no-flex .vjs-current-time{display:none}.video-js .vjs-duration,.vjs-no-flex .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-live .vjs-time-divider{display:none}.video-js .vjs-play-control{cursor:pointer;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em;background-color:#000;background-color:rgba(0,0,0,.5)}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{-moz-transform:translateY(-3em);-ms-transform:translateY(-3em);-o-transform:translateY(-3em);-webkit-transform:translateY(-3em);transform:translateY(-3em)}.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{-moz-transform:translateY(-1.5em);-ms-transform:translateY(-1.5em);-o-transform:translateY(-1.5em);-webkit-transform:translateY(-1.5em);transform:translateY(-1.5em)}.video-js .vjs-fullscreen-control{cursor:pointer;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:'X';font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block}.vjs-loading-spinner:before,.vjs-loading-spinner:after{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:before,.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(0.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(0.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-spin{100%{transform:rotate(360deg)}}@-webkit-keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-custom-control-spacer{-webkit-box-flex:auto;-moz-box-flex:auto;-webkit-flex:auto;-ms-flex:auto;flex:auto}.video-js.vjs-layout-tiny:not(.vjs-fullscreen).vjs-no-flex .vjs-custom-control-spacer{width:auto}.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-progress-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-menu-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subtitles-button{display:none}.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-control,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-menu-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subtitles-button{display:none}.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-control,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-subtitles-button{display:none}.vjs-caption-settings{position:relative;top:1em;background-color:#2B333F;background-color:rgba(43,51,63,.75);color:#fff;margin:0 auto;padding:.5em;height:15em;font-size:12px;width:40em}.vjs-caption-settings .vjs-tracksettings{top:0;bottom:2em;left:0;right:0;position:absolute;overflow:auto}.vjs-caption-settings .vjs-tracksettings-colors,.vjs-caption-settings .vjs-tracksettings-font{float:left}.vjs-caption-settings .vjs-tracksettings-colors:after,.vjs-caption-settings .vjs-tracksettings-font:after,.vjs-caption-settings .vjs-tracksettings-controls:after{clear:both}.vjs-caption-settings .vjs-tracksettings-controls{position:absolute;bottom:1em;right:1em}.vjs-caption-settings .vjs-tracksetting{margin:5px;padding:3px;min-height:40px}.vjs-caption-settings .vjs-tracksetting label{display:block;width:100px;margin-bottom:5px}.vjs-caption-settings .vjs-tracksetting span{display:inline;margin-left:5px}.vjs-caption-settings .vjs-tracksetting>div{margin-bottom:5px;min-height:20px}.vjs-caption-settings .vjs-tracksetting>div:last-child{margin-bottom:0;padding-bottom:0;min-height:0}.vjs-caption-settings label>input{margin-right:10px}.vjs-caption-settings input[type=button]{width:40px;height:40px}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:-webkit-linear-gradient(-90deg,rgba(0,0,0,.8),rgba(255,255,255,0));background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0))}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1} \ No newline at end of file diff --git a/vendor/assets/javascripts/videojs/video-js.swf b/vendor/assets/javascripts/videojs/video-js.swf new file mode 100755 index 00000000000..a36648f3e34 Binary files /dev/null and b/vendor/assets/javascripts/videojs/video-js.swf differ diff --git a/vendor/assets/javascripts/videojs/video.js b/vendor/assets/javascripts/videojs/video.js new file mode 100755 index 00000000000..9fdb9cc208d --- /dev/null +++ b/vendor/assets/javascripts/videojs/video.js @@ -0,0 +1,22872 @@ +/** + * @license + * Video.js 5.9.0 + * Copyright Brightcove, Inc. + * Available under Apache License Version 2.0 + * + * + * Includes vtt.js + * Available under Apache License Version 2.0 + * + */ + +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.videojs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o logs the number of milliseconds it took for the deferred function to be invoked + */ +var now = nativeNow || function() { + return new Date().getTime(); +}; + +module.exports = now; + +},{"../internal/getNative":20}],5:[function(_dereq_,module,exports){ +var isObject = _dereq_('../lang/isObject'), + now = _dereq_('../date/now'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it's invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ +function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; +} + +module.exports = debounce; + +},{"../date/now":4,"../lang/isObject":33}],6:[function(_dereq_,module,exports){ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; + +},{}],7:[function(_dereq_,module,exports){ +var debounce = _dereq_('./debounce'), + isObject = _dereq_('../lang/isObject'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); +} + +module.exports = throttle; + +},{"../lang/isObject":33,"./debounce":5}],8:[function(_dereq_,module,exports){ +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function arrayCopy(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = arrayCopy; + +},{}],9:[function(_dereq_,module,exports){ +/** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; + +},{}],10:[function(_dereq_,module,exports){ +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ +function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; +} + +module.exports = baseCopy; + +},{}],11:[function(_dereq_,module,exports){ +var createBaseFor = _dereq_('./createBaseFor'); + +/** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + +},{"./createBaseFor":18}],12:[function(_dereq_,module,exports){ +var baseFor = _dereq_('./baseFor'), + keysIn = _dereq_('../object/keysIn'); + +/** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); +} + +module.exports = baseForIn; + +},{"../object/keysIn":39,"./baseFor":11}],13:[function(_dereq_,module,exports){ +var arrayEach = _dereq_('./arrayEach'), + baseMergeDeep = _dereq_('./baseMergeDeep'), + isArray = _dereq_('../lang/isArray'), + isArrayLike = _dereq_('./isArrayLike'), + isObject = _dereq_('../lang/isObject'), + isObjectLike = _dereq_('./isObjectLike'), + isTypedArray = _dereq_('../lang/isTypedArray'), + keys = _dereq_('../object/keys'); + +/** + * The base implementation of `_.merge` without support for argument juggling, + * multiple sources, and `this` binding `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {Object} Returns `object`. + */ +function baseMerge(object, source, customizer, stackA, stackB) { + if (!isObject(object)) { + return object; + } + var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), + props = isSrcArr ? undefined : keys(source); + + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObjectLike(srcValue)) { + stackA || (stackA = []); + stackB || (stackB = []); + baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); + } + else { + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + } + if ((result !== undefined || (isSrcArr && !(key in object))) && + (isCommon || (result === result ? (result !== value) : (value === value)))) { + object[key] = result; + } + } + }); + return object; +} + +module.exports = baseMerge; + +},{"../lang/isArray":30,"../lang/isObject":33,"../lang/isTypedArray":36,"../object/keys":38,"./arrayEach":9,"./baseMergeDeep":14,"./isArrayLike":21,"./isObjectLike":26}],14:[function(_dereq_,module,exports){ +var arrayCopy = _dereq_('./arrayCopy'), + isArguments = _dereq_('../lang/isArguments'), + isArray = _dereq_('../lang/isArray'), + isArrayLike = _dereq_('./isArrayLike'), + isPlainObject = _dereq_('../lang/isPlainObject'), + isTypedArray = _dereq_('../lang/isTypedArray'), + toPlainObject = _dereq_('../lang/toPlainObject'); + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { + var length = stackA.length, + srcValue = source[key]; + + while (length--) { + if (stackA[length] == srcValue) { + object[key] = stackB[length]; + return; + } + } + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { + result = isArray(value) + ? value + : (isArrayLike(value) ? arrayCopy(value) : []); + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + result = isArguments(value) + ? toPlainObject(value) + : (isPlainObject(value) ? value : {}); + } + else { + isCommon = false; + } + } + // Add the source value to the stack of traversed objects and associate + // it with its merged value. + stackA.push(srcValue); + stackB.push(result); + + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); + } else if (result === result ? (result !== value) : (value === value)) { + object[key] = result; + } +} + +module.exports = baseMergeDeep; + +},{"../lang/isArguments":29,"../lang/isArray":30,"../lang/isPlainObject":34,"../lang/isTypedArray":36,"../lang/toPlainObject":37,"./arrayCopy":8,"./isArrayLike":21}],15:[function(_dereq_,module,exports){ +var toObject = _dereq_('./toObject'); + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : toObject(object)[key]; + }; +} + +module.exports = baseProperty; + +},{"./toObject":28}],16:[function(_dereq_,module,exports){ +var identity = _dereq_('../utility/identity'); + +/** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ +function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; +} + +module.exports = bindCallback; + +},{"../utility/identity":42}],17:[function(_dereq_,module,exports){ +var bindCallback = _dereq_('./bindCallback'), + isIterateeCall = _dereq_('./isIterateeCall'), + restParam = _dereq_('../function/restParam'); + +/** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; + +},{"../function/restParam":6,"./bindCallback":16,"./isIterateeCall":24}],18:[function(_dereq_,module,exports){ +var toObject = _dereq_('./toObject'); + +/** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; + +},{"./toObject":28}],19:[function(_dereq_,module,exports){ +var baseProperty = _dereq_('./baseProperty'); + +/** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ +var getLength = baseProperty('length'); + +module.exports = getLength; + +},{"./baseProperty":15}],20:[function(_dereq_,module,exports){ +var isNative = _dereq_('../lang/isNative'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; +} + +module.exports = getNative; + +},{"../lang/isNative":32}],21:[function(_dereq_,module,exports){ +var getLength = _dereq_('./getLength'), + isLength = _dereq_('./isLength'); + +/** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ +function isArrayLike(value) { + return value != null && isLength(getLength(value)); +} + +module.exports = isArrayLike; + +},{"./getLength":19,"./isLength":25}],22:[function(_dereq_,module,exports){ +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +var isHostObject = (function() { + try { + Object({ 'toString': 0 } + ''); + } catch(e) { + return function() { return false; }; + } + return function(value) { + // IE < 9 presents many host objects as `Object` objects that can coerce + // to strings despite having improperly defined `toString` methods. + return typeof value.toString != 'function' && typeof (value + '') == 'string'; + }; +}()); + +module.exports = isHostObject; + +},{}],23:[function(_dereq_,module,exports){ +/** Used to detect unsigned integer values. */ +var reIsUint = /^\d+$/; + +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; +} + +module.exports = isIndex; + +},{}],24:[function(_dereq_,module,exports){ +var isArrayLike = _dereq_('./isArrayLike'), + isIndex = _dereq_('./isIndex'), + isObject = _dereq_('../lang/isObject'); + +/** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; +} + +module.exports = isIterateeCall; + +},{"../lang/isObject":33,"./isArrayLike":21,"./isIndex":23}],25:[function(_dereq_,module,exports){ +/** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ +function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + +},{}],26:[function(_dereq_,module,exports){ +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +module.exports = isObjectLike; + +},{}],27:[function(_dereq_,module,exports){ +var isArguments = _dereq_('../lang/isArguments'), + isArray = _dereq_('../lang/isArray'), + isIndex = _dereq_('./isIndex'), + isLength = _dereq_('./isLength'), + isString = _dereq_('../lang/isString'), + keysIn = _dereq_('../object/keysIn'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object) || isString(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; +} + +module.exports = shimKeys; + +},{"../lang/isArguments":29,"../lang/isArray":30,"../lang/isString":35,"../object/keysIn":39,"./isIndex":23,"./isLength":25}],28:[function(_dereq_,module,exports){ +var isObject = _dereq_('../lang/isObject'), + isString = _dereq_('../lang/isString'), + support = _dereq_('../support'); + +/** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ +function toObject(value) { + if (support.unindexedChars && isString(value)) { + var index = -1, + length = value.length, + result = Object(value); + + while (++index < length) { + result[index] = value.charAt(index); + } + return result; + } + return isObject(value) ? value : Object(value); +} + +module.exports = toObject; + +},{"../lang/isObject":33,"../lang/isString":35,"../support":41}],29:[function(_dereq_,module,exports){ +var isArrayLike = _dereq_('../internal/isArrayLike'), + isObjectLike = _dereq_('../internal/isObjectLike'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); +} + +module.exports = isArguments; + +},{"../internal/isArrayLike":21,"../internal/isObjectLike":26}],30:[function(_dereq_,module,exports){ +var getNative = _dereq_('../internal/getNative'), + isLength = _dereq_('../internal/isLength'), + isObjectLike = _dereq_('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsArray = getNative(Array, 'isArray'); + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ +var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; +}; + +module.exports = isArray; + +},{"../internal/getNative":20,"../internal/isLength":25,"../internal/isObjectLike":26}],31:[function(_dereq_,module,exports){ +var isObject = _dereq_('./isObject'); + +/** `Object#toString` result references. */ +var funcTag = '[object Function]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 which returns 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; +} + +module.exports = isFunction; + +},{"./isObject":33}],32:[function(_dereq_,module,exports){ +var isFunction = _dereq_('./isFunction'), + isHostObject = _dereq_('../internal/isHostObject'), + isObjectLike = _dereq_('../internal/isObjectLike'); + +/** Used to detect host constructors (Safari > 5). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var fnToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); +} + +module.exports = isNative; + +},{"../internal/isHostObject":22,"../internal/isObjectLike":26,"./isFunction":31}],33:[function(_dereq_,module,exports){ +/** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ +function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + +},{}],34:[function(_dereq_,module,exports){ +var baseForIn = _dereq_('../internal/baseForIn'), + isArguments = _dereq_('./isArguments'), + isHostObject = _dereq_('../internal/isHostObject'), + isObjectLike = _dereq_('../internal/isObjectLike'), + support = _dereq_('../support'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + if (support.ownLast) { + baseForIn(value, function(subValue, key, object) { + result = hasOwnProperty.call(object, key); + return false; + }); + return result !== false; + } + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); +} + +module.exports = isPlainObject; + +},{"../internal/baseForIn":12,"../internal/isHostObject":22,"../internal/isObjectLike":26,"../support":41,"./isArguments":29}],35:[function(_dereq_,module,exports){ +var isObjectLike = _dereq_('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); +} + +module.exports = isString; + +},{"../internal/isObjectLike":26}],36:[function(_dereq_,module,exports){ +var isLength = _dereq_('../internal/isLength'), + isObjectLike = _dereq_('../internal/isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dateTag] = typedArrayTags[errorTag] = +typedArrayTags[funcTag] = typedArrayTags[mapTag] = +typedArrayTags[numberTag] = typedArrayTags[objectTag] = +typedArrayTags[regexpTag] = typedArrayTags[setTag] = +typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; +} + +module.exports = isTypedArray; + +},{"../internal/isLength":25,"../internal/isObjectLike":26}],37:[function(_dereq_,module,exports){ +var baseCopy = _dereq_('../internal/baseCopy'), + keysIn = _dereq_('../object/keysIn'); + +/** + * Converts `value` to a plain object flattening inherited enumerable + * properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return baseCopy(value, keysIn(value)); +} + +module.exports = toPlainObject; + +},{"../internal/baseCopy":10,"../object/keysIn":39}],38:[function(_dereq_,module,exports){ +var getNative = _dereq_('../internal/getNative'), + isArrayLike = _dereq_('../internal/isArrayLike'), + isObject = _dereq_('../lang/isObject'), + shimKeys = _dereq_('../internal/shimKeys'), + support = _dereq_('../support'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeKeys = getNative(Object, 'keys'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; +}; + +module.exports = keys; + +},{"../internal/getNative":20,"../internal/isArrayLike":21,"../internal/shimKeys":27,"../lang/isObject":33,"../support":41}],39:[function(_dereq_,module,exports){ +var arrayEach = _dereq_('../internal/arrayEach'), + isArguments = _dereq_('../lang/isArguments'), + isArray = _dereq_('../lang/isArray'), + isFunction = _dereq_('../lang/isFunction'), + isIndex = _dereq_('../internal/isIndex'), + isLength = _dereq_('../internal/isLength'), + isObject = _dereq_('../lang/isObject'), + isString = _dereq_('../lang/isString'), + support = _dereq_('../support'); + +/** `Object#toString` result references. */ +var arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + +/** Used to fix the JScript `[[DontEnum]]` bug. */ +var shadowProps = [ + 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', + 'toLocaleString', 'toString', 'valueOf' +]; + +/** Used for native method references. */ +var errorProto = Error.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** Used to avoid iterating over non-enumerable properties in IE < 9. */ +var nonEnumProps = {}; +nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; +nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true }; +nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true }; +nonEnumProps[objectTag] = { 'constructor': true }; + +arrayEach(shadowProps, function(key) { + for (var tag in nonEnumProps) { + if (hasOwnProperty.call(nonEnumProps, tag)) { + var props = nonEnumProps[tag]; + props[key] = hasOwnProperty.call(props, key); + } + } +}); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + + length = (length && isLength(length) && + (isArray(object) || isArguments(object) || isString(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + proto = (isFunction(Ctor) && Ctor.prototype) || objectProto, + isProto = proto === object, + result = Array(length), + skipIndexes = length > 0, + skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error), + skipProto = support.enumPrototypes && isFunction(object); + + while (++index < length) { + result[index] = (index + ''); + } + // lodash skips the `constructor` property when it infers it's iterating + // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]` + // attribute of an existing property and the `constructor` property of a + // prototype defaults to non-enumerable. + for (var key in object) { + if (!(skipProto && key == 'prototype') && + !(skipErrorProps && (key == 'message' || key == 'name')) && + !(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + if (support.nonEnumShadows && object !== objectProto) { + var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)), + nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag]; + + if (tag == objectTag) { + proto = objectProto; + } + length = shadowProps.length; + while (length--) { + key = shadowProps[length]; + var nonEnum = nonEnums[key]; + if (!(isProto && nonEnum) && + (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) { + result.push(key); + } + } + } + return result; +} + +module.exports = keysIn; + +},{"../internal/arrayEach":9,"../internal/isIndex":23,"../internal/isLength":25,"../lang/isArguments":29,"../lang/isArray":30,"../lang/isFunction":31,"../lang/isObject":33,"../lang/isString":35,"../support":41}],40:[function(_dereq_,module,exports){ +var baseMerge = _dereq_('../internal/baseMerge'), + createAssigner = _dereq_('../internal/createAssigner'); + +/** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * overwrite property assignments of previous sources. If `customizer` is + * provided it's invoked to produce the merged values of the destination and + * source properties. If `customizer` returns `undefined` merging is handled + * by the method instead. The `customizer` is bound to `thisArg` and invoked + * with five arguments: (objectValue, sourceValue, key, object, source). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * + * // using a customizer callback + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, function(a, b) { + * if (_.isArray(a)) { + * return a.concat(b); + * } + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ +var merge = createAssigner(baseMerge); + +module.exports = merge; + +},{"../internal/baseMerge":13,"../internal/createAssigner":17}],41:[function(_dereq_,module,exports){ +/** Used for native method references. */ +var arrayProto = Array.prototype, + errorProto = Error.prototype, + objectProto = Object.prototype; + +/** Native method references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/** + * An object environment feature flags. + * + * @static + * @memberOf _ + * @type Object + */ +var support = {}; + +(function(x) { + var Ctor = function() { this.x = x; }, + object = { '0': x, 'length': x }, + props = []; + + Ctor.prototype = { 'valueOf': x, 'y': x }; + for (var key in new Ctor) { props.push(key); } + + /** + * Detect if `name` or `message` properties of `Error.prototype` are + * enumerable by default (IE < 9, Safari < 5.1). + * + * @memberOf _.support + * @type boolean + */ + support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || + propertyIsEnumerable.call(errorProto, 'name'); + + /** + * Detect if `prototype` properties are enumerable by default. + * + * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 + * (if the prototype or a property on the prototype has been set) + * incorrectly set the `[[Enumerable]]` value of a function's `prototype` + * property to `true`. + * + * @memberOf _.support + * @type boolean + */ + support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype'); + + /** + * Detect if properties shadowing those on `Object.prototype` are non-enumerable. + * + * In IE < 9 an object's own properties, shadowing non-enumerable ones, + * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug). + * + * @memberOf _.support + * @type boolean + */ + support.nonEnumShadows = !/valueOf/.test(props); + + /** + * Detect if own properties are iterated after inherited properties (IE < 9). + * + * @memberOf _.support + * @type boolean + */ + support.ownLast = props[0] != 'x'; + + /** + * Detect if `Array#shift` and `Array#splice` augment array-like objects + * correctly. + * + * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array + * `shift()` and `splice()` functions that fail to remove the last element, + * `value[0]`, of array-like objects even though the "length" property is + * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8, + * while `splice()` is buggy regardless of mode in IE < 9. + * + * @memberOf _.support + * @type boolean + */ + support.spliceObjects = (splice.call(object, 0, 1), !object[0]); + + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index. IE 8 can only access characters + * by index on string literals, not string objects. + * + * @memberOf _.support + * @type boolean + */ + support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; +}(1, 0)); + +module.exports = support; + +},{}],42:[function(_dereq_,module,exports){ +/** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + +},{}],43:[function(_dereq_,module,exports){ +'use strict'; + +var keys = _dereq_('object-keys'); + +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + if (typeof sym === 'string') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(Object(sym) instanceof Symbol)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } + if (keys(obj).length !== 0) { return false; } + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + +},{"object-keys":50}],44:[function(_dereq_,module,exports){ +'use strict'; + +// modified from https://github.com/es-shims/es6-shim +var keys = _dereq_('object-keys'); +var bind = _dereq_('function-bind'); +var canBeObject = function (obj) { + return typeof obj !== 'undefined' && obj !== null; +}; +var hasSymbols = _dereq_('./hasSymbols')(); +var toObject = Object; +var push = bind.call(Function.call, Array.prototype.push); +var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable); + +module.exports = function assign(target, source1) { + if (!canBeObject(target)) { throw new TypeError('target must be an object'); } + var objTarget = toObject(target); + var s, source, i, props, syms, value, key; + for (s = 1; s < arguments.length; ++s) { + source = toObject(arguments[s]); + props = keys(source); + if (hasSymbols && Object.getOwnPropertySymbols) { + syms = Object.getOwnPropertySymbols(source); + for (i = 0; i < syms.length; ++i) { + key = syms[i]; + if (propIsEnumerable(source, key)) { + push(props, key); + } + } + } + for (i = 0; i < props.length; ++i) { + key = props[i]; + value = source[key]; + if (propIsEnumerable(source, key)) { + objTarget[key] = value; + } + } + } + return objTarget; +}; + +},{"./hasSymbols":43,"function-bind":49,"object-keys":50}],45:[function(_dereq_,module,exports){ +'use strict'; + +var defineProperties = _dereq_('define-properties'); + +var implementation = _dereq_('./implementation'); +var getPolyfill = _dereq_('./polyfill'); +var shim = _dereq_('./shim'); + +defineProperties(implementation, { + implementation: implementation, + getPolyfill: getPolyfill, + shim: shim +}); + +module.exports = implementation; + +},{"./implementation":44,"./polyfill":52,"./shim":53,"define-properties":46}],46:[function(_dereq_,module,exports){ +'use strict'; + +var keys = _dereq_('object-keys'); +var foreach = _dereq_('foreach'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; + +var toStr = Object.prototype.toString; + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var arePropertyDescriptorsSupported = function () { + var obj = {}; + try { + Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + /* eslint-disable no-unused-vars, no-restricted-syntax */ + for (var _ in obj) { return false; } + /* eslint-enable no-unused-vars, no-restricted-syntax */ + return obj.x === obj; + } catch (e) { /* this is IE 8. */ + return false; + } +}; +var supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + value: value, + writable: true + }); + } else { + object[name] = value; + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = props.concat(Object.getOwnPropertySymbols(map)); + } + foreach(props, function (name) { + defineProperty(object, name, map[name], predicates[name]); + }); +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + +},{"foreach":47,"object-keys":50}],47:[function(_dereq_,module,exports){ + +var hasOwn = Object.prototype.hasOwnProperty; +var toString = Object.prototype.toString; + +module.exports = function forEach (obj, fn, ctx) { + if (toString.call(fn) !== '[object Function]') { + throw new TypeError('iterator must be a function'); + } + var l = obj.length; + if (l === +l) { + for (var i = 0; i < l; i++) { + fn.call(ctx, obj[i], i, obj); + } + } else { + for (var k in obj) { + if (hasOwn.call(obj, k)) { + fn.call(ctx, obj[k], k, obj); + } + } + } +}; + + +},{}],48:[function(_dereq_,module,exports){ +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + +},{}],49:[function(_dereq_,module,exports){ +var implementation = _dereq_('./implementation'); + +module.exports = Function.prototype.bind || implementation; + +},{"./implementation":48}],50:[function(_dereq_,module,exports){ +'use strict'; + +// modified from https://github.com/es-shims/es5-shim +var has = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var slice = Array.prototype.slice; +var isArgs = _dereq_('./isArguments'); +var hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'); +var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype'); +var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' +]; +var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; +}; +var blacklistedKeys = { + $console: true, + $frame: true, + $frameElement: true, + $frames: true, + $parent: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true +}; +var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; +}()); +var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } +}; + +var keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; +}; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + return (Object.keys(arguments) || '').length === 2; + }(1, 2)); + if (!keysWorksWithArguments) { + var originalKeys = Object.keys; + Object.keys = function keys(object) { + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } else { + return originalKeys(object); + } + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + +},{"./isArguments":51}],51:[function(_dereq_,module,exports){ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + +},{}],52:[function(_dereq_,module,exports){ +'use strict'; + +var implementation = _dereq_('./implementation'); + +var lacksProperEnumerationOrder = function () { + if (!Object.assign) { + return false; + } + // v8, specifically in node 4.x, has a bug with incorrect property enumeration order + // note: this does not detect the bug unless there's 20 characters + var str = 'abcdefghijklmnopqrst'; + var letters = str.split(''); + var map = {}; + for (var i = 0; i < letters.length; ++i) { + map[letters[i]] = letters[i]; + } + var obj = Object.assign({}, map); + var actual = ''; + for (var k in obj) { + actual += k; + } + return str !== actual; +}; + +var assignHasPendingExceptions = function () { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + // Firefox 37 still has "pending exception" logic in its Object.assign implementation, + // which is 72% slower than our shim, and Firefox 40's native implementation. + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, 'xy'); + } catch (e) { + return thrower[1] === 'y'; + } +}; + +module.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; +}; + +},{"./implementation":44}],53:[function(_dereq_,module,exports){ +'use strict'; + +var define = _dereq_('define-properties'); +var getPolyfill = _dereq_('./polyfill'); + +module.exports = function shimAssign() { + var polyfill = getPolyfill(); + define( + Object, + { assign: polyfill }, + { assign: function () { return Object.assign !== polyfill; } } + ); + return polyfill; +}; + +},{"./polyfill":52,"define-properties":46}],54:[function(_dereq_,module,exports){ +module.exports = SafeParseTuple + +function SafeParseTuple(obj, reviver) { + var json + var error = null + + try { + json = JSON.parse(obj, reviver) + } catch (err) { + error = err + } + + return [error, json] +} + +},{}],55:[function(_dereq_,module,exports){ +function clean (s) { + return s.replace(/\n\r?\s*/g, '') +} + + +module.exports = function tsml (sa) { + var s = '' + , i = 0 + + for (; i < arguments.length; i++) + s += clean(sa[i]) + (arguments[i + 1] || '') + + return s +} +},{}],56:[function(_dereq_,module,exports){ +"use strict"; +var window = _dereq_("global/window") +var once = _dereq_("once") +var isFunction = _dereq_("is-function") +var parseHeaders = _dereq_("parse-headers") +var xtend = _dereq_("xtend") + +module.exports = createXHR +createXHR.XMLHttpRequest = window.XMLHttpRequest || noop +createXHR.XDomainRequest = "withCredentials" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest + +forEachArray(["get", "put", "post", "patch", "head", "delete"], function(method) { + createXHR[method === "delete" ? "del" : method] = function(uri, options, callback) { + options = initParams(uri, options, callback) + options.method = method.toUpperCase() + return _createXHR(options) + } +}) + +function forEachArray(array, iterator) { + for (var i = 0; i < array.length; i++) { + iterator(array[i]) + } +} + +function isEmpty(obj){ + for(var i in obj){ + if(obj.hasOwnProperty(i)) return false + } + return true +} + +function initParams(uri, options, callback) { + var params = uri + + if (isFunction(options)) { + callback = options + if (typeof uri === "string") { + params = {uri:uri} + } + } else { + params = xtend(options, {uri: uri}) + } + + params.callback = callback + return params +} + +function createXHR(uri, options, callback) { + options = initParams(uri, options, callback) + return _createXHR(options) +} + +function _createXHR(options) { + var callback = options.callback + if(typeof callback === "undefined"){ + throw new Error("callback argument missing") + } + callback = once(callback) + + function readystatechange() { + if (xhr.readyState === 4) { + loadFunc() + } + } + + function getBody() { + // Chrome with requestType=blob throws errors arround when even testing access to responseText + var body = undefined + + if (xhr.response) { + body = xhr.response + } else if (xhr.responseType === "text" || !xhr.responseType) { + body = xhr.responseText || xhr.responseXML + } + + if (isJson) { + try { + body = JSON.parse(body) + } catch (e) {} + } + + return body + } + + var failureResponse = { + body: undefined, + headers: {}, + statusCode: 0, + method: method, + url: uri, + rawRequest: xhr + } + + function errorFunc(evt) { + clearTimeout(timeoutTimer) + if(!(evt instanceof Error)){ + evt = new Error("" + (evt || "Unknown XMLHttpRequest Error") ) + } + evt.statusCode = 0 + callback(evt, failureResponse) + } + + // will load the data & process the response in a special response object + function loadFunc() { + if (aborted) return + var status + clearTimeout(timeoutTimer) + if(options.useXDR && xhr.status===undefined) { + //IE8 CORS GET successful response doesn't have a status field, but body is fine + status = 200 + } else { + status = (xhr.status === 1223 ? 204 : xhr.status) + } + var response = failureResponse + var err = null + + if (status !== 0){ + response = { + body: getBody(), + statusCode: status, + method: method, + headers: {}, + url: uri, + rawRequest: xhr + } + if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE + response.headers = parseHeaders(xhr.getAllResponseHeaders()) + } + } else { + err = new Error("Internal XMLHttpRequest Error") + } + callback(err, response, response.body) + + } + + var xhr = options.xhr || null + + if (!xhr) { + if (options.cors || options.useXDR) { + xhr = new createXHR.XDomainRequest() + }else{ + xhr = new createXHR.XMLHttpRequest() + } + } + + var key + var aborted + var uri = xhr.url = options.uri || options.url + var method = xhr.method = options.method || "GET" + var body = options.body || options.data || null + var headers = xhr.headers = options.headers || {} + var sync = !!options.sync + var isJson = false + var timeoutTimer + + if ("json" in options) { + isJson = true + headers["accept"] || headers["Accept"] || (headers["Accept"] = "application/json") //Don't override existing accept header declared by user + if (method !== "GET" && method !== "HEAD") { + headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json") //Don't override existing accept header declared by user + body = JSON.stringify(options.json) + } + } + + xhr.onreadystatechange = readystatechange + xhr.onload = loadFunc + xhr.onerror = errorFunc + // IE9 must have onprogress be set to a unique function. + xhr.onprogress = function () { + // IE must die + } + xhr.ontimeout = errorFunc + xhr.open(method, uri, !sync, options.username, options.password) + //has to be after open + if(!sync) { + xhr.withCredentials = !!options.withCredentials + } + // Cannot set timeout with sync request + // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly + // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent + if (!sync && options.timeout > 0 ) { + timeoutTimer = setTimeout(function(){ + aborted=true//IE9 may still call readystatechange + xhr.abort("timeout") + var e = new Error("XMLHttpRequest timeout") + e.code = "ETIMEDOUT" + errorFunc(e) + }, options.timeout ) + } + + if (xhr.setRequestHeader) { + for(key in headers){ + if(headers.hasOwnProperty(key)){ + xhr.setRequestHeader(key, headers[key]) + } + } + } else if (options.headers && !isEmpty(options.headers)) { + throw new Error("Headers cannot be set on an XDomainRequest object") + } + + if ("responseType" in options) { + xhr.responseType = options.responseType + } + + if ("beforeSend" in options && + typeof options.beforeSend === "function" + ) { + options.beforeSend(xhr) + } + + xhr.send(body) + + return xhr + + +} + +function noop() {} + +},{"global/window":2,"is-function":57,"once":58,"parse-headers":61,"xtend":62}],57:[function(_dereq_,module,exports){ +module.exports = isFunction + +var toString = Object.prototype.toString + +function isFunction (fn) { + var string = toString.call(fn) + return string === '[object Function]' || + (typeof fn === 'function' && string !== '[object RegExp]') || + (typeof window !== 'undefined' && + // IE8 and below + (fn === window.setTimeout || + fn === window.alert || + fn === window.confirm || + fn === window.prompt)) +}; + +},{}],58:[function(_dereq_,module,exports){ +module.exports = once + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) +}) + +function once (fn) { + var called = false + return function () { + if (called) return + called = true + return fn.apply(this, arguments) + } +} + +},{}],59:[function(_dereq_,module,exports){ +var isFunction = _dereq_('is-function') + +module.exports = forEach + +var toString = Object.prototype.toString +var hasOwnProperty = Object.prototype.hasOwnProperty + +function forEach(list, iterator, context) { + if (!isFunction(iterator)) { + throw new TypeError('iterator must be a function') + } + + if (arguments.length < 3) { + context = this + } + + if (toString.call(list) === '[object Array]') + forEachArray(list, iterator, context) + else if (typeof list === 'string') + forEachString(list, iterator, context) + else + forEachObject(list, iterator, context) +} + +function forEachArray(array, iterator, context) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + iterator.call(context, array[i], i, array) + } + } +} + +function forEachString(string, iterator, context) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + iterator.call(context, string.charAt(i), i, string) + } +} + +function forEachObject(object, iterator, context) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + iterator.call(context, object[k], k, object) + } + } +} + +},{"is-function":57}],60:[function(_dereq_,module,exports){ + +exports = module.exports = trim; + +function trim(str){ + return str.replace(/^\s*|\s*$/g, ''); +} + +exports.left = function(str){ + return str.replace(/^\s*/, ''); +}; + +exports.right = function(str){ + return str.replace(/\s*$/, ''); +}; + +},{}],61:[function(_dereq_,module,exports){ +var trim = _dereq_('trim') + , forEach = _dereq_('for-each') + , isArray = function(arg) { + return Object.prototype.toString.call(arg) === '[object Array]'; + } + +module.exports = function (headers) { + if (!headers) + return {} + + var result = {} + + forEach( + trim(headers).split('\n') + , function (row) { + var index = row.indexOf(':') + , key = trim(row.slice(0, index)).toLowerCase() + , value = trim(row.slice(index + 1)) + + if (typeof(result[key]) === 'undefined') { + result[key] = value + } else if (isArray(result[key])) { + result[key].push(value) + } else { + result[key] = [ result[key], value ] + } + } + ) + + return result +} +},{"for-each":59,"trim":60}],62:[function(_dereq_,module,exports){ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} + +},{}],63:[function(_dereq_,module,exports){ +/** + * @file big-play-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _buttonJs = _dereq_('./button.js'); + +var _buttonJs2 = _interopRequireDefault(_buttonJs); + +var _componentJs = _dereq_('./component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * Initial play button. Shows before the video has played. The hiding of the + * big play button is done via CSS and player states. + * + * @param {Object} player Main Player + * @param {Object=} options Object of option names and values + * @extends Button + * @class BigPlayButton + */ + +var BigPlayButton = (function (_Button) { + _inherits(BigPlayButton, _Button); + + function BigPlayButton(player, options) { + _classCallCheck(this, BigPlayButton); + + _Button.call(this, player, options); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + BigPlayButton.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-big-play-button'; + }; + + /** + * Handles click for play + * + * @method handleClick + */ + + BigPlayButton.prototype.handleClick = function handleClick() { + this.player_.play(); + }; + + return BigPlayButton; +})(_buttonJs2['default']); + +BigPlayButton.prototype.controlText_ = 'Play Video'; + +_componentJs2['default'].registerComponent('BigPlayButton', BigPlayButton); +exports['default'] = BigPlayButton; +module.exports = exports['default']; + +},{"./button.js":64,"./component.js":67}],64:[function(_dereq_,module,exports){ +/** + * @file button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _clickableComponentJs = _dereq_('./clickable-component.js'); + +var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); + +var _component = _dereq_('./component'); + +var _component2 = _interopRequireDefault(_component); + +var _utilsEventsJs = _dereq_('./utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +var _utilsFnJs = _dereq_('./utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsLogJs = _dereq_('./utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +/** + * Base class for all buttons + * + * @param {Object} player Main Player + * @param {Object=} options Object of option names and values + * @extends ClickableComponent + * @class Button + */ + +var Button = (function (_ClickableComponent) { + _inherits(Button, _ClickableComponent); + + function Button(player, options) { + _classCallCheck(this, Button); + + _ClickableComponent.call(this, player, options); + } + + /** + * Create the component's DOM element + * + * @param {String=} type Element's node type. e.g. 'div' + * @param {Object=} props An object of properties that should be set on the element + * @param {Object=} attributes An object of attributes that should be set on the element + * @return {Element} + * @method createEl + */ + + Button.prototype.createEl = function createEl() { + var tag = arguments.length <= 0 || arguments[0] === undefined ? 'button' : arguments[0]; + var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var attributes = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + + props = _objectAssign2['default']({ + className: this.buildCSSClass() + }, props); + + if (tag !== 'button') { + _utilsLogJs2['default'].warn('Creating a Button with an HTML element of ' + tag + ' is deprecated; use ClickableComponent instead.'); + + // Add properties for clickable element which is not a native HTML button + props = _objectAssign2['default']({ + tabIndex: 0 + }, props); + + // Add ARIA attributes for clickable element which is not a native HTML button + attributes = _objectAssign2['default']({ + role: 'button' + }, attributes); + } + + // Add attributes for button element + attributes = _objectAssign2['default']({ + type: 'button', // Necessary since the default button type is "submit" + 'aria-live': 'polite' // let the screen reader user know that the text of the button may change + }, attributes); + + var el = _component2['default'].prototype.createEl.call(this, tag, props, attributes); + + this.createControlTextEl(el); + + return el; + }; + + /** + * Adds a child component inside this button + * + * @param {String|Component} child The class name or instance of a child to add + * @param {Object=} options Options, including options to be passed to children of the child. + * @return {Component} The child component (created by this process if a string was used) + * @deprecated + * @method addChild + */ + + Button.prototype.addChild = function addChild(child) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var className = this.constructor.name; + _utilsLogJs2['default'].warn('Adding an actionable (user controllable) child to a Button (' + className + ') is not supported; use a ClickableComponent instead.'); + + // Avoid the error message generated by ClickableComponent's addChild method + return _component2['default'].prototype.addChild.call(this, child, options); + }; + + /** + * Handle KeyPress (document level) - Extend with specific functionality for button + * + * @method handleKeyPress + */ + + Button.prototype.handleKeyPress = function handleKeyPress(event) { + // Ignore Space (32) or Enter (13) key operation, which is handled by the browser for a button. + if (event.which === 32 || event.which === 13) {} else { + _ClickableComponent.prototype.handleKeyPress.call(this, event); // Pass keypress handling up for unsupported keys + } + }; + + return Button; +})(_clickableComponentJs2['default']); + +_component2['default'].registerComponent('Button', Button); +exports['default'] = Button; +module.exports = exports['default']; + +},{"./clickable-component.js":65,"./component":67,"./utils/events.js":135,"./utils/fn.js":136,"./utils/log.js":139,"global/document":1,"object.assign":45}],65:[function(_dereq_,module,exports){ +/** + * @file button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _component = _dereq_('./component'); + +var _component2 = _interopRequireDefault(_component); + +var _utilsDomJs = _dereq_('./utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsEventsJs = _dereq_('./utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +var _utilsFnJs = _dereq_('./utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsLogJs = _dereq_('./utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +/** + * Clickable Component which is clickable or keyboard actionable, but is not a native HTML button + * + * @param {Object} player Main Player + * @param {Object=} options Object of option names and values + * @extends Component + * @class ClickableComponent + */ + +var ClickableComponent = (function (_Component) { + _inherits(ClickableComponent, _Component); + + function ClickableComponent(player, options) { + _classCallCheck(this, ClickableComponent); + + _Component.call(this, player, options); + + this.emitTapEvents(); + + this.on('tap', this.handleClick); + this.on('click', this.handleClick); + this.on('focus', this.handleFocus); + this.on('blur', this.handleBlur); + } + + /** + * Create the component's DOM element + * + * @param {String=} type Element's node type. e.g. 'div' + * @param {Object=} props An object of properties that should be set on the element + * @param {Object=} attributes An object of attributes that should be set on the element + * @return {Element} + * @method createEl + */ + + ClickableComponent.prototype.createEl = function createEl() { + var tag = arguments.length <= 0 || arguments[0] === undefined ? 'div' : arguments[0]; + var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var attributes = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + + props = _objectAssign2['default']({ + className: this.buildCSSClass(), + tabIndex: 0 + }, props); + + if (tag === 'button') { + _utilsLogJs2['default'].error('Creating a ClickableComponent with an HTML element of ' + tag + ' is not supported; use a Button instead.'); + } + + // Add ARIA attributes for clickable element which is not a native HTML button + attributes = _objectAssign2['default']({ + role: 'button', + 'aria-live': 'polite' // let the screen reader user know that the text of the element may change + }, attributes); + + var el = _Component.prototype.createEl.call(this, tag, props, attributes); + + this.createControlTextEl(el); + + return el; + }; + + /** + * create control text + * + * @param {Element} el Parent element for the control text + * @return {Element} + * @method controlText + */ + + ClickableComponent.prototype.createControlTextEl = function createControlTextEl(el) { + this.controlTextEl_ = Dom.createEl('span', { + className: 'vjs-control-text' + }); + + if (el) { + el.appendChild(this.controlTextEl_); + } + + this.controlText(this.controlText_); + + return this.controlTextEl_; + }; + + /** + * Controls text - both request and localize + * + * @param {String} text Text for element + * @return {String} + * @method controlText + */ + + ClickableComponent.prototype.controlText = function controlText(text) { + if (!text) return this.controlText_ || 'Need Text'; + + this.controlText_ = text; + this.controlTextEl_.innerHTML = this.localize(this.controlText_); + + return this; + }; + + /** + * Allows sub components to stack CSS class names + * + * @return {String} + * @method buildCSSClass + */ + + ClickableComponent.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-control vjs-button ' + _Component.prototype.buildCSSClass.call(this); + }; + + /** + * Adds a child component inside this clickable-component + * + * @param {String|Component} child The class name or instance of a child to add + * @param {Object=} options Options, including options to be passed to children of the child. + * @return {Component} The child component (created by this process if a string was used) + * @method addChild + */ + + ClickableComponent.prototype.addChild = function addChild(child) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + // TODO: Fix adding an actionable child to a ClickableComponent; currently + // it will cause issues with assistive technology (e.g. screen readers) + // which support ARIA, since an element with role="button" cannot have + // actionable child elements. + + //let className = this.constructor.name; + //log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role="button" cannot have actionable child elements.`); + + return _Component.prototype.addChild.call(this, child, options); + }; + + /** + * Enable the component element + * + * @return {Component} + * @method enable + */ + + ClickableComponent.prototype.enable = function enable() { + this.removeClass('vjs-disabled'); + this.el_.setAttribute('aria-disabled', 'false'); + return this; + }; + + /** + * Disable the component element + * + * @return {Component} + * @method disable + */ + + ClickableComponent.prototype.disable = function disable() { + this.addClass('vjs-disabled'); + this.el_.setAttribute('aria-disabled', 'true'); + return this; + }; + + /** + * Handle Click - Override with specific functionality for component + * + * @method handleClick + */ + + ClickableComponent.prototype.handleClick = function handleClick() {}; + + /** + * Handle Focus - Add keyboard functionality to element + * + * @method handleFocus + */ + + ClickableComponent.prototype.handleFocus = function handleFocus() { + Events.on(_globalDocument2['default'], 'keydown', Fn.bind(this, this.handleKeyPress)); + }; + + /** + * Handle KeyPress (document level) - Trigger click when Space or Enter key is pressed + * + * @method handleKeyPress + */ + + ClickableComponent.prototype.handleKeyPress = function handleKeyPress(event) { + // Support Space (32) or Enter (13) key operation to fire a click event + if (event.which === 32 || event.which === 13) { + event.preventDefault(); + this.handleClick(event); + } else if (_Component.prototype.handleKeyPress) { + _Component.prototype.handleKeyPress.call(this, event); // Pass keypress handling up for unsupported keys + } + }; + + /** + * Handle Blur - Remove keyboard triggers + * + * @method handleBlur + */ + + ClickableComponent.prototype.handleBlur = function handleBlur() { + Events.off(_globalDocument2['default'], 'keydown', Fn.bind(this, this.handleKeyPress)); + }; + + return ClickableComponent; +})(_component2['default']); + +_component2['default'].registerComponent('ClickableComponent', ClickableComponent); +exports['default'] = ClickableComponent; +module.exports = exports['default']; + +},{"./component":67,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/log.js":139,"global/document":1,"object.assign":45}],66:[function(_dereq_,module,exports){ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _button = _dereq_('./button'); + +var _button2 = _interopRequireDefault(_button); + +var _component = _dereq_('./component'); + +var _component2 = _interopRequireDefault(_component); + +/** + * The `CloseButton` component is a button which fires a "close" event + * when it is activated. + * + * @extends Button + * @class CloseButton + */ + +var CloseButton = (function (_Button) { + _inherits(CloseButton, _Button); + + function CloseButton(player, options) { + _classCallCheck(this, CloseButton); + + _Button.call(this, player, options); + this.controlText(options && options.controlText || this.localize('Close')); + } + + CloseButton.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-close-button ' + _Button.prototype.buildCSSClass.call(this); + }; + + CloseButton.prototype.handleClick = function handleClick() { + this.trigger({ type: 'close', bubbles: false }); + }; + + return CloseButton; +})(_button2['default']); + +_component2['default'].registerComponent('CloseButton', CloseButton); +exports['default'] = CloseButton; +module.exports = exports['default']; + +},{"./button":64,"./component":67}],67:[function(_dereq_,module,exports){ +/** + * @file component.js + * + * Player Component - Base class for all UI objects + */ + +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _utilsDomJs = _dereq_('./utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFnJs = _dereq_('./utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsGuidJs = _dereq_('./utils/guid.js'); + +var Guid = _interopRequireWildcard(_utilsGuidJs); + +var _utilsEventsJs = _dereq_('./utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +var _utilsLogJs = _dereq_('./utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _utilsToTitleCaseJs = _dereq_('./utils/to-title-case.js'); + +var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +var _utilsMergeOptionsJs = _dereq_('./utils/merge-options.js'); + +var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs); + +/** + * Base UI Component class + * Components are embeddable UI objects that are represented by both a + * javascript object and an element in the DOM. They can be children of other + * components, and can have many children themselves. + * ```js + * // adding a button to the player + * var button = player.addChild('button'); + * button.el(); // -> button element + * ``` + * ```html + *
+ *
Button
+ *
+ * ``` + * Components are also event targets. + * ```js + * button.on('click', function(){ + * console.log('Button Clicked!'); + * }); + * button.trigger('customevent'); + * ``` + * + * @param {Object} player Main Player + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @class Component + */ + +var Component = (function () { + function Component(player, options, ready) { + _classCallCheck(this, Component); + + // The component might be the player itself and we can't pass `this` to super + if (!player && this.play) { + this.player_ = player = this; // eslint-disable-line + } else { + this.player_ = player; + } + + // Make a copy of prototype.options_ to protect against overriding defaults + this.options_ = _utilsMergeOptionsJs2['default']({}, this.options_); + + // Updated options with supplied options + options = this.options_ = _utilsMergeOptionsJs2['default'](this.options_, options); + + // Get ID from options or options element if one is supplied + this.id_ = options.id || options.el && options.el.id; + + // If there was no ID from the options, generate one + if (!this.id_) { + // Don't require the player ID function in the case of mock players + var id = player && player.id && player.id() || 'no_player'; + + this.id_ = id + '_component_' + Guid.newGUID(); + } + + this.name_ = options.name || null; + + // Create element if one wasn't provided in options + if (options.el) { + this.el_ = options.el; + } else if (options.createEl !== false) { + this.el_ = this.createEl(); + } + + this.children_ = []; + this.childIndex_ = {}; + this.childNameIndex_ = {}; + + // Add any child components in options + if (options.initChildren !== false) { + this.initChildren(); + } + + this.ready(ready); + // Don't want to trigger ready here or it will before init is actually + // finished for all children that run this constructor + + if (options.reportTouchActivity !== false) { + this.enableTouchActivity(); + } + } + + /** + * Dispose of the component and all child components + * + * @method dispose + */ + + Component.prototype.dispose = function dispose() { + this.trigger({ type: 'dispose', bubbles: false }); + + // Dispose all children. + if (this.children_) { + for (var i = this.children_.length - 1; i >= 0; i--) { + if (this.children_[i].dispose) { + this.children_[i].dispose(); + } + } + } + + // Delete child references + this.children_ = null; + this.childIndex_ = null; + this.childNameIndex_ = null; + + // Remove all event listeners. + this.off(); + + // Remove element from DOM + if (this.el_.parentNode) { + this.el_.parentNode.removeChild(this.el_); + } + + Dom.removeElData(this.el_); + this.el_ = null; + }; + + /** + * Return the component's player + * + * @return {Player} + * @method player + */ + + Component.prototype.player = function player() { + return this.player_; + }; + + /** + * Deep merge of options objects + * Whenever a property is an object on both options objects + * the two properties will be merged using mergeOptions. + * + * ```js + * Parent.prototype.options_ = { + * optionSet: { + * 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' }, + * 'childTwo': {}, + * 'childThree': {} + * } + * } + * newOptions = { + * optionSet: { + * 'childOne': { 'foo': 'baz', 'abc': '123' } + * 'childTwo': null, + * 'childFour': {} + * } + * } + * + * this.options(newOptions); + * ``` + * RESULT + * ```js + * { + * optionSet: { + * 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' }, + * 'childTwo': null, // Disabled. Won't be initialized. + * 'childThree': {}, + * 'childFour': {} + * } + * } + * ``` + * + * @param {Object} obj Object of new option values + * @return {Object} A NEW object of this.options_ and obj merged + * @method options + */ + + Component.prototype.options = function options(obj) { + _utilsLogJs2['default'].warn('this.options() has been deprecated and will be moved to the constructor in 6.0'); + + if (!obj) { + return this.options_; + } + + this.options_ = _utilsMergeOptionsJs2['default'](this.options_, obj); + return this.options_; + }; + + /** + * Get the component's DOM element + * ```js + * var domEl = myComponent.el(); + * ``` + * + * @return {Element} + * @method el + */ + + Component.prototype.el = function el() { + return this.el_; + }; + + /** + * Create the component's DOM element + * + * @param {String=} tagName Element's node type. e.g. 'div' + * @param {Object=} properties An object of properties that should be set + * @param {Object=} attributes An object of attributes that should be set + * @return {Element} + * @method createEl + */ + + Component.prototype.createEl = function createEl(tagName, properties, attributes) { + return Dom.createEl(tagName, properties, attributes); + }; + + Component.prototype.localize = function localize(string) { + var code = this.player_.language && this.player_.language(); + var languages = this.player_.languages && this.player_.languages(); + + if (!code || !languages) { + return string; + } + + var language = languages[code]; + + if (language && language[string]) { + return language[string]; + } + + var primaryCode = code.split('-')[0]; + var primaryLang = languages[primaryCode]; + + if (primaryLang && primaryLang[string]) { + return primaryLang[string]; + } + + return string; + }; + + /** + * Return the component's DOM element where children are inserted. + * Will either be the same as el() or a new element defined in createEl(). + * + * @return {Element} + * @method contentEl + */ + + Component.prototype.contentEl = function contentEl() { + return this.contentEl_ || this.el_; + }; + + /** + * Get the component's ID + * ```js + * var id = myComponent.id(); + * ``` + * + * @return {String} + * @method id + */ + + Component.prototype.id = function id() { + return this.id_; + }; + + /** + * Get the component's name. The name is often used to reference the component. + * ```js + * var name = myComponent.name(); + * ``` + * + * @return {String} + * @method name + */ + + Component.prototype.name = function name() { + return this.name_; + }; + + /** + * Get an array of all child components + * ```js + * var kids = myComponent.children(); + * ``` + * + * @return {Array} The children + * @method children + */ + + Component.prototype.children = function children() { + return this.children_; + }; + + /** + * Returns a child component with the provided ID + * + * @return {Component} + * @method getChildById + */ + + Component.prototype.getChildById = function getChildById(id) { + return this.childIndex_[id]; + }; + + /** + * Returns a child component with the provided name + * + * @return {Component} + * @method getChild + */ + + Component.prototype.getChild = function getChild(name) { + return this.childNameIndex_[name]; + }; + + /** + * Adds a child component inside this component + * ```js + * myComponent.el(); + * // ->
+ * myComponent.children(); + * // [empty array] + * + * var myButton = myComponent.addChild('MyButton'); + * // ->
myButton
+ * // -> myButton === myComponent.children()[0]; + * ``` + * Pass in options for child constructors and options for children of the child + * ```js + * var myButton = myComponent.addChild('MyButton', { + * text: 'Press Me', + * buttonChildExample: { + * buttonChildOption: true + * } + * }); + * ``` + * + * @param {String|Component} child The class name or instance of a child to add + * @param {Object=} options Options, including options to be passed to children of the child. + * @param {Number} index into our children array to attempt to add the child + * @return {Component} The child component (created by this process if a string was used) + * @method addChild + */ + + Component.prototype.addChild = function addChild(child) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var index = arguments.length <= 2 || arguments[2] === undefined ? this.children_.length : arguments[2]; + + var component = undefined; + var componentName = undefined; + + // If child is a string, create nt with options + if (typeof child === 'string') { + componentName = child; + + // Options can also be specified as a boolean, so convert to an empty object if false. + if (!options) { + options = {}; + } + + // Same as above, but true is deprecated so show a warning. + if (options === true) { + _utilsLogJs2['default'].warn('Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`.'); + options = {}; + } + + // If no componentClass in options, assume componentClass is the name lowercased + // (e.g. playButton) + var componentClassName = options.componentClass || _utilsToTitleCaseJs2['default'](componentName); + + // Set name through options + options.name = componentName; + + // Create a new object & element for this controls set + // If there's no .player_, this is a player + var ComponentClass = Component.getComponent(componentClassName); + + if (!ComponentClass) { + throw new Error('Component ' + componentClassName + ' does not exist'); + } + + // data stored directly on the videojs object may be + // misidentified as a component to retain + // backwards-compatibility with 4.x. check to make sure the + // component class can be instantiated. + if (typeof ComponentClass !== 'function') { + return null; + } + + component = new ComponentClass(this.player_ || this, options); + + // child is a component instance + } else { + component = child; + } + + this.children_.splice(index, 0, component); + + if (typeof component.id === 'function') { + this.childIndex_[component.id()] = component; + } + + // If a name wasn't used to create the component, check if we can use the + // name function of the component + componentName = componentName || component.name && component.name(); + + if (componentName) { + this.childNameIndex_[componentName] = component; + } + + // Add the UI object's element to the container div (box) + // Having an element is not required + if (typeof component.el === 'function' && component.el()) { + var childNodes = this.contentEl().children; + var refNode = childNodes[index] || null; + this.contentEl().insertBefore(component.el(), refNode); + } + + // Return so it can stored on parent object if desired. + return component; + }; + + /** + * Remove a child component from this component's list of children, and the + * child component's element from this component's element + * + * @param {Component} component Component to remove + * @method removeChild + */ + + Component.prototype.removeChild = function removeChild(component) { + if (typeof component === 'string') { + component = this.getChild(component); + } + + if (!component || !this.children_) { + return; + } + + var childFound = false; + + for (var i = this.children_.length - 1; i >= 0; i--) { + if (this.children_[i] === component) { + childFound = true; + this.children_.splice(i, 1); + break; + } + } + + if (!childFound) { + return; + } + + this.childIndex_[component.id()] = null; + this.childNameIndex_[component.name()] = null; + + var compEl = component.el(); + + if (compEl && compEl.parentNode === this.contentEl()) { + this.contentEl().removeChild(component.el()); + } + }; + + /** + * Add and initialize default child components from options + * ```js + * // when an instance of MyComponent is created, all children in options + * // will be added to the instance by their name strings and options + * MyComponent.prototype.options_ = { + * children: [ + * 'myChildComponent' + * ], + * myChildComponent: { + * myChildOption: true + * } + * }; + * + * // Or when creating the component + * var myComp = new MyComponent(player, { + * children: [ + * 'myChildComponent' + * ], + * myChildComponent: { + * myChildOption: true + * } + * }); + * ``` + * The children option can also be an array of + * child options objects (that also include a 'name' key). + * This can be used if you have two child components of the + * same type that need different options. + * ```js + * var myComp = new MyComponent(player, { + * children: [ + * 'button', + * { + * name: 'button', + * someOtherOption: true + * }, + * { + * name: 'button', + * someOtherOption: false + * } + * ] + * }); + * ``` + * + * @method initChildren + */ + + Component.prototype.initChildren = function initChildren() { + var _this = this; + + var children = this.options_.children; + + if (children) { + (function () { + // `this` is `parent` + var parentOptions = _this.options_; + + var handleAdd = function handleAdd(child) { + var name = child.name; + var opts = child.opts; + + // Allow options for children to be set at the parent options + // e.g. videojs(id, { controlBar: false }); + // instead of videojs(id, { children: { controlBar: false }); + if (parentOptions[name] !== undefined) { + opts = parentOptions[name]; + } + + // Allow for disabling default components + // e.g. options['children']['posterImage'] = false + if (opts === false) { + return; + } + + // Allow options to be passed as a simple boolean if no configuration + // is necessary. + if (opts === true) { + opts = {}; + } + + // We also want to pass the original player options to each component as well so they don't need to + // reach back into the player for options later. + opts.playerOptions = _this.options_.playerOptions; + + // Create and add the child component. + // Add a direct reference to the child by name on the parent instance. + // If two of the same component are used, different names should be supplied + // for each + var newChild = _this.addChild(name, opts); + if (newChild) { + _this[name] = newChild; + } + }; + + // Allow for an array of children details to passed in the options + var workingChildren = undefined; + var Tech = Component.getComponent('Tech'); + + if (Array.isArray(children)) { + workingChildren = children; + } else { + workingChildren = Object.keys(children); + } + + workingChildren + // children that are in this.options_ but also in workingChildren would + // give us extra children we do not want. So, we want to filter them out. + .concat(Object.keys(_this.options_).filter(function (child) { + return !workingChildren.some(function (wchild) { + if (typeof wchild === 'string') { + return child === wchild; + } else { + return child === wchild.name; + } + }); + })).map(function (child) { + var name = undefined, + opts = undefined; + + if (typeof child === 'string') { + name = child; + opts = children[name] || _this.options_[name] || {}; + } else { + name = child.name; + opts = child; + } + + return { name: name, opts: opts }; + }).filter(function (child) { + // we have to make sure that child.name isn't in the techOrder since + // techs are registerd as Components but can't aren't compatible + // See https://github.com/videojs/video.js/issues/2772 + var c = Component.getComponent(child.opts.componentClass || _utilsToTitleCaseJs2['default'](child.name)); + return c && !Tech.isTech(c); + }).forEach(handleAdd); + })(); + } + }; + + /** + * Allows sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + Component.prototype.buildCSSClass = function buildCSSClass() { + // Child classes can include a function that does: + // return 'CLASS NAME' + this._super(); + return ''; + }; + + /** + * Add an event listener to this component's element + * ```js + * var myFunc = function(){ + * var myComponent = this; + * // Do something when the event is fired + * }; + * + * myComponent.on('eventType', myFunc); + * ``` + * The context of myFunc will be myComponent unless previously bound. + * Alternatively, you can add a listener to another element or component. + * ```js + * myComponent.on(otherElement, 'eventName', myFunc); + * myComponent.on(otherComponent, 'eventName', myFunc); + * ``` + * The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)` + * and `otherComponent.on('eventName', myFunc)` is that this way the listeners + * will be automatically cleaned up when either component is disposed. + * It will also bind myComponent as the context of myFunc. + * **NOTE**: When using this on elements in the page other than window + * and document (both permanent), if you remove the element from the DOM + * you need to call `myComponent.trigger(el, 'dispose')` on it to clean up + * references to it and allow the browser to garbage collect it. + * + * @param {String|Component} first The event type or other component + * @param {Function|String} second The event handler or event type + * @param {Function} third The event handler + * @return {Component} + * @method on + */ + + Component.prototype.on = function on(first, second, third) { + var _this2 = this; + + if (typeof first === 'string' || Array.isArray(first)) { + Events.on(this.el_, first, Fn.bind(this, second)); + + // Targeting another component or element + } else { + (function () { + var target = first; + var type = second; + var fn = Fn.bind(_this2, third); + + // When this component is disposed, remove the listener from the other component + var removeOnDispose = function removeOnDispose() { + return _this2.off(target, type, fn); + }; + + // Use the same function ID so we can remove it later it using the ID + // of the original listener + removeOnDispose.guid = fn.guid; + _this2.on('dispose', removeOnDispose); + + // If the other component is disposed first we need to clean the reference + // to the other component in this component's removeOnDispose listener + // Otherwise we create a memory leak. + var cleanRemover = function cleanRemover() { + return _this2.off('dispose', removeOnDispose); + }; + + // Add the same function ID so we can easily remove it later + cleanRemover.guid = fn.guid; + + // Check if this is a DOM node + if (first.nodeName) { + // Add the listener to the other element + Events.on(target, type, fn); + Events.on(target, 'dispose', cleanRemover); + + // Should be a component + // Not using `instanceof Component` because it makes mock players difficult + } else if (typeof first.on === 'function') { + // Add the listener to the other component + target.on(type, fn); + target.on('dispose', cleanRemover); + } + })(); + } + + return this; + }; + + /** + * Remove an event listener from this component's element + * ```js + * myComponent.off('eventType', myFunc); + * ``` + * If myFunc is excluded, ALL listeners for the event type will be removed. + * If eventType is excluded, ALL listeners will be removed from the component. + * Alternatively you can use `off` to remove listeners that were added to other + * elements or components using `myComponent.on(otherComponent...`. + * In this case both the event type and listener function are REQUIRED. + * ```js + * myComponent.off(otherElement, 'eventType', myFunc); + * myComponent.off(otherComponent, 'eventType', myFunc); + * ``` + * + * @param {String=|Component} first The event type or other component + * @param {Function=|String} second The listener function or event type + * @param {Function=} third The listener for other component + * @return {Component} + * @method off + */ + + Component.prototype.off = function off(first, second, third) { + if (!first || typeof first === 'string' || Array.isArray(first)) { + Events.off(this.el_, first, second); + } else { + var target = first; + var type = second; + // Ensure there's at least a guid, even if the function hasn't been used + var fn = Fn.bind(this, third); + + // Remove the dispose listener on this component, + // which was given the same guid as the event listener + this.off('dispose', fn); + + if (first.nodeName) { + // Remove the listener + Events.off(target, type, fn); + // Remove the listener for cleaning the dispose listener + Events.off(target, 'dispose', fn); + } else { + target.off(type, fn); + target.off('dispose', fn); + } + } + + return this; + }; + + /** + * Add an event listener to be triggered only once and then removed + * ```js + * myComponent.one('eventName', myFunc); + * ``` + * Alternatively you can add a listener to another element or component + * that will be triggered only once. + * ```js + * myComponent.one(otherElement, 'eventName', myFunc); + * myComponent.one(otherComponent, 'eventName', myFunc); + * ``` + * + * @param {String|Component} first The event type or other component + * @param {Function|String} second The listener function or event type + * @param {Function=} third The listener function for other component + * @return {Component} + * @method one + */ + + Component.prototype.one = function one(first, second, third) { + var _this3 = this, + _arguments = arguments; + + if (typeof first === 'string' || Array.isArray(first)) { + Events.one(this.el_, first, Fn.bind(this, second)); + } else { + (function () { + var target = first; + var type = second; + var fn = Fn.bind(_this3, third); + + var newFunc = function newFunc() { + _this3.off(target, type, newFunc); + fn.apply(null, _arguments); + }; + + // Keep the same function ID so we can remove it later + newFunc.guid = fn.guid; + + _this3.on(target, type, newFunc); + })(); + } + + return this; + }; + + /** + * Trigger an event on an element + * ```js + * myComponent.trigger('eventName'); + * myComponent.trigger({'type':'eventName'}); + * myComponent.trigger('eventName', {data: 'some data'}); + * myComponent.trigger({'type':'eventName'}, {data: 'some data'}); + * ``` + * + * @param {Event|Object|String} event A string (the type) or an event object with a type attribute + * @param {Object} [hash] data hash to pass along with the event + * @return {Component} self + * @method trigger + */ + + Component.prototype.trigger = function trigger(event, hash) { + Events.trigger(this.el_, event, hash); + return this; + }; + + /** + * Bind a listener to the component's ready state. + * Different from event listeners in that if the ready event has already happened + * it will trigger the function immediately. + * + * @param {Function} fn Ready listener + * @param {Boolean} sync Exec the listener synchronously if component is ready + * @return {Component} + * @method ready + */ + + Component.prototype.ready = function ready(fn) { + var sync = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + + if (fn) { + if (this.isReady_) { + if (sync) { + fn.call(this); + } else { + // Call the function asynchronously by default for consistency + this.setTimeout(fn, 1); + } + } else { + this.readyQueue_ = this.readyQueue_ || []; + this.readyQueue_.push(fn); + } + } + return this; + }; + + /** + * Trigger the ready listeners + * + * @return {Component} + * @method triggerReady + */ + + Component.prototype.triggerReady = function triggerReady() { + this.isReady_ = true; + + // Ensure ready is triggerd asynchronously + this.setTimeout(function () { + var readyQueue = this.readyQueue_; + + // Reset Ready Queue + this.readyQueue_ = []; + + if (readyQueue && readyQueue.length > 0) { + readyQueue.forEach(function (fn) { + fn.call(this); + }, this); + } + + // Allow for using event listeners also + this.trigger('ready'); + }, 1); + }; + + /** + * Finds a single DOM element matching `selector` within the component's + * `contentEl` or another custom context. + * + * @method $ + * @param {String} selector + * A valid CSS selector, which will be passed to `querySelector`. + * + * @param {Element|String} [context=document] + * A DOM element within which to query. Can also be a selector + * string in which case the first matching element will be used + * as context. If missing (or no element matches selector), falls + * back to `document`. + * + * @return {Element|null} + */ + + Component.prototype.$ = function $(selector, context) { + return Dom.$(selector, context || this.contentEl()); + }; + + /** + * Finds a all DOM elements matching `selector` within the component's + * `contentEl` or another custom context. + * + * @method $$ + * @param {String} selector + * A valid CSS selector, which will be passed to `querySelectorAll`. + * + * @param {Element|String} [context=document] + * A DOM element within which to query. Can also be a selector + * string in which case the first matching element will be used + * as context. If missing (or no element matches selector), falls + * back to `document`. + * + * @return {NodeList} + */ + + Component.prototype.$$ = function $$(selector, context) { + return Dom.$$(selector, context || this.contentEl()); + }; + + /** + * Check if a component's element has a CSS class name + * + * @param {String} classToCheck Classname to check + * @return {Component} + * @method hasClass + */ + + Component.prototype.hasClass = function hasClass(classToCheck) { + return Dom.hasElClass(this.el_, classToCheck); + }; + + /** + * Add a CSS class name to the component's element + * + * @param {String} classToAdd Classname to add + * @return {Component} + * @method addClass + */ + + Component.prototype.addClass = function addClass(classToAdd) { + Dom.addElClass(this.el_, classToAdd); + return this; + }; + + /** + * Remove a CSS class name from the component's element + * + * @param {String} classToRemove Classname to remove + * @return {Component} + * @method removeClass + */ + + Component.prototype.removeClass = function removeClass(classToRemove) { + Dom.removeElClass(this.el_, classToRemove); + return this; + }; + + /** + * Add or remove a CSS class name from the component's element + * + * @param {String} classToToggle + * @param {Boolean|Function} [predicate] + * Can be a function that returns a Boolean. If `true`, the class + * will be added; if `false`, the class will be removed. If not + * given, the class will be added if not present and vice versa. + * + * @return {Component} + * @method toggleClass + */ + + Component.prototype.toggleClass = function toggleClass(classToToggle, predicate) { + Dom.toggleElClass(this.el_, classToToggle, predicate); + return this; + }; + + /** + * Show the component element if hidden + * + * @return {Component} + * @method show + */ + + Component.prototype.show = function show() { + this.removeClass('vjs-hidden'); + return this; + }; + + /** + * Hide the component element if currently showing + * + * @return {Component} + * @method hide + */ + + Component.prototype.hide = function hide() { + this.addClass('vjs-hidden'); + return this; + }; + + /** + * Lock an item in its visible state + * To be used with fadeIn/fadeOut. + * + * @return {Component} + * @private + * @method lockShowing + */ + + Component.prototype.lockShowing = function lockShowing() { + this.addClass('vjs-lock-showing'); + return this; + }; + + /** + * Unlock an item to be hidden + * To be used with fadeIn/fadeOut. + * + * @return {Component} + * @private + * @method unlockShowing + */ + + Component.prototype.unlockShowing = function unlockShowing() { + this.removeClass('vjs-lock-showing'); + return this; + }; + + /** + * Set or get the width of the component (CSS values) + * Setting the video tag dimension values only works with values in pixels. + * Percent values will not work. + * Some percents can be used, but width()/height() will return the number + %, + * not the actual computed width/height. + * + * @param {Number|String=} num Optional width number + * @param {Boolean} skipListeners Skip the 'resize' event trigger + * @return {Component} This component, when setting the width + * @return {Number|String} The width, when getting + * @method width + */ + + Component.prototype.width = function width(num, skipListeners) { + return this.dimension('width', num, skipListeners); + }; + + /** + * Get or set the height of the component (CSS values) + * Setting the video tag dimension values only works with values in pixels. + * Percent values will not work. + * Some percents can be used, but width()/height() will return the number + %, + * not the actual computed width/height. + * + * @param {Number|String=} num New component height + * @param {Boolean=} skipListeners Skip the resize event trigger + * @return {Component} This component, when setting the height + * @return {Number|String} The height, when getting + * @method height + */ + + Component.prototype.height = function height(num, skipListeners) { + return this.dimension('height', num, skipListeners); + }; + + /** + * Set both width and height at the same time + * + * @param {Number|String} width Width of player + * @param {Number|String} height Height of player + * @return {Component} The component + * @method dimensions + */ + + Component.prototype.dimensions = function dimensions(width, height) { + // Skip resize listeners on width for optimization + return this.width(width, true).height(height); + }; + + /** + * Get or set width or height + * This is the shared code for the width() and height() methods. + * All for an integer, integer + 'px' or integer + '%'; + * Known issue: Hidden elements officially have a width of 0. We're defaulting + * to the style.width value and falling back to computedStyle which has the + * hidden element issue. Info, but probably not an efficient fix: + * http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/ + * + * @param {String} widthOrHeight 'width' or 'height' + * @param {Number|String=} num New dimension + * @param {Boolean=} skipListeners Skip resize event trigger + * @return {Component} The component if a dimension was set + * @return {Number|String} The dimension if nothing was set + * @private + * @method dimension + */ + + Component.prototype.dimension = function dimension(widthOrHeight, num, skipListeners) { + if (num !== undefined) { + // Set to zero if null or literally NaN (NaN !== NaN) + if (num === null || num !== num) { + num = 0; + } + + // Check if using css width/height (% or px) and adjust + if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) { + this.el_.style[widthOrHeight] = num; + } else if (num === 'auto') { + this.el_.style[widthOrHeight] = ''; + } else { + this.el_.style[widthOrHeight] = num + 'px'; + } + + // skipListeners allows us to avoid triggering the resize event when setting both width and height + if (!skipListeners) { + this.trigger('resize'); + } + + // Return component + return this; + } + + // Not setting a value, so getting it + // Make sure element exists + if (!this.el_) { + return 0; + } + + // Get dimension value from style + var val = this.el_.style[widthOrHeight]; + var pxIndex = val.indexOf('px'); + + if (pxIndex !== -1) { + // Return the pixel value with no 'px' + return parseInt(val.slice(0, pxIndex), 10); + } + + // No px so using % or no style was set, so falling back to offsetWidth/height + // If component has display:none, offset will return 0 + // TODO: handle display:none and no dimension style using px + return parseInt(this.el_['offset' + _utilsToTitleCaseJs2['default'](widthOrHeight)], 10); + }; + + /** + * Get width or height of computed style + * @param {String} widthOrHeight 'width' or 'height' + * @return {Number|Boolean} The bolean false if nothing was set + * @method currentDimension + */ + + Component.prototype.currentDimension = function currentDimension(widthOrHeight) { + var computedWidthOrHeight = 0; + + if (widthOrHeight !== 'width' && widthOrHeight !== 'height') { + throw new Error('currentDimension only accepts width or height value'); + } + + if (typeof _globalWindow2['default'].getComputedStyle === 'function') { + var computedStyle = _globalWindow2['default'].getComputedStyle(this.el_); + computedWidthOrHeight = computedStyle.getPropertyValue(widthOrHeight) || computedStyle[widthOrHeight]; + } else if (this.el_.currentStyle) { + // ie 8 doesn't support computed style, shim it + // return clientWidth or clientHeight instead for better accuracy + var rule = 'offset' + _utilsToTitleCaseJs2['default'](widthOrHeight); + computedWidthOrHeight = this.el_[rule]; + } + + // remove 'px' from variable and parse as integer + computedWidthOrHeight = parseFloat(computedWidthOrHeight); + return computedWidthOrHeight; + }; + + /** + * Get an object which contains width and height values of computed style + * @return {Object} The dimensions of element + * @method currentDimensions + */ + + Component.prototype.currentDimensions = function currentDimensions() { + return { + width: this.currentDimension('width'), + height: this.currentDimension('height') + }; + }; + + /** + * Get width of computed style + * @return {Integer} + * @method currentWidth + */ + + Component.prototype.currentWidth = function currentWidth() { + return this.currentDimension('width'); + }; + + /** + * Get height of computed style + * @return {Integer} + * @method currentHeight + */ + + Component.prototype.currentHeight = function currentHeight() { + return this.currentDimension('height'); + }; + + /** + * Emit 'tap' events when touch events are supported + * This is used to support toggling the controls through a tap on the video. + * We're requiring them to be enabled because otherwise every component would + * have this extra overhead unnecessarily, on mobile devices where extra + * overhead is especially bad. + * + * @private + * @method emitTapEvents + */ + + Component.prototype.emitTapEvents = function emitTapEvents() { + // Track the start time so we can determine how long the touch lasted + var touchStart = 0; + var firstTouch = null; + + // Maximum movement allowed during a touch event to still be considered a tap + // Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number. + var tapMovementThreshold = 10; + + // The maximum length a touch can be while still being considered a tap + var touchTimeThreshold = 200; + + var couldBeTap = undefined; + + this.on('touchstart', function (event) { + // If more than one finger, don't consider treating this as a click + if (event.touches.length === 1) { + // Copy the touches object to prevent modifying the original + firstTouch = _objectAssign2['default']({}, event.touches[0]); + // Record start time so we can detect a tap vs. "touch and hold" + touchStart = new Date().getTime(); + // Reset couldBeTap tracking + couldBeTap = true; + } + }); + + this.on('touchmove', function (event) { + // If more than one finger, don't consider treating this as a click + if (event.touches.length > 1) { + couldBeTap = false; + } else if (firstTouch) { + // Some devices will throw touchmoves for all but the slightest of taps. + // So, if we moved only a small distance, this could still be a tap + var xdiff = event.touches[0].pageX - firstTouch.pageX; + var ydiff = event.touches[0].pageY - firstTouch.pageY; + var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff); + + if (touchDistance > tapMovementThreshold) { + couldBeTap = false; + } + } + }); + + var noTap = function noTap() { + couldBeTap = false; + }; + + // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s + this.on('touchleave', noTap); + this.on('touchcancel', noTap); + + // When the touch ends, measure how long it took and trigger the appropriate + // event + this.on('touchend', function (event) { + firstTouch = null; + // Proceed only if the touchmove/leave/cancel event didn't happen + if (couldBeTap === true) { + // Measure how long the touch lasted + var touchTime = new Date().getTime() - touchStart; + + // Make sure the touch was less than the threshold to be considered a tap + if (touchTime < touchTimeThreshold) { + // Don't let browser turn this into a click + event.preventDefault(); + this.trigger('tap'); + // It may be good to copy the touchend event object and change the + // type to tap, if the other event properties aren't exact after + // Events.fixEvent runs (e.g. event.target) + } + } + }); + }; + + /** + * Report user touch activity when touch events occur + * User activity is used to determine when controls should show/hide. It's + * relatively simple when it comes to mouse events, because any mouse event + * should show the controls. So we capture mouse events that bubble up to the + * player and report activity when that happens. + * With touch events it isn't as easy. We can't rely on touch events at the + * player level, because a tap (touchstart + touchend) on the video itself on + * mobile devices is meant to turn controls off (and on). User activity is + * checked asynchronously, so what could happen is a tap event on the video + * turns the controls off, then the touchend event bubbles up to the player, + * which if it reported user activity, would turn the controls right back on. + * (We also don't want to completely block touch events from bubbling up) + * Also a touchmove, touch+hold, and anything other than a tap is not supposed + * to turn the controls back on on a mobile device. + * Here we're setting the default component behavior to report user activity + * whenever touch events happen, and this can be turned off by components that + * want touch events to act differently. + * + * @method enableTouchActivity + */ + + Component.prototype.enableTouchActivity = function enableTouchActivity() { + // Don't continue if the root player doesn't support reporting user activity + if (!this.player() || !this.player().reportUserActivity) { + return; + } + + // listener for reporting that the user is active + var report = Fn.bind(this.player(), this.player().reportUserActivity); + + var touchHolding = undefined; + + this.on('touchstart', function () { + report(); + // For as long as the they are touching the device or have their mouse down, + // we consider them active even if they're not moving their finger or mouse. + // So we want to continue to update that they are active + this.clearInterval(touchHolding); + // report at the same interval as activityCheck + touchHolding = this.setInterval(report, 250); + }); + + var touchEnd = function touchEnd(event) { + report(); + // stop the interval that maintains activity if the touch is holding + this.clearInterval(touchHolding); + }; + + this.on('touchmove', report); + this.on('touchend', touchEnd); + this.on('touchcancel', touchEnd); + }; + + /** + * Creates timeout and sets up disposal automatically. + * + * @param {Function} fn The function to run after the timeout. + * @param {Number} timeout Number of ms to delay before executing specified function. + * @return {Number} Returns the timeout ID + * @method setTimeout + */ + + Component.prototype.setTimeout = function setTimeout(fn, timeout) { + fn = Fn.bind(this, fn); + + // window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't. + var timeoutId = _globalWindow2['default'].setTimeout(fn, timeout); + + var disposeFn = function disposeFn() { + this.clearTimeout(timeoutId); + }; + + disposeFn.guid = 'vjs-timeout-' + timeoutId; + + this.on('dispose', disposeFn); + + return timeoutId; + }; + + /** + * Clears a timeout and removes the associated dispose listener + * + * @param {Number} timeoutId The id of the timeout to clear + * @return {Number} Returns the timeout ID + * @method clearTimeout + */ + + Component.prototype.clearTimeout = function clearTimeout(timeoutId) { + _globalWindow2['default'].clearTimeout(timeoutId); + + var disposeFn = function disposeFn() {}; + + disposeFn.guid = 'vjs-timeout-' + timeoutId; + + this.off('dispose', disposeFn); + + return timeoutId; + }; + + /** + * Creates an interval and sets up disposal automatically. + * + * @param {Function} fn The function to run every N seconds. + * @param {Number} interval Number of ms to delay before executing specified function. + * @return {Number} Returns the interval ID + * @method setInterval + */ + + Component.prototype.setInterval = function setInterval(fn, interval) { + fn = Fn.bind(this, fn); + + var intervalId = _globalWindow2['default'].setInterval(fn, interval); + + var disposeFn = function disposeFn() { + this.clearInterval(intervalId); + }; + + disposeFn.guid = 'vjs-interval-' + intervalId; + + this.on('dispose', disposeFn); + + return intervalId; + }; + + /** + * Clears an interval and removes the associated dispose listener + * + * @param {Number} intervalId The id of the interval to clear + * @return {Number} Returns the interval ID + * @method clearInterval + */ + + Component.prototype.clearInterval = function clearInterval(intervalId) { + _globalWindow2['default'].clearInterval(intervalId); + + var disposeFn = function disposeFn() {}; + + disposeFn.guid = 'vjs-interval-' + intervalId; + + this.off('dispose', disposeFn); + + return intervalId; + }; + + /** + * Registers a component + * + * @param {String} name Name of the component to register + * @param {Object} comp The component to register + * @static + * @method registerComponent + */ + + Component.registerComponent = function registerComponent(name, comp) { + if (!Component.components_) { + Component.components_ = {}; + } + + Component.components_[name] = comp; + return comp; + }; + + /** + * Gets a component by name + * + * @param {String} name Name of the component to get + * @return {Component} + * @static + * @method getComponent + */ + + Component.getComponent = function getComponent(name) { + if (Component.components_ && Component.components_[name]) { + return Component.components_[name]; + } + + if (_globalWindow2['default'] && _globalWindow2['default'].videojs && _globalWindow2['default'].videojs[name]) { + _utilsLogJs2['default'].warn('The ' + name + ' component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)'); + return _globalWindow2['default'].videojs[name]; + } + }; + + /** + * Sets up the constructor using the supplied init method + * or uses the init of the parent object + * + * @param {Object} props An object of properties + * @static + * @deprecated + * @method extend + */ + + Component.extend = function extend(props) { + props = props || {}; + + _utilsLogJs2['default'].warn('Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead'); + + // Set up the constructor using the supplied init method + // or using the init of the parent object + // Make sure to check the unobfuscated version for external libs + var init = props.init || props.init || this.prototype.init || this.prototype.init || function () {}; + // In Resig's simple class inheritance (previously used) the constructor + // is a function that calls `this.init.apply(arguments)` + // However that would prevent us from using `ParentObject.call(this);` + // in a Child constructor because the `this` in `this.init` + // would still refer to the Child and cause an infinite loop. + // We would instead have to do + // `ParentObject.prototype.init.apply(this, arguments);` + // Bleh. We're not creating a _super() function, so it's good to keep + // the parent constructor reference simple. + var subObj = function subObj() { + init.apply(this, arguments); + }; + + // Inherit from this object's prototype + subObj.prototype = Object.create(this.prototype); + // Reset the constructor property for subObj otherwise + // instances of subObj would have the constructor of the parent Object + subObj.prototype.constructor = subObj; + + // Make the class extendable + subObj.extend = Component.extend; + + // Extend subObj's prototype with functions and other properties from props + for (var _name in props) { + if (props.hasOwnProperty(_name)) { + subObj.prototype[_name] = props[_name]; + } + } + + return subObj; + }; + + return Component; +})(); + +Component.registerComponent('Component', Component); +exports['default'] = Component; +module.exports = exports['default']; + +},{"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/guid.js":138,"./utils/log.js":139,"./utils/merge-options.js":140,"./utils/to-title-case.js":143,"global/window":2,"object.assign":45}],68:[function(_dereq_,module,exports){ +/** + * @file control-bar.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +// Required children + +var _playToggleJs = _dereq_('./play-toggle.js'); + +var _playToggleJs2 = _interopRequireDefault(_playToggleJs); + +var _timeControlsCurrentTimeDisplayJs = _dereq_('./time-controls/current-time-display.js'); + +var _timeControlsCurrentTimeDisplayJs2 = _interopRequireDefault(_timeControlsCurrentTimeDisplayJs); + +var _timeControlsDurationDisplayJs = _dereq_('./time-controls/duration-display.js'); + +var _timeControlsDurationDisplayJs2 = _interopRequireDefault(_timeControlsDurationDisplayJs); + +var _timeControlsTimeDividerJs = _dereq_('./time-controls/time-divider.js'); + +var _timeControlsTimeDividerJs2 = _interopRequireDefault(_timeControlsTimeDividerJs); + +var _timeControlsRemainingTimeDisplayJs = _dereq_('./time-controls/remaining-time-display.js'); + +var _timeControlsRemainingTimeDisplayJs2 = _interopRequireDefault(_timeControlsRemainingTimeDisplayJs); + +var _liveDisplayJs = _dereq_('./live-display.js'); + +var _liveDisplayJs2 = _interopRequireDefault(_liveDisplayJs); + +var _progressControlProgressControlJs = _dereq_('./progress-control/progress-control.js'); + +var _progressControlProgressControlJs2 = _interopRequireDefault(_progressControlProgressControlJs); + +var _fullscreenToggleJs = _dereq_('./fullscreen-toggle.js'); + +var _fullscreenToggleJs2 = _interopRequireDefault(_fullscreenToggleJs); + +var _volumeControlVolumeControlJs = _dereq_('./volume-control/volume-control.js'); + +var _volumeControlVolumeControlJs2 = _interopRequireDefault(_volumeControlVolumeControlJs); + +var _volumeMenuButtonJs = _dereq_('./volume-menu-button.js'); + +var _volumeMenuButtonJs2 = _interopRequireDefault(_volumeMenuButtonJs); + +var _muteToggleJs = _dereq_('./mute-toggle.js'); + +var _muteToggleJs2 = _interopRequireDefault(_muteToggleJs); + +var _textTrackControlsChaptersButtonJs = _dereq_('./text-track-controls/chapters-button.js'); + +var _textTrackControlsChaptersButtonJs2 = _interopRequireDefault(_textTrackControlsChaptersButtonJs); + +var _textTrackControlsDescriptionsButtonJs = _dereq_('./text-track-controls/descriptions-button.js'); + +var _textTrackControlsDescriptionsButtonJs2 = _interopRequireDefault(_textTrackControlsDescriptionsButtonJs); + +var _textTrackControlsSubtitlesButtonJs = _dereq_('./text-track-controls/subtitles-button.js'); + +var _textTrackControlsSubtitlesButtonJs2 = _interopRequireDefault(_textTrackControlsSubtitlesButtonJs); + +var _textTrackControlsCaptionsButtonJs = _dereq_('./text-track-controls/captions-button.js'); + +var _textTrackControlsCaptionsButtonJs2 = _interopRequireDefault(_textTrackControlsCaptionsButtonJs); + +var _playbackRateMenuPlaybackRateMenuButtonJs = _dereq_('./playback-rate-menu/playback-rate-menu-button.js'); + +var _playbackRateMenuPlaybackRateMenuButtonJs2 = _interopRequireDefault(_playbackRateMenuPlaybackRateMenuButtonJs); + +var _spacerControlsCustomControlSpacerJs = _dereq_('./spacer-controls/custom-control-spacer.js'); + +var _spacerControlsCustomControlSpacerJs2 = _interopRequireDefault(_spacerControlsCustomControlSpacerJs); + +/** + * Container of main controls + * + * @extends Component + * @class ControlBar + */ + +var ControlBar = (function (_Component) { + _inherits(ControlBar, _Component); + + function ControlBar() { + _classCallCheck(this, ControlBar); + + _Component.apply(this, arguments); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + ControlBar.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-control-bar', + dir: 'ltr' + }, { + 'role': 'group' // The control bar is a group, so it can contain menuitems + }); + }; + + return ControlBar; +})(_componentJs2['default']); + +ControlBar.prototype.options_ = { + loadEvent: 'play', + children: ['playToggle', 'volumeMenuButton', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subtitlesButton', 'captionsButton', 'fullscreenToggle'] +}; + +_componentJs2['default'].registerComponent('ControlBar', ControlBar); +exports['default'] = ControlBar; +module.exports = exports['default']; + +},{"../component.js":67,"./fullscreen-toggle.js":69,"./live-display.js":70,"./mute-toggle.js":71,"./play-toggle.js":72,"./playback-rate-menu/playback-rate-menu-button.js":73,"./progress-control/progress-control.js":78,"./spacer-controls/custom-control-spacer.js":81,"./text-track-controls/captions-button.js":84,"./text-track-controls/chapters-button.js":85,"./text-track-controls/descriptions-button.js":87,"./text-track-controls/subtitles-button.js":89,"./time-controls/current-time-display.js":92,"./time-controls/duration-display.js":93,"./time-controls/remaining-time-display.js":94,"./time-controls/time-divider.js":95,"./volume-control/volume-control.js":97,"./volume-menu-button.js":99}],69:[function(_dereq_,module,exports){ +/** + * @file fullscreen-toggle.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _buttonJs = _dereq_('../button.js'); + +var _buttonJs2 = _interopRequireDefault(_buttonJs); + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * Toggle fullscreen video + * + * @extends Button + * @class FullscreenToggle + */ + +var FullscreenToggle = (function (_Button) { + _inherits(FullscreenToggle, _Button); + + function FullscreenToggle() { + _classCallCheck(this, FullscreenToggle); + + _Button.apply(this, arguments); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + FullscreenToggle.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-fullscreen-control ' + _Button.prototype.buildCSSClass.call(this); + }; + + /** + * Handles click for full screen + * + * @method handleClick + */ + + FullscreenToggle.prototype.handleClick = function handleClick() { + if (!this.player_.isFullscreen()) { + this.player_.requestFullscreen(); + this.controlText('Non-Fullscreen'); + } else { + this.player_.exitFullscreen(); + this.controlText('Fullscreen'); + } + }; + + return FullscreenToggle; +})(_buttonJs2['default']); + +FullscreenToggle.prototype.controlText_ = 'Fullscreen'; + +_componentJs2['default'].registerComponent('FullscreenToggle', FullscreenToggle); +exports['default'] = FullscreenToggle; +module.exports = exports['default']; + +},{"../button.js":64,"../component.js":67}],70:[function(_dereq_,module,exports){ +/** + * @file live-display.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _component = _dereq_('../component'); + +var _component2 = _interopRequireDefault(_component); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +/** + * Displays the live indicator + * TODO - Future make it click to snap to live + * + * @extends Component + * @class LiveDisplay + */ + +var LiveDisplay = (function (_Component) { + _inherits(LiveDisplay, _Component); + + function LiveDisplay(player, options) { + _classCallCheck(this, LiveDisplay); + + _Component.call(this, player, options); + + this.updateShowing(); + this.on(this.player(), 'durationchange', this.updateShowing); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + LiveDisplay.prototype.createEl = function createEl() { + var el = _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-live-control vjs-control' + }); + + this.contentEl_ = Dom.createEl('div', { + className: 'vjs-live-display', + innerHTML: '' + this.localize('Stream Type') + '' + this.localize('LIVE') + }, { + 'aria-live': 'off' + }); + + el.appendChild(this.contentEl_); + return el; + }; + + LiveDisplay.prototype.updateShowing = function updateShowing() { + if (this.player().duration() === Infinity) { + this.show(); + } else { + this.hide(); + } + }; + + return LiveDisplay; +})(_component2['default']); + +_component2['default'].registerComponent('LiveDisplay', LiveDisplay); +exports['default'] = LiveDisplay; +module.exports = exports['default']; + +},{"../component":67,"../utils/dom.js":134}],71:[function(_dereq_,module,exports){ +/** + * @file mute-toggle.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _button = _dereq_('../button'); + +var _button2 = _interopRequireDefault(_button); + +var _component = _dereq_('../component'); + +var _component2 = _interopRequireDefault(_component); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +/** + * A button component for muting the audio + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Button + * @class MuteToggle + */ + +var MuteToggle = (function (_Button) { + _inherits(MuteToggle, _Button); + + function MuteToggle(player, options) { + _classCallCheck(this, MuteToggle); + + _Button.call(this, player, options); + + this.on(player, 'volumechange', this.update); + + // hide mute toggle if the current tech doesn't support volume control + if (player.tech_ && player.tech_['featuresVolumeControl'] === false) { + this.addClass('vjs-hidden'); + } + + this.on(player, 'loadstart', function () { + this.update(); // We need to update the button to account for a default muted state. + + if (player.tech_['featuresVolumeControl'] === false) { + this.addClass('vjs-hidden'); + } else { + this.removeClass('vjs-hidden'); + } + }); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + MuteToggle.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-mute-control ' + _Button.prototype.buildCSSClass.call(this); + }; + + /** + * Handle click on mute + * + * @method handleClick + */ + + MuteToggle.prototype.handleClick = function handleClick() { + this.player_.muted(this.player_.muted() ? false : true); + }; + + /** + * Update volume + * + * @method update + */ + + MuteToggle.prototype.update = function update() { + var vol = this.player_.volume(), + level = 3; + + if (vol === 0 || this.player_.muted()) { + level = 0; + } else if (vol < 0.33) { + level = 1; + } else if (vol < 0.67) { + level = 2; + } + + // Don't rewrite the button text if the actual text doesn't change. + // This causes unnecessary and confusing information for screen reader users. + // This check is needed because this function gets called every time the volume level is changed. + var toMute = this.player_.muted() ? 'Unmute' : 'Mute'; + if (this.controlText() !== toMute) { + this.controlText(toMute); + } + + /* TODO improve muted icon classes */ + for (var i = 0; i < 4; i++) { + Dom.removeElClass(this.el_, 'vjs-vol-' + i); + } + Dom.addElClass(this.el_, 'vjs-vol-' + level); + }; + + return MuteToggle; +})(_button2['default']); + +MuteToggle.prototype.controlText_ = 'Mute'; + +_component2['default'].registerComponent('MuteToggle', MuteToggle); +exports['default'] = MuteToggle; +module.exports = exports['default']; + +},{"../button":64,"../component":67,"../utils/dom.js":134}],72:[function(_dereq_,module,exports){ +/** + * @file play-toggle.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _buttonJs = _dereq_('../button.js'); + +var _buttonJs2 = _interopRequireDefault(_buttonJs); + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * Button to toggle between play and pause + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Button + * @class PlayToggle + */ + +var PlayToggle = (function (_Button) { + _inherits(PlayToggle, _Button); + + function PlayToggle(player, options) { + _classCallCheck(this, PlayToggle); + + _Button.call(this, player, options); + + this.on(player, 'play', this.handlePlay); + this.on(player, 'pause', this.handlePause); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + PlayToggle.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-play-control ' + _Button.prototype.buildCSSClass.call(this); + }; + + /** + * Handle click to toggle between play and pause + * + * @method handleClick + */ + + PlayToggle.prototype.handleClick = function handleClick() { + if (this.player_.paused()) { + this.player_.play(); + } else { + this.player_.pause(); + } + }; + + /** + * Add the vjs-playing class to the element so it can change appearance + * + * @method handlePlay + */ + + PlayToggle.prototype.handlePlay = function handlePlay() { + this.removeClass('vjs-paused'); + this.addClass('vjs-playing'); + this.controlText('Pause'); // change the button text to "Pause" + }; + + /** + * Add the vjs-paused class to the element so it can change appearance + * + * @method handlePause + */ + + PlayToggle.prototype.handlePause = function handlePause() { + this.removeClass('vjs-playing'); + this.addClass('vjs-paused'); + this.controlText('Play'); // change the button text to "Play" + }; + + return PlayToggle; +})(_buttonJs2['default']); + +PlayToggle.prototype.controlText_ = 'Play'; + +_componentJs2['default'].registerComponent('PlayToggle', PlayToggle); +exports['default'] = PlayToggle; +module.exports = exports['default']; + +},{"../button.js":64,"../component.js":67}],73:[function(_dereq_,module,exports){ +/** + * @file playback-rate-menu-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _menuMenuButtonJs = _dereq_('../../menu/menu-button.js'); + +var _menuMenuButtonJs2 = _interopRequireDefault(_menuMenuButtonJs); + +var _menuMenuJs = _dereq_('../../menu/menu.js'); + +var _menuMenuJs2 = _interopRequireDefault(_menuMenuJs); + +var _playbackRateMenuItemJs = _dereq_('./playback-rate-menu-item.js'); + +var _playbackRateMenuItemJs2 = _interopRequireDefault(_playbackRateMenuItemJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +/** + * The component for controlling the playback rate + * + * @param {Player|Object} player + * @param {Object=} options + * @extends MenuButton + * @class PlaybackRateMenuButton + */ + +var PlaybackRateMenuButton = (function (_MenuButton) { + _inherits(PlaybackRateMenuButton, _MenuButton); + + function PlaybackRateMenuButton(player, options) { + _classCallCheck(this, PlaybackRateMenuButton); + + _MenuButton.call(this, player, options); + + this.updateVisibility(); + this.updateLabel(); + + this.on(player, 'loadstart', this.updateVisibility); + this.on(player, 'ratechange', this.updateLabel); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + PlaybackRateMenuButton.prototype.createEl = function createEl() { + var el = _MenuButton.prototype.createEl.call(this); + + this.labelEl_ = Dom.createEl('div', { + className: 'vjs-playback-rate-value', + innerHTML: 1.0 + }); + + el.appendChild(this.labelEl_); + + return el; + }; + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + PlaybackRateMenuButton.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-playback-rate ' + _MenuButton.prototype.buildCSSClass.call(this); + }; + + /** + * Create the playback rate menu + * + * @return {Menu} Menu object populated with items + * @method createMenu + */ + + PlaybackRateMenuButton.prototype.createMenu = function createMenu() { + var menu = new _menuMenuJs2['default'](this.player()); + var rates = this.playbackRates(); + + if (rates) { + for (var i = rates.length - 1; i >= 0; i--) { + menu.addChild(new _playbackRateMenuItemJs2['default'](this.player(), { 'rate': rates[i] + 'x' })); + } + } + + return menu; + }; + + /** + * Updates ARIA accessibility attributes + * + * @method updateARIAAttributes + */ + + PlaybackRateMenuButton.prototype.updateARIAAttributes = function updateARIAAttributes() { + // Current playback rate + this.el().setAttribute('aria-valuenow', this.player().playbackRate()); + }; + + /** + * Handle menu item click + * + * @method handleClick + */ + + PlaybackRateMenuButton.prototype.handleClick = function handleClick() { + // select next rate option + var currentRate = this.player().playbackRate(); + var rates = this.playbackRates(); + + // this will select first one if the last one currently selected + var newRate = rates[0]; + for (var i = 0; i < rates.length; i++) { + if (rates[i] > currentRate) { + newRate = rates[i]; + break; + } + } + this.player().playbackRate(newRate); + }; + + /** + * Get possible playback rates + * + * @return {Array} Possible playback rates + * @method playbackRates + */ + + PlaybackRateMenuButton.prototype.playbackRates = function playbackRates() { + return this.options_['playbackRates'] || this.options_.playerOptions && this.options_.playerOptions['playbackRates']; + }; + + /** + * Get supported playback rates + * + * @return {Array} Supported playback rates + * @method playbackRateSupported + */ + + PlaybackRateMenuButton.prototype.playbackRateSupported = function playbackRateSupported() { + return this.player().tech_ && this.player().tech_['featuresPlaybackRate'] && this.playbackRates() && this.playbackRates().length > 0; + }; + + /** + * Hide playback rate controls when they're no playback rate options to select + * + * @method updateVisibility + */ + + PlaybackRateMenuButton.prototype.updateVisibility = function updateVisibility() { + if (this.playbackRateSupported()) { + this.removeClass('vjs-hidden'); + } else { + this.addClass('vjs-hidden'); + } + }; + + /** + * Update button label when rate changed + * + * @method updateLabel + */ + + PlaybackRateMenuButton.prototype.updateLabel = function updateLabel() { + if (this.playbackRateSupported()) { + this.labelEl_.innerHTML = this.player().playbackRate() + 'x'; + } + }; + + return PlaybackRateMenuButton; +})(_menuMenuButtonJs2['default']); + +PlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate'; + +_componentJs2['default'].registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton); +exports['default'] = PlaybackRateMenuButton; +module.exports = exports['default']; + +},{"../../component.js":67,"../../menu/menu-button.js":106,"../../menu/menu.js":108,"../../utils/dom.js":134,"./playback-rate-menu-item.js":74}],74:[function(_dereq_,module,exports){ +/** + * @file playback-rate-menu-item.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _menuMenuItemJs = _dereq_('../../menu/menu-item.js'); + +var _menuMenuItemJs2 = _interopRequireDefault(_menuMenuItemJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * The specific menu item type for selecting a playback rate + * + * @param {Player|Object} player + * @param {Object=} options + * @extends MenuItem + * @class PlaybackRateMenuItem + */ + +var PlaybackRateMenuItem = (function (_MenuItem) { + _inherits(PlaybackRateMenuItem, _MenuItem); + + function PlaybackRateMenuItem(player, options) { + _classCallCheck(this, PlaybackRateMenuItem); + + var label = options['rate']; + var rate = parseFloat(label, 10); + + // Modify options for parent MenuItem class's init. + options['label'] = label; + options['selected'] = rate === 1; + _MenuItem.call(this, player, options); + + this.label = label; + this.rate = rate; + + this.on(player, 'ratechange', this.update); + } + + /** + * Handle click on menu item + * + * @method handleClick + */ + + PlaybackRateMenuItem.prototype.handleClick = function handleClick() { + _MenuItem.prototype.handleClick.call(this); + this.player().playbackRate(this.rate); + }; + + /** + * Update playback rate with selected rate + * + * @method update + */ + + PlaybackRateMenuItem.prototype.update = function update() { + this.selected(this.player().playbackRate() === this.rate); + }; + + return PlaybackRateMenuItem; +})(_menuMenuItemJs2['default']); + +PlaybackRateMenuItem.prototype.contentElType = 'button'; + +_componentJs2['default'].registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem); +exports['default'] = PlaybackRateMenuItem; +module.exports = exports['default']; + +},{"../../component.js":67,"../../menu/menu-item.js":107}],75:[function(_dereq_,module,exports){ +/** + * @file load-progress-bar.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +/** + * Shows load progress + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class LoadProgressBar + */ + +var LoadProgressBar = (function (_Component) { + _inherits(LoadProgressBar, _Component); + + function LoadProgressBar(player, options) { + _classCallCheck(this, LoadProgressBar); + + _Component.call(this, player, options); + this.on(player, 'progress', this.update); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + LoadProgressBar.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-load-progress', + innerHTML: '' + this.localize('Loaded') + ': 0%' + }); + }; + + /** + * Update progress bar + * + * @method update + */ + + LoadProgressBar.prototype.update = function update() { + var buffered = this.player_.buffered(); + var duration = this.player_.duration(); + var bufferedEnd = this.player_.bufferedEnd(); + var children = this.el_.children; + + // get the percent width of a time compared to the total end + var percentify = function percentify(time, end) { + var percent = time / end || 0; // no NaN + return (percent >= 1 ? 1 : percent) * 100 + '%'; + }; + + // update the width of the progress bar + this.el_.style.width = percentify(bufferedEnd, duration); + + // add child elements to represent the individual buffered time ranges + for (var i = 0; i < buffered.length; i++) { + var start = buffered.start(i); + var end = buffered.end(i); + var part = children[i]; + + if (!part) { + part = this.el_.appendChild(Dom.createEl()); + } + + // set the percent based on the width of the progress bar (bufferedEnd) + part.style.left = percentify(start, bufferedEnd); + part.style.width = percentify(end - start, bufferedEnd); + } + + // remove unused buffered range elements + for (var i = children.length; i > buffered.length; i--) { + this.el_.removeChild(children[i - 1]); + } + }; + + return LoadProgressBar; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('LoadProgressBar', LoadProgressBar); +exports['default'] = LoadProgressBar; +module.exports = exports['default']; + +},{"../../component.js":67,"../../utils/dom.js":134}],76:[function(_dereq_,module,exports){ +/** + * @file mouse-time-display.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); + +var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); + +var _lodashCompatFunctionThrottle = _dereq_('lodash-compat/function/throttle'); + +var _lodashCompatFunctionThrottle2 = _interopRequireDefault(_lodashCompatFunctionThrottle); + +/** + * The Mouse Time Display component shows the time you will seek to + * when hovering over the progress bar + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class MouseTimeDisplay + */ + +var MouseTimeDisplay = (function (_Component) { + _inherits(MouseTimeDisplay, _Component); + + function MouseTimeDisplay(player, options) { + var _this = this; + + _classCallCheck(this, MouseTimeDisplay); + + _Component.call(this, player, options); + + if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) { + this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside; + } + + if (this.keepTooltipsInside) { + this.tooltip = Dom.createEl('div', { className: 'vjs-time-tooltip' }); + this.el().appendChild(this.tooltip); + this.addClass('vjs-keep-tooltips-inside'); + } + + this.update(0, 0); + + player.on('ready', function () { + _this.on(player.controlBar.progressControl.el(), 'mousemove', _lodashCompatFunctionThrottle2['default'](Fn.bind(_this, _this.handleMouseMove), 25)); + }); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + MouseTimeDisplay.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-mouse-display' + }); + }; + + MouseTimeDisplay.prototype.handleMouseMove = function handleMouseMove(event) { + var duration = this.player_.duration(); + var newTime = this.calculateDistance(event) * duration; + var position = event.pageX - Dom.findElPosition(this.el().parentNode).left; + + this.update(newTime, position); + }; + + MouseTimeDisplay.prototype.update = function update(newTime, position) { + var time = _utilsFormatTimeJs2['default'](newTime, this.player_.duration()); + + this.el().style.left = position + 'px'; + this.el().setAttribute('data-current-time', time); + + if (this.keepTooltipsInside) { + var clampedPosition = this.clampPosition_(position); + var difference = position - clampedPosition + 1; + var tooltipWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.tooltip).width); + var tooltipWidthHalf = tooltipWidth / 2; + + this.tooltip.innerHTML = time; + this.tooltip.style.right = '-' + (tooltipWidthHalf - difference) + 'px'; + } + }; + + MouseTimeDisplay.prototype.calculateDistance = function calculateDistance(event) { + return Dom.getPointerPosition(this.el().parentNode, event).x; + }; + + /** + * This takes in a horizontal position for the bar and returns a clamped position. + * Clamped position means that it will keep the position greater than half the width + * of the tooltip and smaller than the player width minus half the width o the tooltip. + * It will only clamp the position if `keepTooltipsInside` option is set. + * + * @param {Number} position the position the bar wants to be + * @return {Number} newPosition the (potentially) clamped position + * @method clampPosition_ + */ + + MouseTimeDisplay.prototype.clampPosition_ = function clampPosition_(position) { + if (!this.keepTooltipsInside) { + return position; + } + + var playerWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.player().el()).width); + var tooltipWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.tooltip).width); + var tooltipWidthHalf = tooltipWidth / 2; + var actualPosition = position; + + if (position < tooltipWidthHalf) { + actualPosition = Math.ceil(tooltipWidthHalf); + } else if (position > playerWidth - tooltipWidthHalf) { + actualPosition = Math.floor(playerWidth - tooltipWidthHalf); + } + + return actualPosition; + }; + + return MouseTimeDisplay; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('MouseTimeDisplay', MouseTimeDisplay); +exports['default'] = MouseTimeDisplay; +module.exports = exports['default']; + +},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137,"global/window":2,"lodash-compat/function/throttle":7}],77:[function(_dereq_,module,exports){ +/** + * @file play-progress-bar.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); + +var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); + +/** + * Shows play progress + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class PlayProgressBar + */ + +var PlayProgressBar = (function (_Component) { + _inherits(PlayProgressBar, _Component); + + function PlayProgressBar(player, options) { + _classCallCheck(this, PlayProgressBar); + + _Component.call(this, player, options); + this.updateDataAttr(); + this.on(player, 'timeupdate', this.updateDataAttr); + player.ready(Fn.bind(this, this.updateDataAttr)); + + if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) { + this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside; + } + + if (this.keepTooltipsInside) { + this.addClass('vjs-keep-tooltips-inside'); + } + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + PlayProgressBar.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-play-progress vjs-slider-bar', + innerHTML: '' + this.localize('Progress') + ': 0%' + }); + }; + + PlayProgressBar.prototype.updateDataAttr = function updateDataAttr() { + var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); + this.el_.setAttribute('data-current-time', _utilsFormatTimeJs2['default'](time, this.player_.duration())); + }; + + return PlayProgressBar; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('PlayProgressBar', PlayProgressBar); +exports['default'] = PlayProgressBar; +module.exports = exports['default']; + +},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137}],78:[function(_dereq_,module,exports){ +/** + * @file progress-control.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _seekBarJs = _dereq_('./seek-bar.js'); + +var _seekBarJs2 = _interopRequireDefault(_seekBarJs); + +var _mouseTimeDisplayJs = _dereq_('./mouse-time-display.js'); + +var _mouseTimeDisplayJs2 = _interopRequireDefault(_mouseTimeDisplayJs); + +/** + * The Progress Control component contains the seek bar, load progress, + * and play progress + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class ProgressControl + */ + +var ProgressControl = (function (_Component) { + _inherits(ProgressControl, _Component); + + function ProgressControl() { + _classCallCheck(this, ProgressControl); + + _Component.apply(this, arguments); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + ProgressControl.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-progress-control vjs-control' + }); + }; + + return ProgressControl; +})(_componentJs2['default']); + +ProgressControl.prototype.options_ = { + children: ['seekBar'] +}; + +_componentJs2['default'].registerComponent('ProgressControl', ProgressControl); +exports['default'] = ProgressControl; +module.exports = exports['default']; + +},{"../../component.js":67,"./mouse-time-display.js":76,"./seek-bar.js":79}],79:[function(_dereq_,module,exports){ +/** + * @file seek-bar.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _sliderSliderJs = _dereq_('../../slider/slider.js'); + +var _sliderSliderJs2 = _interopRequireDefault(_sliderSliderJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _loadProgressBarJs = _dereq_('./load-progress-bar.js'); + +var _loadProgressBarJs2 = _interopRequireDefault(_loadProgressBarJs); + +var _playProgressBarJs = _dereq_('./play-progress-bar.js'); + +var _playProgressBarJs2 = _interopRequireDefault(_playProgressBarJs); + +var _tooltipProgressBarJs = _dereq_('./tooltip-progress-bar.js'); + +var _tooltipProgressBarJs2 = _interopRequireDefault(_tooltipProgressBarJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); + +var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +/** + * Seek Bar and holder for the progress bars + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Slider + * @class SeekBar + */ + +var SeekBar = (function (_Slider) { + _inherits(SeekBar, _Slider); + + function SeekBar(player, options) { + _classCallCheck(this, SeekBar); + + _Slider.call(this, player, options); + this.on(player, 'timeupdate', this.updateProgress); + this.on(player, 'ended', this.updateProgress); + player.ready(Fn.bind(this, this.updateProgress)); + + if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) { + this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside; + } + + if (this.keepTooltipsInside) { + this.tooltipProgressBar = this.addChild('TooltipProgressBar'); + } + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + SeekBar.prototype.createEl = function createEl() { + return _Slider.prototype.createEl.call(this, 'div', { + className: 'vjs-progress-holder' + }, { + 'aria-label': 'progress bar' + }); + }; + + /** + * Update ARIA accessibility attributes + * + * @method updateARIAAttributes + */ + + SeekBar.prototype.updateProgress = function updateProgress() { + this.updateAriaAttributes(this.el_); + + if (this.keepTooltipsInside) { + this.updateAriaAttributes(this.tooltipProgressBar.el_); + this.tooltipProgressBar.el_.style.width = this.bar.el_.style.width; + + var playerWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.player().el()).width); + var tooltipWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.tooltipProgressBar.tooltip).width); + var tooltipStyle = this.tooltipProgressBar.el().style; + tooltipStyle.maxWidth = Math.floor(playerWidth - tooltipWidth / 2) + 'px'; + tooltipStyle.minWidth = Math.ceil(tooltipWidth / 2) + 'px'; + tooltipStyle.right = '-' + tooltipWidth / 2 + 'px'; + } + }; + + SeekBar.prototype.updateAriaAttributes = function updateAriaAttributes(el) { + // Allows for smooth scrubbing, when player can't keep up. + var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); + el.setAttribute('aria-valuenow', (this.getPercent() * 100).toFixed(2)); // machine readable value of progress bar (percentage complete) + el.setAttribute('aria-valuetext', _utilsFormatTimeJs2['default'](time, this.player_.duration())); // human readable value of progress bar (time complete) + }; + + /** + * Get percentage of video played + * + * @return {Number} Percentage played + * @method getPercent + */ + + SeekBar.prototype.getPercent = function getPercent() { + var percent = this.player_.currentTime() / this.player_.duration(); + return percent >= 1 ? 1 : percent; + }; + + /** + * Handle mouse down on seek bar + * + * @method handleMouseDown + */ + + SeekBar.prototype.handleMouseDown = function handleMouseDown(event) { + _Slider.prototype.handleMouseDown.call(this, event); + + this.player_.scrubbing(true); + + this.videoWasPlaying = !this.player_.paused(); + this.player_.pause(); + }; + + /** + * Handle mouse move on seek bar + * + * @method handleMouseMove + */ + + SeekBar.prototype.handleMouseMove = function handleMouseMove(event) { + var newTime = this.calculateDistance(event) * this.player_.duration(); + + // Don't let video end while scrubbing. + if (newTime === this.player_.duration()) { + newTime = newTime - 0.1; + } + + // Set new time (tell player to seek to new time) + this.player_.currentTime(newTime); + }; + + /** + * Handle mouse up on seek bar + * + * @method handleMouseUp + */ + + SeekBar.prototype.handleMouseUp = function handleMouseUp(event) { + _Slider.prototype.handleMouseUp.call(this, event); + + this.player_.scrubbing(false); + if (this.videoWasPlaying) { + this.player_.play(); + } + }; + + /** + * Move more quickly fast forward for keyboard-only users + * + * @method stepForward + */ + + SeekBar.prototype.stepForward = function stepForward() { + this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users + }; + + /** + * Move more quickly rewind for keyboard-only users + * + * @method stepBack + */ + + SeekBar.prototype.stepBack = function stepBack() { + this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users + }; + + return SeekBar; +})(_sliderSliderJs2['default']); + +SeekBar.prototype.options_ = { + children: ['loadProgressBar', 'mouseTimeDisplay', 'playProgressBar'], + 'barName': 'playProgressBar' +}; + +SeekBar.prototype.playerEvent = 'timeupdate'; + +_componentJs2['default'].registerComponent('SeekBar', SeekBar); +exports['default'] = SeekBar; +module.exports = exports['default']; + +},{"../../component.js":67,"../../slider/slider.js":116,"../../utils/fn.js":136,"../../utils/format-time.js":137,"./load-progress-bar.js":75,"./play-progress-bar.js":77,"./tooltip-progress-bar.js":80,"global/window":2,"object.assign":45}],80:[function(_dereq_,module,exports){ +/** + * @file play-progress-bar.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); + +var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); + +/** + * Shows play progress + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class PlayProgressBar + */ + +var TooltipProgressBar = (function (_Component) { + _inherits(TooltipProgressBar, _Component); + + function TooltipProgressBar(player, options) { + _classCallCheck(this, TooltipProgressBar); + + _Component.call(this, player, options); + this.updateDataAttr(); + this.on(player, 'timeupdate', this.updateDataAttr); + player.ready(Fn.bind(this, this.updateDataAttr)); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + TooltipProgressBar.prototype.createEl = function createEl() { + var el = _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-tooltip-progress-bar vjs-slider-bar', + innerHTML: '
\n ' + this.localize('Progress') + ': 0%' + }); + + this.tooltip = el.querySelector('.vjs-time-tooltip'); + + return el; + }; + + TooltipProgressBar.prototype.updateDataAttr = function updateDataAttr() { + var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); + var formattedTime = _utilsFormatTimeJs2['default'](time, this.player_.duration()); + this.el_.setAttribute('data-current-time', formattedTime); + this.tooltip.innerHTML = formattedTime; + }; + + return TooltipProgressBar; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('TooltipProgressBar', TooltipProgressBar); +exports['default'] = TooltipProgressBar; +module.exports = exports['default']; + +},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137}],81:[function(_dereq_,module,exports){ +/** + * @file custom-control-spacer.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _spacerJs = _dereq_('./spacer.js'); + +var _spacerJs2 = _interopRequireDefault(_spacerJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * Spacer specifically meant to be used as an insertion point for new plugins, etc. + * + * @extends Spacer + * @class CustomControlSpacer + */ + +var CustomControlSpacer = (function (_Spacer) { + _inherits(CustomControlSpacer, _Spacer); + + function CustomControlSpacer() { + _classCallCheck(this, CustomControlSpacer); + + _Spacer.apply(this, arguments); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + CustomControlSpacer.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-custom-control-spacer ' + _Spacer.prototype.buildCSSClass.call(this); + }; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + CustomControlSpacer.prototype.createEl = function createEl() { + var el = _Spacer.prototype.createEl.call(this, { + className: this.buildCSSClass() + }); + + // No-flex/table-cell mode requires there be some content + // in the cell to fill the remaining space of the table. + el.innerHTML = ' '; + return el; + }; + + return CustomControlSpacer; +})(_spacerJs2['default']); + +_componentJs2['default'].registerComponent('CustomControlSpacer', CustomControlSpacer); +exports['default'] = CustomControlSpacer; +module.exports = exports['default']; + +},{"../../component.js":67,"./spacer.js":82}],82:[function(_dereq_,module,exports){ +/** + * @file spacer.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * Just an empty spacer element that can be used as an append point for plugins, etc. + * Also can be used to create space between elements when necessary. + * + * @extends Component + * @class Spacer + */ + +var Spacer = (function (_Component) { + _inherits(Spacer, _Component); + + function Spacer() { + _classCallCheck(this, Spacer); + + _Component.apply(this, arguments); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + Spacer.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-spacer ' + _Component.prototype.buildCSSClass.call(this); + }; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + Spacer.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: this.buildCSSClass() + }); + }; + + return Spacer; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('Spacer', Spacer); + +exports['default'] = Spacer; +module.exports = exports['default']; + +},{"../../component.js":67}],83:[function(_dereq_,module,exports){ +/** + * @file caption-settings-menu-item.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _textTrackMenuItemJs = _dereq_('./text-track-menu-item.js'); + +var _textTrackMenuItemJs2 = _interopRequireDefault(_textTrackMenuItemJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * The menu item for caption track settings menu + * + * @param {Player|Object} player + * @param {Object=} options + * @extends TextTrackMenuItem + * @class CaptionSettingsMenuItem + */ + +var CaptionSettingsMenuItem = (function (_TextTrackMenuItem) { + _inherits(CaptionSettingsMenuItem, _TextTrackMenuItem); + + function CaptionSettingsMenuItem(player, options) { + _classCallCheck(this, CaptionSettingsMenuItem); + + options['track'] = { + 'kind': options['kind'], + 'player': player, + 'label': options['kind'] + ' settings', + 'selectable': false, + 'default': false, + mode: 'disabled' + }; + + // CaptionSettingsMenuItem has no concept of 'selected' + options['selectable'] = false; + + _TextTrackMenuItem.call(this, player, options); + this.addClass('vjs-texttrack-settings'); + this.controlText(', opens ' + options['kind'] + ' settings dialog'); + } + + /** + * Handle click on menu item + * + * @method handleClick + */ + + CaptionSettingsMenuItem.prototype.handleClick = function handleClick() { + this.player().getChild('textTrackSettings').show(); + this.player().getChild('textTrackSettings').el_.focus(); + }; + + return CaptionSettingsMenuItem; +})(_textTrackMenuItemJs2['default']); + +_componentJs2['default'].registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem); +exports['default'] = CaptionSettingsMenuItem; +module.exports = exports['default']; + +},{"../../component.js":67,"./text-track-menu-item.js":91}],84:[function(_dereq_,module,exports){ +/** + * @file captions-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _textTrackButtonJs = _dereq_('./text-track-button.js'); + +var _textTrackButtonJs2 = _interopRequireDefault(_textTrackButtonJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _captionSettingsMenuItemJs = _dereq_('./caption-settings-menu-item.js'); + +var _captionSettingsMenuItemJs2 = _interopRequireDefault(_captionSettingsMenuItemJs); + +/** + * The button component for toggling and selecting captions + * + * @param {Object} player Player object + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends TextTrackButton + * @class CaptionsButton + */ + +var CaptionsButton = (function (_TextTrackButton) { + _inherits(CaptionsButton, _TextTrackButton); + + function CaptionsButton(player, options, ready) { + _classCallCheck(this, CaptionsButton); + + _TextTrackButton.call(this, player, options, ready); + this.el_.setAttribute('aria-label', 'Captions Menu'); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + CaptionsButton.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-captions-button ' + _TextTrackButton.prototype.buildCSSClass.call(this); + }; + + /** + * Update caption menu items + * + * @method update + */ + + CaptionsButton.prototype.update = function update() { + var threshold = 2; + _TextTrackButton.prototype.update.call(this); + + // if native, then threshold is 1 because no settings button + if (this.player().tech_ && this.player().tech_['featuresNativeTextTracks']) { + threshold = 1; + } + + if (this.items && this.items.length > threshold) { + this.show(); + } else { + this.hide(); + } + }; + + /** + * Create caption menu items + * + * @return {Array} Array of menu items + * @method createItems + */ + + CaptionsButton.prototype.createItems = function createItems() { + var items = []; + + if (!(this.player().tech_ && this.player().tech_['featuresNativeTextTracks'])) { + items.push(new _captionSettingsMenuItemJs2['default'](this.player_, { 'kind': this.kind_ })); + } + + return _TextTrackButton.prototype.createItems.call(this, items); + }; + + return CaptionsButton; +})(_textTrackButtonJs2['default']); + +CaptionsButton.prototype.kind_ = 'captions'; +CaptionsButton.prototype.controlText_ = 'Captions'; + +_componentJs2['default'].registerComponent('CaptionsButton', CaptionsButton); +exports['default'] = CaptionsButton; +module.exports = exports['default']; + +},{"../../component.js":67,"./caption-settings-menu-item.js":83,"./text-track-button.js":90}],85:[function(_dereq_,module,exports){ +/** + * @file chapters-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _textTrackButtonJs = _dereq_('./text-track-button.js'); + +var _textTrackButtonJs2 = _interopRequireDefault(_textTrackButtonJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _textTrackMenuItemJs = _dereq_('./text-track-menu-item.js'); + +var _textTrackMenuItemJs2 = _interopRequireDefault(_textTrackMenuItemJs); + +var _chaptersTrackMenuItemJs = _dereq_('./chapters-track-menu-item.js'); + +var _chaptersTrackMenuItemJs2 = _interopRequireDefault(_chaptersTrackMenuItemJs); + +var _menuMenuJs = _dereq_('../../menu/menu.js'); + +var _menuMenuJs2 = _interopRequireDefault(_menuMenuJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsToTitleCaseJs = _dereq_('../../utils/to-title-case.js'); + +var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +/** + * The button component for toggling and selecting chapters + * Chapters act much differently than other text tracks + * Cues are navigation vs. other tracks of alternative languages + * + * @param {Object} player Player object + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends TextTrackButton + * @class ChaptersButton + */ + +var ChaptersButton = (function (_TextTrackButton) { + _inherits(ChaptersButton, _TextTrackButton); + + function ChaptersButton(player, options, ready) { + _classCallCheck(this, ChaptersButton); + + _TextTrackButton.call(this, player, options, ready); + this.el_.setAttribute('aria-label', 'Chapters Menu'); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + ChaptersButton.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-chapters-button ' + _TextTrackButton.prototype.buildCSSClass.call(this); + }; + + /** + * Create a menu item for each text track + * + * @return {Array} Array of menu items + * @method createItems + */ + + ChaptersButton.prototype.createItems = function createItems() { + var items = []; + + var tracks = this.player_.textTracks(); + + if (!tracks) { + return items; + } + + for (var i = 0; i < tracks.length; i++) { + var track = tracks[i]; + if (track['kind'] === this.kind_) { + items.push(new _textTrackMenuItemJs2['default'](this.player_, { + 'track': track + })); + } + } + + return items; + }; + + /** + * Create menu from chapter buttons + * + * @return {Menu} Menu of chapter buttons + * @method createMenu + */ + + ChaptersButton.prototype.createMenu = function createMenu() { + var _this = this; + + var tracks = this.player_.textTracks() || []; + var chaptersTrack = undefined; + var items = this.items = []; + + for (var i = 0, _length = tracks.length; i < _length; i++) { + var track = tracks[i]; + + if (track['kind'] === this.kind_) { + chaptersTrack = track; + + break; + } + } + + var menu = this.menu; + if (menu === undefined) { + menu = new _menuMenuJs2['default'](this.player_); + var title = Dom.createEl('li', { + className: 'vjs-menu-title', + innerHTML: _utilsToTitleCaseJs2['default'](this.kind_), + tabIndex: -1 + }); + menu.children_.unshift(title); + Dom.insertElFirst(title, menu.contentEl()); + } + + if (chaptersTrack && chaptersTrack.cues == null) { + chaptersTrack['mode'] = 'hidden'; + + var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(chaptersTrack); + + if (remoteTextTrackEl) { + remoteTextTrackEl.addEventListener('load', function (event) { + return _this.update(); + }); + } + } + + if (chaptersTrack && chaptersTrack.cues && chaptersTrack.cues.length > 0) { + var cues = chaptersTrack['cues'], + cue = undefined; + + for (var i = 0, l = cues.length; i < l; i++) { + cue = cues[i]; + + var mi = new _chaptersTrackMenuItemJs2['default'](this.player_, { + 'track': chaptersTrack, + 'cue': cue + }); + + items.push(mi); + + menu.addChild(mi); + } + + this.addChild(menu); + } + + if (this.items.length > 0) { + this.show(); + } + + return menu; + }; + + return ChaptersButton; +})(_textTrackButtonJs2['default']); + +ChaptersButton.prototype.kind_ = 'chapters'; +ChaptersButton.prototype.controlText_ = 'Chapters'; + +_componentJs2['default'].registerComponent('ChaptersButton', ChaptersButton); +exports['default'] = ChaptersButton; +module.exports = exports['default']; + +},{"../../component.js":67,"../../menu/menu.js":108,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/to-title-case.js":143,"./chapters-track-menu-item.js":86,"./text-track-button.js":90,"./text-track-menu-item.js":91,"global/window":2}],86:[function(_dereq_,module,exports){ +/** + * @file chapters-track-menu-item.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _menuMenuItemJs = _dereq_('../../menu/menu-item.js'); + +var _menuMenuItemJs2 = _interopRequireDefault(_menuMenuItemJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +/** + * The chapter track menu item + * + * @param {Player|Object} player + * @param {Object=} options + * @extends MenuItem + * @class ChaptersTrackMenuItem + */ + +var ChaptersTrackMenuItem = (function (_MenuItem) { + _inherits(ChaptersTrackMenuItem, _MenuItem); + + function ChaptersTrackMenuItem(player, options) { + _classCallCheck(this, ChaptersTrackMenuItem); + + var track = options['track']; + var cue = options['cue']; + var currentTime = player.currentTime(); + + // Modify options for parent MenuItem class's init. + options['label'] = cue.text; + options['selected'] = cue['startTime'] <= currentTime && currentTime < cue['endTime']; + _MenuItem.call(this, player, options); + + this.track = track; + this.cue = cue; + track.addEventListener('cuechange', Fn.bind(this, this.update)); + } + + /** + * Handle click on menu item + * + * @method handleClick + */ + + ChaptersTrackMenuItem.prototype.handleClick = function handleClick() { + _MenuItem.prototype.handleClick.call(this); + this.player_.currentTime(this.cue.startTime); + this.update(this.cue.startTime); + }; + + /** + * Update chapter menu item + * + * @method update + */ + + ChaptersTrackMenuItem.prototype.update = function update() { + var cue = this.cue; + var currentTime = this.player_.currentTime(); + + // vjs.log(currentTime, cue.startTime); + this.selected(cue['startTime'] <= currentTime && currentTime < cue['endTime']); + }; + + return ChaptersTrackMenuItem; +})(_menuMenuItemJs2['default']); + +_componentJs2['default'].registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem); +exports['default'] = ChaptersTrackMenuItem; +module.exports = exports['default']; + +},{"../../component.js":67,"../../menu/menu-item.js":107,"../../utils/fn.js":136}],87:[function(_dereq_,module,exports){ +/** + * @file descriptions-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _textTrackButtonJs = _dereq_('./text-track-button.js'); + +var _textTrackButtonJs2 = _interopRequireDefault(_textTrackButtonJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +/** + * The button component for toggling and selecting descriptions + * + * @param {Object} player Player object + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends TextTrackButton + * @class DescriptionsButton + */ + +var DescriptionsButton = (function (_TextTrackButton) { + _inherits(DescriptionsButton, _TextTrackButton); + + function DescriptionsButton(player, options, ready) { + var _this = this; + + _classCallCheck(this, DescriptionsButton); + + _TextTrackButton.call(this, player, options, ready); + this.el_.setAttribute('aria-label', 'Descriptions Menu'); + + var tracks = player.textTracks(); + + if (tracks) { + (function () { + var changeHandler = Fn.bind(_this, _this.handleTracksChange); + + tracks.addEventListener('change', changeHandler); + _this.on('dispose', function () { + tracks.removeEventListener('change', changeHandler); + }); + })(); + } + } + + /** + * Handle text track change + * + * @method handleTracksChange + */ + + DescriptionsButton.prototype.handleTracksChange = function handleTracksChange(event) { + var tracks = this.player().textTracks(); + var disabled = false; + + // Check whether a track of a different kind is showing + for (var i = 0, l = tracks.length; i < l; i++) { + var track = tracks[i]; + if (track['kind'] !== this.kind_ && track['mode'] === 'showing') { + disabled = true; + break; + } + } + + // If another track is showing, disable this menu button + if (disabled) { + this.disable(); + } else { + this.enable(); + } + }; + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + DescriptionsButton.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-descriptions-button ' + _TextTrackButton.prototype.buildCSSClass.call(this); + }; + + return DescriptionsButton; +})(_textTrackButtonJs2['default']); + +DescriptionsButton.prototype.kind_ = 'descriptions'; +DescriptionsButton.prototype.controlText_ = 'Descriptions'; + +_componentJs2['default'].registerComponent('DescriptionsButton', DescriptionsButton); +exports['default'] = DescriptionsButton; +module.exports = exports['default']; + +},{"../../component.js":67,"../../utils/fn.js":136,"./text-track-button.js":90}],88:[function(_dereq_,module,exports){ +/** + * @file off-text-track-menu-item.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _textTrackMenuItemJs = _dereq_('./text-track-menu-item.js'); + +var _textTrackMenuItemJs2 = _interopRequireDefault(_textTrackMenuItemJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * A special menu item for turning of a specific type of text track + * + * @param {Player|Object} player + * @param {Object=} options + * @extends TextTrackMenuItem + * @class OffTextTrackMenuItem + */ + +var OffTextTrackMenuItem = (function (_TextTrackMenuItem) { + _inherits(OffTextTrackMenuItem, _TextTrackMenuItem); + + function OffTextTrackMenuItem(player, options) { + _classCallCheck(this, OffTextTrackMenuItem); + + // Create pseudo track info + // Requires options['kind'] + options['track'] = { + 'kind': options['kind'], + 'player': player, + 'label': options['kind'] + ' off', + 'default': false, + 'mode': 'disabled' + }; + + // MenuItem is selectable + options['selectable'] = true; + + _TextTrackMenuItem.call(this, player, options); + this.selected(true); + } + + /** + * Handle text track change + * + * @param {Object} event Event object + * @method handleTracksChange + */ + + OffTextTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) { + var tracks = this.player().textTracks(); + var selected = true; + + for (var i = 0, l = tracks.length; i < l; i++) { + var track = tracks[i]; + if (track['kind'] === this.track['kind'] && track['mode'] === 'showing') { + selected = false; + break; + } + } + + this.selected(selected); + }; + + return OffTextTrackMenuItem; +})(_textTrackMenuItemJs2['default']); + +_componentJs2['default'].registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem); +exports['default'] = OffTextTrackMenuItem; +module.exports = exports['default']; + +},{"../../component.js":67,"./text-track-menu-item.js":91}],89:[function(_dereq_,module,exports){ +/** + * @file subtitles-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _textTrackButtonJs = _dereq_('./text-track-button.js'); + +var _textTrackButtonJs2 = _interopRequireDefault(_textTrackButtonJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * The button component for toggling and selecting subtitles + * + * @param {Object} player Player object + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends TextTrackButton + * @class SubtitlesButton + */ + +var SubtitlesButton = (function (_TextTrackButton) { + _inherits(SubtitlesButton, _TextTrackButton); + + function SubtitlesButton(player, options, ready) { + _classCallCheck(this, SubtitlesButton); + + _TextTrackButton.call(this, player, options, ready); + this.el_.setAttribute('aria-label', 'Subtitles Menu'); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + SubtitlesButton.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-subtitles-button ' + _TextTrackButton.prototype.buildCSSClass.call(this); + }; + + return SubtitlesButton; +})(_textTrackButtonJs2['default']); + +SubtitlesButton.prototype.kind_ = 'subtitles'; +SubtitlesButton.prototype.controlText_ = 'Subtitles'; + +_componentJs2['default'].registerComponent('SubtitlesButton', SubtitlesButton); +exports['default'] = SubtitlesButton; +module.exports = exports['default']; + +},{"../../component.js":67,"./text-track-button.js":90}],90:[function(_dereq_,module,exports){ +/** + * @file text-track-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _menuMenuButtonJs = _dereq_('../../menu/menu-button.js'); + +var _menuMenuButtonJs2 = _interopRequireDefault(_menuMenuButtonJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _textTrackMenuItemJs = _dereq_('./text-track-menu-item.js'); + +var _textTrackMenuItemJs2 = _interopRequireDefault(_textTrackMenuItemJs); + +var _offTextTrackMenuItemJs = _dereq_('./off-text-track-menu-item.js'); + +var _offTextTrackMenuItemJs2 = _interopRequireDefault(_offTextTrackMenuItemJs); + +/** + * The base class for buttons that toggle specific text track types (e.g. subtitles) + * + * @param {Player|Object} player + * @param {Object=} options + * @extends MenuButton + * @class TextTrackButton + */ + +var TextTrackButton = (function (_MenuButton) { + _inherits(TextTrackButton, _MenuButton); + + function TextTrackButton(player, options) { + _classCallCheck(this, TextTrackButton); + + _MenuButton.call(this, player, options); + + var tracks = this.player_.textTracks(); + + if (this.items.length <= 1) { + this.hide(); + } + + if (!tracks) { + return; + } + + var updateHandler = Fn.bind(this, this.update); + tracks.addEventListener('removetrack', updateHandler); + tracks.addEventListener('addtrack', updateHandler); + + this.player_.on('dispose', function () { + tracks.removeEventListener('removetrack', updateHandler); + tracks.removeEventListener('addtrack', updateHandler); + }); + } + + // Create a menu item for each text track + + TextTrackButton.prototype.createItems = function createItems() { + var items = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; + + // Add an OFF menu item to turn all tracks off + items.push(new _offTextTrackMenuItemJs2['default'](this.player_, { 'kind': this.kind_ })); + + var tracks = this.player_.textTracks(); + + if (!tracks) { + return items; + } + + for (var i = 0; i < tracks.length; i++) { + var track = tracks[i]; + + // only add tracks that are of the appropriate kind and have a label + if (track['kind'] === this.kind_) { + items.push(new _textTrackMenuItemJs2['default'](this.player_, { + // MenuItem is selectable + 'selectable': true, + 'track': track + })); + } + } + + return items; + }; + + return TextTrackButton; +})(_menuMenuButtonJs2['default']); + +_componentJs2['default'].registerComponent('TextTrackButton', TextTrackButton); +exports['default'] = TextTrackButton; +module.exports = exports['default']; + +},{"../../component.js":67,"../../menu/menu-button.js":106,"../../utils/fn.js":136,"./off-text-track-menu-item.js":88,"./text-track-menu-item.js":91}],91:[function(_dereq_,module,exports){ +/** + * @file text-track-menu-item.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _menuMenuItemJs = _dereq_('../../menu/menu-item.js'); + +var _menuMenuItemJs2 = _interopRequireDefault(_menuMenuItemJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +/** + * The specific menu item type for selecting a language within a text track kind + * + * @param {Player|Object} player + * @param {Object=} options + * @extends MenuItem + * @class TextTrackMenuItem + */ + +var TextTrackMenuItem = (function (_MenuItem) { + _inherits(TextTrackMenuItem, _MenuItem); + + function TextTrackMenuItem(player, options) { + var _this = this; + + _classCallCheck(this, TextTrackMenuItem); + + var track = options['track']; + var tracks = player.textTracks(); + + // Modify options for parent MenuItem class's init. + options['label'] = track['label'] || track['language'] || 'Unknown'; + options['selected'] = track['default'] || track['mode'] === 'showing'; + + _MenuItem.call(this, player, options); + + this.track = track; + + if (tracks) { + (function () { + var changeHandler = Fn.bind(_this, _this.handleTracksChange); + + tracks.addEventListener('change', changeHandler); + _this.on('dispose', function () { + tracks.removeEventListener('change', changeHandler); + }); + })(); + } + + // iOS7 doesn't dispatch change events to TextTrackLists when an + // associated track's mode changes. Without something like + // Object.observe() (also not present on iOS7), it's not + // possible to detect changes to the mode attribute and polyfill + // the change event. As a poor substitute, we manually dispatch + // change events whenever the controls modify the mode. + if (tracks && tracks.onchange === undefined) { + (function () { + var event = undefined; + + _this.on(['tap', 'click'], function () { + if (typeof _globalWindow2['default'].Event !== 'object') { + // Android 2.3 throws an Illegal Constructor error for window.Event + try { + event = new _globalWindow2['default'].Event('change'); + } catch (err) {} + } + + if (!event) { + event = _globalDocument2['default'].createEvent('Event'); + event.initEvent('change', true, true); + } + + tracks.dispatchEvent(event); + }); + })(); + } + } + + /** + * Handle click on text track + * + * @method handleClick + */ + + TextTrackMenuItem.prototype.handleClick = function handleClick(event) { + var kind = this.track['kind']; + var tracks = this.player_.textTracks(); + + _MenuItem.prototype.handleClick.call(this, event); + + if (!tracks) return; + + for (var i = 0; i < tracks.length; i++) { + var track = tracks[i]; + + if (track['kind'] !== kind) { + continue; + } + + if (track === this.track) { + track['mode'] = 'showing'; + } else { + track['mode'] = 'disabled'; + } + } + }; + + /** + * Handle text track change + * + * @method handleTracksChange + */ + + TextTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) { + this.selected(this.track['mode'] === 'showing'); + }; + + return TextTrackMenuItem; +})(_menuMenuItemJs2['default']); + +_componentJs2['default'].registerComponent('TextTrackMenuItem', TextTrackMenuItem); +exports['default'] = TextTrackMenuItem; +module.exports = exports['default']; + +},{"../../component.js":67,"../../menu/menu-item.js":107,"../../utils/fn.js":136,"global/document":1,"global/window":2}],92:[function(_dereq_,module,exports){ +/** + * @file current-time-display.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); + +var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); + +/** + * Displays the current time + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class CurrentTimeDisplay + */ + +var CurrentTimeDisplay = (function (_Component) { + _inherits(CurrentTimeDisplay, _Component); + + function CurrentTimeDisplay(player, options) { + _classCallCheck(this, CurrentTimeDisplay); + + _Component.call(this, player, options); + + this.on(player, 'timeupdate', this.updateContent); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + CurrentTimeDisplay.prototype.createEl = function createEl() { + var el = _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-current-time vjs-time-control vjs-control' + }); + + this.contentEl_ = Dom.createEl('div', { + className: 'vjs-current-time-display', + // label the current time for screen reader users + innerHTML: 'Current Time ' + '0:00' + }, { + // tell screen readers not to automatically read the time as it changes + 'aria-live': 'off' + }); + + el.appendChild(this.contentEl_); + return el; + }; + + /** + * Update current time display + * + * @method updateContent + */ + + CurrentTimeDisplay.prototype.updateContent = function updateContent() { + // Allows for smooth scrubbing, when player can't keep up. + var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); + var localizedText = this.localize('Current Time'); + var formattedTime = _utilsFormatTimeJs2['default'](time, this.player_.duration()); + if (formattedTime !== this.formattedTime_) { + this.formattedTime_ = formattedTime; + this.contentEl_.innerHTML = '' + localizedText + ' ' + formattedTime; + } + }; + + return CurrentTimeDisplay; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('CurrentTimeDisplay', CurrentTimeDisplay); +exports['default'] = CurrentTimeDisplay; +module.exports = exports['default']; + +},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],93:[function(_dereq_,module,exports){ +/** + * @file duration-display.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); + +var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); + +/** + * Displays the duration + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class DurationDisplay + */ + +var DurationDisplay = (function (_Component) { + _inherits(DurationDisplay, _Component); + + function DurationDisplay(player, options) { + _classCallCheck(this, DurationDisplay); + + _Component.call(this, player, options); + + // this might need to be changed to 'durationchange' instead of 'timeupdate' eventually, + // however the durationchange event fires before this.player_.duration() is set, + // so the value cannot be written out using this method. + // Once the order of durationchange and this.player_.duration() being set is figured out, + // this can be updated. + this.on(player, 'timeupdate', this.updateContent); + this.on(player, 'loadedmetadata', this.updateContent); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + DurationDisplay.prototype.createEl = function createEl() { + var el = _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-duration vjs-time-control vjs-control' + }); + + this.contentEl_ = Dom.createEl('div', { + className: 'vjs-duration-display', + // label the duration time for screen reader users + innerHTML: '' + this.localize('Duration Time') + ' 0:00' + }, { + // tell screen readers not to automatically read the time as it changes + 'aria-live': 'off' + }); + + el.appendChild(this.contentEl_); + return el; + }; + + /** + * Update duration time display + * + * @method updateContent + */ + + DurationDisplay.prototype.updateContent = function updateContent() { + var duration = this.player_.duration(); + if (duration && this.duration_ !== duration) { + this.duration_ = duration; + var localizedText = this.localize('Duration Time'); + var formattedTime = _utilsFormatTimeJs2['default'](duration); + this.contentEl_.innerHTML = '' + localizedText + ' ' + formattedTime; // label the duration time for screen reader users + } + }; + + return DurationDisplay; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('DurationDisplay', DurationDisplay); +exports['default'] = DurationDisplay; +module.exports = exports['default']; + +},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],94:[function(_dereq_,module,exports){ +/** + * @file remaining-time-display.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); + +var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); + +/** + * Displays the time left in the video + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class RemainingTimeDisplay + */ + +var RemainingTimeDisplay = (function (_Component) { + _inherits(RemainingTimeDisplay, _Component); + + function RemainingTimeDisplay(player, options) { + _classCallCheck(this, RemainingTimeDisplay); + + _Component.call(this, player, options); + + this.on(player, 'timeupdate', this.updateContent); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + RemainingTimeDisplay.prototype.createEl = function createEl() { + var el = _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-remaining-time vjs-time-control vjs-control' + }); + + this.contentEl_ = Dom.createEl('div', { + className: 'vjs-remaining-time-display', + // label the remaining time for screen reader users + innerHTML: '' + this.localize('Remaining Time') + ' -0:00' + }, { + // tell screen readers not to automatically read the time as it changes + 'aria-live': 'off' + }); + + el.appendChild(this.contentEl_); + return el; + }; + + /** + * Update remaining time display + * + * @method updateContent + */ + + RemainingTimeDisplay.prototype.updateContent = function updateContent() { + if (this.player_.duration()) { + var localizedText = this.localize('Remaining Time'); + var formattedTime = _utilsFormatTimeJs2['default'](this.player_.remainingTime()); + if (formattedTime !== this.formattedTime_) { + this.formattedTime_ = formattedTime; + this.contentEl_.innerHTML = '' + localizedText + ' -' + formattedTime; + } + } + + // Allows for smooth scrubbing, when player can't keep up. + // var time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime(); + // this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration()); + }; + + return RemainingTimeDisplay; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('RemainingTimeDisplay', RemainingTimeDisplay); +exports['default'] = RemainingTimeDisplay; +module.exports = exports['default']; + +},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],95:[function(_dereq_,module,exports){ +/** + * @file time-divider.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * The separator between the current time and duration. + * Can be hidden if it's not needed in the design. + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class TimeDivider + */ + +var TimeDivider = (function (_Component) { + _inherits(TimeDivider, _Component); + + function TimeDivider() { + _classCallCheck(this, TimeDivider); + + _Component.apply(this, arguments); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + TimeDivider.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-time-control vjs-time-divider', + innerHTML: '
/
' + }); + }; + + return TimeDivider; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('TimeDivider', TimeDivider); +exports['default'] = TimeDivider; +module.exports = exports['default']; + +},{"../../component.js":67}],96:[function(_dereq_,module,exports){ +/** + * @file volume-bar.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _sliderSliderJs = _dereq_('../../slider/slider.js'); + +var _sliderSliderJs2 = _interopRequireDefault(_sliderSliderJs); + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsFnJs = _dereq_('../../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +// Required children + +var _volumeLevelJs = _dereq_('./volume-level.js'); + +var _volumeLevelJs2 = _interopRequireDefault(_volumeLevelJs); + +/** + * The bar that contains the volume level and can be clicked on to adjust the level + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Slider + * @class VolumeBar + */ + +var VolumeBar = (function (_Slider) { + _inherits(VolumeBar, _Slider); + + function VolumeBar(player, options) { + _classCallCheck(this, VolumeBar); + + _Slider.call(this, player, options); + this.on(player, 'volumechange', this.updateARIAAttributes); + player.ready(Fn.bind(this, this.updateARIAAttributes)); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + VolumeBar.prototype.createEl = function createEl() { + return _Slider.prototype.createEl.call(this, 'div', { + className: 'vjs-volume-bar vjs-slider-bar' + }, { + 'aria-label': 'volume level' + }); + }; + + /** + * Handle mouse move on volume bar + * + * @method handleMouseMove + */ + + VolumeBar.prototype.handleMouseMove = function handleMouseMove(event) { + this.checkMuted(); + this.player_.volume(this.calculateDistance(event)); + }; + + VolumeBar.prototype.checkMuted = function checkMuted() { + if (this.player_.muted()) { + this.player_.muted(false); + } + }; + + /** + * Get percent of volume level + * + * @retun {Number} Volume level percent + * @method getPercent + */ + + VolumeBar.prototype.getPercent = function getPercent() { + if (this.player_.muted()) { + return 0; + } else { + return this.player_.volume(); + } + }; + + /** + * Increase volume level for keyboard users + * + * @method stepForward + */ + + VolumeBar.prototype.stepForward = function stepForward() { + this.checkMuted(); + this.player_.volume(this.player_.volume() + 0.1); + }; + + /** + * Decrease volume level for keyboard users + * + * @method stepBack + */ + + VolumeBar.prototype.stepBack = function stepBack() { + this.checkMuted(); + this.player_.volume(this.player_.volume() - 0.1); + }; + + /** + * Update ARIA accessibility attributes + * + * @method updateARIAAttributes + */ + + VolumeBar.prototype.updateARIAAttributes = function updateARIAAttributes() { + // Current value of volume bar as a percentage + var volume = (this.player_.volume() * 100).toFixed(2); + this.el_.setAttribute('aria-valuenow', volume); + this.el_.setAttribute('aria-valuetext', volume + '%'); + }; + + return VolumeBar; +})(_sliderSliderJs2['default']); + +VolumeBar.prototype.options_ = { + children: ['volumeLevel'], + 'barName': 'volumeLevel' +}; + +VolumeBar.prototype.playerEvent = 'volumechange'; + +_componentJs2['default'].registerComponent('VolumeBar', VolumeBar); +exports['default'] = VolumeBar; +module.exports = exports['default']; + +},{"../../component.js":67,"../../slider/slider.js":116,"../../utils/fn.js":136,"./volume-level.js":98}],97:[function(_dereq_,module,exports){ +/** + * @file volume-control.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +// Required children + +var _volumeBarJs = _dereq_('./volume-bar.js'); + +var _volumeBarJs2 = _interopRequireDefault(_volumeBarJs); + +/** + * The component for controlling the volume level + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class VolumeControl + */ + +var VolumeControl = (function (_Component) { + _inherits(VolumeControl, _Component); + + function VolumeControl(player, options) { + _classCallCheck(this, VolumeControl); + + _Component.call(this, player, options); + + // hide volume controls when they're not supported by the current tech + if (player.tech_ && player.tech_['featuresVolumeControl'] === false) { + this.addClass('vjs-hidden'); + } + this.on(player, 'loadstart', function () { + if (player.tech_['featuresVolumeControl'] === false) { + this.addClass('vjs-hidden'); + } else { + this.removeClass('vjs-hidden'); + } + }); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + VolumeControl.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-volume-control vjs-control' + }); + }; + + return VolumeControl; +})(_componentJs2['default']); + +VolumeControl.prototype.options_ = { + children: ['volumeBar'] +}; + +_componentJs2['default'].registerComponent('VolumeControl', VolumeControl); +exports['default'] = VolumeControl; +module.exports = exports['default']; + +},{"../../component.js":67,"./volume-bar.js":96}],98:[function(_dereq_,module,exports){ +/** + * @file volume-level.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +/** + * Shows volume level + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class VolumeLevel + */ + +var VolumeLevel = (function (_Component) { + _inherits(VolumeLevel, _Component); + + function VolumeLevel() { + _classCallCheck(this, VolumeLevel); + + _Component.apply(this, arguments); + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + VolumeLevel.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-volume-level', + innerHTML: '' + }); + }; + + return VolumeLevel; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('VolumeLevel', VolumeLevel); +exports['default'] = VolumeLevel; +module.exports = exports['default']; + +},{"../../component.js":67}],99:[function(_dereq_,module,exports){ +/** + * @file volume-menu-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _popupPopupJs = _dereq_('../popup/popup.js'); + +var _popupPopupJs2 = _interopRequireDefault(_popupPopupJs); + +var _popupPopupButtonJs = _dereq_('../popup/popup-button.js'); + +var _popupPopupButtonJs2 = _interopRequireDefault(_popupPopupButtonJs); + +var _muteToggleJs = _dereq_('./mute-toggle.js'); + +var _muteToggleJs2 = _interopRequireDefault(_muteToggleJs); + +var _volumeControlVolumeBarJs = _dereq_('./volume-control/volume-bar.js'); + +var _volumeControlVolumeBarJs2 = _interopRequireDefault(_volumeControlVolumeBarJs); + +/** + * Button for volume popup + * + * @param {Player|Object} player + * @param {Object=} options + * @extends PopupButton + * @class VolumeMenuButton + */ + +var VolumeMenuButton = (function (_PopupButton) { + _inherits(VolumeMenuButton, _PopupButton); + + function VolumeMenuButton(player) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + _classCallCheck(this, VolumeMenuButton); + + // Default to inline + if (options.inline === undefined) { + options.inline = true; + } + + // If the vertical option isn't passed at all, default to true. + if (options.vertical === undefined) { + // If an inline volumeMenuButton is used, we should default to using + // a horizontal slider for obvious reasons. + if (options.inline) { + options.vertical = false; + } else { + options.vertical = true; + } + } + + // The vertical option needs to be set on the volumeBar as well, + // since that will need to be passed along to the VolumeBar constructor + options.volumeBar = options.volumeBar || {}; + options.volumeBar.vertical = !!options.vertical; + + _PopupButton.call(this, player, options); + + // Same listeners as MuteToggle + this.on(player, 'volumechange', this.volumeUpdate); + this.on(player, 'loadstart', this.volumeUpdate); + + // hide mute toggle if the current tech doesn't support volume control + function updateVisibility() { + if (player.tech_ && player.tech_['featuresVolumeControl'] === false) { + this.addClass('vjs-hidden'); + } else { + this.removeClass('vjs-hidden'); + } + } + + updateVisibility.call(this); + this.on(player, 'loadstart', updateVisibility); + + this.on(this.volumeBar, ['slideractive', 'focus'], function () { + this.addClass('vjs-slider-active'); + }); + + this.on(this.volumeBar, ['sliderinactive', 'blur'], function () { + this.removeClass('vjs-slider-active'); + }); + + this.on(this.volumeBar, ['focus'], function () { + this.addClass('vjs-lock-showing'); + }); + + this.on(this.volumeBar, ['blur'], function () { + this.removeClass('vjs-lock-showing'); + }); + } + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + VolumeMenuButton.prototype.buildCSSClass = function buildCSSClass() { + var orientationClass = ''; + if (!!this.options_.vertical) { + orientationClass = 'vjs-volume-menu-button-vertical'; + } else { + orientationClass = 'vjs-volume-menu-button-horizontal'; + } + + return 'vjs-volume-menu-button ' + _PopupButton.prototype.buildCSSClass.call(this) + ' ' + orientationClass; + }; + + /** + * Allow sub components to stack CSS class names + * + * @return {Popup} The volume popup button + * @method createPopup + */ + + VolumeMenuButton.prototype.createPopup = function createPopup() { + var popup = new _popupPopupJs2['default'](this.player_, { + contentElType: 'div' + }); + + var vb = new _volumeControlVolumeBarJs2['default'](this.player_, this.options_.volumeBar); + + popup.addChild(vb); + + this.menuContent = popup; + this.volumeBar = vb; + + this.attachVolumeBarEvents(); + + return popup; + }; + + /** + * Handle click on volume popup and calls super + * + * @method handleClick + */ + + VolumeMenuButton.prototype.handleClick = function handleClick() { + _muteToggleJs2['default'].prototype.handleClick.call(this); + _PopupButton.prototype.handleClick.call(this); + }; + + VolumeMenuButton.prototype.attachVolumeBarEvents = function attachVolumeBarEvents() { + this.menuContent.on(['mousedown', 'touchdown'], Fn.bind(this, this.handleMouseDown)); + }; + + VolumeMenuButton.prototype.handleMouseDown = function handleMouseDown(event) { + this.on(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove)); + this.on(this.el_.ownerDocument, ['mouseup', 'touchend'], this.handleMouseUp); + }; + + VolumeMenuButton.prototype.handleMouseUp = function handleMouseUp(event) { + this.off(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove)); + }; + + return VolumeMenuButton; +})(_popupPopupButtonJs2['default']); + +VolumeMenuButton.prototype.volumeUpdate = _muteToggleJs2['default'].prototype.update; +VolumeMenuButton.prototype.controlText_ = 'Mute'; + +_componentJs2['default'].registerComponent('VolumeMenuButton', VolumeMenuButton); +exports['default'] = VolumeMenuButton; +module.exports = exports['default']; + +},{"../component.js":67,"../popup/popup-button.js":112,"../popup/popup.js":113,"../utils/fn.js":136,"./mute-toggle.js":71,"./volume-control/volume-bar.js":96}],100:[function(_dereq_,module,exports){ +/** + * @file error-display.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _component = _dereq_('./component'); + +var _component2 = _interopRequireDefault(_component); + +var _modalDialog = _dereq_('./modal-dialog'); + +var _modalDialog2 = _interopRequireDefault(_modalDialog); + +var _utilsDom = _dereq_('./utils/dom'); + +var Dom = _interopRequireWildcard(_utilsDom); + +var _utilsMergeOptions = _dereq_('./utils/merge-options'); + +var _utilsMergeOptions2 = _interopRequireDefault(_utilsMergeOptions); + +/** + * Display that an error has occurred making the video unplayable. + * + * @extends ModalDialog + * @class ErrorDisplay + */ + +var ErrorDisplay = (function (_ModalDialog) { + _inherits(ErrorDisplay, _ModalDialog); + + /** + * Constructor for error display modal. + * + * @param {Player} player + * @param {Object} [options] + */ + + function ErrorDisplay(player, options) { + _classCallCheck(this, ErrorDisplay); + + _ModalDialog.call(this, player, options); + this.on(player, 'error', this.open); + } + + /** + * Include the old class for backward-compatibility. + * + * This can be removed in 6.0. + * + * @method buildCSSClass + * @deprecated + * @return {String} + */ + + ErrorDisplay.prototype.buildCSSClass = function buildCSSClass() { + return 'vjs-error-display ' + _ModalDialog.prototype.buildCSSClass.call(this); + }; + + /** + * Generates the modal content based on the player error. + * + * @return {String|Null} + */ + + ErrorDisplay.prototype.content = function content() { + var error = this.player().error(); + return error ? this.localize(error.message) : ''; + }; + + return ErrorDisplay; +})(_modalDialog2['default']); + +ErrorDisplay.prototype.options_ = _utilsMergeOptions2['default'](_modalDialog2['default'].prototype.options_, { + fillAlways: true, + temporary: false, + uncloseable: true +}); + +_component2['default'].registerComponent('ErrorDisplay', ErrorDisplay); +exports['default'] = ErrorDisplay; +module.exports = exports['default']; + +},{"./component":67,"./modal-dialog":109,"./utils/dom":134,"./utils/merge-options":140}],101:[function(_dereq_,module,exports){ +/** + * @file event-target.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +var _utilsEventsJs = _dereq_('./utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +var EventTarget = function EventTarget() {}; + +EventTarget.prototype.allowedEvents_ = {}; + +EventTarget.prototype.on = function (type, fn) { + // Remove the addEventListener alias before calling Events.on + // so we don't get into an infinite type loop + var ael = this.addEventListener; + this.addEventListener = Function.prototype; + Events.on(this, type, fn); + this.addEventListener = ael; +}; +EventTarget.prototype.addEventListener = EventTarget.prototype.on; + +EventTarget.prototype.off = function (type, fn) { + Events.off(this, type, fn); +}; +EventTarget.prototype.removeEventListener = EventTarget.prototype.off; + +EventTarget.prototype.one = function (type, fn) { + Events.one(this, type, fn); +}; + +EventTarget.prototype.trigger = function (event) { + var type = event.type || event; + + if (typeof event === 'string') { + event = { + type: type + }; + } + event = Events.fixEvent(event); + + if (this.allowedEvents_[type] && this['on' + type]) { + this['on' + type](event); + } + + Events.trigger(this, event); +}; +// The standard DOM EventTarget.dispatchEvent() is aliased to trigger() +EventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger; + +exports['default'] = EventTarget; +module.exports = exports['default']; + +},{"./utils/events.js":135}],102:[function(_dereq_,module,exports){ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _utilsLog = _dereq_('./utils/log'); + +var _utilsLog2 = _interopRequireDefault(_utilsLog); + +/* + * @file extend.js + * + * A combination of node inherits and babel's inherits (after transpile). + * Both work the same but node adds `super_` to the subClass + * and Bable adds the superClass as __proto__. Both seem useful. + */ +var _inherits = function _inherits(subClass, superClass) { + if (typeof superClass !== 'function' && superClass !== null) { + throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + + if (superClass) { + // node + subClass.super_ = superClass; + } +}; + +/* + * Function for subclassing using the same inheritance that + * videojs uses internally + * ```js + * var Button = videojs.getComponent('Button'); + * ``` + * ```js + * var MyButton = videojs.extend(Button, { + * constructor: function(player, options) { + * Button.call(this, player, options); + * }, + * onClick: function() { + * // doSomething + * } + * }); + * ``` + */ +var extendFn = function extendFn(superClass) { + var subClassMethods = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var subClass = function subClass() { + superClass.apply(this, arguments); + }; + var methods = {}; + + if (typeof subClassMethods === 'object') { + if (typeof subClassMethods.init === 'function') { + _utilsLog2['default'].warn('Constructor logic via init() is deprecated; please use constructor() instead.'); + subClassMethods.constructor = subClassMethods.init; + } + if (subClassMethods.constructor !== Object.prototype.constructor) { + subClass = subClassMethods.constructor; + } + methods = subClassMethods; + } else if (typeof subClassMethods === 'function') { + subClass = subClassMethods; + } + + _inherits(subClass, superClass); + + // Extend subObj's prototype with functions and other properties from props + for (var name in methods) { + if (methods.hasOwnProperty(name)) { + subClass.prototype[name] = methods[name]; + } + } + + return subClass; +}; + +exports['default'] = extendFn; +module.exports = exports['default']; + +},{"./utils/log":139}],103:[function(_dereq_,module,exports){ +/** + * @file fullscreen-api.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +/* + * Store the browser-specific methods for the fullscreen API + * @type {Object|undefined} + * @private + */ +var FullscreenApi = {}; + +// browser API methods +// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js +var apiMap = [ +// Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html +['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'], +// WebKit +['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'], +// Old WebKit (Safari 5.1) +['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'], +// Mozilla +['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'], +// Microsoft +['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']]; + +var specApi = apiMap[0]; +var browserApi = undefined; + +// determine the supported set of functions +for (var i = 0; i < apiMap.length; i++) { + // check for exitFullscreen function + if (apiMap[i][1] in _globalDocument2['default']) { + browserApi = apiMap[i]; + break; + } +} + +// map the browser API names to the spec API names +if (browserApi) { + for (var i = 0; i < browserApi.length; i++) { + FullscreenApi[specApi[i]] = browserApi[i]; + } +} + +exports['default'] = FullscreenApi; +module.exports = exports['default']; + +},{"global/document":1}],104:[function(_dereq_,module,exports){ +/** + * @file loading-spinner.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _component = _dereq_('./component'); + +var _component2 = _interopRequireDefault(_component); + +/* Loading Spinner +================================================================================ */ +/** + * Loading spinner for waiting events + * + * @extends Component + * @class LoadingSpinner + */ + +var LoadingSpinner = (function (_Component) { + _inherits(LoadingSpinner, _Component); + + function LoadingSpinner() { + _classCallCheck(this, LoadingSpinner); + + _Component.apply(this, arguments); + } + + /** + * Create the component's DOM element + * + * @method createEl + */ + + LoadingSpinner.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-loading-spinner', + dir: 'ltr' + }); + }; + + return LoadingSpinner; +})(_component2['default']); + +_component2['default'].registerComponent('LoadingSpinner', LoadingSpinner); +exports['default'] = LoadingSpinner; +module.exports = exports['default']; + +},{"./component":67}],105:[function(_dereq_,module,exports){ +/** + * @file media-error.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +/* + * Custom MediaError to mimic the HTML5 MediaError + * + * @param {Number} code The media error code + */ +var MediaError = function MediaError(code) { + if (typeof code === 'number') { + this.code = code; + } else if (typeof code === 'string') { + // default code is zero, so this is a custom error + this.message = code; + } else if (typeof code === 'object') { + // object + _objectAssign2['default'](this, code); + } + + if (!this.message) { + this.message = MediaError.defaultMessages[this.code] || ''; + } +}; + +/* + * The error code that refers two one of the defined + * MediaError types + * + * @type {Number} + */ +MediaError.prototype.code = 0; + +/* + * An optional message to be shown with the error. + * Message is not part of the HTML5 video spec + * but allows for more informative custom errors. + * + * @type {String} + */ +MediaError.prototype.message = ''; + +/* + * An optional status code that can be set by plugins + * to allow even more detail about the error. + * For example the HLS plugin might provide the specific + * HTTP status code that was returned when the error + * occurred, then allowing a custom error overlay + * to display more information. + * + * @type {Array} + */ +MediaError.prototype.status = null; + +MediaError.errorTypes = ['MEDIA_ERR_CUSTOM', // = 0 +'MEDIA_ERR_ABORTED', // = 1 +'MEDIA_ERR_NETWORK', // = 2 +'MEDIA_ERR_DECODE', // = 3 +'MEDIA_ERR_SRC_NOT_SUPPORTED', // = 4 +'MEDIA_ERR_ENCRYPTED' // = 5 +]; + +MediaError.defaultMessages = { + 1: 'You aborted the media playback', + 2: 'A network error caused the media download to fail part-way.', + 3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.', + 4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.', + 5: 'The media is encrypted and we do not have the keys to decrypt it.' +}; + +// Add types as properties on MediaError +// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4; +for (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) { + MediaError[MediaError.errorTypes[errNum]] = errNum; + // values should be accessible on both the class and instance + MediaError.prototype[MediaError.errorTypes[errNum]] = errNum; +} + +exports['default'] = MediaError; +module.exports = exports['default']; + +},{"object.assign":45}],106:[function(_dereq_,module,exports){ +/** + * @file menu-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _clickableComponentJs = _dereq_('../clickable-component.js'); + +var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _menuJs = _dereq_('./menu.js'); + +var _menuJs2 = _interopRequireDefault(_menuJs); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsToTitleCaseJs = _dereq_('../utils/to-title-case.js'); + +var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); + +/** + * A button class with a popup menu + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Button + * @class MenuButton + */ + +var MenuButton = (function (_ClickableComponent) { + _inherits(MenuButton, _ClickableComponent); + + function MenuButton(player) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + _classCallCheck(this, MenuButton); + + _ClickableComponent.call(this, player, options); + + this.update(); + + this.enabled_ = true; + + this.el_.setAttribute('aria-haspopup', 'true'); + this.el_.setAttribute('role', 'menuitem'); + this.on('keydown', this.handleSubmenuKeyPress); + } + + /** + * Update menu + * + * @method update + */ + + MenuButton.prototype.update = function update() { + var menu = this.createMenu(); + + if (this.menu) { + this.removeChild(this.menu); + } + + this.menu = menu; + this.addChild(menu); + + /** + * Track the state of the menu button + * + * @type {Boolean} + * @private + */ + this.buttonPressed_ = false; + this.el_.setAttribute('aria-expanded', 'false'); + + if (this.items && this.items.length === 0) { + this.hide(); + } else if (this.items && this.items.length > 1) { + this.show(); + } + }; + + /** + * Create menu + * + * @return {Menu} The constructed menu + * @method createMenu + */ + + MenuButton.prototype.createMenu = function createMenu() { + var menu = new _menuJs2['default'](this.player_); + + // Add a title list item to the top + if (this.options_.title) { + var title = Dom.createEl('li', { + className: 'vjs-menu-title', + innerHTML: _utilsToTitleCaseJs2['default'](this.options_.title), + tabIndex: -1 + }); + menu.children_.unshift(title); + Dom.insertElFirst(title, menu.contentEl()); + } + + this.items = this['createItems'](); + + if (this.items) { + // Add menu items to the menu + for (var i = 0; i < this.items.length; i++) { + menu.addItem(this.items[i]); + } + } + + return menu; + }; + + /** + * Create the list of menu items. Specific to each subclass. + * + * @method createItems + */ + + MenuButton.prototype.createItems = function createItems() {}; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + MenuButton.prototype.createEl = function createEl() { + return _ClickableComponent.prototype.createEl.call(this, 'div', { + className: this.buildCSSClass() + }); + }; + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + MenuButton.prototype.buildCSSClass = function buildCSSClass() { + var menuButtonClass = 'vjs-menu-button'; + + // If the inline option is passed, we want to use different styles altogether. + if (this.options_.inline === true) { + menuButtonClass += '-inline'; + } else { + menuButtonClass += '-popup'; + } + + return 'vjs-menu-button ' + menuButtonClass + ' ' + _ClickableComponent.prototype.buildCSSClass.call(this); + }; + + /** + * When you click the button it adds focus, which + * will show the menu indefinitely. + * So we'll remove focus when the mouse leaves the button. + * Focus is needed for tab navigation. + * Allow sub components to stack CSS class names + * + * @method handleClick + */ + + MenuButton.prototype.handleClick = function handleClick() { + this.one('mouseout', Fn.bind(this, function () { + this.menu.unlockShowing(); + this.el_.blur(); + })); + if (this.buttonPressed_) { + this.unpressButton(); + } else { + this.pressButton(); + } + }; + + /** + * Handle key press on menu + * + * @param {Object} event Key press event + * @method handleKeyPress + */ + + MenuButton.prototype.handleKeyPress = function handleKeyPress(event) { + + // Escape (27) key or Tab (9) key unpress the 'button' + if (event.which === 27 || event.which === 9) { + if (this.buttonPressed_) { + this.unpressButton(); + } + // Don't preventDefault for Tab key - we still want to lose focus + if (event.which !== 9) { + event.preventDefault(); + } + // Up (38) key or Down (40) key press the 'button' + } else if (event.which === 38 || event.which === 40) { + if (!this.buttonPressed_) { + this.pressButton(); + event.preventDefault(); + } + } else { + _ClickableComponent.prototype.handleKeyPress.call(this, event); + } + }; + + /** + * Handle key press on submenu + * + * @param {Object} event Key press event + * @method handleSubmenuKeyPress + */ + + MenuButton.prototype.handleSubmenuKeyPress = function handleSubmenuKeyPress(event) { + + // Escape (27) key or Tab (9) key unpress the 'button' + if (event.which === 27 || event.which === 9) { + if (this.buttonPressed_) { + this.unpressButton(); + } + // Don't preventDefault for Tab key - we still want to lose focus + if (event.which !== 9) { + event.preventDefault(); + } + } + }; + + /** + * Makes changes based on button pressed + * + * @method pressButton + */ + + MenuButton.prototype.pressButton = function pressButton() { + if (this.enabled_) { + this.buttonPressed_ = true; + this.menu.lockShowing(); + this.el_.setAttribute('aria-expanded', 'true'); + this.menu.focus(); // set the focus into the submenu + } + }; + + /** + * Makes changes based on button unpressed + * + * @method unpressButton + */ + + MenuButton.prototype.unpressButton = function unpressButton() { + if (this.enabled_) { + this.buttonPressed_ = false; + this.menu.unlockShowing(); + this.el_.setAttribute('aria-expanded', 'false'); + this.el_.focus(); // Set focus back to this menu button + } + }; + + /** + * Disable the menu button + * + * @return {Component} + * @method disable + */ + + MenuButton.prototype.disable = function disable() { + // Unpress, but don't force focus on this button + this.buttonPressed_ = false; + this.menu.unlockShowing(); + this.el_.setAttribute('aria-expanded', 'false'); + + this.enabled_ = false; + + return _ClickableComponent.prototype.disable.call(this); + }; + + /** + * Enable the menu button + * + * @return {Component} + * @method disable + */ + + MenuButton.prototype.enable = function enable() { + this.enabled_ = true; + + return _ClickableComponent.prototype.enable.call(this); + }; + + return MenuButton; +})(_clickableComponentJs2['default']); + +_componentJs2['default'].registerComponent('MenuButton', MenuButton); +exports['default'] = MenuButton; +module.exports = exports['default']; + +},{"../clickable-component.js":65,"../component.js":67,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/to-title-case.js":143,"./menu.js":108}],107:[function(_dereq_,module,exports){ +/** + * @file menu-item.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _clickableComponentJs = _dereq_('../clickable-component.js'); + +var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +/** + * The component for a menu item. `
  • ` + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Button + * @class MenuItem + */ + +var MenuItem = (function (_ClickableComponent) { + _inherits(MenuItem, _ClickableComponent); + + function MenuItem(player, options) { + _classCallCheck(this, MenuItem); + + _ClickableComponent.call(this, player, options); + + this.selectable = options['selectable']; + + this.selected(options['selected']); + + if (this.selectable) { + // TODO: May need to be either menuitemcheckbox or menuitemradio, + // and may need logical grouping of menu items. + this.el_.setAttribute('role', 'menuitemcheckbox'); + } else { + this.el_.setAttribute('role', 'menuitem'); + } + } + + /** + * Create the component's DOM element + * + * @param {String=} type Desc + * @param {Object=} props Desc + * @return {Element} + * @method createEl + */ + + MenuItem.prototype.createEl = function createEl(type, props, attrs) { + return _ClickableComponent.prototype.createEl.call(this, 'li', _objectAssign2['default']({ + className: 'vjs-menu-item', + innerHTML: this.localize(this.options_['label']), + tabIndex: -1 + }, props), attrs); + }; + + /** + * Handle a click on the menu item, and set it to selected + * + * @method handleClick + */ + + MenuItem.prototype.handleClick = function handleClick() { + this.selected(true); + }; + + /** + * Set this menu item as selected or not + * + * @param {Boolean} selected + * @method selected + */ + + MenuItem.prototype.selected = function selected(_selected) { + if (this.selectable) { + if (_selected) { + this.addClass('vjs-selected'); + this.el_.setAttribute('aria-checked', 'true'); + // aria-checked isn't fully supported by browsers/screen readers, + // so indicate selected state to screen reader in the control text. + this.controlText(', selected'); + } else { + this.removeClass('vjs-selected'); + this.el_.setAttribute('aria-checked', 'false'); + // Indicate un-selected state to screen reader + // Note that a space clears out the selected state text + this.controlText(' '); + } + } + }; + + return MenuItem; +})(_clickableComponentJs2['default']); + +_componentJs2['default'].registerComponent('MenuItem', MenuItem); +exports['default'] = MenuItem; +module.exports = exports['default']; + +},{"../clickable-component.js":65,"../component.js":67,"object.assign":45}],108:[function(_dereq_,module,exports){ +/** + * @file menu.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsEventsJs = _dereq_('../utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +/** + * The Menu component is used to build pop up menus, including subtitle and + * captions selection menus. + * + * @extends Component + * @class Menu + */ + +var Menu = (function (_Component) { + _inherits(Menu, _Component); + + function Menu(player, options) { + _classCallCheck(this, Menu); + + _Component.call(this, player, options); + + this.focusedChild_ = -1; + + this.on('keydown', this.handleKeyPress); + } + + /** + * Add a menu item to the menu + * + * @param {Object|String} component Component or component type to add + * @method addItem + */ + + Menu.prototype.addItem = function addItem(component) { + this.addChild(component); + component.on('click', Fn.bind(this, function () { + this.unlockShowing(); + //TODO: Need to set keyboard focus back to the menuButton + })); + }; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + Menu.prototype.createEl = function createEl() { + var contentElType = this.options_.contentElType || 'ul'; + this.contentEl_ = Dom.createEl(contentElType, { + className: 'vjs-menu-content' + }); + this.contentEl_.setAttribute('role', 'menu'); + var el = _Component.prototype.createEl.call(this, 'div', { + append: this.contentEl_, + className: 'vjs-menu' + }); + el.setAttribute('role', 'presentation'); + el.appendChild(this.contentEl_); + + // Prevent clicks from bubbling up. Needed for Menu Buttons, + // where a click on the parent is significant + Events.on(el, 'click', function (event) { + event.preventDefault(); + event.stopImmediatePropagation(); + }); + + return el; + }; + + /** + * Handle key press for menu + * + * @param {Object} event Event object + * @method handleKeyPress + */ + + Menu.prototype.handleKeyPress = function handleKeyPress(event) { + if (event.which === 37 || event.which === 40) { + // Left and Down Arrows + event.preventDefault(); + this.stepForward(); + } else if (event.which === 38 || event.which === 39) { + // Up and Right Arrows + event.preventDefault(); + this.stepBack(); + } + }; + + /** + * Move to next (lower) menu item for keyboard users + * + * @method stepForward + */ + + Menu.prototype.stepForward = function stepForward() { + var stepChild = 0; + + if (this.focusedChild_ !== undefined) { + stepChild = this.focusedChild_ + 1; + } + this.focus(stepChild); + }; + + /** + * Move to previous (higher) menu item for keyboard users + * + * @method stepBack + */ + + Menu.prototype.stepBack = function stepBack() { + var stepChild = 0; + + if (this.focusedChild_ !== undefined) { + stepChild = this.focusedChild_ - 1; + } + this.focus(stepChild); + }; + + /** + * Set focus on a menu item in the menu + * + * @param {Object|String} item Index of child item set focus on + * @method focus + */ + + Menu.prototype.focus = function focus() { + var item = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0]; + + var children = this.children().slice(); + var haveTitle = children.length && children[0].className && /vjs-menu-title/.test(children[0].className); + + if (haveTitle) { + children.shift(); + } + + if (children.length > 0) { + if (item < 0) { + item = 0; + } else if (item >= children.length) { + item = children.length - 1; + } + + this.focusedChild_ = item; + + children[item].el_.focus(); + } + }; + + return Menu; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('Menu', Menu); +exports['default'] = Menu; +module.exports = exports['default']; + +},{"../component.js":67,"../utils/dom.js":134,"../utils/events.js":135,"../utils/fn.js":136}],109:[function(_dereq_,module,exports){ +/** + * @file modal-dialog.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _utilsDom = _dereq_('./utils/dom'); + +var Dom = _interopRequireWildcard(_utilsDom); + +var _utilsFn = _dereq_('./utils/fn'); + +var Fn = _interopRequireWildcard(_utilsFn); + +var _utilsLog = _dereq_('./utils/log'); + +var _utilsLog2 = _interopRequireDefault(_utilsLog); + +var _component = _dereq_('./component'); + +var _component2 = _interopRequireDefault(_component); + +var _closeButton = _dereq_('./close-button'); + +var _closeButton2 = _interopRequireDefault(_closeButton); + +var MODAL_CLASS_NAME = 'vjs-modal-dialog'; +var ESC = 27; + +/** + * The `ModalDialog` displays over the video and its controls, which blocks + * interaction with the player until it is closed. + * + * Modal dialogs include a "Close" button and will close when that button + * is activated - or when ESC is pressed anywhere. + * + * @extends Component + * @class ModalDialog + */ + +var ModalDialog = (function (_Component) { + _inherits(ModalDialog, _Component); + + /** + * Constructor for modals. + * + * @param {Player} player + * @param {Object} [options] + * @param {Mixed} [options.content=undefined] + * Provide customized content for this modal. + * + * @param {String} [options.description] + * A text description for the modal, primarily for accessibility. + * + * @param {Boolean} [options.fillAlways=false] + * Normally, modals are automatically filled only the first time + * they open. This tells the modal to refresh its content + * every time it opens. + * + * @param {String} [options.label] + * A text label for the modal, primarily for accessibility. + * + * @param {Boolean} [options.temporary=true] + * If `true`, the modal can only be opened once; it will be + * disposed as soon as it's closed. + * + * @param {Boolean} [options.uncloseable=false] + * If `true`, the user will not be able to close the modal + * through the UI in the normal ways. Programmatic closing is + * still possible. + * + */ + + function ModalDialog(player, options) { + _classCallCheck(this, ModalDialog); + + _Component.call(this, player, options); + this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false; + + this.closeable(!this.options_.uncloseable); + this.content(this.options_.content); + + // Make sure the contentEl is defined AFTER any children are initialized + // because we only want the contents of the modal in the contentEl + // (not the UI elements like the close button). + this.contentEl_ = Dom.createEl('div', { + className: MODAL_CLASS_NAME + '-content' + }, { + role: 'document' + }); + + this.descEl_ = Dom.createEl('p', { + className: MODAL_CLASS_NAME + '-description vjs-offscreen', + id: this.el().getAttribute('aria-describedby') + }); + + Dom.textContent(this.descEl_, this.description()); + this.el_.appendChild(this.descEl_); + this.el_.appendChild(this.contentEl_); + } + + /* + * Modal dialog default options. + * + * @type {Object} + * @private + */ + + /** + * Create the modal's DOM element + * + * @method createEl + * @return {Element} + */ + + ModalDialog.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: this.buildCSSClass(), + tabIndex: -1 + }, { + 'aria-describedby': this.id() + '_description', + 'aria-hidden': 'true', + 'aria-label': this.label(), + role: 'dialog' + }); + }; + + /** + * Build the modal's CSS class. + * + * @method buildCSSClass + * @return {String} + */ + + ModalDialog.prototype.buildCSSClass = function buildCSSClass() { + return MODAL_CLASS_NAME + ' vjs-hidden ' + _Component.prototype.buildCSSClass.call(this); + }; + + /** + * Handles key presses on the document, looking for ESC, which closes + * the modal. + * + * @method handleKeyPress + * @param {Event} e + */ + + ModalDialog.prototype.handleKeyPress = function handleKeyPress(e) { + if (e.which === ESC && this.closeable()) { + this.close(); + } + }; + + /** + * Returns the label string for this modal. Primarily used for accessibility. + * + * @return {String} + */ + + ModalDialog.prototype.label = function label() { + return this.options_.label || this.localize('Modal Window'); + }; + + /** + * Returns the description string for this modal. Primarily used for + * accessibility. + * + * @return {String} + */ + + ModalDialog.prototype.description = function description() { + var desc = this.options_.description || this.localize('This is a modal window.'); + + // Append a universal closeability message if the modal is closeable. + if (this.closeable()) { + desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.'); + } + + return desc; + }; + + /** + * Opens the modal. + * + * @method open + * @return {ModalDialog} + */ + + ModalDialog.prototype.open = function open() { + if (!this.opened_) { + var player = this.player(); + + this.trigger('beforemodalopen'); + this.opened_ = true; + + // Fill content if the modal has never opened before and + // never been filled. + if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) { + this.fill(); + } + + // If the player was playing, pause it and take note of its previously + // playing state. + this.wasPlaying_ = !player.paused(); + + if (this.wasPlaying_) { + player.pause(); + } + + if (this.closeable()) { + this.on(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress)); + } + + player.controls(false); + this.show(); + this.el().setAttribute('aria-hidden', 'false'); + this.trigger('modalopen'); + this.hasBeenOpened_ = true; + } + return this; + }; + + /** + * Whether or not the modal is opened currently. + * + * @method opened + * @param {Boolean} [value] + * If given, it will open (`true`) or close (`false`) the modal. + * + * @return {Boolean} + */ + + ModalDialog.prototype.opened = function opened(value) { + if (typeof value === 'boolean') { + this[value ? 'open' : 'close'](); + } + return this.opened_; + }; + + /** + * Closes the modal. + * + * @method close + * @return {ModalDialog} + */ + + ModalDialog.prototype.close = function close() { + if (this.opened_) { + var player = this.player(); + + this.trigger('beforemodalclose'); + this.opened_ = false; + + if (this.wasPlaying_) { + player.play(); + } + + if (this.closeable()) { + this.off(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress)); + } + + player.controls(true); + this.hide(); + this.el().setAttribute('aria-hidden', 'true'); + this.trigger('modalclose'); + + if (this.options_.temporary) { + this.dispose(); + } + } + return this; + }; + + /** + * Whether or not the modal is closeable via the UI. + * + * @method closeable + * @param {Boolean} [value] + * If given as a Boolean, it will set the `closeable` option. + * + * @return {Boolean} + */ + + ModalDialog.prototype.closeable = function closeable(value) { + if (typeof value === 'boolean') { + var closeable = this.closeable_ = !!value; + var _close = this.getChild('closeButton'); + + // If this is being made closeable and has no close button, add one. + if (closeable && !_close) { + + // The close button should be a child of the modal - not its + // content element, so temporarily change the content element. + var temp = this.contentEl_; + this.contentEl_ = this.el_; + _close = this.addChild('closeButton'); + this.contentEl_ = temp; + this.on(_close, 'close', this.close); + } + + // If this is being made uncloseable and has a close button, remove it. + if (!closeable && _close) { + this.off(_close, 'close', this.close); + this.removeChild(_close); + _close.dispose(); + } + } + return this.closeable_; + }; + + /** + * Fill the modal's content element with the modal's "content" option. + * + * The content element will be emptied before this change takes place. + * + * @method fill + * @return {ModalDialog} + */ + + ModalDialog.prototype.fill = function fill() { + return this.fillWith(this.content()); + }; + + /** + * Fill the modal's content element with arbitrary content. + * + * The content element will be emptied before this change takes place. + * + * @method fillWith + * @param {Mixed} [content] + * The same rules apply to this as apply to the `content` option. + * + * @return {ModalDialog} + */ + + ModalDialog.prototype.fillWith = function fillWith(content) { + var contentEl = this.contentEl(); + var parentEl = contentEl.parentNode; + var nextSiblingEl = contentEl.nextSibling; + + this.trigger('beforemodalfill'); + this.hasBeenFilled_ = true; + + // Detach the content element from the DOM before performing + // manipulation to avoid modifying the live DOM multiple times. + parentEl.removeChild(contentEl); + this.empty(); + Dom.insertContent(contentEl, content); + this.trigger('modalfill'); + + // Re-inject the re-filled content element. + if (nextSiblingEl) { + parentEl.insertBefore(contentEl, nextSiblingEl); + } else { + parentEl.appendChild(contentEl); + } + + return this; + }; + + /** + * Empties the content element. + * + * This happens automatically anytime the modal is filled. + * + * @method empty + * @return {ModalDialog} + */ + + ModalDialog.prototype.empty = function empty() { + this.trigger('beforemodalempty'); + Dom.emptyEl(this.contentEl()); + this.trigger('modalempty'); + return this; + }; + + /** + * Gets or sets the modal content, which gets normalized before being + * rendered into the DOM. + * + * This does not update the DOM or fill the modal, but it is called during + * that process. + * + * @method content + * @param {Mixed} [value] + * If defined, sets the internal content value to be used on the + * next call(s) to `fill`. This value is normalized before being + * inserted. To "clear" the internal content value, pass `null`. + * + * @return {Mixed} + */ + + ModalDialog.prototype.content = function content(value) { + if (typeof value !== 'undefined') { + this.content_ = value; + } + return this.content_; + }; + + return ModalDialog; +})(_component2['default']); + +ModalDialog.prototype.options_ = { + temporary: true +}; + +_component2['default'].registerComponent('ModalDialog', ModalDialog); +exports['default'] = ModalDialog; +module.exports = exports['default']; + +},{"./close-button":66,"./component":67,"./utils/dom":134,"./utils/fn":136,"./utils/log":139}],110:[function(_dereq_,module,exports){ +/** + * @file player.js + */ +// Subclasses Component +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('./component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _utilsEventsJs = _dereq_('./utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +var _utilsDomJs = _dereq_('./utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFnJs = _dereq_('./utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsGuidJs = _dereq_('./utils/guid.js'); + +var Guid = _interopRequireWildcard(_utilsGuidJs); + +var _utilsBrowserJs = _dereq_('./utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +var _utilsLogJs = _dereq_('./utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _utilsToTitleCaseJs = _dereq_('./utils/to-title-case.js'); + +var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); + +var _utilsTimeRangesJs = _dereq_('./utils/time-ranges.js'); + +var _utilsBufferJs = _dereq_('./utils/buffer.js'); + +var _utilsStylesheetJs = _dereq_('./utils/stylesheet.js'); + +var stylesheet = _interopRequireWildcard(_utilsStylesheetJs); + +var _fullscreenApiJs = _dereq_('./fullscreen-api.js'); + +var _fullscreenApiJs2 = _interopRequireDefault(_fullscreenApiJs); + +var _mediaErrorJs = _dereq_('./media-error.js'); + +var _mediaErrorJs2 = _interopRequireDefault(_mediaErrorJs); + +var _safeJsonParseTuple = _dereq_('safe-json-parse/tuple'); + +var _safeJsonParseTuple2 = _interopRequireDefault(_safeJsonParseTuple); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +var _utilsMergeOptionsJs = _dereq_('./utils/merge-options.js'); + +var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs); + +var _tracksTextTrackListConverterJs = _dereq_('./tracks/text-track-list-converter.js'); + +var _tracksTextTrackListConverterJs2 = _interopRequireDefault(_tracksTextTrackListConverterJs); + +// Include required child components (importing also registers them) + +var _techLoaderJs = _dereq_('./tech/loader.js'); + +var _techLoaderJs2 = _interopRequireDefault(_techLoaderJs); + +var _posterImageJs = _dereq_('./poster-image.js'); + +var _posterImageJs2 = _interopRequireDefault(_posterImageJs); + +var _tracksTextTrackDisplayJs = _dereq_('./tracks/text-track-display.js'); + +var _tracksTextTrackDisplayJs2 = _interopRequireDefault(_tracksTextTrackDisplayJs); + +var _loadingSpinnerJs = _dereq_('./loading-spinner.js'); + +var _loadingSpinnerJs2 = _interopRequireDefault(_loadingSpinnerJs); + +var _bigPlayButtonJs = _dereq_('./big-play-button.js'); + +var _bigPlayButtonJs2 = _interopRequireDefault(_bigPlayButtonJs); + +var _controlBarControlBarJs = _dereq_('./control-bar/control-bar.js'); + +var _controlBarControlBarJs2 = _interopRequireDefault(_controlBarControlBarJs); + +var _errorDisplayJs = _dereq_('./error-display.js'); + +var _errorDisplayJs2 = _interopRequireDefault(_errorDisplayJs); + +var _tracksTextTrackSettingsJs = _dereq_('./tracks/text-track-settings.js'); + +var _tracksTextTrackSettingsJs2 = _interopRequireDefault(_tracksTextTrackSettingsJs); + +var _modalDialog = _dereq_('./modal-dialog'); + +var _modalDialog2 = _interopRequireDefault(_modalDialog); + +// Require html5 tech, at least for disposing the original video tag + +var _techTechJs = _dereq_('./tech/tech.js'); + +var _techTechJs2 = _interopRequireDefault(_techTechJs); + +var _techHtml5Js = _dereq_('./tech/html5.js'); + +var _techHtml5Js2 = _interopRequireDefault(_techHtml5Js); + +/** + * An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video. + * ```js + * var myPlayer = videojs('example_video_1'); + * ``` + * In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready. + * ```html + * + * ``` + * After an instance has been created it can be accessed globally using `Video('example_video_1')`. + * + * @param {Element} tag The original video tag used for configuring options + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends Component + * @class Player + */ + +var Player = (function (_Component) { + _inherits(Player, _Component); + + /** + * player's constructor function + * + * @constructs + * @method init + * @param {Element} tag The original video tag used for configuring options + * @param {Object=} options Player options + * @param {Function=} ready Ready callback function + */ + + function Player(tag, options, ready) { + var _this = this; + + _classCallCheck(this, Player); + + // Make sure tag ID exists + tag.id = tag.id || 'vjs_video_' + Guid.newGUID(); + + // Set Options + // The options argument overrides options set in the video tag + // which overrides globally set options. + // This latter part coincides with the load order + // (tag must exist before Player) + options = _objectAssign2['default'](Player.getTagSettings(tag), options); + + // Delay the initialization of children because we need to set up + // player properties first, and can't use `this` before `super()` + options.initChildren = false; + + // Same with creating the element + options.createEl = false; + + // we don't want the player to report touch activity on itself + // see enableTouchActivity in Component + options.reportTouchActivity = false; + + // Run base component initializing with new options + _Component.call(this, null, options, ready); + + // if the global option object was accidentally blown away by + // someone, bail early with an informative error + if (!this.options_ || !this.options_.techOrder || !this.options_.techOrder.length) { + throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?'); + } + + this.tag = tag; // Store the original tag used to set options + + // Store the tag attributes used to restore html5 element + this.tagAttributes = tag && Dom.getElAttributes(tag); + + // Update current language + this.language(this.options_.language); + + // Update Supported Languages + if (options.languages) { + (function () { + // Normalise player option languages to lowercase + var languagesToLower = {}; + + Object.getOwnPropertyNames(options.languages).forEach(function (name) { + languagesToLower[name.toLowerCase()] = options.languages[name]; + }); + _this.languages_ = languagesToLower; + })(); + } else { + this.languages_ = Player.prototype.options_.languages; + } + + // Cache for video property values. + this.cache_ = {}; + + // Set poster + this.poster_ = options.poster || ''; + + // Set controls + this.controls_ = !!options.controls; + + // Original tag settings stored in options + // now remove immediately so native controls don't flash. + // May be turned back on by HTML5 tech if nativeControlsForTouch is true + tag.controls = false; + + /* + * Store the internal state of scrubbing + * + * @private + * @return {Boolean} True if the user is scrubbing + */ + this.scrubbing_ = false; + + this.el_ = this.createEl(); + + // We also want to pass the original player options to each component and plugin + // as well so they don't need to reach back into the player for options later. + // We also need to do another copy of this.options_ so we don't end up with + // an infinite loop. + var playerOptionsCopy = _utilsMergeOptionsJs2['default'](this.options_); + + // Load plugins + if (options.plugins) { + (function () { + var plugins = options.plugins; + + Object.getOwnPropertyNames(plugins).forEach(function (name) { + if (typeof this[name] === 'function') { + this[name](plugins[name]); + } else { + _utilsLogJs2['default'].error('Unable to find plugin:', name); + } + }, _this); + })(); + } + + this.options_.playerOptions = playerOptionsCopy; + + this.initChildren(); + + // Set isAudio based on whether or not an audio tag was used + this.isAudio(tag.nodeName.toLowerCase() === 'audio'); + + // Update controls className. Can't do this when the controls are initially + // set because the element doesn't exist yet. + if (this.controls()) { + this.addClass('vjs-controls-enabled'); + } else { + this.addClass('vjs-controls-disabled'); + } + + // Set ARIA label and region role depending on player type + this.el_.setAttribute('role', 'region'); + if (this.isAudio()) { + this.el_.setAttribute('aria-label', 'audio player'); + } else { + this.el_.setAttribute('aria-label', 'video player'); + } + + if (this.isAudio()) { + this.addClass('vjs-audio'); + } + + if (this.flexNotSupported_()) { + this.addClass('vjs-no-flex'); + } + + // TODO: Make this smarter. Toggle user state between touching/mousing + // using events, since devices can have both touch and mouse events. + // if (browser.TOUCH_ENABLED) { + // this.addClass('vjs-touch-enabled'); + // } + + // iOS Safari has broken hover handling + if (!browser.IS_IOS) { + this.addClass('vjs-workinghover'); + } + + // Make player easily findable by ID + Player.players[this.id_] = this; + + // When the player is first initialized, trigger activity so components + // like the control bar show themselves if needed + this.userActive(true); + this.reportUserActivity(); + this.listenForUserActivity_(); + + this.on('fullscreenchange', this.handleFullscreenChange_); + this.on('stageclick', this.handleStageClick_); + } + + /* + * Global player list + * + * @type {Object} + */ + + /** + * Destroys the video player and does any necessary cleanup + * ```js + * myPlayer.dispose(); + * ``` + * This is especially helpful if you are dynamically adding and removing videos + * to/from the DOM. + * + * @method dispose + */ + + Player.prototype.dispose = function dispose() { + this.trigger('dispose'); + // prevent dispose from being called twice + this.off('dispose'); + + if (this.styleEl_ && this.styleEl_.parentNode) { + this.styleEl_.parentNode.removeChild(this.styleEl_); + } + + // Kill reference to this player + Player.players[this.id_] = null; + if (this.tag && this.tag.player) { + this.tag.player = null; + } + if (this.el_ && this.el_.player) { + this.el_.player = null; + } + + if (this.tech_) { + this.tech_.dispose(); + } + + _Component.prototype.dispose.call(this); + }; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + Player.prototype.createEl = function createEl() { + var el = this.el_ = _Component.prototype.createEl.call(this, 'div'); + var tag = this.tag; + + // Remove width/height attrs from tag so CSS can make it 100% width/height + tag.removeAttribute('width'); + tag.removeAttribute('height'); + + // Copy over all the attributes from the tag, including ID and class + // ID will now reference player box, not the video tag + var attrs = Dom.getElAttributes(tag); + + Object.getOwnPropertyNames(attrs).forEach(function (attr) { + // workaround so we don't totally break IE7 + // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7 + if (attr === 'class') { + el.className = attrs[attr]; + } else { + el.setAttribute(attr, attrs[attr]); + } + }); + + // Update tag id/class for use as HTML5 playback tech + // Might think we should do this after embedding in container so .vjs-tech class + // doesn't flash 100% width/height, but class only applies with .video-js parent + tag.playerId = tag.id; + tag.id += '_html5_api'; + tag.className = 'vjs-tech'; + + // Make player findable on elements + tag.player = el.player = this; + // Default state of video is paused + this.addClass('vjs-paused'); + + // Add a style element in the player that we'll use to set the width/height + // of the player in a way that's still overrideable by CSS, just like the + // video element + if (_globalWindow2['default'].VIDEOJS_NO_DYNAMIC_STYLE !== true) { + this.styleEl_ = stylesheet.createStyleElement('vjs-styles-dimensions'); + var defaultsStyleEl = Dom.$('.vjs-styles-defaults'); + var head = Dom.$('head'); + head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild); + } + + // Pass in the width/height/aspectRatio options which will update the style el + this.width(this.options_.width); + this.height(this.options_.height); + this.fluid(this.options_.fluid); + this.aspectRatio(this.options_.aspectRatio); + + // Hide any links within the video/audio tag, because IE doesn't hide them completely. + var links = tag.getElementsByTagName('a'); + for (var i = 0; i < links.length; i++) { + var linkEl = links.item(i); + Dom.addElClass(linkEl, 'vjs-hidden'); + linkEl.setAttribute('hidden', 'hidden'); + } + + // insertElFirst seems to cause the networkState to flicker from 3 to 2, so + // keep track of the original for later so we can know if the source originally failed + tag.initNetworkState_ = tag.networkState; + + // Wrap video tag in div (el/box) container + if (tag.parentNode) { + tag.parentNode.insertBefore(el, tag); + } + + // insert the tag as the first child of the player element + // then manually add it to the children array so that this.addChild + // will work properly for other components + Dom.insertElFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup. + this.children_.unshift(tag); + + this.el_ = el; + + return el; + }; + + /** + * Get/set player width + * + * @param {Number=} value Value for width + * @return {Number} Width when getting + * @method width + */ + + Player.prototype.width = function width(value) { + return this.dimension('width', value); + }; + + /** + * Get/set player height + * + * @param {Number=} value Value for height + * @return {Number} Height when getting + * @method height + */ + + Player.prototype.height = function height(value) { + return this.dimension('height', value); + }; + + /** + * Get/set dimension for player + * + * @param {String} dimension Either width or height + * @param {Number=} value Value for dimension + * @return {Component} + * @method dimension + */ + + Player.prototype.dimension = function dimension(_dimension, value) { + var privDimension = _dimension + '_'; + + if (value === undefined) { + return this[privDimension] || 0; + } + + if (value === '') { + // If an empty string is given, reset the dimension to be automatic + this[privDimension] = undefined; + } else { + var parsedVal = parseFloat(value); + + if (isNaN(parsedVal)) { + _utilsLogJs2['default'].error('Improper value "' + value + '" supplied for for ' + _dimension); + return this; + } + + this[privDimension] = parsedVal; + } + + this.updateStyleEl_(); + return this; + }; + + /** + * Add/remove the vjs-fluid class + * + * @param {Boolean} bool Value of true adds the class, value of false removes the class + * @method fluid + */ + + Player.prototype.fluid = function fluid(bool) { + if (bool === undefined) { + return !!this.fluid_; + } + + this.fluid_ = !!bool; + + if (bool) { + this.addClass('vjs-fluid'); + } else { + this.removeClass('vjs-fluid'); + } + }; + + /** + * Get/Set the aspect ratio + * + * @param {String=} ratio Aspect ratio for player + * @return aspectRatio + * @method aspectRatio + */ + + Player.prototype.aspectRatio = function aspectRatio(ratio) { + if (ratio === undefined) { + return this.aspectRatio_; + } + + // Check for width:height format + if (!/^\d+\:\d+$/.test(ratio)) { + throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.'); + } + this.aspectRatio_ = ratio; + + // We're assuming if you set an aspect ratio you want fluid mode, + // because in fixed mode you could calculate width and height yourself. + this.fluid(true); + + this.updateStyleEl_(); + }; + + /** + * Update styles of the player element (height, width and aspect ratio) + * + * @method updateStyleEl_ + */ + + Player.prototype.updateStyleEl_ = function updateStyleEl_() { + if (_globalWindow2['default'].VIDEOJS_NO_DYNAMIC_STYLE === true) { + var _width = typeof this.width_ === 'number' ? this.width_ : this.options_.width; + var _height = typeof this.height_ === 'number' ? this.height_ : this.options_.height; + var techEl = this.tech_ && this.tech_.el(); + + if (techEl) { + if (_width >= 0) { + techEl.width = _width; + } + if (_height >= 0) { + techEl.height = _height; + } + } + + return; + } + + var width = undefined; + var height = undefined; + var aspectRatio = undefined; + var idClass = undefined; + + // The aspect ratio is either used directly or to calculate width and height. + if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') { + // Use any aspectRatio that's been specifically set + aspectRatio = this.aspectRatio_; + } else if (this.videoWidth()) { + // Otherwise try to get the aspect ratio from the video metadata + aspectRatio = this.videoWidth() + ':' + this.videoHeight(); + } else { + // Or use a default. The video element's is 2:1, but 16:9 is more common. + aspectRatio = '16:9'; + } + + // Get the ratio as a decimal we can use to calculate dimensions + var ratioParts = aspectRatio.split(':'); + var ratioMultiplier = ratioParts[1] / ratioParts[0]; + + if (this.width_ !== undefined) { + // Use any width that's been specifically set + width = this.width_; + } else if (this.height_ !== undefined) { + // Or calulate the width from the aspect ratio if a height has been set + width = this.height_ / ratioMultiplier; + } else { + // Or use the video's metadata, or use the video el's default of 300 + width = this.videoWidth() || 300; + } + + if (this.height_ !== undefined) { + // Use any height that's been specifically set + height = this.height_; + } else { + // Otherwise calculate the height from the ratio and the width + height = width * ratioMultiplier; + } + + // Ensure the CSS class is valid by starting with an alpha character + if (/^[^a-zA-Z]/.test(this.id())) { + idClass = 'dimensions-' + this.id(); + } else { + idClass = this.id() + '-dimensions'; + } + + // Ensure the right class is still on the player for the style element + this.addClass(idClass); + + stylesheet.setTextContent(this.styleEl_, '\n .' + idClass + ' {\n width: ' + width + 'px;\n height: ' + height + 'px;\n }\n\n .' + idClass + '.vjs-fluid {\n padding-top: ' + ratioMultiplier * 100 + '%;\n }\n '); + }; + + /** + * Load the Media Playback Technology (tech) + * Load/Create an instance of playback technology including element and API methods + * And append playback element in player div. + * + * @param {String} techName Name of the playback technology + * @param {String} source Video source + * @method loadTech_ + * @private + */ + + Player.prototype.loadTech_ = function loadTech_(techName, source) { + + // Pause and remove current playback technology + if (this.tech_) { + this.unloadTech_(); + } + + // get rid of the HTML5 video tag as soon as we are using another tech + if (techName !== 'Html5' && this.tag) { + _techTechJs2['default'].getTech('Html5').disposeMediaElement(this.tag); + this.tag.player = null; + this.tag = null; + } + + this.techName_ = techName; + + // Turn off API access because we're loading a new tech that might load asynchronously + this.isReady_ = false; + + // Grab tech-specific options from player options and add source and parent element to use. + var techOptions = _objectAssign2['default']({ + 'nativeControlsForTouch': this.options_.nativeControlsForTouch, + 'source': source, + 'playerId': this.id(), + 'techId': this.id() + '_' + techName + '_api', + 'textTracks': this.textTracks_, + 'autoplay': this.options_.autoplay, + 'preload': this.options_.preload, + 'loop': this.options_.loop, + 'muted': this.options_.muted, + 'poster': this.poster(), + 'language': this.language(), + 'vtt.js': this.options_['vtt.js'] + }, this.options_[techName.toLowerCase()]); + + if (this.tag) { + techOptions.tag = this.tag; + } + + if (source) { + this.currentType_ = source.type; + if (source.src === this.cache_.src && this.cache_.currentTime > 0) { + techOptions.startTime = this.cache_.currentTime; + } + + this.cache_.src = source.src; + } + + // Initialize tech instance + var techComponent = _techTechJs2['default'].getTech(techName); + // Support old behavior of techs being registered as components. + // Remove once that deprecated behavior is removed. + if (!techComponent) { + techComponent = _componentJs2['default'].getComponent(techName); + } + this.tech_ = new techComponent(techOptions); + + // player.triggerReady is always async, so don't need this to be async + this.tech_.ready(Fn.bind(this, this.handleTechReady_), true); + + _tracksTextTrackListConverterJs2['default'].jsonToTextTracks(this.textTracksJson_ || [], this.tech_); + + // Listen to all HTML5-defined events and trigger them on the player + this.on(this.tech_, 'loadstart', this.handleTechLoadStart_); + this.on(this.tech_, 'waiting', this.handleTechWaiting_); + this.on(this.tech_, 'canplay', this.handleTechCanPlay_); + this.on(this.tech_, 'canplaythrough', this.handleTechCanPlayThrough_); + this.on(this.tech_, 'playing', this.handleTechPlaying_); + this.on(this.tech_, 'ended', this.handleTechEnded_); + this.on(this.tech_, 'seeking', this.handleTechSeeking_); + this.on(this.tech_, 'seeked', this.handleTechSeeked_); + this.on(this.tech_, 'play', this.handleTechPlay_); + this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_); + this.on(this.tech_, 'pause', this.handleTechPause_); + this.on(this.tech_, 'progress', this.handleTechProgress_); + this.on(this.tech_, 'durationchange', this.handleTechDurationChange_); + this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_); + this.on(this.tech_, 'error', this.handleTechError_); + this.on(this.tech_, 'suspend', this.handleTechSuspend_); + this.on(this.tech_, 'abort', this.handleTechAbort_); + this.on(this.tech_, 'emptied', this.handleTechEmptied_); + this.on(this.tech_, 'stalled', this.handleTechStalled_); + this.on(this.tech_, 'loadedmetadata', this.handleTechLoadedMetaData_); + this.on(this.tech_, 'loadeddata', this.handleTechLoadedData_); + this.on(this.tech_, 'timeupdate', this.handleTechTimeUpdate_); + this.on(this.tech_, 'ratechange', this.handleTechRateChange_); + this.on(this.tech_, 'volumechange', this.handleTechVolumeChange_); + this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_); + this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_); + this.on(this.tech_, 'posterchange', this.handleTechPosterChange_); + + this.usingNativeControls(this.techGet_('controls')); + + if (this.controls() && !this.usingNativeControls()) { + this.addTechControlsListeners_(); + } + + // Add the tech element in the DOM if it was not already there + // Make sure to not insert the original video element if using Html5 + if (this.tech_.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) { + Dom.insertElFirst(this.tech_.el(), this.el()); + } + + // Get rid of the original video tag reference after the first tech is loaded + if (this.tag) { + this.tag.player = null; + this.tag = null; + } + }; + + /** + * Unload playback technology + * + * @method unloadTech_ + * @private + */ + + Player.prototype.unloadTech_ = function unloadTech_() { + // Save the current text tracks so that we can reuse the same text tracks with the next tech + this.textTracks_ = this.textTracks(); + this.textTracksJson_ = _tracksTextTrackListConverterJs2['default'].textTracksToJson(this.tech_); + + this.isReady_ = false; + + this.tech_.dispose(); + + this.tech_ = false; + }; + + /** + * Return a reference to the current tech. + * It will only return a reference to the tech if given an object with the + * `IWillNotUseThisInPlugins` property on it. This is try and prevent misuse + * of techs by plugins. + * + * @param {Object} + * @return {Object} The Tech + * @method tech + */ + + Player.prototype.tech = function tech(safety) { + if (safety && safety.IWillNotUseThisInPlugins) { + return this.tech_; + } + var errorText = '\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n '; + _globalWindow2['default'].alert(errorText); + throw new Error(errorText); + }; + + /** + * Set up click and touch listeners for the playback element + * + * On desktops, a click on the video itself will toggle playback, + * on a mobile device a click on the video toggles controls. + * (toggling controls is done by toggling the user state between active and + * inactive) + * A tap can signal that a user has become active, or has become inactive + * e.g. a quick tap on an iPhone movie should reveal the controls. Another + * quick tap should hide them again (signaling the user is in an inactive + * viewing state) + * In addition to this, we still want the user to be considered inactive after + * a few seconds of inactivity. + * Note: the only part of iOS interaction we can't mimic with this setup + * is a touch and hold on the video element counting as activity in order to + * keep the controls showing, but that shouldn't be an issue. A touch and hold + * on any controls will still keep the user active + * + * @private + * @method addTechControlsListeners_ + */ + + Player.prototype.addTechControlsListeners_ = function addTechControlsListeners_() { + // Make sure to remove all the previous listeners in case we are called multiple times. + this.removeTechControlsListeners_(); + + // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do + // trigger mousedown/up. + // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object + // Any touch events are set to block the mousedown event from happening + this.on(this.tech_, 'mousedown', this.handleTechClick_); + + // If the controls were hidden we don't want that to change without a tap event + // so we'll check if the controls were already showing before reporting user + // activity + this.on(this.tech_, 'touchstart', this.handleTechTouchStart_); + this.on(this.tech_, 'touchmove', this.handleTechTouchMove_); + this.on(this.tech_, 'touchend', this.handleTechTouchEnd_); + + // The tap listener needs to come after the touchend listener because the tap + // listener cancels out any reportedUserActivity when setting userActive(false) + this.on(this.tech_, 'tap', this.handleTechTap_); + }; + + /** + * Remove the listeners used for click and tap controls. This is needed for + * toggling to controls disabled, where a tap/touch should do nothing. + * + * @method removeTechControlsListeners_ + * @private + */ + + Player.prototype.removeTechControlsListeners_ = function removeTechControlsListeners_() { + // We don't want to just use `this.off()` because there might be other needed + // listeners added by techs that extend this. + this.off(this.tech_, 'tap', this.handleTechTap_); + this.off(this.tech_, 'touchstart', this.handleTechTouchStart_); + this.off(this.tech_, 'touchmove', this.handleTechTouchMove_); + this.off(this.tech_, 'touchend', this.handleTechTouchEnd_); + this.off(this.tech_, 'mousedown', this.handleTechClick_); + }; + + /** + * Player waits for the tech to be ready + * + * @method handleTechReady_ + * @private + */ + + Player.prototype.handleTechReady_ = function handleTechReady_() { + this.triggerReady(); + + // Keep the same volume as before + if (this.cache_.volume) { + this.techCall_('setVolume', this.cache_.volume); + } + + // Look if the tech found a higher resolution poster while loading + this.handleTechPosterChange_(); + + // Update the duration if available + this.handleTechDurationChange_(); + + // Chrome and Safari both have issues with autoplay. + // In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work. + // In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays) + // This fixes both issues. Need to wait for API, so it updates displays correctly + if (this.src() && this.tag && this.options_.autoplay && this.paused()) { + delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16. + this.play(); + } + }; + + /** + * Fired when the user agent begins looking for media data + * + * @private + * @method handleTechLoadStart_ + */ + + Player.prototype.handleTechLoadStart_ = function handleTechLoadStart_() { + // TODO: Update to use `emptied` event instead. See #1277. + + this.removeClass('vjs-ended'); + + // reset the error state + this.error(null); + + // If it's already playing we want to trigger a firstplay event now. + // The firstplay event relies on both the play and loadstart events + // which can happen in any order for a new source + if (!this.paused()) { + this.trigger('loadstart'); + this.trigger('firstplay'); + } else { + // reset the hasStarted state + this.hasStarted(false); + this.trigger('loadstart'); + } + }; + + /** + * Add/remove the vjs-has-started class + * + * @param {Boolean} hasStarted The value of true adds the class the value of false remove the class + * @return {Boolean} Boolean value if has started + * @private + * @method hasStarted + */ + + Player.prototype.hasStarted = function hasStarted(_hasStarted) { + if (_hasStarted !== undefined) { + // only update if this is a new value + if (this.hasStarted_ !== _hasStarted) { + this.hasStarted_ = _hasStarted; + if (_hasStarted) { + this.addClass('vjs-has-started'); + // trigger the firstplay event if this newly has played + this.trigger('firstplay'); + } else { + this.removeClass('vjs-has-started'); + } + } + return this; + } + return !!this.hasStarted_; + }; + + /** + * Fired whenever the media begins or resumes playback + * + * @private + * @method handleTechPlay_ + */ + + Player.prototype.handleTechPlay_ = function handleTechPlay_() { + this.removeClass('vjs-ended'); + this.removeClass('vjs-paused'); + this.addClass('vjs-playing'); + + // hide the poster when the user hits play + // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play + this.hasStarted(true); + + this.trigger('play'); + }; + + /** + * Fired whenever the media begins waiting + * + * @private + * @method handleTechWaiting_ + */ + + Player.prototype.handleTechWaiting_ = function handleTechWaiting_() { + var _this2 = this; + + this.addClass('vjs-waiting'); + this.trigger('waiting'); + this.one('timeupdate', function () { + return _this2.removeClass('vjs-waiting'); + }); + }; + + /** + * A handler for events that signal that waiting has ended + * which is not consistent between browsers. See #1351 + * + * @private + * @method handleTechCanPlay_ + */ + + Player.prototype.handleTechCanPlay_ = function handleTechCanPlay_() { + this.removeClass('vjs-waiting'); + this.trigger('canplay'); + }; + + /** + * A handler for events that signal that waiting has ended + * which is not consistent between browsers. See #1351 + * + * @private + * @method handleTechCanPlayThrough_ + */ + + Player.prototype.handleTechCanPlayThrough_ = function handleTechCanPlayThrough_() { + this.removeClass('vjs-waiting'); + this.trigger('canplaythrough'); + }; + + /** + * A handler for events that signal that waiting has ended + * which is not consistent between browsers. See #1351 + * + * @private + * @method handleTechPlaying_ + */ + + Player.prototype.handleTechPlaying_ = function handleTechPlaying_() { + this.removeClass('vjs-waiting'); + this.trigger('playing'); + }; + + /** + * Fired whenever the player is jumping to a new time + * + * @private + * @method handleTechSeeking_ + */ + + Player.prototype.handleTechSeeking_ = function handleTechSeeking_() { + this.addClass('vjs-seeking'); + this.trigger('seeking'); + }; + + /** + * Fired when the player has finished jumping to a new time + * + * @private + * @method handleTechSeeked_ + */ + + Player.prototype.handleTechSeeked_ = function handleTechSeeked_() { + this.removeClass('vjs-seeking'); + this.trigger('seeked'); + }; + + /** + * Fired the first time a video is played + * Not part of the HLS spec, and we're not sure if this is the best + * implementation yet, so use sparingly. If you don't have a reason to + * prevent playback, use `myPlayer.one('play');` instead. + * + * @private + * @method handleTechFirstPlay_ + */ + + Player.prototype.handleTechFirstPlay_ = function handleTechFirstPlay_() { + //If the first starttime attribute is specified + //then we will start at the given offset in seconds + if (this.options_.starttime) { + this.currentTime(this.options_.starttime); + } + + this.addClass('vjs-has-started'); + this.trigger('firstplay'); + }; + + /** + * Fired whenever the media has been paused + * + * @private + * @method handleTechPause_ + */ + + Player.prototype.handleTechPause_ = function handleTechPause_() { + this.removeClass('vjs-playing'); + this.addClass('vjs-paused'); + this.trigger('pause'); + }; + + /** + * Fired while the user agent is downloading media data + * + * @private + * @method handleTechProgress_ + */ + + Player.prototype.handleTechProgress_ = function handleTechProgress_() { + this.trigger('progress'); + }; + + /** + * Fired when the end of the media resource is reached (currentTime == duration) + * + * @private + * @method handleTechEnded_ + */ + + Player.prototype.handleTechEnded_ = function handleTechEnded_() { + this.addClass('vjs-ended'); + if (this.options_.loop) { + this.currentTime(0); + this.play(); + } else if (!this.paused()) { + this.pause(); + } + + this.trigger('ended'); + }; + + /** + * Fired when the duration of the media resource is first known or changed + * + * @private + * @method handleTechDurationChange_ + */ + + Player.prototype.handleTechDurationChange_ = function handleTechDurationChange_() { + this.duration(this.techGet_('duration')); + }; + + /** + * Handle a click on the media element to play/pause + * + * @param {Object=} event Event object + * @private + * @method handleTechClick_ + */ + + Player.prototype.handleTechClick_ = function handleTechClick_(event) { + // We're using mousedown to detect clicks thanks to Flash, but mousedown + // will also be triggered with right-clicks, so we need to prevent that + if (event.button !== 0) return; + + // When controls are disabled a click should not toggle playback because + // the click is considered a control + if (this.controls()) { + if (this.paused()) { + this.play(); + } else { + this.pause(); + } + } + }; + + /** + * Handle a tap on the media element. It will toggle the user + * activity state, which hides and shows the controls. + * + * @private + * @method handleTechTap_ + */ + + Player.prototype.handleTechTap_ = function handleTechTap_() { + this.userActive(!this.userActive()); + }; + + /** + * Handle touch to start + * + * @private + * @method handleTechTouchStart_ + */ + + Player.prototype.handleTechTouchStart_ = function handleTechTouchStart_() { + this.userWasActive = this.userActive(); + }; + + /** + * Handle touch to move + * + * @private + * @method handleTechTouchMove_ + */ + + Player.prototype.handleTechTouchMove_ = function handleTechTouchMove_() { + if (this.userWasActive) { + this.reportUserActivity(); + } + }; + + /** + * Handle touch to end + * + * @private + * @method handleTechTouchEnd_ + */ + + Player.prototype.handleTechTouchEnd_ = function handleTechTouchEnd_(event) { + // Stop the mouse events from also happening + event.preventDefault(); + }; + + /** + * Fired when the player switches in or out of fullscreen mode + * + * @private + * @method handleFullscreenChange_ + */ + + Player.prototype.handleFullscreenChange_ = function handleFullscreenChange_() { + if (this.isFullscreen()) { + this.addClass('vjs-fullscreen'); + } else { + this.removeClass('vjs-fullscreen'); + } + }; + + /** + * native click events on the SWF aren't triggered on IE11, Win8.1RT + * use stageclick events triggered from inside the SWF instead + * + * @private + * @method handleStageClick_ + */ + + Player.prototype.handleStageClick_ = function handleStageClick_() { + this.reportUserActivity(); + }; + + /** + * Handle Tech Fullscreen Change + * + * @private + * @method handleTechFullscreenChange_ + */ + + Player.prototype.handleTechFullscreenChange_ = function handleTechFullscreenChange_(event, data) { + if (data) { + this.isFullscreen(data.isFullscreen); + } + this.trigger('fullscreenchange'); + }; + + /** + * Fires when an error occurred during the loading of an audio/video + * + * @private + * @method handleTechError_ + */ + + Player.prototype.handleTechError_ = function handleTechError_() { + var error = this.tech_.error(); + this.error(error && error.code); + }; + + /** + * Fires when the browser is intentionally not getting media data + * + * @private + * @method handleTechSuspend_ + */ + + Player.prototype.handleTechSuspend_ = function handleTechSuspend_() { + this.trigger('suspend'); + }; + + /** + * Fires when the loading of an audio/video is aborted + * + * @private + * @method handleTechAbort_ + */ + + Player.prototype.handleTechAbort_ = function handleTechAbort_() { + this.trigger('abort'); + }; + + /** + * Fires when the current playlist is empty + * + * @private + * @method handleTechEmptied_ + */ + + Player.prototype.handleTechEmptied_ = function handleTechEmptied_() { + this.trigger('emptied'); + }; + + /** + * Fires when the browser is trying to get media data, but data is not available + * + * @private + * @method handleTechStalled_ + */ + + Player.prototype.handleTechStalled_ = function handleTechStalled_() { + this.trigger('stalled'); + }; + + /** + * Fires when the browser has loaded meta data for the audio/video + * + * @private + * @method handleTechLoadedMetaData_ + */ + + Player.prototype.handleTechLoadedMetaData_ = function handleTechLoadedMetaData_() { + this.trigger('loadedmetadata'); + }; + + /** + * Fires when the browser has loaded the current frame of the audio/video + * + * @private + * @method handleTechLoadedData_ + */ + + Player.prototype.handleTechLoadedData_ = function handleTechLoadedData_() { + this.trigger('loadeddata'); + }; + + /** + * Fires when the current playback position has changed + * + * @private + * @method handleTechTimeUpdate_ + */ + + Player.prototype.handleTechTimeUpdate_ = function handleTechTimeUpdate_() { + this.trigger('timeupdate'); + }; + + /** + * Fires when the playing speed of the audio/video is changed + * + * @private + * @method handleTechRateChange_ + */ + + Player.prototype.handleTechRateChange_ = function handleTechRateChange_() { + this.trigger('ratechange'); + }; + + /** + * Fires when the volume has been changed + * + * @private + * @method handleTechVolumeChange_ + */ + + Player.prototype.handleTechVolumeChange_ = function handleTechVolumeChange_() { + this.trigger('volumechange'); + }; + + /** + * Fires when the text track has been changed + * + * @private + * @method handleTechTextTrackChange_ + */ + + Player.prototype.handleTechTextTrackChange_ = function handleTechTextTrackChange_() { + this.trigger('texttrackchange'); + }; + + /** + * Get object for cached values. + * + * @return {Object} + * @method getCache + */ + + Player.prototype.getCache = function getCache() { + return this.cache_; + }; + + /** + * Pass values to the playback tech + * + * @param {String=} method Method + * @param {Object=} arg Argument + * @private + * @method techCall_ + */ + + Player.prototype.techCall_ = function techCall_(method, arg) { + // If it's not ready yet, call method when it is + if (this.tech_ && !this.tech_.isReady_) { + this.tech_.ready(function () { + this[method](arg); + }, true); + + // Otherwise call method now + } else { + try { + this.tech_[method](arg); + } catch (e) { + _utilsLogJs2['default'](e); + throw e; + } + } + }; + + /** + * Get calls can't wait for the tech, and sometimes don't need to. + * + * @param {String} method Tech method + * @return {Method} + * @private + * @method techGet_ + */ + + Player.prototype.techGet_ = function techGet_(method) { + if (this.tech_ && this.tech_.isReady_) { + + // Flash likes to die and reload when you hide or reposition it. + // In these cases the object methods go away and we get errors. + // When that happens we'll catch the errors and inform tech that it's not ready any more. + try { + return this.tech_[method](); + } catch (e) { + // When building additional tech libs, an expected method may not be defined yet + if (this.tech_[method] === undefined) { + _utilsLogJs2['default']('Video.js: ' + method + ' method not defined for ' + this.techName_ + ' playback technology.', e); + } else { + // When a method isn't available on the object it throws a TypeError + if (e.name === 'TypeError') { + _utilsLogJs2['default']('Video.js: ' + method + ' unavailable on ' + this.techName_ + ' playback technology element.', e); + this.tech_.isReady_ = false; + } else { + _utilsLogJs2['default'](e); + } + } + throw e; + } + } + + return; + }; + + /** + * start media playback + * ```js + * myPlayer.play(); + * ``` + * + * @return {Player} self + * @method play + */ + + Player.prototype.play = function play() { + this.techCall_('play'); + return this; + }; + + /** + * Pause the video playback + * ```js + * myPlayer.pause(); + * ``` + * + * @return {Player} self + * @method pause + */ + + Player.prototype.pause = function pause() { + this.techCall_('pause'); + return this; + }; + + /** + * Check if the player is paused + * ```js + * var isPaused = myPlayer.paused(); + * var isPlaying = !myPlayer.paused(); + * ``` + * + * @return {Boolean} false if the media is currently playing, or true otherwise + * @method paused + */ + + Player.prototype.paused = function paused() { + // The initial state of paused should be true (in Safari it's actually false) + return this.techGet_('paused') === false ? false : true; + }; + + /** + * Returns whether or not the user is "scrubbing". Scrubbing is when the user + * has clicked the progress bar handle and is dragging it along the progress bar. + * + * @param {Boolean} isScrubbing True/false the user is scrubbing + * @return {Boolean} The scrubbing status when getting + * @return {Object} The player when setting + * @method scrubbing + */ + + Player.prototype.scrubbing = function scrubbing(isScrubbing) { + if (isScrubbing !== undefined) { + this.scrubbing_ = !!isScrubbing; + + if (isScrubbing) { + this.addClass('vjs-scrubbing'); + } else { + this.removeClass('vjs-scrubbing'); + } + + return this; + } + + return this.scrubbing_; + }; + + /** + * Get or set the current time (in seconds) + * ```js + * // get + * var whereYouAt = myPlayer.currentTime(); + * // set + * myPlayer.currentTime(120); // 2 minutes into the video + * ``` + * + * @param {Number|String=} seconds The time to seek to + * @return {Number} The time in seconds, when not setting + * @return {Player} self, when the current time is set + * @method currentTime + */ + + Player.prototype.currentTime = function currentTime(seconds) { + if (seconds !== undefined) { + + this.techCall_('setCurrentTime', seconds); + + return this; + } + + // cache last currentTime and return. default to 0 seconds + // + // Caching the currentTime is meant to prevent a massive amount of reads on the tech's + // currentTime when scrubbing, but may not provide much performance benefit afterall. + // Should be tested. Also something has to read the actual current time or the cache will + // never get updated. + return this.cache_.currentTime = this.techGet_('currentTime') || 0; + }; + + /** + * Get the length in time of the video in seconds + * ```js + * var lengthOfVideo = myPlayer.duration(); + * ``` + * **NOTE**: The video must have started loading before the duration can be + * known, and in the case of Flash, may not be known until the video starts + * playing. + * + * @param {Number} seconds Duration when setting + * @return {Number} The duration of the video in seconds when getting + * @method duration + */ + + Player.prototype.duration = function duration(seconds) { + if (seconds === undefined) { + return this.cache_.duration || 0; + } + + seconds = parseFloat(seconds) || 0; + + // Standardize on Inifity for signaling video is live + if (seconds < 0) { + seconds = Infinity; + } + + if (seconds !== this.cache_.duration) { + // Cache the last set value for optimized scrubbing (esp. Flash) + this.cache_.duration = seconds; + + if (seconds === Infinity) { + this.addClass('vjs-live'); + } else { + this.removeClass('vjs-live'); + } + + this.trigger('durationchange'); + } + + return this; + }; + + /** + * Calculates how much time is left. + * ```js + * var timeLeft = myPlayer.remainingTime(); + * ``` + * Not a native video element function, but useful + * + * @return {Number} The time remaining in seconds + * @method remainingTime + */ + + Player.prototype.remainingTime = function remainingTime() { + return this.duration() - this.currentTime(); + }; + + // http://dev.w3.org/html5/spec/video.html#dom-media-buffered + // Buffered returns a timerange object. + // Kind of like an array of portions of the video that have been downloaded. + + /** + * Get a TimeRange object with the times of the video that have been downloaded + * If you just want the percent of the video that's been downloaded, + * use bufferedPercent. + * ```js + * // Number of different ranges of time have been buffered. Usually 1. + * numberOfRanges = bufferedTimeRange.length, + * // Time in seconds when the first range starts. Usually 0. + * firstRangeStart = bufferedTimeRange.start(0), + * // Time in seconds when the first range ends + * firstRangeEnd = bufferedTimeRange.end(0), + * // Length in seconds of the first time range + * firstRangeLength = firstRangeEnd - firstRangeStart; + * ``` + * + * @return {Object} A mock TimeRange object (following HTML spec) + * @method buffered + */ + + Player.prototype.buffered = function buffered() { + var buffered = this.techGet_('buffered'); + + if (!buffered || !buffered.length) { + buffered = _utilsTimeRangesJs.createTimeRange(0, 0); + } + + return buffered; + }; + + /** + * Get the percent (as a decimal) of the video that's been downloaded + * ```js + * var howMuchIsDownloaded = myPlayer.bufferedPercent(); + * ``` + * 0 means none, 1 means all. + * (This method isn't in the HTML5 spec, but it's very convenient) + * + * @return {Number} A decimal between 0 and 1 representing the percent + * @method bufferedPercent + */ + + Player.prototype.bufferedPercent = function bufferedPercent() { + return _utilsBufferJs.bufferedPercent(this.buffered(), this.duration()); + }; + + /** + * Get the ending time of the last buffered time range + * This is used in the progress bar to encapsulate all time ranges. + * + * @return {Number} The end of the last buffered time range + * @method bufferedEnd + */ + + Player.prototype.bufferedEnd = function bufferedEnd() { + var buffered = this.buffered(), + duration = this.duration(), + end = buffered.end(buffered.length - 1); + + if (end > duration) { + end = duration; + } + + return end; + }; + + /** + * Get or set the current volume of the media + * ```js + * // get + * var howLoudIsIt = myPlayer.volume(); + * // set + * myPlayer.volume(0.5); // Set volume to half + * ``` + * 0 is off (muted), 1.0 is all the way up, 0.5 is half way. + * + * @param {Number} percentAsDecimal The new volume as a decimal percent + * @return {Number} The current volume when getting + * @return {Player} self when setting + * @method volume + */ + + Player.prototype.volume = function volume(percentAsDecimal) { + var vol = undefined; + + if (percentAsDecimal !== undefined) { + vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1 + this.cache_.volume = vol; + this.techCall_('setVolume', vol); + + return this; + } + + // Default to 1 when returning current volume. + vol = parseFloat(this.techGet_('volume')); + return isNaN(vol) ? 1 : vol; + }; + + /** + * Get the current muted state, or turn mute on or off + * ```js + * // get + * var isVolumeMuted = myPlayer.muted(); + * // set + * myPlayer.muted(true); // mute the volume + * ``` + * + * @param {Boolean=} muted True to mute, false to unmute + * @return {Boolean} True if mute is on, false if not when getting + * @return {Player} self when setting mute + * @method muted + */ + + Player.prototype.muted = function muted(_muted) { + if (_muted !== undefined) { + this.techCall_('setMuted', _muted); + return this; + } + return this.techGet_('muted') || false; // Default to false + }; + + // Check if current tech can support native fullscreen + // (e.g. with built in controls like iOS, so not our flash swf) + /** + * Check to see if fullscreen is supported + * + * @return {Boolean} + * @method supportsFullScreen + */ + + Player.prototype.supportsFullScreen = function supportsFullScreen() { + return this.techGet_('supportsFullScreen') || false; + }; + + /** + * Check if the player is in fullscreen mode + * ```js + * // get + * var fullscreenOrNot = myPlayer.isFullscreen(); + * // set + * myPlayer.isFullscreen(true); // tell the player it's in fullscreen + * ``` + * NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official + * property and instead document.fullscreenElement is used. But isFullscreen is + * still a valuable property for internal player workings. + * + * @param {Boolean=} isFS Update the player's fullscreen state + * @return {Boolean} true if fullscreen false if not when getting + * @return {Player} self when setting + * @method isFullscreen + */ + + Player.prototype.isFullscreen = function isFullscreen(isFS) { + if (isFS !== undefined) { + this.isFullscreen_ = !!isFS; + return this; + } + return !!this.isFullscreen_; + }; + + /** + * Increase the size of the video to full screen + * ```js + * myPlayer.requestFullscreen(); + * ``` + * In some browsers, full screen is not supported natively, so it enters + * "full window mode", where the video fills the browser window. + * In browsers and devices that support native full screen, sometimes the + * browser's default controls will be shown, and not the Video.js custom skin. + * This includes most mobile devices (iOS, Android) and older versions of + * Safari. + * + * @return {Player} self + * @method requestFullscreen + */ + + Player.prototype.requestFullscreen = function requestFullscreen() { + var fsApi = _fullscreenApiJs2['default']; + + this.isFullscreen(true); + + if (fsApi.requestFullscreen) { + // the browser supports going fullscreen at the element level so we can + // take the controls fullscreen as well as the video + + // Trigger fullscreenchange event after change + // We have to specifically add this each time, and remove + // when canceling fullscreen. Otherwise if there's multiple + // players on a page, they would all be reacting to the same fullscreen + // events + Events.on(_globalDocument2['default'], fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e) { + this.isFullscreen(_globalDocument2['default'][fsApi.fullscreenElement]); + + // If cancelling fullscreen, remove event listener. + if (this.isFullscreen() === false) { + Events.off(_globalDocument2['default'], fsApi.fullscreenchange, documentFullscreenChange); + } + + this.trigger('fullscreenchange'); + })); + + this.el_[fsApi.requestFullscreen](); + } else if (this.tech_.supportsFullScreen()) { + // we can't take the video.js controls fullscreen but we can go fullscreen + // with native controls + this.techCall_('enterFullScreen'); + } else { + // fullscreen isn't supported so we'll just stretch the video element to + // fill the viewport + this.enterFullWindow(); + this.trigger('fullscreenchange'); + } + + return this; + }; + + /** + * Return the video to its normal size after having been in full screen mode + * ```js + * myPlayer.exitFullscreen(); + * ``` + * + * @return {Player} self + * @method exitFullscreen + */ + + Player.prototype.exitFullscreen = function exitFullscreen() { + var fsApi = _fullscreenApiJs2['default']; + this.isFullscreen(false); + + // Check for browser element fullscreen support + if (fsApi.requestFullscreen) { + _globalDocument2['default'][fsApi.exitFullscreen](); + } else if (this.tech_.supportsFullScreen()) { + this.techCall_('exitFullScreen'); + } else { + this.exitFullWindow(); + this.trigger('fullscreenchange'); + } + + return this; + }; + + /** + * When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us. + * + * @method enterFullWindow + */ + + Player.prototype.enterFullWindow = function enterFullWindow() { + this.isFullWindow = true; + + // Storing original doc overflow value to return to when fullscreen is off + this.docOrigOverflow = _globalDocument2['default'].documentElement.style.overflow; + + // Add listener for esc key to exit fullscreen + Events.on(_globalDocument2['default'], 'keydown', Fn.bind(this, this.fullWindowOnEscKey)); + + // Hide any scroll bars + _globalDocument2['default'].documentElement.style.overflow = 'hidden'; + + // Apply fullscreen styles + Dom.addElClass(_globalDocument2['default'].body, 'vjs-full-window'); + + this.trigger('enterFullWindow'); + }; + + /** + * Check for call to either exit full window or full screen on ESC key + * + * @param {String} event Event to check for key press + * @method fullWindowOnEscKey + */ + + Player.prototype.fullWindowOnEscKey = function fullWindowOnEscKey(event) { + if (event.keyCode === 27) { + if (this.isFullscreen() === true) { + this.exitFullscreen(); + } else { + this.exitFullWindow(); + } + } + }; + + /** + * Exit full window + * + * @method exitFullWindow + */ + + Player.prototype.exitFullWindow = function exitFullWindow() { + this.isFullWindow = false; + Events.off(_globalDocument2['default'], 'keydown', this.fullWindowOnEscKey); + + // Unhide scroll bars. + _globalDocument2['default'].documentElement.style.overflow = this.docOrigOverflow; + + // Remove fullscreen styles + Dom.removeElClass(_globalDocument2['default'].body, 'vjs-full-window'); + + // Resize the box, controller, and poster to original sizes + // this.positionAll(); + this.trigger('exitFullWindow'); + }; + + /** + * Check whether the player can play a given mimetype + * + * @param {String} type The mimetype to check + * @return {String} 'probably', 'maybe', or '' (empty string) + * @method canPlayType + */ + + Player.prototype.canPlayType = function canPlayType(type) { + var can = undefined; + + // Loop through each playback technology in the options order + for (var i = 0, j = this.options_.techOrder; i < j.length; i++) { + var techName = _utilsToTitleCaseJs2['default'](j[i]); + var tech = _techTechJs2['default'].getTech(techName); + + // Support old behavior of techs being registered as components. + // Remove once that deprecated behavior is removed. + if (!tech) { + tech = _componentJs2['default'].getComponent(techName); + } + + // Check if the current tech is defined before continuing + if (!tech) { + _utilsLogJs2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.'); + continue; + } + + // Check if the browser supports this technology + if (tech.isSupported()) { + can = tech.canPlayType(type); + + if (can) { + return can; + } + } + } + + return ''; + }; + + /** + * Select source based on tech-order or source-order + * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise, + * defaults to tech-order selection + * + * @param {Array} sources The sources for a media asset + * @return {Object|Boolean} Object of source and tech order, otherwise false + * @method selectSource + */ + + Player.prototype.selectSource = function selectSource(sources) { + // Get only the techs specified in `techOrder` that exist and are supported by the + // current platform + var techs = this.options_.techOrder.map(_utilsToTitleCaseJs2['default']).map(function (techName) { + // `Component.getComponent(...)` is for support of old behavior of techs + // being registered as components. + // Remove once that deprecated behavior is removed. + return [techName, _techTechJs2['default'].getTech(techName) || _componentJs2['default'].getComponent(techName)]; + }).filter(function (_ref) { + var techName = _ref[0]; + var tech = _ref[1]; + + // Check if the current tech is defined before continuing + if (tech) { + // Check if the browser supports this technology + return tech.isSupported(); + } + + _utilsLogJs2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.'); + return false; + }); + + // Iterate over each `innerArray` element once per `outerArray` element and execute + // `tester` with both. If `tester` returns a non-falsy value, exit early and return + // that value. + var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) { + var found = undefined; + + outerArray.some(function (outerChoice) { + return innerArray.some(function (innerChoice) { + found = tester(outerChoice, innerChoice); + + if (found) { + return true; + } + }); + }); + + return found; + }; + + var foundSourceAndTech = undefined; + var flip = function flip(fn) { + return function (a, b) { + return fn(b, a); + }; + }; + var finder = function finder(_ref2, source) { + var techName = _ref2[0]; + var tech = _ref2[1]; + + if (tech.canPlaySource(source)) { + return { source: source, tech: techName }; + } + }; + + // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources + // to select from them based on their priority. + if (this.options_.sourceOrder) { + // Source-first ordering + foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder)); + } else { + // Tech-first ordering + foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder); + } + + return foundSourceAndTech || false; + }; + + /** + * The source function updates the video source + * There are three types of variables you can pass as the argument. + * **URL String**: A URL to the the video file. Use this method if you are sure + * the current playback technology (HTML5/Flash) can support the source you + * provide. Currently only MP4 files can be used in both HTML5 and Flash. + * ```js + * myPlayer.src("http://www.example.com/path/to/video.mp4"); + * ``` + * **Source Object (or element):* * A javascript object containing information + * about the source file. Use this method if you want the player to determine if + * it can support the file using the type information. + * ```js + * myPlayer.src({ type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" }); + * ``` + * **Array of Source Objects:* * To provide multiple versions of the source so + * that it can be played using HTML5 across browsers you can use an array of + * source objects. Video.js will detect which version is supported and load that + * file. + * ```js + * myPlayer.src([ + * { type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" }, + * { type: "video/webm", src: "http://www.example.com/path/to/video.webm" }, + * { type: "video/ogg", src: "http://www.example.com/path/to/video.ogv" } + * ]); + * ``` + * + * @param {String|Object|Array=} source The source URL, object, or array of sources + * @return {String} The current video source when getting + * @return {String} The player when setting + * @method src + */ + + Player.prototype.src = function src(source) { + if (source === undefined) { + return this.techGet_('src'); + } + + var currentTech = _techTechJs2['default'].getTech(this.techName_); + // Support old behavior of techs being registered as components. + // Remove once that deprecated behavior is removed. + if (!currentTech) { + currentTech = _componentJs2['default'].getComponent(this.techName_); + } + + // case: Array of source objects to choose from and pick the best to play + if (Array.isArray(source)) { + this.sourceList_(source); + + // case: URL String (http://myvideo...) + } else if (typeof source === 'string') { + // create a source object from the string + this.src({ src: source }); + + // case: Source object { src: '', type: '' ... } + } else if (source instanceof Object) { + // check if the source has a type and the loaded tech cannot play the source + // if there's no type we'll just try the current tech + if (source.type && !currentTech.canPlaySource(source)) { + // create a source list with the current source and send through + // the tech loop to check for a compatible technology + this.sourceList_([source]); + } else { + this.cache_.src = source.src; + this.currentType_ = source.type || ''; + + // wait until the tech is ready to set the source + this.ready(function () { + + // The setSource tech method was added with source handlers + // so older techs won't support it + // We need to check the direct prototype for the case where subclasses + // of the tech do not support source handlers + if (currentTech.prototype.hasOwnProperty('setSource')) { + this.techCall_('setSource', source); + } else { + this.techCall_('src', source.src); + } + + if (this.options_.preload === 'auto') { + this.load(); + } + + if (this.options_.autoplay) { + this.play(); + } + + // Set the source synchronously if possible (#2326) + }, true); + } + } + + return this; + }; + + /** + * Handle an array of source objects + * + * @param {Array} sources Array of source objects + * @private + * @method sourceList_ + */ + + Player.prototype.sourceList_ = function sourceList_(sources) { + var sourceTech = this.selectSource(sources); + + if (sourceTech) { + if (sourceTech.tech === this.techName_) { + // if this technology is already loaded, set the source + this.src(sourceTech.source); + } else { + // load this technology with the chosen source + this.loadTech_(sourceTech.tech, sourceTech.source); + } + } else { + // We need to wrap this in a timeout to give folks a chance to add error event handlers + this.setTimeout(function () { + this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) }); + }, 0); + + // we could not find an appropriate tech, but let's still notify the delegate that this is it + // this needs a better comment about why this is needed + this.triggerReady(); + } + }; + + /** + * Begin loading the src data. + * + * @return {Player} Returns the player + * @method load + */ + + Player.prototype.load = function load() { + this.techCall_('load'); + return this; + }; + + /** + * Reset the player. Loads the first tech in the techOrder, + * and calls `reset` on the tech`. + * + * @return {Player} Returns the player + * @method reset + */ + + Player.prototype.reset = function reset() { + this.loadTech_(_utilsToTitleCaseJs2['default'](this.options_.techOrder[0]), null); + this.techCall_('reset'); + return this; + }; + + /** + * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4 + * Can be used in conjuction with `currentType` to assist in rebuilding the current source object. + * + * @return {String} The current source + * @method currentSrc + */ + + Player.prototype.currentSrc = function currentSrc() { + return this.techGet_('currentSrc') || this.cache_.src || ''; + }; + + /** + * Get the current source type e.g. video/mp4 + * This can allow you rebuild the current source object so that you could load the same + * source and tech later + * + * @return {String} The source MIME type + * @method currentType + */ + + Player.prototype.currentType = function currentType() { + return this.currentType_ || ''; + }; + + /** + * Get or set the preload attribute + * + * @param {Boolean} value Boolean to determine if preload should be used + * @return {String} The preload attribute value when getting + * @return {Player} Returns the player when setting + * @method preload + */ + + Player.prototype.preload = function preload(value) { + if (value !== undefined) { + this.techCall_('setPreload', value); + this.options_.preload = value; + return this; + } + return this.techGet_('preload'); + }; + + /** + * Get or set the autoplay attribute. + * + * @param {Boolean} value Boolean to determine if video should autoplay + * @return {String} The autoplay attribute value when getting + * @return {Player} Returns the player when setting + * @method autoplay + */ + + Player.prototype.autoplay = function autoplay(value) { + if (value !== undefined) { + this.techCall_('setAutoplay', value); + this.options_.autoplay = value; + return this; + } + return this.techGet_('autoplay', value); + }; + + /** + * Get or set the loop attribute on the video element. + * + * @param {Boolean} value Boolean to determine if video should loop + * @return {String} The loop attribute value when getting + * @return {Player} Returns the player when setting + * @method loop + */ + + Player.prototype.loop = function loop(value) { + if (value !== undefined) { + this.techCall_('setLoop', value); + this.options_['loop'] = value; + return this; + } + return this.techGet_('loop'); + }; + + /** + * Get or set the poster image source url + * + * ##### EXAMPLE: + * ```js + * // get + * var currentPoster = myPlayer.poster(); + * // set + * myPlayer.poster('http://example.com/myImage.jpg'); + * ``` + * + * @param {String=} src Poster image source URL + * @return {String} poster URL when getting + * @return {Player} self when setting + * @method poster + */ + + Player.prototype.poster = function poster(src) { + if (src === undefined) { + return this.poster_; + } + + // The correct way to remove a poster is to set as an empty string + // other falsey values will throw errors + if (!src) { + src = ''; + } + + // update the internal poster variable + this.poster_ = src; + + // update the tech's poster + this.techCall_('setPoster', src); + + // alert components that the poster has been set + this.trigger('posterchange'); + + return this; + }; + + /** + * Some techs (e.g. YouTube) can provide a poster source in an + * asynchronous way. We want the poster component to use this + * poster source so that it covers up the tech's controls. + * (YouTube's play button). However we only want to use this + * soruce if the player user hasn't set a poster through + * the normal APIs. + * + * @private + * @method handleTechPosterChange_ + */ + + Player.prototype.handleTechPosterChange_ = function handleTechPosterChange_() { + if (!this.poster_ && this.tech_ && this.tech_.poster) { + this.poster_ = this.tech_.poster() || ''; + + // Let components know the poster has changed + this.trigger('posterchange'); + } + }; + + /** + * Get or set whether or not the controls are showing. + * + * @param {Boolean} bool Set controls to showing or not + * @return {Boolean} Controls are showing + * @method controls + */ + + Player.prototype.controls = function controls(bool) { + if (bool !== undefined) { + bool = !!bool; // force boolean + // Don't trigger a change event unless it actually changed + if (this.controls_ !== bool) { + this.controls_ = bool; + + if (this.usingNativeControls()) { + this.techCall_('setControls', bool); + } + + if (bool) { + this.removeClass('vjs-controls-disabled'); + this.addClass('vjs-controls-enabled'); + this.trigger('controlsenabled'); + + if (!this.usingNativeControls()) { + this.addTechControlsListeners_(); + } + } else { + this.removeClass('vjs-controls-enabled'); + this.addClass('vjs-controls-disabled'); + this.trigger('controlsdisabled'); + + if (!this.usingNativeControls()) { + this.removeTechControlsListeners_(); + } + } + } + return this; + } + return !!this.controls_; + }; + + /** + * Toggle native controls on/off. Native controls are the controls built into + * devices (e.g. default iPhone controls), Flash, or other techs + * (e.g. Vimeo Controls) + * **This should only be set by the current tech, because only the tech knows + * if it can support native controls** + * + * @param {Boolean} bool True signals that native controls are on + * @return {Player} Returns the player + * @private + * @method usingNativeControls + */ + + Player.prototype.usingNativeControls = function usingNativeControls(bool) { + if (bool !== undefined) { + bool = !!bool; // force boolean + // Don't trigger a change event unless it actually changed + if (this.usingNativeControls_ !== bool) { + this.usingNativeControls_ = bool; + if (bool) { + this.addClass('vjs-using-native-controls'); + + /** + * player is using the native device controls + * + * @event usingnativecontrols + * @memberof Player + * @instance + * @private + */ + this.trigger('usingnativecontrols'); + } else { + this.removeClass('vjs-using-native-controls'); + + /** + * player is using the custom HTML controls + * + * @event usingcustomcontrols + * @memberof Player + * @instance + * @private + */ + this.trigger('usingcustomcontrols'); + } + } + return this; + } + return !!this.usingNativeControls_; + }; + + /** + * Set or get the current MediaError + * + * @param {*} err A MediaError or a String/Number to be turned into a MediaError + * @return {MediaError|null} when getting + * @return {Player} when setting + * @method error + */ + + Player.prototype.error = function error(err) { + if (err === undefined) { + return this.error_ || null; + } + + // restoring to default + if (err === null) { + this.error_ = err; + this.removeClass('vjs-error'); + this.errorDisplay.close(); + return this; + } + + // error instance + if (err instanceof _mediaErrorJs2['default']) { + this.error_ = err; + } else { + this.error_ = new _mediaErrorJs2['default'](err); + } + + // add the vjs-error classname to the player + this.addClass('vjs-error'); + + // log the name of the error type and any message + // ie8 just logs "[object object]" if you just log the error object + _utilsLogJs2['default'].error('(CODE:' + this.error_.code + ' ' + _mediaErrorJs2['default'].errorTypes[this.error_.code] + ')', this.error_.message, this.error_); + + // fire an error event on the player + this.trigger('error'); + + return this; + }; + + /** + * Returns whether or not the player is in the "ended" state. + * + * @return {Boolean} True if the player is in the ended state, false if not. + * @method ended + */ + + Player.prototype.ended = function ended() { + return this.techGet_('ended'); + }; + + /** + * Returns whether or not the player is in the "seeking" state. + * + * @return {Boolean} True if the player is in the seeking state, false if not. + * @method seeking + */ + + Player.prototype.seeking = function seeking() { + return this.techGet_('seeking'); + }; + + /** + * Returns the TimeRanges of the media that are currently available + * for seeking to. + * + * @return {TimeRanges} the seekable intervals of the media timeline + * @method seekable + */ + + Player.prototype.seekable = function seekable() { + return this.techGet_('seekable'); + }; + + /** + * Report user activity + * + * @param {Object} event Event object + * @method reportUserActivity + */ + + Player.prototype.reportUserActivity = function reportUserActivity(event) { + this.userActivity_ = true; + }; + + /** + * Get/set if user is active + * + * @param {Boolean} bool Value when setting + * @return {Boolean} Value if user is active user when getting + * @method userActive + */ + + Player.prototype.userActive = function userActive(bool) { + if (bool !== undefined) { + bool = !!bool; + if (bool !== this.userActive_) { + this.userActive_ = bool; + if (bool) { + // If the user was inactive and is now active we want to reset the + // inactivity timer + this.userActivity_ = true; + this.removeClass('vjs-user-inactive'); + this.addClass('vjs-user-active'); + this.trigger('useractive'); + } else { + // We're switching the state to inactive manually, so erase any other + // activity + this.userActivity_ = false; + + // Chrome/Safari/IE have bugs where when you change the cursor it can + // trigger a mousemove event. This causes an issue when you're hiding + // the cursor when the user is inactive, and a mousemove signals user + // activity. Making it impossible to go into inactive mode. Specifically + // this happens in fullscreen when we really need to hide the cursor. + // + // When this gets resolved in ALL browsers it can be removed + // https://code.google.com/p/chromium/issues/detail?id=103041 + if (this.tech_) { + this.tech_.one('mousemove', function (e) { + e.stopPropagation(); + e.preventDefault(); + }); + } + + this.removeClass('vjs-user-active'); + this.addClass('vjs-user-inactive'); + this.trigger('userinactive'); + } + } + return this; + } + return this.userActive_; + }; + + /** + * Listen for user activity based on timeout value + * + * @private + * @method listenForUserActivity_ + */ + + Player.prototype.listenForUserActivity_ = function listenForUserActivity_() { + var mouseInProgress = undefined, + lastMoveX = undefined, + lastMoveY = undefined; + + var handleActivity = Fn.bind(this, this.reportUserActivity); + + var handleMouseMove = function handleMouseMove(e) { + // #1068 - Prevent mousemove spamming + // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970 + if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) { + lastMoveX = e.screenX; + lastMoveY = e.screenY; + handleActivity(); + } + }; + + var handleMouseDown = function handleMouseDown() { + handleActivity(); + // For as long as the they are touching the device or have their mouse down, + // we consider them active even if they're not moving their finger or mouse. + // So we want to continue to update that they are active + this.clearInterval(mouseInProgress); + // Setting userActivity=true now and setting the interval to the same time + // as the activityCheck interval (250) should ensure we never miss the + // next activityCheck + mouseInProgress = this.setInterval(handleActivity, 250); + }; + + var handleMouseUp = function handleMouseUp(event) { + handleActivity(); + // Stop the interval that maintains activity if the mouse/touch is down + this.clearInterval(mouseInProgress); + }; + + // Any mouse movement will be considered user activity + this.on('mousedown', handleMouseDown); + this.on('mousemove', handleMouseMove); + this.on('mouseup', handleMouseUp); + + // Listen for keyboard navigation + // Shouldn't need to use inProgress interval because of key repeat + this.on('keydown', handleActivity); + this.on('keyup', handleActivity); + + // Run an interval every 250 milliseconds instead of stuffing everything into + // the mousemove/touchmove function itself, to prevent performance degradation. + // `this.reportUserActivity` simply sets this.userActivity_ to true, which + // then gets picked up by this loop + // http://ejohn.org/blog/learning-from-twitter/ + var inactivityTimeout = undefined; + var activityCheck = this.setInterval(function () { + // Check to see if mouse/touch activity has happened + if (this.userActivity_) { + // Reset the activity tracker + this.userActivity_ = false; + + // If the user state was inactive, set the state to active + this.userActive(true); + + // Clear any existing inactivity timeout to start the timer over + this.clearTimeout(inactivityTimeout); + + var timeout = this.options_['inactivityTimeout']; + if (timeout > 0) { + // In milliseconds, if no more activity has occurred the + // user will be considered inactive + inactivityTimeout = this.setTimeout(function () { + // Protect against the case where the inactivityTimeout can trigger just + // before the next user activity is picked up by the activityCheck loop + // causing a flicker + if (!this.userActivity_) { + this.userActive(false); + } + }, timeout); + } + } + }, 250); + }; + + /** + * Gets or sets the current playback rate. A playback rate of + * 1.0 represents normal speed and 0.5 would indicate half-speed + * playback, for instance. + * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate + * + * @param {Number} rate New playback rate to set. + * @return {Number} Returns the new playback rate when setting + * @return {Number} Returns the current playback rate when getting + * @method playbackRate + */ + + Player.prototype.playbackRate = function playbackRate(rate) { + if (rate !== undefined) { + this.techCall_('setPlaybackRate', rate); + return this; + } + + if (this.tech_ && this.tech_['featuresPlaybackRate']) { + return this.techGet_('playbackRate'); + } else { + return 1.0; + } + }; + + /** + * Gets or sets the audio flag + * + * @param {Boolean} bool True signals that this is an audio player. + * @return {Boolean} Returns true if player is audio, false if not when getting + * @return {Player} Returns the player if setting + * @private + * @method isAudio + */ + + Player.prototype.isAudio = function isAudio(bool) { + if (bool !== undefined) { + this.isAudio_ = !!bool; + return this; + } + + return !!this.isAudio_; + }; + + /** + * Returns the current state of network activity for the element, from + * the codes in the list below. + * - NETWORK_EMPTY (numeric value 0) + * The element has not yet been initialised. All attributes are in + * their initial states. + * - NETWORK_IDLE (numeric value 1) + * The element's resource selection algorithm is active and has + * selected a resource, but it is not actually using the network at + * this time. + * - NETWORK_LOADING (numeric value 2) + * The user agent is actively trying to download data. + * - NETWORK_NO_SOURCE (numeric value 3) + * The element's resource selection algorithm is active, but it has + * not yet found a resource to use. + * + * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states + * @return {Number} the current network activity state + * @method networkState + */ + + Player.prototype.networkState = function networkState() { + return this.techGet_('networkState'); + }; + + /** + * Returns a value that expresses the current state of the element + * with respect to rendering the current playback position, from the + * codes in the list below. + * - HAVE_NOTHING (numeric value 0) + * No information regarding the media resource is available. + * - HAVE_METADATA (numeric value 1) + * Enough of the resource has been obtained that the duration of the + * resource is available. + * - HAVE_CURRENT_DATA (numeric value 2) + * Data for the immediate current playback position is available. + * - HAVE_FUTURE_DATA (numeric value 3) + * Data for the immediate current playback position is available, as + * well as enough data for the user agent to advance the current + * playback position in the direction of playback. + * - HAVE_ENOUGH_DATA (numeric value 4) + * The user agent estimates that enough data is available for + * playback to proceed uninterrupted. + * + * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate + * @return {Number} the current playback rendering state + * @method readyState + */ + + Player.prototype.readyState = function readyState() { + return this.techGet_('readyState'); + }; + + /** + * Text tracks are tracks of timed text events. + * Captions - text displayed over the video for the hearing impaired + * Subtitles - text displayed over the video for those who don't understand language in the video + * Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video + * Descriptions - audio descriptions that are read back to the user by a screen reading device + */ + + /** + * Get an array of associated text tracks. captions, subtitles, chapters, descriptions + * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks + * + * @return {Array} Array of track objects + * @method textTracks + */ + + Player.prototype.textTracks = function textTracks() { + // cannot use techGet_ directly because it checks to see whether the tech is ready. + // Flash is unlikely to be ready in time but textTracks should still work. + return this.tech_ && this.tech_['textTracks'](); + }; + + /** + * Get an array of remote text tracks + * + * @return {Array} + * @method remoteTextTracks + */ + + Player.prototype.remoteTextTracks = function remoteTextTracks() { + return this.tech_ && this.tech_['remoteTextTracks'](); + }; + + /** + * Get an array of remote html track elements + * + * @return {HTMLTrackElement[]} + * @method remoteTextTrackEls + */ + + Player.prototype.remoteTextTrackEls = function remoteTextTrackEls() { + return this.tech_ && this.tech_['remoteTextTrackEls'](); + }; + + /** + * Add a text track + * In addition to the W3C settings we allow adding additional info through options. + * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack + * + * @param {String} kind Captions, subtitles, chapters, descriptions, or metadata + * @param {String=} label Optional label + * @param {String=} language Optional language + * @method addTextTrack + */ + + Player.prototype.addTextTrack = function addTextTrack(kind, label, language) { + return this.tech_ && this.tech_['addTextTrack'](kind, label, language); + }; + + /** + * Add a remote text track + * + * @param {Object} options Options for remote text track + * @method addRemoteTextTrack + */ + + Player.prototype.addRemoteTextTrack = function addRemoteTextTrack(options) { + return this.tech_ && this.tech_['addRemoteTextTrack'](options); + }; + + /** + * Remove a remote text track + * + * @param {Object} track Remote text track to remove + * @method removeRemoteTextTrack + */ + + Player.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) { + this.tech_ && this.tech_['removeRemoteTextTrack'](track); + }; + + /** + * Get video width + * + * @return {Number} Video width + * @method videoWidth + */ + + Player.prototype.videoWidth = function videoWidth() { + return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0; + }; + + /** + * Get video height + * + * @return {Number} Video height + * @method videoHeight + */ + + Player.prototype.videoHeight = function videoHeight() { + return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0; + }; + + // Methods to add support for + // initialTime: function(){ return this.techCall_('initialTime'); }, + // startOffsetTime: function(){ return this.techCall_('startOffsetTime'); }, + // played: function(){ return this.techCall_('played'); }, + // videoTracks: function(){ return this.techCall_('videoTracks'); }, + // audioTracks: function(){ return this.techCall_('audioTracks'); }, + // defaultPlaybackRate: function(){ return this.techCall_('defaultPlaybackRate'); }, + // defaultMuted: function(){ return this.techCall_('defaultMuted'); } + + /** + * The player's language code + * NOTE: The language should be set in the player options if you want the + * the controls to be built with a specific language. Changing the lanugage + * later will not update controls text. + * + * @param {String} code The locale string + * @return {String} The locale string when getting + * @return {Player} self when setting + * @method language + */ + + Player.prototype.language = function language(code) { + if (code === undefined) { + return this.language_; + } + + this.language_ = ('' + code).toLowerCase(); + return this; + }; + + /** + * Get the player's language dictionary + * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time + * Languages specified directly in the player options have precedence + * + * @return {Array} Array of languages + * @method languages + */ + + Player.prototype.languages = function languages() { + return _utilsMergeOptionsJs2['default'](Player.prototype.options_.languages, this.languages_); + }; + + /** + * Converts track info to JSON + * + * @return {Object} JSON object of options + * @method toJSON + */ + + Player.prototype.toJSON = function toJSON() { + var options = _utilsMergeOptionsJs2['default'](this.options_); + var tracks = options.tracks; + + options.tracks = []; + + for (var i = 0; i < tracks.length; i++) { + var track = tracks[i]; + + // deep merge tracks and null out player so no circular references + track = _utilsMergeOptionsJs2['default'](track); + track.player = undefined; + options.tracks[i] = track; + } + + return options; + }; + + /** + * Creates a simple modal dialog (an instance of the `ModalDialog` + * component) that immediately overlays the player with arbitrary + * content and removes itself when closed. + * + * @param {String|Function|Element|Array|Null} content + * Same as `ModalDialog#content`'s param of the same name. + * + * The most straight-forward usage is to provide a string or DOM + * element. + * + * @param {Object} [options] + * Extra options which will be passed on to the `ModalDialog`. + * + * @return {ModalDialog} + */ + + Player.prototype.createModal = function createModal(content, options) { + var player = this; + + options = options || {}; + options.content = content || ''; + + var modal = new _modalDialog2['default'](player, options); + + player.addChild(modal); + modal.on('dispose', function () { + player.removeChild(modal); + }); + + return modal.open(); + }; + + /** + * Gets tag settings + * + * @param {Element} tag The player tag + * @return {Array} An array of sources and track objects + * @static + * @method getTagSettings + */ + + Player.getTagSettings = function getTagSettings(tag) { + var baseOptions = { + 'sources': [], + 'tracks': [] + }; + + var tagOptions = Dom.getElAttributes(tag); + var dataSetup = tagOptions['data-setup']; + + // Check if data-setup attr exists. + if (dataSetup !== null) { + // Parse options JSON + + var _safeParseTuple = _safeJsonParseTuple2['default'](dataSetup || '{}'); + + var err = _safeParseTuple[0]; + var data = _safeParseTuple[1]; + + if (err) { + _utilsLogJs2['default'].error(err); + } + _objectAssign2['default'](tagOptions, data); + } + + _objectAssign2['default'](baseOptions, tagOptions); + + // Get tag children settings + if (tag.hasChildNodes()) { + var children = tag.childNodes; + + for (var i = 0, j = children.length; i < j; i++) { + var child = children[i]; + // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/ + var childName = child.nodeName.toLowerCase(); + if (childName === 'source') { + baseOptions.sources.push(Dom.getElAttributes(child)); + } else if (childName === 'track') { + baseOptions.tracks.push(Dom.getElAttributes(child)); + } + } + } + + return baseOptions; + }; + + return Player; +})(_componentJs2['default']); + +Player.players = {}; + +var navigator = _globalWindow2['default'].navigator; +/* + * Player instance options, surfaced using options + * options = Player.prototype.options_ + * Make changes in options, not here. + * + * @type {Object} + * @private + */ +Player.prototype.options_ = { + // Default order of fallback technology + techOrder: ['html5', 'flash'], + // techOrder: ['flash','html5'], + + html5: {}, + flash: {}, + + // defaultVolume: 0.85, + defaultVolume: 0.00, // The freakin seaguls are driving me crazy! + + // default inactivity timeout + inactivityTimeout: 2000, + + // default playback rates + playbackRates: [], + // Add playback rate selection by adding rates + // 'playbackRates': [0.5, 1, 1.5, 2], + + // Included control sets + children: ['mediaLoader', 'posterImage', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'controlBar', 'errorDisplay', 'textTrackSettings'], + + language: _globalDocument2['default'].getElementsByTagName('html')[0].getAttribute('lang') || navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language || 'en', + + // locales and their language translations + languages: {}, + + // Default message to show when a video cannot be played. + notSupportedMessage: 'No compatible source was found for this media.' +}; + +/** + * Fired when the player has initial duration and dimension information + * + * @event loadedmetadata + */ +Player.prototype.handleLoadedMetaData_; + +/** + * Fired when the player has downloaded data at the current playback position + * + * @event loadeddata + */ +Player.prototype.handleLoadedData_; + +/** + * Fired when the user is active, e.g. moves the mouse over the player + * + * @event useractive + */ +Player.prototype.handleUserActive_; + +/** + * Fired when the user is inactive, e.g. a short delay after the last mouse move or control interaction + * + * @event userinactive + */ +Player.prototype.handleUserInactive_; + +/** + * Fired when the current playback position has changed * + * During playback this is fired every 15-250 milliseconds, depending on the + * playback technology in use. + * + * @event timeupdate + */ +Player.prototype.handleTimeUpdate_; + +/** + * Fired when video playback ends + * + * @event ended + */ +Player.prototype.handleTechEnded_; + +/** + * Fired when the volume changes + * + * @event volumechange + */ +Player.prototype.handleVolumeChange_; + +/** + * Fired when an error occurs + * + * @event error + */ +Player.prototype.handleError_; + +Player.prototype.flexNotSupported_ = function () { + var elem = _globalDocument2['default'].createElement('i'); + + // Note: We don't actually use flexBasis (or flexOrder), but it's one of the more + // common flex features that we can rely on when checking for flex support. + return !('flexBasis' in elem.style || 'webkitFlexBasis' in elem.style || 'mozFlexBasis' in elem.style || 'msFlexBasis' in elem.style || 'msFlexOrder' in elem.style) /* IE10-specific (2012 flex spec) */; +}; + +_componentJs2['default'].registerComponent('Player', Player); +exports['default'] = Player; +module.exports = exports['default']; +// If empty string, make it a parsable json object. + +},{"./big-play-button.js":63,"./component.js":67,"./control-bar/control-bar.js":68,"./error-display.js":100,"./fullscreen-api.js":103,"./loading-spinner.js":104,"./media-error.js":105,"./modal-dialog":109,"./poster-image.js":114,"./tech/html5.js":119,"./tech/loader.js":120,"./tech/tech.js":121,"./tracks/text-track-display.js":125,"./tracks/text-track-list-converter.js":127,"./tracks/text-track-settings.js":129,"./utils/browser.js":131,"./utils/buffer.js":132,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/guid.js":138,"./utils/log.js":139,"./utils/merge-options.js":140,"./utils/stylesheet.js":141,"./utils/time-ranges.js":142,"./utils/to-title-case.js":143,"global/document":1,"global/window":2,"object.assign":45,"safe-json-parse/tuple":54}],111:[function(_dereq_,module,exports){ +/** + * @file plugins.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _playerJs = _dereq_('./player.js'); + +var _playerJs2 = _interopRequireDefault(_playerJs); + +/** + * The method for registering a video.js plugin + * + * @param {String} name The name of the plugin + * @param {Function} init The function that is run when the player inits + * @method plugin + */ +var plugin = function plugin(name, init) { + _playerJs2['default'].prototype[name] = init; +}; + +exports['default'] = plugin; +module.exports = exports['default']; + +},{"./player.js":110}],112:[function(_dereq_,module,exports){ +/** + * @file popup-button.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _clickableComponentJs = _dereq_('../clickable-component.js'); + +var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _popupJs = _dereq_('./popup.js'); + +var _popupJs2 = _interopRequireDefault(_popupJs); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsToTitleCaseJs = _dereq_('../utils/to-title-case.js'); + +var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); + +/** + * A button class with a popup control + * + * @param {Player|Object} player + * @param {Object=} options + * @extends ClickableComponent + * @class PopupButton + */ + +var PopupButton = (function (_ClickableComponent) { + _inherits(PopupButton, _ClickableComponent); + + function PopupButton(player) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + _classCallCheck(this, PopupButton); + + _ClickableComponent.call(this, player, options); + + this.update(); + } + + /** + * Update popup + * + * @method update + */ + + PopupButton.prototype.update = function update() { + var popup = this.createPopup(); + + if (this.popup) { + this.removeChild(this.popup); + } + + this.popup = popup; + this.addChild(popup); + + if (this.items && this.items.length === 0) { + this.hide(); + } else if (this.items && this.items.length > 1) { + this.show(); + } + }; + + /** + * Create popup - Override with specific functionality for component + * + * @return {Popup} The constructed popup + * @method createPopup + */ + + PopupButton.prototype.createPopup = function createPopup() {}; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + PopupButton.prototype.createEl = function createEl() { + return _ClickableComponent.prototype.createEl.call(this, 'div', { + className: this.buildCSSClass() + }); + }; + + /** + * Allow sub components to stack CSS class names + * + * @return {String} The constructed class name + * @method buildCSSClass + */ + + PopupButton.prototype.buildCSSClass = function buildCSSClass() { + var menuButtonClass = 'vjs-menu-button'; + + // If the inline option is passed, we want to use different styles altogether. + if (this.options_.inline === true) { + menuButtonClass += '-inline'; + } else { + menuButtonClass += '-popup'; + } + + return 'vjs-menu-button ' + menuButtonClass + ' ' + _ClickableComponent.prototype.buildCSSClass.call(this); + }; + + return PopupButton; +})(_clickableComponentJs2['default']); + +_componentJs2['default'].registerComponent('PopupButton', PopupButton); +exports['default'] = PopupButton; +module.exports = exports['default']; + +},{"../clickable-component.js":65,"../component.js":67,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/to-title-case.js":143,"./popup.js":113}],113:[function(_dereq_,module,exports){ +/** + * @file popup.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsEventsJs = _dereq_('../utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +/** + * The Popup component is used to build pop up controls. + * + * @extends Component + * @class Popup + */ + +var Popup = (function (_Component) { + _inherits(Popup, _Component); + + function Popup() { + _classCallCheck(this, Popup); + + _Component.apply(this, arguments); + } + + /** + * Add a popup item to the popup + * + * @param {Object|String} component Component or component type to add + * @method addItem + */ + + Popup.prototype.addItem = function addItem(component) { + this.addChild(component); + component.on('click', Fn.bind(this, function () { + this.unlockShowing(); + })); + }; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + Popup.prototype.createEl = function createEl() { + var contentElType = this.options_.contentElType || 'ul'; + this.contentEl_ = Dom.createEl(contentElType, { + className: 'vjs-menu-content' + }); + var el = _Component.prototype.createEl.call(this, 'div', { + append: this.contentEl_, + className: 'vjs-menu' + }); + el.appendChild(this.contentEl_); + + // Prevent clicks from bubbling up. Needed for Popup Buttons, + // where a click on the parent is significant + Events.on(el, 'click', function (event) { + event.preventDefault(); + event.stopImmediatePropagation(); + }); + + return el; + }; + + return Popup; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('Popup', Popup); +exports['default'] = Popup; +module.exports = exports['default']; + +},{"../component.js":67,"../utils/dom.js":134,"../utils/events.js":135,"../utils/fn.js":136}],114:[function(_dereq_,module,exports){ +/** + * @file poster-image.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _clickableComponentJs = _dereq_('./clickable-component.js'); + +var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); + +var _componentJs = _dereq_('./component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsFnJs = _dereq_('./utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsDomJs = _dereq_('./utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsBrowserJs = _dereq_('./utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +/** + * The component that handles showing the poster image. + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Button + * @class PosterImage + */ + +var PosterImage = (function (_ClickableComponent) { + _inherits(PosterImage, _ClickableComponent); + + function PosterImage(player, options) { + _classCallCheck(this, PosterImage); + + _ClickableComponent.call(this, player, options); + + this.update(); + player.on('posterchange', Fn.bind(this, this.update)); + } + + /** + * Clean up the poster image + * + * @method dispose + */ + + PosterImage.prototype.dispose = function dispose() { + this.player().off('posterchange', this.update); + _ClickableComponent.prototype.dispose.call(this); + }; + + /** + * Create the poster's image element + * + * @return {Element} + * @method createEl + */ + + PosterImage.prototype.createEl = function createEl() { + var el = Dom.createEl('div', { + className: 'vjs-poster', + + // Don't want poster to be tabbable. + tabIndex: -1 + }); + + // To ensure the poster image resizes while maintaining its original aspect + // ratio, use a div with `background-size` when available. For browsers that + // do not support `background-size` (e.g. IE8), fall back on using a regular + // img element. + if (!browser.BACKGROUND_SIZE_SUPPORTED) { + this.fallbackImg_ = Dom.createEl('img'); + el.appendChild(this.fallbackImg_); + } + + return el; + }; + + /** + * Event handler for updates to the player's poster source + * + * @method update + */ + + PosterImage.prototype.update = function update() { + var url = this.player().poster(); + + this.setSrc(url); + + // If there's no poster source we should display:none on this component + // so it's not still clickable or right-clickable + if (url) { + this.show(); + } else { + this.hide(); + } + }; + + /** + * Set the poster source depending on the display method + * + * @param {String} url The URL to the poster source + * @method setSrc + */ + + PosterImage.prototype.setSrc = function setSrc(url) { + if (this.fallbackImg_) { + this.fallbackImg_.src = url; + } else { + var backgroundImage = ''; + // Any falsey values should stay as an empty string, otherwise + // this will throw an extra error + if (url) { + backgroundImage = 'url("' + url + '")'; + } + + this.el_.style.backgroundImage = backgroundImage; + } + }; + + /** + * Event handler for clicks on the poster image + * + * @method handleClick + */ + + PosterImage.prototype.handleClick = function handleClick() { + // We don't want a click to trigger playback when controls are disabled + // but CSS should be hiding the poster to prevent that from happening + if (this.player_.paused()) { + this.player_.play(); + } else { + this.player_.pause(); + } + }; + + return PosterImage; +})(_clickableComponentJs2['default']); + +_componentJs2['default'].registerComponent('PosterImage', PosterImage); +exports['default'] = PosterImage; +module.exports = exports['default']; + +},{"./clickable-component.js":65,"./component.js":67,"./utils/browser.js":131,"./utils/dom.js":134,"./utils/fn.js":136}],115:[function(_dereq_,module,exports){ +/** + * @file setup.js + * + * Functions for automatically setting up a player + * based on the data-setup attribute of the video tag + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +var _utilsEventsJs = _dereq_('./utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _windowLoaded = false; +var videojs = undefined; + +// Automatically set up any tags that have a data-setup attribute +var autoSetup = function autoSetup() { + // One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack* + // var vids = Array.prototype.slice.call(document.getElementsByTagName('video')); + // var audios = Array.prototype.slice.call(document.getElementsByTagName('audio')); + // var mediaEls = vids.concat(audios); + + // Because IE8 doesn't support calling slice on a node list, we need to loop through each list of elements + // to build up a new, combined list of elements. + var vids = _globalDocument2['default'].getElementsByTagName('video'); + var audios = _globalDocument2['default'].getElementsByTagName('audio'); + var mediaEls = []; + if (vids && vids.length > 0) { + for (var i = 0, e = vids.length; i < e; i++) { + mediaEls.push(vids[i]); + } + } + if (audios && audios.length > 0) { + for (var i = 0, e = audios.length; i < e; i++) { + mediaEls.push(audios[i]); + } + } + + // Check if any media elements exist + if (mediaEls && mediaEls.length > 0) { + + for (var i = 0, e = mediaEls.length; i < e; i++) { + var mediaEl = mediaEls[i]; + + // Check if element exists, has getAttribute func. + // IE seems to consider typeof el.getAttribute == 'object' instead of 'function' like expected, at least when loading the player immediately. + if (mediaEl && mediaEl.getAttribute) { + + // Make sure this player hasn't already been set up. + if (mediaEl['player'] === undefined) { + var options = mediaEl.getAttribute('data-setup'); + + // Check if data-setup attr exists. + // We only auto-setup if they've added the data-setup attr. + if (options !== null) { + // Create new video.js instance. + var player = videojs(mediaEl); + } + } + + // If getAttribute isn't defined, we need to wait for the DOM. + } else { + autoSetupTimeout(1); + break; + } + } + + // No videos were found, so keep looping unless page is finished loading. + } else if (!_windowLoaded) { + autoSetupTimeout(1); + } +}; + +// Pause to let the DOM keep processing +var autoSetupTimeout = function autoSetupTimeout(wait, vjs) { + if (vjs) { + videojs = vjs; + } + + setTimeout(autoSetup, wait); +}; + +if (_globalDocument2['default'].readyState === 'complete') { + _windowLoaded = true; +} else { + Events.one(_globalWindow2['default'], 'load', function () { + _windowLoaded = true; + }); +} + +var hasLoaded = function hasLoaded() { + return _windowLoaded; +}; + +exports.autoSetup = autoSetup; +exports.autoSetupTimeout = autoSetupTimeout; +exports.hasLoaded = hasLoaded; + +},{"./utils/events.js":135,"global/document":1,"global/window":2}],116:[function(_dereq_,module,exports){ +/** + * @file slider.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +/** + * The base functionality for sliders like the volume bar and seek bar + * + * @param {Player|Object} player + * @param {Object=} options + * @extends Component + * @class Slider + */ + +var Slider = (function (_Component) { + _inherits(Slider, _Component); + + function Slider(player, options) { + _classCallCheck(this, Slider); + + _Component.call(this, player, options); + + // Set property names to bar to match with the child Slider class is looking for + this.bar = this.getChild(this.options_.barName); + + // Set a horizontal or vertical class on the slider depending on the slider type + this.vertical(!!this.options_.vertical); + + this.on('mousedown', this.handleMouseDown); + this.on('touchstart', this.handleMouseDown); + this.on('focus', this.handleFocus); + this.on('blur', this.handleBlur); + this.on('click', this.handleClick); + + this.on(player, 'controlsvisible', this.update); + this.on(player, this.playerEvent, this.update); + } + + /** + * Create the component's DOM element + * + * @param {String} type Type of element to create + * @param {Object=} props List of properties in Object form + * @return {Element} + * @method createEl + */ + + Slider.prototype.createEl = function createEl(type) { + var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var attributes = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + + // Add the slider element class to all sub classes + props.className = props.className + ' vjs-slider'; + props = _objectAssign2['default']({ + tabIndex: 0 + }, props); + + attributes = _objectAssign2['default']({ + 'role': 'slider', + 'aria-valuenow': 0, + 'aria-valuemin': 0, + 'aria-valuemax': 100, + tabIndex: 0 + }, attributes); + + return _Component.prototype.createEl.call(this, type, props, attributes); + }; + + /** + * Handle mouse down on slider + * + * @param {Object} event Mouse down event object + * @method handleMouseDown + */ + + Slider.prototype.handleMouseDown = function handleMouseDown(event) { + var doc = this.bar.el_.ownerDocument; + + event.preventDefault(); + Dom.blockTextSelection(); + + this.addClass('vjs-sliding'); + this.trigger('slideractive'); + + this.on(doc, 'mousemove', this.handleMouseMove); + this.on(doc, 'mouseup', this.handleMouseUp); + this.on(doc, 'touchmove', this.handleMouseMove); + this.on(doc, 'touchend', this.handleMouseUp); + + this.handleMouseMove(event); + }; + + /** + * To be overridden by a subclass + * + * @method handleMouseMove + */ + + Slider.prototype.handleMouseMove = function handleMouseMove() {}; + + /** + * Handle mouse up on Slider + * + * @method handleMouseUp + */ + + Slider.prototype.handleMouseUp = function handleMouseUp() { + var doc = this.bar.el_.ownerDocument; + + Dom.unblockTextSelection(); + + this.removeClass('vjs-sliding'); + this.trigger('sliderinactive'); + + this.off(doc, 'mousemove', this.handleMouseMove); + this.off(doc, 'mouseup', this.handleMouseUp); + this.off(doc, 'touchmove', this.handleMouseMove); + this.off(doc, 'touchend', this.handleMouseUp); + + this.update(); + }; + + /** + * Update slider + * + * @method update + */ + + Slider.prototype.update = function update() { + // In VolumeBar init we have a setTimeout for update that pops and update to the end of the + // execution stack. The player is destroyed before then update will cause an error + if (!this.el_) return; + + // If scrubbing, we could use a cached value to make the handle keep up with the user's mouse. + // On HTML5 browsers scrubbing is really smooth, but some flash players are slow, so we might want to utilize this later. + // var progress = (this.player_.scrubbing()) ? this.player_.getCache().currentTime / this.player_.duration() : this.player_.currentTime() / this.player_.duration(); + var progress = this.getPercent(); + var bar = this.bar; + + // If there's no bar... + if (!bar) return; + + // Protect against no duration and other division issues + if (typeof progress !== 'number' || progress !== progress || progress < 0 || progress === Infinity) { + progress = 0; + } + + // Convert to a percentage for setting + var percentage = (progress * 100).toFixed(2) + '%'; + + // Set the new bar width or height + if (this.vertical()) { + bar.el().style.height = percentage; + } else { + bar.el().style.width = percentage; + } + }; + + /** + * Calculate distance for slider + * + * @param {Object} event Event object + * @method calculateDistance + */ + + Slider.prototype.calculateDistance = function calculateDistance(event) { + var position = Dom.getPointerPosition(this.el_, event); + if (this.vertical()) { + return position.y; + } + return position.x; + }; + + /** + * Handle on focus for slider + * + * @method handleFocus + */ + + Slider.prototype.handleFocus = function handleFocus() { + this.on(this.bar.el_.ownerDocument, 'keydown', this.handleKeyPress); + }; + + /** + * Handle key press for slider + * + * @param {Object} event Event object + * @method handleKeyPress + */ + + Slider.prototype.handleKeyPress = function handleKeyPress(event) { + if (event.which === 37 || event.which === 40) { + // Left and Down Arrows + event.preventDefault(); + this.stepBack(); + } else if (event.which === 38 || event.which === 39) { + // Up and Right Arrows + event.preventDefault(); + this.stepForward(); + } + }; + + /** + * Handle on blur for slider + * + * @method handleBlur + */ + + Slider.prototype.handleBlur = function handleBlur() { + this.off(this.bar.el_.ownerDocument, 'keydown', this.handleKeyPress); + }; + + /** + * Listener for click events on slider, used to prevent clicks + * from bubbling up to parent elements like button menus. + * + * @param {Object} event Event object + * @method handleClick + */ + + Slider.prototype.handleClick = function handleClick(event) { + event.stopImmediatePropagation(); + event.preventDefault(); + }; + + /** + * Get/set if slider is horizontal for vertical + * + * @param {Boolean} bool True if slider is vertical, false is horizontal + * @return {Boolean} True if slider is vertical, false is horizontal + * @method vertical + */ + + Slider.prototype.vertical = function vertical(bool) { + if (bool === undefined) { + return this.vertical_ || false; + } + + this.vertical_ = !!bool; + + if (this.vertical_) { + this.addClass('vjs-slider-vertical'); + } else { + this.addClass('vjs-slider-horizontal'); + } + + return this; + }; + + return Slider; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('Slider', Slider); +exports['default'] = Slider; +module.exports = exports['default']; + +},{"../component.js":67,"../utils/dom.js":134,"object.assign":45}],117:[function(_dereq_,module,exports){ +/** + * @file flash-rtmp.js + */ +'use strict'; + +exports.__esModule = true; +function FlashRtmpDecorator(Flash) { + Flash.streamingFormats = { + 'rtmp/mp4': 'MP4', + 'rtmp/flv': 'FLV' + }; + + Flash.streamFromParts = function (connection, stream) { + return connection + '&' + stream; + }; + + Flash.streamToParts = function (src) { + var parts = { + connection: '', + stream: '' + }; + + if (!src) return parts; + + // Look for the normal URL separator we expect, '&'. + // If found, we split the URL into two pieces around the + // first '&'. + var connEnd = src.search(/&(?!\w+=)/); + var streamBegin = undefined; + if (connEnd !== -1) { + streamBegin = connEnd + 1; + } else { + // If there's not a '&', we use the last '/' as the delimiter. + connEnd = streamBegin = src.lastIndexOf('/') + 1; + if (connEnd === 0) { + // really, there's not a '/'? + connEnd = streamBegin = src.length; + } + } + parts.connection = src.substring(0, connEnd); + parts.stream = src.substring(streamBegin, src.length); + + return parts; + }; + + Flash.isStreamingType = function (srcType) { + return srcType in Flash.streamingFormats; + }; + + // RTMP has four variations, any string starting + // with one of these protocols should be valid + Flash.RTMP_RE = /^rtmp[set]?:\/\//i; + + Flash.isStreamingSrc = function (src) { + return Flash.RTMP_RE.test(src); + }; + + /** + * A source handler for RTMP urls + * @type {Object} + */ + Flash.rtmpSourceHandler = {}; + + /** + * Check if Flash can play the given videotype + * @param {String} type The mimetype to check + * @return {String} 'probably', 'maybe', or '' (empty string) + */ + Flash.rtmpSourceHandler.canPlayType = function (type) { + if (Flash.isStreamingType(type)) { + return 'maybe'; + } + + return ''; + }; + + /** + * Check if Flash can handle the source natively + * @param {Object} source The source object + * @return {String} 'probably', 'maybe', or '' (empty string) + */ + Flash.rtmpSourceHandler.canHandleSource = function (source) { + var can = Flash.rtmpSourceHandler.canPlayType(source.type); + + if (can) { + return can; + } + + if (Flash.isStreamingSrc(source.src)) { + return 'maybe'; + } + + return ''; + }; + + /** + * Pass the source to the flash object + * Adaptive source handlers will have more complicated workflows before passing + * video data to the video element + * @param {Object} source The source object + * @param {Flash} tech The instance of the Flash tech + */ + Flash.rtmpSourceHandler.handleSource = function (source, tech) { + var srcParts = Flash.streamToParts(source.src); + + tech['setRtmpConnection'](srcParts.connection); + tech['setRtmpStream'](srcParts.stream); + }; + + // Register the native source handler + Flash.registerSourceHandler(Flash.rtmpSourceHandler); + + return Flash; +} + +exports['default'] = FlashRtmpDecorator; +module.exports = exports['default']; + +},{}],118:[function(_dereq_,module,exports){ +/** + * @file flash.js + * VideoJS-SWF - Custom Flash Player with HTML5-ish API + * https://github.com/zencoder/video-js-swf + * Not using setupTriggers. Using global onEvent func to distribute events + */ + +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _tech = _dereq_('./tech'); + +var _tech2 = _interopRequireDefault(_tech); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsUrlJs = _dereq_('../utils/url.js'); + +var Url = _interopRequireWildcard(_utilsUrlJs); + +var _utilsTimeRangesJs = _dereq_('../utils/time-ranges.js'); + +var _flashRtmp = _dereq_('./flash-rtmp'); + +var _flashRtmp2 = _interopRequireDefault(_flashRtmp); + +var _component = _dereq_('../component'); + +var _component2 = _interopRequireDefault(_component); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +var navigator = _globalWindow2['default'].navigator; +/** + * Flash Media Controller - Wrapper for fallback SWF API + * + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends Tech + * @class Flash + */ + +var Flash = (function (_Tech) { + _inherits(Flash, _Tech); + + function Flash(options, ready) { + _classCallCheck(this, Flash); + + _Tech.call(this, options, ready); + + // Set the source when ready + if (options.source) { + this.ready(function () { + this.setSource(options.source); + }, true); + } + + // Having issues with Flash reloading on certain page actions (hide/resize/fullscreen) in certain browsers + // This allows resetting the playhead when we catch the reload + if (options.startTime) { + this.ready(function () { + this.load(); + this.play(); + this.currentTime(options.startTime); + }, true); + } + + // Add global window functions that the swf expects + // A 4.x workflow we weren't able to solve for in 5.0 + // because of the need to hard code these functions + // into the swf for security reasons + _globalWindow2['default'].videojs = _globalWindow2['default'].videojs || {}; + _globalWindow2['default'].videojs.Flash = _globalWindow2['default'].videojs.Flash || {}; + _globalWindow2['default'].videojs.Flash.onReady = Flash.onReady; + _globalWindow2['default'].videojs.Flash.onEvent = Flash.onEvent; + _globalWindow2['default'].videojs.Flash.onError = Flash.onError; + + this.on('seeked', function () { + this.lastSeekTarget_ = undefined; + }); + } + + // Create setters and getters for attributes + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + Flash.prototype.createEl = function createEl() { + var options = this.options_; + + // If video.js is hosted locally you should also set the location + // for the hosted swf, which should be relative to the page (not video.js) + // Otherwise this adds a CDN url. + // The CDN also auto-adds a swf URL for that specific version. + if (!options.swf) { + options.swf = '//vjs.zencdn.net/swf/5.0.1/video-js.swf'; + } + + // Generate ID for swf object + var objId = options.techId; + + // Merge default flashvars with ones passed in to init + var flashVars = _objectAssign2['default']({ + + // SWF Callback Functions + 'readyFunction': 'videojs.Flash.onReady', + 'eventProxyFunction': 'videojs.Flash.onEvent', + 'errorEventProxyFunction': 'videojs.Flash.onError', + + // Player Settings + 'autoplay': options.autoplay, + 'preload': options.preload, + 'loop': options.loop, + 'muted': options.muted + + }, options.flashVars); + + // Merge default parames with ones passed in + var params = _objectAssign2['default']({ + 'wmode': 'opaque', // Opaque is needed to overlay controls, but can affect playback performance + 'bgcolor': '#000000' // Using bgcolor prevents a white flash when the object is loading + }, options.params); + + // Merge default attributes with ones passed in + var attributes = _objectAssign2['default']({ + 'id': objId, + 'name': objId, // Both ID and Name needed or swf to identify itself + 'class': 'vjs-tech' + }, options.attributes); + + this.el_ = Flash.embed(options.swf, flashVars, params, attributes); + this.el_.tech = this; + + return this.el_; + }; + + /** + * Play for flash tech + * + * @method play + */ + + Flash.prototype.play = function play() { + if (this.ended()) { + this.setCurrentTime(0); + } + this.el_.vjs_play(); + }; + + /** + * Pause for flash tech + * + * @method pause + */ + + Flash.prototype.pause = function pause() { + this.el_.vjs_pause(); + }; + + /** + * Get/set video + * + * @param {Object=} src Source object + * @return {Object} + * @method src + */ + + Flash.prototype.src = function src(_src) { + if (_src === undefined) { + return this.currentSrc(); + } + + // Setting src through `src` not `setSrc` will be deprecated + return this.setSrc(_src); + }; + + /** + * Set video + * + * @param {Object=} src Source object + * @deprecated + * @method setSrc + */ + + Flash.prototype.setSrc = function setSrc(src) { + // Make sure source URL is absolute. + src = Url.getAbsoluteURL(src); + this.el_.vjs_src(src); + + // Currently the SWF doesn't autoplay if you load a source later. + // e.g. Load player w/ no source, wait 2s, set src. + if (this.autoplay()) { + var tech = this; + this.setTimeout(function () { + tech.play(); + }, 0); + } + }; + + /** + * Returns true if the tech is currently seeking. + * @return {boolean} true if seeking + */ + + Flash.prototype.seeking = function seeking() { + return this.lastSeekTarget_ !== undefined; + }; + + /** + * Set current time + * + * @param {Number} time Current time of video + * @method setCurrentTime + */ + + Flash.prototype.setCurrentTime = function setCurrentTime(time) { + var seekable = this.seekable(); + if (seekable.length) { + // clamp to the current seekable range + time = time > seekable.start(0) ? time : seekable.start(0); + time = time < seekable.end(seekable.length - 1) ? time : seekable.end(seekable.length - 1); + + this.lastSeekTarget_ = time; + this.trigger('seeking'); + this.el_.vjs_setProperty('currentTime', time); + _Tech.prototype.setCurrentTime.call(this); + } + }; + + /** + * Get current time + * + * @param {Number=} time Current time of video + * @return {Number} Current time + * @method currentTime + */ + + Flash.prototype.currentTime = function currentTime(time) { + // when seeking make the reported time keep up with the requested time + // by reading the time we're seeking to + if (this.seeking()) { + return this.lastSeekTarget_ || 0; + } + return this.el_.vjs_getProperty('currentTime'); + }; + + /** + * Get current source + * + * @method currentSrc + */ + + Flash.prototype.currentSrc = function currentSrc() { + if (this.currentSource_) { + return this.currentSource_.src; + } else { + return this.el_.vjs_getProperty('currentSrc'); + } + }; + + /** + * Load media into player + * + * @method load + */ + + Flash.prototype.load = function load() { + this.el_.vjs_load(); + }; + + /** + * Get poster + * + * @method poster + */ + + Flash.prototype.poster = function poster() { + this.el_.vjs_getProperty('poster'); + }; + + /** + * Poster images are not handled by the Flash tech so make this a no-op + * + * @method setPoster + */ + + Flash.prototype.setPoster = function setPoster() {}; + + /** + * Determine if can seek in media + * + * @return {TimeRangeObject} + * @method seekable + */ + + Flash.prototype.seekable = function seekable() { + var duration = this.duration(); + if (duration === 0) { + return _utilsTimeRangesJs.createTimeRange(); + } + return _utilsTimeRangesJs.createTimeRange(0, duration); + }; + + /** + * Get buffered time range + * + * @return {TimeRangeObject} + * @method buffered + */ + + Flash.prototype.buffered = function buffered() { + var ranges = this.el_.vjs_getProperty('buffered'); + if (ranges.length === 0) { + return _utilsTimeRangesJs.createTimeRange(); + } + return _utilsTimeRangesJs.createTimeRange(ranges[0][0], ranges[0][1]); + }; + + /** + * Get fullscreen support - + * Flash does not allow fullscreen through javascript + * so always returns false + * + * @return {Boolean} false + * @method supportsFullScreen + */ + + Flash.prototype.supportsFullScreen = function supportsFullScreen() { + return false; // Flash does not allow fullscreen through javascript + }; + + /** + * Request to enter fullscreen + * Flash does not allow fullscreen through javascript + * so always returns false + * + * @return {Boolean} false + * @method enterFullScreen + */ + + Flash.prototype.enterFullScreen = function enterFullScreen() { + return false; + }; + + return Flash; +})(_tech2['default']); + +var _api = Flash.prototype; +var _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(','); +var _readOnly = 'networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(','); + +function _createSetter(attr) { + var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1); + _api['set' + attrUpper] = function (val) { + return this.el_.vjs_setProperty(attr, val); + }; +} +function _createGetter(attr) { + _api[attr] = function () { + return this.el_.vjs_getProperty(attr); + }; +} + +// Create getter and setters for all read/write attributes +for (var i = 0; i < _readWrite.length; i++) { + _createGetter(_readWrite[i]); + _createSetter(_readWrite[i]); +} + +// Create getters for read-only attributes +for (var i = 0; i < _readOnly.length; i++) { + _createGetter(_readOnly[i]); +} + +/* Flash Support Testing -------------------------------------------------------- */ + +Flash.isSupported = function () { + return Flash.version()[0] >= 10; + // return swfobject.hasFlashPlayerVersion('10'); +}; + +// Add Source Handler pattern functions to this tech +_tech2['default'].withSourceHandlers(Flash); + +/* + * The default native source handler. + * This simply passes the source to the video element. Nothing fancy. + * + * @param {Object} source The source object + * @param {Flash} tech The instance of the Flash tech + */ +Flash.nativeSourceHandler = {}; + +/** + * Check if Flash can play the given videotype + * @param {String} type The mimetype to check + * @return {String} 'probably', 'maybe', or '' (empty string) + */ +Flash.nativeSourceHandler.canPlayType = function (type) { + if (type in Flash.formats) { + return 'maybe'; + } + + return ''; +}; + +/* + * Check Flash can handle the source natively + * + * @param {Object} source The source object + * @return {String} 'probably', 'maybe', or '' (empty string) + */ +Flash.nativeSourceHandler.canHandleSource = function (source) { + var type; + + function guessMimeType(src) { + var ext = Url.getFileExtension(src); + if (ext) { + return 'video/' + ext; + } + return ''; + } + + if (!source.type) { + type = guessMimeType(source.src); + } else { + // Strip code information from the type because we don't get that specific + type = source.type.replace(/;.*/, '').toLowerCase(); + } + + return Flash.nativeSourceHandler.canPlayType(type); +}; + +/* + * Pass the source to the flash object + * Adaptive source handlers will have more complicated workflows before passing + * video data to the video element + * + * @param {Object} source The source object + * @param {Flash} tech The instance of the Flash tech + */ +Flash.nativeSourceHandler.handleSource = function (source, tech) { + tech.setSrc(source.src); +}; + +/* + * Clean up the source handler when disposing the player or switching sources.. + * (no cleanup is needed when supporting the format natively) + */ +Flash.nativeSourceHandler.dispose = function () {}; + +// Register the native source handler +Flash.registerSourceHandler(Flash.nativeSourceHandler); + +Flash.formats = { + 'video/flv': 'FLV', + 'video/x-flv': 'FLV', + 'video/mp4': 'MP4', + 'video/m4v': 'MP4' +}; + +Flash.onReady = function (currSwf) { + var el = Dom.getEl(currSwf); + var tech = el && el.tech; + + // if there is no el then the tech has been disposed + // and the tech element was removed from the player div + if (tech && tech.el()) { + // check that the flash object is really ready + Flash.checkReady(tech); + } +}; + +// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object. +// If it's not ready, we set a timeout to check again shortly. +Flash.checkReady = function (tech) { + // stop worrying if the tech has been disposed + if (!tech.el()) { + return; + } + + // check if API property exists + if (tech.el().vjs_getProperty) { + // tell tech it's ready + tech.triggerReady(); + } else { + // wait longer + this.setTimeout(function () { + Flash['checkReady'](tech); + }, 50); + } +}; + +// Trigger events from the swf on the player +Flash.onEvent = function (swfID, eventName) { + var tech = Dom.getEl(swfID).tech; + tech.trigger(eventName); +}; + +// Log errors from the swf +Flash.onError = function (swfID, err) { + var tech = Dom.getEl(swfID).tech; + + // trigger MEDIA_ERR_SRC_NOT_SUPPORTED + if (err === 'srcnotfound') { + return tech.error(4); + } + + // trigger a custom error + tech.error('FLASH: ' + err); +}; + +// Flash Version Check +Flash.version = function () { + var version = '0,0,0'; + + // IE + try { + version = new _globalWindow2['default'].ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; + + // other browsers + } catch (e) { + try { + if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) { + version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; + } + } catch (err) {} + } + return version.split(','); +}; + +// Flash embedding method. Only used in non-iframe mode +Flash.embed = function (swf, flashVars, params, attributes) { + var code = Flash.getEmbedCode(swf, flashVars, params, attributes); + + // Get element by embedding code and retrieving created element + var obj = Dom.createEl('div', { innerHTML: code }).childNodes[0]; + + return obj; +}; + +Flash.getEmbedCode = function (swf, flashVars, params, attributes) { + var objTag = ''; + }); + + attributes = _objectAssign2['default']({ + // Add swf to attributes (need both for IE and Others to work) + 'data': swf, + + // Default to 100% width/height + 'width': '100%', + 'height': '100%' + + }, attributes); + + // Create Attributes string + Object.getOwnPropertyNames(attributes).forEach(function (key) { + attrsString += key + '="' + attributes[key] + '" '; + }); + + return '' + objTag + attrsString + '>' + paramsString + ''; +}; + +// Run Flash through the RTMP decorator +_flashRtmp2['default'](Flash); + +_component2['default'].registerComponent('Flash', Flash); +_tech2['default'].registerTech('Flash', Flash); +exports['default'] = Flash; +module.exports = exports['default']; + +},{"../component":67,"../utils/dom.js":134,"../utils/time-ranges.js":142,"../utils/url.js":144,"./flash-rtmp":117,"./tech":121,"global/window":2,"object.assign":45}],119:[function(_dereq_,module,exports){ +/** + * @file html5.js + * HTML5 Media Controller - Wrapper for HTML5 Media API + */ + +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _techJs = _dereq_('./tech.js'); + +var _techJs2 = _interopRequireDefault(_techJs); + +var _component = _dereq_('../component'); + +var _component2 = _interopRequireDefault(_component); + +var _utilsDomJs = _dereq_('../utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsUrlJs = _dereq_('../utils/url.js'); + +var Url = _interopRequireWildcard(_utilsUrlJs); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsLogJs = _dereq_('../utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _utilsBrowserJs = _dereq_('../utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +var _utilsMergeOptionsJs = _dereq_('../utils/merge-options.js'); + +var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs); + +/** + * HTML5 Media Controller - Wrapper for HTML5 Media API + * + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends Tech + * @class Html5 + */ + +var Html5 = (function (_Tech) { + _inherits(Html5, _Tech); + + function Html5(options, ready) { + _classCallCheck(this, Html5); + + _Tech.call(this, options, ready); + + var source = options.source; + + // Set the source if one is provided + // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted) + // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source + // anyway so the error gets fired. + if (source && (this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) { + this.setSource(source); + } else { + this.handleLateInit_(this.el_); + } + + if (this.el_.hasChildNodes()) { + + var nodes = this.el_.childNodes; + var nodesLength = nodes.length; + var removeNodes = []; + + while (nodesLength--) { + var node = nodes[nodesLength]; + var nodeName = node.nodeName.toLowerCase(); + + if (nodeName === 'track') { + if (!this.featuresNativeTextTracks) { + // Empty video tag tracks so the built-in player doesn't use them also. + // This may not be fast enough to stop HTML5 browsers from reading the tags + // so we'll need to turn off any default tracks if we're manually doing + // captions and subtitles. videoElement.textTracks + removeNodes.push(node); + } else { + // store HTMLTrackElement and TextTrack to remote list + this.remoteTextTrackEls().addTrackElement_(node); + this.remoteTextTracks().addTrack_(node.track); + } + } + } + + for (var i = 0; i < removeNodes.length; i++) { + this.el_.removeChild(removeNodes[i]); + } + } + + if (this.featuresNativeTextTracks) { + this.handleTextTrackChange_ = Fn.bind(this, this.handleTextTrackChange); + this.handleTextTrackAdd_ = Fn.bind(this, this.handleTextTrackAdd); + this.handleTextTrackRemove_ = Fn.bind(this, this.handleTextTrackRemove); + this.proxyNativeTextTracks_(); + } + + // Determine if native controls should be used + // Our goal should be to get the custom controls on mobile solid everywhere + // so we can remove this all together. Right now this will block custom + // controls on touch enabled laptops like the Chrome Pixel + if (browser.TOUCH_ENABLED && options.nativeControlsForTouch === true || browser.IS_IPHONE || browser.IS_NATIVE_ANDROID) { + this.setControls(true); + } + + this.triggerReady(); + } + + /* HTML5 Support Testing ---------------------------------------------------- */ + + /* + * Element for testing browser HTML5 video capabilities + * + * @type {Element} + * @constant + * @private + */ + + /** + * Dispose of html5 media element + * + * @method dispose + */ + + Html5.prototype.dispose = function dispose() { + var tt = this.el().textTracks; + var emulatedTt = this.textTracks(); + + // remove native event listeners + if (tt && tt.removeEventListener) { + tt.removeEventListener('change', this.handleTextTrackChange_); + tt.removeEventListener('addtrack', this.handleTextTrackAdd_); + tt.removeEventListener('removetrack', this.handleTextTrackRemove_); + } + + // clearout the emulated text track list. + var i = emulatedTt.length; + + while (i--) { + emulatedTt.removeTrack_(emulatedTt[i]); + } + + Html5.disposeMediaElement(this.el_); + _Tech.prototype.dispose.call(this); + }; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + Html5.prototype.createEl = function createEl() { + var el = this.options_.tag; + + // Check if this browser supports moving the element into the box. + // On the iPhone video will break if you move the element, + // So we have to create a brand new element. + if (!el || this['movingMediaElementInDOM'] === false) { + + // If the original tag is still there, clone and remove it. + if (el) { + var clone = el.cloneNode(true); + el.parentNode.insertBefore(clone, el); + Html5.disposeMediaElement(el); + el = clone; + } else { + el = _globalDocument2['default'].createElement('video'); + + // determine if native controls should be used + var tagAttributes = this.options_.tag && Dom.getElAttributes(this.options_.tag); + var attributes = _utilsMergeOptionsJs2['default']({}, tagAttributes); + if (!browser.TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) { + delete attributes.controls; + } + + Dom.setElAttributes(el, _objectAssign2['default'](attributes, { + id: this.options_.techId, + 'class': 'vjs-tech' + })); + } + } + + // Update specific tag settings, in case they were overridden + var settingsAttrs = ['autoplay', 'preload', 'loop', 'muted']; + for (var i = settingsAttrs.length - 1; i >= 0; i--) { + var attr = settingsAttrs[i]; + var overwriteAttrs = {}; + if (typeof this.options_[attr] !== 'undefined') { + overwriteAttrs[attr] = this.options_[attr]; + } + Dom.setElAttributes(el, overwriteAttrs); + } + + return el; + // jenniisawesome = true; + }; + + // If we're loading the playback object after it has started loading + // or playing the video (often with autoplay on) then the loadstart event + // has already fired and we need to fire it manually because many things + // rely on it. + + Html5.prototype.handleLateInit_ = function handleLateInit_(el) { + var _this = this; + + if (el.networkState === 0 || el.networkState === 3) { + // The video element hasn't started loading the source yet + // or didn't find a source + return; + } + + if (el.readyState === 0) { + var _ret = (function () { + // NetworkState is set synchronously BUT loadstart is fired at the + // end of the current stack, usually before setInterval(fn, 0). + // So at this point we know loadstart may have already fired or is + // about to fire, and either way the player hasn't seen it yet. + // We don't want to fire loadstart prematurely here and cause a + // double loadstart so we'll wait and see if it happens between now + // and the next loop, and fire it if not. + // HOWEVER, we also want to make sure it fires before loadedmetadata + // which could also happen between now and the next loop, so we'll + // watch for that also. + var loadstartFired = false; + var setLoadstartFired = function setLoadstartFired() { + loadstartFired = true; + }; + _this.on('loadstart', setLoadstartFired); + + var triggerLoadstart = function triggerLoadstart() { + // We did miss the original loadstart. Make sure the player + // sees loadstart before loadedmetadata + if (!loadstartFired) { + this.trigger('loadstart'); + } + }; + _this.on('loadedmetadata', triggerLoadstart); + + _this.ready(function () { + this.off('loadstart', setLoadstartFired); + this.off('loadedmetadata', triggerLoadstart); + + if (!loadstartFired) { + // We did miss the original native loadstart. Fire it now. + this.trigger('loadstart'); + } + }); + + return { + v: undefined + }; + })(); + + if (typeof _ret === 'object') return _ret.v; + } + + // From here on we know that loadstart already fired and we missed it. + // The other readyState events aren't as much of a problem if we double + // them, so not going to go to as much trouble as loadstart to prevent + // that unless we find reason to. + var eventsToTrigger = ['loadstart']; + + // loadedmetadata: newly equal to HAVE_METADATA (1) or greater + eventsToTrigger.push('loadedmetadata'); + + // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater + if (el.readyState >= 2) { + eventsToTrigger.push('loadeddata'); + } + + // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater + if (el.readyState >= 3) { + eventsToTrigger.push('canplay'); + } + + // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4) + if (el.readyState >= 4) { + eventsToTrigger.push('canplaythrough'); + } + + // We still need to give the player time to add event listeners + this.ready(function () { + eventsToTrigger.forEach(function (type) { + this.trigger(type); + }, this); + }); + }; + + Html5.prototype.proxyNativeTextTracks_ = function proxyNativeTextTracks_() { + var tt = this.el().textTracks; + + if (tt) { + // Add tracks - if player is initialised after DOM loaded, textTracks + // will not trigger addtrack + for (var i = 0; i < tt.length; i++) { + this.textTracks().addTrack_(tt[i]); + } + + if (tt.addEventListener) { + tt.addEventListener('change', this.handleTextTrackChange_); + tt.addEventListener('addtrack', this.handleTextTrackAdd_); + tt.addEventListener('removetrack', this.handleTextTrackRemove_); + } + } + }; + + Html5.prototype.handleTextTrackChange = function handleTextTrackChange(e) { + var tt = this.textTracks(); + this.textTracks().trigger({ + type: 'change', + target: tt, + currentTarget: tt, + srcElement: tt + }); + }; + + Html5.prototype.handleTextTrackAdd = function handleTextTrackAdd(e) { + this.textTracks().addTrack_(e.track); + }; + + Html5.prototype.handleTextTrackRemove = function handleTextTrackRemove(e) { + this.textTracks().removeTrack_(e.track); + }; + + /** + * Play for html5 tech + * + * @method play + */ + + Html5.prototype.play = function play() { + this.el_.play(); + }; + + /** + * Pause for html5 tech + * + * @method pause + */ + + Html5.prototype.pause = function pause() { + this.el_.pause(); + }; + + /** + * Paused for html5 tech + * + * @return {Boolean} + * @method paused + */ + + Html5.prototype.paused = function paused() { + return this.el_.paused; + }; + + /** + * Get current time + * + * @return {Number} + * @method currentTime + */ + + Html5.prototype.currentTime = function currentTime() { + return this.el_.currentTime; + }; + + /** + * Set current time + * + * @param {Number} seconds Current time of video + * @method setCurrentTime + */ + + Html5.prototype.setCurrentTime = function setCurrentTime(seconds) { + try { + this.el_.currentTime = seconds; + } catch (e) { + _utilsLogJs2['default'](e, 'Video is not ready. (Video.js)'); + // this.warning(VideoJS.warnings.videoNotReady); + } + }; + + /** + * Get duration + * + * @return {Number} + * @method duration + */ + + Html5.prototype.duration = function duration() { + return this.el_.duration || 0; + }; + + /** + * Get a TimeRange object that represents the intersection + * of the time ranges for which the user agent has all + * relevant media + * + * @return {TimeRangeObject} + * @method buffered + */ + + Html5.prototype.buffered = function buffered() { + return this.el_.buffered; + }; + + /** + * Get volume level + * + * @return {Number} + * @method volume + */ + + Html5.prototype.volume = function volume() { + return this.el_.volume; + }; + + /** + * Set volume level + * + * @param {Number} percentAsDecimal Volume percent as a decimal + * @method setVolume + */ + + Html5.prototype.setVolume = function setVolume(percentAsDecimal) { + this.el_.volume = percentAsDecimal; + }; + + /** + * Get if muted + * + * @return {Boolean} + * @method muted + */ + + Html5.prototype.muted = function muted() { + return this.el_.muted; + }; + + /** + * Set muted + * + * @param {Boolean} If player is to be muted or note + * @method setMuted + */ + + Html5.prototype.setMuted = function setMuted(muted) { + this.el_.muted = muted; + }; + + /** + * Get player width + * + * @return {Number} + * @method width + */ + + Html5.prototype.width = function width() { + return this.el_.offsetWidth; + }; + + /** + * Get player height + * + * @return {Number} + * @method height + */ + + Html5.prototype.height = function height() { + return this.el_.offsetHeight; + }; + + /** + * Get if there is fullscreen support + * + * @return {Boolean} + * @method supportsFullScreen + */ + + Html5.prototype.supportsFullScreen = function supportsFullScreen() { + if (typeof this.el_.webkitEnterFullScreen === 'function') { + var userAgent = _globalWindow2['default'].navigator.userAgent; + // Seems to be broken in Chromium/Chrome && Safari in Leopard + if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) { + return true; + } + } + return false; + }; + + /** + * Request to enter fullscreen + * + * @method enterFullScreen + */ + + Html5.prototype.enterFullScreen = function enterFullScreen() { + var video = this.el_; + + if ('webkitDisplayingFullscreen' in video) { + this.one('webkitbeginfullscreen', function () { + this.one('webkitendfullscreen', function () { + this.trigger('fullscreenchange', { isFullscreen: false }); + }); + + this.trigger('fullscreenchange', { isFullscreen: true }); + }); + } + + if (video.paused && video.networkState <= video.HAVE_METADATA) { + // attempt to prime the video element for programmatic access + // this isn't necessary on the desktop but shouldn't hurt + this.el_.play(); + + // playing and pausing synchronously during the transition to fullscreen + // can get iOS ~6.1 devices into a play/pause loop + this.setTimeout(function () { + video.pause(); + video.webkitEnterFullScreen(); + }, 0); + } else { + video.webkitEnterFullScreen(); + } + }; + + /** + * Request to exit fullscreen + * + * @method exitFullScreen + */ + + Html5.prototype.exitFullScreen = function exitFullScreen() { + this.el_.webkitExitFullScreen(); + }; + + /** + * Get/set video + * + * @param {Object=} src Source object + * @return {Object} + * @method src + */ + + Html5.prototype.src = function src(_src) { + if (_src === undefined) { + return this.el_.src; + } else { + // Setting src through `src` instead of `setSrc` will be deprecated + this.setSrc(_src); + } + }; + + /** + * Set video + * + * @param {Object} src Source object + * @deprecated + * @method setSrc + */ + + Html5.prototype.setSrc = function setSrc(src) { + this.el_.src = src; + }; + + /** + * Load media into player + * + * @method load + */ + + Html5.prototype.load = function load() { + this.el_.load(); + }; + + /** + * Reset the tech. Removes all sources and calls `load`. + * + * @method reset + */ + + Html5.prototype.reset = function reset() { + Html5.resetMediaElement(this.el_); + }; + + /** + * Get current source + * + * @return {Object} + * @method currentSrc + */ + + Html5.prototype.currentSrc = function currentSrc() { + if (this.currentSource_) { + return this.currentSource_.src; + } else { + return this.el_.currentSrc; + } + }; + + /** + * Get poster + * + * @return {String} + * @method poster + */ + + Html5.prototype.poster = function poster() { + return this.el_.poster; + }; + + /** + * Set poster + * + * @param {String} val URL to poster image + * @method + */ + + Html5.prototype.setPoster = function setPoster(val) { + this.el_.poster = val; + }; + + /** + * Get preload attribute + * + * @return {String} + * @method preload + */ + + Html5.prototype.preload = function preload() { + return this.el_.preload; + }; + + /** + * Set preload attribute + * + * @param {String} val Value for preload attribute + * @method setPreload + */ + + Html5.prototype.setPreload = function setPreload(val) { + this.el_.preload = val; + }; + + /** + * Get autoplay attribute + * + * @return {String} + * @method autoplay + */ + + Html5.prototype.autoplay = function autoplay() { + return this.el_.autoplay; + }; + + /** + * Set autoplay attribute + * + * @param {String} val Value for preload attribute + * @method setAutoplay + */ + + Html5.prototype.setAutoplay = function setAutoplay(val) { + this.el_.autoplay = val; + }; + + /** + * Get controls attribute + * + * @return {String} + * @method controls + */ + + Html5.prototype.controls = function controls() { + return this.el_.controls; + }; + + /** + * Set controls attribute + * + * @param {String} val Value for controls attribute + * @method setControls + */ + + Html5.prototype.setControls = function setControls(val) { + this.el_.controls = !!val; + }; + + /** + * Get loop attribute + * + * @return {String} + * @method loop + */ + + Html5.prototype.loop = function loop() { + return this.el_.loop; + }; + + /** + * Set loop attribute + * + * @param {String} val Value for loop attribute + * @method setLoop + */ + + Html5.prototype.setLoop = function setLoop(val) { + this.el_.loop = val; + }; + + /** + * Get error value + * + * @return {String} + * @method error + */ + + Html5.prototype.error = function error() { + return this.el_.error; + }; + + /** + * Get whether or not the player is in the "seeking" state + * + * @return {Boolean} + * @method seeking + */ + + Html5.prototype.seeking = function seeking() { + return this.el_.seeking; + }; + + /** + * Get a TimeRanges object that represents the + * ranges of the media resource to which it is possible + * for the user agent to seek. + * + * @return {TimeRangeObject} + * @method seekable + */ + + Html5.prototype.seekable = function seekable() { + return this.el_.seekable; + }; + + /** + * Get if video ended + * + * @return {Boolean} + * @method ended + */ + + Html5.prototype.ended = function ended() { + return this.el_.ended; + }; + + /** + * Get the value of the muted content attribute + * This attribute has no dynamic effect, it only + * controls the default state of the element + * + * @return {Boolean} + * @method defaultMuted + */ + + Html5.prototype.defaultMuted = function defaultMuted() { + return this.el_.defaultMuted; + }; + + /** + * Get desired speed at which the media resource is to play + * + * @return {Number} + * @method playbackRate + */ + + Html5.prototype.playbackRate = function playbackRate() { + return this.el_.playbackRate; + }; + + /** + * Returns a TimeRanges object that represents the ranges of the + * media resource that the user agent has played. + * @return {TimeRangeObject} the range of points on the media + * timeline that has been reached through normal playback + * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-played + */ + + Html5.prototype.played = function played() { + return this.el_.played; + }; + + /** + * Set desired speed at which the media resource is to play + * + * @param {Number} val Speed at which the media resource is to play + * @method setPlaybackRate + */ + + Html5.prototype.setPlaybackRate = function setPlaybackRate(val) { + this.el_.playbackRate = val; + }; + + /** + * Get the current state of network activity for the element, from + * the list below + * NETWORK_EMPTY (numeric value 0) + * NETWORK_IDLE (numeric value 1) + * NETWORK_LOADING (numeric value 2) + * NETWORK_NO_SOURCE (numeric value 3) + * + * @return {Number} + * @method networkState + */ + + Html5.prototype.networkState = function networkState() { + return this.el_.networkState; + }; + + /** + * Get a value that expresses the current state of the element + * with respect to rendering the current playback position, from + * the codes in the list below + * HAVE_NOTHING (numeric value 0) + * HAVE_METADATA (numeric value 1) + * HAVE_CURRENT_DATA (numeric value 2) + * HAVE_FUTURE_DATA (numeric value 3) + * HAVE_ENOUGH_DATA (numeric value 4) + * + * @return {Number} + * @method readyState + */ + + Html5.prototype.readyState = function readyState() { + return this.el_.readyState; + }; + + /** + * Get width of video + * + * @return {Number} + * @method videoWidth + */ + + Html5.prototype.videoWidth = function videoWidth() { + return this.el_.videoWidth; + }; + + /** + * Get height of video + * + * @return {Number} + * @method videoHeight + */ + + Html5.prototype.videoHeight = function videoHeight() { + return this.el_.videoHeight; + }; + + /** + * Get text tracks + * + * @return {TextTrackList} + * @method textTracks + */ + + Html5.prototype.textTracks = function textTracks() { + return _Tech.prototype.textTracks.call(this); + }; + + /** + * Creates and returns a text track object + * + * @param {String} kind Text track kind (subtitles, captions, descriptions + * chapters and metadata) + * @param {String=} label Label to identify the text track + * @param {String=} language Two letter language abbreviation + * @return {TextTrackObject} + * @method addTextTrack + */ + + Html5.prototype.addTextTrack = function addTextTrack(kind, label, language) { + if (!this['featuresNativeTextTracks']) { + return _Tech.prototype.addTextTrack.call(this, kind, label, language); + } + + return this.el_.addTextTrack(kind, label, language); + }; + + /** + * Creates a remote text track object and returns a html track element + * + * @param {Object} options The object should contain values for + * kind, language, label and src (location of the WebVTT file) + * @return {HTMLTrackElement} + * @method addRemoteTextTrack + */ + + Html5.prototype.addRemoteTextTrack = function addRemoteTextTrack() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + if (!this['featuresNativeTextTracks']) { + return _Tech.prototype.addRemoteTextTrack.call(this, options); + } + + var htmlTrackElement = _globalDocument2['default'].createElement('track'); + + if (options.kind) { + htmlTrackElement.kind = options.kind; + } + if (options.label) { + htmlTrackElement.label = options.label; + } + if (options.language || options.srclang) { + htmlTrackElement.srclang = options.language || options.srclang; + } + if (options['default']) { + htmlTrackElement['default'] = options['default']; + } + if (options.id) { + htmlTrackElement.id = options.id; + } + if (options.src) { + htmlTrackElement.src = options.src; + } + + this.el().appendChild(htmlTrackElement); + + // store HTMLTrackElement and TextTrack to remote list + this.remoteTextTrackEls().addTrackElement_(htmlTrackElement); + this.remoteTextTracks().addTrack_(htmlTrackElement.track); + + return htmlTrackElement; + }; + + /** + * Remove remote text track from TextTrackList object + * + * @param {TextTrackObject} track Texttrack object to remove + * @method removeRemoteTextTrack + */ + + Html5.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) { + if (!this['featuresNativeTextTracks']) { + return _Tech.prototype.removeRemoteTextTrack.call(this, track); + } + + var tracks = undefined, + i = undefined; + + var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); + + // remove HTMLTrackElement and TextTrack from remote list + this.remoteTextTrackEls().removeTrackElement_(trackElement); + this.remoteTextTracks().removeTrack_(track); + + tracks = this.$$('track'); + + i = tracks.length; + while (i--) { + if (track === tracks[i] || track === tracks[i].track) { + this.el().removeChild(tracks[i]); + } + } + }; + + return Html5; +})(_techJs2['default']); + +Html5.TEST_VID = _globalDocument2['default'].createElement('video'); +var track = _globalDocument2['default'].createElement('track'); +track.kind = 'captions'; +track.srclang = 'en'; +track.label = 'English'; +Html5.TEST_VID.appendChild(track); + +/* + * Check if HTML5 video is supported by this browser/device + * + * @return {Boolean} + */ +Html5.isSupported = function () { + // IE9 with no Media Player is a LIAR! (#984) + try { + Html5.TEST_VID['volume'] = 0.5; + } catch (e) { + return false; + } + + return !!Html5.TEST_VID.canPlayType; +}; + +// Add Source Handler pattern functions to this tech +_techJs2['default'].withSourceHandlers(Html5); + +/* + * The default native source handler. + * This simply passes the source to the video element. Nothing fancy. + * + * @param {Object} source The source object + * @param {Html5} tech The instance of the HTML5 tech + */ +Html5.nativeSourceHandler = {}; + +/* + * Check if the video element can play the given videotype + * + * @param {String} type The mimetype to check + * @return {String} 'probably', 'maybe', or '' (empty string) + */ +Html5.nativeSourceHandler.canPlayType = function (type) { + // IE9 on Windows 7 without MediaPlayer throws an error here + // https://github.com/videojs/video.js/issues/519 + try { + return Html5.TEST_VID.canPlayType(type); + } catch (e) { + return ''; + } +}; + +/* + * Check if the video element can handle the source natively + * + * @param {Object} source The source object + * @return {String} 'probably', 'maybe', or '' (empty string) + */ +Html5.nativeSourceHandler.canHandleSource = function (source) { + var match, ext; + + // If a type was provided we should rely on that + if (source.type) { + return Html5.nativeSourceHandler.canPlayType(source.type); + } else if (source.src) { + // If no type, fall back to checking 'video/[EXTENSION]' + ext = Url.getFileExtension(source.src); + + return Html5.nativeSourceHandler.canPlayType('video/' + ext); + } + + return ''; +}; + +/* + * Pass the source to the video element + * Adaptive source handlers will have more complicated workflows before passing + * video data to the video element + * + * @param {Object} source The source object + * @param {Html5} tech The instance of the Html5 tech + */ +Html5.nativeSourceHandler.handleSource = function (source, tech) { + tech.setSrc(source.src); +}; + +/* +* Clean up the source handler when disposing the player or switching sources.. +* (no cleanup is needed when supporting the format natively) +*/ +Html5.nativeSourceHandler.dispose = function () {}; + +// Register the native source handler +Html5.registerSourceHandler(Html5.nativeSourceHandler); + +/* + * Check if the volume can be changed in this browser/device. + * Volume cannot be changed in a lot of mobile devices. + * Specifically, it can't be changed from 1 on iOS. + * + * @return {Boolean} + */ +Html5.canControlVolume = function () { + var volume = Html5.TEST_VID.volume; + Html5.TEST_VID.volume = volume / 2 + 0.1; + return volume !== Html5.TEST_VID.volume; +}; + +/* + * Check if playbackRate is supported in this browser/device. + * + * @return {Number} [description] + */ +Html5.canControlPlaybackRate = function () { + var playbackRate = Html5.TEST_VID.playbackRate; + Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1; + return playbackRate !== Html5.TEST_VID.playbackRate; +}; + +/* + * Check to see if native text tracks are supported by this browser/device + * + * @return {Boolean} + */ +Html5.supportsNativeTextTracks = function () { + var supportsTextTracks; + + // Figure out native text track support + // If mode is a number, we cannot change it because it'll disappear from view. + // Browsers with numeric modes include IE10 and older (<=2013) samsung android models. + // Firefox isn't playing nice either with modifying the mode + // TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862 + supportsTextTracks = !!Html5.TEST_VID.textTracks; + if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) { + supportsTextTracks = typeof Html5.TEST_VID.textTracks[0]['mode'] !== 'number'; + } + if (supportsTextTracks && browser.IS_FIREFOX) { + supportsTextTracks = false; + } + if (supportsTextTracks && !('onremovetrack' in Html5.TEST_VID.textTracks)) { + supportsTextTracks = false; + } + + return supportsTextTracks; +}; + +/** + * An array of events available on the Html5 tech. + * + * @private + * @type {Array} + */ +Html5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'volumechange']; + +/* + * Set the tech's volume control support status + * + * @type {Boolean} + */ +Html5.prototype['featuresVolumeControl'] = Html5.canControlVolume(); + +/* + * Set the tech's playbackRate support status + * + * @type {Boolean} + */ +Html5.prototype['featuresPlaybackRate'] = Html5.canControlPlaybackRate(); + +/* + * Set the tech's status on moving the video element. + * In iOS, if you move a video element in the DOM, it breaks video playback. + * + * @type {Boolean} + */ +Html5.prototype['movingMediaElementInDOM'] = !browser.IS_IOS; + +/* + * Set the the tech's fullscreen resize support status. + * HTML video is able to automatically resize when going to fullscreen. + * (No longer appears to be used. Can probably be removed.) + */ +Html5.prototype['featuresFullscreenResize'] = true; + +/* + * Set the tech's progress event support status + * (this disables the manual progress events of the Tech) + */ +Html5.prototype['featuresProgressEvents'] = true; + +/* + * Sets the tech's status on native text track support + * + * @type {Boolean} + */ +Html5.prototype['featuresNativeTextTracks'] = Html5.supportsNativeTextTracks(); + +// HTML5 Feature detection and Device Fixes --------------------------------- // +var canPlayType = undefined; +var mpegurlRE = /^application\/(?:x-|vnd\.apple\.)mpegurl/i; +var mp4RE = /^video\/mp4/i; + +Html5.patchCanPlayType = function () { + // Android 4.0 and above can play HLS to some extent but it reports being unable to do so + if (browser.ANDROID_VERSION >= 4.0) { + if (!canPlayType) { + canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType; + } + + Html5.TEST_VID.constructor.prototype.canPlayType = function (type) { + if (type && mpegurlRE.test(type)) { + return 'maybe'; + } + return canPlayType.call(this, type); + }; + } + + // Override Android 2.2 and less canPlayType method which is broken + if (browser.IS_OLD_ANDROID) { + if (!canPlayType) { + canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType; + } + + Html5.TEST_VID.constructor.prototype.canPlayType = function (type) { + if (type && mp4RE.test(type)) { + return 'maybe'; + } + return canPlayType.call(this, type); + }; + } +}; + +Html5.unpatchCanPlayType = function () { + var r = Html5.TEST_VID.constructor.prototype.canPlayType; + Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType; + canPlayType = null; + return r; +}; + +// by default, patch the video element +Html5.patchCanPlayType(); + +Html5.disposeMediaElement = function (el) { + if (!el) { + return; + } + + if (el.parentNode) { + el.parentNode.removeChild(el); + } + + // remove any child track or source nodes to prevent their loading + while (el.hasChildNodes()) { + el.removeChild(el.firstChild); + } + + // remove any src reference. not setting `src=''` because that causes a warning + // in firefox + el.removeAttribute('src'); + + // force the media element to update its loading state by calling load() + // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793) + if (typeof el.load === 'function') { + // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473) + (function () { + try { + el.load(); + } catch (e) { + // not supported + } + })(); + } +}; + +Html5.resetMediaElement = function (el) { + if (!el) { + return; + } + + var sources = el.querySelectorAll('source'); + var i = sources.length; + while (i--) { + el.removeChild(sources[i]); + } + + // remove any src reference. + // not setting `src=''` because that throws an error + el.removeAttribute('src'); + + if (typeof el.load === 'function') { + // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473) + (function () { + try { + el.load(); + } catch (e) {} + })(); + } +}; + +_component2['default'].registerComponent('Html5', Html5); +_techJs2['default'].registerTech('Html5', Html5); +exports['default'] = Html5; +module.exports = exports['default']; + +},{"../component":67,"../utils/browser.js":131,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/log.js":139,"../utils/merge-options.js":140,"../utils/url.js":144,"./tech.js":121,"global/document":1,"global/window":2,"object.assign":45}],120:[function(_dereq_,module,exports){ +/** + * @file loader.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _componentJs = _dereq_('../component.js'); + +var _componentJs2 = _interopRequireDefault(_componentJs); + +var _techJs = _dereq_('./tech.js'); + +var _techJs2 = _interopRequireDefault(_techJs); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _utilsToTitleCaseJs = _dereq_('../utils/to-title-case.js'); + +var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); + +/** + * The Media Loader is the component that decides which playback technology to load + * when the player is initialized. + * + * @param {Object} player Main Player + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends Component + * @class MediaLoader + */ + +var MediaLoader = (function (_Component) { + _inherits(MediaLoader, _Component); + + function MediaLoader(player, options, ready) { + _classCallCheck(this, MediaLoader); + + _Component.call(this, player, options, ready); + + // If there are no sources when the player is initialized, + // load the first supported playback technology. + + if (!options.playerOptions['sources'] || options.playerOptions['sources'].length === 0) { + for (var i = 0, j = options.playerOptions['techOrder']; i < j.length; i++) { + var techName = _utilsToTitleCaseJs2['default'](j[i]); + var tech = _techJs2['default'].getTech(techName); + // Support old behavior of techs being registered as components. + // Remove once that deprecated behavior is removed. + if (!techName) { + tech = _componentJs2['default'].getComponent(techName); + } + + // Check if the browser supports this technology + if (tech && tech.isSupported()) { + player.loadTech_(techName); + break; + } + } + } else { + // // Loop through playback technologies (HTML5, Flash) and check for support. + // // Then load the best source. + // // A few assumptions here: + // // All playback technologies respect preload false. + player.src(options.playerOptions['sources']); + } + } + + return MediaLoader; +})(_componentJs2['default']); + +_componentJs2['default'].registerComponent('MediaLoader', MediaLoader); +exports['default'] = MediaLoader; +module.exports = exports['default']; + +},{"../component.js":67,"../utils/to-title-case.js":143,"./tech.js":121,"global/window":2}],121:[function(_dereq_,module,exports){ +/** + * @file tech.js + * Media Technology Controller - Base class for media playback + * technology controllers like Flash and HTML5 + */ + +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _component = _dereq_('../component'); + +var _component2 = _interopRequireDefault(_component); + +var _tracksHtmlTrackElement = _dereq_('../tracks/html-track-element'); + +var _tracksHtmlTrackElement2 = _interopRequireDefault(_tracksHtmlTrackElement); + +var _tracksHtmlTrackElementList = _dereq_('../tracks/html-track-element-list'); + +var _tracksHtmlTrackElementList2 = _interopRequireDefault(_tracksHtmlTrackElementList); + +var _utilsMergeOptionsJs = _dereq_('../utils/merge-options.js'); + +var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs); + +var _tracksTextTrack = _dereq_('../tracks/text-track'); + +var _tracksTextTrack2 = _interopRequireDefault(_tracksTextTrack); + +var _tracksTextTrackList = _dereq_('../tracks/text-track-list'); + +var _tracksTextTrackList2 = _interopRequireDefault(_tracksTextTrackList); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsLogJs = _dereq_('../utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _utilsTimeRangesJs = _dereq_('../utils/time-ranges.js'); + +var _utilsBufferJs = _dereq_('../utils/buffer.js'); + +var _mediaErrorJs = _dereq_('../media-error.js'); + +var _mediaErrorJs2 = _interopRequireDefault(_mediaErrorJs); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +/** + * Base class for media (HTML5 Video, Flash) controllers + * + * @param {Object=} options Options object + * @param {Function=} ready Ready callback function + * @extends Component + * @class Tech + */ + +var Tech = (function (_Component) { + _inherits(Tech, _Component); + + function Tech() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var ready = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1]; + + _classCallCheck(this, Tech); + + // we don't want the tech to report user activity automatically. + // This is done manually in addControlsListeners + options.reportTouchActivity = false; + _Component.call(this, null, options, ready); + + // keep track of whether the current source has played at all to + // implement a very limited played() + this.hasStarted_ = false; + this.on('playing', function () { + this.hasStarted_ = true; + }); + this.on('loadstart', function () { + this.hasStarted_ = false; + }); + + this.textTracks_ = options.textTracks; + + // Manually track progress in cases where the browser/flash player doesn't report it. + if (!this.featuresProgressEvents) { + this.manualProgressOn(); + } + + // Manually track timeupdates in cases where the browser/flash player doesn't report it. + if (!this.featuresTimeupdateEvents) { + this.manualTimeUpdatesOn(); + } + + if (options.nativeCaptions === false || options.nativeTextTracks === false) { + this.featuresNativeTextTracks = false; + } + + if (!this.featuresNativeTextTracks) { + this.on('ready', this.emulateTextTracks); + } + + this.initTextTrackListeners(); + + // Turn on component tap events + this.emitTapEvents(); + } + + /* + * List of associated text tracks + * + * @type {Array} + * @private + */ + + /* Fallbacks for unsupported event types + ================================================================================ */ + // Manually trigger progress events based on changes to the buffered amount + // Many flash players and older HTML5 browsers don't send progress or progress-like events + /** + * Turn on progress events + * + * @method manualProgressOn + */ + + Tech.prototype.manualProgressOn = function manualProgressOn() { + this.on('durationchange', this.onDurationChange); + + this.manualProgress = true; + + // Trigger progress watching when a source begins loading + this.one('ready', this.trackProgress); + }; + + /** + * Turn off progress events + * + * @method manualProgressOff + */ + + Tech.prototype.manualProgressOff = function manualProgressOff() { + this.manualProgress = false; + this.stopTrackingProgress(); + + this.off('durationchange', this.onDurationChange); + }; + + /** + * Track progress + * + * @method trackProgress + */ + + Tech.prototype.trackProgress = function trackProgress() { + this.stopTrackingProgress(); + this.progressInterval = this.setInterval(Fn.bind(this, function () { + // Don't trigger unless buffered amount is greater than last time + + var numBufferedPercent = this.bufferedPercent(); + + if (this.bufferedPercent_ !== numBufferedPercent) { + this.trigger('progress'); + } + + this.bufferedPercent_ = numBufferedPercent; + + if (numBufferedPercent === 1) { + this.stopTrackingProgress(); + } + }), 500); + }; + + /** + * Update duration + * + * @method onDurationChange + */ + + Tech.prototype.onDurationChange = function onDurationChange() { + this.duration_ = this.duration(); + }; + + /** + * Create and get TimeRange object for buffering + * + * @return {TimeRangeObject} + * @method buffered + */ + + Tech.prototype.buffered = function buffered() { + return _utilsTimeRangesJs.createTimeRange(0, 0); + }; + + /** + * Get buffered percent + * + * @return {Number} + * @method bufferedPercent + */ + + Tech.prototype.bufferedPercent = function bufferedPercent() { + return _utilsBufferJs.bufferedPercent(this.buffered(), this.duration_); + }; + + /** + * Stops tracking progress by clearing progress interval + * + * @method stopTrackingProgress + */ + + Tech.prototype.stopTrackingProgress = function stopTrackingProgress() { + this.clearInterval(this.progressInterval); + }; + + /*! Time Tracking -------------------------------------------------------------- */ + /** + * Set event listeners for on play and pause and tracking current time + * + * @method manualTimeUpdatesOn + */ + + Tech.prototype.manualTimeUpdatesOn = function manualTimeUpdatesOn() { + this.manualTimeUpdates = true; + + this.on('play', this.trackCurrentTime); + this.on('pause', this.stopTrackingCurrentTime); + }; + + /** + * Remove event listeners for on play and pause and tracking current time + * + * @method manualTimeUpdatesOff + */ + + Tech.prototype.manualTimeUpdatesOff = function manualTimeUpdatesOff() { + this.manualTimeUpdates = false; + this.stopTrackingCurrentTime(); + this.off('play', this.trackCurrentTime); + this.off('pause', this.stopTrackingCurrentTime); + }; + + /** + * Tracks current time + * + * @method trackCurrentTime + */ + + Tech.prototype.trackCurrentTime = function trackCurrentTime() { + if (this.currentTimeInterval) { + this.stopTrackingCurrentTime(); + } + this.currentTimeInterval = this.setInterval(function () { + this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); + }, 250); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15 + }; + + /** + * Turn off play progress tracking (when paused or dragging) + * + * @method stopTrackingCurrentTime + */ + + Tech.prototype.stopTrackingCurrentTime = function stopTrackingCurrentTime() { + this.clearInterval(this.currentTimeInterval); + + // #1002 - if the video ends right before the next timeupdate would happen, + // the progress bar won't make it all the way to the end + this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); + }; + + /** + * Turn off any manual progress or timeupdate tracking + * + * @method dispose + */ + + Tech.prototype.dispose = function dispose() { + // clear out text tracks because we can't reuse them between techs + var textTracks = this.textTracks(); + + if (textTracks) { + var i = textTracks.length; + while (i--) { + this.removeRemoteTextTrack(textTracks[i]); + } + } + + // Turn off any manual progress or timeupdate tracking + if (this.manualProgress) { + this.manualProgressOff(); + } + + if (this.manualTimeUpdates) { + this.manualTimeUpdatesOff(); + } + + _Component.prototype.dispose.call(this); + }; + + /** + * Reset the tech. Removes all sources and resets readyState. + * + * @method reset + */ + + Tech.prototype.reset = function reset() {}; + + /** + * When invoked without an argument, returns a MediaError object + * representing the current error state of the player or null if + * there is no error. When invoked with an argument, set the current + * error state of the player. + * @param {MediaError=} err Optional an error object + * @return {MediaError} the current error object or null + * @method error + */ + + Tech.prototype.error = function error(err) { + if (err !== undefined) { + if (err instanceof _mediaErrorJs2['default']) { + this.error_ = err; + } else { + this.error_ = new _mediaErrorJs2['default'](err); + } + this.trigger('error'); + } + return this.error_; + }; + + /** + * Return the time ranges that have been played through for the + * current source. This implementation is incomplete. It does not + * track the played time ranges, only whether the source has played + * at all or not. + * @return {TimeRangeObject} a single time range if this video has + * played or an empty set of ranges if not. + * @method played + */ + + Tech.prototype.played = function played() { + if (this.hasStarted_) { + return _utilsTimeRangesJs.createTimeRange(0, 0); + } + return _utilsTimeRangesJs.createTimeRange(); + }; + + /** + * Set current time + * + * @method setCurrentTime + */ + + Tech.prototype.setCurrentTime = function setCurrentTime() { + // improve the accuracy of manual timeupdates + if (this.manualTimeUpdates) { + this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); + } + }; + + /** + * Initialize texttrack listeners + * + * @method initTextTrackListeners + */ + + Tech.prototype.initTextTrackListeners = function initTextTrackListeners() { + var textTrackListChanges = Fn.bind(this, function () { + this.trigger('texttrackchange'); + }); + + var tracks = this.textTracks(); + + if (!tracks) return; + + tracks.addEventListener('removetrack', textTrackListChanges); + tracks.addEventListener('addtrack', textTrackListChanges); + + this.on('dispose', Fn.bind(this, function () { + tracks.removeEventListener('removetrack', textTrackListChanges); + tracks.removeEventListener('addtrack', textTrackListChanges); + })); + }; + + /** + * Emulate texttracks + * + * @method emulateTextTracks + */ + + Tech.prototype.emulateTextTracks = function emulateTextTracks() { + var _this = this; + + var tracks = this.textTracks(); + if (!tracks) { + return; + } + + if (!_globalWindow2['default']['WebVTT'] && this.el().parentNode != null) { + (function () { + var script = _globalDocument2['default'].createElement('script'); + script.src = _this.options_['vtt.js'] || 'https://cdn.rawgit.com/gkatsev/vtt.js/vjs-v0.12.1/dist/vtt.min.js'; + script.onload = function () { + _this.trigger('vttjsloaded'); + }; + script.onerror = function () { + _this.trigger('vttjserror'); + }; + _this.on('dispose', function () { + script.onload = null; + script.onerror = null; + }); + _this.el().parentNode.appendChild(script); + _globalWindow2['default']['WebVTT'] = true; + })(); + } + + var updateDisplay = function updateDisplay() { + return _this.trigger('texttrackchange'); + }; + var textTracksChanges = function textTracksChanges() { + updateDisplay(); + + for (var i = 0; i < tracks.length; i++) { + var track = tracks[i]; + track.removeEventListener('cuechange', updateDisplay); + if (track.mode === 'showing') { + track.addEventListener('cuechange', updateDisplay); + } + } + }; + + textTracksChanges(); + tracks.addEventListener('change', textTracksChanges); + + this.on('dispose', function () { + tracks.removeEventListener('change', textTracksChanges); + }); + }; + + /* + * Provide default methods for text tracks. + * + * Html5 tech overrides these. + */ + + /** + * Get texttracks + * + * @returns {TextTrackList} + * @method textTracks + */ + + Tech.prototype.textTracks = function textTracks() { + this.textTracks_ = this.textTracks_ || new _tracksTextTrackList2['default'](); + return this.textTracks_; + }; + + /** + * Get remote texttracks + * + * @returns {TextTrackList} + * @method remoteTextTracks + */ + + Tech.prototype.remoteTextTracks = function remoteTextTracks() { + this.remoteTextTracks_ = this.remoteTextTracks_ || new _tracksTextTrackList2['default'](); + return this.remoteTextTracks_; + }; + + /** + * Get remote htmltrackelements + * + * @returns {HTMLTrackElementList} + * @method remoteTextTrackEls + */ + + Tech.prototype.remoteTextTrackEls = function remoteTextTrackEls() { + this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new _tracksHtmlTrackElementList2['default'](); + return this.remoteTextTrackEls_; + }; + + /** + * Creates and returns a remote text track object + * + * @param {String} kind Text track kind (subtitles, captions, descriptions + * chapters and metadata) + * @param {String=} label Label to identify the text track + * @param {String=} language Two letter language abbreviation + * @return {TextTrackObject} + * @method addTextTrack + */ + + Tech.prototype.addTextTrack = function addTextTrack(kind, label, language) { + if (!kind) { + throw new Error('TextTrack kind is required but was not provided'); + } + + return createTrackHelper(this, kind, label, language); + }; + + /** + * Creates a remote text track object and returns a emulated html track element + * + * @param {Object} options The object should contain values for + * kind, language, label and src (location of the WebVTT file) + * @return {HTMLTrackElement} + * @method addRemoteTextTrack + */ + + Tech.prototype.addRemoteTextTrack = function addRemoteTextTrack(options) { + var track = _utilsMergeOptionsJs2['default'](options, { + tech: this + }); + + var htmlTrackElement = new _tracksHtmlTrackElement2['default'](track); + + // store HTMLTrackElement and TextTrack to remote list + this.remoteTextTrackEls().addTrackElement_(htmlTrackElement); + this.remoteTextTracks().addTrack_(htmlTrackElement.track); + + // must come after remoteTextTracks() + this.textTracks().addTrack_(htmlTrackElement.track); + + return htmlTrackElement; + }; + + /** + * Remove remote texttrack + * + * @param {TextTrackObject} track Texttrack to remove + * @method removeRemoteTextTrack + */ + + Tech.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) { + this.textTracks().removeTrack_(track); + + var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); + + // remove HTMLTrackElement and TextTrack from remote list + this.remoteTextTrackEls().removeTrackElement_(trackElement); + this.remoteTextTracks().removeTrack_(track); + }; + + /** + * Provide a default setPoster method for techs + * Poster support for techs should be optional, so we don't want techs to + * break if they don't have a way to set a poster. + * + * @method setPoster + */ + + Tech.prototype.setPoster = function setPoster() {}; + + /* + * Check if the tech can support the given type + * + * The base tech does not support any type, but source handlers might + * overwrite this. + * + * @param {String} type The mimetype to check + * @return {String} 'probably', 'maybe', or '' (empty string) + */ + + Tech.prototype.canPlayType = function canPlayType() { + return ''; + }; + + /* + * Return whether the argument is a Tech or not. + * Can be passed either a Class like `Html5` or a instance like `player.tech_` + * + * @param {Object} component An item to check + * @return {Boolean} Whether it is a tech or not + */ + + Tech.isTech = function isTech(component) { + return component.prototype instanceof Tech || component instanceof Tech || component === Tech; + }; + + /** + * Registers a Tech + * + * @param {String} name Name of the Tech to register + * @param {Object} tech The tech to register + * @static + * @method registerComponent + */ + + Tech.registerTech = function registerTech(name, tech) { + if (!Tech.techs_) { + Tech.techs_ = {}; + } + + if (!Tech.isTech(tech)) { + throw new Error('Tech ' + name + ' must be a Tech'); + } + + Tech.techs_[name] = tech; + return tech; + }; + + /** + * Gets a component by name + * + * @param {String} name Name of the component to get + * @return {Component} + * @static + * @method getComponent + */ + + Tech.getTech = function getTech(name) { + if (Tech.techs_ && Tech.techs_[name]) { + return Tech.techs_[name]; + } + + if (_globalWindow2['default'] && _globalWindow2['default'].videojs && _globalWindow2['default'].videojs[name]) { + _utilsLogJs2['default'].warn('The ' + name + ' tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)'); + return _globalWindow2['default'].videojs[name]; + } + }; + + return Tech; +})(_component2['default']); + +Tech.prototype.textTracks_; + +var createTrackHelper = function createTrackHelper(self, kind, label, language) { + var options = arguments.length <= 4 || arguments[4] === undefined ? {} : arguments[4]; + + var tracks = self.textTracks(); + + options.kind = kind; + + if (label) { + options.label = label; + } + if (language) { + options.language = language; + } + options.tech = self; + + var track = new _tracksTextTrack2['default'](options); + tracks.addTrack_(track); + + return track; +}; + +Tech.prototype.featuresVolumeControl = true; + +// Resizing plugins using request fullscreen reloads the plugin +Tech.prototype.featuresFullscreenResize = false; +Tech.prototype.featuresPlaybackRate = false; + +// Optional events that we can manually mimic with timers +// currently not triggered by video-js-swf +Tech.prototype.featuresProgressEvents = false; +Tech.prototype.featuresTimeupdateEvents = false; + +Tech.prototype.featuresNativeTextTracks = false; + +/* + * A functional mixin for techs that want to use the Source Handler pattern. + * + * ##### EXAMPLE: + * + * Tech.withSourceHandlers.call(MyTech); + * + */ +Tech.withSourceHandlers = function (_Tech) { + /* + * Register a source handler + * Source handlers are scripts for handling specific formats. + * The source handler pattern is used for adaptive formats (HLS, DASH) that + * manually load video data and feed it into a Source Buffer (Media Source Extensions) + * @param {Function} handler The source handler + * @param {Boolean} first Register it before any existing handlers + */ + _Tech.registerSourceHandler = function (handler, index) { + var handlers = _Tech.sourceHandlers; + + if (!handlers) { + handlers = _Tech.sourceHandlers = []; + } + + if (index === undefined) { + // add to the end of the list + index = handlers.length; + } + + handlers.splice(index, 0, handler); + }; + + /* + * Check if the tech can support the given type + * @param {String} type The mimetype to check + * @return {String} 'probably', 'maybe', or '' (empty string) + */ + _Tech.canPlayType = function (type) { + var handlers = _Tech.sourceHandlers || []; + var can = undefined; + + for (var i = 0; i < handlers.length; i++) { + can = handlers[i].canPlayType(type); + + if (can) { + return can; + } + } + + return ''; + }; + + /* + * Return the first source handler that supports the source + * TODO: Answer question: should 'probably' be prioritized over 'maybe' + * @param {Object} source The source object + * @returns {Object} The first source handler that supports the source + * @returns {null} Null if no source handler is found + */ + _Tech.selectSourceHandler = function (source) { + var handlers = _Tech.sourceHandlers || []; + var can = undefined; + + for (var i = 0; i < handlers.length; i++) { + can = handlers[i].canHandleSource(source); + + if (can) { + return handlers[i]; + } + } + + return null; + }; + + /* + * Check if the tech can support the given source + * @param {Object} srcObj The source object + * @return {String} 'probably', 'maybe', or '' (empty string) + */ + _Tech.canPlaySource = function (srcObj) { + var sh = _Tech.selectSourceHandler(srcObj); + + if (sh) { + return sh.canHandleSource(srcObj); + } + + return ''; + }; + + /* + * When using a source handler, prefer its implementation of + * any function normally provided by the tech. + */ + var deferrable = ['seekable', 'duration']; + + deferrable.forEach(function (fnName) { + var originalFn = this[fnName]; + + if (typeof originalFn !== 'function') { + return; + } + + this[fnName] = function () { + if (this.sourceHandler_ && this.sourceHandler_[fnName]) { + return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments); + } + return originalFn.apply(this, arguments); + }; + }, _Tech.prototype); + + /* + * Create a function for setting the source using a source object + * and source handlers. + * Should never be called unless a source handler was found. + * @param {Object} source A source object with src and type keys + * @return {Tech} self + */ + _Tech.prototype.setSource = function (source) { + var sh = _Tech.selectSourceHandler(source); + + if (!sh) { + // Fall back to a native source hander when unsupported sources are + // deliberately set + if (_Tech.nativeSourceHandler) { + sh = _Tech.nativeSourceHandler; + } else { + _utilsLogJs2['default'].error('No source hander found for the current source.'); + } + } + + // Dispose any existing source handler + this.disposeSourceHandler(); + this.off('dispose', this.disposeSourceHandler); + + this.currentSource_ = source; + this.sourceHandler_ = sh.handleSource(source, this); + this.on('dispose', this.disposeSourceHandler); + + return this; + }; + + /* + * Clean up any existing source handler + */ + _Tech.prototype.disposeSourceHandler = function () { + if (this.sourceHandler_ && this.sourceHandler_.dispose) { + this.sourceHandler_.dispose(); + } + }; +}; + +_component2['default'].registerComponent('Tech', Tech); +// Old name for Tech +_component2['default'].registerComponent('MediaTechController', Tech); +Tech.registerTech('Tech', Tech); +exports['default'] = Tech; +module.exports = exports['default']; + +},{"../component":67,"../media-error.js":105,"../tracks/html-track-element":123,"../tracks/html-track-element-list":122,"../tracks/text-track":130,"../tracks/text-track-list":128,"../utils/buffer.js":132,"../utils/fn.js":136,"../utils/log.js":139,"../utils/merge-options.js":140,"../utils/time-ranges.js":142,"global/document":1,"global/window":2}],122:[function(_dereq_,module,exports){ +/** + * @file html-track-element-list.js + */ + +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +var _utilsBrowserJs = _dereq_('../utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var HtmlTrackElementList = (function () { + function HtmlTrackElementList() { + var trackElements = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; + + _classCallCheck(this, HtmlTrackElementList); + + var list = this; + + if (browser.IS_IE8) { + list = _globalDocument2['default'].createElement('custom'); + + for (var prop in HtmlTrackElementList.prototype) { + if (prop !== 'constructor') { + list[prop] = HtmlTrackElementList.prototype[prop]; + } + } + } + + list.trackElements_ = []; + + Object.defineProperty(list, 'length', { + get: function get() { + return this.trackElements_.length; + } + }); + + for (var i = 0, _length = trackElements.length; i < _length; i++) { + list.addTrackElement_(trackElements[i]); + } + + if (browser.IS_IE8) { + return list; + } + } + + HtmlTrackElementList.prototype.addTrackElement_ = function addTrackElement_(trackElement) { + this.trackElements_.push(trackElement); + }; + + HtmlTrackElementList.prototype.getTrackElementByTrack_ = function getTrackElementByTrack_(track) { + var trackElement_ = undefined; + + for (var i = 0, _length2 = this.trackElements_.length; i < _length2; i++) { + if (track === this.trackElements_[i].track) { + trackElement_ = this.trackElements_[i]; + + break; + } + } + + return trackElement_; + }; + + HtmlTrackElementList.prototype.removeTrackElement_ = function removeTrackElement_(trackElement) { + for (var i = 0, _length3 = this.trackElements_.length; i < _length3; i++) { + if (trackElement === this.trackElements_[i]) { + this.trackElements_.splice(i, 1); + + break; + } + } + }; + + return HtmlTrackElementList; +})(); + +exports['default'] = HtmlTrackElementList; +module.exports = exports['default']; + +},{"../utils/browser.js":131,"global/document":1}],123:[function(_dereq_,module,exports){ +/** + * @file html-track-element.js + */ + +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _utilsBrowserJs = _dereq_('../utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _eventTarget = _dereq_('../event-target'); + +var _eventTarget2 = _interopRequireDefault(_eventTarget); + +var _tracksTextTrack = _dereq_('../tracks/text-track'); + +var _tracksTextTrack2 = _interopRequireDefault(_tracksTextTrack); + +var NONE = 0; +var LOADING = 1; +var LOADED = 2; +var ERROR = 3; + +/** + * https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement + * + * interface HTMLTrackElement : HTMLElement { + * attribute DOMString kind; + * attribute DOMString src; + * attribute DOMString srclang; + * attribute DOMString label; + * attribute boolean default; + * + * const unsigned short NONE = 0; + * const unsigned short LOADING = 1; + * const unsigned short LOADED = 2; + * const unsigned short ERROR = 3; + * readonly attribute unsigned short readyState; + * + * readonly attribute TextTrack track; + * }; + * + * @param {Object} options TextTrack configuration + * @class HTMLTrackElement + */ + +var HTMLTrackElement = (function (_EventTarget) { + _inherits(HTMLTrackElement, _EventTarget); + + function HTMLTrackElement() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + _classCallCheck(this, HTMLTrackElement); + + _EventTarget.call(this); + + var readyState = undefined, + trackElement = this; + + if (browser.IS_IE8) { + trackElement = _globalDocument2['default'].createElement('custom'); + + for (var prop in HTMLTrackElement.prototype) { + if (prop !== 'constructor') { + trackElement[prop] = HTMLTrackElement.prototype[prop]; + } + } + } + + var track = new _tracksTextTrack2['default'](options); + + trackElement.kind = track.kind; + trackElement.src = track.src; + trackElement.srclang = track.language; + trackElement.label = track.label; + trackElement['default'] = track['default']; + + Object.defineProperty(trackElement, 'readyState', { + get: function get() { + return readyState; + } + }); + + Object.defineProperty(trackElement, 'track', { + get: function get() { + return track; + } + }); + + readyState = NONE; + + track.addEventListener('loadeddata', function () { + readyState = LOADED; + + trackElement.trigger({ + type: 'load', + target: trackElement + }); + }); + + if (browser.IS_IE8) { + return trackElement; + } + } + + return HTMLTrackElement; +})(_eventTarget2['default']); + +HTMLTrackElement.prototype.allowedEvents_ = { + load: 'load' +}; + +HTMLTrackElement.NONE = NONE; +HTMLTrackElement.LOADING = LOADING; +HTMLTrackElement.LOADED = LOADED; +HTMLTrackElement.ERROR = ERROR; + +exports['default'] = HTMLTrackElement; +module.exports = exports['default']; + +},{"../event-target":101,"../tracks/text-track":130,"../utils/browser.js":131,"global/document":1}],124:[function(_dereq_,module,exports){ +/** + * @file text-track-cue-list.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +var _utilsBrowserJs = _dereq_('../utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +/** + * A List of text track cues as defined in: + * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist + * + * interface TextTrackCueList { + * readonly attribute unsigned long length; + * getter TextTrackCue (unsigned long index); + * TextTrackCue? getCueById(DOMString id); + * }; + * + * @param {Array} cues A list of cues to be initialized with + * @class TextTrackCueList + */ + +var TextTrackCueList = (function () { + function TextTrackCueList(cues) { + _classCallCheck(this, TextTrackCueList); + + var list = this; + + if (browser.IS_IE8) { + list = _globalDocument2['default'].createElement('custom'); + + for (var prop in TextTrackCueList.prototype) { + if (prop !== 'constructor') { + list[prop] = TextTrackCueList.prototype[prop]; + } + } + } + + TextTrackCueList.prototype.setCues_.call(list, cues); + + Object.defineProperty(list, 'length', { + get: function get() { + return this.length_; + } + }); + + if (browser.IS_IE8) { + return list; + } + } + + /** + * A setter for cues in this list + * + * @param {Array} cues an array of cues + * @method setCues_ + * @private + */ + + TextTrackCueList.prototype.setCues_ = function setCues_(cues) { + var oldLength = this.length || 0; + var i = 0; + var l = cues.length; + + this.cues_ = cues; + this.length_ = cues.length; + + var defineProp = function defineProp(index) { + if (!('' + index in this)) { + Object.defineProperty(this, '' + index, { + get: function get() { + return this.cues_[index]; + } + }); + } + }; + + if (oldLength < l) { + i = oldLength; + + for (; i < l; i++) { + defineProp.call(this, i); + } + } + }; + + /** + * Get a cue that is currently in the Cue list by id + * + * @param {String} id + * @method getCueById + * @return {Object} a single cue + */ + + TextTrackCueList.prototype.getCueById = function getCueById(id) { + var result = null; + + for (var i = 0, l = this.length; i < l; i++) { + var cue = this[i]; + + if (cue.id === id) { + result = cue; + break; + } + } + + return result; + }; + + return TextTrackCueList; +})(); + +exports['default'] = TextTrackCueList; +module.exports = exports['default']; + +},{"../utils/browser.js":131,"global/document":1}],125:[function(_dereq_,module,exports){ +/** + * @file text-track-display.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _component = _dereq_('../component'); + +var _component2 = _interopRequireDefault(_component); + +var _menuMenuJs = _dereq_('../menu/menu.js'); + +var _menuMenuJs2 = _interopRequireDefault(_menuMenuJs); + +var _menuMenuItemJs = _dereq_('../menu/menu-item.js'); + +var _menuMenuItemJs2 = _interopRequireDefault(_menuMenuItemJs); + +var _menuMenuButtonJs = _dereq_('../menu/menu-button.js'); + +var _menuMenuButtonJs2 = _interopRequireDefault(_menuMenuButtonJs); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var darkGray = '#222'; +var lightGray = '#ccc'; +var fontMap = { + monospace: 'monospace', + sansSerif: 'sans-serif', + serif: 'serif', + monospaceSansSerif: '"Andale Mono", "Lucida Console", monospace', + monospaceSerif: '"Courier New", monospace', + proportionalSansSerif: 'sans-serif', + proportionalSerif: 'serif', + casual: '"Comic Sans MS", Impact, fantasy', + script: '"Monotype Corsiva", cursive', + smallcaps: '"Andale Mono", "Lucida Console", monospace, sans-serif' +}; + +/** + * The component for displaying text track cues + * + * @param {Object} player Main Player + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends Component + * @class TextTrackDisplay + */ + +var TextTrackDisplay = (function (_Component) { + _inherits(TextTrackDisplay, _Component); + + function TextTrackDisplay(player, options, ready) { + _classCallCheck(this, TextTrackDisplay); + + _Component.call(this, player, options, ready); + + player.on('loadstart', Fn.bind(this, this.toggleDisplay)); + player.on('texttrackchange', Fn.bind(this, this.updateDisplay)); + + // This used to be called during player init, but was causing an error + // if a track should show by default and the display hadn't loaded yet. + // Should probably be moved to an external track loader when we support + // tracks that don't need a display. + player.ready(Fn.bind(this, function () { + if (player.tech_ && player.tech_['featuresNativeTextTracks']) { + this.hide(); + return; + } + + player.on('fullscreenchange', Fn.bind(this, this.updateDisplay)); + + var tracks = this.options_.playerOptions['tracks'] || []; + for (var i = 0; i < tracks.length; i++) { + var track = tracks[i]; + this.player_.addRemoteTextTrack(track); + } + })); + } + + /** + * Add cue HTML to display + * + * @param {Number} color Hex number for color, like #f0e + * @param {Number} opacity Value for opacity,0.0 - 1.0 + * @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)' + * @method constructColor + */ + + /** + * Toggle display texttracks + * + * @method toggleDisplay + */ + + TextTrackDisplay.prototype.toggleDisplay = function toggleDisplay() { + if (this.player_.tech_ && this.player_.tech_['featuresNativeTextTracks']) { + this.hide(); + } else { + this.show(); + } + }; + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + TextTrackDisplay.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-text-track-display' + }, { + 'aria-live': 'assertive', + 'aria-atomic': 'true' + }); + }; + + /** + * Clear display texttracks + * + * @method clearDisplay + */ + + TextTrackDisplay.prototype.clearDisplay = function clearDisplay() { + if (typeof _globalWindow2['default']['WebVTT'] === 'function') { + _globalWindow2['default']['WebVTT']['processCues'](_globalWindow2['default'], [], this.el_); + } + }; + + /** + * Update display texttracks + * + * @method updateDisplay + */ + + TextTrackDisplay.prototype.updateDisplay = function updateDisplay() { + var tracks = this.player_.textTracks(); + + this.clearDisplay(); + + if (!tracks) { + return; + } + + // Track display prioritization model: if multiple tracks are 'showing', + // display the first 'subtitles' or 'captions' track which is 'showing', + // otherwise display the first 'descriptions' track which is 'showing' + + var descriptionsTrack = null; + var captionsSubtitlesTrack = null; + + var i = tracks.length; + while (i--) { + var track = tracks[i]; + if (track['mode'] === 'showing') { + if (track['kind'] === 'descriptions') { + descriptionsTrack = track; + } else { + captionsSubtitlesTrack = track; + } + } + } + + if (captionsSubtitlesTrack) { + this.updateForTrack(captionsSubtitlesTrack); + } else if (descriptionsTrack) { + this.updateForTrack(descriptionsTrack); + } + }; + + /** + * Add texttrack to texttrack list + * + * @param {TextTrackObject} track Texttrack object to be added to list + * @method updateForTrack + */ + + TextTrackDisplay.prototype.updateForTrack = function updateForTrack(track) { + if (typeof _globalWindow2['default']['WebVTT'] !== 'function' || !track['activeCues']) { + return; + } + + var overrides = this.player_['textTrackSettings'].getValues(); + + var cues = []; + for (var _i = 0; _i < track['activeCues'].length; _i++) { + cues.push(track['activeCues'][_i]); + } + + _globalWindow2['default']['WebVTT']['processCues'](_globalWindow2['default'], cues, this.el_); + + var i = cues.length; + while (i--) { + var cue = cues[i]; + if (!cue) { + continue; + } + + var cueDiv = cue.displayState; + if (overrides.color) { + cueDiv.firstChild.style.color = overrides.color; + } + if (overrides.textOpacity) { + tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity)); + } + if (overrides.backgroundColor) { + cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor; + } + if (overrides.backgroundOpacity) { + tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity)); + } + if (overrides.windowColor) { + if (overrides.windowOpacity) { + tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity)); + } else { + cueDiv.style.backgroundColor = overrides.windowColor; + } + } + if (overrides.edgeStyle) { + if (overrides.edgeStyle === 'dropshadow') { + cueDiv.firstChild.style.textShadow = '2px 2px 3px ' + darkGray + ', 2px 2px 4px ' + darkGray + ', 2px 2px 5px ' + darkGray; + } else if (overrides.edgeStyle === 'raised') { + cueDiv.firstChild.style.textShadow = '1px 1px ' + darkGray + ', 2px 2px ' + darkGray + ', 3px 3px ' + darkGray; + } else if (overrides.edgeStyle === 'depressed') { + cueDiv.firstChild.style.textShadow = '1px 1px ' + lightGray + ', 0 1px ' + lightGray + ', -1px -1px ' + darkGray + ', 0 -1px ' + darkGray; + } else if (overrides.edgeStyle === 'uniform') { + cueDiv.firstChild.style.textShadow = '0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray; + } + } + if (overrides.fontPercent && overrides.fontPercent !== 1) { + var fontSize = _globalWindow2['default'].parseFloat(cueDiv.style.fontSize); + cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px'; + cueDiv.style.height = 'auto'; + cueDiv.style.top = 'auto'; + cueDiv.style.bottom = '2px'; + } + if (overrides.fontFamily && overrides.fontFamily !== 'default') { + if (overrides.fontFamily === 'small-caps') { + cueDiv.firstChild.style.fontVariant = 'small-caps'; + } else { + cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily]; + } + } + } + }; + + return TextTrackDisplay; +})(_component2['default']); + +function constructColor(color, opacity) { + return 'rgba(' + + // color looks like "#f0e" + parseInt(color[1] + color[1], 16) + ',' + parseInt(color[2] + color[2], 16) + ',' + parseInt(color[3] + color[3], 16) + ',' + opacity + ')'; +} + +/** + * Try to update style + * Some style changes will throw an error, particularly in IE8. Those should be noops. + * + * @param {Element} el The element to be styles + * @param {CSSProperty} style The CSS property to be styled + * @param {CSSStyle} rule The actual style to be applied to the property + * @method tryUpdateStyle + */ +function tryUpdateStyle(el, style, rule) { + // + try { + el.style[style] = rule; + } catch (e) {} +} + +_component2['default'].registerComponent('TextTrackDisplay', TextTrackDisplay); +exports['default'] = TextTrackDisplay; +module.exports = exports['default']; + +},{"../component":67,"../menu/menu-button.js":106,"../menu/menu-item.js":107,"../menu/menu.js":108,"../utils/fn.js":136,"global/document":1,"global/window":2}],126:[function(_dereq_,module,exports){ +/** + * @file text-track-enums.js + */ + +/** + * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode + * + * enum TextTrackMode { "disabled", "hidden", "showing" }; + */ +'use strict'; + +exports.__esModule = true; +var TextTrackMode = { + disabled: 'disabled', + hidden: 'hidden', + showing: 'showing' +}; + +/** + * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind + * + * enum TextTrackKind { + * "subtitles", + * "captions", + * "descriptions", + * "chapters", + * "metadata" + * }; + */ +var TextTrackKind = { + subtitles: 'subtitles', + captions: 'captions', + descriptions: 'descriptions', + chapters: 'chapters', + metadata: 'metadata' +}; + +/* jshint ignore:start */ +// we ignore jshint here because it does not see +// TextTrackMode or TextTrackKind as defined here somehow... +exports.TextTrackMode = TextTrackMode; +exports.TextTrackKind = TextTrackKind; + +/* jshint ignore:end */ + +},{}],127:[function(_dereq_,module,exports){ +/** + * Utilities for capturing text track state and re-creating tracks + * based on a capture. + * + * @file text-track-list-converter.js + */ + +/** + * Examine a single text track and return a JSON-compatible javascript + * object that represents the text track's state. + * @param track {TextTrackObject} the text track to query + * @return {Object} a serializable javascript representation of the + * @private + */ +'use strict'; + +exports.__esModule = true; +var trackToJson_ = function trackToJson_(track) { + var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) { + if (track[prop]) { + acc[prop] = track[prop]; + } + + return acc; + }, { + cues: track.cues && Array.prototype.map.call(track.cues, function (cue) { + return { + startTime: cue.startTime, + endTime: cue.endTime, + text: cue.text, + id: cue.id + }; + }) + }); + + return ret; +}; + +/** + * Examine a tech and return a JSON-compatible javascript array that + * represents the state of all text tracks currently configured. The + * return array is compatible with `jsonToTextTracks`. + * @param tech {tech} the tech object to query + * @return {Array} a serializable javascript representation of the + * @function textTracksToJson + */ +var textTracksToJson = function textTracksToJson(tech) { + + var trackEls = tech.$$('track'); + + var trackObjs = Array.prototype.map.call(trackEls, function (t) { + return t.track; + }); + var tracks = Array.prototype.map.call(trackEls, function (trackEl) { + var json = trackToJson_(trackEl.track); + if (trackEl.src) { + json.src = trackEl.src; + } + return json; + }); + + return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) { + return trackObjs.indexOf(track) === -1; + }).map(trackToJson_)); +}; + +/** + * Creates a set of remote text tracks on a tech based on an array of + * javascript text track representations. + * @param json {Array} an array of text track representation objects, + * like those that would be produced by `textTracksToJson` + * @param tech {tech} the tech to create text tracks on + * @function jsonToTextTracks + */ +var jsonToTextTracks = function jsonToTextTracks(json, tech) { + json.forEach(function (track) { + var addedTrack = tech.addRemoteTextTrack(track).track; + if (!track.src && track.cues) { + track.cues.forEach(function (cue) { + return addedTrack.addCue(cue); + }); + } + }); + + return tech.textTracks(); +}; + +exports['default'] = { textTracksToJson: textTracksToJson, jsonToTextTracks: jsonToTextTracks, trackToJson_: trackToJson_ }; +module.exports = exports['default']; + +},{}],128:[function(_dereq_,module,exports){ +/** + * @file text-track-list.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _eventTarget = _dereq_('../event-target'); + +var _eventTarget2 = _interopRequireDefault(_eventTarget); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsBrowserJs = _dereq_('../utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +/** + * A text track list as defined in: + * https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist + * + * interface TextTrackList : EventTarget { + * readonly attribute unsigned long length; + * getter TextTrack (unsigned long index); + * TextTrack? getTrackById(DOMString id); + * + * attribute EventHandler onchange; + * attribute EventHandler onaddtrack; + * attribute EventHandler onremovetrack; + * }; + * + * @param {Track[]} tracks A list of tracks to initialize the list with + * @extends EventTarget + * @class TextTrackList + */ + +var TextTrackList = (function (_EventTarget) { + _inherits(TextTrackList, _EventTarget); + + function TextTrackList() { + var tracks = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; + + _classCallCheck(this, TextTrackList); + + _EventTarget.call(this); + var list = this; + + if (browser.IS_IE8) { + list = _globalDocument2['default'].createElement('custom'); + + for (var prop in TextTrackList.prototype) { + if (prop !== 'constructor') { + list[prop] = TextTrackList.prototype[prop]; + } + } + } + + list.tracks_ = []; + + Object.defineProperty(list, 'length', { + get: function get() { + return this.tracks_.length; + } + }); + + for (var i = 0; i < tracks.length; i++) { + list.addTrack_(tracks[i]); + } + + if (browser.IS_IE8) { + return list; + } + } + + /** + * change - One or more tracks in the track list have been enabled or disabled. + * addtrack - A track has been added to the track list. + * removetrack - A track has been removed from the track list. + */ + + /** + * Add TextTrack from TextTrackList + * + * @param {TextTrack} track + * @method addTrack_ + * @private + */ + + TextTrackList.prototype.addTrack_ = function addTrack_(track) { + var index = this.tracks_.length; + + if (!('' + index in this)) { + Object.defineProperty(this, index, { + get: function get() { + return this.tracks_[index]; + } + }); + } + + track.addEventListener('modechange', Fn.bind(this, function () { + this.trigger('change'); + })); + + // Do not add duplicate tracks + if (this.tracks_.indexOf(track) === -1) { + this.tracks_.push(track); + this.trigger({ + track: track, + type: 'addtrack' + }); + } + }; + + /** + * Remove TextTrack from TextTrackList + * NOTE: Be mindful of what is passed in as it may be a HTMLTrackElement + * + * @param {TextTrack} rtrack + * @method removeTrack_ + * @private + */ + + TextTrackList.prototype.removeTrack_ = function removeTrack_(rtrack) { + var track = undefined; + + for (var i = 0, l = this.length; i < l; i++) { + if (this[i] === rtrack) { + track = this[i]; + if (track.off) { + track.off(); + } + + this.tracks_.splice(i, 1); + + break; + } + } + + if (!track) { + return; + } + + this.trigger({ + track: track, + type: 'removetrack' + }); + }; + + /** + * Get a TextTrack from TextTrackList by a tracks id + * + * @param {String} id - the id of the track to get + * @method getTrackById + * @return {TextTrack} + * @private + */ + + TextTrackList.prototype.getTrackById = function getTrackById(id) { + var result = null; + + for (var i = 0, l = this.length; i < l; i++) { + var track = this[i]; + + if (track.id === id) { + result = track; + break; + } + } + + return result; + }; + + return TextTrackList; +})(_eventTarget2['default']); + +TextTrackList.prototype.allowedEvents_ = { + change: 'change', + addtrack: 'addtrack', + removetrack: 'removetrack' +}; + +// emulate attribute EventHandler support to allow for feature detection +for (var _event in TextTrackList.prototype.allowedEvents_) { + TextTrackList.prototype['on' + _event] = null; +} + +exports['default'] = TextTrackList; +module.exports = exports['default']; + +},{"../event-target":101,"../utils/browser.js":131,"../utils/fn.js":136,"global/document":1}],129:[function(_dereq_,module,exports){ +/** + * @file text-track-settings.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _component = _dereq_('../component'); + +var _component2 = _interopRequireDefault(_component); + +var _utilsEventsJs = _dereq_('../utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsLogJs = _dereq_('../utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _safeJsonParseTuple = _dereq_('safe-json-parse/tuple'); + +var _safeJsonParseTuple2 = _interopRequireDefault(_safeJsonParseTuple); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +/** + * Manipulate settings of texttracks + * + * @param {Object} player Main Player + * @param {Object=} options Object of option names and values + * @extends Component + * @class TextTrackSettings + */ + +var TextTrackSettings = (function (_Component) { + _inherits(TextTrackSettings, _Component); + + function TextTrackSettings(player, options) { + _classCallCheck(this, TextTrackSettings); + + _Component.call(this, player, options); + this.hide(); + + // Grab `persistTextTrackSettings` from the player options if not passed in child options + if (options.persistTextTrackSettings === undefined) { + this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings; + } + + Events.on(this.$('.vjs-done-button'), 'click', Fn.bind(this, function () { + this.saveSettings(); + this.hide(); + })); + + Events.on(this.$('.vjs-default-button'), 'click', Fn.bind(this, function () { + this.$('.vjs-fg-color > select').selectedIndex = 0; + this.$('.vjs-bg-color > select').selectedIndex = 0; + this.$('.window-color > select').selectedIndex = 0; + this.$('.vjs-text-opacity > select').selectedIndex = 0; + this.$('.vjs-bg-opacity > select').selectedIndex = 0; + this.$('.vjs-window-opacity > select').selectedIndex = 0; + this.$('.vjs-edge-style select').selectedIndex = 0; + this.$('.vjs-font-family select').selectedIndex = 0; + this.$('.vjs-font-percent select').selectedIndex = 2; + this.updateDisplay(); + })); + + Events.on(this.$('.vjs-fg-color > select'), 'change', Fn.bind(this, this.updateDisplay)); + Events.on(this.$('.vjs-bg-color > select'), 'change', Fn.bind(this, this.updateDisplay)); + Events.on(this.$('.window-color > select'), 'change', Fn.bind(this, this.updateDisplay)); + Events.on(this.$('.vjs-text-opacity > select'), 'change', Fn.bind(this, this.updateDisplay)); + Events.on(this.$('.vjs-bg-opacity > select'), 'change', Fn.bind(this, this.updateDisplay)); + Events.on(this.$('.vjs-window-opacity > select'), 'change', Fn.bind(this, this.updateDisplay)); + Events.on(this.$('.vjs-font-percent select'), 'change', Fn.bind(this, this.updateDisplay)); + Events.on(this.$('.vjs-edge-style select'), 'change', Fn.bind(this, this.updateDisplay)); + Events.on(this.$('.vjs-font-family select'), 'change', Fn.bind(this, this.updateDisplay)); + + if (this.options_.persistTextTrackSettings) { + this.restoreSettings(); + } + } + + /** + * Create the component's DOM element + * + * @return {Element} + * @method createEl + */ + + TextTrackSettings.prototype.createEl = function createEl() { + return _Component.prototype.createEl.call(this, 'div', { + className: 'vjs-caption-settings vjs-modal-overlay', + innerHTML: captionOptionsMenuTemplate() + }); + }; + + /** + * Get texttrack settings + * Settings are + * .vjs-edge-style + * .vjs-font-family + * .vjs-fg-color + * .vjs-text-opacity + * .vjs-bg-color + * .vjs-bg-opacity + * .window-color + * .vjs-window-opacity + * + * @return {Object} + * @method getValues + */ + + TextTrackSettings.prototype.getValues = function getValues() { + var textEdge = getSelectedOptionValue(this.$('.vjs-edge-style select')); + var fontFamily = getSelectedOptionValue(this.$('.vjs-font-family select')); + var fgColor = getSelectedOptionValue(this.$('.vjs-fg-color > select')); + var textOpacity = getSelectedOptionValue(this.$('.vjs-text-opacity > select')); + var bgColor = getSelectedOptionValue(this.$('.vjs-bg-color > select')); + var bgOpacity = getSelectedOptionValue(this.$('.vjs-bg-opacity > select')); + var windowColor = getSelectedOptionValue(this.$('.window-color > select')); + var windowOpacity = getSelectedOptionValue(this.$('.vjs-window-opacity > select')); + var fontPercent = _globalWindow2['default']['parseFloat'](getSelectedOptionValue(this.$('.vjs-font-percent > select'))); + + var result = { + 'backgroundOpacity': bgOpacity, + 'textOpacity': textOpacity, + 'windowOpacity': windowOpacity, + 'edgeStyle': textEdge, + 'fontFamily': fontFamily, + 'color': fgColor, + 'backgroundColor': bgColor, + 'windowColor': windowColor, + 'fontPercent': fontPercent + }; + for (var _name in result) { + if (result[_name] === '' || result[_name] === 'none' || _name === 'fontPercent' && result[_name] === 1.00) { + delete result[_name]; + } + } + return result; + }; + + /** + * Set texttrack settings + * Settings are + * .vjs-edge-style + * .vjs-font-family + * .vjs-fg-color + * .vjs-text-opacity + * .vjs-bg-color + * .vjs-bg-opacity + * .window-color + * .vjs-window-opacity + * + * @param {Object} values Object with texttrack setting values + * @method setValues + */ + + TextTrackSettings.prototype.setValues = function setValues(values) { + setSelectedOption(this.$('.vjs-edge-style select'), values.edgeStyle); + setSelectedOption(this.$('.vjs-font-family select'), values.fontFamily); + setSelectedOption(this.$('.vjs-fg-color > select'), values.color); + setSelectedOption(this.$('.vjs-text-opacity > select'), values.textOpacity); + setSelectedOption(this.$('.vjs-bg-color > select'), values.backgroundColor); + setSelectedOption(this.$('.vjs-bg-opacity > select'), values.backgroundOpacity); + setSelectedOption(this.$('.window-color > select'), values.windowColor); + setSelectedOption(this.$('.vjs-window-opacity > select'), values.windowOpacity); + + var fontPercent = values.fontPercent; + + if (fontPercent) { + fontPercent = fontPercent.toFixed(2); + } + + setSelectedOption(this.$('.vjs-font-percent > select'), fontPercent); + }; + + /** + * Restore texttrack settings + * + * @method restoreSettings + */ + + TextTrackSettings.prototype.restoreSettings = function restoreSettings() { + var err = undefined, + values = undefined; + + try { + var _safeParseTuple = _safeJsonParseTuple2['default'](_globalWindow2['default'].localStorage.getItem('vjs-text-track-settings')); + + err = _safeParseTuple[0]; + values = _safeParseTuple[1]; + + if (err) { + _utilsLogJs2['default'].error(err); + } + } catch (e) { + _utilsLogJs2['default'].warn(e); + } + + if (values) { + this.setValues(values); + } + }; + + /** + * Save texttrack settings to local storage + * + * @method saveSettings + */ + + TextTrackSettings.prototype.saveSettings = function saveSettings() { + if (!this.options_.persistTextTrackSettings) { + return; + } + + var values = this.getValues(); + try { + if (Object.getOwnPropertyNames(values).length > 0) { + _globalWindow2['default'].localStorage.setItem('vjs-text-track-settings', JSON.stringify(values)); + } else { + _globalWindow2['default'].localStorage.removeItem('vjs-text-track-settings'); + } + } catch (e) { + _utilsLogJs2['default'].warn(e); + } + }; + + /** + * Update display of texttrack settings + * + * @method updateDisplay + */ + + TextTrackSettings.prototype.updateDisplay = function updateDisplay() { + var ttDisplay = this.player_.getChild('textTrackDisplay'); + if (ttDisplay) { + ttDisplay.updateDisplay(); + } + }; + + return TextTrackSettings; +})(_component2['default']); + +_component2['default'].registerComponent('TextTrackSettings', TextTrackSettings); + +function getSelectedOptionValue(target) { + var selectedOption = undefined; + // not all browsers support selectedOptions, so, fallback to options + if (target.selectedOptions) { + selectedOption = target.selectedOptions[0]; + } else if (target.options) { + selectedOption = target.options[target.options.selectedIndex]; + } + + return selectedOption.value; +} + +function setSelectedOption(target, value) { + if (!value) { + return; + } + + var i = undefined; + for (i = 0; i < target.options.length; i++) { + var option = target.options[i]; + if (option.value === value) { + break; + } + } + + target.selectedIndex = i; +} + +function captionOptionsMenuTemplate() { + var template = '
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    '; + + return template; +} + +exports['default'] = TextTrackSettings; +module.exports = exports['default']; + +},{"../component":67,"../utils/events.js":135,"../utils/fn.js":136,"../utils/log.js":139,"global/window":2,"safe-json-parse/tuple":54}],130:[function(_dereq_,module,exports){ +/** + * @file text-track.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _textTrackCueList = _dereq_('./text-track-cue-list'); + +var _textTrackCueList2 = _interopRequireDefault(_textTrackCueList); + +var _utilsFnJs = _dereq_('../utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _utilsGuidJs = _dereq_('../utils/guid.js'); + +var Guid = _interopRequireWildcard(_utilsGuidJs); + +var _utilsBrowserJs = _dereq_('../utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +var _textTrackEnums = _dereq_('./text-track-enums'); + +var TextTrackEnum = _interopRequireWildcard(_textTrackEnums); + +var _utilsLogJs = _dereq_('../utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _eventTarget = _dereq_('../event-target'); + +var _eventTarget2 = _interopRequireDefault(_eventTarget); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _utilsUrlJs = _dereq_('../utils/url.js'); + +var _xhr = _dereq_('xhr'); + +var _xhr2 = _interopRequireDefault(_xhr); + +/** + * takes a webvtt file contents and parses it into cues + * + * @param {String} srcContent webVTT file contents + * @param {Track} track track to addcues to + */ +var parseCues = function parseCues(srcContent, track) { + var parser = new _globalWindow2['default'].WebVTT.Parser(_globalWindow2['default'], _globalWindow2['default'].vttjs, _globalWindow2['default'].WebVTT.StringDecoder()); + + parser.oncue = function (cue) { + track.addCue(cue); + }; + + parser.onparsingerror = function (error) { + _utilsLogJs2['default'].error(error); + }; + + parser.onflush = function () { + track.trigger({ + type: 'loadeddata', + target: track + }); + }; + + parser.parse(srcContent); + parser.flush(); +}; + +/** + * load a track from a specifed url + * + * @param {String} src url to load track from + * @param {Track} track track to addcues to + */ +var loadTrack = function loadTrack(src, track) { + var opts = { + uri: src + }; + var crossOrigin = _utilsUrlJs.isCrossOrigin(src); + + if (crossOrigin) { + opts.cors = crossOrigin; + } + + _xhr2['default'](opts, Fn.bind(this, function (err, response, responseBody) { + if (err) { + return _utilsLogJs2['default'].error(err, response); + } + + track.loaded_ = true; + + // Make sure that vttjs has loaded, otherwise, wait till it finished loading + // NOTE: this is only used for the alt/video.novtt.js build + if (typeof _globalWindow2['default'].WebVTT !== 'function') { + if (track.tech_) { + (function () { + var loadHandler = function loadHandler() { + return parseCues(responseBody, track); + }; + track.tech_.on('vttjsloaded', loadHandler); + track.tech_.on('vttjserror', function () { + _utilsLogJs2['default'].error('vttjs failed to load, stopping trying to process ' + track.src); + track.tech_.off('vttjsloaded', loadHandler); + }); + })(); + } + } else { + parseCues(responseBody, track); + } + })); +}; + +/** + * A single text track as defined in: + * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack + * + * interface TextTrack : EventTarget { + * readonly attribute TextTrackKind kind; + * readonly attribute DOMString label; + * readonly attribute DOMString language; + * + * readonly attribute DOMString id; + * readonly attribute DOMString inBandMetadataTrackDispatchType; + * + * attribute TextTrackMode mode; + * + * readonly attribute TextTrackCueList? cues; + * readonly attribute TextTrackCueList? activeCues; + * + * void addCue(TextTrackCue cue); + * void removeCue(TextTrackCue cue); + * + * attribute EventHandler oncuechange; + * }; + * + * @param {Object=} options Object of option names and values + * @extends EventTarget + * @class TextTrack + */ + +var TextTrack = (function (_EventTarget) { + _inherits(TextTrack, _EventTarget); + + function TextTrack() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + _classCallCheck(this, TextTrack); + + _EventTarget.call(this); + if (!options.tech) { + throw new Error('A tech was not provided.'); + } + + var tt = this; + + if (browser.IS_IE8) { + tt = _globalDocument2['default'].createElement('custom'); + + for (var prop in TextTrack.prototype) { + if (prop !== 'constructor') { + tt[prop] = TextTrack.prototype[prop]; + } + } + } + + tt.tech_ = options.tech; + + var mode = TextTrackEnum.TextTrackMode[options.mode] || 'disabled'; + var kind = TextTrackEnum.TextTrackKind[options.kind] || 'subtitles'; + var label = options.label || ''; + var language = options.language || options.srclang || ''; + var id = options.id || 'vjs_text_track_' + Guid.newGUID(); + + if (kind === 'metadata' || kind === 'chapters') { + mode = 'hidden'; + } + + tt.cues_ = []; + tt.activeCues_ = []; + + var cues = new _textTrackCueList2['default'](tt.cues_); + var activeCues = new _textTrackCueList2['default'](tt.activeCues_); + var changed = false; + var timeupdateHandler = Fn.bind(tt, function () { + this.activeCues; + if (changed) { + this.trigger('cuechange'); + changed = false; + } + }); + + if (mode !== 'disabled') { + tt.tech_.on('timeupdate', timeupdateHandler); + } + + Object.defineProperty(tt, 'kind', { + get: function get() { + return kind; + }, + set: function set() {} + }); + + Object.defineProperty(tt, 'label', { + get: function get() { + return label; + }, + set: function set() {} + }); + + Object.defineProperty(tt, 'language', { + get: function get() { + return language; + }, + set: function set() {} + }); + + Object.defineProperty(tt, 'id', { + get: function get() { + return id; + }, + set: function set() {} + }); + + Object.defineProperty(tt, 'mode', { + get: function get() { + return mode; + }, + set: function set(newMode) { + if (!TextTrackEnum.TextTrackMode[newMode]) { + return; + } + mode = newMode; + if (mode === 'showing') { + this.tech_.on('timeupdate', timeupdateHandler); + } + this.trigger('modechange'); + } + }); + + Object.defineProperty(tt, 'cues', { + get: function get() { + if (!this.loaded_) { + return null; + } + + return cues; + }, + set: function set() {} + }); + + Object.defineProperty(tt, 'activeCues', { + get: function get() { + if (!this.loaded_) { + return null; + } + + // nothing to do + if (this.cues.length === 0) { + return activeCues; + } + + var ct = this.tech_.currentTime(); + var active = []; + + for (var i = 0, l = this.cues.length; i < l; i++) { + var cue = this.cues[i]; + + if (cue.startTime <= ct && cue.endTime >= ct) { + active.push(cue); + } else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) { + active.push(cue); + } + } + + changed = false; + + if (active.length !== this.activeCues_.length) { + changed = true; + } else { + for (var i = 0; i < active.length; i++) { + if (this.activeCues_.indexOf(active[i]) === -1) { + changed = true; + } + } + } + + this.activeCues_ = active; + activeCues.setCues_(this.activeCues_); + + return activeCues; + }, + set: function set() {} + }); + + if (options.src) { + tt.src = options.src; + loadTrack(options.src, tt); + } else { + tt.loaded_ = true; + } + + if (browser.IS_IE8) { + return tt; + } + } + + /** + * cuechange - One or more cues in the track have become active or stopped being active. + */ + + /** + * add a cue to the internal list of cues + * + * @param {Object} cue the cue to add to our internal list + * @method addCue + */ + + TextTrack.prototype.addCue = function addCue(cue) { + var tracks = this.tech_.textTracks(); + + if (tracks) { + for (var i = 0; i < tracks.length; i++) { + if (tracks[i] !== this) { + tracks[i].removeCue(cue); + } + } + } + + this.cues_.push(cue); + this.cues.setCues_(this.cues_); + }; + + /** + * remvoe a cue from our internal list + * + * @param {Object} removeCue the cue to remove from our internal list + * @method removeCue + */ + + TextTrack.prototype.removeCue = function removeCue(_removeCue) { + var removed = false; + + for (var i = 0, l = this.cues_.length; i < l; i++) { + var cue = this.cues_[i]; + + if (cue === _removeCue) { + this.cues_.splice(i, 1); + removed = true; + } + } + + if (removed) { + this.cues.setCues_(this.cues_); + } + }; + + return TextTrack; +})(_eventTarget2['default']); + +TextTrack.prototype.allowedEvents_ = { + cuechange: 'cuechange' +}; + +exports['default'] = TextTrack; +module.exports = exports['default']; + +},{"../event-target":101,"../utils/browser.js":131,"../utils/fn.js":136,"../utils/guid.js":138,"../utils/log.js":139,"../utils/url.js":144,"./text-track-cue-list":124,"./text-track-enums":126,"global/document":1,"global/window":2,"xhr":56}],131:[function(_dereq_,module,exports){ +/** + * @file browser.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var USER_AGENT = _globalWindow2['default'].navigator.userAgent; +var webkitVersionMap = /AppleWebKit\/([\d.]+)/i.exec(USER_AGENT); +var appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null; + +/* + * Device is an iPhone + * + * @type {Boolean} + * @constant + * @private + */ +var IS_IPAD = /iPad/i.test(USER_AGENT); + +exports.IS_IPAD = IS_IPAD; +// The Facebook app's UIWebView identifies as both an iPhone and iPad, so +// to identify iPhones, we need to exclude iPads. +// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/ +var IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD; +exports.IS_IPHONE = IS_IPHONE; +var IS_IPOD = /iPod/i.test(USER_AGENT); +exports.IS_IPOD = IS_IPOD; +var IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD; + +exports.IS_IOS = IS_IOS; +var IOS_VERSION = (function () { + var match = USER_AGENT.match(/OS (\d+)_/i); + if (match && match[1]) { + return match[1]; + } +})(); + +exports.IOS_VERSION = IOS_VERSION; +var IS_ANDROID = /Android/i.test(USER_AGENT); +exports.IS_ANDROID = IS_ANDROID; +var ANDROID_VERSION = (function () { + // This matches Android Major.Minor.Patch versions + // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned + var match = USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i), + major, + minor; + + if (!match) { + return null; + } + + major = match[1] && parseFloat(match[1]); + minor = match[2] && parseFloat(match[2]); + + if (major && minor) { + return parseFloat(match[1] + '.' + match[2]); + } else if (major) { + return major; + } else { + return null; + } +})(); +exports.ANDROID_VERSION = ANDROID_VERSION; +// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser +var IS_OLD_ANDROID = IS_ANDROID && /webkit/i.test(USER_AGENT) && ANDROID_VERSION < 2.3; +exports.IS_OLD_ANDROID = IS_OLD_ANDROID; +var IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537; + +exports.IS_NATIVE_ANDROID = IS_NATIVE_ANDROID; +var IS_FIREFOX = /Firefox/i.test(USER_AGENT); +exports.IS_FIREFOX = IS_FIREFOX; +var IS_CHROME = /Chrome/i.test(USER_AGENT); +exports.IS_CHROME = IS_CHROME; +var IS_IE8 = /MSIE\s8\.0/.test(USER_AGENT); + +exports.IS_IE8 = IS_IE8; +var TOUCH_ENABLED = !!('ontouchstart' in _globalWindow2['default'] || _globalWindow2['default'].DocumentTouch && _globalDocument2['default'] instanceof _globalWindow2['default'].DocumentTouch); +exports.TOUCH_ENABLED = TOUCH_ENABLED; +var BACKGROUND_SIZE_SUPPORTED = ('backgroundSize' in _globalDocument2['default'].createElement('video').style); +exports.BACKGROUND_SIZE_SUPPORTED = BACKGROUND_SIZE_SUPPORTED; + +},{"global/document":1,"global/window":2}],132:[function(_dereq_,module,exports){ +/** + * @file buffer.js + */ +'use strict'; + +exports.__esModule = true; +exports.bufferedPercent = bufferedPercent; + +var _timeRangesJs = _dereq_('./time-ranges.js'); + +/** + * Compute how much your video has been buffered + * + * @param {Object} Buffered object + * @param {Number} Total duration + * @return {Number} Percent buffered of the total duration + * @private + * @function bufferedPercent + */ + +function bufferedPercent(buffered, duration) { + var bufferedDuration = 0, + start, + end; + + if (!duration) { + return 0; + } + + if (!buffered || !buffered.length) { + buffered = _timeRangesJs.createTimeRange(0, 0); + } + + for (var i = 0; i < buffered.length; i++) { + start = buffered.start(i); + end = buffered.end(i); + + // buffered end can be bigger than duration by a very small fraction + if (end > duration) { + end = duration; + } + + bufferedDuration += end - start; + } + + return bufferedDuration / duration; +} + +},{"./time-ranges.js":142}],133:[function(_dereq_,module,exports){ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _logJs = _dereq_('./log.js'); + +var _logJs2 = _interopRequireDefault(_logJs); + +/** + * Object containing the default behaviors for available handler methods. + * + * @private + * @type {Object} + */ +var defaultBehaviors = { + get: function get(obj, key) { + return obj[key]; + }, + set: function set(obj, key, value) { + obj[key] = value; + return true; + } +}; + +/** + * Expose private objects publicly using a Proxy to log deprecation warnings. + * + * Browsers that do not support Proxy objects will simply return the `target` + * object, so it can be directly exposed. + * + * @param {Object} target The target object. + * @param {Object} messages Messages to display from a Proxy. Only operations + * with an associated message will be proxied. + * @param {String} [messages.get] + * @param {String} [messages.set] + * @return {Object} A Proxy if supported or the `target` argument. + */ + +exports['default'] = function (target) { + var messages = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + if (typeof Proxy === 'function') { + var _ret = (function () { + var handler = {}; + + // Build a handler object based on those keys that have both messages + // and default behaviors. + Object.keys(messages).forEach(function (key) { + if (defaultBehaviors.hasOwnProperty(key)) { + handler[key] = function () { + _logJs2['default'].warn(messages[key]); + return defaultBehaviors[key].apply(this, arguments); + }; + } + }); + + return { + v: new Proxy(target, handler) + }; + })(); + + if (typeof _ret === 'object') return _ret.v; + } + return target; +}; + +module.exports = exports['default']; + +},{"./log.js":139}],134:[function(_dereq_,module,exports){ +/** + * @file dom.js + */ +'use strict'; + +exports.__esModule = true; +exports.getEl = getEl; +exports.createEl = createEl; +exports.textContent = textContent; +exports.insertElFirst = insertElFirst; +exports.getElData = getElData; +exports.hasElData = hasElData; +exports.removeElData = removeElData; +exports.hasElClass = hasElClass; +exports.addElClass = addElClass; +exports.removeElClass = removeElClass; +exports.toggleElClass = toggleElClass; +exports.setElAttributes = setElAttributes; +exports.getElAttributes = getElAttributes; +exports.blockTextSelection = blockTextSelection; +exports.unblockTextSelection = unblockTextSelection; +exports.findElPosition = findElPosition; +exports.getPointerPosition = getPointerPosition; +exports.isEl = isEl; +exports.isTextNode = isTextNode; +exports.emptyEl = emptyEl; +exports.normalizeContent = normalizeContent; +exports.appendContent = appendContent; +exports.insertContent = insertContent; + +var _templateObject = _taggedTemplateLiteralLoose(['Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ', ' to ', '.'], ['Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ', ' to ', '.']); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _taggedTemplateLiteralLoose(strings, raw) { strings.raw = raw; return strings; } + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _guidJs = _dereq_('./guid.js'); + +var Guid = _interopRequireWildcard(_guidJs); + +var _logJs = _dereq_('./log.js'); + +var _logJs2 = _interopRequireDefault(_logJs); + +var _tsml = _dereq_('tsml'); + +var _tsml2 = _interopRequireDefault(_tsml); + +/** + * Detect if a value is a string with any non-whitespace characters. + * + * @param {String} str + * @return {Boolean} + */ +function isNonBlankString(str) { + return typeof str === 'string' && /\S/.test(str); +} + +/** + * Throws an error if the passed string has whitespace. This is used by + * class methods to be relatively consistent with the classList API. + * + * @param {String} str + * @return {Boolean} + */ +function throwIfWhitespace(str) { + if (/\s/.test(str)) { + throw new Error('class has illegal whitespace characters'); + } +} + +/** + * Produce a regular expression for matching a class name. + * + * @param {String} className + * @return {RegExp} + */ +function classRegExp(className) { + return new RegExp('(^|\\s)' + className + '($|\\s)'); +} + +/** + * Creates functions to query the DOM using a given method. + * + * @function createQuerier + * @private + * @param {String} method + * @return {Function} + */ +function createQuerier(method) { + return function (selector, context) { + if (!isNonBlankString(selector)) { + return _globalDocument2['default'][method](null); + } + if (isNonBlankString(context)) { + context = _globalDocument2['default'].querySelector(context); + } + return (isEl(context) ? context : _globalDocument2['default'])[method](selector); + }; +} + +/** + * Shorthand for document.getElementById() + * Also allows for CSS (jQuery) ID syntax. But nothing other than IDs. + * + * @param {String} id Element ID + * @return {Element} Element with supplied ID + * @function getEl + */ + +function getEl(id) { + if (id.indexOf('#') === 0) { + id = id.slice(1); + } + + return _globalDocument2['default'].getElementById(id); +} + +/** + * Creates an element and applies properties. + * + * @param {String} [tagName='div'] Name of tag to be created. + * @param {Object} [properties={}] Element properties to be applied. + * @param {Object} [attributes={}] Element attributes to be applied. + * @return {Element} + * @function createEl + */ + +function createEl() { + var tagName = arguments.length <= 0 || arguments[0] === undefined ? 'div' : arguments[0]; + var properties = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var attributes = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + + var el = _globalDocument2['default'].createElement(tagName); + + Object.getOwnPropertyNames(properties).forEach(function (propName) { + var val = properties[propName]; + + // See #2176 + // We originally were accepting both properties and attributes in the + // same object, but that doesn't work so well. + if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') { + _logJs2['default'].warn(_tsml2['default'](_templateObject, propName, val)); + el.setAttribute(propName, val); + } else { + el[propName] = val; + } + }); + + Object.getOwnPropertyNames(attributes).forEach(function (attrName) { + var val = attributes[attrName]; + el.setAttribute(attrName, attributes[attrName]); + }); + + return el; +} + +/** + * Injects text into an element, replacing any existing contents entirely. + * + * @param {Element} el + * @param {String} text + * @return {Element} + * @function textContent + */ + +function textContent(el, text) { + if (typeof el.textContent === 'undefined') { + el.innerText = text; + } else { + el.textContent = text; + } +} + +/** + * Insert an element as the first child node of another + * + * @param {Element} child Element to insert + * @param {Element} parent Element to insert child into + * @private + * @function insertElFirst + */ + +function insertElFirst(child, parent) { + if (parent.firstChild) { + parent.insertBefore(child, parent.firstChild); + } else { + parent.appendChild(child); + } +} + +/** + * Element Data Store. Allows for binding data to an element without putting it directly on the element. + * Ex. Event listeners are stored here. + * (also from jsninja.com, slightly modified and updated for closure compiler) + * + * @type {Object} + * @private + */ +var elData = {}; + +/* + * Unique attribute name to store an element's guid in + * + * @type {String} + * @constant + * @private + */ +var elIdAttr = 'vdata' + new Date().getTime(); + +/** + * Returns the cache object where data for an element is stored + * + * @param {Element} el Element to store data for. + * @return {Object} + * @function getElData + */ + +function getElData(el) { + var id = el[elIdAttr]; + + if (!id) { + id = el[elIdAttr] = Guid.newGUID(); + } + + if (!elData[id]) { + elData[id] = {}; + } + + return elData[id]; +} + +/** + * Returns whether or not an element has cached data + * + * @param {Element} el A dom element + * @return {Boolean} + * @private + * @function hasElData + */ + +function hasElData(el) { + var id = el[elIdAttr]; + + if (!id) { + return false; + } + + return !!Object.getOwnPropertyNames(elData[id]).length; +} + +/** + * Delete data for the element from the cache and the guid attr from getElementById + * + * @param {Element} el Remove data for an element + * @private + * @function removeElData + */ + +function removeElData(el) { + var id = el[elIdAttr]; + + if (!id) { + return; + } + + // Remove all stored data + delete elData[id]; + + // Remove the elIdAttr property from the DOM node + try { + delete el[elIdAttr]; + } catch (e) { + if (el.removeAttribute) { + el.removeAttribute(elIdAttr); + } else { + // IE doesn't appear to support removeAttribute on the document element + el[elIdAttr] = null; + } + } +} + +/** + * Check if an element has a CSS class + * + * @function hasElClass + * @param {Element} element Element to check + * @param {String} classToCheck Classname to check + */ + +function hasElClass(element, classToCheck) { + if (element.classList) { + return element.classList.contains(classToCheck); + } else { + throwIfWhitespace(classToCheck); + return classRegExp(classToCheck).test(element.className); + } +} + +/** + * Add a CSS class name to an element + * + * @function addElClass + * @param {Element} element Element to add class name to + * @param {String} classToAdd Classname to add + */ + +function addElClass(element, classToAdd) { + if (element.classList) { + element.classList.add(classToAdd); + + // Don't need to `throwIfWhitespace` here because `hasElClass` will do it + // in the case of classList not being supported. + } else if (!hasElClass(element, classToAdd)) { + element.className = (element.className + ' ' + classToAdd).trim(); + } + + return element; +} + +/** + * Remove a CSS class name from an element + * + * @function removeElClass + * @param {Element} element Element to remove from class name + * @param {String} classToRemove Classname to remove + */ + +function removeElClass(element, classToRemove) { + if (element.classList) { + element.classList.remove(classToRemove); + } else { + throwIfWhitespace(classToRemove); + element.className = element.className.split(/\s+/).filter(function (c) { + return c !== classToRemove; + }).join(' '); + } + + return element; +} + +/** + * Adds or removes a CSS class name on an element depending on an optional + * condition or the presence/absence of the class name. + * + * @function toggleElClass + * @param {Element} element + * @param {String} classToToggle + * @param {Boolean|Function} [predicate] + * Can be a function that returns a Boolean. If `true`, the class + * will be added; if `false`, the class will be removed. If not + * given, the class will be added if not present and vice versa. + */ + +function toggleElClass(element, classToToggle, predicate) { + + // This CANNOT use `classList` internally because IE does not support the + // second parameter to the `classList.toggle()` method! Which is fine because + // `classList` will be used by the add/remove functions. + var has = hasElClass(element, classToToggle); + + if (typeof predicate === 'function') { + predicate = predicate(element, classToToggle); + } + + if (typeof predicate !== 'boolean') { + predicate = !has; + } + + // If the necessary class operation matches the current state of the + // element, no action is required. + if (predicate === has) { + return; + } + + if (predicate) { + addElClass(element, classToToggle); + } else { + removeElClass(element, classToToggle); + } + + return element; +} + +/** + * Apply attributes to an HTML element. + * + * @param {Element} el Target element. + * @param {Object=} attributes Element attributes to be applied. + * @private + * @function setElAttributes + */ + +function setElAttributes(el, attributes) { + Object.getOwnPropertyNames(attributes).forEach(function (attrName) { + var attrValue = attributes[attrName]; + + if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) { + el.removeAttribute(attrName); + } else { + el.setAttribute(attrName, attrValue === true ? '' : attrValue); + } + }); +} + +/** + * Get an element's attribute values, as defined on the HTML tag + * Attributes are not the same as properties. They're defined on the tag + * or with setAttribute (which shouldn't be used with HTML) + * This will return true or false for boolean attributes. + * + * @param {Element} tag Element from which to get tag attributes + * @return {Object} + * @private + * @function getElAttributes + */ + +function getElAttributes(tag) { + var obj, knownBooleans, attrs, attrName, attrVal; + + obj = {}; + + // known boolean attributes + // we can check for matching boolean properties, but older browsers + // won't know about HTML5 boolean attributes that we still read from + knownBooleans = ',' + 'autoplay,controls,loop,muted,default' + ','; + + if (tag && tag.attributes && tag.attributes.length > 0) { + attrs = tag.attributes; + + for (var i = attrs.length - 1; i >= 0; i--) { + attrName = attrs[i].name; + attrVal = attrs[i].value; + + // check for known booleans + // the matching element property will return a value for typeof + if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) { + // the value of an included boolean attribute is typically an empty + // string ('') which would equal false if we just check for a false value. + // we also don't want support bad code like autoplay='false' + attrVal = attrVal !== null ? true : false; + } + + obj[attrName] = attrVal; + } + } + + return obj; +} + +/** + * Attempt to block the ability to select text while dragging controls + * + * @return {Boolean} + * @function blockTextSelection + */ + +function blockTextSelection() { + _globalDocument2['default'].body.focus(); + _globalDocument2['default'].onselectstart = function () { + return false; + }; +} + +/** + * Turn off text selection blocking + * + * @return {Boolean} + * @function unblockTextSelection + */ + +function unblockTextSelection() { + _globalDocument2['default'].onselectstart = function () { + return true; + }; +} + +/** + * Offset Left + * getBoundingClientRect technique from + * John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/ + * + * @function findElPosition + * @param {Element} el Element from which to get offset + * @return {Object} + */ + +function findElPosition(el) { + var box = undefined; + + if (el.getBoundingClientRect && el.parentNode) { + box = el.getBoundingClientRect(); + } + + if (!box) { + return { + left: 0, + top: 0 + }; + } + + var docEl = _globalDocument2['default'].documentElement; + var body = _globalDocument2['default'].body; + + var clientLeft = docEl.clientLeft || body.clientLeft || 0; + var scrollLeft = _globalWindow2['default'].pageXOffset || body.scrollLeft; + var left = box.left + scrollLeft - clientLeft; + + var clientTop = docEl.clientTop || body.clientTop || 0; + var scrollTop = _globalWindow2['default'].pageYOffset || body.scrollTop; + var top = box.top + scrollTop - clientTop; + + // Android sometimes returns slightly off decimal values, so need to round + return { + left: Math.round(left), + top: Math.round(top) + }; +} + +/** + * Get pointer position in element + * Returns an object with x and y coordinates. + * The base on the coordinates are the bottom left of the element. + * + * @function getPointerPosition + * @param {Element} el Element on which to get the pointer position on + * @param {Event} event Event object + * @return {Object} This object will have x and y coordinates corresponding to the mouse position + */ + +function getPointerPosition(el, event) { + var position = {}; + var box = findElPosition(el); + var boxW = el.offsetWidth; + var boxH = el.offsetHeight; + + var boxY = box.top; + var boxX = box.left; + var pageY = event.pageY; + var pageX = event.pageX; + + if (event.changedTouches) { + pageX = event.changedTouches[0].pageX; + pageY = event.changedTouches[0].pageY; + } + + position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH)); + position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW)); + + return position; +} + +/** + * Determines, via duck typing, whether or not a value is a DOM element. + * + * @function isEl + * @param {Mixed} value + * @return {Boolean} + */ + +function isEl(value) { + return !!value && typeof value === 'object' && value.nodeType === 1; +} + +/** + * Determines, via duck typing, whether or not a value is a text node. + * + * @param {Mixed} value + * @return {Boolean} + */ + +function isTextNode(value) { + return !!value && typeof value === 'object' && value.nodeType === 3; +} + +/** + * Empties the contents of an element. + * + * @function emptyEl + * @param {Element} el + * @return {Element} + */ + +function emptyEl(el) { + while (el.firstChild) { + el.removeChild(el.firstChild); + } + return el; +} + +/** + * Normalizes content for eventual insertion into the DOM. + * + * This allows a wide range of content definition methods, but protects + * from falling into the trap of simply writing to `innerHTML`, which is + * an XSS concern. + * + * The content for an element can be passed in multiple types and + * combinations, whose behavior is as follows: + * + * - String + * Normalized into a text node. + * + * - Element, TextNode + * Passed through. + * + * - Array + * A one-dimensional array of strings, elements, nodes, or functions (which + * return single strings, elements, or nodes). + * + * - Function + * If the sole argument, is expected to produce a string, element, + * node, or array. + * + * @function normalizeContent + * @param {String|Element|TextNode|Array|Function} content + * @return {Array} + */ + +function normalizeContent(content) { + + // First, invoke content if it is a function. If it produces an array, + // that needs to happen before normalization. + if (typeof content === 'function') { + content = content(); + } + + // Next up, normalize to an array, so one or many items can be normalized, + // filtered, and returned. + return (Array.isArray(content) ? content : [content]).map(function (value) { + + // First, invoke value if it is a function to produce a new value, + // which will be subsequently normalized to a Node of some kind. + if (typeof value === 'function') { + value = value(); + } + + if (isEl(value) || isTextNode(value)) { + return value; + } + + if (typeof value === 'string' && /\S/.test(value)) { + return _globalDocument2['default'].createTextNode(value); + } + }).filter(function (value) { + return value; + }); +} + +/** + * Normalizes and appends content to an element. + * + * @function appendContent + * @param {Element} el + * @param {String|Element|TextNode|Array|Function} content + * See: `normalizeContent` + * @return {Element} + */ + +function appendContent(el, content) { + normalizeContent(content).forEach(function (node) { + return el.appendChild(node); + }); + return el; +} + +/** + * Normalizes and inserts content into an element; this is identical to + * `appendContent()`, except it empties the element first. + * + * @function insertContent + * @param {Element} el + * @param {String|Element|TextNode|Array|Function} content + * See: `normalizeContent` + * @return {Element} + */ + +function insertContent(el, content) { + return appendContent(emptyEl(el), content); +} + +/** + * Finds a single DOM element matching `selector` within the optional + * `context` of another DOM element (defaulting to `document`). + * + * @function $ + * @param {String} selector + * A valid CSS selector, which will be passed to `querySelector`. + * + * @param {Element|String} [context=document] + * A DOM element within which to query. Can also be a selector + * string in which case the first matching element will be used + * as context. If missing (or no element matches selector), falls + * back to `document`. + * + * @return {Element|null} + */ +var $ = createQuerier('querySelector'); + +exports.$ = $; +/** + * Finds a all DOM elements matching `selector` within the optional + * `context` of another DOM element (defaulting to `document`). + * + * @function $$ + * @param {String} selector + * A valid CSS selector, which will be passed to `querySelectorAll`. + * + * @param {Element|String} [context=document] + * A DOM element within which to query. Can also be a selector + * string in which case the first matching element will be used + * as context. If missing (or no element matches selector), falls + * back to `document`. + * + * @return {NodeList} + */ +var $$ = createQuerier('querySelectorAll'); +exports.$$ = $$; + +},{"./guid.js":138,"./log.js":139,"global/document":1,"global/window":2,"tsml":55}],135:[function(_dereq_,module,exports){ +/** + * @file events.js + * + * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/) + * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible) + * This should work very similarly to jQuery's events, however it's based off the book version which isn't as + * robust as jquery's, so there's probably some differences. + */ + +'use strict'; + +exports.__esModule = true; +exports.on = on; +exports.off = off; +exports.trigger = trigger; +exports.one = one; +exports.fixEvent = fixEvent; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +var _domJs = _dereq_('./dom.js'); + +var Dom = _interopRequireWildcard(_domJs); + +var _guidJs = _dereq_('./guid.js'); + +var Guid = _interopRequireWildcard(_guidJs); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +/** + * Add an event listener to element + * It stores the handler function in a separate cache object + * and adds a generic handler to the element's event, + * along with a unique id (guid) to the element. + * + * @param {Element|Object} elem Element or object to bind listeners to + * @param {String|Array} type Type of event to bind to. + * @param {Function} fn Event listener. + * @method on + */ + +function on(elem, type, fn) { + if (Array.isArray(type)) { + return _handleMultipleEvents(on, elem, type, fn); + } + + var data = Dom.getElData(elem); + + // We need a place to store all our handler data + if (!data.handlers) data.handlers = {}; + + if (!data.handlers[type]) data.handlers[type] = []; + + if (!fn.guid) fn.guid = Guid.newGUID(); + + data.handlers[type].push(fn); + + if (!data.dispatcher) { + data.disabled = false; + + data.dispatcher = function (event, hash) { + + if (data.disabled) return; + event = fixEvent(event); + + var handlers = data.handlers[event.type]; + + if (handlers) { + // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off. + var handlersCopy = handlers.slice(0); + + for (var m = 0, n = handlersCopy.length; m < n; m++) { + if (event.isImmediatePropagationStopped()) { + break; + } else { + handlersCopy[m].call(elem, event, hash); + } + } + } + }; + } + + if (data.handlers[type].length === 1) { + if (elem.addEventListener) { + elem.addEventListener(type, data.dispatcher, false); + } else if (elem.attachEvent) { + elem.attachEvent('on' + type, data.dispatcher); + } + } +} + +/** + * Removes event listeners from an element + * + * @param {Element|Object} elem Object to remove listeners from + * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element. + * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type. + * @method off + */ + +function off(elem, type, fn) { + // Don't want to add a cache object through getElData if not needed + if (!Dom.hasElData(elem)) return; + + var data = Dom.getElData(elem); + + // If no events exist, nothing to unbind + if (!data.handlers) { + return; + } + + if (Array.isArray(type)) { + return _handleMultipleEvents(off, elem, type, fn); + } + + // Utility function + var removeType = function removeType(t) { + data.handlers[t] = []; + _cleanUpEvents(elem, t); + }; + + // Are we removing all bound events? + if (!type) { + for (var t in data.handlers) { + removeType(t); + }return; + } + + var handlers = data.handlers[type]; + + // If no handlers exist, nothing to unbind + if (!handlers) return; + + // If no listener was provided, remove all listeners for type + if (!fn) { + removeType(type); + return; + } + + // We're only removing a single handler + if (fn.guid) { + for (var n = 0; n < handlers.length; n++) { + if (handlers[n].guid === fn.guid) { + handlers.splice(n--, 1); + } + } + } + + _cleanUpEvents(elem, type); +} + +/** + * Trigger an event for an element + * + * @param {Element|Object} elem Element to trigger an event on + * @param {Event|Object|String} event A string (the type) or an event object with a type attribute + * @param {Object} [hash] data hash to pass along with the event + * @return {Boolean=} Returned only if default was prevented + * @method trigger + */ + +function trigger(elem, event, hash) { + // Fetches element data and a reference to the parent (for bubbling). + // Don't want to add a data object to cache for every parent, + // so checking hasElData first. + var elemData = Dom.hasElData(elem) ? Dom.getElData(elem) : {}; + var parent = elem.parentNode || elem.ownerDocument; + // type = event.type || event, + // handler; + + // If an event name was passed as a string, creates an event out of it + if (typeof event === 'string') { + event = { type: event, target: elem }; + } + // Normalizes the event properties. + event = fixEvent(event); + + // If the passed element has a dispatcher, executes the established handlers. + if (elemData.dispatcher) { + elemData.dispatcher.call(elem, event, hash); + } + + // Unless explicitly stopped or the event does not bubble (e.g. media events) + // recursively calls this function to bubble the event up the DOM. + if (parent && !event.isPropagationStopped() && event.bubbles === true) { + trigger.call(null, parent, event, hash); + + // If at the top of the DOM, triggers the default action unless disabled. + } else if (!parent && !event.defaultPrevented) { + var targetData = Dom.getElData(event.target); + + // Checks if the target has a default action for this event. + if (event.target[event.type]) { + // Temporarily disables event dispatching on the target as we have already executed the handler. + targetData.disabled = true; + // Executes the default action. + if (typeof event.target[event.type] === 'function') { + event.target[event.type](); + } + // Re-enables event dispatching. + targetData.disabled = false; + } + } + + // Inform the triggerer if the default was prevented by returning false + return !event.defaultPrevented; +} + +/** + * Trigger a listener only once for an event + * + * @param {Element|Object} elem Element or object to + * @param {String|Array} type Name/type of event + * @param {Function} fn Event handler function + * @method one + */ + +function one(elem, type, fn) { + if (Array.isArray(type)) { + return _handleMultipleEvents(one, elem, type, fn); + } + var func = function func() { + off(elem, type, func); + fn.apply(this, arguments); + }; + // copy the guid to the new function so it can removed using the original function's ID + func.guid = fn.guid = fn.guid || Guid.newGUID(); + on(elem, type, func); +} + +/** + * Fix a native event to have standard property values + * + * @param {Object} event Event object to fix + * @return {Object} + * @private + * @method fixEvent + */ + +function fixEvent(event) { + + function returnTrue() { + return true; + } + function returnFalse() { + return false; + } + + // Test if fixing up is needed + // Used to check if !event.stopPropagation instead of isPropagationStopped + // But native events return true for stopPropagation, but don't have + // other expected methods like isPropagationStopped. Seems to be a problem + // with the Javascript Ninja code. So we're just overriding all events now. + if (!event || !event.isPropagationStopped) { + var old = event || _globalWindow2['default'].event; + + event = {}; + // Clone the old object so that we can modify the values event = {}; + // IE8 Doesn't like when you mess with native event properties + // Firefox returns false for event.hasOwnProperty('type') and other props + // which makes copying more difficult. + // TODO: Probably best to create a whitelist of event props + for (var key in old) { + // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y + // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation + // and webkitMovementX/Y + if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' && key !== 'webkitMovementX' && key !== 'webkitMovementY') { + // Chrome 32+ warns if you try to copy deprecated returnValue, but + // we still want to if preventDefault isn't supported (IE8). + if (!(key === 'returnValue' && old.preventDefault)) { + event[key] = old[key]; + } + } + } + + // The event occurred on this element + if (!event.target) { + event.target = event.srcElement || _globalDocument2['default']; + } + + // Handle which other element the event is related to + if (!event.relatedTarget) { + event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; + } + + // Stop the default browser action + event.preventDefault = function () { + if (old.preventDefault) { + old.preventDefault(); + } + event.returnValue = false; + old.returnValue = false; + event.defaultPrevented = true; + }; + + event.defaultPrevented = false; + + // Stop the event from bubbling + event.stopPropagation = function () { + if (old.stopPropagation) { + old.stopPropagation(); + } + event.cancelBubble = true; + old.cancelBubble = true; + event.isPropagationStopped = returnTrue; + }; + + event.isPropagationStopped = returnFalse; + + // Stop the event from bubbling and executing other handlers + event.stopImmediatePropagation = function () { + if (old.stopImmediatePropagation) { + old.stopImmediatePropagation(); + } + event.isImmediatePropagationStopped = returnTrue; + event.stopPropagation(); + }; + + event.isImmediatePropagationStopped = returnFalse; + + // Handle mouse position + if (event.clientX != null) { + var doc = _globalDocument2['default'].documentElement, + body = _globalDocument2['default'].body; + + event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); + event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); + } + + // Handle key presses + event.which = event.charCode || event.keyCode; + + // Fix button for mouse clicks: + // 0 == left; 1 == middle; 2 == right + if (event.button != null) { + event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0; + } + } + + // Returns fixed-up instance + return event; +} + +/** + * Clean up the listener cache and dispatchers +* + * @param {Element|Object} elem Element to clean up + * @param {String} type Type of event to clean up + * @private + * @method _cleanUpEvents + */ +function _cleanUpEvents(elem, type) { + var data = Dom.getElData(elem); + + // Remove the events of a particular type if there are none left + if (data.handlers[type].length === 0) { + delete data.handlers[type]; + // data.handlers[type] = null; + // Setting to null was causing an error with data.handlers + + // Remove the meta-handler from the element + if (elem.removeEventListener) { + elem.removeEventListener(type, data.dispatcher, false); + } else if (elem.detachEvent) { + elem.detachEvent('on' + type, data.dispatcher); + } + } + + // Remove the events object if there are no types left + if (Object.getOwnPropertyNames(data.handlers).length <= 0) { + delete data.handlers; + delete data.dispatcher; + delete data.disabled; + } + + // Finally remove the element data if there is no data left + if (Object.getOwnPropertyNames(data).length === 0) { + Dom.removeElData(elem); + } +} + +/** + * Loops through an array of event types and calls the requested method for each type. + * + * @param {Function} fn The event method we want to use. + * @param {Element|Object} elem Element or object to bind listeners to + * @param {String} type Type of event to bind to. + * @param {Function} callback Event listener. + * @private + * @function _handleMultipleEvents + */ +function _handleMultipleEvents(fn, elem, types, callback) { + types.forEach(function (type) { + //Call the event method for each one of the types + fn(elem, type, callback); + }); +} + +},{"./dom.js":134,"./guid.js":138,"global/document":1,"global/window":2}],136:[function(_dereq_,module,exports){ +/** + * @file fn.js + */ +'use strict'; + +exports.__esModule = true; + +var _guidJs = _dereq_('./guid.js'); + +/** + * Bind (a.k.a proxy or Context). A simple method for changing the context of a function + * It also stores a unique id on the function so it can be easily removed from events + * + * @param {*} context The object to bind as scope + * @param {Function} fn The function to be bound to a scope + * @param {Number=} uid An optional unique ID for the function to be set + * @return {Function} + * @private + * @method bind + */ +var bind = function bind(context, fn, uid) { + // Make sure the function has a unique ID + if (!fn.guid) { + fn.guid = _guidJs.newGUID(); + } + + // Create the new function that changes the context + var ret = function ret() { + return fn.apply(context, arguments); + }; + + // Allow for the ability to individualize this function + // Needed in the case where multiple objects might share the same prototype + // IF both items add an event listener with the same function, then you try to remove just one + // it will remove both because they both have the same guid. + // when using this, you need to use the bind method when you remove the listener as well. + // currently used in text tracks + ret.guid = uid ? uid + '_' + fn.guid : fn.guid; + + return ret; +}; +exports.bind = bind; + +},{"./guid.js":138}],137:[function(_dereq_,module,exports){ +/** + * @file format-time.js + * + * Format seconds as a time string, H:MM:SS or M:SS + * Supplying a guide (in seconds) will force a number of leading zeros + * to cover the length of the guide + * + * @param {Number} seconds Number of seconds to be turned into a string + * @param {Number} guide Number (in seconds) to model the string after + * @return {String} Time formatted as H:MM:SS or M:SS + * @private + * @function formatTime + */ +'use strict'; + +exports.__esModule = true; +function formatTime(seconds) { + var guide = arguments.length <= 1 || arguments[1] === undefined ? seconds : arguments[1]; + return (function () { + seconds = seconds < 0 ? 0 : seconds; + var s = Math.floor(seconds % 60); + var m = Math.floor(seconds / 60 % 60); + var h = Math.floor(seconds / 3600); + var gm = Math.floor(guide / 60 % 60); + var gh = Math.floor(guide / 3600); + + // handle invalid times + if (isNaN(seconds) || seconds === Infinity) { + // '-' is false for all relational operators (e.g. <, >=) so this setting + // will add the minimum number of fields specified by the guide + h = m = s = '-'; + } + + // Check if we need to show hours + h = h > 0 || gh > 0 ? h + ':' : ''; + + // If hours are showing, we may need to add a leading zero. + // Always show at least one digit of minutes. + m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':'; + + // Check if leading zero is need for seconds + s = s < 10 ? '0' + s : s; + + return h + m + s; + })(); +} + +exports['default'] = formatTime; +module.exports = exports['default']; + +},{}],138:[function(_dereq_,module,exports){ +/** + * @file guid.js + * + * Unique ID for an element or function + * @type {Number} + * @private + */ +"use strict"; + +exports.__esModule = true; +exports.newGUID = newGUID; +var _guid = 1; + +/** + * Get the next unique ID + * + * @return {String} + * @function newGUID + */ + +function newGUID() { + return _guid++; +} + +},{}],139:[function(_dereq_,module,exports){ +/** + * @file log.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +/** + * Log plain debug messages + */ +var log = function log() { + _logType(null, arguments); +}; + +/** + * Keep a history of log messages + * @type {Array} + */ +log.history = []; + +/** + * Log error messages + */ +log.error = function () { + _logType('error', arguments); +}; + +/** + * Log warning messages + */ +log.warn = function () { + _logType('warn', arguments); +}; + +/** + * Log messages to the console and history based on the type of message + * + * @param {String} type The type of message, or `null` for `log` + * @param {Object} args The args to be passed to the log + * @private + * @method _logType + */ +function _logType(type, args) { + // convert args to an array to get array functions + var argsArray = Array.prototype.slice.call(args); + // if there's no console then don't try to output messages + // they will still be stored in log.history + // Was setting these once outside of this function, but containing them + // in the function makes it easier to test cases where console doesn't exist + var noop = function noop() {}; + + var console = _globalWindow2['default']['console'] || { + 'log': noop, + 'warn': noop, + 'error': noop + }; + + if (type) { + // add the type to the front of the message + argsArray.unshift(type.toUpperCase() + ':'); + } else { + // default to log with no prefix + type = 'log'; + } + + // add to history + log.history.push(argsArray); + + // add console prefix after adding to history + argsArray.unshift('VIDEOJS:'); + + // call appropriate log function + if (console[type].apply) { + console[type].apply(console, argsArray); + } else { + // ie8 doesn't allow error.apply, but it will just join() the array anyway + console[type](argsArray.join(' ')); + } +} + +exports['default'] = log; +module.exports = exports['default']; + +},{"global/window":2}],140:[function(_dereq_,module,exports){ +/** + * @file merge-options.js + */ +'use strict'; + +exports.__esModule = true; +exports['default'] = mergeOptions; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _lodashCompatObjectMerge = _dereq_('lodash-compat/object/merge'); + +var _lodashCompatObjectMerge2 = _interopRequireDefault(_lodashCompatObjectMerge); + +function isPlain(obj) { + return !!obj && typeof obj === 'object' && obj.toString() === '[object Object]' && obj.constructor === Object; +} + +/** + * Merge customizer. video.js simply overwrites non-simple objects + * (like arrays) instead of attempting to overlay them. + * @see https://lodash.com/docs#merge + */ +var customizer = function customizer(destination, source) { + // If we're not working with a plain object, copy the value as is + // If source is an array, for instance, it will replace destination + if (!isPlain(source)) { + return source; + } + + // If the new value is a plain object but the first object value is not + // we need to create a new object for the first object to merge with. + // This makes it consistent with how merge() works by default + // and also protects from later changes the to first object affecting + // the second object's values. + if (!isPlain(destination)) { + return mergeOptions(source); + } +}; + +/** + * Merge one or more options objects, recursively merging **only** + * plain object properties. Previously `deepMerge`. + * + * @param {...Object} source One or more objects to merge + * @returns {Object} a new object that is the union of all + * provided objects + * @function mergeOptions + */ + +function mergeOptions() { + // contruct the call dynamically to handle the variable number of + // objects to merge + var args = Array.prototype.slice.call(arguments); + + // unshift an empty object into the front of the call as the target + // of the merge + args.unshift({}); + + // customize conflict resolution to match our historical merge behavior + args.push(customizer); + + _lodashCompatObjectMerge2['default'].apply(null, args); + + // return the mutated result object + return args[0]; +} + +module.exports = exports['default']; + +},{"lodash-compat/object/merge":40}],141:[function(_dereq_,module,exports){ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var createStyleElement = function createStyleElement(className) { + var style = _globalDocument2['default'].createElement('style'); + style.className = className; + + return style; +}; + +exports.createStyleElement = createStyleElement; +var setTextContent = function setTextContent(el, content) { + if (el.styleSheet) { + el.styleSheet.cssText = content; + } else { + el.textContent = content; + } +}; +exports.setTextContent = setTextContent; + +},{"global/document":1}],142:[function(_dereq_,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.createTimeRanges = createTimeRanges; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _logJs = _dereq_('./log.js'); + +var _logJs2 = _interopRequireDefault(_logJs); + +/** + * @file time-ranges.js + * + * Should create a fake TimeRange object + * Mimics an HTML5 time range instance, which has functions that + * return the start and end times for a range + * TimeRanges are returned by the buffered() method + * + * @param {(Number|Array)} Start of a single range or an array of ranges + * @param {Number} End of a single range + * @private + * @method createTimeRanges + */ + +function createTimeRanges(start, end) { + if (Array.isArray(start)) { + return createTimeRangesObj(start); + } else if (start === undefined || end === undefined) { + return createTimeRangesObj(); + } + return createTimeRangesObj([[start, end]]); +} + +exports.createTimeRange = createTimeRanges; + +function createTimeRangesObj(ranges) { + if (ranges === undefined || ranges.length === 0) { + return { + length: 0, + start: function start() { + throw new Error('This TimeRanges object is empty'); + }, + end: function end() { + throw new Error('This TimeRanges object is empty'); + } + }; + } + return { + length: ranges.length, + start: getRange.bind(null, 'start', 0, ranges), + end: getRange.bind(null, 'end', 1, ranges) + }; +} + +function getRange(fnName, valueIndex, ranges, rangeIndex) { + if (rangeIndex === undefined) { + _logJs2['default'].warn('DEPRECATED: Function \'' + fnName + '\' on \'TimeRanges\' called without an index argument.'); + rangeIndex = 0; + } + rangeCheck(fnName, rangeIndex, ranges.length - 1); + return ranges[rangeIndex][valueIndex]; +} + +function rangeCheck(fnName, index, maxIndex) { + if (index < 0 || index > maxIndex) { + throw new Error('Failed to execute \'' + fnName + '\' on \'TimeRanges\': The index provided (' + index + ') is greater than or equal to the maximum bound (' + maxIndex + ').'); + } +} + +},{"./log.js":139}],143:[function(_dereq_,module,exports){ +/** + * @file to-title-case.js + * + * Uppercase the first letter of a string + * + * @param {String} string String to be uppercased + * @return {String} + * @private + * @method toTitleCase + */ +"use strict"; + +exports.__esModule = true; +function toTitleCase(string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} + +exports["default"] = toTitleCase; +module.exports = exports["default"]; + +},{}],144:[function(_dereq_,module,exports){ +/** + * @file url.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +/** + * Resolve and parse the elements of a URL + * + * @param {String} url The url to parse + * @return {Object} An object of url details + * @method parseUrl + */ +var parseUrl = function parseUrl(url) { + var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; + + // add the url to an anchor and let the browser parse the URL + var a = _globalDocument2['default'].createElement('a'); + a.href = url; + + // IE8 (and 9?) Fix + // ie8 doesn't parse the URL correctly until the anchor is actually + // added to the body, and an innerHTML is needed to trigger the parsing + var addToBody = a.host === '' && a.protocol !== 'file:'; + var div = undefined; + if (addToBody) { + div = _globalDocument2['default'].createElement('div'); + div.innerHTML = ''; + a = div.firstChild; + // prevent the div from affecting layout + div.setAttribute('style', 'display:none; position:absolute;'); + _globalDocument2['default'].body.appendChild(div); + } + + // Copy the specific URL properties to a new object + // This is also needed for IE8 because the anchor loses its + // properties when it's removed from the dom + var details = {}; + for (var i = 0; i < props.length; i++) { + details[props[i]] = a[props[i]]; + } + + // IE9 adds the port to the host property unlike everyone else. If + // a port identifier is added for standard ports, strip it. + if (details.protocol === 'http:') { + details.host = details.host.replace(/:80$/, ''); + } + if (details.protocol === 'https:') { + details.host = details.host.replace(/:443$/, ''); + } + + if (addToBody) { + _globalDocument2['default'].body.removeChild(div); + } + + return details; +}; + +exports.parseUrl = parseUrl; +/** + * Get absolute version of relative URL. Used to tell flash correct URL. + * http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue + * + * @param {String} url URL to make absolute + * @return {String} Absolute URL + * @private + * @method getAbsoluteURL + */ +var getAbsoluteURL = function getAbsoluteURL(url) { + // Check if absolute URL + if (!url.match(/^https?:\/\//)) { + // Convert to absolute URL. Flash hosted off-site needs an absolute URL. + var div = _globalDocument2['default'].createElement('div'); + div.innerHTML = 'x'; + url = div.firstChild.href; + } + + return url; +}; + +exports.getAbsoluteURL = getAbsoluteURL; +/** + * Returns the extension of the passed file name. It will return an empty string if you pass an invalid path + * + * @param {String} path The fileName path like '/path/to/file.mp4' + * @returns {String} The extension in lower case or an empty string if no extension could be found. + * @method getFileExtension + */ +var getFileExtension = function getFileExtension(path) { + if (typeof path === 'string') { + var splitPathRe = /^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i; + var pathParts = splitPathRe.exec(path); + + if (pathParts) { + return pathParts.pop().toLowerCase(); + } + } + + return ''; +}; + +exports.getFileExtension = getFileExtension; +/** + * Returns whether the url passed is a cross domain request or not. + * + * @param {String} url The url to check + * @return {Boolean} Whether it is a cross domain request or not + * @method isCrossOrigin + */ +var isCrossOrigin = function isCrossOrigin(url) { + var winLoc = _globalWindow2['default'].location; + var urlInfo = parseUrl(url); + + // IE8 protocol relative urls will return ':' for protocol + var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol; + + // Check if url is for another domain/origin + // IE8 doesn't know location.origin, so we won't rely on it here + var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host; + + return crossOrigin; +}; +exports.isCrossOrigin = isCrossOrigin; + +},{"global/document":1,"global/window":2}],145:[function(_dereq_,module,exports){ +/** + * @file video.js + */ +'use strict'; + +exports.__esModule = true; + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _globalWindow = _dereq_('global/window'); + +var _globalWindow2 = _interopRequireDefault(_globalWindow); + +var _globalDocument = _dereq_('global/document'); + +var _globalDocument2 = _interopRequireDefault(_globalDocument); + +var _setup = _dereq_('./setup'); + +var setup = _interopRequireWildcard(_setup); + +var _utilsStylesheetJs = _dereq_('./utils/stylesheet.js'); + +var stylesheet = _interopRequireWildcard(_utilsStylesheetJs); + +var _component = _dereq_('./component'); + +var _component2 = _interopRequireDefault(_component); + +var _eventTarget = _dereq_('./event-target'); + +var _eventTarget2 = _interopRequireDefault(_eventTarget); + +var _utilsEventsJs = _dereq_('./utils/events.js'); + +var Events = _interopRequireWildcard(_utilsEventsJs); + +var _player = _dereq_('./player'); + +var _player2 = _interopRequireDefault(_player); + +var _pluginsJs = _dereq_('./plugins.js'); + +var _pluginsJs2 = _interopRequireDefault(_pluginsJs); + +var _srcJsUtilsMergeOptionsJs = _dereq_('../../src/js/utils/merge-options.js'); + +var _srcJsUtilsMergeOptionsJs2 = _interopRequireDefault(_srcJsUtilsMergeOptionsJs); + +var _utilsFnJs = _dereq_('./utils/fn.js'); + +var Fn = _interopRequireWildcard(_utilsFnJs); + +var _tracksTextTrackJs = _dereq_('./tracks/text-track.js'); + +var _tracksTextTrackJs2 = _interopRequireDefault(_tracksTextTrackJs); + +var _objectAssign = _dereq_('object.assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +var _utilsTimeRangesJs = _dereq_('./utils/time-ranges.js'); + +var _utilsFormatTimeJs = _dereq_('./utils/format-time.js'); + +var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); + +var _utilsLogJs = _dereq_('./utils/log.js'); + +var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); + +var _utilsDomJs = _dereq_('./utils/dom.js'); + +var Dom = _interopRequireWildcard(_utilsDomJs); + +var _utilsBrowserJs = _dereq_('./utils/browser.js'); + +var browser = _interopRequireWildcard(_utilsBrowserJs); + +var _utilsUrlJs = _dereq_('./utils/url.js'); + +var Url = _interopRequireWildcard(_utilsUrlJs); + +var _extendJs = _dereq_('./extend.js'); + +var _extendJs2 = _interopRequireDefault(_extendJs); + +var _lodashCompatObjectMerge = _dereq_('lodash-compat/object/merge'); + +var _lodashCompatObjectMerge2 = _interopRequireDefault(_lodashCompatObjectMerge); + +var _utilsCreateDeprecationProxyJs = _dereq_('./utils/create-deprecation-proxy.js'); + +var _utilsCreateDeprecationProxyJs2 = _interopRequireDefault(_utilsCreateDeprecationProxyJs); + +var _xhr = _dereq_('xhr'); + +var _xhr2 = _interopRequireDefault(_xhr); + +// Include the built-in techs + +var _techTechJs = _dereq_('./tech/tech.js'); + +var _techTechJs2 = _interopRequireDefault(_techTechJs); + +var _techHtml5Js = _dereq_('./tech/html5.js'); + +var _techHtml5Js2 = _interopRequireDefault(_techHtml5Js); + +var _techFlashJs = _dereq_('./tech/flash.js'); + +var _techFlashJs2 = _interopRequireDefault(_techFlashJs); + +// HTML5 Element Shim for IE8 +if (typeof HTMLVideoElement === 'undefined') { + _globalDocument2['default'].createElement('video'); + _globalDocument2['default'].createElement('audio'); + _globalDocument2['default'].createElement('track'); +} + +/** + * Doubles as the main function for users to create a player instance and also + * the main library object. + * The `videojs` function can be used to initialize or retrieve a player. + * ```js + * var myPlayer = videojs('my_video_id'); + * ``` + * + * @param {String|Element} id Video element or video element ID + * @param {Object=} options Optional options object for config/settings + * @param {Function=} ready Optional ready callback + * @return {Player} A player instance + * @mixes videojs + * @method videojs + */ +var videojs = function videojs(id, options, ready) { + var tag = undefined; // Element of ID + + // Allow for element or ID to be passed in + // String ID + if (typeof id === 'string') { + + // Adjust for jQuery ID syntax + if (id.indexOf('#') === 0) { + id = id.slice(1); + } + + // If a player instance has already been created for this ID return it. + if (videojs.getPlayers()[id]) { + + // If options or ready funtion are passed, warn + if (options) { + _utilsLogJs2['default'].warn('Player "' + id + '" is already initialised. Options will not be applied.'); + } + + if (ready) { + videojs.getPlayers()[id].ready(ready); + } + + return videojs.getPlayers()[id]; + + // Otherwise get element for ID + } else { + tag = Dom.getEl(id); + } + + // ID is a media element + } else { + tag = id; + } + + // Check for a useable element + if (!tag || !tag.nodeName) { + // re: nodeName, could be a box div also + throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns + } + + // Element may have a player attr referring to an already created player instance. + // If not, set up a new player and return the instance. + return tag['player'] || _player2['default'].players[tag.playerId] || new _player2['default'](tag, options, ready); +}; + +// Add default styles +if (_globalWindow2['default'].VIDEOJS_NO_DYNAMIC_STYLE !== true) { + var style = Dom.$('.vjs-styles-defaults'); + + if (!style) { + style = stylesheet.createStyleElement('vjs-styles-defaults'); + var head = Dom.$('head'); + head.insertBefore(style, head.firstChild); + stylesheet.setTextContent(style, '\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n '); + } +} + +// Run Auto-load players +// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version) +setup.autoSetupTimeout(1, videojs); + +/* + * Current software version (semver) + * + * @type {String} + */ +videojs.VERSION = '5.9.0'; + +/** + * The global options object. These are the settings that take effect + * if no overrides are specified when the player is created. + * + * ```js + * videojs.options.autoplay = true + * // -> all players will autoplay by default + * ``` + * + * @type {Object} + */ +videojs.options = _player2['default'].prototype.options_; + +/** + * Get an object with the currently created players, keyed by player ID + * + * @return {Object} The created players + * @mixes videojs + * @method getPlayers + */ +videojs.getPlayers = function () { + return _player2['default'].players; +}; + +/** + * For backward compatibility, expose players object. + * + * @deprecated + * @memberOf videojs + * @property {Object|Proxy} players + */ +videojs.players = _utilsCreateDeprecationProxyJs2['default'](_player2['default'].players, { + get: 'Access to videojs.players is deprecated; use videojs.getPlayers instead', + set: 'Modification of videojs.players is deprecated' +}); + +/** + * Get a component class object by name + * ```js + * var VjsButton = videojs.getComponent('Button'); + * // Create a new instance of the component + * var myButton = new VjsButton(myPlayer); + * ``` + * + * @return {Component} Component identified by name + * @mixes videojs + * @method getComponent + */ +videojs.getComponent = _component2['default'].getComponent; + +/** + * Register a component so it can referred to by name + * Used when adding to other + * components, either through addChild + * `component.addChild('myComponent')` + * or through default children options + * `{ children: ['myComponent'] }`. + * ```js + * // Get a component to subclass + * var VjsButton = videojs.getComponent('Button'); + * // Subclass the component (see 'extend' doc for more info) + * var MySpecialButton = videojs.extend(VjsButton, {}); + * // Register the new component + * VjsButton.registerComponent('MySepcialButton', MySepcialButton); + * // (optionally) add the new component as a default player child + * myPlayer.addChild('MySepcialButton'); + * ``` + * NOTE: You could also just initialize the component before adding. + * `component.addChild(new MyComponent());` + * + * @param {String} The class name of the component + * @param {Component} The component class + * @return {Component} The newly registered component + * @mixes videojs + * @method registerComponent + */ +videojs.registerComponent = function (name, comp) { + if (_techTechJs2['default'].isTech(comp)) { + _utilsLogJs2['default'].warn('The ' + name + ' tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)'); + } + + _component2['default'].registerComponent.call(_component2['default'], name, comp); +}; + +/** + * Get a Tech class object by name + * ```js + * var Html5 = videojs.getTech('Html5'); + * // Create a new instance of the component + * var html5 = new Html5(options); + * ``` + * + * @return {Tech} Tech identified by name + * @mixes videojs + * @method getComponent + */ +videojs.getTech = _techTechJs2['default'].getTech; + +/** + * Register a Tech so it can referred to by name. + * This is used in the tech order for the player. + * + * ```js + * // get the Html5 Tech + * var Html5 = videojs.getTech('Html5'); + * var MyTech = videojs.extend(Html5, {}); + * // Register the new Tech + * VjsButton.registerTech('Tech', MyTech); + * var player = videojs('myplayer', { + * techOrder: ['myTech', 'html5'] + * }); + * ``` + * + * @param {String} The class name of the tech + * @param {Tech} The tech class + * @return {Tech} The newly registered Tech + * @mixes videojs + * @method registerTech + */ +videojs.registerTech = _techTechJs2['default'].registerTech; + +/** + * A suite of browser and device tests + * + * @type {Object} + * @private + */ +videojs.browser = browser; + +/** + * Whether or not the browser supports touch events. Included for backward + * compatibility with 4.x, but deprecated. Use `videojs.browser.TOUCH_ENABLED` + * instead going forward. + * + * @deprecated + * @type {Boolean} + */ +videojs.TOUCH_ENABLED = browser.TOUCH_ENABLED; + +/** + * Subclass an existing class + * Mimics ES6 subclassing with the `extend` keyword + * ```js + * // Create a basic javascript 'class' + * function MyClass(name){ + * // Set a property at initialization + * this.myName = name; + * } + * // Create an instance method + * MyClass.prototype.sayMyName = function(){ + * alert(this.myName); + * }; + * // Subclass the exisitng class and change the name + * // when initializing + * var MySubClass = videojs.extend(MyClass, { + * constructor: function(name) { + * // Call the super class constructor for the subclass + * MyClass.call(this, name) + * } + * }); + * // Create an instance of the new sub class + * var myInstance = new MySubClass('John'); + * myInstance.sayMyName(); // -> should alert "John" + * ``` + * + * @param {Function} The Class to subclass + * @param {Object} An object including instace methods for the new class + * Optionally including a `constructor` function + * @return {Function} The newly created subclass + * @mixes videojs + * @method extend + */ +videojs.extend = _extendJs2['default']; + +/** + * Merge two options objects recursively + * Performs a deep merge like lodash.merge but **only merges plain objects** + * (not arrays, elements, anything else) + * Other values will be copied directly from the second object. + * ```js + * var defaultOptions = { + * foo: true, + * bar: { + * a: true, + * b: [1,2,3] + * } + * }; + * var newOptions = { + * foo: false, + * bar: { + * b: [4,5,6] + * } + * }; + * var result = videojs.mergeOptions(defaultOptions, newOptions); + * // result.foo = false; + * // result.bar.a = true; + * // result.bar.b = [4,5,6]; + * ``` + * + * @param {Object} defaults The options object whose values will be overriden + * @param {Object} overrides The options object with values to override the first + * @param {Object} etc Any number of additional options objects + * + * @return {Object} a new object with the merged values + * @mixes videojs + * @method mergeOptions + */ +videojs.mergeOptions = _srcJsUtilsMergeOptionsJs2['default']; + +/** + * Change the context (this) of a function + * + * videojs.bind(newContext, function(){ + * this === newContext + * }); + * + * NOTE: as of v5.0 we require an ES5 shim, so you should use the native + * `function(){}.bind(newContext);` instead of this. + * + * @param {*} context The object to bind as scope + * @param {Function} fn The function to be bound to a scope + * @param {Number=} uid An optional unique ID for the function to be set + * @return {Function} + */ +videojs.bind = Fn.bind; + +/** + * Create a Video.js player plugin + * Plugins are only initialized when options for the plugin are included + * in the player options, or the plugin function on the player instance is + * called. + * **See the plugin guide in the docs for a more detailed example** + * ```js + * // Make a plugin that alerts when the player plays + * videojs.plugin('myPlugin', function(myPluginOptions) { + * myPluginOptions = myPluginOptions || {}; + * + * var player = this; + * var alertText = myPluginOptions.text || 'Player is playing!' + * + * player.on('play', function(){ + * alert(alertText); + * }); + * }); + * // USAGE EXAMPLES + * // EXAMPLE 1: New player with plugin options, call plugin immediately + * var player1 = videojs('idOne', { + * myPlugin: { + * text: 'Custom text!' + * } + * }); + * // Click play + * // --> Should alert 'Custom text!' + * // EXAMPLE 3: New player, initialize plugin later + * var player3 = videojs('idThree'); + * // Click play + * // --> NO ALERT + * // Click pause + * // Initialize plugin using the plugin function on the player instance + * player3.myPlugin({ + * text: 'Plugin added later!' + * }); + * // Click play + * // --> Should alert 'Plugin added later!' + * ``` + * + * @param {String} name The plugin name + * @param {Function} fn The plugin function that will be called with options + * @mixes videojs + * @method plugin + */ +videojs.plugin = _pluginsJs2['default']; + +/** + * Adding languages so that they're available to all players. + * ```js + * videojs.addLanguage('es', { 'Hello': 'Hola' }); + * ``` + * + * @param {String} code The language code or dictionary property + * @param {Object} data The data values to be translated + * @return {Object} The resulting language dictionary object + * @mixes videojs + * @method addLanguage + */ +videojs.addLanguage = function (code, data) { + var _merge; + + code = ('' + code).toLowerCase(); + return _lodashCompatObjectMerge2['default'](videojs.options.languages, (_merge = {}, _merge[code] = data, _merge))[code]; +}; + +/** + * Log debug messages. + * + * @param {...Object} messages One or more messages to log + */ +videojs.log = _utilsLogJs2['default']; + +/** + * Creates an emulated TimeRange object. + * + * @param {Number|Array} start Start time in seconds or an array of ranges + * @param {Number} end End time in seconds + * @return {Object} Fake TimeRange object + * @method createTimeRange + */ +videojs.createTimeRange = videojs.createTimeRanges = _utilsTimeRangesJs.createTimeRanges; + +/** + * Format seconds as a time string, H:MM:SS or M:SS + * Supplying a guide (in seconds) will force a number of leading zeros + * to cover the length of the guide + * + * @param {Number} seconds Number of seconds to be turned into a string + * @param {Number} guide Number (in seconds) to model the string after + * @return {String} Time formatted as H:MM:SS or M:SS + * @method formatTime + */ +videojs.formatTime = _utilsFormatTimeJs2['default']; + +/** + * Resolve and parse the elements of a URL + * + * @param {String} url The url to parse + * @return {Object} An object of url details + * @method parseUrl + */ +videojs.parseUrl = Url.parseUrl; + +/** + * Returns whether the url passed is a cross domain request or not. + * + * @param {String} url The url to check + * @return {Boolean} Whether it is a cross domain request or not + * @method isCrossOrigin + */ +videojs.isCrossOrigin = Url.isCrossOrigin; + +/** + * Event target class. + * + * @type {Function} + */ +videojs.EventTarget = _eventTarget2['default']; + +/** + * Add an event listener to element + * It stores the handler function in a separate cache object + * and adds a generic handler to the element's event, + * along with a unique id (guid) to the element. + * + * @param {Element|Object} elem Element or object to bind listeners to + * @param {String|Array} type Type of event to bind to. + * @param {Function} fn Event listener. + * @method on + */ +videojs.on = Events.on; + +/** + * Trigger a listener only once for an event + * + * @param {Element|Object} elem Element or object to + * @param {String|Array} type Name/type of event + * @param {Function} fn Event handler function + * @method one + */ +videojs.one = Events.one; + +/** + * Removes event listeners from an element + * + * @param {Element|Object} elem Object to remove listeners from + * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element. + * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type. + * @method off + */ +videojs.off = Events.off; + +/** + * Trigger an event for an element + * + * @param {Element|Object} elem Element to trigger an event on + * @param {Event|Object|String} event A string (the type) or an event object with a type attribute + * @param {Object} [hash] data hash to pass along with the event + * @return {Boolean=} Returned only if default was prevented + * @method trigger + */ +videojs.trigger = Events.trigger; + +/** + * A cross-browser XMLHttpRequest wrapper. Here's a simple example: + * + * videojs.xhr({ + * body: someJSONString, + * uri: "/foo", + * headers: { + * "Content-Type": "application/json" + * } + * }, function (err, resp, body) { + * // check resp.statusCode + * }); + * + * Check out the [full + * documentation](https://github.com/Raynos/xhr/blob/v2.1.0/README.md) + * for more options. + * + * @param {Object} options settings for the request. + * @return {XMLHttpRequest|XDomainRequest} the request object. + * @see https://github.com/Raynos/xhr + */ +videojs.xhr = _xhr2['default']; + +/** + * TextTrack class + * + * @type {Function} + */ +videojs.TextTrack = _tracksTextTrackJs2['default']; + +/** + * Determines, via duck typing, whether or not a value is a DOM element. + * + * @method isEl + * @param {Mixed} value + * @return {Boolean} + */ +videojs.isEl = Dom.isEl; + +/** + * Determines, via duck typing, whether or not a value is a text node. + * + * @method isTextNode + * @param {Mixed} value + * @return {Boolean} + */ +videojs.isTextNode = Dom.isTextNode; + +/** + * Creates an element and applies properties. + * + * @method createEl + * @param {String} [tagName='div'] Name of tag to be created. + * @param {Object} [properties={}] Element properties to be applied. + * @param {Object} [attributes={}] Element attributes to be applied. + * @return {Element} + */ +videojs.createEl = Dom.createEl; + +/** + * Check if an element has a CSS class + * + * @method hasClass + * @param {Element} element Element to check + * @param {String} classToCheck Classname to check + */ +videojs.hasClass = Dom.hasElClass; + +/** + * Add a CSS class name to an element + * + * @method addClass + * @param {Element} element Element to add class name to + * @param {String} classToAdd Classname to add + */ +videojs.addClass = Dom.addElClass; + +/** + * Remove a CSS class name from an element + * + * @method removeClass + * @param {Element} element Element to remove from class name + * @param {String} classToRemove Classname to remove + */ +videojs.removeClass = Dom.removeElClass; + +/** + * Adds or removes a CSS class name on an element depending on an optional + * condition or the presence/absence of the class name. + * + * @method toggleElClass + * @param {Element} element + * @param {String} classToToggle + * @param {Boolean|Function} [predicate] + * Can be a function that returns a Boolean. If `true`, the class + * will be added; if `false`, the class will be removed. If not + * given, the class will be added if not present and vice versa. + */ +videojs.toggleClass = Dom.toggleElClass; + +/** + * Apply attributes to an HTML element. + * + * @method setAttributes + * @param {Element} el Target element. + * @param {Object=} attributes Element attributes to be applied. + */ +videojs.setAttributes = Dom.setElAttributes; + +/** + * Get an element's attribute values, as defined on the HTML tag + * Attributes are not the same as properties. They're defined on the tag + * or with setAttribute (which shouldn't be used with HTML) + * This will return true or false for boolean attributes. + * + * @method getAttributes + * @param {Element} tag Element from which to get tag attributes + * @return {Object} + */ +videojs.getAttributes = Dom.getElAttributes; + +/** + * Empties the contents of an element. + * + * @method emptyEl + * @param {Element} el + * @return {Element} + */ +videojs.emptyEl = Dom.emptyEl; + +/** + * Normalizes and appends content to an element. + * + * The content for an element can be passed in multiple types and + * combinations, whose behavior is as follows: + * + * - String + * Normalized into a text node. + * + * - Element, TextNode + * Passed through. + * + * - Array + * A one-dimensional array of strings, elements, nodes, or functions (which + * return single strings, elements, or nodes). + * + * - Function + * If the sole argument, is expected to produce a string, element, + * node, or array. + * + * @method appendContent + * @param {Element} el + * @param {String|Element|TextNode|Array|Function} content + * @return {Element} + */ +videojs.appendContent = Dom.appendContent; + +/** + * Normalizes and inserts content into an element; this is identical to + * `appendContent()`, except it empties the element first. + * + * The content for an element can be passed in multiple types and + * combinations, whose behavior is as follows: + * + * - String + * Normalized into a text node. + * + * - Element, TextNode + * Passed through. + * + * - Array + * A one-dimensional array of strings, elements, nodes, or functions (which + * return single strings, elements, or nodes). + * + * - Function + * If the sole argument, is expected to produce a string, element, + * node, or array. + * + * @method insertContent + * @param {Element} el + * @param {String|Element|TextNode|Array|Function} content + * @return {Element} + */ +videojs.insertContent = Dom.insertContent; + +/* + * Custom Universal Module Definition (UMD) + * + * Video.js will never be a non-browser lib so we can simplify UMD a bunch and + * still support requirejs and browserify. This also needs to be closure + * compiler compatible, so string keys are used. + */ +if (typeof define === 'function' && define['amd']) { + define('videojs', [], function () { + return videojs; + }); + + // checking that module is an object too because of umdjs/umd#35 +} else if (typeof exports === 'object' && typeof module === 'object') { + module['exports'] = videojs; + } + +exports['default'] = videojs; +module.exports = exports['default']; + +},{"../../src/js/utils/merge-options.js":140,"./component":67,"./event-target":101,"./extend.js":102,"./player":110,"./plugins.js":111,"./setup":115,"./tech/flash.js":118,"./tech/html5.js":119,"./tech/tech.js":121,"./tracks/text-track.js":130,"./utils/browser.js":131,"./utils/create-deprecation-proxy.js":133,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/format-time.js":137,"./utils/log.js":139,"./utils/stylesheet.js":141,"./utils/time-ranges.js":142,"./utils/url.js":144,"global/document":1,"global/window":2,"lodash-compat/object/merge":40,"object.assign":45,"xhr":56}]},{},[145])(145) +}); + + +//# sourceMappingURL=video.js.map +/* vtt.js - v0.12.1 (https://github.com/mozilla/vtt.js) built on 08-07-2015 */ + +(function(root) { + var vttjs = root.vttjs = {}; + var cueShim = vttjs.VTTCue; + var regionShim = vttjs.VTTRegion; + var oldVTTCue = root.VTTCue; + var oldVTTRegion = root.VTTRegion; + + vttjs.shim = function() { + vttjs.VTTCue = cueShim; + vttjs.VTTRegion = regionShim; + }; + + vttjs.restore = function() { + vttjs.VTTCue = oldVTTCue; + vttjs.VTTRegion = oldVTTRegion; + }; +}(this)); + +/** + * Copyright 2013 vtt.js Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, vttjs) { + + var autoKeyword = "auto"; + var directionSetting = { + "": true, + "lr": true, + "rl": true + }; + var alignSetting = { + "start": true, + "middle": true, + "end": true, + "left": true, + "right": true + }; + + function findDirectionSetting(value) { + if (typeof value !== "string") { + return false; + } + var dir = directionSetting[value.toLowerCase()]; + return dir ? value.toLowerCase() : false; + } + + function findAlignSetting(value) { + if (typeof value !== "string") { + return false; + } + var align = alignSetting[value.toLowerCase()]; + return align ? value.toLowerCase() : false; + } + + function extend(obj) { + var i = 1; + for (; i < arguments.length; i++) { + var cobj = arguments[i]; + for (var p in cobj) { + obj[p] = cobj[p]; + } + } + + return obj; + } + + function VTTCue(startTime, endTime, text) { + var cue = this; + var isIE8 = (/MSIE\s8\.0/).test(navigator.userAgent); + var baseObj = {}; + + if (isIE8) { + cue = document.createElement('custom'); + } else { + baseObj.enumerable = true; + } + + /** + * Shim implementation specific properties. These properties are not in + * the spec. + */ + + // Lets us know when the VTTCue's data has changed in such a way that we need + // to recompute its display state. This lets us compute its display state + // lazily. + cue.hasBeenReset = false; + + /** + * VTTCue and TextTrackCue properties + * http://dev.w3.org/html5/webvtt/#vttcue-interface + */ + + var _id = ""; + var _pauseOnExit = false; + var _startTime = startTime; + var _endTime = endTime; + var _text = text; + var _region = null; + var _vertical = ""; + var _snapToLines = true; + var _line = "auto"; + var _lineAlign = "start"; + var _position = 50; + var _positionAlign = "middle"; + var _size = 50; + var _align = "middle"; + + Object.defineProperty(cue, + "id", extend({}, baseObj, { + get: function() { + return _id; + }, + set: function(value) { + _id = "" + value; + } + })); + + Object.defineProperty(cue, + "pauseOnExit", extend({}, baseObj, { + get: function() { + return _pauseOnExit; + }, + set: function(value) { + _pauseOnExit = !!value; + } + })); + + Object.defineProperty(cue, + "startTime", extend({}, baseObj, { + get: function() { + return _startTime; + }, + set: function(value) { + if (typeof value !== "number") { + throw new TypeError("Start time must be set to a number."); + } + _startTime = value; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "endTime", extend({}, baseObj, { + get: function() { + return _endTime; + }, + set: function(value) { + if (typeof value !== "number") { + throw new TypeError("End time must be set to a number."); + } + _endTime = value; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "text", extend({}, baseObj, { + get: function() { + return _text; + }, + set: function(value) { + _text = "" + value; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "region", extend({}, baseObj, { + get: function() { + return _region; + }, + set: function(value) { + _region = value; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "vertical", extend({}, baseObj, { + get: function() { + return _vertical; + }, + set: function(value) { + var setting = findDirectionSetting(value); + // Have to check for false because the setting an be an empty string. + if (setting === false) { + throw new SyntaxError("An invalid or illegal string was specified."); + } + _vertical = setting; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "snapToLines", extend({}, baseObj, { + get: function() { + return _snapToLines; + }, + set: function(value) { + _snapToLines = !!value; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "line", extend({}, baseObj, { + get: function() { + return _line; + }, + set: function(value) { + if (typeof value !== "number" && value !== autoKeyword) { + throw new SyntaxError("An invalid number or illegal string was specified."); + } + _line = value; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "lineAlign", extend({}, baseObj, { + get: function() { + return _lineAlign; + }, + set: function(value) { + var setting = findAlignSetting(value); + if (!setting) { + throw new SyntaxError("An invalid or illegal string was specified."); + } + _lineAlign = setting; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "position", extend({}, baseObj, { + get: function() { + return _position; + }, + set: function(value) { + if (value < 0 || value > 100) { + throw new Error("Position must be between 0 and 100."); + } + _position = value; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "positionAlign", extend({}, baseObj, { + get: function() { + return _positionAlign; + }, + set: function(value) { + var setting = findAlignSetting(value); + if (!setting) { + throw new SyntaxError("An invalid or illegal string was specified."); + } + _positionAlign = setting; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "size", extend({}, baseObj, { + get: function() { + return _size; + }, + set: function(value) { + if (value < 0 || value > 100) { + throw new Error("Size must be between 0 and 100."); + } + _size = value; + this.hasBeenReset = true; + } + })); + + Object.defineProperty(cue, + "align", extend({}, baseObj, { + get: function() { + return _align; + }, + set: function(value) { + var setting = findAlignSetting(value); + if (!setting) { + throw new SyntaxError("An invalid or illegal string was specified."); + } + _align = setting; + this.hasBeenReset = true; + } + })); + + /** + * Other spec defined properties + */ + + // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state + cue.displayState = undefined; + + if (isIE8) { + return cue; + } + } + + /** + * VTTCue methods + */ + + VTTCue.prototype.getCueAsHTML = function() { + // Assume WebVTT.convertCueToDOMTree is on the global. + return WebVTT.convertCueToDOMTree(window, this.text); + }; + + root.VTTCue = root.VTTCue || VTTCue; + vttjs.VTTCue = VTTCue; +}(this, (this.vttjs || {}))); + +/** + * Copyright 2013 vtt.js Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, vttjs) { + + var scrollSetting = { + "": true, + "up": true + }; + + function findScrollSetting(value) { + if (typeof value !== "string") { + return false; + } + var scroll = scrollSetting[value.toLowerCase()]; + return scroll ? value.toLowerCase() : false; + } + + function isValidPercentValue(value) { + return typeof value === "number" && (value >= 0 && value <= 100); + } + + // VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface + function VTTRegion() { + var _width = 100; + var _lines = 3; + var _regionAnchorX = 0; + var _regionAnchorY = 100; + var _viewportAnchorX = 0; + var _viewportAnchorY = 100; + var _scroll = ""; + + Object.defineProperties(this, { + "width": { + enumerable: true, + get: function() { + return _width; + }, + set: function(value) { + if (!isValidPercentValue(value)) { + throw new Error("Width must be between 0 and 100."); + } + _width = value; + } + }, + "lines": { + enumerable: true, + get: function() { + return _lines; + }, + set: function(value) { + if (typeof value !== "number") { + throw new TypeError("Lines must be set to a number."); + } + _lines = value; + } + }, + "regionAnchorY": { + enumerable: true, + get: function() { + return _regionAnchorY; + }, + set: function(value) { + if (!isValidPercentValue(value)) { + throw new Error("RegionAnchorX must be between 0 and 100."); + } + _regionAnchorY = value; + } + }, + "regionAnchorX": { + enumerable: true, + get: function() { + return _regionAnchorX; + }, + set: function(value) { + if(!isValidPercentValue(value)) { + throw new Error("RegionAnchorY must be between 0 and 100."); + } + _regionAnchorX = value; + } + }, + "viewportAnchorY": { + enumerable: true, + get: function() { + return _viewportAnchorY; + }, + set: function(value) { + if (!isValidPercentValue(value)) { + throw new Error("ViewportAnchorY must be between 0 and 100."); + } + _viewportAnchorY = value; + } + }, + "viewportAnchorX": { + enumerable: true, + get: function() { + return _viewportAnchorX; + }, + set: function(value) { + if (!isValidPercentValue(value)) { + throw new Error("ViewportAnchorX must be between 0 and 100."); + } + _viewportAnchorX = value; + } + }, + "scroll": { + enumerable: true, + get: function() { + return _scroll; + }, + set: function(value) { + var setting = findScrollSetting(value); + // Have to check for false as an empty string is a legal value. + if (setting === false) { + throw new SyntaxError("An invalid or illegal string was specified."); + } + _scroll = setting; + } + } + }); + } + + root.VTTRegion = root.VTTRegion || VTTRegion; + vttjs.VTTRegion = VTTRegion; +}(this, (this.vttjs || {}))); + +/** + * Copyright 2013 vtt.js Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +(function(global) { + + var _objCreate = Object.create || (function() { + function F() {} + return function(o) { + if (arguments.length !== 1) { + throw new Error('Object.create shim only accepts one parameter.'); + } + F.prototype = o; + return new F(); + }; + })(); + + // Creates a new ParserError object from an errorData object. The errorData + // object should have default code and message properties. The default message + // property can be overriden by passing in a message parameter. + // See ParsingError.Errors below for acceptable errors. + function ParsingError(errorData, message) { + this.name = "ParsingError"; + this.code = errorData.code; + this.message = message || errorData.message; + } + ParsingError.prototype = _objCreate(Error.prototype); + ParsingError.prototype.constructor = ParsingError; + + // ParsingError metadata for acceptable ParsingErrors. + ParsingError.Errors = { + BadSignature: { + code: 0, + message: "Malformed WebVTT signature." + }, + BadTimeStamp: { + code: 1, + message: "Malformed time stamp." + } + }; + + // Try to parse input as a time stamp. + function parseTimeStamp(input) { + + function computeSeconds(h, m, s, f) { + return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000; + } + + var m = input.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/); + if (!m) { + return null; + } + + if (m[3]) { + // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds] + return computeSeconds(m[1], m[2], m[3].replace(":", ""), m[4]); + } else if (m[1] > 59) { + // Timestamp takes the form of [hours]:[minutes].[milliseconds] + // First position is hours as it's over 59. + return computeSeconds(m[1], m[2], 0, m[4]); + } else { + // Timestamp takes the form of [minutes]:[seconds].[milliseconds] + return computeSeconds(0, m[1], m[2], m[4]); + } + } + + // A settings object holds key/value pairs and will ignore anything but the first + // assignment to a specific key. + function Settings() { + this.values = _objCreate(null); + } + + Settings.prototype = { + // Only accept the first assignment to any key. + set: function(k, v) { + if (!this.get(k) && v !== "") { + this.values[k] = v; + } + }, + // Return the value for a key, or a default value. + // If 'defaultKey' is passed then 'dflt' is assumed to be an object with + // a number of possible default values as properties where 'defaultKey' is + // the key of the property that will be chosen; otherwise it's assumed to be + // a single value. + get: function(k, dflt, defaultKey) { + if (defaultKey) { + return this.has(k) ? this.values[k] : dflt[defaultKey]; + } + return this.has(k) ? this.values[k] : dflt; + }, + // Check whether we have a value for a key. + has: function(k) { + return k in this.values; + }, + // Accept a setting if its one of the given alternatives. + alt: function(k, v, a) { + for (var n = 0; n < a.length; ++n) { + if (v === a[n]) { + this.set(k, v); + break; + } + } + }, + // Accept a setting if its a valid (signed) integer. + integer: function(k, v) { + if (/^-?\d+$/.test(v)) { // integer + this.set(k, parseInt(v, 10)); + } + }, + // Accept a setting if its a valid percentage. + percent: function(k, v) { + var m; + if ((m = v.match(/^([\d]{1,3})(\.[\d]*)?%$/))) { + v = parseFloat(v); + if (v >= 0 && v <= 100) { + this.set(k, v); + return true; + } + } + return false; + } + }; + + // Helper function to parse input into groups separated by 'groupDelim', and + // interprete each group as a key/value pair separated by 'keyValueDelim'. + function parseOptions(input, callback, keyValueDelim, groupDelim) { + var groups = groupDelim ? input.split(groupDelim) : [input]; + for (var i in groups) { + if (typeof groups[i] !== "string") { + continue; + } + var kv = groups[i].split(keyValueDelim); + if (kv.length !== 2) { + continue; + } + var k = kv[0]; + var v = kv[1]; + callback(k, v); + } + } + + function parseCue(input, cue, regionList) { + // Remember the original input if we need to throw an error. + var oInput = input; + // 4.1 WebVTT timestamp + function consumeTimeStamp() { + var ts = parseTimeStamp(input); + if (ts === null) { + throw new ParsingError(ParsingError.Errors.BadTimeStamp, + "Malformed timestamp: " + oInput); + } + // Remove time stamp from input. + input = input.replace(/^[^\sa-zA-Z-]+/, ""); + return ts; + } + + // 4.4.2 WebVTT cue settings + function consumeCueSettings(input, cue) { + var settings = new Settings(); + + parseOptions(input, function (k, v) { + switch (k) { + case "region": + // Find the last region we parsed with the same region id. + for (var i = regionList.length - 1; i >= 0; i--) { + if (regionList[i].id === v) { + settings.set(k, regionList[i].region); + break; + } + } + break; + case "vertical": + settings.alt(k, v, ["rl", "lr"]); + break; + case "line": + var vals = v.split(","), + vals0 = vals[0]; + settings.integer(k, vals0); + settings.percent(k, vals0) ? settings.set("snapToLines", false) : null; + settings.alt(k, vals0, ["auto"]); + if (vals.length === 2) { + settings.alt("lineAlign", vals[1], ["start", "middle", "end"]); + } + break; + case "position": + vals = v.split(","); + settings.percent(k, vals[0]); + if (vals.length === 2) { + settings.alt("positionAlign", vals[1], ["start", "middle", "end"]); + } + break; + case "size": + settings.percent(k, v); + break; + case "align": + settings.alt(k, v, ["start", "middle", "end", "left", "right"]); + break; + } + }, /:/, /\s/); + + // Apply default values for any missing fields. + cue.region = settings.get("region", null); + cue.vertical = settings.get("vertical", ""); + cue.line = settings.get("line", "auto"); + cue.lineAlign = settings.get("lineAlign", "start"); + cue.snapToLines = settings.get("snapToLines", true); + cue.size = settings.get("size", 100); + cue.align = settings.get("align", "middle"); + cue.position = settings.get("position", { + start: 0, + left: 0, + middle: 50, + end: 100, + right: 100 + }, cue.align); + cue.positionAlign = settings.get("positionAlign", { + start: "start", + left: "start", + middle: "middle", + end: "end", + right: "end" + }, cue.align); + } + + function skipWhitespace() { + input = input.replace(/^\s+/, ""); + } + + // 4.1 WebVTT cue timings. + skipWhitespace(); + cue.startTime = consumeTimeStamp(); // (1) collect cue start time + skipWhitespace(); + if (input.substr(0, 3) !== "-->") { // (3) next characters must match "-->" + throw new ParsingError(ParsingError.Errors.BadTimeStamp, + "Malformed time stamp (time stamps must be separated by '-->'): " + + oInput); + } + input = input.substr(3); + skipWhitespace(); + cue.endTime = consumeTimeStamp(); // (5) collect cue end time + + // 4.1 WebVTT cue settings list. + skipWhitespace(); + consumeCueSettings(input, cue); + } + + var ESCAPE = { + "&": "&", + "<": "<", + ">": ">", + "‎": "\u200e", + "‏": "\u200f", + " ": "\u00a0" + }; + + var TAG_NAME = { + c: "span", + i: "i", + b: "b", + u: "u", + ruby: "ruby", + rt: "rt", + v: "span", + lang: "span" + }; + + var TAG_ANNOTATION = { + v: "title", + lang: "lang" + }; + + var NEEDS_PARENT = { + rt: "ruby" + }; + + // Parse content into a document fragment. + function parseContent(window, input) { + function nextToken() { + // Check for end-of-string. + if (!input) { + return null; + } + + // Consume 'n' characters from the input. + function consume(result) { + input = input.substr(result.length); + return result; + } + + var m = input.match(/^([^<]*)(<[^>]+>?)?/); + // If there is some text before the next tag, return it, otherwise return + // the tag. + return consume(m[1] ? m[1] : m[2]); + } + + // Unescape a string 's'. + function unescape1(e) { + return ESCAPE[e]; + } + function unescape(s) { + while ((m = s.match(/&(amp|lt|gt|lrm|rlm|nbsp);/))) { + s = s.replace(m[0], unescape1); + } + return s; + } + + function shouldAdd(current, element) { + return !NEEDS_PARENT[element.localName] || + NEEDS_PARENT[element.localName] === current.localName; + } + + // Create an element for this tag. + function createElement(type, annotation) { + var tagName = TAG_NAME[type]; + if (!tagName) { + return null; + } + var element = window.document.createElement(tagName); + element.localName = tagName; + var name = TAG_ANNOTATION[type]; + if (name && annotation) { + element[name] = annotation.trim(); + } + return element; + } + + var rootDiv = window.document.createElement("div"), + current = rootDiv, + t, + tagStack = []; + + while ((t = nextToken()) !== null) { + if (t[0] === '<') { + if (t[1] === "/") { + // If the closing tag matches, move back up to the parent node. + if (tagStack.length && + tagStack[tagStack.length - 1] === t.substr(2).replace(">", "")) { + tagStack.pop(); + current = current.parentNode; + } + // Otherwise just ignore the end tag. + continue; + } + var ts = parseTimeStamp(t.substr(1, t.length - 2)); + var node; + if (ts) { + // Timestamps are lead nodes as well. + node = window.document.createProcessingInstruction("timestamp", ts); + current.appendChild(node); + continue; + } + var m = t.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/); + // If we can't parse the tag, skip to the next tag. + if (!m) { + continue; + } + // Try to construct an element, and ignore the tag if we couldn't. + node = createElement(m[1], m[3]); + if (!node) { + continue; + } + // Determine if the tag should be added based on the context of where it + // is placed in the cuetext. + if (!shouldAdd(current, node)) { + continue; + } + // Set the class list (as a list of classes, separated by space). + if (m[2]) { + node.className = m[2].substr(1).replace('.', ' '); + } + // Append the node to the current node, and enter the scope of the new + // node. + tagStack.push(m[1]); + current.appendChild(node); + current = node; + continue; + } + + // Text nodes are leaf nodes. + current.appendChild(window.document.createTextNode(unescape(t))); + } + + return rootDiv; + } + + // This is a list of all the Unicode characters that have a strong + // right-to-left category. What this means is that these characters are + // written right-to-left for sure. It was generated by pulling all the strong + // right-to-left characters out of the Unicode data table. That table can + // found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt + var strongRTLChars = [0x05BE, 0x05C0, 0x05C3, 0x05C6, 0x05D0, 0x05D1, + 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, + 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, 0x05E0, 0x05E1, 0x05E2, 0x05E3, + 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x05F0, 0x05F1, + 0x05F2, 0x05F3, 0x05F4, 0x0608, 0x060B, 0x060D, 0x061B, 0x061E, 0x061F, + 0x0620, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, + 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, 0x0630, 0x0631, + 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, + 0x063B, 0x063C, 0x063D, 0x063E, 0x063F, 0x0640, 0x0641, 0x0642, 0x0643, + 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A, 0x066D, 0x066E, + 0x066F, 0x0671, 0x0672, 0x0673, 0x0674, 0x0675, 0x0676, 0x0677, 0x0678, + 0x0679, 0x067A, 0x067B, 0x067C, 0x067D, 0x067E, 0x067F, 0x0680, 0x0681, + 0x0682, 0x0683, 0x0684, 0x0685, 0x0686, 0x0687, 0x0688, 0x0689, 0x068A, + 0x068B, 0x068C, 0x068D, 0x068E, 0x068F, 0x0690, 0x0691, 0x0692, 0x0693, + 0x0694, 0x0695, 0x0696, 0x0697, 0x0698, 0x0699, 0x069A, 0x069B, 0x069C, + 0x069D, 0x069E, 0x069F, 0x06A0, 0x06A1, 0x06A2, 0x06A3, 0x06A4, 0x06A5, + 0x06A6, 0x06A7, 0x06A8, 0x06A9, 0x06AA, 0x06AB, 0x06AC, 0x06AD, 0x06AE, + 0x06AF, 0x06B0, 0x06B1, 0x06B2, 0x06B3, 0x06B4, 0x06B5, 0x06B6, 0x06B7, + 0x06B8, 0x06B9, 0x06BA, 0x06BB, 0x06BC, 0x06BD, 0x06BE, 0x06BF, 0x06C0, + 0x06C1, 0x06C2, 0x06C3, 0x06C4, 0x06C5, 0x06C6, 0x06C7, 0x06C8, 0x06C9, + 0x06CA, 0x06CB, 0x06CC, 0x06CD, 0x06CE, 0x06CF, 0x06D0, 0x06D1, 0x06D2, + 0x06D3, 0x06D4, 0x06D5, 0x06E5, 0x06E6, 0x06EE, 0x06EF, 0x06FA, 0x06FB, + 0x06FC, 0x06FD, 0x06FE, 0x06FF, 0x0700, 0x0701, 0x0702, 0x0703, 0x0704, + 0x0705, 0x0706, 0x0707, 0x0708, 0x0709, 0x070A, 0x070B, 0x070C, 0x070D, + 0x070F, 0x0710, 0x0712, 0x0713, 0x0714, 0x0715, 0x0716, 0x0717, 0x0718, + 0x0719, 0x071A, 0x071B, 0x071C, 0x071D, 0x071E, 0x071F, 0x0720, 0x0721, + 0x0722, 0x0723, 0x0724, 0x0725, 0x0726, 0x0727, 0x0728, 0x0729, 0x072A, + 0x072B, 0x072C, 0x072D, 0x072E, 0x072F, 0x074D, 0x074E, 0x074F, 0x0750, + 0x0751, 0x0752, 0x0753, 0x0754, 0x0755, 0x0756, 0x0757, 0x0758, 0x0759, + 0x075A, 0x075B, 0x075C, 0x075D, 0x075E, 0x075F, 0x0760, 0x0761, 0x0762, + 0x0763, 0x0764, 0x0765, 0x0766, 0x0767, 0x0768, 0x0769, 0x076A, 0x076B, + 0x076C, 0x076D, 0x076E, 0x076F, 0x0770, 0x0771, 0x0772, 0x0773, 0x0774, + 0x0775, 0x0776, 0x0777, 0x0778, 0x0779, 0x077A, 0x077B, 0x077C, 0x077D, + 0x077E, 0x077F, 0x0780, 0x0781, 0x0782, 0x0783, 0x0784, 0x0785, 0x0786, + 0x0787, 0x0788, 0x0789, 0x078A, 0x078B, 0x078C, 0x078D, 0x078E, 0x078F, + 0x0790, 0x0791, 0x0792, 0x0793, 0x0794, 0x0795, 0x0796, 0x0797, 0x0798, + 0x0799, 0x079A, 0x079B, 0x079C, 0x079D, 0x079E, 0x079F, 0x07A0, 0x07A1, + 0x07A2, 0x07A3, 0x07A4, 0x07A5, 0x07B1, 0x07C0, 0x07C1, 0x07C2, 0x07C3, + 0x07C4, 0x07C5, 0x07C6, 0x07C7, 0x07C8, 0x07C9, 0x07CA, 0x07CB, 0x07CC, + 0x07CD, 0x07CE, 0x07CF, 0x07D0, 0x07D1, 0x07D2, 0x07D3, 0x07D4, 0x07D5, + 0x07D6, 0x07D7, 0x07D8, 0x07D9, 0x07DA, 0x07DB, 0x07DC, 0x07DD, 0x07DE, + 0x07DF, 0x07E0, 0x07E1, 0x07E2, 0x07E3, 0x07E4, 0x07E5, 0x07E6, 0x07E7, + 0x07E8, 0x07E9, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x0800, 0x0801, 0x0802, + 0x0803, 0x0804, 0x0805, 0x0806, 0x0807, 0x0808, 0x0809, 0x080A, 0x080B, + 0x080C, 0x080D, 0x080E, 0x080F, 0x0810, 0x0811, 0x0812, 0x0813, 0x0814, + 0x0815, 0x081A, 0x0824, 0x0828, 0x0830, 0x0831, 0x0832, 0x0833, 0x0834, + 0x0835, 0x0836, 0x0837, 0x0838, 0x0839, 0x083A, 0x083B, 0x083C, 0x083D, + 0x083E, 0x0840, 0x0841, 0x0842, 0x0843, 0x0844, 0x0845, 0x0846, 0x0847, + 0x0848, 0x0849, 0x084A, 0x084B, 0x084C, 0x084D, 0x084E, 0x084F, 0x0850, + 0x0851, 0x0852, 0x0853, 0x0854, 0x0855, 0x0856, 0x0857, 0x0858, 0x085E, + 0x08A0, 0x08A2, 0x08A3, 0x08A4, 0x08A5, 0x08A6, 0x08A7, 0x08A8, 0x08A9, + 0x08AA, 0x08AB, 0x08AC, 0x200F, 0xFB1D, 0xFB1F, 0xFB20, 0xFB21, 0xFB22, + 0xFB23, 0xFB24, 0xFB25, 0xFB26, 0xFB27, 0xFB28, 0xFB2A, 0xFB2B, 0xFB2C, + 0xFB2D, 0xFB2E, 0xFB2F, 0xFB30, 0xFB31, 0xFB32, 0xFB33, 0xFB34, 0xFB35, + 0xFB36, 0xFB38, 0xFB39, 0xFB3A, 0xFB3B, 0xFB3C, 0xFB3E, 0xFB40, 0xFB41, + 0xFB43, 0xFB44, 0xFB46, 0xFB47, 0xFB48, 0xFB49, 0xFB4A, 0xFB4B, 0xFB4C, + 0xFB4D, 0xFB4E, 0xFB4F, 0xFB50, 0xFB51, 0xFB52, 0xFB53, 0xFB54, 0xFB55, + 0xFB56, 0xFB57, 0xFB58, 0xFB59, 0xFB5A, 0xFB5B, 0xFB5C, 0xFB5D, 0xFB5E, + 0xFB5F, 0xFB60, 0xFB61, 0xFB62, 0xFB63, 0xFB64, 0xFB65, 0xFB66, 0xFB67, + 0xFB68, 0xFB69, 0xFB6A, 0xFB6B, 0xFB6C, 0xFB6D, 0xFB6E, 0xFB6F, 0xFB70, + 0x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xFEC8, 0xFEC9, 0xFECA, 0xFECB, + 0xFECC, 0xFECD, 0xFECE, 0xFECF, 0xFED0, 0xFED1, 0xFED2, 0xFED3, 0xFED4, + 0xFED5, 0xFED6, 0xFED7, 0xFED8, 0xFED9, 0xFEDA, 0xFEDB, 0xFEDC, 0xFEDD, + 0xFEDE, 0xFEDF, 0xFEE0, 0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4, 0xFEE5, 0xFEE6, + 0xFEE7, 0xFEE8, 0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC, 0xFEED, 0xFEEE, 0xFEEF, + 0xFEF0, 0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8, + 0xFEF9, 0xFEFA, 0xFEFB, 0xFEFC, 0x10800, 0x10801, 0x10802, 0x10803, + 0x10804, 0x10805, 0x10808, 0x1080A, 0x1080B, 0x1080C, 0x1080D, 0x1080E, + 0x1080F, 0x10810, 0x10811, 0x10812, 0x10813, 0x10814, 0x10815, 0x10816, + 0x10817, 0x10818, 0x10819, 0x1081A, 0x1081B, 0x1081C, 0x1081D, 0x1081E, + 0x1081F, 0x10820, 0x10821, 0x10822, 0x10823, 0x10824, 0x10825, 0x10826, + 0x10827, 0x10828, 0x10829, 0x1082A, 0x1082B, 0x1082C, 0x1082D, 0x1082E, + 0x1082F, 0x10830, 0x10831, 0x10832, 0x10833, 0x10834, 0x10835, 0x10837, + 0x10838, 0x1083C, 0x1083F, 0x10840, 0x10841, 0x10842, 0x10843, 0x10844, + 0x10845, 0x10846, 0x10847, 0x10848, 0x10849, 0x1084A, 0x1084B, 0x1084C, + 0x1084D, 0x1084E, 0x1084F, 0x10850, 0x10851, 0x10852, 0x10853, 0x10854, + 0x10855, 0x10857, 0x10858, 0x10859, 0x1085A, 0x1085B, 0x1085C, 0x1085D, + 0x1085E, 0x1085F, 0x10900, 0x10901, 0x10902, 0x10903, 0x10904, 0x10905, + 0x10906, 0x10907, 0x10908, 0x10909, 0x1090A, 0x1090B, 0x1090C, 0x1090D, + 0x1090E, 0x1090F, 0x10910, 0x10911, 0x10912, 0x10913, 0x10914, 0x10915, + 0x10916, 0x10917, 0x10918, 0x10919, 0x1091A, 0x1091B, 0x10920, 0x10921, + 0x10922, 0x10923, 0x10924, 0x10925, 0x10926, 0x10927, 0x10928, 0x10929, + 0x1092A, 0x1092B, 0x1092C, 0x1092D, 0x1092E, 0x1092F, 0x10930, 0x10931, + 0x10932, 0x10933, 0x10934, 0x10935, 0x10936, 0x10937, 0x10938, 0x10939, + 0x1093F, 0x10980, 0x10981, 0x10982, 0x10983, 0x10984, 0x10985, 0x10986, + 0x10987, 0x10988, 0x10989, 0x1098A, 0x1098B, 0x1098C, 0x1098D, 0x1098E, + 0x1098F, 0x10990, 0x10991, 0x10992, 0x10993, 0x10994, 0x10995, 0x10996, + 0x10997, 0x10998, 0x10999, 0x1099A, 0x1099B, 0x1099C, 0x1099D, 0x1099E, + 0x1099F, 0x109A0, 0x109A1, 0x109A2, 0x109A3, 0x109A4, 0x109A5, 0x109A6, + 0x109A7, 0x109A8, 0x109A9, 0x109AA, 0x109AB, 0x109AC, 0x109AD, 0x109AE, + 0x109AF, 0x109B0, 0x109B1, 0x109B2, 0x109B3, 0x109B4, 0x109B5, 0x109B6, + 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A10, 0x10A11, 0x10A12, 0x10A13, + 0x10A15, 0x10A16, 0x10A17, 0x10A19, 0x10A1A, 0x10A1B, 0x10A1C, 0x10A1D, + 0x10A1E, 0x10A1F, 0x10A20, 0x10A21, 0x10A22, 0x10A23, 0x10A24, 0x10A25, + 0x10A26, 0x10A27, 0x10A28, 0x10A29, 0x10A2A, 0x10A2B, 0x10A2C, 0x10A2D, + 0x10A2E, 0x10A2F, 0x10A30, 0x10A31, 0x10A32, 0x10A33, 0x10A40, 0x10A41, + 0x10A42, 0x10A43, 0x10A44, 0x10A45, 0x10A46, 0x10A47, 0x10A50, 0x10A51, + 0x10A52, 0x10A53, 0x10A54, 0x10A55, 0x10A56, 0x10A57, 0x10A58, 0x10A60, + 0x10A61, 0x10A62, 0x10A63, 0x10A64, 0x10A65, 0x10A66, 0x10A67, 0x10A68, + 0x10A69, 0x10A6A, 0x10A6B, 0x10A6C, 0x10A6D, 0x10A6E, 0x10A6F, 0x10A70, + 0x10A71, 0x10A72, 0x10A73, 0x10A74, 0x10A75, 0x10A76, 0x10A77, 0x10A78, + 0x10A79, 0x10A7A, 0x10A7B, 0x10A7C, 0x10A7D, 0x10A7E, 0x10A7F, 0x10B00, + 0x10B01, 0x10B02, 0x10B03, 0x10B04, 0x10B05, 0x10B06, 0x10B07, 0x10B08, + 0x10B09, 0x10B0A, 0x10B0B, 0x10B0C, 0x10B0D, 0x10B0E, 0x10B0F, 0x10B10, + 0x10B11, 0x10B12, 0x10B13, 0x10B14, 0x10B15, 0x10B16, 0x10B17, 0x10B18, + 0x10B19, 0x10B1A, 0x10B1B, 0x10B1C, 0x10B1D, 0x10B1E, 0x10B1F, 0x10B20, + 0x10B21, 0x10B22, 0x10B23, 0x10B24, 0x10B25, 0x10B26, 0x10B27, 0x10B28, + 0x10B29, 0x10B2A, 0x10B2B, 0x10B2C, 0x10B2D, 0x10B2E, 0x10B2F, 0x10B30, + 0x10B31, 0x10B32, 0x10B33, 0x10B34, 0x10B35, 0x10B40, 0x10B41, 0x10B42, + 0x10B43, 0x10B44, 0x10B45, 0x10B46, 0x10B47, 0x10B48, 0x10B49, 0x10B4A, + 0x10B4B, 0x10B4C, 0x10B4D, 0x10B4E, 0x10B4F, 0x10B50, 0x10B51, 0x10B52, + 0x10B53, 0x10B54, 0x10B55, 0x10B58, 0x10B59, 0x10B5A, 0x10B5B, 0x10B5C, + 0x10B5D, 0x10B5E, 0x10B5F, 0x10B60, 0x10B61, 0x10B62, 0x10B63, 0x10B64, + 0x10B65, 0x10B66, 0x10B67, 0x10B68, 0x10B69, 0x10B6A, 0x10B6B, 0x10B6C, + 0x10B6D, 0x10B6E, 0x10B6F, 0x10B70, 0x10B71, 0x10B72, 0x10B78, 0x10B79, + 0x10B7A, 0x10B7B, 0x10B7C, 0x10B7D, 0x10B7E, 0x10B7F, 0x10C00, 0x10C01, + 0x10C02, 0x10C03, 0x10C04, 0x10C05, 0x10C06, 0x10C07, 0x10C08, 0x10C09, + 0x10C0A, 0x10C0B, 0x10C0C, 0x10C0D, 0x10C0E, 0x10C0F, 0x10C10, 0x10C11, + 0x10C12, 0x10C13, 0x10C14, 0x10C15, 0x10C16, 0x10C17, 0x10C18, 0x10C19, + 0x10C1A, 0x10C1B, 0x10C1C, 0x10C1D, 0x10C1E, 0x10C1F, 0x10C20, 0x10C21, + 0x10C22, 0x10C23, 0x10C24, 0x10C25, 0x10C26, 0x10C27, 0x10C28, 0x10C29, + 0x10C2A, 0x10C2B, 0x10C2C, 0x10C2D, 0x10C2E, 0x10C2F, 0x10C30, 0x10C31, + 0x10C32, 0x10C33, 0x10C34, 0x10C35, 0x10C36, 0x10C37, 0x10C38, 0x10C39, + 0x10C3A, 0x10C3B, 0x10C3C, 0x10C3D, 0x10C3E, 0x10C3F, 0x10C40, 0x10C41, + 0x10C42, 0x10C43, 0x10C44, 0x10C45, 0x10C46, 0x10C47, 0x10C48, 0x1EE00, + 0x1EE01, 0x1EE02, 0x1EE03, 0x1EE05, 0x1EE06, 0x1EE07, 0x1EE08, 0x1EE09, + 0x1EE0A, 0x1EE0B, 0x1EE0C, 0x1EE0D, 0x1EE0E, 0x1EE0F, 0x1EE10, 0x1EE11, + 0x1EE12, 0x1EE13, 0x1EE14, 0x1EE15, 0x1EE16, 0x1EE17, 0x1EE18, 0x1EE19, + 0x1EE1A, 0x1EE1B, 0x1EE1C, 0x1EE1D, 0x1EE1E, 0x1EE1F, 0x1EE21, 0x1EE22, + 0x1EE24, 0x1EE27, 0x1EE29, 0x1EE2A, 0x1EE2B, 0x1EE2C, 0x1EE2D, 0x1EE2E, + 0x1EE2F, 0x1EE30, 0x1EE31, 0x1EE32, 0x1EE34, 0x1EE35, 0x1EE36, 0x1EE37, + 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE4D, 0x1EE4E, + 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, + 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE67, 0x1EE68, 0x1EE69, 0x1EE6A, + 0x1EE6C, 0x1EE6D, 0x1EE6E, 0x1EE6F, 0x1EE70, 0x1EE71, 0x1EE72, 0x1EE74, + 0x1EE75, 0x1EE76, 0x1EE77, 0x1EE79, 0x1EE7A, 0x1EE7B, 0x1EE7C, 0x1EE7E, + 0x1EE80, 0x1EE81, 0x1EE82, 0x1EE83, 0x1EE84, 0x1EE85, 0x1EE86, 0x1EE87, + 0x1EE88, 0x1EE89, 0x1EE8B, 0x1EE8C, 0x1EE8D, 0x1EE8E, 0x1EE8F, 0x1EE90, + 0x1EE91, 0x1EE92, 0x1EE93, 0x1EE94, 0x1EE95, 0x1EE96, 0x1EE97, 0x1EE98, + 0x1EE99, 0x1EE9A, 0x1EE9B, 0x1EEA1, 0x1EEA2, 0x1EEA3, 0x1EEA5, 0x1EEA6, + 0x1EEA7, 0x1EEA8, 0x1EEA9, 0x1EEAB, 0x1EEAC, 0x1EEAD, 0x1EEAE, 0x1EEAF, + 0x1EEB0, 0x1EEB1, 0x1EEB2, 0x1EEB3, 0x1EEB4, 0x1EEB5, 0x1EEB6, 0x1EEB7, + 0x1EEB8, 0x1EEB9, 0x1EEBA, 0x1EEBB, 0x10FFFD]; + + function determineBidi(cueDiv) { + var nodeStack = [], + text = "", + charCode; + + if (!cueDiv || !cueDiv.childNodes) { + return "ltr"; + } + + function pushNodes(nodeStack, node) { + for (var i = node.childNodes.length - 1; i >= 0; i--) { + nodeStack.push(node.childNodes[i]); + } + } + + function nextTextNode(nodeStack) { + if (!nodeStack || !nodeStack.length) { + return null; + } + + var node = nodeStack.pop(), + text = node.textContent || node.innerText; + if (text) { + // TODO: This should match all unicode type B characters (paragraph + // separator characters). See issue #115. + var m = text.match(/^.*(\n|\r)/); + if (m) { + nodeStack.length = 0; + return m[0]; + } + return text; + } + if (node.tagName === "ruby") { + return nextTextNode(nodeStack); + } + if (node.childNodes) { + pushNodes(nodeStack, node); + return nextTextNode(nodeStack); + } + } + + pushNodes(nodeStack, cueDiv); + while ((text = nextTextNode(nodeStack))) { + for (var i = 0; i < text.length; i++) { + charCode = text.charCodeAt(i); + for (var j = 0; j < strongRTLChars.length; j++) { + if (strongRTLChars[j] === charCode) { + return "rtl"; + } + } + } + } + return "ltr"; + } + + function computeLinePos(cue) { + if (typeof cue.line === "number" && + (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) { + return cue.line; + } + if (!cue.track || !cue.track.textTrackList || + !cue.track.textTrackList.mediaElement) { + return -1; + } + var track = cue.track, + trackList = track.textTrackList, + count = 0; + for (var i = 0; i < trackList.length && trackList[i] !== track; i++) { + if (trackList[i].mode === "showing") { + count++; + } + } + return ++count * -1; + } + + function StyleBox() { + } + + // Apply styles to a div. If there is no div passed then it defaults to the + // div on 'this'. + StyleBox.prototype.applyStyles = function(styles, div) { + div = div || this.div; + for (var prop in styles) { + if (styles.hasOwnProperty(prop)) { + div.style[prop] = styles[prop]; + } + } + }; + + StyleBox.prototype.formatStyle = function(val, unit) { + return val === 0 ? 0 : val + unit; + }; + + // Constructs the computed display state of the cue (a div). Places the div + // into the overlay which should be a block level element (usually a div). + function CueStyleBox(window, cue, styleOptions) { + var isIE8 = (/MSIE\s8\.0/).test(navigator.userAgent); + var color = "rgba(255, 255, 255, 1)"; + var backgroundColor = "rgba(0, 0, 0, 0.8)"; + + if (isIE8) { + color = "rgb(255, 255, 255)"; + backgroundColor = "rgb(0, 0, 0)"; + } + + StyleBox.call(this); + this.cue = cue; + + // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will + // have inline positioning and will function as the cue background box. + this.cueDiv = parseContent(window, cue.text); + var styles = { + color: color, + backgroundColor: backgroundColor, + position: "relative", + left: 0, + right: 0, + top: 0, + bottom: 0, + display: "inline" + }; + + if (!isIE8) { + styles.writingMode = cue.vertical === "" ? "horizontal-tb" + : cue.vertical === "lr" ? "vertical-lr" + : "vertical-rl"; + styles.unicodeBidi = "plaintext"; + } + this.applyStyles(styles, this.cueDiv); + + // Create an absolutely positioned div that will be used to position the cue + // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS + // mirrors of them except "middle" which is "center" in CSS. + this.div = window.document.createElement("div"); + styles = { + textAlign: cue.align === "middle" ? "center" : cue.align, + font: styleOptions.font, + whiteSpace: "pre-line", + position: "absolute" + }; + + if (!isIE8) { + styles.direction = determineBidi(this.cueDiv); + styles.writingMode = cue.vertical === "" ? "horizontal-tb" + : cue.vertical === "lr" ? "vertical-lr" + : "vertical-rl". + stylesunicodeBidi = "plaintext"; + } + + this.applyStyles(styles); + + this.div.appendChild(this.cueDiv); + + // Calculate the distance from the reference edge of the viewport to the text + // position of the cue box. The reference edge will be resolved later when + // the box orientation styles are applied. + var textPos = 0; + switch (cue.positionAlign) { + case "start": + textPos = cue.position; + break; + case "middle": + textPos = cue.position - (cue.size / 2); + break; + case "end": + textPos = cue.position - cue.size; + break; + } + + // Horizontal box orientation; textPos is the distance from the left edge of the + // area to the left edge of the box and cue.size is the distance extending to + // the right from there. + if (cue.vertical === "") { + this.applyStyles({ + left: this.formatStyle(textPos, "%"), + width: this.formatStyle(cue.size, "%") + }); + // Vertical box orientation; textPos is the distance from the top edge of the + // area to the top edge of the box and cue.size is the height extending + // downwards from there. + } else { + this.applyStyles({ + top: this.formatStyle(textPos, "%"), + height: this.formatStyle(cue.size, "%") + }); + } + + this.move = function(box) { + this.applyStyles({ + top: this.formatStyle(box.top, "px"), + bottom: this.formatStyle(box.bottom, "px"), + left: this.formatStyle(box.left, "px"), + right: this.formatStyle(box.right, "px"), + height: this.formatStyle(box.height, "px"), + width: this.formatStyle(box.width, "px") + }); + }; + } + CueStyleBox.prototype = _objCreate(StyleBox.prototype); + CueStyleBox.prototype.constructor = CueStyleBox; + + // Represents the co-ordinates of an Element in a way that we can easily + // compute things with such as if it overlaps or intersects with another Element. + // Can initialize it with either a StyleBox or another BoxPosition. + function BoxPosition(obj) { + var isIE8 = (/MSIE\s8\.0/).test(navigator.userAgent); + + // Either a BoxPosition was passed in and we need to copy it, or a StyleBox + // was passed in and we need to copy the results of 'getBoundingClientRect' + // as the object returned is readonly. All co-ordinate values are in reference + // to the viewport origin (top left). + var lh, height, width, top; + if (obj.div) { + height = obj.div.offsetHeight; + width = obj.div.offsetWidth; + top = obj.div.offsetTop; + + var rects = (rects = obj.div.childNodes) && (rects = rects[0]) && + rects.getClientRects && rects.getClientRects(); + obj = obj.div.getBoundingClientRect(); + // In certain cases the outter div will be slightly larger then the sum of + // the inner div's lines. This could be due to bold text, etc, on some platforms. + // In this case we should get the average line height and use that. This will + // result in the desired behaviour. + lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length) + : 0; + + } + this.left = obj.left; + this.right = obj.right; + this.top = obj.top || top; + this.height = obj.height || height; + this.bottom = obj.bottom || (top + (obj.height || height)); + this.width = obj.width || width; + this.lineHeight = lh !== undefined ? lh : obj.lineHeight; + + if (isIE8 && !this.lineHeight) { + this.lineHeight = 13; + } + } + + // Move the box along a particular axis. Optionally pass in an amount to move + // the box. If no amount is passed then the default is the line height of the + // box. + BoxPosition.prototype.move = function(axis, toMove) { + toMove = toMove !== undefined ? toMove : this.lineHeight; + switch (axis) { + case "+x": + this.left += toMove; + this.right += toMove; + break; + case "-x": + this.left -= toMove; + this.right -= toMove; + break; + case "+y": + this.top += toMove; + this.bottom += toMove; + break; + case "-y": + this.top -= toMove; + this.bottom -= toMove; + break; + } + }; + + // Check if this box overlaps another box, b2. + BoxPosition.prototype.overlaps = function(b2) { + return this.left < b2.right && + this.right > b2.left && + this.top < b2.bottom && + this.bottom > b2.top; + }; + + // Check if this box overlaps any other boxes in boxes. + BoxPosition.prototype.overlapsAny = function(boxes) { + for (var i = 0; i < boxes.length; i++) { + if (this.overlaps(boxes[i])) { + return true; + } + } + return false; + }; + + // Check if this box is within another box. + BoxPosition.prototype.within = function(container) { + return this.top >= container.top && + this.bottom <= container.bottom && + this.left >= container.left && + this.right <= container.right; + }; + + // Check if this box is entirely within the container or it is overlapping + // on the edge opposite of the axis direction passed. For example, if "+x" is + // passed and the box is overlapping on the left edge of the container, then + // return true. + BoxPosition.prototype.overlapsOppositeAxis = function(container, axis) { + switch (axis) { + case "+x": + return this.left < container.left; + case "-x": + return this.right > container.right; + case "+y": + return this.top < container.top; + case "-y": + return this.bottom > container.bottom; + } + }; + + // Find the percentage of the area that this box is overlapping with another + // box. + BoxPosition.prototype.intersectPercentage = function(b2) { + var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)), + y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)), + intersectArea = x * y; + return intersectArea / (this.height * this.width); + }; + + // Convert the positions from this box to CSS compatible positions using + // the reference container's positions. This has to be done because this + // box's positions are in reference to the viewport origin, whereas, CSS + // values are in referecne to their respective edges. + BoxPosition.prototype.toCSSCompatValues = function(reference) { + return { + top: this.top - reference.top, + bottom: reference.bottom - this.bottom, + left: this.left - reference.left, + right: reference.right - this.right, + height: this.height, + width: this.width + }; + }; + + // Get an object that represents the box's position without anything extra. + // Can pass a StyleBox, HTMLElement, or another BoxPositon. + BoxPosition.getSimpleBoxPosition = function(obj) { + var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0; + var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0; + var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0; + + obj = obj.div ? obj.div.getBoundingClientRect() : + obj.tagName ? obj.getBoundingClientRect() : obj; + var ret = { + left: obj.left, + right: obj.right, + top: obj.top || top, + height: obj.height || height, + bottom: obj.bottom || (top + (obj.height || height)), + width: obj.width || width + }; + return ret; + }; + + // Move a StyleBox to its specified, or next best, position. The containerBox + // is the box that contains the StyleBox, such as a div. boxPositions are + // a list of other boxes that the styleBox can't overlap with. + function moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) { + + // Find the best position for a cue box, b, on the video. The axis parameter + // is a list of axis, the order of which, it will move the box along. For example: + // Passing ["+x", "-x"] will move the box first along the x axis in the positive + // direction. If it doesn't find a good position for it there it will then move + // it along the x axis in the negative direction. + function findBestPosition(b, axis) { + var bestPosition, + specifiedPosition = new BoxPosition(b), + percentage = 1; // Highest possible so the first thing we get is better. + + for (var i = 0; i < axis.length; i++) { + while (b.overlapsOppositeAxis(containerBox, axis[i]) || + (b.within(containerBox) && b.overlapsAny(boxPositions))) { + b.move(axis[i]); + } + // We found a spot where we aren't overlapping anything. This is our + // best position. + if (b.within(containerBox)) { + return b; + } + var p = b.intersectPercentage(containerBox); + // If we're outside the container box less then we were on our last try + // then remember this position as the best position. + if (percentage > p) { + bestPosition = new BoxPosition(b); + percentage = p; + } + // Reset the box position to the specified position. + b = new BoxPosition(specifiedPosition); + } + return bestPosition || specifiedPosition; + } + + var boxPosition = new BoxPosition(styleBox), + cue = styleBox.cue, + linePos = computeLinePos(cue), + axis = []; + + // If we have a line number to align the cue to. + if (cue.snapToLines) { + var size; + switch (cue.vertical) { + case "": + axis = [ "+y", "-y" ]; + size = "height"; + break; + case "rl": + axis = [ "+x", "-x" ]; + size = "width"; + break; + case "lr": + axis = [ "-x", "+x" ]; + size = "width"; + break; + } + + var step = boxPosition.lineHeight, + position = step * Math.round(linePos), + maxPosition = containerBox[size] + step, + initialAxis = axis[0]; + + // If the specified intial position is greater then the max position then + // clamp the box to the amount of steps it would take for the box to + // reach the max position. + if (Math.abs(position) > maxPosition) { + position = position < 0 ? -1 : 1; + position *= Math.ceil(maxPosition / step) * step; + } + + // If computed line position returns negative then line numbers are + // relative to the bottom of the video instead of the top. Therefore, we + // need to increase our initial position by the length or width of the + // video, depending on the writing direction, and reverse our axis directions. + if (linePos < 0) { + position += cue.vertical === "" ? containerBox.height : containerBox.width; + axis = axis.reverse(); + } + + // Move the box to the specified position. This may not be its best + // position. + boxPosition.move(initialAxis, position); + + } else { + // If we have a percentage line value for the cue. + var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100; + + switch (cue.lineAlign) { + case "middle": + linePos -= (calculatedPercentage / 2); + break; + case "end": + linePos -= calculatedPercentage; + break; + } + + // Apply initial line position to the cue box. + switch (cue.vertical) { + case "": + styleBox.applyStyles({ + top: styleBox.formatStyle(linePos, "%") + }); + break; + case "rl": + styleBox.applyStyles({ + left: styleBox.formatStyle(linePos, "%") + }); + break; + case "lr": + styleBox.applyStyles({ + right: styleBox.formatStyle(linePos, "%") + }); + break; + } + + axis = [ "+y", "-x", "+x", "-y" ]; + + // Get the box position again after we've applied the specified positioning + // to it. + boxPosition = new BoxPosition(styleBox); + } + + var bestPosition = findBestPosition(boxPosition, axis); + styleBox.move(bestPosition.toCSSCompatValues(containerBox)); + } + + function WebVTT() { + // Nothing + } + + // Helper to allow strings to be decoded instead of the default binary utf8 data. + WebVTT.StringDecoder = function() { + return { + decode: function(data) { + if (!data) { + return ""; + } + if (typeof data !== "string") { + throw new Error("Error - expected string data."); + } + return decodeURIComponent(encodeURIComponent(data)); + } + }; + }; + + WebVTT.convertCueToDOMTree = function(window, cuetext) { + if (!window || !cuetext) { + return null; + } + return parseContent(window, cuetext); + }; + + var FONT_SIZE_PERCENT = 0.05; + var FONT_STYLE = "sans-serif"; + var CUE_BACKGROUND_PADDING = "1.5%"; + + // Runs the processing model over the cues and regions passed to it. + // @param overlay A block level element (usually a div) that the computed cues + // and regions will be placed into. + WebVTT.processCues = function(window, cues, overlay) { + if (!window || !cues || !overlay) { + return null; + } + + // Remove all previous children. + while (overlay.firstChild) { + overlay.removeChild(overlay.firstChild); + } + + var paddedOverlay = window.document.createElement("div"); + paddedOverlay.style.position = "absolute"; + paddedOverlay.style.left = "0"; + paddedOverlay.style.right = "0"; + paddedOverlay.style.top = "0"; + paddedOverlay.style.bottom = "0"; + paddedOverlay.style.margin = CUE_BACKGROUND_PADDING; + overlay.appendChild(paddedOverlay); + + // Determine if we need to compute the display states of the cues. This could + // be the case if a cue's state has been changed since the last computation or + // if it has not been computed yet. + function shouldCompute(cues) { + for (var i = 0; i < cues.length; i++) { + if (cues[i].hasBeenReset || !cues[i].displayState) { + return true; + } + } + return false; + } + + // We don't need to recompute the cues' display states. Just reuse them. + if (!shouldCompute(cues)) { + for (var i = 0; i < cues.length; i++) { + paddedOverlay.appendChild(cues[i].displayState); + } + return; + } + + var boxPositions = [], + containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay), + fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100; + var styleOptions = { + font: fontSize + "px " + FONT_STYLE + }; + + (function() { + var styleBox, cue; + + for (var i = 0; i < cues.length; i++) { + cue = cues[i]; + + // Compute the intial position and styles of the cue div. + styleBox = new CueStyleBox(window, cue, styleOptions); + paddedOverlay.appendChild(styleBox.div); + + // Move the cue div to it's correct line position. + moveBoxToLinePosition(window, styleBox, containerBox, boxPositions); + + // Remember the computed div so that we don't have to recompute it later + // if we don't have too. + cue.displayState = styleBox.div; + + boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox)); + } + })(); + }; + + WebVTT.Parser = function(window, vttjs, decoder) { + if (!decoder) { + decoder = vttjs; + vttjs = {}; + } + if (!vttjs) { + vttjs = {}; + } + + this.window = window; + this.vttjs = vttjs; + this.state = "INITIAL"; + this.buffer = ""; + this.decoder = decoder || new TextDecoder("utf8"); + this.regionList = []; + }; + + WebVTT.Parser.prototype = { + // If the error is a ParsingError then report it to the consumer if + // possible. If it's not a ParsingError then throw it like normal. + reportOrThrowError: function(e) { + if (e instanceof ParsingError) { + this.onparsingerror && this.onparsingerror(e); + } else { + throw e; + } + }, + parse: function (data) { + var self = this; + + // If there is no data then we won't decode it, but will just try to parse + // whatever is in buffer already. This may occur in circumstances, for + // example when flush() is called. + if (data) { + // Try to decode the data that we received. + self.buffer += self.decoder.decode(data, {stream: true}); + } + + function collectNextLine() { + var buffer = self.buffer; + var pos = 0; + while (pos < buffer.length && buffer[pos] !== '\r' && buffer[pos] !== '\n') { + ++pos; + } + var line = buffer.substr(0, pos); + // Advance the buffer early in case we fail below. + if (buffer[pos] === '\r') { + ++pos; + } + if (buffer[pos] === '\n') { + ++pos; + } + self.buffer = buffer.substr(pos); + return line; + } + + // 3.4 WebVTT region and WebVTT region settings syntax + function parseRegion(input) { + var settings = new Settings(); + + parseOptions(input, function (k, v) { + switch (k) { + case "id": + settings.set(k, v); + break; + case "width": + settings.percent(k, v); + break; + case "lines": + settings.integer(k, v); + break; + case "regionanchor": + case "viewportanchor": + var xy = v.split(','); + if (xy.length !== 2) { + break; + } + // We have to make sure both x and y parse, so use a temporary + // settings object here. + var anchor = new Settings(); + anchor.percent("x", xy[0]); + anchor.percent("y", xy[1]); + if (!anchor.has("x") || !anchor.has("y")) { + break; + } + settings.set(k + "X", anchor.get("x")); + settings.set(k + "Y", anchor.get("y")); + break; + case "scroll": + settings.alt(k, v, ["up"]); + break; + } + }, /=/, /\s/); + + // Create the region, using default values for any values that were not + // specified. + if (settings.has("id")) { + var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)(); + region.width = settings.get("width", 100); + region.lines = settings.get("lines", 3); + region.regionAnchorX = settings.get("regionanchorX", 0); + region.regionAnchorY = settings.get("regionanchorY", 100); + region.viewportAnchorX = settings.get("viewportanchorX", 0); + region.viewportAnchorY = settings.get("viewportanchorY", 100); + region.scroll = settings.get("scroll", ""); + // Register the region. + self.onregion && self.onregion(region); + // Remember the VTTRegion for later in case we parse any VTTCues that + // reference it. + self.regionList.push({ + id: settings.get("id"), + region: region + }); + } + } + + // 3.2 WebVTT metadata header syntax + function parseHeader(input) { + parseOptions(input, function (k, v) { + switch (k) { + case "Region": + // 3.3 WebVTT region metadata header syntax + parseRegion(v); + break; + } + }, /:/); + } + + // 5.1 WebVTT file parsing. + try { + var line; + if (self.state === "INITIAL") { + // We can't start parsing until we have the first line. + if (!/\r\n|\n/.test(self.buffer)) { + return this; + } + + line = collectNextLine(); + + var m = line.match(/^WEBVTT([ \t].*)?$/); + if (!m || !m[0]) { + throw new ParsingError(ParsingError.Errors.BadSignature); + } + + self.state = "HEADER"; + } + + var alreadyCollectedLine = false; + while (self.buffer) { + // We can't parse a line until we have the full line. + if (!/\r\n|\n/.test(self.buffer)) { + return this; + } + + if (!alreadyCollectedLine) { + line = collectNextLine(); + } else { + alreadyCollectedLine = false; + } + + switch (self.state) { + case "HEADER": + // 13-18 - Allow a header (metadata) under the WEBVTT line. + if (/:/.test(line)) { + parseHeader(line); + } else if (!line) { + // An empty line terminates the header and starts the body (cues). + self.state = "ID"; + } + continue; + case "NOTE": + // Ignore NOTE blocks. + if (!line) { + self.state = "ID"; + } + continue; + case "ID": + // Check for the start of NOTE blocks. + if (/^NOTE($|[ \t])/.test(line)) { + self.state = "NOTE"; + break; + } + // 19-29 - Allow any number of line terminators, then initialize new cue values. + if (!line) { + continue; + } + self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, ""); + self.state = "CUE"; + // 30-39 - Check if self line contains an optional identifier or timing data. + if (line.indexOf("-->") === -1) { + self.cue.id = line; + continue; + } + // Process line as start of a cue. + /*falls through*/ + case "CUE": + // 40 - Collect cue timings and settings. + try { + parseCue(line, self.cue, self.regionList); + } catch (e) { + self.reportOrThrowError(e); + // In case of an error ignore rest of the cue. + self.cue = null; + self.state = "BADCUE"; + continue; + } + self.state = "CUETEXT"; + continue; + case "CUETEXT": + var hasSubstring = line.indexOf("-->") !== -1; + // 34 - If we have an empty line then report the cue. + // 35 - If we have the special substring '-->' then report the cue, + // but do not collect the line as we need to process the current + // one as a new cue. + if (!line || hasSubstring && (alreadyCollectedLine = true)) { + // We are done parsing self cue. + self.oncue && self.oncue(self.cue); + self.cue = null; + self.state = "ID"; + continue; + } + if (self.cue.text) { + self.cue.text += "\n"; + } + self.cue.text += line; + continue; + case "BADCUE": // BADCUE + // 54-62 - Collect and discard the remaining cue. + if (!line) { + self.state = "ID"; + } + continue; + } + } + } catch (e) { + self.reportOrThrowError(e); + + // If we are currently parsing a cue, report what we have. + if (self.state === "CUETEXT" && self.cue && self.oncue) { + self.oncue(self.cue); + } + self.cue = null; + // Enter BADWEBVTT state if header was not parsed correctly otherwise + // another exception occurred so enter BADCUE state. + self.state = self.state === "INITIAL" ? "BADWEBVTT" : "BADCUE"; + } + return this; + }, + flush: function () { + var self = this; + try { + // Finish decoding the stream. + self.buffer += self.decoder.decode(); + // Synthesize the end of the current cue or region. + if (self.cue || self.state === "HEADER") { + self.buffer += "\n\n"; + self.parse(); + } + // If we've flushed, parsed, and we're still on the INITIAL state then + // that means we don't have enough of the stream to parse the first + // line. + if (self.state === "INITIAL") { + throw new ParsingError(ParsingError.Errors.BadSignature); + } + } catch(e) { + self.reportOrThrowError(e); + } + self.onflush && self.onflush(); + return this; + } + }; + + global.WebVTT = WebVTT; + +}(this, (this.vttjs || {}))); diff --git a/vendor/assets/javascripts/videojs/video.js.map b/vendor/assets/javascripts/videojs/video.js.map new file mode 100755 index 00000000000..d5e92c6cdd8 --- /dev/null +++ b/vendor/assets/javascripts/videojs/video.js.map @@ -0,0 +1,303 @@ +{ + "version": 3, + "sources": [ + "node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-pack/_prelude.js", + "node_modules/global/document.js", + "node_modules/global/window.js", + "node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-resolve/empty.js", + "node_modules/lodash-compat/date/now.js", + "node_modules/lodash-compat/function/debounce.js", + "node_modules/lodash-compat/function/restParam.js", + "node_modules/lodash-compat/function/throttle.js", + "node_modules/lodash-compat/internal/arrayCopy.js", + "node_modules/lodash-compat/internal/arrayEach.js", + "node_modules/lodash-compat/internal/baseCopy.js", + "node_modules/lodash-compat/internal/baseFor.js", + "node_modules/lodash-compat/internal/baseForIn.js", + "node_modules/lodash-compat/internal/baseMerge.js", + "node_modules/lodash-compat/internal/baseMergeDeep.js", + "node_modules/lodash-compat/internal/baseProperty.js", + "node_modules/lodash-compat/internal/bindCallback.js", + "node_modules/lodash-compat/internal/createAssigner.js", + "node_modules/lodash-compat/internal/createBaseFor.js", + "node_modules/lodash-compat/internal/getLength.js", + "node_modules/lodash-compat/internal/getNative.js", + "node_modules/lodash-compat/internal/isArrayLike.js", + "node_modules/lodash-compat/internal/isHostObject.js", + "node_modules/lodash-compat/internal/isIndex.js", + "node_modules/lodash-compat/internal/isIterateeCall.js", + "node_modules/lodash-compat/internal/isLength.js", + "node_modules/lodash-compat/internal/isObjectLike.js", + "node_modules/lodash-compat/internal/shimKeys.js", + "node_modules/lodash-compat/internal/toObject.js", + "node_modules/lodash-compat/lang/isArguments.js", + "node_modules/lodash-compat/lang/isArray.js", + "node_modules/lodash-compat/lang/isFunction.js", + "node_modules/lodash-compat/lang/isNative.js", + "node_modules/lodash-compat/lang/isObject.js", + "node_modules/lodash-compat/lang/isPlainObject.js", + "node_modules/lodash-compat/lang/isString.js", + "node_modules/lodash-compat/lang/isTypedArray.js", + "node_modules/lodash-compat/lang/toPlainObject.js", + "node_modules/lodash-compat/object/keys.js", + "node_modules/lodash-compat/object/keysIn.js", + "node_modules/lodash-compat/object/merge.js", + "node_modules/lodash-compat/support.js", + "node_modules/lodash-compat/utility/identity.js", + "node_modules/object.assign/hasSymbols.js", + "node_modules/object.assign/implementation.js", + "node_modules/object.assign/index.js", + "node_modules/object.assign/node_modules/define-properties/index.js", + "node_modules/object.assign/node_modules/define-properties/node_modules/foreach/index.js", + "node_modules/object.assign/node_modules/function-bind/implementation.js", + "node_modules/object.assign/node_modules/function-bind/index.js", + "node_modules/object.assign/node_modules/object-keys/index.js", + "node_modules/object.assign/node_modules/object-keys/isArguments.js", + "node_modules/object.assign/polyfill.js", + "node_modules/object.assign/shim.js", + "node_modules/safe-json-parse/tuple.js", + "node_modules/tsml/tsml.js", + "node_modules/xhr/index.js", + "node_modules/xhr/node_modules/is-function/index.js", + "node_modules/xhr/node_modules/once/once.js", + "node_modules/xhr/node_modules/parse-headers/node_modules/for-each/index.js", + "node_modules/xhr/node_modules/parse-headers/node_modules/trim/index.js", + "node_modules/xhr/node_modules/parse-headers/parse-headers.js", + "node_modules/xhr/node_modules/xtend/immutable.js", + "src/js/big-play-button.js", + "src/js/button.js", + "src/js/clickable-component.js", + "src/js/close-button.js", + "src/js/component.js", + "src/js/control-bar/control-bar.js", + "src/js/control-bar/fullscreen-toggle.js", + "src/js/control-bar/live-display.js", + "src/js/control-bar/mute-toggle.js", + "src/js/control-bar/play-toggle.js", + "src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js", + "src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js", + "src/js/control-bar/progress-control/load-progress-bar.js", + "src/js/control-bar/progress-control/mouse-time-display.js", + "src/js/control-bar/progress-control/play-progress-bar.js", + "src/js/control-bar/progress-control/progress-control.js", + "src/js/control-bar/progress-control/seek-bar.js", + "src/js/control-bar/progress-control/tooltip-progress-bar.js", + "src/js/control-bar/spacer-controls/custom-control-spacer.js", + "src/js/control-bar/spacer-controls/spacer.js", + "src/js/control-bar/text-track-controls/caption-settings-menu-item.js", + "src/js/control-bar/text-track-controls/captions-button.js", + "src/js/control-bar/text-track-controls/chapters-button.js", + "src/js/control-bar/text-track-controls/chapters-track-menu-item.js", + "src/js/control-bar/text-track-controls/descriptions-button.js", + "src/js/control-bar/text-track-controls/off-text-track-menu-item.js", + "src/js/control-bar/text-track-controls/subtitles-button.js", + "src/js/control-bar/text-track-controls/text-track-button.js", + "src/js/control-bar/text-track-controls/text-track-menu-item.js", + "src/js/control-bar/time-controls/current-time-display.js", + "src/js/control-bar/time-controls/duration-display.js", + "src/js/control-bar/time-controls/remaining-time-display.js", + "src/js/control-bar/time-controls/time-divider.js", + "src/js/control-bar/volume-control/volume-bar.js", + "src/js/control-bar/volume-control/volume-control.js", + "src/js/control-bar/volume-control/volume-level.js", + "src/js/control-bar/volume-menu-button.js", + "src/js/error-display.js", + "src/js/event-target.js", + "src/js/extend.js", + "src/js/fullscreen-api.js", + "src/js/loading-spinner.js", + "src/js/media-error.js", + "src/js/menu/menu-button.js", + "src/js/menu/menu-item.js", + "src/js/menu/menu.js", + "src/js/modal-dialog.js", + "src/js/player.js", + "src/js/plugins.js", + "src/js/popup/popup-button.js", + "src/js/popup/popup.js", + "src/js/poster-image.js", + "src/js/setup.js", + "src/js/slider/slider.js", + "src/js/tech/flash-rtmp.js", + "src/js/tech/flash.js", + "src/js/tech/html5.js", + "src/js/tech/loader.js", + "src/js/tech/tech.js", + "src/js/tracks/html-track-element-list.js", + "src/js/tracks/html-track-element.js", + "src/js/tracks/text-track-cue-list.js", + "src/js/tracks/text-track-display.js", + "src/js/tracks/text-track-enums.js", + "src/js/tracks/text-track-list-converter.js", + "src/js/tracks/text-track-list.js", + "src/js/tracks/text-track-settings.js", + "src/js/tracks/text-track.js", + "src/js/utils/browser.js", + "src/js/utils/buffer.js", + "src/js/utils/create-deprecation-proxy.js", + "src/js/utils/dom.js", + "src/js/utils/events.js", + "src/js/utils/fn.js", + "src/js/utils/format-time.js", + "src/js/utils/guid.js", + "src/js/utils/log.js", + "src/js/utils/merge-options.js", + "src/js/utils/stylesheet.js", + "src/js/utils/time-ranges.js", + "src/js/utils/to-title-case.js", + "src/js/utils/url.js", + "src/js/video.js" + ], + "names": [], + "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;wBChBmB,aAAa;;;;2BACV,gBAAgB;;;;;;;;;;;;;;IAWhC,aAAa;YAAb,aAAa;;AAEN,WAFP,aAAa,CAEL,MAAM,EAAE,OAAO,EAAE;0BAFzB,aA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AO,CAAC,aAAa,GAAG,GAAG,CAAC,eAAe,CAAC;;;;;;;;;;;;AAY5C,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,eAAe,CAAC;;;;;;;;;AAS5C,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2B9B,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4B1C,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;AAS1C,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;AACjD,QAAM,CAAC,SAAS,EAAE,EAAE,EAAE,YAAU;AAAE,WAAO,OAAO,CAAC;GAAE,CAAC,CAAC;;;CAGtD,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACpE,UAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;GAC7B;;qBAEc,OAAO", + "file": "generated.js", + "sourceRoot": "", + "sourcesContent": [ + "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o logs the number of milliseconds it took for the deferred function to be invoked\n */\nvar now = nativeNow || function() {\n return new Date().getTime();\n};\n\nmodule.exports = now;\n", + "var isObject = require('../lang/isObject'),\n now = require('../date/now');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed invocations. Provide an options object to indicate that `func`\n * should be invoked on the leading and/or trailing edge of the `wait` timeout.\n * Subsequent calls to the debounced function return the result of the last\n * `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the debounced function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=false] Specify invoking on the leading\n * edge of the timeout.\n * @param {number} [options.maxWait] The maximum time `func` is allowed to be\n * delayed before it's invoked.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // avoid costly calculations while the window size is in flux\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // invoke `sendMail` when the click event is fired, debouncing subsequent calls\n * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // ensure `batchLog` is invoked once after 1 second of debounced calls\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', _.debounce(batchLog, 250, {\n * 'maxWait': 1000\n * }));\n *\n * // cancel a debounced call\n * var todoChanges = _.debounce(batchLog, 1000);\n * Object.observe(models.todo, todoChanges);\n *\n * Object.observe(models, function(changes) {\n * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {\n * todoChanges.cancel();\n * }\n * }, ['delete']);\n *\n * // ...at some point `models.todo` is changed\n * models.todo.completed = true;\n *\n * // ...before 1 second has passed `models.todo` is deleted\n * // which cancels the debounced `todoChanges` call\n * delete models.todo;\n */\nfunction debounce(func, wait, options) {\n var args,\n maxTimeoutId,\n result,\n stamp,\n thisArg,\n timeoutId,\n trailingCall,\n lastCalled = 0,\n maxWait = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = wait < 0 ? 0 : (+wait || 0);\n if (options === true) {\n var leading = true;\n trailing = false;\n } else if (isObject(options)) {\n leading = !!options.leading;\n maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (maxTimeoutId) {\n clearTimeout(maxTimeoutId);\n }\n lastCalled = 0;\n maxTimeoutId = timeoutId = trailingCall = undefined;\n }\n\n function complete(isCalled, id) {\n if (id) {\n clearTimeout(id);\n }\n maxTimeoutId = timeoutId = trailingCall = undefined;\n if (isCalled) {\n lastCalled = now();\n result = func.apply(thisArg, args);\n if (!timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n }\n }\n\n function delayed() {\n var remaining = wait - (now() - stamp);\n if (remaining <= 0 || remaining > wait) {\n complete(trailingCall, maxTimeoutId);\n } else {\n timeoutId = setTimeout(delayed, remaining);\n }\n }\n\n function maxDelayed() {\n complete(trailing, timeoutId);\n }\n\n function debounced() {\n args = arguments;\n stamp = now();\n thisArg = this;\n trailingCall = trailing && (timeoutId || !leading);\n\n if (maxWait === false) {\n var leadingCall = leading && !timeoutId;\n } else {\n if (!maxTimeoutId && !leading) {\n lastCalled = stamp;\n }\n var remaining = maxWait - (stamp - lastCalled),\n isCalled = remaining <= 0 || remaining > maxWait;\n\n if (isCalled) {\n if (maxTimeoutId) {\n maxTimeoutId = clearTimeout(maxTimeoutId);\n }\n lastCalled = stamp;\n result = func.apply(thisArg, args);\n }\n else if (!maxTimeoutId) {\n maxTimeoutId = setTimeout(maxDelayed, remaining);\n }\n }\n if (isCalled && timeoutId) {\n timeoutId = clearTimeout(timeoutId);\n }\n else if (!timeoutId && wait !== maxWait) {\n timeoutId = setTimeout(delayed, wait);\n }\n if (leadingCall) {\n isCalled = true;\n result = func.apply(thisArg, args);\n }\n if (isCalled && !timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n return result;\n }\n debounced.cancel = cancel;\n return debounced;\n}\n\nmodule.exports = debounce;\n", + "/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as an array.\n *\n * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.restParam(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction restParam(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n rest = Array(length);\n\n while (++index < length) {\n rest[index] = args[start + index];\n }\n switch (start) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, args[0], rest);\n case 2: return func.call(this, args[0], args[1], rest);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = rest;\n return func.apply(this, otherArgs);\n };\n}\n\nmodule.exports = restParam;\n", + "var debounce = require('./debounce'),\n isObject = require('../lang/isObject');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed invocations. Provide an options object to indicate\n * that `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. Subsequent calls to the throttled function return the\n * result of the last `func` call.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the throttled function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=true] Specify invoking on the leading\n * edge of the timeout.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // avoid excessively updating the position while scrolling\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes\n * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {\n * 'trailing': false\n * }));\n *\n * // cancel a trailing throttled call\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (options === false) {\n leading = false;\n } else if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });\n}\n\nmodule.exports = throttle;\n", + "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction arrayCopy(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = arrayCopy;\n", + "/**\n * A specialized version of `_.forEach` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n", + "/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\nfunction baseCopy(source, props, object) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n object[key] = source[key];\n }\n return object;\n}\n\nmodule.exports = baseCopy;\n", + "var createBaseFor = require('./createBaseFor');\n\n/**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", + "var baseFor = require('./baseFor'),\n keysIn = require('../object/keysIn');\n\n/**\n * The base implementation of `_.forIn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForIn(object, iteratee) {\n return baseFor(object, iteratee, keysIn);\n}\n\nmodule.exports = baseForIn;\n", + "var arrayEach = require('./arrayEach'),\n baseMergeDeep = require('./baseMergeDeep'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isObject = require('../lang/isObject'),\n isObjectLike = require('./isObjectLike'),\n isTypedArray = require('../lang/isTypedArray'),\n keys = require('../object/keys');\n\n/**\n * The base implementation of `_.merge` without support for argument juggling,\n * multiple sources, and `this` binding `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {Object} Returns `object`.\n */\nfunction baseMerge(object, source, customizer, stackA, stackB) {\n if (!isObject(object)) {\n return object;\n }\n var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),\n props = isSrcArr ? undefined : keys(source);\n\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObjectLike(srcValue)) {\n stackA || (stackA = []);\n stackB || (stackB = []);\n baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);\n }\n else {\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n }\n if ((result !== undefined || (isSrcArr && !(key in object))) &&\n (isCommon || (result === result ? (result !== value) : (value === value)))) {\n object[key] = result;\n }\n }\n });\n return object;\n}\n\nmodule.exports = baseMerge;\n", + "var arrayCopy = require('./arrayCopy'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isPlainObject = require('../lang/isPlainObject'),\n isTypedArray = require('../lang/isTypedArray'),\n toPlainObject = require('../lang/toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {\n var length = stackA.length,\n srcValue = source[key];\n\n while (length--) {\n if (stackA[length] == srcValue) {\n object[key] = stackB[length];\n return;\n }\n }\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {\n result = isArray(value)\n ? value\n : (isArrayLike(value) ? arrayCopy(value) : []);\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n result = isArguments(value)\n ? toPlainObject(value)\n : (isPlainObject(value) ? value : {});\n }\n else {\n isCommon = false;\n }\n }\n // Add the source value to the stack of traversed objects and associate\n // it with its merged value.\n stackA.push(srcValue);\n stackB.push(result);\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);\n } else if (result === result ? (result !== value) : (value === value)) {\n object[key] = result;\n }\n}\n\nmodule.exports = baseMergeDeep;\n", + "var toObject = require('./toObject');\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : toObject(object)[key];\n };\n}\n\nmodule.exports = baseProperty;\n", + "var identity = require('../utility/identity');\n\n/**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction bindCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return identity;\n }\n if (thisArg === undefined) {\n return func;\n }\n switch (argCount) {\n case 1: return function(value) {\n return func.call(thisArg, value);\n };\n case 3: return function(value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n case 5: return function(value, other, key, object, source) {\n return func.call(thisArg, value, other, key, object, source);\n };\n }\n return function() {\n return func.apply(thisArg, arguments);\n };\n}\n\nmodule.exports = bindCallback;\n", + "var bindCallback = require('./bindCallback'),\n isIterateeCall = require('./isIterateeCall'),\n restParam = require('../function/restParam');\n\n/**\n * Creates a `_.assign`, `_.defaults`, or `_.merge` function.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return restParam(function(object, sources) {\n var index = -1,\n length = object == null ? 0 : sources.length,\n customizer = length > 2 ? sources[length - 2] : undefined,\n guard = length > 2 ? sources[2] : undefined,\n thisArg = length > 1 ? sources[length - 1] : undefined;\n\n if (typeof customizer == 'function') {\n customizer = bindCallback(customizer, thisArg, 5);\n length -= 2;\n } else {\n customizer = typeof thisArg == 'function' ? thisArg : undefined;\n length -= (customizer ? 1 : 0);\n }\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n", + "var toObject = require('./toObject');\n\n/**\n * Creates a base function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var iterable = toObject(object),\n props = keysFunc(object),\n length = props.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length)) {\n var key = props[index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", + "var baseProperty = require('./baseProperty');\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\nmodule.exports = getLength;\n", + "var isNative = require('../lang/isNative');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", + "var getLength = require('./getLength'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nfunction isArrayLike(value) {\n return value != null && isLength(getLength(value));\n}\n\nmodule.exports = isArrayLike;\n", + "/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nvar isHostObject = (function() {\n try {\n Object({ 'toString': 0 } + '');\n } catch(e) {\n return function() { return false; };\n }\n return function(value) {\n // IE < 9 presents many host objects as `Object` objects that can coerce\n // to strings despite having improperly defined `toString` methods.\n return typeof value.toString != 'function' && typeof (value + '') == 'string';\n };\n}());\n\nmodule.exports = isHostObject;\n", + "/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;\n", + "var isArrayLike = require('./isArrayLike'),\n isIndex = require('./isIndex'),\n isObject = require('../lang/isObject');\n\n/**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)) {\n var other = object[index];\n return value === value ? (value === other) : (other !== other);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n", + "/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", + "/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", + "var isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isIndex = require('./isIndex'),\n isLength = require('./isLength'),\n isString = require('../lang/isString'),\n keysIn = require('../object/keysIn');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction shimKeys(object) {\n var props = keysIn(object),\n propsLength = props.length,\n length = propsLength && object.length;\n\n var allowIndexes = !!length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object));\n\n var index = -1,\n result = [];\n\n while (++index < propsLength) {\n var key = props[index];\n if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = shimKeys;\n", + "var isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\nfunction toObject(value) {\n if (support.unindexedChars && isString(value)) {\n var index = -1,\n length = value.length,\n result = Object(value);\n\n while (++index < length) {\n result[index] = value.charAt(index);\n }\n return result;\n }\n return isObject(value) ? value : Object(value);\n}\n\nmodule.exports = toObject;\n", + "var isArrayLike = require('../internal/isArrayLike'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is classified as an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n return isObjectLike(value) && isArrayLike(value) &&\n hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n}\n\nmodule.exports = isArguments;\n", + "var getNative = require('../internal/getNative'),\n isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\nmodule.exports = isArray;\n", + "var isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 which returns 'object' for typed array constructors.\n return isObject(value) && objToString.call(value) == funcTag;\n}\n\nmodule.exports = isFunction;\n", + "var isFunction = require('./isFunction'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);\n}\n\nmodule.exports = isNative;\n", + "/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", + "var baseForIn = require('../internal/baseForIn'),\n isArguments = require('./isArguments'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * **Note:** This method assumes objects created by the `Object` constructor\n * have no inherited enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n var Ctor;\n\n // Exit early for non `Object` objects.\n if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) ||\n (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {\n return false;\n }\n // IE < 9 iterates inherited properties before own properties. If the first\n // iterated property is an object's own property then there are no inherited\n // enumerable properties.\n var result;\n if (support.ownLast) {\n baseForIn(value, function(subValue, key, object) {\n result = hasOwnProperty.call(object, key);\n return false;\n });\n return result !== false;\n }\n // In most environments an object's own properties are iterated before\n // its inherited properties. If the last iterated property is an object's\n // own property then there are no inherited enumerable properties.\n baseForIn(value, function(subValue, key) {\n result = key;\n });\n return result === undefined || hasOwnProperty.call(value, result);\n}\n\nmodule.exports = isPlainObject;\n", + "var isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n", + "var isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n", + "var baseCopy = require('../internal/baseCopy'),\n keysIn = require('../object/keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable\n * properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return baseCopy(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n", + "var getNative = require('../internal/getNative'),\n isArrayLike = require('../internal/isArrayLike'),\n isObject = require('../lang/isObject'),\n shimKeys = require('../internal/shimKeys'),\n support = require('../support');\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = getNative(Object, 'keys');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n var Ctor = object == null ? undefined : object.constructor;\n if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {\n return shimKeys(object);\n }\n return isObject(object) ? nativeKeys(object) : [];\n};\n\nmodule.exports = keys;\n", + "var arrayEach = require('../internal/arrayEach'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isFunction = require('../lang/isFunction'),\n isIndex = require('../internal/isIndex'),\n isLength = require('../internal/isLength'),\n isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n/** Used to fix the JScript `[[DontEnum]]` bug. */\nvar shadowProps = [\n 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',\n 'toLocaleString', 'toString', 'valueOf'\n];\n\n/** Used for native method references. */\nvar errorProto = Error.prototype,\n objectProto = Object.prototype,\n stringProto = String.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to avoid iterating over non-enumerable properties in IE < 9. */\nvar nonEnumProps = {};\nnonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };\nnonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };\nnonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };\nnonEnumProps[objectTag] = { 'constructor': true };\n\narrayEach(shadowProps, function(key) {\n for (var tag in nonEnumProps) {\n if (hasOwnProperty.call(nonEnumProps, tag)) {\n var props = nonEnumProps[tag];\n props[key] = hasOwnProperty.call(props, key);\n }\n }\n});\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!isObject(object)) {\n object = Object(object);\n }\n var length = object.length;\n\n length = (length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object)) && length) || 0;\n\n var Ctor = object.constructor,\n index = -1,\n proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,\n isProto = proto === object,\n result = Array(length),\n skipIndexes = length > 0,\n skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),\n skipProto = support.enumPrototypes && isFunction(object);\n\n while (++index < length) {\n result[index] = (index + '');\n }\n // lodash skips the `constructor` property when it infers it's iterating\n // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`\n // attribute of an existing property and the `constructor` property of a\n // prototype defaults to non-enumerable.\n for (var key in object) {\n if (!(skipProto && key == 'prototype') &&\n !(skipErrorProps && (key == 'message' || key == 'name')) &&\n !(skipIndexes && isIndex(key, length)) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n if (support.nonEnumShadows && object !== objectProto) {\n var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),\n nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];\n\n if (tag == objectTag) {\n proto = objectProto;\n }\n length = shadowProps.length;\n while (length--) {\n key = shadowProps[length];\n var nonEnum = nonEnums[key];\n if (!(isProto && nonEnum) &&\n (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {\n result.push(key);\n }\n }\n }\n return result;\n}\n\nmodule.exports = keysIn;\n", + "var baseMerge = require('../internal/baseMerge'),\n createAssigner = require('../internal/createAssigner');\n\n/**\n * Recursively merges own enumerable properties of the source object(s), that\n * don't resolve to `undefined` into the destination object. Subsequent sources\n * overwrite property assignments of previous sources. If `customizer` is\n * provided it's invoked to produce the merged values of the destination and\n * source properties. If `customizer` returns `undefined` merging is handled\n * by the method instead. The `customizer` is bound to `thisArg` and invoked\n * with five arguments: (objectValue, sourceValue, key, object, source).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var users = {\n * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n * };\n *\n * var ages = {\n * 'data': [{ 'age': 36 }, { 'age': 40 }]\n * };\n *\n * _.merge(users, ages);\n * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n *\n * // using a customizer callback\n * var object = {\n * 'fruits': ['apple'],\n * 'vegetables': ['beet']\n * };\n *\n * var other = {\n * 'fruits': ['banana'],\n * 'vegetables': ['carrot']\n * };\n *\n * _.merge(object, other, function(a, b) {\n * if (_.isArray(a)) {\n * return a.concat(b);\n * }\n * });\n * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n */\nvar merge = createAssigner(baseMerge);\n\nmodule.exports = merge;\n", + "/** Used for native method references. */\nvar arrayProto = Array.prototype,\n errorProto = Error.prototype,\n objectProto = Object.prototype;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/**\n * An object environment feature flags.\n *\n * @static\n * @memberOf _\n * @type Object\n */\nvar support = {};\n\n(function(x) {\n var Ctor = function() { this.x = x; },\n object = { '0': x, 'length': x },\n props = [];\n\n Ctor.prototype = { 'valueOf': x, 'y': x };\n for (var key in new Ctor) { props.push(key); }\n\n /**\n * Detect if `name` or `message` properties of `Error.prototype` are\n * enumerable by default (IE < 9, Safari < 5.1).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||\n propertyIsEnumerable.call(errorProto, 'name');\n\n /**\n * Detect if `prototype` properties are enumerable by default.\n *\n * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1\n * (if the prototype or a property on the prototype has been set)\n * incorrectly set the `[[Enumerable]]` value of a function's `prototype`\n * property to `true`.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');\n\n /**\n * Detect if properties shadowing those on `Object.prototype` are non-enumerable.\n *\n * In IE < 9 an object's own properties, shadowing non-enumerable ones,\n * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.nonEnumShadows = !/valueOf/.test(props);\n\n /**\n * Detect if own properties are iterated after inherited properties (IE < 9).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.ownLast = props[0] != 'x';\n\n /**\n * Detect if `Array#shift` and `Array#splice` augment array-like objects\n * correctly.\n *\n * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array\n * `shift()` and `splice()` functions that fail to remove the last element,\n * `value[0]`, of array-like objects even though the \"length\" property is\n * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,\n * while `splice()` is buggy regardless of mode in IE < 9.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.spliceObjects = (splice.call(object, 0, 1), !object[0]);\n\n /**\n * Detect lack of support for accessing string characters by index.\n *\n * IE < 8 can't access characters by index. IE 8 can only access characters\n * by index on string literals, not string objects.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';\n}(1, 0));\n\nmodule.exports = support;\n", + "/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n", + "'use strict';\n\nvar keys = require('object-keys');\n\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tif (typeof sym === 'string') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(Object(sym) instanceof Symbol)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; }\n\tif (keys(obj).length !== 0) { return false; }\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n", + "'use strict';\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = require('object-keys');\nvar bind = require('function-bind');\nvar canBeObject = function (obj) {\n\treturn typeof obj !== 'undefined' && obj !== null;\n};\nvar hasSymbols = require('./hasSymbols')();\nvar toObject = Object;\nvar push = bind.call(Function.call, Array.prototype.push);\nvar propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);\n\nmodule.exports = function assign(target, source1) {\n\tif (!canBeObject(target)) { throw new TypeError('target must be an object'); }\n\tvar objTarget = toObject(target);\n\tvar s, source, i, props, syms, value, key;\n\tfor (s = 1; s < arguments.length; ++s) {\n\t\tsource = toObject(arguments[s]);\n\t\tprops = keys(source);\n\t\tif (hasSymbols && Object.getOwnPropertySymbols) {\n\t\t\tsyms = Object.getOwnPropertySymbols(source);\n\t\t\tfor (i = 0; i < syms.length; ++i) {\n\t\t\t\tkey = syms[i];\n\t\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\t\tpush(props, key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < props.length; ++i) {\n\t\t\tkey = props[i];\n\t\t\tvalue = source[key];\n\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\tobjTarget[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn objTarget;\n};\n", + "'use strict';\n\nvar defineProperties = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\ndefineProperties(implementation, {\n\timplementation: implementation,\n\tgetPolyfill: getPolyfill,\n\tshim: shim\n});\n\nmodule.exports = implementation;\n", + "'use strict';\n\nvar keys = require('object-keys');\nvar foreach = require('foreach');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';\n\nvar toStr = Object.prototype.toString;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\tObject.defineProperty(obj, 'x', { enumerable: false, value: obj });\n /* eslint-disable no-unused-vars, no-restricted-syntax */\n for (var _ in obj) { return false; }\n /* eslint-enable no-unused-vars, no-restricted-syntax */\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\tObject.defineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = props.concat(Object.getOwnPropertySymbols(map));\n\t}\n\tforeach(props, function (name) {\n\t\tdefineProperty(object, name, map[name], predicates[name]);\n\t});\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n", + "\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n", + "var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n", + "var implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n", + "'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\nvar hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');\nvar hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar blacklistedKeys = {\n\t$console: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$parent: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) {\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n", + "'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n", + "'use strict';\n\nvar implementation = require('./implementation');\n\nvar lacksProperEnumerationOrder = function () {\n\tif (!Object.assign) {\n\t\treturn false;\n\t}\n\t// v8, specifically in node 4.x, has a bug with incorrect property enumeration order\n\t// note: this does not detect the bug unless there's 20 characters\n\tvar str = 'abcdefghijklmnopqrst';\n\tvar letters = str.split('');\n\tvar map = {};\n\tfor (var i = 0; i < letters.length; ++i) {\n\t\tmap[letters[i]] = letters[i];\n\t}\n\tvar obj = Object.assign({}, map);\n\tvar actual = '';\n\tfor (var k in obj) {\n\t\tactual += k;\n\t}\n\treturn str !== actual;\n};\n\nvar assignHasPendingExceptions = function () {\n\tif (!Object.assign || !Object.preventExtensions) {\n\t\treturn false;\n\t}\n\t// Firefox 37 still has \"pending exception\" logic in its Object.assign implementation,\n\t// which is 72% slower than our shim, and Firefox 40's native implementation.\n\tvar thrower = Object.preventExtensions({ 1: 2 });\n\ttry {\n\t\tObject.assign(thrower, 'xy');\n\t} catch (e) {\n\t\treturn thrower[1] === 'y';\n\t}\n};\n\nmodule.exports = function getPolyfill() {\n\tif (!Object.assign) {\n\t\treturn implementation;\n\t}\n\tif (lacksProperEnumerationOrder()) {\n\t\treturn implementation;\n\t}\n\tif (assignHasPendingExceptions()) {\n\t\treturn implementation;\n\t}\n\treturn Object.assign;\n};\n", + "'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimAssign() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tObject,\n\t\t{ assign: polyfill },\n\t\t{ assign: function () { return Object.assign !== polyfill; } }\n\t);\n\treturn polyfill;\n};\n", + "module.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n var json\n var error = null\n\n try {\n json = JSON.parse(obj, reviver)\n } catch (err) {\n error = err\n }\n\n return [error, json]\n}\n", + "function clean (s) {\n return s.replace(/\\n\\r?\\s*/g, '')\n}\n\n\nmodule.exports = function tsml (sa) {\n var s = ''\n , i = 0\n\n for (; i < arguments.length; i++)\n s += clean(sa[i]) + (arguments[i + 1] || '')\n\n return s\n}", + "\"use strict\";\nvar window = require(\"global/window\")\nvar once = require(\"once\")\nvar isFunction = require(\"is-function\")\nvar parseHeaders = require(\"parse-headers\")\nvar xtend = require(\"xtend\")\n\nmodule.exports = createXHR\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\n\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\n options = initParams(uri, options, callback)\n options.method = method.toUpperCase()\n return _createXHR(options)\n }\n})\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i])\n }\n}\n\nfunction isEmpty(obj){\n for(var i in obj){\n if(obj.hasOwnProperty(i)) return false\n }\n return true\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri\n\n if (isFunction(options)) {\n callback = options\n if (typeof uri === \"string\") {\n params = {uri:uri}\n }\n } else {\n params = xtend(options, {uri: uri})\n }\n\n params.callback = callback\n return params\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback)\n return _createXHR(options)\n}\n\nfunction _createXHR(options) {\n var callback = options.callback\n if(typeof callback === \"undefined\"){\n throw new Error(\"callback argument missing\")\n }\n callback = once(callback)\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n loadFunc()\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined\n\n if (xhr.response) {\n body = xhr.response\n } else if (xhr.responseType === \"text\" || !xhr.responseType) {\n body = xhr.responseText || xhr.responseXML\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body)\n } catch (e) {}\n }\n\n return body\n }\n\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer)\n if(!(evt instanceof Error)){\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\n }\n evt.statusCode = 0\n callback(evt, failureResponse)\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return\n var status\n clearTimeout(timeoutTimer)\n if(options.useXDR && xhr.status===undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200\n } else {\n status = (xhr.status === 1223 ? 204 : xhr.status)\n }\n var response = failureResponse\n var err = null\n\n if (status !== 0){\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n }\n if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders())\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\")\n }\n callback(err, response, response.body)\n\n }\n\n var xhr = options.xhr || null\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest()\n }else{\n xhr = new createXHR.XMLHttpRequest()\n }\n }\n\n var key\n var aborted\n var uri = xhr.url = options.uri || options.url\n var method = xhr.method = options.method || \"GET\"\n var body = options.body || options.data || null\n var headers = xhr.headers = options.headers || {}\n var sync = !!options.sync\n var isJson = false\n var timeoutTimer\n\n if (\"json\" in options) {\n isJson = true\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don't override existing accept header declared by user\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don't override existing accept header declared by user\n body = JSON.stringify(options.json)\n }\n }\n\n xhr.onreadystatechange = readystatechange\n xhr.onload = loadFunc\n xhr.onerror = errorFunc\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n }\n xhr.ontimeout = errorFunc\n xhr.open(method, uri, !sync, options.username, options.password)\n //has to be after open\n if(!sync) {\n xhr.withCredentials = !!options.withCredentials\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0 ) {\n timeoutTimer = setTimeout(function(){\n aborted=true//IE9 may still call readystatechange\n xhr.abort(\"timeout\")\n var e = new Error(\"XMLHttpRequest timeout\")\n e.code = \"ETIMEDOUT\"\n errorFunc(e)\n }, options.timeout )\n }\n\n if (xhr.setRequestHeader) {\n for(key in headers){\n if(headers.hasOwnProperty(key)){\n xhr.setRequestHeader(key, headers[key])\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\")\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType\n }\n\n if (\"beforeSend\" in options &&\n typeof options.beforeSend === \"function\"\n ) {\n options.beforeSend(xhr)\n }\n\n xhr.send(body)\n\n return xhr\n\n\n}\n\nfunction noop() {}\n", + "module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n", + "module.exports = once\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var called = false\n return function () {\n if (called) return\n called = true\n return fn.apply(this, arguments)\n }\n}\n", + "var isFunction = require('is-function')\n\nmodule.exports = forEach\n\nvar toString = Object.prototype.toString\nvar hasOwnProperty = Object.prototype.hasOwnProperty\n\nfunction forEach(list, iterator, context) {\n if (!isFunction(iterator)) {\n throw new TypeError('iterator must be a function')\n }\n\n if (arguments.length < 3) {\n context = this\n }\n \n if (toString.call(list) === '[object Array]')\n forEachArray(list, iterator, context)\n else if (typeof list === 'string')\n forEachString(list, iterator, context)\n else\n forEachObject(list, iterator, context)\n}\n\nfunction forEachArray(array, iterator, context) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n iterator.call(context, array[i], i, array)\n }\n }\n}\n\nfunction forEachString(string, iterator, context) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n iterator.call(context, string.charAt(i), i, string)\n }\n}\n\nfunction forEachObject(object, iterator, context) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n iterator.call(context, object[k], k, object)\n }\n }\n}\n", + "\nexports = module.exports = trim;\n\nfunction trim(str){\n return str.replace(/^\\s*|\\s*$/g, '');\n}\n\nexports.left = function(str){\n return str.replace(/^\\s*/, '');\n};\n\nexports.right = function(str){\n return str.replace(/\\s*$/, '');\n};\n", + "var trim = require('trim')\n , forEach = require('for-each')\n , isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n }\n\nmodule.exports = function (headers) {\n if (!headers)\n return {}\n\n var result = {}\n\n forEach(\n trim(headers).split('\\n')\n , function (row) {\n var index = row.indexOf(':')\n , key = trim(row.slice(0, index)).toLowerCase()\n , value = trim(row.slice(index + 1))\n\n if (typeof(result[key]) === 'undefined') {\n result[key] = value\n } else if (isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [ result[key], value ]\n }\n }\n )\n\n return result\n}", + "module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n", + "/**\n * @file big-play-button.js\n */\nimport Button from './button.js';\nimport Component from './component.js';\n\n/**\n * Initial play button. Shows before the video has played. The hiding of the\n * big play button is done via CSS and player states.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Button\n * @class BigPlayButton\n */\nclass BigPlayButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return 'vjs-big-play-button';\n }\n\n /**\n * Handles click for play\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.play();\n }\n\n}\n\nBigPlayButton.prototype.controlText_ = 'Play Video';\n\nComponent.registerComponent('BigPlayButton', BigPlayButton);\nexport default BigPlayButton;\n", + "/**\n * @file button.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Base class for all buttons\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends ClickableComponent\n * @class Button\n */\nclass Button extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='button', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass()\n }, props);\n\n if (tag !== 'button') {\n log.warn(`Creating a Button with an HTML element of ${tag} is deprecated; use ClickableComponent instead.`);\n\n // Add properties for clickable element which is not a native HTML button\n props = assign({\n tabIndex: 0\n }, props);\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button'\n }, attributes);\n }\n\n // Add attributes for button element\n attributes = assign({\n type: 'button', // Necessary since the default button type is \"submit\"\n 'aria-live': 'polite' // let the screen reader user know that the text of the button may change\n }, attributes);\n\n let el = Component.prototype.createEl.call(this, tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * Adds a child component inside this button\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @deprecated\n * @method addChild\n */\n addChild(child, options={}) {\n let className = this.constructor.name;\n log.warn(`Adding an actionable (user controllable) child to a Button (${className}) is not supported; use a ClickableComponent instead.`);\n\n // Avoid the error message generated by ClickableComponent's addChild method\n return Component.prototype.addChild.call(this, child, options);\n }\n\n /**\n * Handle KeyPress (document level) - Extend with specific functionality for button\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Ignore Space (32) or Enter (13) key operation, which is handled by the browser for a button.\n if (event.which === 32 || event.which === 13) {\n } else {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n}\n\nComponent.registerComponent('Button', Button);\nexport default Button;\n", + "/**\n * @file button.js\n */\nimport Component from './component';\nimport * as Dom from './utils/dom.js';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Clickable Component which is clickable or keyboard actionable, but is not a native HTML button\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class ClickableComponent\n */\nclass ClickableComponent extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.emitTapEvents();\n\n this.on('tap', this.handleClick);\n this.on('click', this.handleClick);\n this.on('focus', this.handleFocus);\n this.on('blur', this.handleBlur);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='div', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass(),\n tabIndex: 0\n }, props);\n\n if (tag === 'button') {\n log.error(`Creating a ClickableComponent with an HTML element of ${tag} is not supported; use a Button instead.`);\n }\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button',\n 'aria-live': 'polite' // let the screen reader user know that the text of the element may change\n }, attributes);\n\n let el = super.createEl(tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * create control text\n *\n * @param {Element} el Parent element for the control text\n * @return {Element}\n * @method controlText\n */\n createControlTextEl(el) {\n this.controlTextEl_ = Dom.createEl('span', {\n className: 'vjs-control-text'\n });\n\n if (el) {\n el.appendChild(this.controlTextEl_);\n }\n\n this.controlText(this.controlText_);\n\n return this.controlTextEl_;\n }\n\n /**\n * Controls text - both request and localize\n *\n * @param {String} text Text for element\n * @return {String}\n * @method controlText\n */\n controlText(text) {\n if (!text) return this.controlText_ || 'Need Text';\n\n this.controlText_ = text;\n this.controlTextEl_.innerHTML = this.localize(this.controlText_);\n\n return this;\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String}\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-control vjs-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Adds a child component inside this clickable-component\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}) {\n // TODO: Fix adding an actionable child to a ClickableComponent; currently\n // it will cause issues with assistive technology (e.g. screen readers)\n // which support ARIA, since an element with role=\"button\" cannot have\n // actionable child elements.\n\n //let className = this.constructor.name;\n //log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role=\"button\" cannot have actionable child elements.`);\n\n return super.addChild(child, options);\n }\n\n /**\n * Enable the component element\n *\n * @return {Component}\n * @method enable\n */\n enable() {\n this.removeClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'false');\n return this;\n }\n\n /**\n * Disable the component element\n *\n * @return {Component}\n * @method disable\n */\n disable() {\n this.addClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'true');\n return this;\n }\n\n /**\n * Handle Click - Override with specific functionality for component\n *\n * @method handleClick\n */\n handleClick() {}\n\n /**\n * Handle Focus - Add keyboard functionality to element\n *\n * @method handleFocus\n */\n handleFocus() {\n Events.on(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n /**\n * Handle KeyPress (document level) - Trigger click when Space or Enter key is pressed\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Support Space (32) or Enter (13) key operation to fire a click event\n if (event.which === 32 || event.which === 13) {\n event.preventDefault();\n this.handleClick(event);\n } else if (super.handleKeyPress) {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n /**\n * Handle Blur - Remove keyboard triggers\n *\n * @method handleBlur\n */\n handleBlur() {\n Events.off(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n}\n\nComponent.registerComponent('ClickableComponent', ClickableComponent);\nexport default ClickableComponent;\n", + "import Button from './button';\nimport Component from './component';\n\n/**\n * The `CloseButton` component is a button which fires a \"close\" event\n * when it is activated.\n *\n * @extends Button\n * @class CloseButton\n */\nclass CloseButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n this.controlText(options && options.controlText || this.localize('Close'));\n }\n\n buildCSSClass() {\n return `vjs-close-button ${super.buildCSSClass()}`;\n }\n\n handleClick() {\n this.trigger({type: 'close', bubbles: false});\n }\n}\n\nComponent.registerComponent('CloseButton', CloseButton);\nexport default CloseButton;\n", + "/**\n * @file component.js\n *\n * Player Component - Base class for all UI objects\n */\n\nimport window from 'global/window';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as Events from './utils/events.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\n\n\n/**\n * Base UI Component class\n * Components are embeddable UI objects that are represented by both a\n * javascript object and an element in the DOM. They can be children of other\n * components, and can have many children themselves.\n * ```js\n * // adding a button to the player\n * var button = player.addChild('button');\n * button.el(); // -> button element\n * ```\n * ```html\n *
    \n *
    Button
    \n *
    \n * ```\n * Components are also event targets.\n * ```js\n * button.on('click', function(){\n * console.log('Button Clicked!');\n * });\n * button.trigger('customevent');\n * ```\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @class Component\n */\nclass Component {\n\n constructor(player, options, ready) {\n\n // The component might be the player itself and we can't pass `this` to super\n if (!player && this.play) {\n this.player_ = player = this; // eslint-disable-line\n } else {\n this.player_ = player;\n }\n\n // Make a copy of prototype.options_ to protect against overriding defaults\n this.options_ = mergeOptions({}, this.options_);\n\n // Updated options with supplied options\n options = this.options_ = mergeOptions(this.options_, options);\n\n // Get ID from options or options element if one is supplied\n this.id_ = options.id || (options.el && options.el.id);\n\n // If there was no ID from the options, generate one\n if (!this.id_) {\n // Don't require the player ID function in the case of mock players\n let id = player && player.id && player.id() || 'no_player';\n\n this.id_ = `${id}_component_${Guid.newGUID()}`;\n }\n\n this.name_ = options.name || null;\n\n // Create element if one wasn't provided in options\n if (options.el) {\n this.el_ = options.el;\n } else if (options.createEl !== false) {\n this.el_ = this.createEl();\n }\n\n this.children_ = [];\n this.childIndex_ = {};\n this.childNameIndex_ = {};\n\n // Add any child components in options\n if (options.initChildren !== false) {\n this.initChildren();\n }\n\n this.ready(ready);\n // Don't want to trigger ready here or it will before init is actually\n // finished for all children that run this constructor\n\n if (options.reportTouchActivity !== false) {\n this.enableTouchActivity();\n }\n }\n\n /**\n * Dispose of the component and all child components\n *\n * @method dispose\n */\n dispose() {\n this.trigger({ type: 'dispose', bubbles: false });\n\n // Dispose all children.\n if (this.children_) {\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i].dispose) {\n this.children_[i].dispose();\n }\n }\n }\n\n // Delete child references\n this.children_ = null;\n this.childIndex_ = null;\n this.childNameIndex_ = null;\n\n // Remove all event listeners.\n this.off();\n\n // Remove element from DOM\n if (this.el_.parentNode) {\n this.el_.parentNode.removeChild(this.el_);\n }\n\n Dom.removeElData(this.el_);\n this.el_ = null;\n }\n\n /**\n * Return the component's player\n *\n * @return {Player}\n * @method player\n */\n player() {\n return this.player_;\n }\n\n /**\n * Deep merge of options objects\n * Whenever a property is an object on both options objects\n * the two properties will be merged using mergeOptions.\n *\n * ```js\n * Parent.prototype.options_ = {\n * optionSet: {\n * 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' },\n * 'childTwo': {},\n * 'childThree': {}\n * }\n * }\n * newOptions = {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'abc': '123' }\n * 'childTwo': null,\n * 'childFour': {}\n * }\n * }\n *\n * this.options(newOptions);\n * ```\n * RESULT\n * ```js\n * {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' },\n * 'childTwo': null, // Disabled. Won't be initialized.\n * 'childThree': {},\n * 'childFour': {}\n * }\n * }\n * ```\n *\n * @param {Object} obj Object of new option values\n * @return {Object} A NEW object of this.options_ and obj merged\n * @method options\n */\n options(obj) {\n log.warn('this.options() has been deprecated and will be moved to the constructor in 6.0');\n\n if (!obj) {\n return this.options_;\n }\n\n this.options_ = mergeOptions(this.options_, obj);\n return this.options_;\n }\n\n /**\n * Get the component's DOM element\n * ```js\n * var domEl = myComponent.el();\n * ```\n *\n * @return {Element}\n * @method el\n */\n el() {\n return this.el_;\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} tagName Element's node type. e.g. 'div'\n * @param {Object=} properties An object of properties that should be set\n * @param {Object=} attributes An object of attributes that should be set\n * @return {Element}\n * @method createEl\n */\n createEl(tagName, properties, attributes) {\n return Dom.createEl(tagName, properties, attributes);\n }\n\n localize(string) {\n let code = this.player_.language && this.player_.language();\n let languages = this.player_.languages && this.player_.languages();\n\n if (!code || !languages) {\n return string;\n }\n\n let language = languages[code];\n\n if (language && language[string]) {\n return language[string];\n }\n\n let primaryCode = code.split('-')[0];\n let primaryLang = languages[primaryCode];\n\n if (primaryLang && primaryLang[string]) {\n return primaryLang[string];\n }\n\n return string;\n }\n\n /**\n * Return the component's DOM element where children are inserted.\n * Will either be the same as el() or a new element defined in createEl().\n *\n * @return {Element}\n * @method contentEl\n */\n contentEl() {\n return this.contentEl_ || this.el_;\n }\n\n /**\n * Get the component's ID\n * ```js\n * var id = myComponent.id();\n * ```\n *\n * @return {String}\n * @method id\n */\n id() {\n return this.id_;\n }\n\n /**\n * Get the component's name. The name is often used to reference the component.\n * ```js\n * var name = myComponent.name();\n * ```\n *\n * @return {String}\n * @method name\n */\n name() {\n return this.name_;\n }\n\n /**\n * Get an array of all child components\n * ```js\n * var kids = myComponent.children();\n * ```\n *\n * @return {Array} The children\n * @method children\n */\n children() {\n return this.children_;\n }\n\n /**\n * Returns a child component with the provided ID\n *\n * @return {Component}\n * @method getChildById\n */\n getChildById(id) {\n return this.childIndex_[id];\n }\n\n /**\n * Returns a child component with the provided name\n *\n * @return {Component}\n * @method getChild\n */\n getChild(name) {\n return this.childNameIndex_[name];\n }\n\n /**\n * Adds a child component inside this component\n * ```js\n * myComponent.el();\n * // ->
    \n * myComponent.children();\n * // [empty array]\n *\n * var myButton = myComponent.addChild('MyButton');\n * // ->
    myButton
    \n * // -> myButton === myComponent.children()[0];\n * ```\n * Pass in options for child constructors and options for children of the child\n * ```js\n * var myButton = myComponent.addChild('MyButton', {\n * text: 'Press Me',\n * buttonChildExample: {\n * buttonChildOption: true\n * }\n * });\n * ```\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @param {Number} index into our children array to attempt to add the child\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}, index=this.children_.length) {\n let component;\n let componentName;\n\n // If child is a string, create nt with options\n if (typeof child === 'string') {\n componentName = child;\n\n // Options can also be specified as a boolean, so convert to an empty object if false.\n if (!options) {\n options = {};\n }\n\n // Same as above, but true is deprecated so show a warning.\n if (options === true) {\n log.warn('Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`.');\n options = {};\n }\n\n // If no componentClass in options, assume componentClass is the name lowercased\n // (e.g. playButton)\n let componentClassName = options.componentClass || toTitleCase(componentName);\n\n // Set name through options\n options.name = componentName;\n\n // Create a new object & element for this controls set\n // If there's no .player_, this is a player\n let ComponentClass = Component.getComponent(componentClassName);\n\n if (!ComponentClass) {\n throw new Error(`Component ${componentClassName} does not exist`);\n }\n\n // data stored directly on the videojs object may be\n // misidentified as a component to retain\n // backwards-compatibility with 4.x. check to make sure the\n // component class can be instantiated.\n if (typeof ComponentClass !== 'function') {\n return null;\n }\n\n component = new ComponentClass(this.player_ || this, options);\n\n // child is a component instance\n } else {\n component = child;\n }\n\n this.children_.splice(index, 0, component);\n\n if (typeof component.id === 'function') {\n this.childIndex_[component.id()] = component;\n }\n\n // If a name wasn't used to create the component, check if we can use the\n // name function of the component\n componentName = componentName || (component.name && component.name());\n\n if (componentName) {\n this.childNameIndex_[componentName] = component;\n }\n\n // Add the UI object's element to the container div (box)\n // Having an element is not required\n if (typeof component.el === 'function' && component.el()) {\n let childNodes = this.contentEl().children;\n let refNode = childNodes[index] || null;\n this.contentEl().insertBefore(component.el(), refNode);\n }\n\n // Return so it can stored on parent object if desired.\n return component;\n }\n\n /**\n * Remove a child component from this component's list of children, and the\n * child component's element from this component's element\n *\n * @param {Component} component Component to remove\n * @method removeChild\n */\n removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n\n if (!component || !this.children_) {\n return;\n }\n\n let childFound = false;\n\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i] === component) {\n childFound = true;\n this.children_.splice(i, 1);\n break;\n }\n }\n\n if (!childFound) {\n return;\n }\n\n this.childIndex_[component.id()] = null;\n this.childNameIndex_[component.name()] = null;\n\n let compEl = component.el();\n\n if (compEl && compEl.parentNode === this.contentEl()) {\n this.contentEl().removeChild(component.el());\n }\n }\n\n /**\n * Add and initialize default child components from options\n * ```js\n * // when an instance of MyComponent is created, all children in options\n * // will be added to the instance by their name strings and options\n * MyComponent.prototype.options_ = {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * };\n *\n * // Or when creating the component\n * var myComp = new MyComponent(player, {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * });\n * ```\n * The children option can also be an array of\n * child options objects (that also include a 'name' key).\n * This can be used if you have two child components of the\n * same type that need different options.\n * ```js\n * var myComp = new MyComponent(player, {\n * children: [\n * 'button',\n * {\n * name: 'button',\n * someOtherOption: true\n * },\n * {\n * name: 'button',\n * someOtherOption: false\n * }\n * ]\n * });\n * ```\n *\n * @method initChildren\n */\n initChildren() {\n let children = this.options_.children;\n\n if (children) {\n // `this` is `parent`\n let parentOptions = this.options_;\n\n let handleAdd = (child) => {\n let name = child.name;\n let opts = child.opts;\n\n // Allow options for children to be set at the parent options\n // e.g. videojs(id, { controlBar: false });\n // instead of videojs(id, { children: { controlBar: false });\n if (parentOptions[name] !== undefined) {\n opts = parentOptions[name];\n }\n\n // Allow for disabling default components\n // e.g. options['children']['posterImage'] = false\n if (opts === false) {\n return;\n }\n\n // Allow options to be passed as a simple boolean if no configuration\n // is necessary.\n if (opts === true) {\n opts = {};\n }\n\n // We also want to pass the original player options to each component as well so they don't need to\n // reach back into the player for options later.\n opts.playerOptions = this.options_.playerOptions;\n\n // Create and add the child component.\n // Add a direct reference to the child by name on the parent instance.\n // If two of the same component are used, different names should be supplied\n // for each\n let newChild = this.addChild(name, opts);\n if (newChild) {\n this[name] = newChild;\n }\n };\n\n // Allow for an array of children details to passed in the options\n let workingChildren;\n let Tech = Component.getComponent('Tech');\n\n if (Array.isArray(children)) {\n workingChildren = children;\n } else {\n workingChildren = Object.keys(children);\n }\n\n workingChildren\n // children that are in this.options_ but also in workingChildren would\n // give us extra children we do not want. So, we want to filter them out.\n .concat(Object.keys(this.options_)\n .filter(function(child) {\n return !workingChildren.some(function(wchild) {\n if (typeof wchild === 'string') {\n return child === wchild;\n } else {\n return child === wchild.name;\n }\n });\n }))\n .map((child) => {\n let name, opts;\n\n if (typeof child === 'string') {\n name = child;\n opts = children[name] || this.options_[name] || {};\n } else {\n name = child.name;\n opts = child;\n }\n\n return {name, opts};\n })\n .filter((child) => {\n // we have to make sure that child.name isn't in the techOrder since\n // techs are registerd as Components but can't aren't compatible\n // See https://github.com/videojs/video.js/issues/2772\n let c = Component.getComponent(child.opts.componentClass ||\n toTitleCase(child.name));\n return c && !Tech.isTech(c);\n })\n .forEach(handleAdd);\n }\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n // Child classes can include a function that does:\n // return 'CLASS NAME' + this._super();\n return '';\n }\n\n /**\n * Add an event listener to this component's element\n * ```js\n * var myFunc = function(){\n * var myComponent = this;\n * // Do something when the event is fired\n * };\n *\n * myComponent.on('eventType', myFunc);\n * ```\n * The context of myFunc will be myComponent unless previously bound.\n * Alternatively, you can add a listener to another element or component.\n * ```js\n * myComponent.on(otherElement, 'eventName', myFunc);\n * myComponent.on(otherComponent, 'eventName', myFunc);\n * ```\n * The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)`\n * and `otherComponent.on('eventName', myFunc)` is that this way the listeners\n * will be automatically cleaned up when either component is disposed.\n * It will also bind myComponent as the context of myFunc.\n * **NOTE**: When using this on elements in the page other than window\n * and document (both permanent), if you remove the element from the DOM\n * you need to call `myComponent.trigger(el, 'dispose')` on it to clean up\n * references to it and allow the browser to garbage collect it.\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The event handler or event type\n * @param {Function} third The event handler\n * @return {Component}\n * @method on\n */\n on(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.on(this.el_, first, Fn.bind(this, second));\n\n // Targeting another component or element\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n // When this component is disposed, remove the listener from the other component\n const removeOnDispose = () => this.off(target, type, fn);\n\n // Use the same function ID so we can remove it later it using the ID\n // of the original listener\n removeOnDispose.guid = fn.guid;\n this.on('dispose', removeOnDispose);\n\n // If the other component is disposed first we need to clean the reference\n // to the other component in this component's removeOnDispose listener\n // Otherwise we create a memory leak.\n const cleanRemover = () => this.off('dispose', removeOnDispose);\n\n // Add the same function ID so we can easily remove it later\n cleanRemover.guid = fn.guid;\n\n // Check if this is a DOM node\n if (first.nodeName) {\n // Add the listener to the other element\n Events.on(target, type, fn);\n Events.on(target, 'dispose', cleanRemover);\n\n // Should be a component\n // Not using `instanceof Component` because it makes mock players difficult\n } else if (typeof first.on === 'function') {\n // Add the listener to the other component\n target.on(type, fn);\n target.on('dispose', cleanRemover);\n }\n }\n\n return this;\n }\n\n /**\n * Remove an event listener from this component's element\n * ```js\n * myComponent.off('eventType', myFunc);\n * ```\n * If myFunc is excluded, ALL listeners for the event type will be removed.\n * If eventType is excluded, ALL listeners will be removed from the component.\n * Alternatively you can use `off` to remove listeners that were added to other\n * elements or components using `myComponent.on(otherComponent...`.\n * In this case both the event type and listener function are REQUIRED.\n * ```js\n * myComponent.off(otherElement, 'eventType', myFunc);\n * myComponent.off(otherComponent, 'eventType', myFunc);\n * ```\n *\n * @param {String=|Component} first The event type or other component\n * @param {Function=|String} second The listener function or event type\n * @param {Function=} third The listener for other component\n * @return {Component}\n * @method off\n */\n off(first, second, third) {\n if (!first || typeof first === 'string' || Array.isArray(first)) {\n Events.off(this.el_, first, second);\n } else {\n const target = first;\n const type = second;\n // Ensure there's at least a guid, even if the function hasn't been used\n const fn = Fn.bind(this, third);\n\n // Remove the dispose listener on this component,\n // which was given the same guid as the event listener\n this.off('dispose', fn);\n\n if (first.nodeName) {\n // Remove the listener\n Events.off(target, type, fn);\n // Remove the listener for cleaning the dispose listener\n Events.off(target, 'dispose', fn);\n } else {\n target.off(type, fn);\n target.off('dispose', fn);\n }\n }\n\n return this;\n }\n\n /**\n * Add an event listener to be triggered only once and then removed\n * ```js\n * myComponent.one('eventName', myFunc);\n * ```\n * Alternatively you can add a listener to another element or component\n * that will be triggered only once.\n * ```js\n * myComponent.one(otherElement, 'eventName', myFunc);\n * myComponent.one(otherComponent, 'eventName', myFunc);\n * ```\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The listener function or event type\n * @param {Function=} third The listener function for other component\n * @return {Component}\n * @method one\n */\n one(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.one(this.el_, first, Fn.bind(this, second));\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n const newFunc = () => {\n this.off(target, type, newFunc);\n fn.apply(null, arguments);\n };\n\n // Keep the same function ID so we can remove it later\n newFunc.guid = fn.guid;\n\n this.on(target, type, newFunc);\n }\n\n return this;\n }\n\n /**\n * Trigger an event on an element\n * ```js\n * myComponent.trigger('eventName');\n * myComponent.trigger({'type':'eventName'});\n * myComponent.trigger('eventName', {data: 'some data'});\n * myComponent.trigger({'type':'eventName'}, {data: 'some data'});\n * ```\n *\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Component} self\n * @method trigger\n */\n trigger(event, hash) {\n Events.trigger(this.el_, event, hash);\n return this;\n }\n\n /**\n * Bind a listener to the component's ready state.\n * Different from event listeners in that if the ready event has already happened\n * it will trigger the function immediately.\n *\n * @param {Function} fn Ready listener\n * @param {Boolean} sync Exec the listener synchronously if component is ready\n * @return {Component}\n * @method ready\n */\n ready(fn, sync=false) {\n if (fn) {\n if (this.isReady_) {\n if (sync) {\n fn.call(this);\n } else {\n // Call the function asynchronously by default for consistency\n this.setTimeout(fn, 1);\n }\n } else {\n this.readyQueue_ = this.readyQueue_ || [];\n this.readyQueue_.push(fn);\n }\n }\n return this;\n }\n\n /**\n * Trigger the ready listeners\n *\n * @return {Component}\n * @method triggerReady\n */\n triggerReady() {\n this.isReady_ = true;\n\n // Ensure ready is triggerd asynchronously\n this.setTimeout(function(){\n let readyQueue = this.readyQueue_;\n\n // Reset Ready Queue\n this.readyQueue_ = [];\n\n if (readyQueue && readyQueue.length > 0) {\n readyQueue.forEach(function(fn){\n fn.call(this);\n }, this);\n }\n\n // Allow for using event listeners also\n this.trigger('ready');\n }, 1);\n }\n\n /**\n * Finds a single DOM element matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\n $(selector, context) {\n return Dom.$(selector, context || this.contentEl());\n }\n\n /**\n * Finds a all DOM elements matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\n $$(selector, context) {\n return Dom.$$(selector, context || this.contentEl());\n }\n\n /**\n * Check if a component's element has a CSS class name\n *\n * @param {String} classToCheck Classname to check\n * @return {Component}\n * @method hasClass\n */\n hasClass(classToCheck) {\n return Dom.hasElClass(this.el_, classToCheck);\n }\n\n /**\n * Add a CSS class name to the component's element\n *\n * @param {String} classToAdd Classname to add\n * @return {Component}\n * @method addClass\n */\n addClass(classToAdd) {\n Dom.addElClass(this.el_, classToAdd);\n return this;\n }\n\n /**\n * Remove a CSS class name from the component's element\n *\n * @param {String} classToRemove Classname to remove\n * @return {Component}\n * @method removeClass\n */\n removeClass(classToRemove) {\n Dom.removeElClass(this.el_, classToRemove);\n return this;\n }\n\n /**\n * Add or remove a CSS class name from the component's element\n *\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n *\n * @return {Component}\n * @method toggleClass\n */\n toggleClass(classToToggle, predicate) {\n Dom.toggleElClass(this.el_, classToToggle, predicate);\n return this;\n }\n\n /**\n * Show the component element if hidden\n *\n * @return {Component}\n * @method show\n */\n show() {\n this.removeClass('vjs-hidden');\n return this;\n }\n\n /**\n * Hide the component element if currently showing\n *\n * @return {Component}\n * @method hide\n */\n hide() {\n this.addClass('vjs-hidden');\n return this;\n }\n\n /**\n * Lock an item in its visible state\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method lockShowing\n */\n lockShowing() {\n this.addClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Unlock an item to be hidden\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method unlockShowing\n */\n unlockShowing() {\n this.removeClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Set or get the width of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num Optional width number\n * @param {Boolean} skipListeners Skip the 'resize' event trigger\n * @return {Component} This component, when setting the width\n * @return {Number|String} The width, when getting\n * @method width\n */\n width(num, skipListeners) {\n return this.dimension('width', num, skipListeners);\n }\n\n /**\n * Get or set the height of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num New component height\n * @param {Boolean=} skipListeners Skip the resize event trigger\n * @return {Component} This component, when setting the height\n * @return {Number|String} The height, when getting\n * @method height\n */\n height(num, skipListeners) {\n return this.dimension('height', num, skipListeners);\n }\n\n /**\n * Set both width and height at the same time\n *\n * @param {Number|String} width Width of player\n * @param {Number|String} height Height of player\n * @return {Component} The component\n * @method dimensions\n */\n dimensions(width, height) {\n // Skip resize listeners on width for optimization\n return this.width(width, true).height(height);\n }\n\n /**\n * Get or set width or height\n * This is the shared code for the width() and height() methods.\n * All for an integer, integer + 'px' or integer + '%';\n * Known issue: Hidden elements officially have a width of 0. We're defaulting\n * to the style.width value and falling back to computedStyle which has the\n * hidden element issue. Info, but probably not an efficient fix:\n * http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/\n *\n * @param {String} widthOrHeight 'width' or 'height'\n * @param {Number|String=} num New dimension\n * @param {Boolean=} skipListeners Skip resize event trigger\n * @return {Component} The component if a dimension was set\n * @return {Number|String} The dimension if nothing was set\n * @private\n * @method dimension\n */\n dimension(widthOrHeight, num, skipListeners) {\n if (num !== undefined) {\n // Set to zero if null or literally NaN (NaN !== NaN)\n if (num === null || num !== num) {\n num = 0;\n }\n\n // Check if using css width/height (% or px) and adjust\n if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n this.el_.style[widthOrHeight] = num;\n } else if (num === 'auto') {\n this.el_.style[widthOrHeight] = '';\n } else {\n this.el_.style[widthOrHeight] = num + 'px';\n }\n\n // skipListeners allows us to avoid triggering the resize event when setting both width and height\n if (!skipListeners) {\n this.trigger('resize');\n }\n\n // Return component\n return this;\n }\n\n // Not setting a value, so getting it\n // Make sure element exists\n if (!this.el_) {\n return 0;\n }\n\n // Get dimension value from style\n let val = this.el_.style[widthOrHeight];\n let pxIndex = val.indexOf('px');\n\n if (pxIndex !== -1) {\n // Return the pixel value with no 'px'\n return parseInt(val.slice(0, pxIndex), 10);\n }\n\n // No px so using % or no style was set, so falling back to offsetWidth/height\n // If component has display:none, offset will return 0\n // TODO: handle display:none and no dimension style using px\n return parseInt(this.el_['offset' + toTitleCase(widthOrHeight)], 10);\n }\n\n /**\n * Get width or height of computed style\n * @param {String} widthOrHeight 'width' or 'height'\n * @return {Number|Boolean} The bolean false if nothing was set\n * @method currentDimension\n */\n currentDimension(widthOrHeight) {\n let computedWidthOrHeight = 0;\n\n if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n throw new Error('currentDimension only accepts width or height value');\n }\n\n if (typeof window.getComputedStyle === 'function') {\n const computedStyle = window.getComputedStyle(this.el_);\n computedWidthOrHeight = computedStyle.getPropertyValue(widthOrHeight) || computedStyle[widthOrHeight];\n } else if (this.el_.currentStyle) {\n // ie 8 doesn't support computed style, shim it\n // return clientWidth or clientHeight instead for better accuracy\n const rule = `offset${toTitleCase(widthOrHeight)}`;\n computedWidthOrHeight = this.el_[rule];\n }\n\n // remove 'px' from variable and parse as integer\n computedWidthOrHeight = parseFloat(computedWidthOrHeight);\n return computedWidthOrHeight;\n }\n\n /**\n * Get an object which contains width and height values of computed style\n * @return {Object} The dimensions of element\n * @method currentDimensions\n */\n currentDimensions() {\n return {\n width: this.currentDimension('width'),\n height: this.currentDimension('height')\n };\n }\n\n /**\n * Get width of computed style\n * @return {Integer}\n * @method currentWidth\n */\n currentWidth() {\n return this.currentDimension('width');\n }\n\n /**\n * Get height of computed style\n * @return {Integer}\n * @method currentHeight\n */\n currentHeight() {\n return this.currentDimension('height');\n }\n\n /**\n * Emit 'tap' events when touch events are supported\n * This is used to support toggling the controls through a tap on the video.\n * We're requiring them to be enabled because otherwise every component would\n * have this extra overhead unnecessarily, on mobile devices where extra\n * overhead is especially bad.\n *\n * @private\n * @method emitTapEvents\n */\n emitTapEvents() {\n // Track the start time so we can determine how long the touch lasted\n let touchStart = 0;\n let firstTouch = null;\n\n // Maximum movement allowed during a touch event to still be considered a tap\n // Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number.\n const tapMovementThreshold = 10;\n\n // The maximum length a touch can be while still being considered a tap\n const touchTimeThreshold = 200;\n\n let couldBeTap;\n\n this.on('touchstart', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length === 1) {\n // Copy the touches object to prevent modifying the original\n firstTouch = assign({}, event.touches[0]);\n // Record start time so we can detect a tap vs. \"touch and hold\"\n touchStart = new Date().getTime();\n // Reset couldBeTap tracking\n couldBeTap = true;\n }\n });\n\n this.on('touchmove', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length > 1) {\n couldBeTap = false;\n } else if (firstTouch) {\n // Some devices will throw touchmoves for all but the slightest of taps.\n // So, if we moved only a small distance, this could still be a tap\n const xdiff = event.touches[0].pageX - firstTouch.pageX;\n const ydiff = event.touches[0].pageY - firstTouch.pageY;\n const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n\n if (touchDistance > tapMovementThreshold) {\n couldBeTap = false;\n }\n }\n });\n\n const noTap = function() {\n couldBeTap = false;\n };\n\n // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n this.on('touchleave', noTap);\n this.on('touchcancel', noTap);\n\n // When the touch ends, measure how long it took and trigger the appropriate\n // event\n this.on('touchend', function(event) {\n firstTouch = null;\n // Proceed only if the touchmove/leave/cancel event didn't happen\n if (couldBeTap === true) {\n // Measure how long the touch lasted\n const touchTime = new Date().getTime() - touchStart;\n\n // Make sure the touch was less than the threshold to be considered a tap\n if (touchTime < touchTimeThreshold) {\n // Don't let browser turn this into a click\n event.preventDefault();\n this.trigger('tap');\n // It may be good to copy the touchend event object and change the\n // type to tap, if the other event properties aren't exact after\n // Events.fixEvent runs (e.g. event.target)\n }\n }\n });\n }\n\n /**\n * Report user touch activity when touch events occur\n * User activity is used to determine when controls should show/hide. It's\n * relatively simple when it comes to mouse events, because any mouse event\n * should show the controls. So we capture mouse events that bubble up to the\n * player and report activity when that happens.\n * With touch events it isn't as easy. We can't rely on touch events at the\n * player level, because a tap (touchstart + touchend) on the video itself on\n * mobile devices is meant to turn controls off (and on). User activity is\n * checked asynchronously, so what could happen is a tap event on the video\n * turns the controls off, then the touchend event bubbles up to the player,\n * which if it reported user activity, would turn the controls right back on.\n * (We also don't want to completely block touch events from bubbling up)\n * Also a touchmove, touch+hold, and anything other than a tap is not supposed\n * to turn the controls back on on a mobile device.\n * Here we're setting the default component behavior to report user activity\n * whenever touch events happen, and this can be turned off by components that\n * want touch events to act differently.\n *\n * @method enableTouchActivity\n */\n enableTouchActivity() {\n // Don't continue if the root player doesn't support reporting user activity\n if (!this.player() || !this.player().reportUserActivity) {\n return;\n }\n\n // listener for reporting that the user is active\n const report = Fn.bind(this.player(), this.player().reportUserActivity);\n\n let touchHolding;\n\n this.on('touchstart', function() {\n report();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(touchHolding);\n // report at the same interval as activityCheck\n touchHolding = this.setInterval(report, 250);\n });\n\n const touchEnd = function(event) {\n report();\n // stop the interval that maintains activity if the touch is holding\n this.clearInterval(touchHolding);\n };\n\n this.on('touchmove', report);\n this.on('touchend', touchEnd);\n this.on('touchcancel', touchEnd);\n }\n\n /**\n * Creates timeout and sets up disposal automatically.\n *\n * @param {Function} fn The function to run after the timeout.\n * @param {Number} timeout Number of ms to delay before executing specified function.\n * @return {Number} Returns the timeout ID\n * @method setTimeout\n */\n setTimeout(fn, timeout) {\n fn = Fn.bind(this, fn);\n\n // window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't.\n let timeoutId = window.setTimeout(fn, timeout);\n\n const disposeFn = function() {\n this.clearTimeout(timeoutId);\n };\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.on('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Clears a timeout and removes the associated dispose listener\n *\n * @param {Number} timeoutId The id of the timeout to clear\n * @return {Number} Returns the timeout ID\n * @method clearTimeout\n */\n clearTimeout(timeoutId) {\n window.clearTimeout(timeoutId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.off('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Creates an interval and sets up disposal automatically.\n *\n * @param {Function} fn The function to run every N seconds.\n * @param {Number} interval Number of ms to delay before executing specified function.\n * @return {Number} Returns the interval ID\n * @method setInterval\n */\n setInterval(fn, interval) {\n fn = Fn.bind(this, fn);\n\n let intervalId = window.setInterval(fn, interval);\n\n const disposeFn = function() {\n this.clearInterval(intervalId);\n };\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.on('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Clears an interval and removes the associated dispose listener\n *\n * @param {Number} intervalId The id of the interval to clear\n * @return {Number} Returns the interval ID\n * @method clearInterval\n */\n clearInterval(intervalId) {\n window.clearInterval(intervalId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.off('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Registers a component\n *\n * @param {String} name Name of the component to register\n * @param {Object} comp The component to register\n * @static\n * @method registerComponent\n */\n static registerComponent(name, comp) {\n if (!Component.components_) {\n Component.components_ = {};\n }\n\n Component.components_[name] = comp;\n return comp;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getComponent(name) {\n if (Component.components_ && Component.components_[name]) {\n return Component.components_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)`);\n return window.videojs[name];\n }\n }\n\n /**\n * Sets up the constructor using the supplied init method\n * or uses the init of the parent object\n *\n * @param {Object} props An object of properties\n * @static\n * @deprecated\n * @method extend\n */\n static extend(props) {\n props = props || {};\n\n log.warn('Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead');\n\n // Set up the constructor using the supplied init method\n // or using the init of the parent object\n // Make sure to check the unobfuscated version for external libs\n let init = props.init || props.init || this.prototype.init || this.prototype.init || function() {};\n // In Resig's simple class inheritance (previously used) the constructor\n // is a function that calls `this.init.apply(arguments)`\n // However that would prevent us from using `ParentObject.call(this);`\n // in a Child constructor because the `this` in `this.init`\n // would still refer to the Child and cause an infinite loop.\n // We would instead have to do\n // `ParentObject.prototype.init.apply(this, arguments);`\n // Bleh. We're not creating a _super() function, so it's good to keep\n // the parent constructor reference simple.\n let subObj = function() {\n init.apply(this, arguments);\n };\n\n // Inherit from this object's prototype\n subObj.prototype = Object.create(this.prototype);\n // Reset the constructor property for subObj otherwise\n // instances of subObj would have the constructor of the parent Object\n subObj.prototype.constructor = subObj;\n\n // Make the class extendable\n subObj.extend = Component.extend;\n\n // Extend subObj's prototype with functions and other properties from props\n for (let name in props) {\n if (props.hasOwnProperty(name)) {\n subObj.prototype[name] = props[name];\n }\n }\n\n return subObj;\n }\n}\n\nComponent.registerComponent('Component', Component);\nexport default Component;\n", + "/**\n * @file control-bar.js\n */\nimport Component from '../component.js';\n\n// Required children\nimport PlayToggle from './play-toggle.js';\nimport CurrentTimeDisplay from './time-controls/current-time-display.js';\nimport DurationDisplay from './time-controls/duration-display.js';\nimport TimeDivider from './time-controls/time-divider.js';\nimport RemainingTimeDisplay from './time-controls/remaining-time-display.js';\nimport LiveDisplay from './live-display.js';\nimport ProgressControl from './progress-control/progress-control.js';\nimport FullscreenToggle from './fullscreen-toggle.js';\nimport VolumeControl from './volume-control/volume-control.js';\nimport VolumeMenuButton from './volume-menu-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport ChaptersButton from './text-track-controls/chapters-button.js';\nimport DescriptionsButton from './text-track-controls/descriptions-button.js';\nimport SubtitlesButton from './text-track-controls/subtitles-button.js';\nimport CaptionsButton from './text-track-controls/captions-button.js';\nimport PlaybackRateMenuButton from './playback-rate-menu/playback-rate-menu-button.js';\nimport CustomControlSpacer from './spacer-controls/custom-control-spacer.js';\n\n/**\n * Container of main controls\n *\n * @extends Component\n * @class ControlBar\n */\nclass ControlBar extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-control-bar',\n dir: 'ltr'\n }, {\n 'role': 'group' // The control bar is a group, so it can contain menuitems\n });\n }\n}\n\nControlBar.prototype.options_ = {\n loadEvent: 'play',\n children: [\n 'playToggle',\n 'volumeMenuButton',\n 'currentTimeDisplay',\n 'timeDivider',\n 'durationDisplay',\n 'progressControl',\n 'liveDisplay',\n 'remainingTimeDisplay',\n 'customControlSpacer',\n 'playbackRateMenuButton',\n 'chaptersButton',\n 'descriptionsButton',\n 'subtitlesButton',\n 'captionsButton',\n 'fullscreenToggle'\n ]\n};\n\nComponent.registerComponent('ControlBar', ControlBar);\nexport default ControlBar;\n", + "/**\n * @file fullscreen-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n * @class FullscreenToggle\n */\nclass FullscreenToggle extends Button {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-fullscreen-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles click for full screen\n *\n * @method handleClick\n */\n handleClick() {\n if (!this.player_.isFullscreen()) {\n this.player_.requestFullscreen();\n this.controlText('Non-Fullscreen');\n } else {\n this.player_.exitFullscreen();\n this.controlText('Fullscreen');\n }\n }\n\n}\n\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\n\nComponent.registerComponent('FullscreenToggle', FullscreenToggle);\nexport default FullscreenToggle;\n", + "/**\n * @file live-display.js\n */\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * Displays the live indicator\n * TODO - Future make it click to snap to live\n *\n * @extends Component\n * @class LiveDisplay\n */\nclass LiveDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.updateShowing();\n this.on(this.player(), 'durationchange', this.updateShowing);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n var el = super.createEl('div', {\n className: 'vjs-live-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-live-display',\n innerHTML: `${this.localize('Stream Type')}${this.localize('LIVE')}`\n }, {\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n updateShowing() {\n if (this.player().duration() === Infinity) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n}\n\nComponent.registerComponent('LiveDisplay', LiveDisplay);\nexport default LiveDisplay;\n", + "/**\n * @file mute-toggle.js\n */\nimport Button from '../button';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * A button component for muting the audio\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MuteToggle\n */\nclass MuteToggle extends Button {\n\n constructor(player, options) {\n super(player, options);\n\n this.on(player, 'volumechange', this.update);\n\n // hide mute toggle if the current tech doesn't support volume control\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n\n this.on(player, 'loadstart', function() {\n this.update(); // We need to update the button to account for a default muted state.\n\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-mute-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click on mute\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.muted( this.player_.muted() ? false : true );\n }\n\n /**\n * Update volume\n *\n * @method update\n */\n update() {\n var vol = this.player_.volume(),\n level = 3;\n\n if (vol === 0 || this.player_.muted()) {\n level = 0;\n } else if (vol < 0.33) {\n level = 1;\n } else if (vol < 0.67) {\n level = 2;\n }\n\n // Don't rewrite the button text if the actual text doesn't change.\n // This causes unnecessary and confusing information for screen reader users.\n // This check is needed because this function gets called every time the volume level is changed.\n let toMute = this.player_.muted() ? 'Unmute' : 'Mute';\n if (this.controlText() !== toMute) {\n this.controlText(toMute);\n }\n\n /* TODO improve muted icon classes */\n for (var i = 0; i < 4; i++) {\n Dom.removeElClass(this.el_, `vjs-vol-${i}`);\n }\n Dom.addElClass(this.el_, `vjs-vol-${level}`);\n }\n\n}\n\nMuteToggle.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('MuteToggle', MuteToggle);\nexport default MuteToggle;\n", + "/**\n * @file play-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Button to toggle between play and pause\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PlayToggle\n */\nclass PlayToggle extends Button {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'play', this.handlePlay);\n this.on(player, 'pause', this.handlePause);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-play-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click to toggle between play and pause\n *\n * @method handleClick\n */\n handleClick() {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n /**\n * Add the vjs-playing class to the element so it can change appearance\n *\n * @method handlePlay\n */\n handlePlay() {\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n this.controlText('Pause'); // change the button text to \"Pause\"\n }\n\n /**\n * Add the vjs-paused class to the element so it can change appearance\n *\n * @method handlePause\n */\n handlePause() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.controlText('Play'); // change the button text to \"Play\"\n }\n\n}\n\nPlayToggle.prototype.controlText_ = 'Play';\n\nComponent.registerComponent('PlayToggle', PlayToggle);\nexport default PlayToggle;\n", + "/**\n * @file playback-rate-menu-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Menu from '../../menu/menu.js';\nimport PlaybackRateMenuItem from './playback-rate-menu-item.js';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * The component for controlling the playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class PlaybackRateMenuButton\n */\nclass PlaybackRateMenuButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n this.updateVisibility();\n this.updateLabel();\n\n this.on(player, 'loadstart', this.updateVisibility);\n this.on(player, 'ratechange', this.updateLabel);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl();\n\n this.labelEl_ = Dom.createEl('div', {\n className: 'vjs-playback-rate-value',\n innerHTML: 1.0\n });\n\n el.appendChild(this.labelEl_);\n\n return el;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-playback-rate ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the playback rate menu\n *\n * @return {Menu} Menu object populated with items\n * @method createMenu\n */\n createMenu() {\n let menu = new Menu(this.player());\n let rates = this.playbackRates();\n\n if (rates) {\n for (let i = rates.length - 1; i >= 0; i--) {\n menu.addChild(\n new PlaybackRateMenuItem(this.player(), { 'rate': rates[i] + 'x'})\n );\n }\n }\n\n return menu;\n }\n\n /**\n * Updates ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current playback rate\n this.el().setAttribute('aria-valuenow', this.player().playbackRate());\n }\n\n /**\n * Handle menu item click\n *\n * @method handleClick\n */\n handleClick() {\n // select next rate option\n let currentRate = this.player().playbackRate();\n let rates = this.playbackRates();\n\n // this will select first one if the last one currently selected\n let newRate = rates[0];\n for (let i = 0; i < rates.length ; i++) {\n if (rates[i] > currentRate) {\n newRate = rates[i];\n break;\n }\n }\n this.player().playbackRate(newRate);\n }\n\n /**\n * Get possible playback rates\n *\n * @return {Array} Possible playback rates\n * @method playbackRates\n */\n playbackRates() {\n return this.options_['playbackRates'] || (this.options_.playerOptions && this.options_.playerOptions['playbackRates']);\n }\n\n /**\n * Get supported playback rates\n *\n * @return {Array} Supported playback rates\n * @method playbackRateSupported\n */\n playbackRateSupported() {\n return this.player().tech_\n && this.player().tech_['featuresPlaybackRate']\n && this.playbackRates()\n && this.playbackRates().length > 0\n ;\n }\n\n /**\n * Hide playback rate controls when they're no playback rate options to select\n *\n * @method updateVisibility\n */\n updateVisibility() {\n if (this.playbackRateSupported()) {\n this.removeClass('vjs-hidden');\n } else {\n this.addClass('vjs-hidden');\n }\n }\n\n /**\n * Update button label when rate changed\n *\n * @method updateLabel\n */\n updateLabel() {\n if (this.playbackRateSupported()) {\n this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\n }\n }\n\n}\n\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\n\nComponent.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\nexport default PlaybackRateMenuButton;\n", + "/**\n * @file playback-rate-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The specific menu item type for selecting a playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class PlaybackRateMenuItem\n */\nclass PlaybackRateMenuItem extends MenuItem {\n\n constructor(player, options){\n let label = options['rate'];\n let rate = parseFloat(label, 10);\n\n // Modify options for parent MenuItem class's init.\n options['label'] = label;\n options['selected'] = rate === 1;\n super(player, options);\n\n this.label = label;\n this.rate = rate;\n\n this.on(player, 'ratechange', this.update);\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player().playbackRate(this.rate);\n }\n\n /**\n * Update playback rate with selected rate\n *\n * @method update\n */\n update() {\n this.selected(this.player().playbackRate() === this.rate);\n }\n\n}\n\nPlaybackRateMenuItem.prototype.contentElType = 'button';\n\nComponent.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\nexport default PlaybackRateMenuItem;\n", + "/**\n * @file load-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * Shows load progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class LoadProgressBar\n */\nclass LoadProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'progress', this.update);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-load-progress',\n innerHTML: `${this.localize('Loaded')}: 0%`\n });\n }\n\n /**\n * Update progress bar\n *\n * @method update\n */\n update() {\n let buffered = this.player_.buffered();\n let duration = this.player_.duration();\n let bufferedEnd = this.player_.bufferedEnd();\n let children = this.el_.children;\n\n // get the percent width of a time compared to the total end\n let percentify = function (time, end){\n let percent = (time / end) || 0; // no NaN\n return ((percent >= 1 ? 1 : percent) * 100) + '%';\n };\n\n // update the width of the progress bar\n this.el_.style.width = percentify(bufferedEnd, duration);\n\n // add child elements to represent the individual buffered time ranges\n for (let i = 0; i < buffered.length; i++) {\n let start = buffered.start(i);\n let end = buffered.end(i);\n let part = children[i];\n\n if (!part) {\n part = this.el_.appendChild(Dom.createEl());\n }\n\n // set the percent based on the width of the progress bar (bufferedEnd)\n part.style.left = percentify(start, bufferedEnd);\n part.style.width = percentify(end - start, bufferedEnd);\n }\n\n // remove unused buffered range elements\n for (let i = children.length; i > buffered.length; i--) {\n this.el_.removeChild(children[i-1]);\n }\n }\n\n}\n\nComponent.registerComponent('LoadProgressBar', LoadProgressBar);\nexport default LoadProgressBar;\n", + "/**\n * @file mouse-time-display.js\n */\nimport window from 'global/window';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport throttle from 'lodash-compat/function/throttle';\n\n/**\n * The Mouse Time Display component shows the time you will seek to\n * when hovering over the progress bar\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class MouseTimeDisplay\n */\nclass MouseTimeDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.tooltip = Dom.createEl('div', {className: 'vjs-time-tooltip'});\n this.el().appendChild(this.tooltip);\n this.addClass('vjs-keep-tooltips-inside');\n }\n\n this.update(0, 0);\n\n player.on('ready', () => {\n this.on(player.controlBar.progressControl.el(), 'mousemove', throttle(Fn.bind(this, this.handleMouseMove), 25));\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-mouse-display'\n });\n }\n\n handleMouseMove(event) {\n let duration = this.player_.duration();\n let newTime = this.calculateDistance(event) * duration;\n let position = event.pageX - Dom.findElPosition(this.el().parentNode).left;\n\n this.update(newTime, position);\n }\n\n update(newTime, position) {\n let time = formatTime(newTime, this.player_.duration());\n\n this.el().style.left = position + 'px';\n this.el().setAttribute('data-current-time', time);\n\n if (this.keepTooltipsInside) {\n let clampedPosition = this.clampPosition_(position);\n let difference = position - clampedPosition + 1;\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltip).width);\n let tooltipWidthHalf = tooltipWidth / 2;\n\n this.tooltip.innerHTML = time;\n this.tooltip.style.right = `-${tooltipWidthHalf - difference}px`;\n }\n }\n\n calculateDistance(event) {\n return Dom.getPointerPosition(this.el().parentNode, event).x;\n }\n\n /**\n * This takes in a horizontal position for the bar and returns a clamped position.\n * Clamped position means that it will keep the position greater than half the width\n * of the tooltip and smaller than the player width minus half the width o the tooltip.\n * It will only clamp the position if `keepTooltipsInside` option is set.\n *\n * @param {Number} position the position the bar wants to be\n * @return {Number} newPosition the (potentially) clamped position\n * @method clampPosition_\n */\n clampPosition_(position) {\n if (!this.keepTooltipsInside) {\n return position;\n }\n\n let playerWidth = parseFloat(window.getComputedStyle(this.player().el()).width);\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltip).width);\n let tooltipWidthHalf = tooltipWidth / 2;\n let actualPosition = position;\n\n if (position < tooltipWidthHalf) {\n actualPosition = Math.ceil(tooltipWidthHalf);\n } else if (position > (playerWidth - tooltipWidthHalf)) {\n actualPosition = Math.floor(playerWidth - tooltipWidthHalf);\n }\n\n return actualPosition;\n }\n}\n\nComponent.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\nexport default MouseTimeDisplay;\n", + "/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass PlayProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.addClass('vjs-keep-tooltips-inside');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-play-progress vjs-slider-bar',\n innerHTML: `${this.localize('Progress')}: 0%`\n });\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.el_.setAttribute('data-current-time', formatTime(time, this.player_.duration()));\n }\n\n}\n\nComponent.registerComponent('PlayProgressBar', PlayProgressBar);\nexport default PlayProgressBar;\n", + "/**\n * @file progress-control.js\n */\nimport Component from '../../component.js';\nimport SeekBar from './seek-bar.js';\nimport MouseTimeDisplay from './mouse-time-display.js';\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class ProgressControl\n */\nclass ProgressControl extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-control vjs-control'\n });\n }\n}\n\nProgressControl.prototype.options_ = {\n children: [\n 'seekBar'\n ]\n};\n\nComponent.registerComponent('ProgressControl', ProgressControl);\nexport default ProgressControl;\n", + "/**\n * @file seek-bar.js\n */\nimport window from 'global/window';\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport LoadProgressBar from './load-progress-bar.js';\nimport PlayProgressBar from './play-progress-bar.js';\nimport TooltipProgressBar from './tooltip-progress-bar.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport assign from 'object.assign';\n\n/**\n * Seek Bar and holder for the progress bars\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class SeekBar\n */\nclass SeekBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'timeupdate', this.updateProgress);\n this.on(player, 'ended', this.updateProgress);\n player.ready(Fn.bind(this, this.updateProgress));\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.tooltipProgressBar = this.addChild('TooltipProgressBar');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-holder'\n }, {\n 'aria-label': 'progress bar'\n });\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateProgress() {\n this.updateAriaAttributes(this.el_);\n\n if (this.keepTooltipsInside) {\n this.updateAriaAttributes(this.tooltipProgressBar.el_);\n this.tooltipProgressBar.el_.style.width = this.bar.el_.style.width;\n\n let playerWidth = parseFloat(window.getComputedStyle(this.player().el()).width);\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltipProgressBar.tooltip).width);\n let tooltipStyle = this.tooltipProgressBar.el().style;\n tooltipStyle.maxWidth = Math.floor(playerWidth - (tooltipWidth / 2)) + 'px';\n tooltipStyle.minWidth = Math.ceil(tooltipWidth / 2) + 'px';\n tooltipStyle.right = `-${tooltipWidth / 2}px`;\n }\n }\n\n updateAriaAttributes(el) {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n el.setAttribute('aria-valuenow', (this.getPercent() * 100).toFixed(2)); // machine readable value of progress bar (percentage complete)\n el.setAttribute('aria-valuetext', formatTime(time, this.player_.duration())); // human readable value of progress bar (time complete)\n }\n\n /**\n * Get percentage of video played\n *\n * @return {Number} Percentage played\n * @method getPercent\n */\n getPercent() {\n let percent = this.player_.currentTime() / this.player_.duration();\n return percent >= 1 ? 1 : percent;\n }\n\n /**\n * Handle mouse down on seek bar\n *\n * @method handleMouseDown\n */\n handleMouseDown(event) {\n super.handleMouseDown(event);\n\n this.player_.scrubbing(true);\n\n this.videoWasPlaying = !this.player_.paused();\n this.player_.pause();\n }\n\n /**\n * Handle mouse move on seek bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n let newTime = this.calculateDistance(event) * this.player_.duration();\n\n // Don't let video end while scrubbing.\n if (newTime === this.player_.duration()) { newTime = newTime - 0.1; }\n\n // Set new time (tell player to seek to new time)\n this.player_.currentTime(newTime);\n }\n\n /**\n * Handle mouse up on seek bar\n *\n * @method handleMouseUp\n */\n handleMouseUp(event) {\n super.handleMouseUp(event);\n\n this.player_.scrubbing(false);\n if (this.videoWasPlaying) {\n this.player_.play();\n }\n }\n\n /**\n * Move more quickly fast forward for keyboard-only users\n *\n * @method stepForward\n */\n stepForward() {\n this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users\n }\n\n /**\n * Move more quickly rewind for keyboard-only users\n *\n * @method stepBack\n */\n stepBack() {\n this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users\n }\n\n}\n\nSeekBar.prototype.options_ = {\n children: [\n 'loadProgressBar',\n 'mouseTimeDisplay',\n 'playProgressBar'\n ],\n 'barName': 'playProgressBar'\n};\n\nSeekBar.prototype.playerEvent = 'timeupdate';\n\nComponent.registerComponent('SeekBar', SeekBar);\nexport default SeekBar;\n", + "/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass TooltipProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-tooltip-progress-bar vjs-slider-bar',\n innerHTML: `
    \n ${this.localize('Progress')}: 0%`\n });\n\n this.tooltip = el.querySelector('.vjs-time-tooltip');\n\n return el;\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let formattedTime = formatTime(time, this.player_.duration());\n this.el_.setAttribute('data-current-time', formattedTime);\n this.tooltip.innerHTML = formattedTime;\n }\n\n}\n\nComponent.registerComponent('TooltipProgressBar', TooltipProgressBar);\nexport default TooltipProgressBar;\n", + "/**\n * @file custom-control-spacer.js\n */\nimport Spacer from './spacer.js';\nimport Component from '../../component.js';\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n * @class CustomControlSpacer\n */\nclass CustomControlSpacer extends Spacer {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl({\n className: this.buildCSSClass(),\n });\n\n // No-flex/table-cell mode requires there be some content\n // in the cell to fill the remaining space of the table.\n el.innerHTML = ' ';\n return el;\n }\n}\n\nComponent.registerComponent('CustomControlSpacer', CustomControlSpacer);\nexport default CustomControlSpacer;\n", + "/**\n * @file spacer.js\n */\nimport Component from '../../component.js';\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n * @class Spacer\n */\nclass Spacer extends Component {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n}\n\nComponent.registerComponent('Spacer', Spacer);\n\nexport default Spacer;\n", + "/**\n * @file caption-settings-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The menu item for caption track settings menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class CaptionSettingsMenuItem\n */\n class CaptionSettingsMenuItem extends TextTrackMenuItem {\n\n constructor(player, options) {\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' settings',\n 'selectable': false,\n 'default': false,\n mode: 'disabled'\n };\n\n // CaptionSettingsMenuItem has no concept of 'selected'\n options['selectable'] = false;\n\n super(player, options);\n this.addClass('vjs-texttrack-settings');\n this.controlText(', opens ' + options['kind'] + ' settings dialog');\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n this.player().getChild('textTrackSettings').show();\n this.player().getChild('textTrackSettings').el_.focus();\n }\n\n}\n\nComponent.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\nexport default CaptionSettingsMenuItem;\n", + "/**\n * @file captions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport CaptionSettingsMenuItem from './caption-settings-menu-item.js';\n\n/**\n * The button component for toggling and selecting captions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class CaptionsButton\n */\nclass CaptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Captions Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-captions-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Update caption menu items\n *\n * @method update\n */\n update() {\n let threshold = 2;\n super.update();\n\n // if native, then threshold is 1 because no settings button\n if (this.player().tech_ && this.player().tech_['featuresNativeTextTracks']) {\n threshold = 1;\n }\n\n if (this.items && this.items.length > threshold) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Create caption menu items\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n if (!(this.player().tech_ && this.player().tech_['featuresNativeTextTracks'])) {\n items.push(new CaptionSettingsMenuItem(this.player_, { 'kind': this.kind_ }));\n }\n\n return super.createItems(items);\n }\n\n}\n\nCaptionsButton.prototype.kind_ = 'captions';\nCaptionsButton.prototype.controlText_ = 'Captions';\n\nComponent.registerComponent('CaptionsButton', CaptionsButton);\nexport default CaptionsButton;\n", + "/**\n * @file chapters-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport ChaptersTrackMenuItem from './chapters-track-menu-item.js';\nimport Menu from '../../menu/menu.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport toTitleCase from '../../utils/to-title-case.js';\nimport window from 'global/window';\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class ChaptersButton\n */\nclass ChaptersButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Chapters Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-chapters-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Create a menu item for each text track\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n /**\n * Create menu from chapter buttons\n *\n * @return {Menu} Menu of chapter buttons\n * @method createMenu\n */\n createMenu() {\n let tracks = this.player_.textTracks() || [];\n let chaptersTrack;\n let items = this.items = [];\n\n for (let i = 0, length = tracks.length; i < length; i++) {\n let track = tracks[i];\n\n if (track['kind'] === this.kind_) {\n chaptersTrack = track;\n\n break;\n }\n }\n\n let menu = this.menu;\n if (menu === undefined) {\n menu = new Menu(this.player_);\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.kind_),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n if (chaptersTrack && chaptersTrack.cues == null) {\n chaptersTrack['mode'] = 'hidden';\n\n let remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(chaptersTrack);\n\n if (remoteTextTrackEl) {\n remoteTextTrackEl.addEventListener('load', (event) => this.update());\n }\n }\n\n if (chaptersTrack && chaptersTrack.cues && chaptersTrack.cues.length > 0) {\n let cues = chaptersTrack['cues'], cue;\n\n for (let i = 0, l = cues.length; i < l; i++) {\n cue = cues[i];\n\n let mi = new ChaptersTrackMenuItem(this.player_, {\n 'track': chaptersTrack,\n 'cue': cue\n });\n\n items.push(mi);\n\n menu.addChild(mi);\n }\n\n this.addChild(menu);\n }\n\n if (this.items.length > 0) {\n this.show();\n }\n\n return menu;\n }\n\n}\n\nChaptersButton.prototype.kind_ = 'chapters';\nChaptersButton.prototype.controlText_ = 'Chapters';\n\nComponent.registerComponent('ChaptersButton', ChaptersButton);\nexport default ChaptersButton;\n", + "/**\n * @file chapters-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The chapter track menu item\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class ChaptersTrackMenuItem\n */\nclass ChaptersTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let cue = options['cue'];\n let currentTime = player.currentTime();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = cue.text;\n options['selected'] = (cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n super(player, options);\n\n this.track = track;\n this.cue = cue;\n track.addEventListener('cuechange', Fn.bind(this, this.update));\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player_.currentTime(this.cue.startTime);\n this.update(this.cue.startTime);\n }\n\n /**\n * Update chapter menu item\n *\n * @method update\n */\n update() {\n let cue = this.cue;\n let currentTime = this.player_.currentTime();\n\n // vjs.log(currentTime, cue.startTime);\n this.selected(cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n }\n\n}\n\nComponent.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\nexport default ChaptersTrackMenuItem;\n", + "/**\n * @file descriptions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The button component for toggling and selecting descriptions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class DescriptionsButton\n */\nclass DescriptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label', 'Descriptions Menu');\n\n let tracks = player.textTracks();\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let disabled = false;\n\n // Check whether a track of a different kind is showing\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] !== this.kind_ && track['mode'] === 'showing') {\n disabled = true;\n break;\n }\n }\n\n // If another track is showing, disable this menu button\n if (disabled) {\n this.disable();\n } else {\n this.enable();\n }\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-descriptions-button ${super.buildCSSClass()}`;\n }\n\n}\n\nDescriptionsButton.prototype.kind_ = 'descriptions';\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\n\nComponent.registerComponent('DescriptionsButton', DescriptionsButton);\nexport default DescriptionsButton;\n", + "/**\n * @file off-text-track-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * A special menu item for turning of a specific type of text track\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class OffTextTrackMenuItem\n */\nclass OffTextTrackMenuItem extends TextTrackMenuItem {\n\n constructor(player, options){\n // Create pseudo track info\n // Requires options['kind']\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' off',\n 'default': false,\n 'mode': 'disabled'\n };\n\n // MenuItem is selectable\n options['selectable'] = true;\n\n super(player, options);\n this.selected(true);\n }\n\n /**\n * Handle text track change\n *\n * @param {Object} event Event object\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let selected = true;\n\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] === this.track['kind'] && track['mode'] === 'showing') {\n selected = false;\n break;\n }\n }\n\n this.selected(selected);\n }\n\n}\n\nComponent.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\nexport default OffTextTrackMenuItem;\n", + "/**\n * @file subtitles-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class SubtitlesButton\n */\nclass SubtitlesButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Subtitles Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-subtitles-button ${super.buildCSSClass()}`;\n }\n\n}\n\nSubtitlesButton.prototype.kind_ = 'subtitles';\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\n\nComponent.registerComponent('SubtitlesButton', SubtitlesButton);\nexport default SubtitlesButton;\n", + "/**\n * @file text-track-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport OffTextTrackMenuItem from './off-text-track-menu-item.js';\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class TextTrackButton\n */\nclass TextTrackButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n let tracks = this.player_.textTracks();\n\n if (this.items.length <= 1) {\n this.hide();\n }\n\n if (!tracks) {\n return;\n }\n\n let updateHandler = Fn.bind(this, this.update);\n tracks.addEventListener('removetrack', updateHandler);\n tracks.addEventListener('addtrack', updateHandler);\n\n this.player_.on('dispose', function() {\n tracks.removeEventListener('removetrack', updateHandler);\n tracks.removeEventListener('addtrack', updateHandler);\n });\n }\n\n // Create a menu item for each text track\n createItems(items=[]) {\n // Add an OFF menu item to turn all tracks off\n items.push(new OffTextTrackMenuItem(this.player_, { 'kind': this.kind_ }));\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // only add tracks that are of the appropriate kind and have a label\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n // MenuItem is selectable\n 'selectable': true,\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n}\n\nComponent.registerComponent('TextTrackButton', TextTrackButton);\nexport default TextTrackButton;\n", + "/**\n * @file text-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class TextTrackMenuItem\n */\nclass TextTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let tracks = player.textTracks();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = track['label'] || track['language'] || 'Unknown';\n options['selected'] = track['default'] || track['mode'] === 'showing';\n\n super(player, options);\n\n this.track = track;\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n\n // iOS7 doesn't dispatch change events to TextTrackLists when an\n // associated track's mode changes. Without something like\n // Object.observe() (also not present on iOS7), it's not\n // possible to detect changes to the mode attribute and polyfill\n // the change event. As a poor substitute, we manually dispatch\n // change events whenever the controls modify the mode.\n if (tracks && tracks.onchange === undefined) {\n let event;\n\n this.on(['tap', 'click'], function() {\n if (typeof window.Event !== 'object') {\n // Android 2.3 throws an Illegal Constructor error for window.Event\n try {\n event = new window.Event('change');\n } catch(err){}\n }\n\n if (!event) {\n event = document.createEvent('Event');\n event.initEvent('change', true, true);\n }\n\n tracks.dispatchEvent(event);\n });\n }\n }\n\n /**\n * Handle click on text track\n *\n * @method handleClick\n */\n handleClick(event) {\n let kind = this.track['kind'];\n let tracks = this.player_.textTracks();\n\n super.handleClick(event);\n\n if (!tracks) return;\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n if (track['kind'] !== kind) {\n continue;\n }\n\n if (track === this.track) {\n track['mode'] = 'showing';\n } else {\n track['mode'] = 'disabled';\n }\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n this.selected(this.track['mode'] === 'showing');\n }\n\n}\n\nComponent.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\nexport default TextTrackMenuItem;\n", + "/**\n * @file current-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the current time\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class CurrentTimeDisplay\n */\nclass CurrentTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-current-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-current-time-display',\n // label the current time for screen reader users\n innerHTML: 'Current Time ' + '0:00',\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update current time display\n *\n * @method updateContent\n */\n updateContent() {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let localizedText = this.localize('Current Time');\n let formattedTime = formatTime(time, this.player_.duration());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `${localizedText} ${formattedTime}`;\n }\n }\n\n}\n\nComponent.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\nexport default CurrentTimeDisplay;\n", + "/**\n * @file duration-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the duration\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class DurationDisplay\n */\nclass DurationDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // this might need to be changed to 'durationchange' instead of 'timeupdate' eventually,\n // however the durationchange event fires before this.player_.duration() is set,\n // so the value cannot be written out using this method.\n // Once the order of durationchange and this.player_.duration() being set is figured out,\n // this can be updated.\n this.on(player, 'timeupdate', this.updateContent);\n this.on(player, 'loadedmetadata', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-duration vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-duration-display',\n // label the duration time for screen reader users\n innerHTML: `${this.localize('Duration Time')} 0:00`\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update duration time display\n *\n * @method updateContent\n */\n updateContent() {\n let duration = this.player_.duration();\n if (duration && this.duration_ !== duration) {\n this.duration_ = duration;\n let localizedText = this.localize('Duration Time');\n let formattedTime = formatTime(duration);\n this.contentEl_.innerHTML = `${localizedText} ${formattedTime}`; // label the duration time for screen reader users\n }\n }\n\n}\n\nComponent.registerComponent('DurationDisplay', DurationDisplay);\nexport default DurationDisplay;\n", + "/**\n * @file remaining-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the time left in the video\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class RemainingTimeDisplay\n */\nclass RemainingTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-remaining-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-remaining-time-display',\n // label the remaining time for screen reader users\n innerHTML: `${this.localize('Remaining Time')} -0:00`,\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update remaining time display\n *\n * @method updateContent\n */\n updateContent() {\n if (this.player_.duration()) {\n const localizedText = this.localize('Remaining Time');\n const formattedTime = formatTime(this.player_.remainingTime());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `${localizedText} -${formattedTime}`;\n }\n }\n\n // Allows for smooth scrubbing, when player can't keep up.\n // var time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n // this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration());\n }\n\n}\n\nComponent.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\nexport default RemainingTimeDisplay;\n", + "/**\n * @file time-divider.js\n */\nimport Component from '../../component.js';\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class TimeDivider\n */\nclass TimeDivider extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-time-control vjs-time-divider',\n innerHTML: '
    /
    '\n });\n }\n\n}\n\nComponent.registerComponent('TimeDivider', TimeDivider);\nexport default TimeDivider;\n", + "/**\n * @file volume-bar.js\n */\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n// Required children\nimport VolumeLevel from './volume-level.js';\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class VolumeBar\n */\nclass VolumeBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'volumechange', this.updateARIAAttributes);\n player.ready(Fn.bind(this, this.updateARIAAttributes));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-bar vjs-slider-bar'\n }, {\n 'aria-label': 'volume level'\n });\n }\n\n /**\n * Handle mouse move on volume bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n this.checkMuted();\n this.player_.volume(this.calculateDistance(event));\n }\n\n checkMuted() {\n if (this.player_.muted()) {\n this.player_.muted(false);\n }\n }\n\n /**\n * Get percent of volume level\n *\n * @retun {Number} Volume level percent\n * @method getPercent\n */\n getPercent() {\n if (this.player_.muted()) {\n return 0;\n } else {\n return this.player_.volume();\n }\n }\n\n /**\n * Increase volume level for keyboard users\n *\n * @method stepForward\n */\n stepForward() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() + 0.1);\n }\n\n /**\n * Decrease volume level for keyboard users\n *\n * @method stepBack\n */\n stepBack() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() - 0.1);\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current value of volume bar as a percentage\n let volume = (this.player_.volume() * 100).toFixed(2);\n this.el_.setAttribute('aria-valuenow', volume);\n this.el_.setAttribute('aria-valuetext', volume + '%');\n }\n\n}\n\nVolumeBar.prototype.options_ = {\n children: [\n 'volumeLevel'\n ],\n 'barName': 'volumeLevel'\n};\n\nVolumeBar.prototype.playerEvent = 'volumechange';\n\nComponent.registerComponent('VolumeBar', VolumeBar);\nexport default VolumeBar;\n", + "/**\n * @file volume-control.js\n */\nimport Component from '../../component.js';\n\n// Required children\nimport VolumeBar from './volume-bar.js';\n\n/**\n * The component for controlling the volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeControl\n */\nclass VolumeControl extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // hide volume controls when they're not supported by the current tech\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n this.on(player, 'loadstart', function(){\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-control vjs-control'\n });\n }\n\n}\n\nVolumeControl.prototype.options_ = {\n children: [\n 'volumeBar'\n ]\n};\n\nComponent.registerComponent('VolumeControl', VolumeControl);\nexport default VolumeControl;\n", + "/**\n * @file volume-level.js\n */\nimport Component from '../../component.js';\n\n/**\n * Shows volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeLevel\n */\nclass VolumeLevel extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-level',\n innerHTML: ''\n });\n }\n\n}\n\nComponent.registerComponent('VolumeLevel', VolumeLevel);\nexport default VolumeLevel;\n", + "/**\n * @file volume-menu-button.js\n */\nimport * as Fn from '../utils/fn.js';\nimport Component from '../component.js';\nimport Popup from '../popup/popup.js';\nimport PopupButton from '../popup/popup-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport VolumeBar from './volume-control/volume-bar.js';\n\n/**\n * Button for volume popup\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends PopupButton\n * @class VolumeMenuButton\n */\nclass VolumeMenuButton extends PopupButton {\n\n constructor(player, options={}){\n // Default to inline\n if (options.inline === undefined) {\n options.inline = true;\n }\n\n // If the vertical option isn't passed at all, default to true.\n if (options.vertical === undefined) {\n // If an inline volumeMenuButton is used, we should default to using\n // a horizontal slider for obvious reasons.\n if (options.inline) {\n options.vertical = false;\n } else {\n options.vertical = true;\n }\n }\n\n // The vertical option needs to be set on the volumeBar as well,\n // since that will need to be passed along to the VolumeBar constructor\n options.volumeBar = options.volumeBar || {};\n options.volumeBar.vertical = !!options.vertical;\n\n super(player, options);\n\n // Same listeners as MuteToggle\n this.on(player, 'volumechange', this.volumeUpdate);\n this.on(player, 'loadstart', this.volumeUpdate);\n\n // hide mute toggle if the current tech doesn't support volume control\n function updateVisibility() {\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n }\n\n updateVisibility.call(this);\n this.on(player, 'loadstart', updateVisibility);\n\n this.on(this.volumeBar, ['slideractive', 'focus'], function(){\n this.addClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['sliderinactive', 'blur'], function(){\n this.removeClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['focus'], function(){\n this.addClass('vjs-lock-showing');\n });\n\n this.on(this.volumeBar, ['blur'], function(){\n this.removeClass('vjs-lock-showing');\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n let orientationClass = '';\n if (!!this.options_.vertical) {\n orientationClass = 'vjs-volume-menu-button-vertical';\n } else {\n orientationClass = 'vjs-volume-menu-button-horizontal';\n }\n\n return `vjs-volume-menu-button ${super.buildCSSClass()} ${orientationClass}`;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {Popup} The volume popup button\n * @method createPopup\n */\n createPopup() {\n let popup = new Popup(this.player_, {\n contentElType: 'div'\n });\n\n let vb = new VolumeBar(this.player_, this.options_.volumeBar);\n\n popup.addChild(vb);\n\n this.menuContent = popup;\n this.volumeBar = vb;\n\n this.attachVolumeBarEvents();\n\n return popup;\n }\n\n /**\n * Handle click on volume popup and calls super\n *\n * @method handleClick\n */\n handleClick() {\n MuteToggle.prototype.handleClick.call(this);\n super.handleClick();\n }\n\n attachVolumeBarEvents() {\n this.menuContent.on(['mousedown', 'touchdown'], Fn.bind(this, this.handleMouseDown));\n }\n\n handleMouseDown(event) {\n this.on(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n this.on(this.el_.ownerDocument, ['mouseup', 'touchend'], this.handleMouseUp);\n }\n\n handleMouseUp(event) {\n this.off(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n }\n}\n\nVolumeMenuButton.prototype.volumeUpdate = MuteToggle.prototype.update;\nVolumeMenuButton.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('VolumeMenuButton', VolumeMenuButton);\nexport default VolumeMenuButton;\n", + "/**\n * @file error-display.js\n */\nimport Component from './component';\nimport ModalDialog from './modal-dialog';\n\nimport * as Dom from './utils/dom';\nimport mergeOptions from './utils/merge-options';\n\n/**\n * Display that an error has occurred making the video unplayable.\n *\n * @extends ModalDialog\n * @class ErrorDisplay\n */\nclass ErrorDisplay extends ModalDialog {\n\n /**\n * Constructor for error display modal.\n *\n * @param {Player} player\n * @param {Object} [options]\n */\n constructor(player, options) {\n super(player, options);\n this.on(player, 'error', this.open);\n }\n\n /**\n * Include the old class for backward-compatibility.\n *\n * This can be removed in 6.0.\n *\n * @method buildCSSClass\n * @deprecated\n * @return {String}\n */\n buildCSSClass() {\n return `vjs-error-display ${super.buildCSSClass()}`;\n }\n\n /**\n * Generates the modal content based on the player error.\n *\n * @return {String|Null}\n */\n content() {\n let error = this.player().error();\n return error ? this.localize(error.message) : '';\n }\n}\n\nErrorDisplay.prototype.options_ = mergeOptions(ModalDialog.prototype.options_, {\n fillAlways: true,\n temporary: false,\n uncloseable: true\n});\n\nComponent.registerComponent('ErrorDisplay', ErrorDisplay);\nexport default ErrorDisplay;\n", + "/**\n * @file event-target.js\n */\nimport * as Events from './utils/events.js';\n\nvar EventTarget = function() {};\n\nEventTarget.prototype.allowedEvents_ = {};\n\nEventTarget.prototype.on = function(type, fn) {\n // Remove the addEventListener alias before calling Events.on\n // so we don't get into an infinite type loop\n let ael = this.addEventListener;\n this.addEventListener = Function.prototype;\n Events.on(this, type, fn);\n this.addEventListener = ael;\n};\nEventTarget.prototype.addEventListener = EventTarget.prototype.on;\n\nEventTarget.prototype.off = function(type, fn) {\n Events.off(this, type, fn);\n};\nEventTarget.prototype.removeEventListener = EventTarget.prototype.off;\n\nEventTarget.prototype.one = function(type, fn) {\n Events.one(this, type, fn);\n};\n\nEventTarget.prototype.trigger = function(event) {\n let type = event.type || event;\n\n if (typeof event === 'string') {\n event = {\n type: type\n };\n }\n event = Events.fixEvent(event);\n\n if (this.allowedEvents_[type] && this['on' + type]) {\n this['on' + type](event);\n }\n\n Events.trigger(this, event);\n};\n// The standard DOM EventTarget.dispatchEvent() is aliased to trigger()\nEventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;\n\nexport default EventTarget;\n", + "import log from './utils/log';\n\n/*\n * @file extend.js\n *\n * A combination of node inherits and babel's inherits (after transpile).\n * Both work the same but node adds `super_` to the subClass\n * and Bable adds the superClass as __proto__. Both seem useful.\n */\nconst _inherits = function (subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) {\n // node\n subClass.super_ = superClass;\n }\n};\n\n/*\n * Function for subclassing using the same inheritance that\n * videojs uses internally\n * ```js\n * var Button = videojs.getComponent('Button');\n * ```\n * ```js\n * var MyButton = videojs.extend(Button, {\n * constructor: function(player, options) {\n * Button.call(this, player, options);\n * },\n * onClick: function() {\n * // doSomething\n * }\n * });\n * ```\n */\nconst extendFn = function(superClass, subClassMethods={}) {\n let subClass = function() {\n superClass.apply(this, arguments);\n };\n let methods = {};\n\n if (typeof subClassMethods === 'object') {\n if (typeof subClassMethods.init === 'function') {\n log.warn('Constructor logic via init() is deprecated; please use constructor() instead.');\n subClassMethods.constructor = subClassMethods.init;\n }\n if (subClassMethods.constructor !== Object.prototype.constructor) {\n subClass = subClassMethods.constructor;\n }\n methods = subClassMethods;\n } else if (typeof subClassMethods === 'function') {\n subClass = subClassMethods;\n }\n\n _inherits(subClass, superClass);\n\n // Extend subObj's prototype with functions and other properties from props\n for (var name in methods) {\n if (methods.hasOwnProperty(name)) {\n subClass.prototype[name] = methods[name];\n }\n }\n\n return subClass;\n};\n\nexport default extendFn;\n", + "/**\n * @file fullscreen-api.js\n */\nimport document from 'global/document';\n\n/*\n * Store the browser-specific methods for the fullscreen API\n * @type {Object|undefined}\n * @private\n */\nlet FullscreenApi = {};\n\n// browser API methods\n// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js\nconst apiMap = [\n // Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html\n [\n 'requestFullscreen',\n 'exitFullscreen',\n 'fullscreenElement',\n 'fullscreenEnabled',\n 'fullscreenchange',\n 'fullscreenerror'\n ],\n // WebKit\n [\n 'webkitRequestFullscreen',\n 'webkitExitFullscreen',\n 'webkitFullscreenElement',\n 'webkitFullscreenEnabled',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Old WebKit (Safari 5.1)\n [\n 'webkitRequestFullScreen',\n 'webkitCancelFullScreen',\n 'webkitCurrentFullScreenElement',\n 'webkitCancelFullScreen',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Mozilla\n [\n 'mozRequestFullScreen',\n 'mozCancelFullScreen',\n 'mozFullScreenElement',\n 'mozFullScreenEnabled',\n 'mozfullscreenchange',\n 'mozfullscreenerror'\n ],\n // Microsoft\n [\n 'msRequestFullscreen',\n 'msExitFullscreen',\n 'msFullscreenElement',\n 'msFullscreenEnabled',\n 'MSFullscreenChange',\n 'MSFullscreenError'\n ]\n];\n\nlet specApi = apiMap[0];\nlet browserApi;\n\n// determine the supported set of functions\nfor (let i = 0; i < apiMap.length; i++) {\n // check for exitFullscreen function\n if (apiMap[i][1] in document) {\n browserApi = apiMap[i];\n break;\n }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n for (let i=0; i 1) {\n this.show();\n }\n }\n\n /**\n * Create menu\n *\n * @return {Menu} The constructed menu\n * @method createMenu\n */\n createMenu() {\n var menu = new Menu(this.player_);\n\n // Add a title list item to the top\n if (this.options_.title) {\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.options_.title),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n this.items = this['createItems']();\n\n if (this.items) {\n // Add menu items to the menu\n for (var i = 0; i < this.items.length; i++) {\n menu.addItem(this.items[i]);\n }\n }\n\n return menu;\n }\n\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n * @method createItems\n */\n createItems(){}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n /**\n * When you click the button it adds focus, which\n * will show the menu indefinitely.\n * So we'll remove focus when the mouse leaves the button.\n * Focus is needed for tab navigation.\n * Allow sub components to stack CSS class names\n *\n * @method handleClick\n */\n handleClick() {\n this.one('mouseout', Fn.bind(this, function(){\n this.menu.unlockShowing();\n this.el_.blur();\n }));\n if (this.buttonPressed_){\n this.unpressButton();\n } else {\n this.pressButton();\n }\n }\n\n /**\n * Handle key press on menu\n *\n * @param {Object} event Key press event\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9) {\n if (this.buttonPressed_) {\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n // Up (38) key or Down (40) key press the 'button'\n } else if (event.which === 38 || event.which === 40) {\n if (!this.buttonPressed_) {\n this.pressButton();\n event.preventDefault();\n }\n } else {\n super.handleKeyPress(event);\n }\n }\n\n /**\n * Handle key press on submenu\n *\n * @param {Object} event Key press event\n * @method handleSubmenuKeyPress\n */\n handleSubmenuKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9){\n if (this.buttonPressed_){\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n }\n }\n\n /**\n * Makes changes based on button pressed\n *\n * @method pressButton\n */\n pressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = true;\n this.menu.lockShowing();\n this.el_.setAttribute('aria-expanded', 'true');\n this.menu.focus(); // set the focus into the submenu\n }\n }\n\n /**\n * Makes changes based on button unpressed\n *\n * @method unpressButton\n */\n unpressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', 'false');\n this.el_.focus(); // Set focus back to this menu button\n }\n }\n\n /**\n * Disable the menu button\n *\n * @return {Component}\n * @method disable\n */\n disable() {\n // Unpress, but don't force focus on this button\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', 'false');\n\n this.enabled_ = false;\n\n return super.disable();\n }\n\n /**\n * Enable the menu button\n *\n * @return {Component}\n * @method disable\n */\n enable() {\n this.enabled_ = true;\n\n return super.enable();\n }\n}\n\nComponent.registerComponent('MenuButton', MenuButton);\nexport default MenuButton;\n", + "/**\n * @file menu-item.js\n */\nimport ClickableComponent from '../clickable-component.js';\nimport Component from '../component.js';\nimport assign from 'object.assign';\n\n/**\n * The component for a menu item. `
  • `\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MenuItem\n */\nclass MenuItem extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n\n this.selectable = options['selectable'];\n\n this.selected(options['selected']);\n\n if (this.selectable) {\n // TODO: May need to be either menuitemcheckbox or menuitemradio,\n // and may need logical grouping of menu items.\n this.el_.setAttribute('role', 'menuitemcheckbox');\n } else {\n this.el_.setAttribute('role', 'menuitem');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Desc\n * @param {Object=} props Desc\n * @return {Element}\n * @method createEl\n */\n createEl(type, props, attrs) {\n return super.createEl('li', assign({\n className: 'vjs-menu-item',\n innerHTML: this.localize(this.options_['label']),\n tabIndex: -1\n }, props), attrs);\n }\n\n /**\n * Handle a click on the menu item, and set it to selected\n *\n * @method handleClick\n */\n handleClick() {\n this.selected(true);\n }\n\n /**\n * Set this menu item as selected or not\n *\n * @param {Boolean} selected\n * @method selected\n */\n selected(selected) {\n if (this.selectable) {\n if (selected) {\n this.addClass('vjs-selected');\n this.el_.setAttribute('aria-checked','true');\n // aria-checked isn't fully supported by browsers/screen readers,\n // so indicate selected state to screen reader in the control text.\n this.controlText(', selected');\n } else {\n this.removeClass('vjs-selected');\n this.el_.setAttribute('aria-checked','false');\n // Indicate un-selected state to screen reader\n // Note that a space clears out the selected state text\n this.controlText(' ');\n }\n }\n }\n}\n\nComponent.registerComponent('MenuItem', MenuItem);\nexport default MenuItem;\n", + "/**\n * @file menu.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Menu component is used to build pop up menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n * @class Menu\n */\nclass Menu extends Component {\n\n constructor (player, options) {\n super(player, options);\n\n this.focusedChild_ = -1;\n\n this.on('keydown', this.handleKeyPress);\n }\n\n /**\n * Add a menu item to the menu\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n //TODO: Need to set keyboard focus back to the menuButton\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n this.contentEl_.setAttribute('role', 'menu');\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.setAttribute('role', 'presentation');\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Menu Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n\n /**\n * Handle key press for menu\n *\n * @param {Object} event Event object\n * @method handleKeyPress\n */\n handleKeyPress (event) {\n if (event.which === 37 || event.which === 40) { // Left and Down Arrows\n event.preventDefault();\n this.stepForward();\n } else if (event.which === 38 || event.which === 39) { // Up and Right Arrows\n event.preventDefault();\n this.stepBack();\n }\n }\n\n /**\n * Move to next (lower) menu item for keyboard users\n *\n * @method stepForward\n */\n stepForward () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ + 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Move to previous (higher) menu item for keyboard users\n *\n * @method stepBack\n */\n stepBack () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ - 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Set focus on a menu item in the menu\n *\n * @param {Object|String} item Index of child item set focus on\n * @method focus\n */\n focus (item = 0) {\n let children = this.children().slice();\n let haveTitle = children.length && children[0].className &&\n /vjs-menu-title/.test(children[0].className);\n\n if (haveTitle) {\n children.shift();\n }\n\n if (children.length > 0) {\n if (item < 0) {\n item = 0;\n } else if (item >= children.length) {\n item = children.length - 1;\n }\n\n this.focusedChild_ = item;\n\n children[item].el_.focus();\n }\n }\n}\n\nComponent.registerComponent('Menu', Menu);\nexport default Menu;\n", + "/**\n * @file modal-dialog.js\n */\nimport * as Dom from './utils/dom';\nimport * as Fn from './utils/fn';\nimport log from './utils/log';\n\nimport Component from './component';\nimport CloseButton from './close-button';\n\nconst MODAL_CLASS_NAME = 'vjs-modal-dialog';\nconst ESC = 27;\n\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n * @class ModalDialog\n */\nclass ModalDialog extends Component {\n\n /**\n * Constructor for modals.\n *\n * @param {Player} player\n * @param {Object} [options]\n * @param {Mixed} [options.content=undefined]\n * Provide customized content for this modal.\n *\n * @param {String} [options.description]\n * A text description for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.fillAlways=false]\n * Normally, modals are automatically filled only the first time\n * they open. This tells the modal to refresh its content\n * every time it opens.\n *\n * @param {String} [options.label]\n * A text label for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.temporary=true]\n * If `true`, the modal can only be opened once; it will be\n * disposed as soon as it's closed.\n *\n * @param {Boolean} [options.uncloseable=false]\n * If `true`, the user will not be able to close the modal\n * through the UI in the normal ways. Programmatic closing is\n * still possible.\n *\n */\n constructor(player, options) {\n super(player, options);\n this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n\n this.closeable(!this.options_.uncloseable);\n this.content(this.options_.content);\n\n // Make sure the contentEl is defined AFTER any children are initialized\n // because we only want the contents of the modal in the contentEl\n // (not the UI elements like the close button).\n this.contentEl_ = Dom.createEl('div', {\n className: `${MODAL_CLASS_NAME}-content`\n }, {\n role: 'document'\n });\n\n this.descEl_ = Dom.createEl('p', {\n className: `${MODAL_CLASS_NAME}-description vjs-offscreen`,\n id: this.el().getAttribute('aria-describedby')\n });\n\n Dom.textContent(this.descEl_, this.description());\n this.el_.appendChild(this.descEl_);\n this.el_.appendChild(this.contentEl_);\n }\n\n /**\n * Create the modal's DOM element\n *\n * @method createEl\n * @return {Element}\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass(),\n tabIndex: -1\n }, {\n 'aria-describedby': `${this.id()}_description`,\n 'aria-hidden': 'true',\n 'aria-label': this.label(),\n role: 'dialog'\n });\n }\n\n /**\n * Build the modal's CSS class.\n *\n * @method buildCSSClass\n * @return {String}\n */\n buildCSSClass() {\n return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles key presses on the document, looking for ESC, which closes\n * the modal.\n *\n * @method handleKeyPress\n * @param {Event} e\n */\n handleKeyPress(e) {\n if (e.which === ESC && this.closeable()) {\n this.close();\n }\n }\n\n /**\n * Returns the label string for this modal. Primarily used for accessibility.\n *\n * @return {String}\n */\n label() {\n return this.options_.label || this.localize('Modal Window');\n }\n\n /**\n * Returns the description string for this modal. Primarily used for\n * accessibility.\n *\n * @return {String}\n */\n description() {\n let desc = this.options_.description || this.localize('This is a modal window.');\n\n // Append a universal closeability message if the modal is closeable.\n if (this.closeable()) {\n desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n }\n\n return desc;\n }\n\n /**\n * Opens the modal.\n *\n * @method open\n * @return {ModalDialog}\n */\n open() {\n if (!this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalopen');\n this.opened_ = true;\n\n // Fill content if the modal has never opened before and\n // never been filled.\n if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n this.fill();\n }\n\n // If the player was playing, pause it and take note of its previously\n // playing state.\n this.wasPlaying_ = !player.paused();\n\n if (this.wasPlaying_) {\n player.pause();\n }\n\n if (this.closeable()) {\n this.on(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(false);\n this.show();\n this.el().setAttribute('aria-hidden', 'false');\n this.trigger('modalopen');\n this.hasBeenOpened_ = true;\n }\n return this;\n }\n\n /**\n * Whether or not the modal is opened currently.\n *\n * @method opened\n * @param {Boolean} [value]\n * If given, it will open (`true`) or close (`false`) the modal.\n *\n * @return {Boolean}\n */\n opened(value) {\n if (typeof value === 'boolean') {\n this[value ? 'open' : 'close']();\n }\n return this.opened_;\n }\n\n /**\n * Closes the modal.\n *\n * @method close\n * @return {ModalDialog}\n */\n close() {\n if (this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalclose');\n this.opened_ = false;\n\n if (this.wasPlaying_) {\n player.play();\n }\n\n if (this.closeable()) {\n this.off(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(true);\n this.hide();\n this.el().setAttribute('aria-hidden', 'true');\n this.trigger('modalclose');\n\n if (this.options_.temporary) {\n this.dispose();\n }\n }\n return this;\n }\n\n /**\n * Whether or not the modal is closeable via the UI.\n *\n * @method closeable\n * @param {Boolean} [value]\n * If given as a Boolean, it will set the `closeable` option.\n *\n * @return {Boolean}\n */\n closeable(value) {\n if (typeof value === 'boolean') {\n let closeable = this.closeable_ = !!value;\n let close = this.getChild('closeButton');\n\n // If this is being made closeable and has no close button, add one.\n if (closeable && !close) {\n\n // The close button should be a child of the modal - not its\n // content element, so temporarily change the content element.\n let temp = this.contentEl_;\n this.contentEl_ = this.el_;\n close = this.addChild('closeButton');\n this.contentEl_ = temp;\n this.on(close, 'close', this.close);\n }\n\n // If this is being made uncloseable and has a close button, remove it.\n if (!closeable && close) {\n this.off(close, 'close', this.close);\n this.removeChild(close);\n close.dispose();\n }\n }\n return this.closeable_;\n }\n\n /**\n * Fill the modal's content element with the modal's \"content\" option.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fill\n * @return {ModalDialog}\n */\n fill() {\n return this.fillWith(this.content());\n }\n\n /**\n * Fill the modal's content element with arbitrary content.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fillWith\n * @param {Mixed} [content]\n * The same rules apply to this as apply to the `content` option.\n *\n * @return {ModalDialog}\n */\n fillWith(content) {\n let contentEl = this.contentEl();\n let parentEl = contentEl.parentNode;\n let nextSiblingEl = contentEl.nextSibling;\n\n this.trigger('beforemodalfill');\n this.hasBeenFilled_ = true;\n\n // Detach the content element from the DOM before performing\n // manipulation to avoid modifying the live DOM multiple times.\n parentEl.removeChild(contentEl);\n this.empty();\n Dom.insertContent(contentEl, content);\n this.trigger('modalfill');\n\n // Re-inject the re-filled content element.\n if (nextSiblingEl) {\n parentEl.insertBefore(contentEl, nextSiblingEl);\n } else {\n parentEl.appendChild(contentEl);\n }\n\n return this;\n }\n\n /**\n * Empties the content element.\n *\n * This happens automatically anytime the modal is filled.\n *\n * @method empty\n * @return {ModalDialog}\n */\n empty() {\n this.trigger('beforemodalempty');\n Dom.emptyEl(this.contentEl());\n this.trigger('modalempty');\n return this;\n }\n\n /**\n * Gets or sets the modal content, which gets normalized before being\n * rendered into the DOM.\n *\n * This does not update the DOM or fill the modal, but it is called during\n * that process.\n *\n * @method content\n * @param {Mixed} [value]\n * If defined, sets the internal content value to be used on the\n * next call(s) to `fill`. This value is normalized before being\n * inserted. To \"clear\" the internal content value, pass `null`.\n *\n * @return {Mixed}\n */\n content(value) {\n if (typeof value !== 'undefined') {\n this.content_ = value;\n }\n return this.content_;\n }\n}\n\n/*\n * Modal dialog default options.\n *\n * @type {Object}\n * @private\n */\nModalDialog.prototype.options_ = {\n temporary: true\n};\n\nComponent.registerComponent('ModalDialog', ModalDialog);\nexport default ModalDialog;\n", + "/**\n * @file player.js\n */\n // Subclasses Component\nimport Component from './component.js';\n\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Events from './utils/events.js';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as browser from './utils/browser.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport { createTimeRange } from './utils/time-ranges.js';\nimport { bufferedPercent } from './utils/buffer.js';\nimport * as stylesheet from './utils/stylesheet.js';\nimport FullscreenApi from './fullscreen-api.js';\nimport MediaError from './media-error.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\nimport textTrackConverter from './tracks/text-track-list-converter.js';\n\n// Include required child components (importing also registers them)\nimport MediaLoader from './tech/loader.js';\nimport PosterImage from './poster-image.js';\nimport TextTrackDisplay from './tracks/text-track-display.js';\nimport LoadingSpinner from './loading-spinner.js';\nimport BigPlayButton from './big-play-button.js';\nimport ControlBar from './control-bar/control-bar.js';\nimport ErrorDisplay from './error-display.js';\nimport TextTrackSettings from './tracks/text-track-settings.js';\nimport ModalDialog from './modal-dialog';\n\n// Require html5 tech, at least for disposing the original video tag\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\n\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video.\n * ```js\n * var myPlayer = videojs('example_video_1');\n * ```\n * In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.\n * ```html\n * \n * ```\n * After an instance has been created it can be accessed globally using `Video('example_video_1')`.\n *\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class Player\n */\nclass Player extends Component {\n\n /**\n * player's constructor function\n *\n * @constructs\n * @method init\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Player options\n * @param {Function=} ready Ready callback function\n */\n constructor(tag, options, ready){\n // Make sure tag ID exists\n tag.id = tag.id || `vjs_video_${Guid.newGUID()}`;\n\n // Set Options\n // The options argument overrides options set in the video tag\n // which overrides globally set options.\n // This latter part coincides with the load order\n // (tag must exist before Player)\n options = assign(Player.getTagSettings(tag), options);\n\n // Delay the initialization of children because we need to set up\n // player properties first, and can't use `this` before `super()`\n options.initChildren = false;\n\n // Same with creating the element\n options.createEl = false;\n\n // we don't want the player to report touch activity on itself\n // see enableTouchActivity in Component\n options.reportTouchActivity = false;\n\n // Run base component initializing with new options\n super(null, options, ready);\n\n // if the global option object was accidentally blown away by\n // someone, bail early with an informative error\n if (!this.options_ ||\n !this.options_.techOrder ||\n !this.options_.techOrder.length) {\n throw new Error('No techOrder specified. Did you overwrite ' +\n 'videojs.options instead of just changing the ' +\n 'properties you want to override?');\n }\n\n this.tag = tag; // Store the original tag used to set options\n\n // Store the tag attributes used to restore html5 element\n this.tagAttributes = tag && Dom.getElAttributes(tag);\n\n // Update current language\n this.language(this.options_.language);\n\n // Update Supported Languages\n if (options.languages) {\n // Normalise player option languages to lowercase\n let languagesToLower = {};\n\n Object.getOwnPropertyNames(options.languages).forEach(function(name) {\n languagesToLower[name.toLowerCase()] = options.languages[name];\n });\n this.languages_ = languagesToLower;\n } else {\n this.languages_ = Player.prototype.options_.languages;\n }\n\n // Cache for video property values.\n this.cache_ = {};\n\n // Set poster\n this.poster_ = options.poster || '';\n\n // Set controls\n this.controls_ = !!options.controls;\n\n // Original tag settings stored in options\n // now remove immediately so native controls don't flash.\n // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n tag.controls = false;\n\n /*\n * Store the internal state of scrubbing\n *\n * @private\n * @return {Boolean} True if the user is scrubbing\n */\n this.scrubbing_ = false;\n\n this.el_ = this.createEl();\n\n // We also want to pass the original player options to each component and plugin\n // as well so they don't need to reach back into the player for options later.\n // We also need to do another copy of this.options_ so we don't end up with\n // an infinite loop.\n let playerOptionsCopy = mergeOptions(this.options_);\n\n // Load plugins\n if (options.plugins) {\n let plugins = options.plugins;\n\n Object.getOwnPropertyNames(plugins).forEach(function(name){\n if (typeof this[name] === 'function') {\n this[name](plugins[name]);\n } else {\n log.error('Unable to find plugin:', name);\n }\n }, this);\n }\n\n this.options_.playerOptions = playerOptionsCopy;\n\n this.initChildren();\n\n // Set isAudio based on whether or not an audio tag was used\n this.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n // Update controls className. Can't do this when the controls are initially\n // set because the element doesn't exist yet.\n if (this.controls()) {\n this.addClass('vjs-controls-enabled');\n } else {\n this.addClass('vjs-controls-disabled');\n }\n\n // Set ARIA label and region role depending on player type\n this.el_.setAttribute('role', 'region');\n if (this.isAudio()) {\n this.el_.setAttribute('aria-label', 'audio player');\n } else {\n this.el_.setAttribute('aria-label', 'video player');\n }\n\n if (this.isAudio()) {\n this.addClass('vjs-audio');\n }\n\n if (this.flexNotSupported_()) {\n this.addClass('vjs-no-flex');\n }\n\n // TODO: Make this smarter. Toggle user state between touching/mousing\n // using events, since devices can have both touch and mouse events.\n // if (browser.TOUCH_ENABLED) {\n // this.addClass('vjs-touch-enabled');\n // }\n\n // iOS Safari has broken hover handling\n if (!browser.IS_IOS) {\n this.addClass('vjs-workinghover');\n }\n\n // Make player easily findable by ID\n Player.players[this.id_] = this;\n\n // When the player is first initialized, trigger activity so components\n // like the control bar show themselves if needed\n this.userActive(true);\n this.reportUserActivity();\n this.listenForUserActivity_();\n\n this.on('fullscreenchange', this.handleFullscreenChange_);\n this.on('stageclick', this.handleStageClick_);\n }\n\n /**\n * Destroys the video player and does any necessary cleanup\n * ```js\n * myPlayer.dispose();\n * ```\n * This is especially helpful if you are dynamically adding and removing videos\n * to/from the DOM.\n *\n * @method dispose\n */\n dispose() {\n this.trigger('dispose');\n // prevent dispose from being called twice\n this.off('dispose');\n\n if (this.styleEl_ && this.styleEl_.parentNode) {\n this.styleEl_.parentNode.removeChild(this.styleEl_);\n }\n\n // Kill reference to this player\n Player.players[this.id_] = null;\n if (this.tag && this.tag.player) { this.tag.player = null; }\n if (this.el_ && this.el_.player) { this.el_.player = null; }\n\n if (this.tech_) { this.tech_.dispose(); }\n\n super.dispose();\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = this.el_ = super.createEl('div');\n let tag = this.tag;\n\n // Remove width/height attrs from tag so CSS can make it 100% width/height\n tag.removeAttribute('width');\n tag.removeAttribute('height');\n\n // Copy over all the attributes from the tag, including ID and class\n // ID will now reference player box, not the video tag\n const attrs = Dom.getElAttributes(tag);\n\n Object.getOwnPropertyNames(attrs).forEach(function(attr){\n // workaround so we don't totally break IE7\n // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7\n if (attr === 'class') {\n el.className = attrs[attr];\n } else {\n el.setAttribute(attr, attrs[attr]);\n }\n });\n\n // Update tag id/class for use as HTML5 playback tech\n // Might think we should do this after embedding in container so .vjs-tech class\n // doesn't flash 100% width/height, but class only applies with .video-js parent\n tag.playerId = tag.id;\n tag.id += '_html5_api';\n tag.className = 'vjs-tech';\n\n // Make player findable on elements\n tag.player = el.player = this;\n // Default state of video is paused\n this.addClass('vjs-paused');\n\n // Add a style element in the player that we'll use to set the width/height\n // of the player in a way that's still overrideable by CSS, just like the\n // video element\n if (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n this.styleEl_ = stylesheet.createStyleElement('vjs-styles-dimensions');\n let defaultsStyleEl = Dom.$('.vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n }\n\n // Pass in the width/height/aspectRatio options which will update the style el\n this.width(this.options_.width);\n this.height(this.options_.height);\n this.fluid(this.options_.fluid);\n this.aspectRatio(this.options_.aspectRatio);\n\n // Hide any links within the video/audio tag, because IE doesn't hide them completely.\n let links = tag.getElementsByTagName('a');\n for (let i = 0; i < links.length; i++) {\n let linkEl = links.item(i);\n Dom.addElClass(linkEl, 'vjs-hidden');\n linkEl.setAttribute('hidden', 'hidden');\n }\n\n // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n // keep track of the original for later so we can know if the source originally failed\n tag.initNetworkState_ = tag.networkState;\n\n // Wrap video tag in div (el/box) container\n if (tag.parentNode) {\n tag.parentNode.insertBefore(el, tag);\n }\n\n // insert the tag as the first child of the player element\n // then manually add it to the children array so that this.addChild\n // will work properly for other components\n Dom.insertElFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup.\n this.children_.unshift(tag);\n\n this.el_ = el;\n\n return el;\n }\n\n /**\n * Get/set player width\n *\n * @param {Number=} value Value for width\n * @return {Number} Width when getting\n * @method width\n */\n width(value) {\n return this.dimension('width', value);\n }\n\n /**\n * Get/set player height\n *\n * @param {Number=} value Value for height\n * @return {Number} Height when getting\n * @method height\n */\n height(value) {\n return this.dimension('height', value);\n }\n\n /**\n * Get/set dimension for player\n *\n * @param {String} dimension Either width or height\n * @param {Number=} value Value for dimension\n * @return {Component}\n * @method dimension\n */\n dimension(dimension, value) {\n let privDimension = dimension + '_';\n\n if (value === undefined) {\n return this[privDimension] || 0;\n }\n\n if (value === '') {\n // If an empty string is given, reset the dimension to be automatic\n this[privDimension] = undefined;\n } else {\n let parsedVal = parseFloat(value);\n\n if (isNaN(parsedVal)) {\n log.error(`Improper value \"${value}\" supplied for for ${dimension}`);\n return this;\n }\n\n this[privDimension] = parsedVal;\n }\n\n this.updateStyleEl_();\n return this;\n }\n\n /**\n * Add/remove the vjs-fluid class\n *\n * @param {Boolean} bool Value of true adds the class, value of false removes the class\n * @method fluid\n */\n fluid(bool) {\n if (bool === undefined) {\n return !!this.fluid_;\n }\n\n this.fluid_ = !!bool;\n\n if (bool) {\n this.addClass('vjs-fluid');\n } else {\n this.removeClass('vjs-fluid');\n }\n }\n\n /**\n * Get/Set the aspect ratio\n *\n * @param {String=} ratio Aspect ratio for player\n * @return aspectRatio\n * @method aspectRatio\n */\n aspectRatio(ratio) {\n if (ratio === undefined) {\n return this.aspectRatio_;\n }\n\n // Check for width:height format\n if (!/^\\d+\\:\\d+$/.test(ratio)) {\n throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n }\n this.aspectRatio_ = ratio;\n\n // We're assuming if you set an aspect ratio you want fluid mode,\n // because in fixed mode you could calculate width and height yourself.\n this.fluid(true);\n\n this.updateStyleEl_();\n }\n\n /**\n * Update styles of the player element (height, width and aspect ratio)\n *\n * @method updateStyleEl_\n */\n updateStyleEl_() {\n if (window.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n const width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n const height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n let techEl = this.tech_ && this.tech_.el();\n\n if (techEl) {\n if (width >= 0) {\n techEl.width = width;\n }\n if (height >= 0) {\n techEl.height = height;\n }\n }\n\n return;\n }\n\n let width;\n let height;\n let aspectRatio;\n let idClass;\n\n // The aspect ratio is either used directly or to calculate width and height.\n if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n // Use any aspectRatio that's been specifically set\n aspectRatio = this.aspectRatio_;\n } else if (this.videoWidth()) {\n // Otherwise try to get the aspect ratio from the video metadata\n aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n } else {\n // Or use a default. The video element's is 2:1, but 16:9 is more common.\n aspectRatio = '16:9';\n }\n\n // Get the ratio as a decimal we can use to calculate dimensions\n let ratioParts = aspectRatio.split(':');\n let ratioMultiplier = ratioParts[1] / ratioParts[0];\n\n if (this.width_ !== undefined) {\n // Use any width that's been specifically set\n width = this.width_;\n } else if (this.height_ !== undefined) {\n // Or calulate the width from the aspect ratio if a height has been set\n width = this.height_ / ratioMultiplier;\n } else {\n // Or use the video's metadata, or use the video el's default of 300\n width = this.videoWidth() || 300;\n }\n\n if (this.height_ !== undefined) {\n // Use any height that's been specifically set\n height = this.height_;\n } else {\n // Otherwise calculate the height from the ratio and the width\n height = width * ratioMultiplier;\n }\n\n // Ensure the CSS class is valid by starting with an alpha character\n if (/^[^a-zA-Z]/.test(this.id())) {\n idClass = 'dimensions-'+this.id();\n } else {\n idClass = this.id()+'-dimensions';\n }\n\n // Ensure the right class is still on the player for the style element\n this.addClass(idClass);\n\n stylesheet.setTextContent(this.styleEl_, `\n .${idClass} {\n width: ${width}px;\n height: ${height}px;\n }\n\n .${idClass}.vjs-fluid {\n padding-top: ${ratioMultiplier * 100}%;\n }\n `);\n }\n\n /**\n * Load the Media Playback Technology (tech)\n * Load/Create an instance of playback technology including element and API methods\n * And append playback element in player div.\n *\n * @param {String} techName Name of the playback technology\n * @param {String} source Video source\n * @method loadTech_\n * @private\n */\n loadTech_(techName, source) {\n\n // Pause and remove current playback technology\n if (this.tech_) {\n this.unloadTech_();\n }\n\n // get rid of the HTML5 video tag as soon as we are using another tech\n if (techName !== 'Html5' && this.tag) {\n Tech.getTech('Html5').disposeMediaElement(this.tag);\n this.tag.player = null;\n this.tag = null;\n }\n\n this.techName_ = techName;\n\n // Turn off API access because we're loading a new tech that might load asynchronously\n this.isReady_ = false;\n\n // Grab tech-specific options from player options and add source and parent element to use.\n var techOptions = assign({\n 'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n 'source': source,\n 'playerId': this.id(),\n 'techId': `${this.id()}_${techName}_api`,\n 'textTracks': this.textTracks_,\n 'autoplay': this.options_.autoplay,\n 'preload': this.options_.preload,\n 'loop': this.options_.loop,\n 'muted': this.options_.muted,\n 'poster': this.poster(),\n 'language': this.language(),\n 'vtt.js': this.options_['vtt.js']\n }, this.options_[techName.toLowerCase()]);\n\n if (this.tag) {\n techOptions.tag = this.tag;\n }\n\n if (source) {\n this.currentType_ = source.type;\n if (source.src === this.cache_.src && this.cache_.currentTime > 0) {\n techOptions.startTime = this.cache_.currentTime;\n }\n\n this.cache_.src = source.src;\n }\n\n // Initialize tech instance\n let techComponent = Tech.getTech(techName);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!techComponent) {\n techComponent = Component.getComponent(techName);\n }\n this.tech_ = new techComponent(techOptions);\n\n // player.triggerReady is always async, so don't need this to be async\n this.tech_.ready(Fn.bind(this, this.handleTechReady_), true);\n\n textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_);\n\n // Listen to all HTML5-defined events and trigger them on the player\n this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);\n this.on(this.tech_, 'waiting', this.handleTechWaiting_);\n this.on(this.tech_, 'canplay', this.handleTechCanPlay_);\n this.on(this.tech_, 'canplaythrough', this.handleTechCanPlayThrough_);\n this.on(this.tech_, 'playing', this.handleTechPlaying_);\n this.on(this.tech_, 'ended', this.handleTechEnded_);\n this.on(this.tech_, 'seeking', this.handleTechSeeking_);\n this.on(this.tech_, 'seeked', this.handleTechSeeked_);\n this.on(this.tech_, 'play', this.handleTechPlay_);\n this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);\n this.on(this.tech_, 'pause', this.handleTechPause_);\n this.on(this.tech_, 'progress', this.handleTechProgress_);\n this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);\n this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);\n this.on(this.tech_, 'error', this.handleTechError_);\n this.on(this.tech_, 'suspend', this.handleTechSuspend_);\n this.on(this.tech_, 'abort', this.handleTechAbort_);\n this.on(this.tech_, 'emptied', this.handleTechEmptied_);\n this.on(this.tech_, 'stalled', this.handleTechStalled_);\n this.on(this.tech_, 'loadedmetadata', this.handleTechLoadedMetaData_);\n this.on(this.tech_, 'loadeddata', this.handleTechLoadedData_);\n this.on(this.tech_, 'timeupdate', this.handleTechTimeUpdate_);\n this.on(this.tech_, 'ratechange', this.handleTechRateChange_);\n this.on(this.tech_, 'volumechange', this.handleTechVolumeChange_);\n this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_);\n this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);\n this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);\n\n this.usingNativeControls(this.techGet_('controls'));\n\n if (this.controls() && !this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n\n // Add the tech element in the DOM if it was not already there\n // Make sure to not insert the original video element if using Html5\n if (this.tech_.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) {\n Dom.insertElFirst(this.tech_.el(), this.el());\n }\n\n // Get rid of the original video tag reference after the first tech is loaded\n if (this.tag) {\n this.tag.player = null;\n this.tag = null;\n }\n }\n\n /**\n * Unload playback technology\n *\n * @method unloadTech_\n * @private\n */\n unloadTech_() {\n // Save the current text tracks so that we can reuse the same text tracks with the next tech\n this.textTracks_ = this.textTracks();\n this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n\n this.isReady_ = false;\n\n this.tech_.dispose();\n\n this.tech_ = false;\n }\n\n /**\n * Return a reference to the current tech.\n * It will only return a reference to the tech if given an object with the\n * `IWillNotUseThisInPlugins` property on it. This is try and prevent misuse\n * of techs by plugins.\n *\n * @param {Object}\n * @return {Object} The Tech\n * @method tech\n */\n tech(safety) {\n if (safety && safety.IWillNotUseThisInPlugins) {\n return this.tech_;\n }\n let errorText = `\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n \\`IWillNotUseThisInPlugins\\` to the \\`tech\\` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n `;\n window.alert(errorText);\n throw new Error(errorText);\n }\n\n /**\n * Set up click and touch listeners for the playback element\n *\n * On desktops, a click on the video itself will toggle playback,\n * on a mobile device a click on the video toggles controls.\n * (toggling controls is done by toggling the user state between active and\n * inactive)\n * A tap can signal that a user has become active, or has become inactive\n * e.g. a quick tap on an iPhone movie should reveal the controls. Another\n * quick tap should hide them again (signaling the user is in an inactive\n * viewing state)\n * In addition to this, we still want the user to be considered inactive after\n * a few seconds of inactivity.\n * Note: the only part of iOS interaction we can't mimic with this setup\n * is a touch and hold on the video element counting as activity in order to\n * keep the controls showing, but that shouldn't be an issue. A touch and hold\n * on any controls will still keep the user active\n *\n * @private\n * @method addTechControlsListeners_\n */\n addTechControlsListeners_() {\n // Make sure to remove all the previous listeners in case we are called multiple times.\n this.removeTechControlsListeners_();\n\n // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\n // trigger mousedown/up.\n // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\n // Any touch events are set to block the mousedown event from happening\n this.on(this.tech_, 'mousedown', this.handleTechClick_);\n\n // If the controls were hidden we don't want that to change without a tap event\n // so we'll check if the controls were already showing before reporting user\n // activity\n this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.on(this.tech_, 'touchend', this.handleTechTouchEnd_);\n\n // The tap listener needs to come after the touchend listener because the tap\n // listener cancels out any reportedUserActivity when setting userActive(false)\n this.on(this.tech_, 'tap', this.handleTechTap_);\n }\n\n /**\n * Remove the listeners used for click and tap controls. This is needed for\n * toggling to controls disabled, where a tap/touch should do nothing.\n *\n * @method removeTechControlsListeners_\n * @private\n */\n removeTechControlsListeners_() {\n // We don't want to just use `this.off()` because there might be other needed\n // listeners added by techs that extend this.\n this.off(this.tech_, 'tap', this.handleTechTap_);\n this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);\n this.off(this.tech_, 'mousedown', this.handleTechClick_);\n }\n\n /**\n * Player waits for the tech to be ready\n *\n * @method handleTechReady_\n * @private\n */\n handleTechReady_() {\n this.triggerReady();\n\n // Keep the same volume as before\n if (this.cache_.volume) {\n this.techCall_('setVolume', this.cache_.volume);\n }\n\n // Look if the tech found a higher resolution poster while loading\n this.handleTechPosterChange_();\n\n // Update the duration if available\n this.handleTechDurationChange_();\n\n // Chrome and Safari both have issues with autoplay.\n // In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.\n // In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)\n // This fixes both issues. Need to wait for API, so it updates displays correctly\n if (this.src() && this.tag && this.options_.autoplay && this.paused()) {\n delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16.\n this.play();\n }\n }\n\n /**\n * Fired when the user agent begins looking for media data\n *\n * @private\n * @method handleTechLoadStart_\n */\n handleTechLoadStart_() {\n // TODO: Update to use `emptied` event instead. See #1277.\n\n this.removeClass('vjs-ended');\n\n // reset the error state\n this.error(null);\n\n // If it's already playing we want to trigger a firstplay event now.\n // The firstplay event relies on both the play and loadstart events\n // which can happen in any order for a new source\n if (!this.paused()) {\n this.trigger('loadstart');\n this.trigger('firstplay');\n } else {\n // reset the hasStarted state\n this.hasStarted(false);\n this.trigger('loadstart');\n }\n }\n\n /**\n * Add/remove the vjs-has-started class\n *\n * @param {Boolean} hasStarted The value of true adds the class the value of false remove the class\n * @return {Boolean} Boolean value if has started\n * @private\n * @method hasStarted\n */\n hasStarted(hasStarted) {\n if (hasStarted !== undefined) {\n // only update if this is a new value\n if (this.hasStarted_ !== hasStarted) {\n this.hasStarted_ = hasStarted;\n if (hasStarted) {\n this.addClass('vjs-has-started');\n // trigger the firstplay event if this newly has played\n this.trigger('firstplay');\n } else {\n this.removeClass('vjs-has-started');\n }\n }\n return this;\n }\n return !!this.hasStarted_;\n }\n\n /**\n * Fired whenever the media begins or resumes playback\n *\n * @private\n * @method handleTechPlay_\n */\n handleTechPlay_() {\n this.removeClass('vjs-ended');\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n\n // hide the poster when the user hits play\n // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play\n this.hasStarted(true);\n\n this.trigger('play');\n }\n\n /**\n * Fired whenever the media begins waiting\n *\n * @private\n * @method handleTechWaiting_\n */\n handleTechWaiting_() {\n this.addClass('vjs-waiting');\n this.trigger('waiting');\n this.one('timeupdate', () => this.removeClass('vjs-waiting'));\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlay_\n */\n handleTechCanPlay_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplay');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlayThrough_\n */\n handleTechCanPlayThrough_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplaythrough');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechPlaying_\n */\n handleTechPlaying_() {\n this.removeClass('vjs-waiting');\n this.trigger('playing');\n }\n\n /**\n * Fired whenever the player is jumping to a new time\n *\n * @private\n * @method handleTechSeeking_\n */\n handleTechSeeking_() {\n this.addClass('vjs-seeking');\n this.trigger('seeking');\n }\n\n /**\n * Fired when the player has finished jumping to a new time\n *\n * @private\n * @method handleTechSeeked_\n */\n handleTechSeeked_() {\n this.removeClass('vjs-seeking');\n this.trigger('seeked');\n }\n\n /**\n * Fired the first time a video is played\n * Not part of the HLS spec, and we're not sure if this is the best\n * implementation yet, so use sparingly. If you don't have a reason to\n * prevent playback, use `myPlayer.one('play');` instead.\n *\n * @private\n * @method handleTechFirstPlay_\n */\n handleTechFirstPlay_() {\n //If the first starttime attribute is specified\n //then we will start at the given offset in seconds\n if(this.options_.starttime){\n this.currentTime(this.options_.starttime);\n }\n\n this.addClass('vjs-has-started');\n this.trigger('firstplay');\n }\n\n /**\n * Fired whenever the media has been paused\n *\n * @private\n * @method handleTechPause_\n */\n handleTechPause_() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.trigger('pause');\n }\n\n /**\n * Fired while the user agent is downloading media data\n *\n * @private\n * @method handleTechProgress_\n */\n handleTechProgress_() {\n this.trigger('progress');\n }\n\n /**\n * Fired when the end of the media resource is reached (currentTime == duration)\n *\n * @private\n * @method handleTechEnded_\n */\n handleTechEnded_() {\n this.addClass('vjs-ended');\n if (this.options_.loop) {\n this.currentTime(0);\n this.play();\n } else if (!this.paused()) {\n this.pause();\n }\n\n this.trigger('ended');\n }\n\n /**\n * Fired when the duration of the media resource is first known or changed\n *\n * @private\n * @method handleTechDurationChange_\n */\n handleTechDurationChange_() {\n this.duration(this.techGet_('duration'));\n }\n\n /**\n * Handle a click on the media element to play/pause\n *\n * @param {Object=} event Event object\n * @private\n * @method handleTechClick_\n */\n handleTechClick_(event) {\n // We're using mousedown to detect clicks thanks to Flash, but mousedown\n // will also be triggered with right-clicks, so we need to prevent that\n if (event.button !== 0) return;\n\n // When controls are disabled a click should not toggle playback because\n // the click is considered a control\n if (this.controls()) {\n if (this.paused()) {\n this.play();\n } else {\n this.pause();\n }\n }\n }\n\n /**\n * Handle a tap on the media element. It will toggle the user\n * activity state, which hides and shows the controls.\n *\n * @private\n * @method handleTechTap_\n */\n handleTechTap_() {\n this.userActive(!this.userActive());\n }\n\n /**\n * Handle touch to start\n *\n * @private\n * @method handleTechTouchStart_\n */\n handleTechTouchStart_() {\n this.userWasActive = this.userActive();\n }\n\n /**\n * Handle touch to move\n *\n * @private\n * @method handleTechTouchMove_\n */\n handleTechTouchMove_() {\n if (this.userWasActive){\n this.reportUserActivity();\n }\n }\n\n /**\n * Handle touch to end\n *\n * @private\n * @method handleTechTouchEnd_\n */\n handleTechTouchEnd_(event) {\n // Stop the mouse events from also happening\n event.preventDefault();\n }\n\n /**\n * Fired when the player switches in or out of fullscreen mode\n *\n * @private\n * @method handleFullscreenChange_\n */\n handleFullscreenChange_() {\n if (this.isFullscreen()) {\n this.addClass('vjs-fullscreen');\n } else {\n this.removeClass('vjs-fullscreen');\n }\n }\n\n /**\n * native click events on the SWF aren't triggered on IE11, Win8.1RT\n * use stageclick events triggered from inside the SWF instead\n *\n * @private\n * @method handleStageClick_\n */\n handleStageClick_() {\n this.reportUserActivity();\n }\n\n /**\n * Handle Tech Fullscreen Change\n *\n * @private\n * @method handleTechFullscreenChange_\n */\n handleTechFullscreenChange_(event, data) {\n if (data) {\n this.isFullscreen(data.isFullscreen);\n }\n this.trigger('fullscreenchange');\n }\n\n /**\n * Fires when an error occurred during the loading of an audio/video\n *\n * @private\n * @method handleTechError_\n */\n handleTechError_() {\n let error = this.tech_.error();\n this.error(error && error.code);\n }\n\n /**\n * Fires when the browser is intentionally not getting media data\n *\n * @private\n * @method handleTechSuspend_\n */\n handleTechSuspend_() {\n this.trigger('suspend');\n }\n\n /**\n * Fires when the loading of an audio/video is aborted\n *\n * @private\n * @method handleTechAbort_\n */\n handleTechAbort_() {\n this.trigger('abort');\n }\n\n /**\n * Fires when the current playlist is empty\n *\n * @private\n * @method handleTechEmptied_\n */\n handleTechEmptied_() {\n this.trigger('emptied');\n }\n\n /**\n * Fires when the browser is trying to get media data, but data is not available\n *\n * @private\n * @method handleTechStalled_\n */\n handleTechStalled_() {\n this.trigger('stalled');\n }\n\n /**\n * Fires when the browser has loaded meta data for the audio/video\n *\n * @private\n * @method handleTechLoadedMetaData_\n */\n handleTechLoadedMetaData_() {\n this.trigger('loadedmetadata');\n }\n\n /**\n * Fires when the browser has loaded the current frame of the audio/video\n *\n * @private\n * @method handleTechLoadedData_\n */\n handleTechLoadedData_() {\n this.trigger('loadeddata');\n }\n\n /**\n * Fires when the current playback position has changed\n *\n * @private\n * @method handleTechTimeUpdate_\n */\n handleTechTimeUpdate_() {\n this.trigger('timeupdate');\n }\n\n /**\n * Fires when the playing speed of the audio/video is changed\n *\n * @private\n * @method handleTechRateChange_\n */\n handleTechRateChange_() {\n this.trigger('ratechange');\n }\n\n /**\n * Fires when the volume has been changed\n *\n * @private\n * @method handleTechVolumeChange_\n */\n handleTechVolumeChange_() {\n this.trigger('volumechange');\n }\n\n /**\n * Fires when the text track has been changed\n *\n * @private\n * @method handleTechTextTrackChange_\n */\n handleTechTextTrackChange_() {\n this.trigger('texttrackchange');\n }\n\n /**\n * Get object for cached values.\n *\n * @return {Object}\n * @method getCache\n */\n getCache() {\n return this.cache_;\n }\n\n /**\n * Pass values to the playback tech\n *\n * @param {String=} method Method\n * @param {Object=} arg Argument\n * @private\n * @method techCall_\n */\n techCall_(method, arg) {\n // If it's not ready yet, call method when it is\n if (this.tech_ && !this.tech_.isReady_) {\n this.tech_.ready(function(){\n this[method](arg);\n }, true);\n\n // Otherwise call method now\n } else {\n try {\n this.tech_[method](arg);\n } catch(e) {\n log(e);\n throw e;\n }\n }\n }\n\n /**\n * Get calls can't wait for the tech, and sometimes don't need to.\n *\n * @param {String} method Tech method\n * @return {Method}\n * @private\n * @method techGet_\n */\n techGet_(method) {\n if (this.tech_ && this.tech_.isReady_) {\n\n // Flash likes to die and reload when you hide or reposition it.\n // In these cases the object methods go away and we get errors.\n // When that happens we'll catch the errors and inform tech that it's not ready any more.\n try {\n return this.tech_[method]();\n } catch(e) {\n // When building additional tech libs, an expected method may not be defined yet\n if (this.tech_[method] === undefined) {\n log(`Video.js: ${method} method not defined for ${this.techName_} playback technology.`, e);\n } else {\n // When a method isn't available on the object it throws a TypeError\n if (e.name === 'TypeError') {\n log(`Video.js: ${method} unavailable on ${this.techName_} playback technology element.`, e);\n this.tech_.isReady_ = false;\n } else {\n log(e);\n }\n }\n throw e;\n }\n }\n\n return;\n }\n\n /**\n * start media playback\n * ```js\n * myPlayer.play();\n * ```\n *\n * @return {Player} self\n * @method play\n */\n play() {\n this.techCall_('play');\n return this;\n }\n\n /**\n * Pause the video playback\n * ```js\n * myPlayer.pause();\n * ```\n *\n * @return {Player} self\n * @method pause\n */\n pause() {\n this.techCall_('pause');\n return this;\n }\n\n /**\n * Check if the player is paused\n * ```js\n * var isPaused = myPlayer.paused();\n * var isPlaying = !myPlayer.paused();\n * ```\n *\n * @return {Boolean} false if the media is currently playing, or true otherwise\n * @method paused\n */\n paused() {\n // The initial state of paused should be true (in Safari it's actually false)\n return (this.techGet_('paused') === false) ? false : true;\n }\n\n /**\n * Returns whether or not the user is \"scrubbing\". Scrubbing is when the user\n * has clicked the progress bar handle and is dragging it along the progress bar.\n *\n * @param {Boolean} isScrubbing True/false the user is scrubbing\n * @return {Boolean} The scrubbing status when getting\n * @return {Object} The player when setting\n * @method scrubbing\n */\n scrubbing(isScrubbing) {\n if (isScrubbing !== undefined) {\n this.scrubbing_ = !!isScrubbing;\n\n if (isScrubbing) {\n this.addClass('vjs-scrubbing');\n } else {\n this.removeClass('vjs-scrubbing');\n }\n\n return this;\n }\n\n return this.scrubbing_;\n }\n\n /**\n * Get or set the current time (in seconds)\n * ```js\n * // get\n * var whereYouAt = myPlayer.currentTime();\n * // set\n * myPlayer.currentTime(120); // 2 minutes into the video\n * ```\n *\n * @param {Number|String=} seconds The time to seek to\n * @return {Number} The time in seconds, when not setting\n * @return {Player} self, when the current time is set\n * @method currentTime\n */\n currentTime(seconds) {\n if (seconds !== undefined) {\n\n this.techCall_('setCurrentTime', seconds);\n\n return this;\n }\n\n // cache last currentTime and return. default to 0 seconds\n //\n // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n // currentTime when scrubbing, but may not provide much performance benefit afterall.\n // Should be tested. Also something has to read the actual current time or the cache will\n // never get updated.\n return this.cache_.currentTime = (this.techGet_('currentTime') || 0);\n }\n\n /**\n * Get the length in time of the video in seconds\n * ```js\n * var lengthOfVideo = myPlayer.duration();\n * ```\n * **NOTE**: The video must have started loading before the duration can be\n * known, and in the case of Flash, may not be known until the video starts\n * playing.\n *\n * @param {Number} seconds Duration when setting\n * @return {Number} The duration of the video in seconds when getting\n * @method duration\n */\n duration(seconds) {\n if (seconds === undefined) {\n return this.cache_.duration || 0;\n }\n\n seconds = parseFloat(seconds) || 0;\n\n // Standardize on Inifity for signaling video is live\n if (seconds < 0) {\n seconds = Infinity;\n }\n\n if (seconds !== this.cache_.duration) {\n // Cache the last set value for optimized scrubbing (esp. Flash)\n this.cache_.duration = seconds;\n\n if (seconds === Infinity) {\n this.addClass('vjs-live');\n } else {\n this.removeClass('vjs-live');\n }\n\n this.trigger('durationchange');\n }\n\n return this;\n }\n\n /**\n * Calculates how much time is left.\n * ```js\n * var timeLeft = myPlayer.remainingTime();\n * ```\n * Not a native video element function, but useful\n *\n * @return {Number} The time remaining in seconds\n * @method remainingTime\n */\n remainingTime() {\n return this.duration() - this.currentTime();\n }\n\n // http://dev.w3.org/html5/spec/video.html#dom-media-buffered\n // Buffered returns a timerange object.\n // Kind of like an array of portions of the video that have been downloaded.\n\n /**\n * Get a TimeRange object with the times of the video that have been downloaded\n * If you just want the percent of the video that's been downloaded,\n * use bufferedPercent.\n * ```js\n * // Number of different ranges of time have been buffered. Usually 1.\n * numberOfRanges = bufferedTimeRange.length,\n * // Time in seconds when the first range starts. Usually 0.\n * firstRangeStart = bufferedTimeRange.start(0),\n * // Time in seconds when the first range ends\n * firstRangeEnd = bufferedTimeRange.end(0),\n * // Length in seconds of the first time range\n * firstRangeLength = firstRangeEnd - firstRangeStart;\n * ```\n *\n * @return {Object} A mock TimeRange object (following HTML spec)\n * @method buffered\n */\n buffered() {\n var buffered = this.techGet_('buffered');\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0,0);\n }\n\n return buffered;\n }\n\n /**\n * Get the percent (as a decimal) of the video that's been downloaded\n * ```js\n * var howMuchIsDownloaded = myPlayer.bufferedPercent();\n * ```\n * 0 means none, 1 means all.\n * (This method isn't in the HTML5 spec, but it's very convenient)\n *\n * @return {Number} A decimal between 0 and 1 representing the percent\n * @method bufferedPercent\n */\n bufferedPercent() {\n return bufferedPercent(this.buffered(), this.duration());\n }\n\n /**\n * Get the ending time of the last buffered time range\n * This is used in the progress bar to encapsulate all time ranges.\n *\n * @return {Number} The end of the last buffered time range\n * @method bufferedEnd\n */\n bufferedEnd() {\n var buffered = this.buffered(),\n duration = this.duration(),\n end = buffered.end(buffered.length-1);\n\n if (end > duration) {\n end = duration;\n }\n\n return end;\n }\n\n /**\n * Get or set the current volume of the media\n * ```js\n * // get\n * var howLoudIsIt = myPlayer.volume();\n * // set\n * myPlayer.volume(0.5); // Set volume to half\n * ```\n * 0 is off (muted), 1.0 is all the way up, 0.5 is half way.\n *\n * @param {Number} percentAsDecimal The new volume as a decimal percent\n * @return {Number} The current volume when getting\n * @return {Player} self when setting\n * @method volume\n */\n volume(percentAsDecimal) {\n let vol;\n\n if (percentAsDecimal !== undefined) {\n vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1\n this.cache_.volume = vol;\n this.techCall_('setVolume', vol);\n\n return this;\n }\n\n // Default to 1 when returning current volume.\n vol = parseFloat(this.techGet_('volume'));\n return (isNaN(vol)) ? 1 : vol;\n }\n\n\n /**\n * Get the current muted state, or turn mute on or off\n * ```js\n * // get\n * var isVolumeMuted = myPlayer.muted();\n * // set\n * myPlayer.muted(true); // mute the volume\n * ```\n *\n * @param {Boolean=} muted True to mute, false to unmute\n * @return {Boolean} True if mute is on, false if not when getting\n * @return {Player} self when setting mute\n * @method muted\n */\n muted(muted) {\n if (muted !== undefined) {\n this.techCall_('setMuted', muted);\n return this;\n }\n return this.techGet_('muted') || false; // Default to false\n }\n\n // Check if current tech can support native fullscreen\n // (e.g. with built in controls like iOS, so not our flash swf)\n /**\n * Check to see if fullscreen is supported\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return this.techGet_('supportsFullScreen') || false;\n }\n\n /**\n * Check if the player is in fullscreen mode\n * ```js\n * // get\n * var fullscreenOrNot = myPlayer.isFullscreen();\n * // set\n * myPlayer.isFullscreen(true); // tell the player it's in fullscreen\n * ```\n * NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n * property and instead document.fullscreenElement is used. But isFullscreen is\n * still a valuable property for internal player workings.\n *\n * @param {Boolean=} isFS Update the player's fullscreen state\n * @return {Boolean} true if fullscreen false if not when getting\n * @return {Player} self when setting\n * @method isFullscreen\n */\n isFullscreen(isFS) {\n if (isFS !== undefined) {\n this.isFullscreen_ = !!isFS;\n return this;\n }\n return !!this.isFullscreen_;\n }\n\n /**\n * Increase the size of the video to full screen\n * ```js\n * myPlayer.requestFullscreen();\n * ```\n * In some browsers, full screen is not supported natively, so it enters\n * \"full window mode\", where the video fills the browser window.\n * In browsers and devices that support native full screen, sometimes the\n * browser's default controls will be shown, and not the Video.js custom skin.\n * This includes most mobile devices (iOS, Android) and older versions of\n * Safari.\n *\n * @return {Player} self\n * @method requestFullscreen\n */\n requestFullscreen() {\n var fsApi = FullscreenApi;\n\n this.isFullscreen(true);\n\n if (fsApi.requestFullscreen) {\n // the browser supports going fullscreen at the element level so we can\n // take the controls fullscreen as well as the video\n\n // Trigger fullscreenchange event after change\n // We have to specifically add this each time, and remove\n // when canceling fullscreen. Otherwise if there's multiple\n // players on a page, they would all be reacting to the same fullscreen\n // events\n Events.on(document, fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e){\n this.isFullscreen(document[fsApi.fullscreenElement]);\n\n // If cancelling fullscreen, remove event listener.\n if (this.isFullscreen() === false) {\n Events.off(document, fsApi.fullscreenchange, documentFullscreenChange);\n }\n\n this.trigger('fullscreenchange');\n }));\n\n this.el_[fsApi.requestFullscreen]();\n\n } else if (this.tech_.supportsFullScreen()) {\n // we can't take the video.js controls fullscreen but we can go fullscreen\n // with native controls\n this.techCall_('enterFullScreen');\n } else {\n // fullscreen isn't supported so we'll just stretch the video element to\n // fill the viewport\n this.enterFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * Return the video to its normal size after having been in full screen mode\n * ```js\n * myPlayer.exitFullscreen();\n * ```\n *\n * @return {Player} self\n * @method exitFullscreen\n */\n exitFullscreen() {\n var fsApi = FullscreenApi;\n this.isFullscreen(false);\n\n // Check for browser element fullscreen support\n if (fsApi.requestFullscreen) {\n document[fsApi.exitFullscreen]();\n } else if (this.tech_.supportsFullScreen()) {\n this.techCall_('exitFullScreen');\n } else {\n this.exitFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.\n *\n * @method enterFullWindow\n */\n enterFullWindow() {\n this.isFullWindow = true;\n\n // Storing original doc overflow value to return to when fullscreen is off\n this.docOrigOverflow = document.documentElement.style.overflow;\n\n // Add listener for esc key to exit fullscreen\n Events.on(document, 'keydown', Fn.bind(this, this.fullWindowOnEscKey));\n\n // Hide any scroll bars\n document.documentElement.style.overflow = 'hidden';\n\n // Apply fullscreen styles\n Dom.addElClass(document.body, 'vjs-full-window');\n\n this.trigger('enterFullWindow');\n }\n\n /**\n * Check for call to either exit full window or full screen on ESC key\n *\n * @param {String} event Event to check for key press\n * @method fullWindowOnEscKey\n */\n fullWindowOnEscKey(event) {\n if (event.keyCode === 27) {\n if (this.isFullscreen() === true) {\n this.exitFullscreen();\n } else {\n this.exitFullWindow();\n }\n }\n }\n\n /**\n * Exit full window\n *\n * @method exitFullWindow\n */\n exitFullWindow() {\n this.isFullWindow = false;\n Events.off(document, 'keydown', this.fullWindowOnEscKey);\n\n // Unhide scroll bars.\n document.documentElement.style.overflow = this.docOrigOverflow;\n\n // Remove fullscreen styles\n Dom.removeElClass(document.body, 'vjs-full-window');\n\n // Resize the box, controller, and poster to original sizes\n // this.positionAll();\n this.trigger('exitFullWindow');\n }\n\n /**\n * Check whether the player can play a given mimetype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n * @method canPlayType\n */\n canPlayType(type) {\n let can;\n\n // Loop through each playback technology in the options order\n for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n let techName = toTitleCase(j[i]);\n let tech = Tech.getTech(techName);\n\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!tech) {\n tech = Component.getComponent(techName);\n }\n\n // Check if the current tech is defined before continuing\n if (!tech) {\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n continue;\n }\n\n // Check if the browser supports this technology\n if (tech.isSupported()) {\n can = tech.canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n }\n\n return '';\n }\n\n /**\n * Select source based on tech-order or source-order\n * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n * defaults to tech-order selection\n *\n * @param {Array} sources The sources for a media asset\n * @return {Object|Boolean} Object of source and tech order, otherwise false\n * @method selectSource\n */\n selectSource(sources) {\n // Get only the techs specified in `techOrder` that exist and are supported by the\n // current platform\n let techs =\n this.options_.techOrder\n .map(toTitleCase)\n .map((techName) => {\n // `Component.getComponent(...)` is for support of old behavior of techs\n // being registered as components.\n // Remove once that deprecated behavior is removed.\n return [techName, Tech.getTech(techName) || Component.getComponent(techName)];\n })\n .filter(([techName, tech]) => {\n // Check if the current tech is defined before continuing\n if (tech) {\n // Check if the browser supports this technology\n return tech.isSupported();\n }\n\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n return false;\n });\n\n // Iterate over each `innerArray` element once per `outerArray` element and execute\n // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n // that value.\n let findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n let found;\n\n outerArray.some((outerChoice) => {\n return innerArray.some((innerChoice) => {\n found = tester(outerChoice, innerChoice);\n\n if (found) {\n return true;\n }\n });\n });\n\n return found;\n };\n\n let foundSourceAndTech;\n let flip = (fn) => (a, b) => fn(b, a);\n let finder = ([techName, tech], source) => {\n if (tech.canPlaySource(source)) {\n return {source: source, tech: techName};\n }\n };\n\n // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n // to select from them based on their priority.\n if (this.options_.sourceOrder) {\n // Source-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n } else {\n // Tech-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n }\n\n return foundSourceAndTech || false;\n }\n\n /**\n * The source function updates the video source\n * There are three types of variables you can pass as the argument.\n * **URL String**: A URL to the the video file. Use this method if you are sure\n * the current playback technology (HTML5/Flash) can support the source you\n * provide. Currently only MP4 files can be used in both HTML5 and Flash.\n * ```js\n * myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n * ```\n * **Source Object (or element):* * A javascript object containing information\n * about the source file. Use this method if you want the player to determine if\n * it can support the file using the type information.\n * ```js\n * myPlayer.src({ type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" });\n * ```\n * **Array of Source Objects:* * To provide multiple versions of the source so\n * that it can be played using HTML5 across browsers you can use an array of\n * source objects. Video.js will detect which version is supported and load that\n * file.\n * ```js\n * myPlayer.src([\n * { type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" },\n * { type: \"video/webm\", src: \"http://www.example.com/path/to/video.webm\" },\n * { type: \"video/ogg\", src: \"http://www.example.com/path/to/video.ogv\" }\n * ]);\n * ```\n *\n * @param {String|Object|Array=} source The source URL, object, or array of sources\n * @return {String} The current video source when getting\n * @return {String} The player when setting\n * @method src\n */\n src(source) {\n if (source === undefined) {\n return this.techGet_('src');\n }\n\n let currentTech = Tech.getTech(this.techName_);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!currentTech) {\n currentTech = Component.getComponent(this.techName_);\n }\n\n // case: Array of source objects to choose from and pick the best to play\n if (Array.isArray(source)) {\n this.sourceList_(source);\n\n // case: URL String (http://myvideo...)\n } else if (typeof source === 'string') {\n // create a source object from the string\n this.src({ src: source });\n\n // case: Source object { src: '', type: '' ... }\n } else if (source instanceof Object) {\n // check if the source has a type and the loaded tech cannot play the source\n // if there's no type we'll just try the current tech\n if (source.type && !currentTech.canPlaySource(source)) {\n // create a source list with the current source and send through\n // the tech loop to check for a compatible technology\n this.sourceList_([source]);\n } else {\n this.cache_.src = source.src;\n this.currentType_ = source.type || '';\n\n // wait until the tech is ready to set the source\n this.ready(function(){\n\n // The setSource tech method was added with source handlers\n // so older techs won't support it\n // We need to check the direct prototype for the case where subclasses\n // of the tech do not support source handlers\n if (currentTech.prototype.hasOwnProperty('setSource')) {\n this.techCall_('setSource', source);\n } else {\n this.techCall_('src', source.src);\n }\n\n if (this.options_.preload === 'auto') {\n this.load();\n }\n\n if (this.options_.autoplay) {\n this.play();\n }\n\n // Set the source synchronously if possible (#2326)\n }, true);\n }\n }\n\n return this;\n }\n\n /**\n * Handle an array of source objects\n *\n * @param {Array} sources Array of source objects\n * @private\n * @method sourceList_\n */\n sourceList_(sources) {\n var sourceTech = this.selectSource(sources);\n\n if (sourceTech) {\n if (sourceTech.tech === this.techName_) {\n // if this technology is already loaded, set the source\n this.src(sourceTech.source);\n } else {\n // load this technology with the chosen source\n this.loadTech_(sourceTech.tech, sourceTech.source);\n }\n } else {\n // We need to wrap this in a timeout to give folks a chance to add error event handlers\n this.setTimeout( function() {\n this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) });\n }, 0);\n\n // we could not find an appropriate tech, but let's still notify the delegate that this is it\n // this needs a better comment about why this is needed\n this.triggerReady();\n }\n }\n\n /**\n * Begin loading the src data.\n *\n * @return {Player} Returns the player\n * @method load\n */\n load() {\n this.techCall_('load');\n return this;\n }\n\n /**\n * Reset the player. Loads the first tech in the techOrder,\n * and calls `reset` on the tech`.\n *\n * @return {Player} Returns the player\n * @method reset\n */\n reset() {\n this.loadTech_(toTitleCase(this.options_.techOrder[0]), null);\n this.techCall_('reset');\n return this;\n }\n\n /**\n * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n * Can be used in conjuction with `currentType` to assist in rebuilding the current source object.\n *\n * @return {String} The current source\n * @method currentSrc\n */\n currentSrc() {\n return this.techGet_('currentSrc') || this.cache_.src || '';\n }\n\n /**\n * Get the current source type e.g. video/mp4\n * This can allow you rebuild the current source object so that you could load the same\n * source and tech later\n *\n * @return {String} The source MIME type\n * @method currentType\n */\n currentType() {\n return this.currentType_ || '';\n }\n\n /**\n * Get or set the preload attribute\n *\n * @param {Boolean} value Boolean to determine if preload should be used\n * @return {String} The preload attribute value when getting\n * @return {Player} Returns the player when setting\n * @method preload\n */\n preload(value) {\n if (value !== undefined) {\n this.techCall_('setPreload', value);\n this.options_.preload = value;\n return this;\n }\n return this.techGet_('preload');\n }\n\n /**\n * Get or set the autoplay attribute.\n *\n * @param {Boolean} value Boolean to determine if video should autoplay\n * @return {String} The autoplay attribute value when getting\n * @return {Player} Returns the player when setting\n * @method autoplay\n */\n autoplay(value) {\n if (value !== undefined) {\n this.techCall_('setAutoplay', value);\n this.options_.autoplay = value;\n return this;\n }\n return this.techGet_('autoplay', value);\n }\n\n /**\n * Get or set the loop attribute on the video element.\n *\n * @param {Boolean} value Boolean to determine if video should loop\n * @return {String} The loop attribute value when getting\n * @return {Player} Returns the player when setting\n * @method loop\n */\n loop(value) {\n if (value !== undefined) {\n this.techCall_('setLoop', value);\n this.options_['loop'] = value;\n return this;\n }\n return this.techGet_('loop');\n }\n\n /**\n * Get or set the poster image source url\n *\n * ##### EXAMPLE:\n * ```js\n * // get\n * var currentPoster = myPlayer.poster();\n * // set\n * myPlayer.poster('http://example.com/myImage.jpg');\n * ```\n *\n * @param {String=} src Poster image source URL\n * @return {String} poster URL when getting\n * @return {Player} self when setting\n * @method poster\n */\n poster(src) {\n if (src === undefined) {\n return this.poster_;\n }\n\n // The correct way to remove a poster is to set as an empty string\n // other falsey values will throw errors\n if (!src) {\n src = '';\n }\n\n // update the internal poster variable\n this.poster_ = src;\n\n // update the tech's poster\n this.techCall_('setPoster', src);\n\n // alert components that the poster has been set\n this.trigger('posterchange');\n\n return this;\n }\n\n /**\n * Some techs (e.g. YouTube) can provide a poster source in an\n * asynchronous way. We want the poster component to use this\n * poster source so that it covers up the tech's controls.\n * (YouTube's play button). However we only want to use this\n * soruce if the player user hasn't set a poster through\n * the normal APIs.\n *\n * @private\n * @method handleTechPosterChange_\n */\n handleTechPosterChange_() {\n if (!this.poster_ && this.tech_ && this.tech_.poster) {\n this.poster_ = this.tech_.poster() || '';\n\n // Let components know the poster has changed\n this.trigger('posterchange');\n }\n }\n\n /**\n * Get or set whether or not the controls are showing.\n *\n * @param {Boolean} bool Set controls to showing or not\n * @return {Boolean} Controls are showing\n * @method controls\n */\n controls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.controls_ !== bool) {\n this.controls_ = bool;\n\n if (this.usingNativeControls()) {\n this.techCall_('setControls', bool);\n }\n\n if (bool) {\n this.removeClass('vjs-controls-disabled');\n this.addClass('vjs-controls-enabled');\n this.trigger('controlsenabled');\n\n if (!this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n } else {\n this.removeClass('vjs-controls-enabled');\n this.addClass('vjs-controls-disabled');\n this.trigger('controlsdisabled');\n\n if (!this.usingNativeControls()) {\n this.removeTechControlsListeners_();\n }\n }\n }\n return this;\n }\n return !!this.controls_;\n }\n\n /**\n * Toggle native controls on/off. Native controls are the controls built into\n * devices (e.g. default iPhone controls), Flash, or other techs\n * (e.g. Vimeo Controls)\n * **This should only be set by the current tech, because only the tech knows\n * if it can support native controls**\n *\n * @param {Boolean} bool True signals that native controls are on\n * @return {Player} Returns the player\n * @private\n * @method usingNativeControls\n */\n usingNativeControls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.usingNativeControls_ !== bool) {\n this.usingNativeControls_ = bool;\n if (bool) {\n this.addClass('vjs-using-native-controls');\n\n /**\n * player is using the native device controls\n *\n * @event usingnativecontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingnativecontrols');\n } else {\n this.removeClass('vjs-using-native-controls');\n\n /**\n * player is using the custom HTML controls\n *\n * @event usingcustomcontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingcustomcontrols');\n }\n }\n return this;\n }\n return !!this.usingNativeControls_;\n }\n\n /**\n * Set or get the current MediaError\n *\n * @param {*} err A MediaError or a String/Number to be turned into a MediaError\n * @return {MediaError|null} when getting\n * @return {Player} when setting\n * @method error\n */\n error(err) {\n if (err === undefined) {\n return this.error_ || null;\n }\n\n // restoring to default\n if (err === null) {\n this.error_ = err;\n this.removeClass('vjs-error');\n this.errorDisplay.close();\n return this;\n }\n\n // error instance\n if (err instanceof MediaError) {\n this.error_ = err;\n } else {\n this.error_ = new MediaError(err);\n }\n\n // add the vjs-error classname to the player\n this.addClass('vjs-error');\n\n // log the name of the error type and any message\n // ie8 just logs \"[object object]\" if you just log the error object\n log.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`, this.error_.message, this.error_);\n\n // fire an error event on the player\n this.trigger('error');\n\n return this;\n }\n\n /**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method ended\n */\n ended() { return this.techGet_('ended'); }\n\n /**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method seeking\n */\n seeking() { return this.techGet_('seeking'); }\n\n /**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method seekable\n */\n seekable() { return this.techGet_('seekable'); }\n\n /**\n * Report user activity\n *\n * @param {Object} event Event object\n * @method reportUserActivity\n */\n reportUserActivity(event) {\n this.userActivity_ = true;\n }\n\n /**\n * Get/set if user is active\n *\n * @param {Boolean} bool Value when setting\n * @return {Boolean} Value if user is active user when getting\n * @method userActive\n */\n userActive(bool) {\n if (bool !== undefined) {\n bool = !!bool;\n if (bool !== this.userActive_) {\n this.userActive_ = bool;\n if (bool) {\n // If the user was inactive and is now active we want to reset the\n // inactivity timer\n this.userActivity_ = true;\n this.removeClass('vjs-user-inactive');\n this.addClass('vjs-user-active');\n this.trigger('useractive');\n } else {\n // We're switching the state to inactive manually, so erase any other\n // activity\n this.userActivity_ = false;\n\n // Chrome/Safari/IE have bugs where when you change the cursor it can\n // trigger a mousemove event. This causes an issue when you're hiding\n // the cursor when the user is inactive, and a mousemove signals user\n // activity. Making it impossible to go into inactive mode. Specifically\n // this happens in fullscreen when we really need to hide the cursor.\n //\n // When this gets resolved in ALL browsers it can be removed\n // https://code.google.com/p/chromium/issues/detail?id=103041\n if(this.tech_) {\n this.tech_.one('mousemove', function(e){\n e.stopPropagation();\n e.preventDefault();\n });\n }\n\n this.removeClass('vjs-user-active');\n this.addClass('vjs-user-inactive');\n this.trigger('userinactive');\n }\n }\n return this;\n }\n return this.userActive_;\n }\n\n /**\n * Listen for user activity based on timeout value\n *\n * @private\n * @method listenForUserActivity_\n */\n listenForUserActivity_() {\n let mouseInProgress, lastMoveX, lastMoveY;\n\n let handleActivity = Fn.bind(this, this.reportUserActivity);\n\n let handleMouseMove = function(e) {\n // #1068 - Prevent mousemove spamming\n // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n if(e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n lastMoveX = e.screenX;\n lastMoveY = e.screenY;\n handleActivity();\n }\n };\n\n let handleMouseDown = function() {\n handleActivity();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(mouseInProgress);\n // Setting userActivity=true now and setting the interval to the same time\n // as the activityCheck interval (250) should ensure we never miss the\n // next activityCheck\n mouseInProgress = this.setInterval(handleActivity, 250);\n };\n\n let handleMouseUp = function(event) {\n handleActivity();\n // Stop the interval that maintains activity if the mouse/touch is down\n this.clearInterval(mouseInProgress);\n };\n\n // Any mouse movement will be considered user activity\n this.on('mousedown', handleMouseDown);\n this.on('mousemove', handleMouseMove);\n this.on('mouseup', handleMouseUp);\n\n // Listen for keyboard navigation\n // Shouldn't need to use inProgress interval because of key repeat\n this.on('keydown', handleActivity);\n this.on('keyup', handleActivity);\n\n // Run an interval every 250 milliseconds instead of stuffing everything into\n // the mousemove/touchmove function itself, to prevent performance degradation.\n // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n // then gets picked up by this loop\n // http://ejohn.org/blog/learning-from-twitter/\n let inactivityTimeout;\n let activityCheck = this.setInterval(function() {\n // Check to see if mouse/touch activity has happened\n if (this.userActivity_) {\n // Reset the activity tracker\n this.userActivity_ = false;\n\n // If the user state was inactive, set the state to active\n this.userActive(true);\n\n // Clear any existing inactivity timeout to start the timer over\n this.clearTimeout(inactivityTimeout);\n\n var timeout = this.options_['inactivityTimeout'];\n if (timeout > 0) {\n // In milliseconds, if no more activity has occurred the\n // user will be considered inactive\n inactivityTimeout = this.setTimeout(function () {\n // Protect against the case where the inactivityTimeout can trigger just\n // before the next user activity is picked up by the activityCheck loop\n // causing a flicker\n if (!this.userActivity_) {\n this.userActive(false);\n }\n }, timeout);\n }\n }\n }, 250);\n }\n\n /**\n * Gets or sets the current playback rate. A playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed\n * playback, for instance.\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n *\n * @param {Number} rate New playback rate to set.\n * @return {Number} Returns the new playback rate when setting\n * @return {Number} Returns the current playback rate when getting\n * @method playbackRate\n */\n playbackRate(rate) {\n if (rate !== undefined) {\n this.techCall_('setPlaybackRate', rate);\n return this;\n }\n\n if (this.tech_ && this.tech_['featuresPlaybackRate']) {\n return this.techGet_('playbackRate');\n } else {\n return 1.0;\n }\n }\n\n /**\n * Gets or sets the audio flag\n *\n * @param {Boolean} bool True signals that this is an audio player.\n * @return {Boolean} Returns true if player is audio, false if not when getting\n * @return {Player} Returns the player if setting\n * @private\n * @method isAudio\n */\n isAudio(bool) {\n if (bool !== undefined) {\n this.isAudio_ = !!bool;\n return this;\n }\n\n return !!this.isAudio_;\n }\n\n /**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n * The element has not yet been initialised. All attributes are in\n * their initial states.\n * - NETWORK_IDLE (numeric value 1)\n * The element's resource selection algorithm is active and has\n * selected a resource, but it is not actually using the network at\n * this time.\n * - NETWORK_LOADING (numeric value 2)\n * The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n * The element's resource selection algorithm is active, but it has\n * not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {Number} the current network activity state\n * @method networkState\n */\n networkState() {\n return this.techGet_('networkState');\n }\n\n /**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n * No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n * Enough of the resource has been obtained that the duration of the\n * resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n * Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n * Data for the immediate current playback position is available, as\n * well as enough data for the user agent to advance the current\n * playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n * The user agent estimates that enough data is available for\n * playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {Number} the current playback rendering state\n * @method readyState\n */\n readyState() {\n return this.techGet_('readyState');\n }\n\n /**\n * Text tracks are tracks of timed text events.\n * Captions - text displayed over the video for the hearing impaired\n * Subtitles - text displayed over the video for those who don't understand language in the video\n * Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video\n * Descriptions - audio descriptions that are read back to the user by a screen reading device\n */\n\n /**\n * Get an array of associated text tracks. captions, subtitles, chapters, descriptions\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {Array} Array of track objects\n * @method textTracks\n */\n textTracks() {\n // cannot use techGet_ directly because it checks to see whether the tech is ready.\n // Flash is unlikely to be ready in time but textTracks should still work.\n return this.tech_ && this.tech_['textTracks']();\n }\n\n /**\n * Get an array of remote text tracks\n *\n * @return {Array}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n return this.tech_ && this.tech_['remoteTextTracks']();\n }\n\n /**\n * Get an array of remote html track elements\n *\n * @return {HTMLTrackElement[]}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n return this.tech_ && this.tech_['remoteTextTrackEls']();\n }\n\n /**\n * Add a text track\n * In addition to the W3C settings we allow adding additional info through options.\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n *\n * @param {String} kind Captions, subtitles, chapters, descriptions, or metadata\n * @param {String=} label Optional label\n * @param {String=} language Optional language\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n return this.tech_ && this.tech_['addTextTrack'](kind, label, language);\n }\n\n /**\n * Add a remote text track\n *\n * @param {Object} options Options for remote text track\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n return this.tech_ && this.tech_['addRemoteTextTrack'](options);\n }\n\n /**\n * Remove a remote text track\n *\n * @param {Object} track Remote text track to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.tech_ && this.tech_['removeRemoteTextTrack'](track);\n }\n\n /**\n * Get video width\n *\n * @return {Number} Video width\n * @method videoWidth\n */\n videoWidth() {\n return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n }\n\n /**\n * Get video height\n *\n * @return {Number} Video height\n * @method videoHeight\n */\n videoHeight() {\n return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n }\n\n // Methods to add support for\n // initialTime: function(){ return this.techCall_('initialTime'); },\n // startOffsetTime: function(){ return this.techCall_('startOffsetTime'); },\n // played: function(){ return this.techCall_('played'); },\n // videoTracks: function(){ return this.techCall_('videoTracks'); },\n // audioTracks: function(){ return this.techCall_('audioTracks'); },\n // defaultPlaybackRate: function(){ return this.techCall_('defaultPlaybackRate'); },\n // defaultMuted: function(){ return this.techCall_('defaultMuted'); }\n\n /**\n * The player's language code\n * NOTE: The language should be set in the player options if you want the\n * the controls to be built with a specific language. Changing the lanugage\n * later will not update controls text.\n *\n * @param {String} code The locale string\n * @return {String} The locale string when getting\n * @return {Player} self when setting\n * @method language\n */\n language(code) {\n if (code === undefined) {\n return this.language_;\n }\n\n this.language_ = (''+code).toLowerCase();\n return this;\n }\n\n /**\n * Get the player's language dictionary\n * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n * Languages specified directly in the player options have precedence\n *\n * @return {Array} Array of languages\n * @method languages\n */\n languages() {\n return mergeOptions(Player.prototype.options_.languages, this.languages_);\n }\n\n /**\n * Converts track info to JSON\n *\n * @return {Object} JSON object of options\n * @method toJSON\n */\n toJSON() {\n let options = mergeOptions(this.options_);\n let tracks = options.tracks;\n\n options.tracks = [];\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // deep merge tracks and null out player so no circular references\n track = mergeOptions(track);\n track.player = undefined;\n options.tracks[i] = track;\n }\n\n return options;\n }\n\n /**\n * Creates a simple modal dialog (an instance of the `ModalDialog`\n * component) that immediately overlays the player with arbitrary\n * content and removes itself when closed.\n *\n * @param {String|Function|Element|Array|Null} content\n * Same as `ModalDialog#content`'s param of the same name.\n *\n * The most straight-forward usage is to provide a string or DOM\n * element.\n *\n * @param {Object} [options]\n * Extra options which will be passed on to the `ModalDialog`.\n *\n * @return {ModalDialog}\n */\n createModal(content, options) {\n let player = this;\n\n options = options || {};\n options.content = content || '';\n\n let modal = new ModalDialog(player, options);\n\n player.addChild(modal);\n modal.on('dispose', function() {\n player.removeChild(modal);\n });\n\n return modal.open();\n }\n\n /**\n * Gets tag settings\n *\n * @param {Element} tag The player tag\n * @return {Array} An array of sources and track objects\n * @static\n * @method getTagSettings\n */\n static getTagSettings(tag) {\n let baseOptions = {\n 'sources': [],\n 'tracks': []\n };\n\n const tagOptions = Dom.getElAttributes(tag);\n const dataSetup = tagOptions['data-setup'];\n\n // Check if data-setup attr exists.\n if (dataSetup !== null){\n // Parse options JSON\n // If empty string, make it a parsable json object.\n const [err, data] = safeParseTuple(dataSetup || '{}');\n if (err) {\n log.error(err);\n }\n assign(tagOptions, data);\n }\n\n assign(baseOptions, tagOptions);\n\n // Get tag children settings\n if (tag.hasChildNodes()) {\n const children = tag.childNodes;\n\n for (let i=0, j=children.length; i 1) {\n this.show();\n }\n }\n\n /**\n * Create popup - Override with specific functionality for component\n *\n * @return {Popup} The constructed popup\n * @method createPopup\n */\n createPopup() {}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n}\n\nComponent.registerComponent('PopupButton', PopupButton);\nexport default PopupButton;\n", + "/**\n * @file popup.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Popup component is used to build pop up controls.\n *\n * @extends Component\n * @class Popup\n */\nclass Popup extends Component {\n\n /**\n * Add a popup item to the popup\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Popup Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n}\n\nComponent.registerComponent('Popup', Popup);\nexport default Popup;\n", + "/**\n * @file poster-image.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component.js';\nimport * as Fn from './utils/fn.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\n\n/**\n * The component that handles showing the poster image.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PosterImage\n */\nclass PosterImage extends ClickableComponent {\n\n constructor(player, options){\n super(player, options);\n\n this.update();\n player.on('posterchange', Fn.bind(this, this.update));\n }\n\n /**\n * Clean up the poster image\n *\n * @method dispose\n */\n dispose() {\n this.player().off('posterchange', this.update);\n super.dispose();\n }\n\n /**\n * Create the poster's image element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = Dom.createEl('div', {\n className: 'vjs-poster',\n\n // Don't want poster to be tabbable.\n tabIndex: -1\n });\n\n // To ensure the poster image resizes while maintaining its original aspect\n // ratio, use a div with `background-size` when available. For browsers that\n // do not support `background-size` (e.g. IE8), fall back on using a regular\n // img element.\n if (!browser.BACKGROUND_SIZE_SUPPORTED) {\n this.fallbackImg_ = Dom.createEl('img');\n el.appendChild(this.fallbackImg_);\n }\n\n return el;\n }\n\n /**\n * Event handler for updates to the player's poster source\n *\n * @method update\n */\n update() {\n let url = this.player().poster();\n\n this.setSrc(url);\n\n // If there's no poster source we should display:none on this component\n // so it's not still clickable or right-clickable\n if (url) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Set the poster source depending on the display method\n *\n * @param {String} url The URL to the poster source\n * @method setSrc\n */\n setSrc(url) {\n if (this.fallbackImg_) {\n this.fallbackImg_.src = url;\n } else {\n let backgroundImage = '';\n // Any falsey values should stay as an empty string, otherwise\n // this will throw an extra error\n if (url) {\n backgroundImage = `url(\"${url}\")`;\n }\n\n this.el_.style.backgroundImage = backgroundImage;\n }\n }\n\n /**\n * Event handler for clicks on the poster image\n *\n * @method handleClick\n */\n handleClick() {\n // We don't want a click to trigger playback when controls are disabled\n // but CSS should be hiding the poster to prevent that from happening\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n}\n\nComponent.registerComponent('PosterImage', PosterImage);\nexport default PosterImage;\n", + "/**\n * @file setup.js\n *\n * Functions for automatically setting up a player\n * based on the data-setup attribute of the video tag\n */\nimport * as Events from './utils/events.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nlet _windowLoaded = false;\nlet videojs;\n\n\n// Automatically set up any tags that have a data-setup attribute\nvar autoSetup = function(){\n // One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack*\n // var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n // var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n // var mediaEls = vids.concat(audios);\n\n // Because IE8 doesn't support calling slice on a node list, we need to loop through each list of elements\n // to build up a new, combined list of elements.\n var vids = document.getElementsByTagName('video');\n var audios = document.getElementsByTagName('audio');\n var mediaEls = [];\n if (vids && vids.length > 0) {\n for(let i=0, e=vids.length; i 0) {\n for(let i=0, e=audios.length; i 0) {\n\n for (let i=0, e=mediaEls.length; i seekable.start(0) ? time : seekable.start(0);\n time = time < seekable.end(seekable.length - 1) ? time : seekable.end(seekable.length - 1);\n\n this.lastSeekTarget_ = time;\n this.trigger('seeking');\n this.el_.vjs_setProperty('currentTime', time);\n super.setCurrentTime();\n }\n }\n\n /**\n * Get current time\n *\n * @param {Number=} time Current time of video\n * @return {Number} Current time\n * @method currentTime\n */\n currentTime(time) {\n // when seeking make the reported time keep up with the requested time\n // by reading the time we're seeking to\n if (this.seeking()) {\n return this.lastSeekTarget_ || 0;\n }\n return this.el_.vjs_getProperty('currentTime');\n }\n\n /**\n * Get current source\n *\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.vjs_getProperty('currentSrc');\n }\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load() {\n this.el_.vjs_load();\n }\n\n /**\n * Get poster\n *\n * @method poster\n */\n poster() {\n this.el_.vjs_getProperty('poster');\n }\n\n /**\n * Poster images are not handled by the Flash tech so make this a no-op\n *\n * @method setPoster\n */\n setPoster() {}\n\n /**\n * Determine if can seek in media\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() {\n const duration = this.duration();\n if (duration === 0) {\n return createTimeRange();\n }\n return createTimeRange(0, duration);\n }\n\n /**\n * Get buffered time range\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() {\n let ranges = this.el_.vjs_getProperty('buffered');\n if (ranges.length === 0) {\n return createTimeRange();\n }\n return createTimeRange(ranges[0][0], ranges[0][1]);\n }\n\n /**\n * Get fullscreen support -\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return false; // Flash does not allow fullscreen through javascript\n }\n\n /**\n * Request to enter fullscreen\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method enterFullScreen\n */\n enterFullScreen() {\n return false;\n }\n\n}\n\n\n// Create setters and getters for attributes\nconst _api = Flash.prototype;\nconst _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(',');\nconst _readOnly = 'networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(',');\n\nfunction _createSetter(attr){\n var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);\n _api['set'+attrUpper] = function(val){ return this.el_.vjs_setProperty(attr, val); };\n}\nfunction _createGetter(attr) {\n _api[attr] = function(){ return this.el_.vjs_getProperty(attr); };\n}\n\n// Create getter and setters for all read/write attributes\nfor (let i = 0; i < _readWrite.length; i++) {\n _createGetter(_readWrite[i]);\n _createSetter(_readWrite[i]);\n}\n\n// Create getters for read-only attributes\nfor (let i = 0; i < _readOnly.length; i++) {\n _createGetter(_readOnly[i]);\n}\n\n/* Flash Support Testing -------------------------------------------------------- */\n\nFlash.isSupported = function(){\n return Flash.version()[0] >= 10;\n // return swfobject.hasFlashPlayerVersion('10');\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Flash);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler = {};\n\n/**\n * Check if Flash can play the given videotype\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canPlayType = function(type){\n if (type in Flash.formats) {\n return 'maybe';\n }\n\n return '';\n};\n\n/*\n * Check Flash can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canHandleSource = function(source){\n var type;\n\n function guessMimeType(src) {\n var ext = Url.getFileExtension(src);\n if (ext) {\n return `video/${ext}`;\n }\n return '';\n }\n\n if (!source.type) {\n type = guessMimeType(source.src);\n } else {\n // Strip code information from the type because we don't get that specific\n type = source.type.replace(/;.*/, '').toLowerCase();\n }\n\n return Flash.nativeSourceHandler.canPlayType(type);\n};\n\n/*\n * Pass the source to the flash object\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n * Clean up the source handler when disposing the player or switching sources..\n * (no cleanup is needed when supporting the format natively)\n */\nFlash.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nFlash.registerSourceHandler(Flash.nativeSourceHandler);\n\nFlash.formats = {\n 'video/flv': 'FLV',\n 'video/x-flv': 'FLV',\n 'video/mp4': 'MP4',\n 'video/m4v': 'MP4'\n};\n\nFlash.onReady = function(currSwf){\n let el = Dom.getEl(currSwf);\n let tech = el && el.tech;\n\n // if there is no el then the tech has been disposed\n // and the tech element was removed from the player div\n if (tech && tech.el()) {\n // check that the flash object is really ready\n Flash.checkReady(tech);\n }\n};\n\n// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object.\n// If it's not ready, we set a timeout to check again shortly.\nFlash.checkReady = function(tech){\n // stop worrying if the tech has been disposed\n if (!tech.el()) {\n return;\n }\n\n // check if API property exists\n if (tech.el().vjs_getProperty) {\n // tell tech it's ready\n tech.triggerReady();\n } else {\n // wait longer\n this.setTimeout(function(){\n Flash['checkReady'](tech);\n }, 50);\n }\n};\n\n// Trigger events from the swf on the player\nFlash.onEvent = function(swfID, eventName){\n let tech = Dom.getEl(swfID).tech;\n tech.trigger(eventName);\n};\n\n// Log errors from the swf\nFlash.onError = function(swfID, err){\n const tech = Dom.getEl(swfID).tech;\n\n // trigger MEDIA_ERR_SRC_NOT_SUPPORTED\n if (err === 'srcnotfound') {\n return tech.error(4);\n }\n\n // trigger a custom error\n tech.error('FLASH: ' + err);\n};\n\n// Flash Version Check\nFlash.version = function(){\n let version = '0,0,0';\n\n // IE\n try {\n version = new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n\n // other browsers\n } catch(e) {\n try {\n if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin){\n version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n }\n } catch(err) {}\n }\n return version.split(',');\n};\n\n// Flash embedding method. Only used in non-iframe mode\nFlash.embed = function(swf, flashVars, params, attributes){\n const code = Flash.getEmbedCode(swf, flashVars, params, attributes);\n\n // Get element by embedding code and retrieving created element\n const obj = Dom.createEl('div', { innerHTML: code }).childNodes[0];\n\n return obj;\n};\n\nFlash.getEmbedCode = function(swf, flashVars, params, attributes){\n const objTag = '`;\n });\n\n attributes = assign({\n // Add swf to attributes (need both for IE and Others to work)\n 'data': swf,\n\n // Default to 100% width/height\n 'width': '100%',\n 'height': '100%'\n\n }, attributes);\n\n // Create Attributes string\n Object.getOwnPropertyNames(attributes).forEach(function(key){\n attrsString += `${key}=\"${attributes[key]}\" `;\n });\n\n return `${objTag}${attrsString}>${paramsString}`;\n};\n\n// Run Flash through the RTMP decorator\nFlashRtmpDecorator(Flash);\n\nComponent.registerComponent('Flash', Flash);\nTech.registerTech('Flash', Flash);\nexport default Flash;\n", + "/**\n * @file html5.js\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n */\n\nimport Tech from './tech.js';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\nimport * as Url from '../utils/url.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport window from 'global/window';\nimport assign from 'object.assign';\nimport mergeOptions from '../utils/merge-options.js';\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Tech\n * @class Html5\n */\nclass Html5 extends Tech {\n\n constructor(options, ready){\n super(options, ready);\n\n const source = options.source;\n\n // Set the source if one is provided\n // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n // anyway so the error gets fired.\n if (source && (this.el_.currentSrc !== source.src || (options.tag && options.tag.initNetworkState_ === 3))) {\n this.setSource(source);\n } else {\n this.handleLateInit_(this.el_);\n }\n\n if (this.el_.hasChildNodes()) {\n\n let nodes = this.el_.childNodes;\n let nodesLength = nodes.length;\n let removeNodes = [];\n\n while (nodesLength--) {\n let node = nodes[nodesLength];\n let nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'track') {\n if (!this.featuresNativeTextTracks) {\n // Empty video tag tracks so the built-in player doesn't use them also.\n // This may not be fast enough to stop HTML5 browsers from reading the tags\n // so we'll need to turn off any default tracks if we're manually doing\n // captions and subtitles. videoElement.textTracks\n removeNodes.push(node);\n } else {\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(node);\n this.remoteTextTracks().addTrack_(node.track);\n }\n }\n }\n\n for (let i=0; i= 0; i--) {\n const attr = settingsAttrs[i];\n let overwriteAttrs = {};\n if (typeof this.options_[attr] !== 'undefined') {\n overwriteAttrs[attr] = this.options_[attr];\n }\n Dom.setElAttributes(el, overwriteAttrs);\n }\n\n return el;\n // jenniisawesome = true;\n }\n\n // If we're loading the playback object after it has started loading\n // or playing the video (often with autoplay on) then the loadstart event\n // has already fired and we need to fire it manually because many things\n // rely on it.\n handleLateInit_(el) {\n if (el.networkState === 0 || el.networkState === 3) {\n // The video element hasn't started loading the source yet\n // or didn't find a source\n return;\n }\n\n if (el.readyState === 0) {\n // NetworkState is set synchronously BUT loadstart is fired at the\n // end of the current stack, usually before setInterval(fn, 0).\n // So at this point we know loadstart may have already fired or is\n // about to fire, and either way the player hasn't seen it yet.\n // We don't want to fire loadstart prematurely here and cause a\n // double loadstart so we'll wait and see if it happens between now\n // and the next loop, and fire it if not.\n // HOWEVER, we also want to make sure it fires before loadedmetadata\n // which could also happen between now and the next loop, so we'll\n // watch for that also.\n let loadstartFired = false;\n let setLoadstartFired = function() {\n loadstartFired = true;\n };\n this.on('loadstart', setLoadstartFired);\n\n let triggerLoadstart = function() {\n // We did miss the original loadstart. Make sure the player\n // sees loadstart before loadedmetadata\n if (!loadstartFired) {\n this.trigger('loadstart');\n }\n };\n this.on('loadedmetadata', triggerLoadstart);\n\n this.ready(function(){\n this.off('loadstart', setLoadstartFired);\n this.off('loadedmetadata', triggerLoadstart);\n\n if (!loadstartFired) {\n // We did miss the original native loadstart. Fire it now.\n this.trigger('loadstart');\n }\n });\n\n return;\n }\n\n // From here on we know that loadstart already fired and we missed it.\n // The other readyState events aren't as much of a problem if we double\n // them, so not going to go to as much trouble as loadstart to prevent\n // that unless we find reason to.\n let eventsToTrigger = ['loadstart'];\n\n // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n eventsToTrigger.push('loadedmetadata');\n\n // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n if (el.readyState >= 2) {\n eventsToTrigger.push('loadeddata');\n }\n\n // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n if (el.readyState >= 3) {\n eventsToTrigger.push('canplay');\n }\n\n // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n if (el.readyState >= 4) {\n eventsToTrigger.push('canplaythrough');\n }\n\n // We still need to give the player time to add event listeners\n this.ready(function(){\n eventsToTrigger.forEach(function(type){\n this.trigger(type);\n }, this);\n });\n }\n\n proxyNativeTextTracks_() {\n let tt = this.el().textTracks;\n\n if (tt) {\n // Add tracks - if player is initialised after DOM loaded, textTracks\n // will not trigger addtrack\n for (let i = 0; i < tt.length; i++) {\n this.textTracks().addTrack_(tt[i]);\n }\n\n if (tt.addEventListener) {\n tt.addEventListener('change', this.handleTextTrackChange_);\n tt.addEventListener('addtrack', this.handleTextTrackAdd_);\n tt.addEventListener('removetrack', this.handleTextTrackRemove_);\n }\n }\n }\n\n handleTextTrackChange(e) {\n let tt = this.textTracks();\n this.textTracks().trigger({\n type: 'change',\n target: tt,\n currentTarget: tt,\n srcElement: tt\n });\n }\n\n handleTextTrackAdd(e) {\n this.textTracks().addTrack_(e.track);\n }\n\n handleTextTrackRemove(e) {\n this.textTracks().removeTrack_(e.track);\n }\n\n /**\n * Play for html5 tech\n *\n * @method play\n */\n play() { this.el_.play(); }\n\n /**\n * Pause for html5 tech\n *\n * @method pause\n */\n pause() { this.el_.pause(); }\n\n /**\n * Paused for html5 tech\n *\n * @return {Boolean}\n * @method paused\n */\n paused() { return this.el_.paused; }\n\n /**\n * Get current time\n *\n * @return {Number}\n * @method currentTime\n */\n currentTime() { return this.el_.currentTime; }\n\n /**\n * Set current time\n *\n * @param {Number} seconds Current time of video\n * @method setCurrentTime\n */\n setCurrentTime(seconds) {\n try {\n this.el_.currentTime = seconds;\n } catch(e) {\n log(e, 'Video is not ready. (Video.js)');\n // this.warning(VideoJS.warnings.videoNotReady);\n }\n }\n\n /**\n * Get duration\n *\n * @return {Number}\n * @method duration\n */\n duration() { return this.el_.duration || 0; }\n\n /**\n * Get a TimeRange object that represents the intersection\n * of the time ranges for which the user agent has all\n * relevant media\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() { return this.el_.buffered; }\n\n /**\n * Get volume level\n *\n * @return {Number}\n * @method volume\n */\n volume() { return this.el_.volume; }\n\n /**\n * Set volume level\n *\n * @param {Number} percentAsDecimal Volume percent as a decimal\n * @method setVolume\n */\n setVolume(percentAsDecimal) { this.el_.volume = percentAsDecimal; }\n\n /**\n * Get if muted\n *\n * @return {Boolean}\n * @method muted\n */\n muted() { return this.el_.muted; }\n\n /**\n * Set muted\n *\n * @param {Boolean} If player is to be muted or note\n * @method setMuted\n */\n setMuted(muted) { this.el_.muted = muted; }\n\n /**\n * Get player width\n *\n * @return {Number}\n * @method width\n */\n width() { return this.el_.offsetWidth; }\n\n /**\n * Get player height\n *\n * @return {Number}\n * @method height\n */\n height() { return this.el_.offsetHeight; }\n\n /**\n * Get if there is fullscreen support\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n if (typeof this.el_.webkitEnterFullScreen === 'function') {\n let userAgent = window.navigator.userAgent;\n // Seems to be broken in Chromium/Chrome && Safari in Leopard\n if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Request to enter fullscreen\n *\n * @method enterFullScreen\n */\n enterFullScreen() {\n var video = this.el_;\n\n if ('webkitDisplayingFullscreen' in video) {\n this.one('webkitbeginfullscreen', function() {\n this.one('webkitendfullscreen', function() {\n this.trigger('fullscreenchange', { isFullscreen: false });\n });\n\n this.trigger('fullscreenchange', { isFullscreen: true });\n });\n }\n\n if (video.paused && video.networkState <= video.HAVE_METADATA) {\n // attempt to prime the video element for programmatic access\n // this isn't necessary on the desktop but shouldn't hurt\n this.el_.play();\n\n // playing and pausing synchronously during the transition to fullscreen\n // can get iOS ~6.1 devices into a play/pause loop\n this.setTimeout(function(){\n video.pause();\n video.webkitEnterFullScreen();\n }, 0);\n } else {\n video.webkitEnterFullScreen();\n }\n }\n\n /**\n * Request to exit fullscreen\n *\n * @method exitFullScreen\n */\n exitFullScreen() {\n this.el_.webkitExitFullScreen();\n }\n\n /**\n * Get/set video\n *\n * @param {Object=} src Source object\n * @return {Object}\n * @method src\n */\n src(src) {\n if (src === undefined) {\n return this.el_.src;\n } else {\n // Setting src through `src` instead of `setSrc` will be deprecated\n this.setSrc(src);\n }\n }\n\n /**\n * Set video\n *\n * @param {Object} src Source object\n * @deprecated\n * @method setSrc\n */\n setSrc(src) {\n this.el_.src = src;\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load(){\n this.el_.load();\n }\n\n /**\n * Reset the tech. Removes all sources and calls `load`.\n *\n * @method reset\n */\n reset() {\n Html5.resetMediaElement(this.el_);\n }\n\n /**\n * Get current source\n *\n * @return {Object}\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.currentSrc;\n }\n }\n\n /**\n * Get poster\n *\n * @return {String}\n * @method poster\n */\n poster() { return this.el_.poster; }\n\n /**\n * Set poster\n *\n * @param {String} val URL to poster image\n * @method\n */\n setPoster(val) { this.el_.poster = val; }\n\n /**\n * Get preload attribute\n *\n * @return {String}\n * @method preload\n */\n preload() { return this.el_.preload; }\n\n /**\n * Set preload attribute\n *\n * @param {String} val Value for preload attribute\n * @method setPreload\n */\n setPreload(val) { this.el_.preload = val; }\n\n /**\n * Get autoplay attribute\n *\n * @return {String}\n * @method autoplay\n */\n autoplay() { return this.el_.autoplay; }\n\n /**\n * Set autoplay attribute\n *\n * @param {String} val Value for preload attribute\n * @method setAutoplay\n */\n setAutoplay(val) { this.el_.autoplay = val; }\n\n /**\n * Get controls attribute\n *\n * @return {String}\n * @method controls\n */\n controls() { return this.el_.controls; }\n\n /**\n * Set controls attribute\n *\n * @param {String} val Value for controls attribute\n * @method setControls\n */\n setControls(val) { this.el_.controls = !!val; }\n\n /**\n * Get loop attribute\n *\n * @return {String}\n * @method loop\n */\n loop() { return this.el_.loop; }\n\n /**\n * Set loop attribute\n *\n * @param {String} val Value for loop attribute\n * @method setLoop\n */\n setLoop(val) { this.el_.loop = val; }\n\n /**\n * Get error value\n *\n * @return {String}\n * @method error\n */\n error() { return this.el_.error; }\n\n /**\n * Get whether or not the player is in the \"seeking\" state\n *\n * @return {Boolean}\n * @method seeking\n */\n seeking() { return this.el_.seeking; }\n\n /**\n * Get a TimeRanges object that represents the\n * ranges of the media resource to which it is possible\n * for the user agent to seek.\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() { return this.el_.seekable; }\n\n /**\n * Get if video ended\n *\n * @return {Boolean}\n * @method ended\n */\n ended() { return this.el_.ended; }\n\n /**\n * Get the value of the muted content attribute\n * This attribute has no dynamic effect, it only\n * controls the default state of the element\n *\n * @return {Boolean}\n * @method defaultMuted\n */\n defaultMuted() { return this.el_.defaultMuted; }\n\n /**\n * Get desired speed at which the media resource is to play\n *\n * @return {Number}\n * @method playbackRate\n */\n playbackRate() { return this.el_.playbackRate; }\n\n /**\n * Returns a TimeRanges object that represents the ranges of the\n * media resource that the user agent has played.\n * @return {TimeRangeObject} the range of points on the media\n * timeline that has been reached through normal playback\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-played\n */\n played() { return this.el_.played; }\n\n /**\n * Set desired speed at which the media resource is to play\n *\n * @param {Number} val Speed at which the media resource is to play\n * @method setPlaybackRate\n */\n setPlaybackRate(val) { this.el_.playbackRate = val; }\n\n /**\n * Get the current state of network activity for the element, from\n * the list below\n * NETWORK_EMPTY (numeric value 0)\n * NETWORK_IDLE (numeric value 1)\n * NETWORK_LOADING (numeric value 2)\n * NETWORK_NO_SOURCE (numeric value 3)\n *\n * @return {Number}\n * @method networkState\n */\n networkState() { return this.el_.networkState; }\n\n /**\n * Get a value that expresses the current state of the element\n * with respect to rendering the current playback position, from\n * the codes in the list below\n * HAVE_NOTHING (numeric value 0)\n * HAVE_METADATA (numeric value 1)\n * HAVE_CURRENT_DATA (numeric value 2)\n * HAVE_FUTURE_DATA (numeric value 3)\n * HAVE_ENOUGH_DATA (numeric value 4)\n *\n * @return {Number}\n * @method readyState\n */\n readyState() { return this.el_.readyState; }\n\n /**\n * Get width of video\n *\n * @return {Number}\n * @method videoWidth\n */\n videoWidth() { return this.el_.videoWidth; }\n\n /**\n * Get height of video\n *\n * @return {Number}\n * @method videoHeight\n */\n videoHeight() { return this.el_.videoHeight; }\n\n /**\n * Get text tracks\n *\n * @return {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n return super.textTracks();\n }\n\n /**\n * Creates and returns a text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!this['featuresNativeTextTracks']) {\n return super.addTextTrack(kind, label, language);\n }\n\n return this.el_.addTextTrack(kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options={}) {\n if (!this['featuresNativeTextTracks']) {\n return super.addRemoteTextTrack(options);\n }\n\n let htmlTrackElement = document.createElement('track');\n\n if (options.kind) {\n htmlTrackElement.kind = options.kind;\n }\n if (options.label) {\n htmlTrackElement.label = options.label;\n }\n if (options.language || options.srclang) {\n htmlTrackElement.srclang = options.language || options.srclang;\n }\n if (options.default) {\n htmlTrackElement.default = options.default;\n }\n if (options.id) {\n htmlTrackElement.id = options.id;\n }\n if (options.src) {\n htmlTrackElement.src = options.src;\n }\n\n this.el().appendChild(htmlTrackElement);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote text track from TextTrackList object\n *\n * @param {TextTrackObject} track Texttrack object to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n if (!this['featuresNativeTextTracks']) {\n return super.removeRemoteTextTrack(track);\n }\n\n let tracks, i;\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n\n tracks = this.$$('track');\n\n i = tracks.length;\n while (i--) {\n if (track === tracks[i] || track === tracks[i].track) {\n this.el().removeChild(tracks[i]);\n }\n }\n }\n\n}\n\n\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n/*\n* Element for testing browser HTML5 video capabilities\n*\n* @type {Element}\n* @constant\n* @private\n*/\nHtml5.TEST_VID = document.createElement('video');\nlet track = document.createElement('track');\ntrack.kind = 'captions';\ntrack.srclang = 'en';\ntrack.label = 'English';\nHtml5.TEST_VID.appendChild(track);\n\n/*\n * Check if HTML5 video is supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.isSupported = function(){\n // IE9 with no Media Player is a LIAR! (#984)\n try {\n Html5.TEST_VID['volume'] = 0.5;\n } catch (e) {\n return false;\n }\n\n return !!Html5.TEST_VID.canPlayType;\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Html5);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the HTML5 tech\n */\nHtml5.nativeSourceHandler = {};\n\n/*\n * Check if the video element can play the given videotype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canPlayType = function(type){\n // IE9 on Windows 7 without MediaPlayer throws an error here\n // https://github.com/videojs/video.js/issues/519\n try {\n return Html5.TEST_VID.canPlayType(type);\n } catch(e) {\n return '';\n }\n};\n\n/*\n * Check if the video element can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canHandleSource = function(source){\n var match, ext;\n\n // If a type was provided we should rely on that\n if (source.type) {\n return Html5.nativeSourceHandler.canPlayType(source.type);\n } else if (source.src) {\n // If no type, fall back to checking 'video/[EXTENSION]'\n ext = Url.getFileExtension(source.src);\n\n return Html5.nativeSourceHandler.canPlayType(`video/${ext}`);\n }\n\n return '';\n};\n\n/*\n * Pass the source to the video element\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the Html5 tech\n */\nHtml5.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n* Clean up the source handler when disposing the player or switching sources..\n* (no cleanup is needed when supporting the format natively)\n*/\nHtml5.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\n\n/*\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {Boolean}\n */\nHtml5.canControlVolume = function(){\n var volume = Html5.TEST_VID.volume;\n Html5.TEST_VID.volume = (volume / 2) + 0.1;\n return volume !== Html5.TEST_VID.volume;\n};\n\n/*\n * Check if playbackRate is supported in this browser/device.\n *\n * @return {Number} [description]\n */\nHtml5.canControlPlaybackRate = function(){\n var playbackRate = Html5.TEST_VID.playbackRate;\n Html5.TEST_VID.playbackRate = (playbackRate / 2) + 0.1;\n return playbackRate !== Html5.TEST_VID.playbackRate;\n};\n\n/*\n * Check to see if native text tracks are supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.supportsNativeTextTracks = function() {\n var supportsTextTracks;\n\n // Figure out native text track support\n // If mode is a number, we cannot change it because it'll disappear from view.\n // Browsers with numeric modes include IE10 and older (<=2013) samsung android models.\n // Firefox isn't playing nice either with modifying the mode\n // TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862\n supportsTextTracks = !!Html5.TEST_VID.textTracks;\n if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) {\n supportsTextTracks = typeof Html5.TEST_VID.textTracks[0]['mode'] !== 'number';\n }\n if (supportsTextTracks && browser.IS_FIREFOX) {\n supportsTextTracks = false;\n }\n if (supportsTextTracks && !('onremovetrack' in Html5.TEST_VID.textTracks)) {\n supportsTextTracks = false;\n }\n\n return supportsTextTracks;\n};\n\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\nHtml5.Events = [\n 'loadstart',\n 'suspend',\n 'abort',\n 'error',\n 'emptied',\n 'stalled',\n 'loadedmetadata',\n 'loadeddata',\n 'canplay',\n 'canplaythrough',\n 'playing',\n 'waiting',\n 'seeking',\n 'seeked',\n 'ended',\n 'durationchange',\n 'timeupdate',\n 'progress',\n 'play',\n 'pause',\n 'ratechange',\n 'volumechange'\n];\n\n/*\n * Set the tech's volume control support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresVolumeControl'] = Html5.canControlVolume();\n\n/*\n * Set the tech's playbackRate support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresPlaybackRate'] = Html5.canControlPlaybackRate();\n\n/*\n * Set the tech's status on moving the video element.\n * In iOS, if you move a video element in the DOM, it breaks video playback.\n *\n * @type {Boolean}\n */\nHtml5.prototype['movingMediaElementInDOM'] = !browser.IS_IOS;\n\n/*\n * Set the the tech's fullscreen resize support status.\n * HTML video is able to automatically resize when going to fullscreen.\n * (No longer appears to be used. Can probably be removed.)\n */\nHtml5.prototype['featuresFullscreenResize'] = true;\n\n/*\n * Set the tech's progress event support status\n * (this disables the manual progress events of the Tech)\n */\nHtml5.prototype['featuresProgressEvents'] = true;\n\n/*\n * Sets the tech's status on native text track support\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresNativeTextTracks'] = Html5.supportsNativeTextTracks();\n\n// HTML5 Feature detection and Device Fixes --------------------------------- //\nlet canPlayType;\nconst mpegurlRE = /^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i;\nconst mp4RE = /^video\\/mp4/i;\n\nHtml5.patchCanPlayType = function() {\n // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\n if (browser.ANDROID_VERSION >= 4.0) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type) {\n if (type && mpegurlRE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n\n // Override Android 2.2 and less canPlayType method which is broken\n if (browser.IS_OLD_ANDROID) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type){\n if (type && mp4RE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n};\n\nHtml5.unpatchCanPlayType = function() {\n var r = Html5.TEST_VID.constructor.prototype.canPlayType;\n Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\n canPlayType = null;\n return r;\n};\n\n// by default, patch the video element\nHtml5.patchCanPlayType();\n\nHtml5.disposeMediaElement = function(el){\n if (!el) { return; }\n\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n\n // remove any child track or source nodes to prevent their loading\n while(el.hasChildNodes()) {\n el.removeChild(el.firstChild);\n }\n\n // remove any src reference. not setting `src=''` because that causes a warning\n // in firefox\n el.removeAttribute('src');\n\n // force the media element to update its loading state by calling load()\n // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {\n // not supported\n }\n })();\n }\n};\n\nHtml5.resetMediaElement = function(el){\n if (!el) { return; }\n\n let sources = el.querySelectorAll('source');\n let i = sources.length;\n while (i--) {\n el.removeChild(sources[i]);\n }\n\n // remove any src reference.\n // not setting `src=''` because that throws an error\n el.removeAttribute('src');\n\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {}\n })();\n }\n};\n\nComponent.registerComponent('Html5', Html5);\nTech.registerTech('Html5', Html5);\nexport default Html5;\n", + "/**\n * @file loader.js\n */\nimport Component from '../component.js';\nimport Tech from './tech.js';\nimport window from 'global/window';\nimport toTitleCase from '../utils/to-title-case.js';\n\n/**\n * The Media Loader is the component that decides which playback technology to load\n * when the player is initialized.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class MediaLoader\n */\nclass MediaLoader extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n // If there are no sources when the player is initialized,\n // load the first supported playback technology.\n\n if (!options.playerOptions['sources'] || options.playerOptions['sources'].length === 0) {\n for (let i=0, j=options.playerOptions['techOrder']; i {\n this.trigger('vttjsloaded');\n };\n script.onerror = () => {\n this.trigger('vttjserror');\n };\n this.on('dispose', () => {\n script.onload = null;\n script.onerror = null;\n });\n this.el().parentNode.appendChild(script);\n window['WebVTT'] = true;\n }\n\n let updateDisplay = () => this.trigger('texttrackchange');\n let textTracksChanges = () => {\n updateDisplay();\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n track.removeEventListener('cuechange', updateDisplay);\n if (track.mode === 'showing') {\n track.addEventListener('cuechange', updateDisplay);\n }\n }\n };\n\n textTracksChanges();\n tracks.addEventListener('change', textTracksChanges);\n\n this.on('dispose', function() {\n tracks.removeEventListener('change', textTracksChanges);\n });\n }\n\n /*\n * Provide default methods for text tracks.\n *\n * Html5 tech overrides these.\n */\n\n /**\n * Get texttracks\n *\n * @returns {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n this.textTracks_ = this.textTracks_ || new TextTrackList();\n return this.textTracks_;\n }\n\n /**\n * Get remote texttracks\n *\n * @returns {TextTrackList}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n this.remoteTextTracks_ = this.remoteTextTracks_ || new TextTrackList();\n return this.remoteTextTracks_;\n }\n\n /**\n * Get remote htmltrackelements\n *\n * @returns {HTMLTrackElementList}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new HTMLTrackElementList();\n return this.remoteTextTrackEls_;\n }\n\n /**\n * Creates and returns a remote text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!kind) {\n throw new Error('TextTrack kind is required but was not provided');\n }\n\n return createTrackHelper(this, kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a emulated html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n let track = mergeOptions(options, {\n tech: this\n });\n\n let htmlTrackElement = new HTMLTrackElement(track);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n // must come after remoteTextTracks()\n this.textTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote texttrack\n *\n * @param {TextTrackObject} track Texttrack to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.textTracks().removeTrack_(track);\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n }\n\n /**\n * Provide a default setPoster method for techs\n * Poster support for techs should be optional, so we don't want techs to\n * break if they don't have a way to set a poster.\n *\n * @method setPoster\n */\n setPoster() {}\n\n /*\n * Check if the tech can support the given type\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n canPlayType() {\n return '';\n }\n\n /*\n * Return whether the argument is a Tech or not.\n * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n *\n * @param {Object} component An item to check\n * @return {Boolean} Whether it is a tech or not\n */\n static isTech(component) {\n return component.prototype instanceof Tech ||\n component instanceof Tech ||\n component === Tech;\n }\n\n /**\n * Registers a Tech\n *\n * @param {String} name Name of the Tech to register\n * @param {Object} tech The tech to register\n * @static\n * @method registerComponent\n */\n static registerTech(name, tech) {\n if (!Tech.techs_) {\n Tech.techs_ = {};\n }\n\n if (!Tech.isTech(tech)) {\n throw new Error(`Tech ${name} must be a Tech`);\n }\n\n Tech.techs_[name] = tech;\n return tech;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getTech(name) {\n if (Tech.techs_ && Tech.techs_[name]) {\n return Tech.techs_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`);\n return window.videojs[name];\n }\n }\n}\n\n/*\n * List of associated text tracks\n *\n * @type {Array}\n * @private\n */\nTech.prototype.textTracks_;\n\nvar createTrackHelper = function(self, kind, label, language, options={}) {\n let tracks = self.textTracks();\n\n options.kind = kind;\n\n if (label) {\n options.label = label;\n }\n if (language) {\n options.language = language;\n }\n options.tech = self;\n\n let track = new TextTrack(options);\n tracks.addTrack_(track);\n\n return track;\n};\n\nTech.prototype.featuresVolumeControl = true;\n\n// Resizing plugins using request fullscreen reloads the plugin\nTech.prototype.featuresFullscreenResize = false;\nTech.prototype.featuresPlaybackRate = false;\n\n// Optional events that we can manually mimic with timers\n// currently not triggered by video-js-swf\nTech.prototype.featuresProgressEvents = false;\nTech.prototype.featuresTimeupdateEvents = false;\n\nTech.prototype.featuresNativeTextTracks = false;\n\n/*\n * A functional mixin for techs that want to use the Source Handler pattern.\n *\n * ##### EXAMPLE:\n *\n * Tech.withSourceHandlers.call(MyTech);\n *\n */\nTech.withSourceHandlers = function(_Tech){\n /*\n * Register a source handler\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * @param {Function} handler The source handler\n * @param {Boolean} first Register it before any existing handlers\n */\n _Tech.registerSourceHandler = function(handler, index){\n let handlers = _Tech.sourceHandlers;\n\n if (!handlers) {\n handlers = _Tech.sourceHandlers = [];\n }\n\n if (index === undefined) {\n // add to the end of the list\n index = handlers.length;\n }\n\n handlers.splice(index, 0, handler);\n };\n\n /*\n * Check if the tech can support the given type\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlayType = function(type){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n\n return '';\n };\n\n /*\n * Return the first source handler that supports the source\n * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n * @param {Object} source The source object\n * @returns {Object} The first source handler that supports the source\n * @returns {null} Null if no source handler is found\n */\n _Tech.selectSourceHandler = function(source){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canHandleSource(source);\n\n if (can) {\n return handlers[i];\n }\n }\n\n return null;\n };\n\n /*\n * Check if the tech can support the given source\n * @param {Object} srcObj The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlaySource = function(srcObj){\n let sh = _Tech.selectSourceHandler(srcObj);\n\n if (sh) {\n return sh.canHandleSource(srcObj);\n }\n\n return '';\n };\n\n /*\n * When using a source handler, prefer its implementation of\n * any function normally provided by the tech.\n */\n let deferrable = [\n 'seekable',\n 'duration'\n ];\n\n deferrable.forEach(function (fnName) {\n let originalFn = this[fnName];\n\n if (typeof originalFn !== 'function') {\n return;\n }\n\n this[fnName] = function() {\n if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n }\n return originalFn.apply(this, arguments);\n };\n }, _Tech.prototype);\n\n /*\n * Create a function for setting the source using a source object\n * and source handlers.\n * Should never be called unless a source handler was found.\n * @param {Object} source A source object with src and type keys\n * @return {Tech} self\n */\n _Tech.prototype.setSource = function(source){\n let sh = _Tech.selectSourceHandler(source);\n\n if (!sh) {\n // Fall back to a native source hander when unsupported sources are\n // deliberately set\n if (_Tech.nativeSourceHandler) {\n sh = _Tech.nativeSourceHandler;\n } else {\n log.error('No source hander found for the current source.');\n }\n }\n\n // Dispose any existing source handler\n this.disposeSourceHandler();\n this.off('dispose', this.disposeSourceHandler);\n\n this.currentSource_ = source;\n this.sourceHandler_ = sh.handleSource(source, this);\n this.on('dispose', this.disposeSourceHandler);\n\n return this;\n };\n\n /*\n * Clean up any existing source handler\n */\n _Tech.prototype.disposeSourceHandler = function(){\n if (this.sourceHandler_ && this.sourceHandler_.dispose) {\n this.sourceHandler_.dispose();\n }\n };\n\n};\n\nComponent.registerComponent('Tech', Tech);\n// Old name for Tech\nComponent.registerComponent('MediaTechController', Tech);\nTech.registerTech('Tech', Tech);\nexport default Tech;\n", + "/**\n * @file html-track-element-list.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\nclass HtmlTrackElementList {\n constructor(trackElements = []) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in HtmlTrackElementList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = HtmlTrackElementList.prototype[prop];\n }\n }\n }\n\n list.trackElements_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.trackElements_.length;\n }\n });\n\n for (let i = 0, length = trackElements.length; i < length; i++) {\n list.addTrackElement_(trackElements[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n addTrackElement_(trackElement) {\n this.trackElements_.push(trackElement);\n }\n\n getTrackElementByTrack_(track) {\n let trackElement_;\n\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (track === this.trackElements_[i].track) {\n trackElement_ = this.trackElements_[i];\n\n break;\n }\n }\n\n return trackElement_;\n }\n\n removeTrackElement_(trackElement) {\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (trackElement === this.trackElements_[i]) {\n this.trackElements_.splice(i, 1);\n\n break;\n }\n }\n }\n}\n\nexport default HtmlTrackElementList;\n", + "/**\n * @file html-track-element.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport EventTarget from '../event-target';\nimport TextTrack from '../tracks/text-track';\n\nconst NONE = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst ERROR = 3;\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement\n *\n * interface HTMLTrackElement : HTMLElement {\n * attribute DOMString kind;\n * attribute DOMString src;\n * attribute DOMString srclang;\n * attribute DOMString label;\n * attribute boolean default;\n *\n * const unsigned short NONE = 0;\n * const unsigned short LOADING = 1;\n * const unsigned short LOADED = 2;\n * const unsigned short ERROR = 3;\n * readonly attribute unsigned short readyState;\n *\n * readonly attribute TextTrack track;\n * };\n *\n * @param {Object} options TextTrack configuration\n * @class HTMLTrackElement\n */\n\nclass HTMLTrackElement extends EventTarget {\n constructor(options = {}) {\n super();\n\n let readyState,\n trackElement = this;\n\n if (browser.IS_IE8) {\n trackElement = document.createElement('custom');\n\n for (let prop in HTMLTrackElement.prototype) {\n if (prop !== 'constructor') {\n trackElement[prop] = HTMLTrackElement.prototype[prop];\n }\n }\n }\n\n let track = new TextTrack(options);\n\n trackElement.kind = track.kind;\n trackElement.src = track.src;\n trackElement.srclang = track.language;\n trackElement.label = track.label;\n trackElement.default = track.default;\n\n Object.defineProperty(trackElement, 'readyState', {\n get() {\n return readyState;\n }\n });\n\n Object.defineProperty(trackElement, 'track', {\n get() {\n return track;\n }\n });\n\n readyState = NONE;\n\n track.addEventListener('loadeddata', function() {\n readyState = LOADED;\n\n trackElement.trigger({\n type: 'load',\n target: trackElement\n });\n });\n\n if (browser.IS_IE8) {\n return trackElement;\n }\n }\n}\n\nHTMLTrackElement.prototype.allowedEvents_ = {\n load: 'load'\n};\n\nHTMLTrackElement.NONE = NONE;\nHTMLTrackElement.LOADING = LOADING;\nHTMLTrackElement.LOADED = LOADED;\nHTMLTrackElement.ERROR = ERROR;\n\nexport default HTMLTrackElement;\n", + "/**\n * @file text-track-cue-list.js\n */\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A List of text track cues as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist\n *\n * interface TextTrackCueList {\n * readonly attribute unsigned long length;\n * getter TextTrackCue (unsigned long index);\n * TextTrackCue? getCueById(DOMString id);\n * };\n *\n * @param {Array} cues A list of cues to be initialized with\n * @class TextTrackCueList\n */\n\nclass TextTrackCueList {\n constructor(cues) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackCueList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackCueList.prototype[prop];\n }\n }\n }\n\n TextTrackCueList.prototype.setCues_.call(list, cues);\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.length_;\n }\n });\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * A setter for cues in this list\n *\n * @param {Array} cues an array of cues\n * @method setCues_\n * @private\n */\n setCues_(cues) {\n let oldLength = this.length || 0;\n let i = 0;\n let l = cues.length;\n\n this.cues_ = cues;\n this.length_ = cues.length;\n\n let defineProp = function(index) {\n if (!('' + index in this)) {\n Object.defineProperty(this, '' + index, {\n get() {\n return this.cues_[index];\n }\n });\n }\n };\n\n if (oldLength < l) {\n i = oldLength;\n\n for (; i < l; i++) {\n defineProp.call(this, i);\n }\n }\n }\n\n /**\n * Get a cue that is currently in the Cue list by id\n *\n * @param {String} id\n * @method getCueById\n * @return {Object} a single cue\n */\n getCueById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let cue = this[i];\n\n if (cue.id === id) {\n result = cue;\n break;\n }\n }\n\n return result;\n }\n}\n\nexport default TextTrackCueList;\n", + "/**\n * @file text-track-display.js\n */\nimport Component from '../component';\nimport Menu from '../menu/menu.js';\nimport MenuItem from '../menu/menu-item.js';\nimport MenuButton from '../menu/menu-button.js';\nimport * as Fn from '../utils/fn.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst darkGray = '#222';\nconst lightGray = '#ccc';\nconst fontMap = {\n monospace: 'monospace',\n sansSerif: 'sans-serif',\n serif: 'serif',\n monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n monospaceSerif: '\"Courier New\", monospace',\n proportionalSansSerif: 'sans-serif',\n proportionalSerif: 'serif',\n casual: '\"Comic Sans MS\", Impact, fantasy',\n script: '\"Monotype Corsiva\", cursive',\n smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n\n/**\n * The component for displaying text track cues\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class TextTrackDisplay\n */\nclass TextTrackDisplay extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n player.on('loadstart', Fn.bind(this, this.toggleDisplay));\n player.on('texttrackchange', Fn.bind(this, this.updateDisplay));\n\n // This used to be called during player init, but was causing an error\n // if a track should show by default and the display hadn't loaded yet.\n // Should probably be moved to an external track loader when we support\n // tracks that don't need a display.\n player.ready(Fn.bind(this, function() {\n if (player.tech_ && player.tech_['featuresNativeTextTracks']) {\n this.hide();\n return;\n }\n\n player.on('fullscreenchange', Fn.bind(this, this.updateDisplay));\n\n let tracks = this.options_.playerOptions['tracks'] || [];\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n this.player_.addRemoteTextTrack(track);\n }\n }));\n }\n\n /**\n * Toggle display texttracks\n *\n * @method toggleDisplay\n */\n toggleDisplay() {\n if (this.player_.tech_ && this.player_.tech_['featuresNativeTextTracks']) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-text-track-display'\n }, {\n 'aria-live': 'assertive',\n 'aria-atomic': 'true'\n });\n }\n\n /**\n * Clear display texttracks\n *\n * @method clearDisplay\n */\n clearDisplay() {\n if (typeof window['WebVTT'] === 'function') {\n window['WebVTT']['processCues'](window, [], this.el_);\n }\n }\n\n /**\n * Update display texttracks\n *\n * @method updateDisplay\n */\n updateDisplay() {\n var tracks = this.player_.textTracks();\n\n this.clearDisplay();\n\n if (!tracks) {\n return;\n }\n\n // Track display prioritization model: if multiple tracks are 'showing',\n // display the first 'subtitles' or 'captions' track which is 'showing',\n // otherwise display the first 'descriptions' track which is 'showing'\n\n let descriptionsTrack = null;\n let captionsSubtitlesTrack = null;\n\n let i = tracks.length;\n while (i--) {\n let track = tracks[i];\n if (track['mode'] === 'showing') {\n if (track['kind'] === 'descriptions') {\n descriptionsTrack = track;\n } else {\n captionsSubtitlesTrack = track;\n }\n }\n }\n\n if (captionsSubtitlesTrack) {\n this.updateForTrack(captionsSubtitlesTrack);\n } else if (descriptionsTrack) {\n this.updateForTrack(descriptionsTrack);\n }\n }\n\n /**\n * Add texttrack to texttrack list\n *\n * @param {TextTrackObject} track Texttrack object to be added to list\n * @method updateForTrack\n */\n updateForTrack(track) {\n if (typeof window['WebVTT'] !== 'function' || !track['activeCues']) {\n return;\n }\n\n let overrides = this.player_['textTrackSettings'].getValues();\n\n let cues = [];\n for (let i = 0; i < track['activeCues'].length; i++) {\n cues.push(track['activeCues'][i]);\n }\n\n window['WebVTT']['processCues'](window, cues, this.el_);\n\n let i = cues.length;\n while (i--) {\n let cue = cues[i];\n if (!cue) {\n continue;\n }\n\n let cueDiv = cue.displayState;\n if (overrides.color) {\n cueDiv.firstChild.style.color = overrides.color;\n }\n if (overrides.textOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'color',\n constructColor(overrides.color || '#fff',\n overrides.textOpacity));\n }\n if (overrides.backgroundColor) {\n cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n }\n if (overrides.backgroundOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'backgroundColor',\n constructColor(overrides.backgroundColor || '#000',\n overrides.backgroundOpacity));\n }\n if (overrides.windowColor) {\n if (overrides.windowOpacity) {\n tryUpdateStyle(cueDiv,\n 'backgroundColor',\n constructColor(overrides.windowColor, overrides.windowOpacity));\n } else {\n cueDiv.style.backgroundColor = overrides.windowColor;\n }\n }\n if (overrides.edgeStyle) {\n if (overrides.edgeStyle === 'dropshadow') {\n cueDiv.firstChild.style.textShadow = `2px 2px 3px ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n } else if (overrides.edgeStyle === 'raised') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n } else if (overrides.edgeStyle === 'depressed') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n } else if (overrides.edgeStyle === 'uniform') {\n cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n }\n }\n if (overrides.fontPercent && overrides.fontPercent !== 1) {\n const fontSize = window.parseFloat(cueDiv.style.fontSize);\n cueDiv.style.fontSize = (fontSize * overrides.fontPercent) + 'px';\n cueDiv.style.height = 'auto';\n cueDiv.style.top = 'auto';\n cueDiv.style.bottom = '2px';\n }\n if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n if (overrides.fontFamily === 'small-caps') {\n cueDiv.firstChild.style.fontVariant = 'small-caps';\n } else {\n cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n }\n }\n }\n }\n\n}\n\n/**\n* Add cue HTML to display\n*\n* @param {Number} color Hex number for color, like #f0e\n* @param {Number} opacity Value for opacity,0.0 - 1.0\n* @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)'\n* @method constructColor\n*/\nfunction constructColor(color, opacity) {\n return 'rgba(' +\n // color looks like \"#f0e\"\n parseInt(color[1] + color[1], 16) + ',' +\n parseInt(color[2] + color[2], 16) + ',' +\n parseInt(color[3] + color[3], 16) + ',' +\n opacity + ')';\n}\n\n/**\n * Try to update style\n * Some style changes will throw an error, particularly in IE8. Those should be noops.\n *\n * @param {Element} el The element to be styles\n * @param {CSSProperty} style The CSS property to be styled\n * @param {CSSStyle} rule The actual style to be applied to the property\n * @method tryUpdateStyle\n */\nfunction tryUpdateStyle(el, style, rule) {\n //\n try {\n el.style[style] = rule;\n } catch (e) {}\n}\n\nComponent.registerComponent('TextTrackDisplay', TextTrackDisplay);\nexport default TextTrackDisplay;\n", + "/**\n * @file text-track-enums.js\n */\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n *\n * enum TextTrackMode { \"disabled\", \"hidden\", \"showing\" };\n */\nconst TextTrackMode = {\n disabled: 'disabled',\n hidden: 'hidden',\n showing: 'showing'\n};\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind\n *\n * enum TextTrackKind {\n * \"subtitles\",\n * \"captions\",\n * \"descriptions\",\n * \"chapters\",\n * \"metadata\"\n * };\n */\nconst TextTrackKind = {\n subtitles: 'subtitles',\n captions: 'captions',\n descriptions: 'descriptions',\n chapters: 'chapters',\n metadata: 'metadata'\n};\n\n/* jshint ignore:start */\n// we ignore jshint here because it does not see\n// TextTrackMode or TextTrackKind as defined here somehow...\nexport { TextTrackMode, TextTrackKind };\n/* jshint ignore:end */\n", + "/**\n * Utilities for capturing text track state and re-creating tracks\n * based on a capture.\n *\n * @file text-track-list-converter.js\n */\n\n/**\n * Examine a single text track and return a JSON-compatible javascript\n * object that represents the text track's state.\n * @param track {TextTrackObject} the text track to query\n * @return {Object} a serializable javascript representation of the\n * @private\n */\nlet trackToJson_ = function(track) {\n let ret = ['kind', 'label', 'language', 'id',\n 'inBandMetadataTrackDispatchType',\n 'mode', 'src'].reduce((acc, prop, i) => {\n if (track[prop]) {\n acc[prop] = track[prop];\n }\n \n return acc;\n }, {\n cues: track.cues && Array.prototype.map.call(track.cues, function(cue) {\n return {\n startTime: cue.startTime,\n endTime: cue.endTime,\n text: cue.text,\n id: cue.id\n };\n })\n });\n\n return ret;\n};\n\n/**\n * Examine a tech and return a JSON-compatible javascript array that\n * represents the state of all text tracks currently configured. The\n * return array is compatible with `jsonToTextTracks`.\n * @param tech {tech} the tech object to query\n * @return {Array} a serializable javascript representation of the\n * @function textTracksToJson\n */\nlet textTracksToJson = function(tech) {\n\n let trackEls = tech.$$('track');\n\n let trackObjs = Array.prototype.map.call(trackEls, (t) => t.track);\n let tracks = Array.prototype.map.call(trackEls, function(trackEl) {\n let json = trackToJson_(trackEl.track);\n if (trackEl.src) {\n json.src = trackEl.src;\n }\n return json;\n });\n\n return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function(track) {\n return trackObjs.indexOf(track) === -1;\n }).map(trackToJson_));\n};\n\n/**\n * Creates a set of remote text tracks on a tech based on an array of\n * javascript text track representations.\n * @param json {Array} an array of text track representation objects,\n * like those that would be produced by `textTracksToJson`\n * @param tech {tech} the tech to create text tracks on\n * @function jsonToTextTracks\n */\nlet jsonToTextTracks = function(json, tech) {\n json.forEach(function(track) {\n let addedTrack = tech.addRemoteTextTrack(track).track;\n if (!track.src && track.cues) {\n track.cues.forEach((cue) => addedTrack.addCue(cue));\n }\n });\n\n return tech.textTracks();\n};\n\nexport default {textTracksToJson, jsonToTextTracks, trackToJson_};\n", + "/**\n * @file text-track-list.js\n */\nimport EventTarget from '../event-target';\nimport * as Fn from '../utils/fn.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A text track list as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist\n *\n * interface TextTrackList : EventTarget {\n * readonly attribute unsigned long length;\n * getter TextTrack (unsigned long index);\n * TextTrack? getTrackById(DOMString id);\n *\n * attribute EventHandler onchange;\n * attribute EventHandler onaddtrack;\n * attribute EventHandler onremovetrack;\n * };\n *\n * @param {Track[]} tracks A list of tracks to initialize the list with\n * @extends EventTarget\n * @class TextTrackList\n */\n\nclass TextTrackList extends EventTarget {\n constructor(tracks = []) {\n super();\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackList.prototype[prop];\n }\n }\n }\n\n list.tracks_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.tracks_.length;\n }\n });\n\n for (let i = 0; i < tracks.length; i++) {\n list.addTrack_(tracks[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * Add TextTrack from TextTrackList\n *\n * @param {TextTrack} track\n * @method addTrack_\n * @private\n */\n addTrack_(track) {\n let index = this.tracks_.length;\n\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get() {\n return this.tracks_[index];\n }\n });\n }\n\n track.addEventListener('modechange', Fn.bind(this, function() {\n this.trigger('change');\n }));\n\n // Do not add duplicate tracks\n if (this.tracks_.indexOf(track) === -1) {\n this.tracks_.push(track);\n this.trigger({\n track,\n type: 'addtrack'\n });\n }\n\n }\n\n /**\n * Remove TextTrack from TextTrackList\n * NOTE: Be mindful of what is passed in as it may be a HTMLTrackElement\n *\n * @param {TextTrack} rtrack\n * @method removeTrack_\n * @private\n */\n removeTrack_(rtrack) {\n let track;\n\n for (let i = 0, l = this.length; i < l; i++) {\n if (this[i] === rtrack) {\n track = this[i];\n if (track.off) {\n track.off();\n }\n\n this.tracks_.splice(i, 1);\n\n break;\n }\n }\n\n if (!track) {\n return;\n }\n\n this.trigger({\n track,\n type: 'removetrack'\n });\n }\n\n /**\n * Get a TextTrack from TextTrackList by a tracks id\n *\n * @param {String} id - the id of the track to get\n * @method getTrackById\n * @return {TextTrack}\n * @private\n */\n getTrackById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let track = this[i];\n\n if (track.id === id) {\n result = track;\n break;\n }\n }\n\n return result;\n }\n}\n\n/**\n * change - One or more tracks in the track list have been enabled or disabled.\n * addtrack - A track has been added to the track list.\n * removetrack - A track has been removed from the track list.\n */\nTextTrackList.prototype.allowedEvents_ = {\n change: 'change',\n addtrack: 'addtrack',\n removetrack: 'removetrack'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (let event in TextTrackList.prototype.allowedEvents_) {\n TextTrackList.prototype['on' + event] = null;\n}\n\nexport default TextTrackList;\n", + "/**\n * @file text-track-settings.js\n */\nimport Component from '../component';\nimport * as Events from '../utils/events.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport window from 'global/window';\n\n/**\n * Manipulate settings of texttracks\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class TextTrackSettings\n */\nclass TextTrackSettings extends Component {\n\n constructor(player, options) {\n super(player, options);\n this.hide();\n\n // Grab `persistTextTrackSettings` from the player options if not passed in child options\n if (options.persistTextTrackSettings === undefined) {\n this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n }\n\n Events.on(this.$('.vjs-done-button'), 'click', Fn.bind(this, function() {\n this.saveSettings();\n this.hide();\n }));\n\n Events.on(this.$('.vjs-default-button'), 'click', Fn.bind(this, function() {\n this.$('.vjs-fg-color > select').selectedIndex = 0;\n this.$('.vjs-bg-color > select').selectedIndex = 0;\n this.$('.window-color > select').selectedIndex = 0;\n this.$('.vjs-text-opacity > select').selectedIndex = 0;\n this.$('.vjs-bg-opacity > select').selectedIndex = 0;\n this.$('.vjs-window-opacity > select').selectedIndex = 0;\n this.$('.vjs-edge-style select').selectedIndex = 0;\n this.$('.vjs-font-family select').selectedIndex = 0;\n this.$('.vjs-font-percent select').selectedIndex = 2;\n this.updateDisplay();\n }));\n\n Events.on(this.$('.vjs-fg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.window-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-text-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-window-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-percent select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-edge-style select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-family select'), 'change', Fn.bind(this, this.updateDisplay));\n\n if (this.options_.persistTextTrackSettings) {\n this.restoreSettings();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-caption-settings vjs-modal-overlay',\n innerHTML: captionOptionsMenuTemplate()\n });\n }\n\n /**\n * Get texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @return {Object}\n * @method getValues\n */\n getValues() {\n const textEdge = getSelectedOptionValue(this.$('.vjs-edge-style select'));\n const fontFamily = getSelectedOptionValue(this.$('.vjs-font-family select'));\n const fgColor = getSelectedOptionValue(this.$('.vjs-fg-color > select'));\n const textOpacity = getSelectedOptionValue(this.$('.vjs-text-opacity > select'));\n const bgColor = getSelectedOptionValue(this.$('.vjs-bg-color > select'));\n const bgOpacity = getSelectedOptionValue(this.$('.vjs-bg-opacity > select'));\n const windowColor = getSelectedOptionValue(this.$('.window-color > select'));\n const windowOpacity = getSelectedOptionValue(this.$('.vjs-window-opacity > select'));\n const fontPercent = window['parseFloat'](getSelectedOptionValue(this.$('.vjs-font-percent > select')));\n\n let result = {\n 'backgroundOpacity': bgOpacity,\n 'textOpacity': textOpacity,\n 'windowOpacity': windowOpacity,\n 'edgeStyle': textEdge,\n 'fontFamily': fontFamily,\n 'color': fgColor,\n 'backgroundColor': bgColor,\n 'windowColor': windowColor,\n 'fontPercent': fontPercent\n };\n for (let name in result) {\n if (result[name] === '' || result[name] === 'none' || (name === 'fontPercent' && result[name] === 1.00)) {\n delete result[name];\n }\n }\n return result;\n }\n\n /**\n * Set texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @param {Object} values Object with texttrack setting values\n * @method setValues\n */\n setValues(values) {\n setSelectedOption(this.$('.vjs-edge-style select'), values.edgeStyle);\n setSelectedOption(this.$('.vjs-font-family select'), values.fontFamily);\n setSelectedOption(this.$('.vjs-fg-color > select'), values.color);\n setSelectedOption(this.$('.vjs-text-opacity > select'), values.textOpacity);\n setSelectedOption(this.$('.vjs-bg-color > select'), values.backgroundColor);\n setSelectedOption(this.$('.vjs-bg-opacity > select'), values.backgroundOpacity);\n setSelectedOption(this.$('.window-color > select'), values.windowColor);\n setSelectedOption(this.$('.vjs-window-opacity > select'), values.windowOpacity);\n\n let fontPercent = values.fontPercent;\n\n if (fontPercent) {\n fontPercent = fontPercent.toFixed(2);\n }\n\n setSelectedOption(this.$('.vjs-font-percent > select'), fontPercent);\n }\n\n /**\n * Restore texttrack settings\n *\n * @method restoreSettings\n */\n restoreSettings() {\n let err, values;\n\n try {\n [err, values] = safeParseTuple(window.localStorage.getItem('vjs-text-track-settings'));\n\n if (err) {\n log.error(err);\n }\n } catch (e) {\n log.warn(e);\n }\n\n if (values) {\n this.setValues(values);\n }\n }\n\n /**\n * Save texttrack settings to local storage\n *\n * @method saveSettings\n */\n saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n\n let values = this.getValues();\n try {\n if (Object.getOwnPropertyNames(values).length > 0) {\n window.localStorage.setItem('vjs-text-track-settings', JSON.stringify(values));\n } else {\n window.localStorage.removeItem('vjs-text-track-settings');\n }\n } catch (e) {\n log.warn(e);\n }\n }\n\n /**\n * Update display of texttrack settings\n *\n * @method updateDisplay\n */\n updateDisplay() {\n let ttDisplay = this.player_.getChild('textTrackDisplay');\n if (ttDisplay) {\n ttDisplay.updateDisplay();\n }\n }\n\n}\n\nComponent.registerComponent('TextTrackSettings', TextTrackSettings);\n\nfunction getSelectedOptionValue(target) {\n let selectedOption;\n // not all browsers support selectedOptions, so, fallback to options\n if (target.selectedOptions) {\n selectedOption = target.selectedOptions[0];\n } else if (target.options) {\n selectedOption = target.options[target.options.selectedIndex];\n }\n\n return selectedOption.value;\n}\n\nfunction setSelectedOption(target, value) {\n if (!value) {\n return;\n }\n\n let i;\n for (i = 0; i < target.options.length; i++) {\n const option = target.options[i];\n if (option.value === value) {\n break;\n }\n }\n\n target.selectedIndex = i;\n}\n\nfunction captionOptionsMenuTemplate() {\n let template = `
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    `;\n\n return template;\n}\n\nexport default TextTrackSettings;\n", + "/**\n * @file text-track.js\n */\nimport TextTrackCueList from './text-track-cue-list';\nimport * as Fn from '../utils/fn.js';\nimport * as Guid from '../utils/guid.js';\nimport * as browser from '../utils/browser.js';\nimport * as TextTrackEnum from './text-track-enums';\nimport log from '../utils/log.js';\nimport EventTarget from '../event-target';\nimport document from 'global/document';\nimport window from 'global/window';\nimport { isCrossOrigin } from '../utils/url.js';\nimport XHR from 'xhr';\n\n/**\n * takes a webvtt file contents and parses it into cues\n *\n * @param {String} srcContent webVTT file contents\n * @param {Track} track track to addcues to\n */\nconst parseCues = function(srcContent, track) {\n let parser = new window.WebVTT.Parser(window,\n window.vttjs,\n window.WebVTT.StringDecoder());\n\n parser.oncue = function(cue) {\n track.addCue(cue);\n };\n\n parser.onparsingerror = function(error) {\n log.error(error);\n };\n\n parser.onflush = function() {\n track.trigger({\n type: 'loadeddata',\n target: track\n });\n };\n\n parser.parse(srcContent);\n parser.flush();\n};\n\n\n/**\n * load a track from a specifed url\n *\n * @param {String} src url to load track from\n * @param {Track} track track to addcues to\n */\nconst loadTrack = function(src, track) {\n let opts = {\n uri: src\n };\n let crossOrigin = isCrossOrigin(src);\n\n if (crossOrigin) {\n opts.cors = crossOrigin;\n }\n\n XHR(opts, Fn.bind(this, function(err, response, responseBody) {\n if (err) {\n return log.error(err, response);\n }\n\n track.loaded_ = true;\n\n // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n // NOTE: this is only used for the alt/video.novtt.js build\n if (typeof window.WebVTT !== 'function') {\n if (track.tech_) {\n let loadHandler = () => parseCues(responseBody, track);\n track.tech_.on('vttjsloaded', loadHandler);\n track.tech_.on('vttjserror', () => {\n log.error(`vttjs failed to load, stopping trying to process ${track.src}`);\n track.tech_.off('vttjsloaded', loadHandler);\n });\n\n }\n } else {\n parseCues(responseBody, track);\n }\n\n }));\n};\n\n/**\n * A single text track as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack\n *\n * interface TextTrack : EventTarget {\n * readonly attribute TextTrackKind kind;\n * readonly attribute DOMString label;\n * readonly attribute DOMString language;\n *\n * readonly attribute DOMString id;\n * readonly attribute DOMString inBandMetadataTrackDispatchType;\n *\n * attribute TextTrackMode mode;\n *\n * readonly attribute TextTrackCueList? cues;\n * readonly attribute TextTrackCueList? activeCues;\n *\n * void addCue(TextTrackCue cue);\n * void removeCue(TextTrackCue cue);\n *\n * attribute EventHandler oncuechange;\n * };\n *\n * @param {Object=} options Object of option names and values\n * @extends EventTarget\n * @class TextTrack\n */\nclass TextTrack extends EventTarget {\n constructor(options = {}) {\n super();\n if (!options.tech) {\n throw new Error('A tech was not provided.');\n }\n\n let tt = this;\n\n if (browser.IS_IE8) {\n tt = document.createElement('custom');\n\n for (let prop in TextTrack.prototype) {\n if (prop !== 'constructor') {\n tt[prop] = TextTrack.prototype[prop];\n }\n }\n }\n\n tt.tech_ = options.tech;\n\n let mode = TextTrackEnum.TextTrackMode[options.mode] || 'disabled';\n let kind = TextTrackEnum.TextTrackKind[options.kind] || 'subtitles';\n let label = options.label || '';\n let language = options.language || options.srclang || '';\n let id = options.id || 'vjs_text_track_' + Guid.newGUID();\n\n if (kind === 'metadata' || kind === 'chapters') {\n mode = 'hidden';\n }\n\n tt.cues_ = [];\n tt.activeCues_ = [];\n\n let cues = new TextTrackCueList(tt.cues_);\n let activeCues = new TextTrackCueList(tt.activeCues_);\n let changed = false;\n let timeupdateHandler = Fn.bind(tt, function() {\n this.activeCues;\n if (changed) {\n this.trigger('cuechange');\n changed = false;\n }\n });\n\n if (mode !== 'disabled') {\n tt.tech_.on('timeupdate', timeupdateHandler);\n }\n\n Object.defineProperty(tt, 'kind', {\n get() {\n return kind;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'label', {\n get() {\n return label;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'language', {\n get() {\n return language;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'id', {\n get() {\n return id;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'mode', {\n get() {\n return mode;\n },\n set(newMode) {\n if (!TextTrackEnum.TextTrackMode[newMode]) {\n return;\n }\n mode = newMode;\n if (mode === 'showing') {\n this.tech_.on('timeupdate', timeupdateHandler);\n }\n this.trigger('modechange');\n }\n });\n\n Object.defineProperty(tt, 'cues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n return cues;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'activeCues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n // nothing to do\n if (this.cues.length === 0) {\n return activeCues;\n }\n\n let ct = this.tech_.currentTime();\n let active = [];\n\n for (let i = 0, l = this.cues.length; i < l; i++) {\n let cue = this.cues[i];\n\n if (cue.startTime <= ct && cue.endTime >= ct) {\n active.push(cue);\n } else if (cue.startTime === cue.endTime &&\n cue.startTime <= ct &&\n cue.startTime + 0.5 >= ct) {\n active.push(cue);\n }\n }\n\n changed = false;\n\n if (active.length !== this.activeCues_.length) {\n changed = true;\n } else {\n for (let i = 0; i < active.length; i++) {\n if (this.activeCues_.indexOf(active[i]) === -1) {\n changed = true;\n }\n }\n }\n\n this.activeCues_ = active;\n activeCues.setCues_(this.activeCues_);\n\n return activeCues;\n },\n set() {}\n });\n\n if (options.src) {\n tt.src = options.src;\n loadTrack(options.src, tt);\n } else {\n tt.loaded_ = true;\n }\n\n if (browser.IS_IE8) {\n return tt;\n }\n }\n\n /**\n * add a cue to the internal list of cues\n *\n * @param {Object} cue the cue to add to our internal list\n * @method addCue\n */\n addCue(cue) {\n let tracks = this.tech_.textTracks();\n\n if (tracks) {\n for (let i = 0; i < tracks.length; i++) {\n if (tracks[i] !== this) {\n tracks[i].removeCue(cue);\n }\n }\n }\n\n this.cues_.push(cue);\n this.cues.setCues_(this.cues_);\n }\n\n /**\n * remvoe a cue from our internal list\n *\n * @param {Object} removeCue the cue to remove from our internal list\n * @method removeCue\n */\n removeCue(removeCue) {\n let removed = false;\n\n for (let i = 0, l = this.cues_.length; i < l; i++) {\n let cue = this.cues_[i];\n\n if (cue === removeCue) {\n this.cues_.splice(i, 1);\n removed = true;\n }\n }\n\n if (removed) {\n this.cues.setCues_(this.cues_);\n }\n }\n}\n\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n */\nTextTrack.prototype.allowedEvents_ = {\n cuechange: 'cuechange'\n};\n\nexport default TextTrack;\n", + "/**\n * @file browser.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst USER_AGENT = window.navigator.userAgent;\nconst webkitVersionMap = (/AppleWebKit\\/([\\d.]+)/i).exec(USER_AGENT);\nconst appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\n\n/*\n * Device is an iPhone\n *\n * @type {Boolean}\n * @constant\n * @private\n */\nexport const IS_IPAD = (/iPad/i).test(USER_AGENT);\n\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\nexport const IS_IPHONE = (/iPhone/i).test(USER_AGENT) && !IS_IPAD;\nexport const IS_IPOD = (/iPod/i).test(USER_AGENT);\nexport const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\nexport const IOS_VERSION = (function(){\n var match = USER_AGENT.match(/OS (\\d+)_/i);\n if (match && match[1]) { return match[1]; }\n})();\n\nexport const IS_ANDROID = (/Android/i).test(USER_AGENT);\nexport const ANDROID_VERSION = (function() {\n // This matches Android Major.Minor.Patch versions\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i),\n major,\n minor;\n\n if (!match) {\n return null;\n }\n\n major = match[1] && parseFloat(match[1]);\n minor = match[2] && parseFloat(match[2]);\n\n if (major && minor) {\n return parseFloat(match[1] + '.' + match[2]);\n } else if (major) {\n return major;\n } else {\n return null;\n }\n})();\n// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser\nexport const IS_OLD_ANDROID = IS_ANDROID && (/webkit/i).test(USER_AGENT) && ANDROID_VERSION < 2.3;\nexport const IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\n\nexport const IS_FIREFOX = (/Firefox/i).test(USER_AGENT);\nexport const IS_CHROME = (/Chrome/i).test(USER_AGENT);\nexport const IS_IE8 = (/MSIE\\s8\\.0/).test(USER_AGENT);\n\nexport const TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);\nexport const BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in document.createElement('video').style;\n", + "/**\n * @file buffer.js\n */\nimport { createTimeRange } from './time-ranges.js';\n\n/**\n * Compute how much your video has been buffered\n *\n * @param {Object} Buffered object\n * @param {Number} Total duration\n * @return {Number} Percent buffered of the total duration\n * @private\n * @function bufferedPercent\n */\nexport function bufferedPercent(buffered, duration) {\n var bufferedDuration = 0,\n start, end;\n\n if (!duration) {\n return 0;\n }\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0, 0);\n }\n\n for (let i = 0; i < buffered.length; i++){\n start = buffered.start(i);\n end = buffered.end(i);\n\n // buffered end can be bigger than duration by a very small fraction\n if (end > duration) {\n end = duration;\n }\n\n bufferedDuration += end - start;\n }\n\n return bufferedDuration / duration;\n}\n", + "import log from './log.js';\n\n/**\n * Object containing the default behaviors for available handler methods.\n *\n * @private\n * @type {Object}\n */\nconst defaultBehaviors = {\n get(obj, key) {\n return obj[key];\n },\n set(obj, key, value) {\n obj[key] = value;\n return true;\n }\n};\n\n/**\n * Expose private objects publicly using a Proxy to log deprecation warnings.\n *\n * Browsers that do not support Proxy objects will simply return the `target`\n * object, so it can be directly exposed.\n *\n * @param {Object} target The target object.\n * @param {Object} messages Messages to display from a Proxy. Only operations\n * with an associated message will be proxied.\n * @param {String} [messages.get]\n * @param {String} [messages.set]\n * @return {Object} A Proxy if supported or the `target` argument.\n */\nexport default (target, messages={}) => {\n if (typeof Proxy === 'function') {\n let handler = {};\n\n // Build a handler object based on those keys that have both messages\n // and default behaviors.\n Object.keys(messages).forEach(key => {\n if (defaultBehaviors.hasOwnProperty(key)) {\n handler[key] = function() {\n log.warn(messages[key]);\n return defaultBehaviors[key].apply(this, arguments);\n };\n }\n });\n\n return new Proxy(target, handler);\n }\n return target;\n};\n", + "/**\n * @file dom.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Guid from './guid.js';\nimport log from './log.js';\nimport tsml from 'tsml';\n\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction isNonBlankString(str) {\n return typeof str === 'string' && /\\S/.test(str);\n}\n\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction throwIfWhitespace(str) {\n if (/\\s/.test(str)) {\n throw new Error('class has illegal whitespace characters');\n }\n}\n\n/**\n * Produce a regular expression for matching a class name.\n *\n * @param {String} className\n * @return {RegExp}\n */\nfunction classRegExp(className) {\n return new RegExp('(^|\\\\s)' + className + '($|\\\\s)');\n}\n\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @function createQuerier\n * @private\n * @param {String} method\n * @return {Function}\n */\nfunction createQuerier(method) {\n return function (selector, context) {\n if (!isNonBlankString(selector)) {\n return document[method](null);\n }\n if (isNonBlankString(context)) {\n context = document.querySelector(context);\n }\n return (isEl(context) ? context : document)[method](selector);\n };\n}\n\n/**\n * Shorthand for document.getElementById()\n * Also allows for CSS (jQuery) ID syntax. But nothing other than IDs.\n *\n * @param {String} id Element ID\n * @return {Element} Element with supplied ID\n * @function getEl\n */\nexport function getEl(id){\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n return document.getElementById(id);\n}\n\n/**\n * Creates an element and applies properties.\n *\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n * @function createEl\n */\nexport function createEl(tagName='div', properties={}, attributes={}){\n let el = document.createElement(tagName);\n\n Object.getOwnPropertyNames(properties).forEach(function(propName){\n let val = properties[propName];\n\n // See #2176\n // We originally were accepting both properties and attributes in the\n // same object, but that doesn't work so well.\n if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\n log.warn(tsml`Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ${propName} to ${val}.`);\n el.setAttribute(propName, val);\n } else {\n el[propName] = val;\n }\n });\n\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let val = attributes[attrName];\n el.setAttribute(attrName, attributes[attrName]);\n });\n\n return el;\n}\n\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param {Element} el\n * @param {String} text\n * @return {Element}\n * @function textContent\n */\nexport function textContent(el, text) {\n if (typeof el.textContent === 'undefined') {\n el.innerText = text;\n } else {\n el.textContent = text;\n }\n}\n\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child Element to insert\n * @param {Element} parent Element to insert child into\n * @private\n * @function insertElFirst\n */\nexport function insertElFirst(child, parent){\n if (parent.firstChild) {\n parent.insertBefore(child, parent.firstChild);\n } else {\n parent.appendChild(child);\n }\n}\n\n/**\n * Element Data Store. Allows for binding data to an element without putting it directly on the element.\n * Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\nconst elData = {};\n\n/*\n * Unique attribute name to store an element's guid in\n *\n * @type {String}\n * @constant\n * @private\n */\nconst elIdAttr = 'vdata' + (new Date()).getTime();\n\n/**\n * Returns the cache object where data for an element is stored\n *\n * @param {Element} el Element to store data for.\n * @return {Object}\n * @function getElData\n */\nexport function getElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n id = el[elIdAttr] = Guid.newGUID();\n }\n\n if (!elData[id]) {\n elData[id] = {};\n }\n\n return elData[id];\n}\n\n/**\n * Returns whether or not an element has cached data\n *\n * @param {Element} el A dom element\n * @return {Boolean}\n * @private\n * @function hasElData\n */\nexport function hasElData(el) {\n const id = el[elIdAttr];\n\n if (!id) {\n return false;\n }\n\n return !!Object.getOwnPropertyNames(elData[id]).length;\n}\n\n/**\n * Delete data for the element from the cache and the guid attr from getElementById\n *\n * @param {Element} el Remove data for an element\n * @private\n * @function removeElData\n */\nexport function removeElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n return;\n }\n\n // Remove all stored data\n delete elData[id];\n\n // Remove the elIdAttr property from the DOM node\n try {\n delete el[elIdAttr];\n } catch(e) {\n if (el.removeAttribute) {\n el.removeAttribute(elIdAttr);\n } else {\n // IE doesn't appear to support removeAttribute on the document element\n el[elIdAttr] = null;\n }\n }\n}\n\n/**\n * Check if an element has a CSS class\n *\n * @function hasElClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nexport function hasElClass(element, classToCheck) {\n if (element.classList) {\n return element.classList.contains(classToCheck);\n } else {\n throwIfWhitespace(classToCheck);\n return classRegExp(classToCheck).test(element.className);\n }\n}\n\n/**\n * Add a CSS class name to an element\n *\n * @function addElClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nexport function addElClass(element, classToAdd) {\n if (element.classList) {\n element.classList.add(classToAdd);\n\n // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\n // in the case of classList not being supported.\n } else if (!hasElClass(element, classToAdd)) {\n element.className = (element.className + ' ' + classToAdd).trim();\n }\n\n return element;\n}\n\n/**\n * Remove a CSS class name from an element\n *\n * @function removeElClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nexport function removeElClass(element, classToRemove) {\n if (element.classList) {\n element.classList.remove(classToRemove);\n } else {\n throwIfWhitespace(classToRemove);\n element.className = element.className.split(/\\s+/).filter(function(c) {\n return c !== classToRemove;\n }).join(' ');\n }\n\n return element;\n}\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @function toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nexport function toggleElClass(element, classToToggle, predicate) {\n\n // This CANNOT use `classList` internally because IE does not support the\n // second parameter to the `classList.toggle()` method! Which is fine because\n // `classList` will be used by the add/remove functions.\n let has = hasElClass(element, classToToggle);\n\n if (typeof predicate === 'function') {\n predicate = predicate(element, classToToggle);\n }\n\n if (typeof predicate !== 'boolean') {\n predicate = !has;\n }\n\n // If the necessary class operation matches the current state of the\n // element, no action is required.\n if (predicate === has) {\n return;\n }\n\n if (predicate) {\n addElClass(element, classToToggle);\n } else {\n removeElClass(element, classToToggle);\n }\n\n return element;\n}\n\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n * @private\n * @function setElAttributes\n */\nexport function setElAttributes(el, attributes) {\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let attrValue = attributes[attrName];\n\n if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n el.removeAttribute(attrName);\n } else {\n el.setAttribute(attrName, (attrValue === true ? '' : attrValue));\n }\n });\n}\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n * @private\n * @function getElAttributes\n */\nexport function getElAttributes(tag) {\n var obj, knownBooleans, attrs, attrName, attrVal;\n\n obj = {};\n\n // known boolean attributes\n // we can check for matching boolean properties, but older browsers\n // won't know about HTML5 boolean attributes that we still read from\n knownBooleans = ','+'autoplay,controls,loop,muted,default'+',';\n\n if (tag && tag.attributes && tag.attributes.length > 0) {\n attrs = tag.attributes;\n\n for (var i = attrs.length - 1; i >= 0; i--) {\n attrName = attrs[i].name;\n attrVal = attrs[i].value;\n\n // check for known booleans\n // the matching element property will return a value for typeof\n if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(','+attrName+',') !== -1) {\n // the value of an included boolean attribute is typically an empty\n // string ('') which would equal false if we just check for a false value.\n // we also don't want support bad code like autoplay='false'\n attrVal = (attrVal !== null) ? true : false;\n }\n\n obj[attrName] = attrVal;\n }\n }\n\n return obj;\n}\n\n/**\n * Attempt to block the ability to select text while dragging controls\n *\n * @return {Boolean}\n * @function blockTextSelection\n */\nexport function blockTextSelection() {\n document.body.focus();\n document.onselectstart = function() {\n return false;\n };\n}\n\n/**\n * Turn off text selection blocking\n *\n * @return {Boolean}\n * @function unblockTextSelection\n */\nexport function unblockTextSelection() {\n document.onselectstart = function() {\n return true;\n };\n}\n\n/**\n * Offset Left\n * getBoundingClientRect technique from\n * John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @function findElPosition\n * @param {Element} el Element from which to get offset\n * @return {Object}\n */\nexport function findElPosition(el) {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = box.left + scrollLeft - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = box.top + scrollTop - clientTop;\n\n // Android sometimes returns slightly off decimal values, so need to round\n return {\n left: Math.round(left),\n top: Math.round(top)\n };\n}\n\n/**\n * Get pointer position in element\n * Returns an object with x and y coordinates.\n * The base on the coordinates are the bottom left of the element.\n *\n * @function getPointerPosition\n * @param {Element} el Element on which to get the pointer position on\n * @param {Event} event Event object\n * @return {Object} This object will have x and y coordinates corresponding to the mouse position\n */\nexport function getPointerPosition(el, event) {\n let position = {};\n let box = findElPosition(el);\n let boxW = el.offsetWidth;\n let boxH = el.offsetHeight;\n\n let boxY = box.top;\n let boxX = box.left;\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, ((boxY - pageY) + boxH) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @function isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isEl(value) {\n return !!value && typeof value === 'object' && value.nodeType === 1;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isTextNode(value) {\n return !!value && typeof value === 'object' && value.nodeType === 3;\n}\n\n/**\n * Empties the contents of an element.\n *\n * @function emptyEl\n * @param {Element} el\n * @return {Element}\n */\nexport function emptyEl(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n return el;\n}\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but protects\n * from falling into the trap of simply writing to `innerHTML`, which is\n * an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @function normalizeContent\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Array}\n */\nexport function normalizeContent(content) {\n\n // First, invoke content if it is a function. If it produces an array,\n // that needs to happen before normalization.\n if (typeof content === 'function') {\n content = content();\n }\n\n // Next up, normalize to an array, so one or many items can be normalized,\n // filtered, and returned.\n return (Array.isArray(content) ? content : [content]).map(value => {\n\n // First, invoke value if it is a function to produce a new value,\n // which will be subsequently normalized to a Node of some kind.\n if (typeof value === 'function') {\n value = value();\n }\n\n if (isEl(value) || isTextNode(value)) {\n return value;\n }\n\n if (typeof value === 'string' && /\\S/.test(value)) {\n return document.createTextNode(value);\n }\n }).filter(value => value);\n}\n\n/**\n * Normalizes and appends content to an element.\n *\n * @function appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function appendContent(el, content) {\n normalizeContent(content).forEach(node => el.appendChild(node));\n return el;\n}\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @function insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function insertContent(el, content) {\n return appendContent(emptyEl(el), content);\n}\n\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\nexport const $ = createQuerier('querySelector');\n\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\nexport const $$ = createQuerier('querySelectorAll');\n", + "/**\n * @file events.js\n *\n * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n */\n\nimport * as Dom from './dom.js';\nimport * as Guid from './guid.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nexport function on(elem, type, fn){\n if (Array.isArray(type)) {\n return _handleMultipleEvents(on, elem, type, fn);\n }\n\n let data = Dom.getElData(elem);\n\n // We need a place to store all our handler data\n if (!data.handlers) data.handlers = {};\n\n if (!data.handlers[type]) data.handlers[type] = [];\n\n if (!fn.guid) fn.guid = Guid.newGUID();\n\n data.handlers[type].push(fn);\n\n if (!data.dispatcher) {\n data.disabled = false;\n\n data.dispatcher = function (event, hash){\n\n if (data.disabled) return;\n event = fixEvent(event);\n\n var handlers = data.handlers[event.type];\n\n if (handlers) {\n // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n var handlersCopy = handlers.slice(0);\n\n for (var m = 0, n = handlersCopy.length; m < n; m++) {\n if (event.isImmediatePropagationStopped()) {\n break;\n } else {\n handlersCopy[m].call(elem, event, hash);\n }\n }\n }\n };\n }\n\n if (data.handlers[type].length === 1) {\n if (elem.addEventListener) {\n elem.addEventListener(type, data.dispatcher, false);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + type, data.dispatcher);\n }\n }\n}\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nexport function off(elem, type, fn) {\n // Don't want to add a cache object through getElData if not needed\n if (!Dom.hasElData(elem)) return;\n\n let data = Dom.getElData(elem);\n\n // If no events exist, nothing to unbind\n if (!data.handlers) { return; }\n\n if (Array.isArray(type)) {\n return _handleMultipleEvents(off, elem, type, fn);\n }\n\n // Utility function\n var removeType = function(t){\n data.handlers[t] = [];\n _cleanUpEvents(elem,t);\n };\n\n // Are we removing all bound events?\n if (!type) {\n for (let t in data.handlers) removeType(t);\n return;\n }\n\n var handlers = data.handlers[type];\n\n // If no handlers exist, nothing to unbind\n if (!handlers) return;\n\n // If no listener was provided, remove all listeners for type\n if (!fn) {\n removeType(type);\n return;\n }\n\n // We're only removing a single handler\n if (fn.guid) {\n for (let n = 0; n < handlers.length; n++) {\n if (handlers[n].guid === fn.guid) {\n handlers.splice(n--, 1);\n }\n }\n }\n\n _cleanUpEvents(elem, type);\n}\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nexport function trigger(elem, event, hash) {\n // Fetches element data and a reference to the parent (for bubbling).\n // Don't want to add a data object to cache for every parent,\n // so checking hasElData first.\n var elemData = (Dom.hasElData(elem)) ? Dom.getElData(elem) : {};\n var parent = elem.parentNode || elem.ownerDocument;\n // type = event.type || event,\n // handler;\n\n // If an event name was passed as a string, creates an event out of it\n if (typeof event === 'string') {\n event = { type:event, target:elem };\n }\n // Normalizes the event properties.\n event = fixEvent(event);\n\n // If the passed element has a dispatcher, executes the established handlers.\n if (elemData.dispatcher) {\n elemData.dispatcher.call(elem, event, hash);\n }\n\n // Unless explicitly stopped or the event does not bubble (e.g. media events)\n // recursively calls this function to bubble the event up the DOM.\n if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n trigger.call(null, parent, event, hash);\n\n // If at the top of the DOM, triggers the default action unless disabled.\n } else if (!parent && !event.defaultPrevented) {\n var targetData = Dom.getElData(event.target);\n\n // Checks if the target has a default action for this event.\n if (event.target[event.type]) {\n // Temporarily disables event dispatching on the target as we have already executed the handler.\n targetData.disabled = true;\n // Executes the default action.\n if (typeof event.target[event.type] === 'function') {\n event.target[event.type]();\n }\n // Re-enables event dispatching.\n targetData.disabled = false;\n }\n }\n\n // Inform the triggerer if the default was prevented by returning false\n return !event.defaultPrevented;\n}\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nexport function one(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(one, elem, type, fn);\n }\n var func = function(){\n off(elem, type, func);\n fn.apply(this, arguments);\n };\n // copy the guid to the new function so it can removed using the original function's ID\n func.guid = fn.guid = fn.guid || Guid.newGUID();\n on(elem, type, func);\n}\n\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event Event object to fix\n * @return {Object}\n * @private\n * @method fixEvent\n */\nexport function fixEvent(event) {\n\n function returnTrue() { return true; }\n function returnFalse() { return false; }\n\n // Test if fixing up is needed\n // Used to check if !event.stopPropagation instead of isPropagationStopped\n // But native events return true for stopPropagation, but don't have\n // other expected methods like isPropagationStopped. Seems to be a problem\n // with the Javascript Ninja code. So we're just overriding all events now.\n if (!event || !event.isPropagationStopped) {\n var old = event || window.event;\n\n event = {};\n // Clone the old object so that we can modify the values event = {};\n // IE8 Doesn't like when you mess with native event properties\n // Firefox returns false for event.hasOwnProperty('type') and other props\n // which makes copying more difficult.\n // TODO: Probably best to create a whitelist of event props\n for (var key in old) {\n // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n // and webkitMovementX/Y\n if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' &&\n key !== 'webkitMovementX' && key !== 'webkitMovementY') {\n // Chrome 32+ warns if you try to copy deprecated returnValue, but\n // we still want to if preventDefault isn't supported (IE8).\n if (!(key === 'returnValue' && old.preventDefault)) {\n event[key] = old[key];\n }\n }\n }\n\n // The event occurred on this element\n if (!event.target) {\n event.target = event.srcElement || document;\n }\n\n // Handle which other element the event is related to\n if (!event.relatedTarget) {\n event.relatedTarget = event.fromElement === event.target ?\n event.toElement :\n event.fromElement;\n }\n\n // Stop the default browser action\n event.preventDefault = function () {\n if (old.preventDefault) {\n old.preventDefault();\n }\n event.returnValue = false;\n old.returnValue = false;\n event.defaultPrevented = true;\n };\n\n event.defaultPrevented = false;\n\n // Stop the event from bubbling\n event.stopPropagation = function () {\n if (old.stopPropagation) {\n old.stopPropagation();\n }\n event.cancelBubble = true;\n old.cancelBubble = true;\n event.isPropagationStopped = returnTrue;\n };\n\n event.isPropagationStopped = returnFalse;\n\n // Stop the event from bubbling and executing other handlers\n event.stopImmediatePropagation = function () {\n if (old.stopImmediatePropagation) {\n old.stopImmediatePropagation();\n }\n event.isImmediatePropagationStopped = returnTrue;\n event.stopPropagation();\n };\n\n event.isImmediatePropagationStopped = returnFalse;\n\n // Handle mouse position\n if (event.clientX != null) {\n var doc = document.documentElement, body = document.body;\n\n event.pageX = event.clientX +\n (doc && doc.scrollLeft || body && body.scrollLeft || 0) -\n (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = event.clientY +\n (doc && doc.scrollTop || body && body.scrollTop || 0) -\n (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // Handle key presses\n event.which = event.charCode || event.keyCode;\n\n // Fix button for mouse clicks:\n // 0 == left; 1 == middle; 2 == right\n if (event.button != null) {\n event.button = (event.button & 1 ? 0 :\n (event.button & 4 ? 1 :\n (event.button & 2 ? 2 : 0)));\n }\n }\n\n // Returns fixed-up instance\n return event;\n}\n\n/**\n * Clean up the listener cache and dispatchers\n*\n * @param {Element|Object} elem Element to clean up\n * @param {String} type Type of event to clean up\n * @private\n * @method _cleanUpEvents\n */\nfunction _cleanUpEvents(elem, type) {\n var data = Dom.getElData(elem);\n\n // Remove the events of a particular type if there are none left\n if (data.handlers[type].length === 0) {\n delete data.handlers[type];\n // data.handlers[type] = null;\n // Setting to null was causing an error with data.handlers\n\n // Remove the meta-handler from the element\n if (elem.removeEventListener) {\n elem.removeEventListener(type, data.dispatcher, false);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + type, data.dispatcher);\n }\n }\n\n // Remove the events object if there are no types left\n if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n delete data.handlers;\n delete data.dispatcher;\n delete data.disabled;\n }\n\n // Finally remove the element data if there is no data left\n if (Object.getOwnPropertyNames(data).length === 0) {\n Dom.removeElData(elem);\n }\n}\n\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn The event method we want to use.\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String} type Type of event to bind to.\n * @param {Function} callback Event listener.\n * @private\n * @function _handleMultipleEvents\n */\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n types.forEach(function(type) {\n //Call the event method for each one of the types\n fn(elem, type, callback);\n });\n}\n", + "/**\n * @file fn.js\n */\nimport { newGUID } from './guid.js';\n\n/**\n * Bind (a.k.a proxy or Context). A simple method for changing the context of a function\n * It also stores a unique id on the function so it can be easily removed from events\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n * @private\n * @method bind\n */\nexport const bind = function(context, fn, uid) {\n // Make sure the function has a unique ID\n if (!fn.guid) { fn.guid = newGUID(); }\n\n // Create the new function that changes the context\n let ret = function() {\n return fn.apply(context, arguments);\n };\n\n // Allow for the ability to individualize this function\n // Needed in the case where multiple objects might share the same prototype\n // IF both items add an event listener with the same function, then you try to remove just one\n // it will remove both because they both have the same guid.\n // when using this, you need to use the bind method when you remove the listener as well.\n // currently used in text tracks\n ret.guid = (uid) ? uid + '_' + fn.guid : fn.guid;\n\n return ret;\n};\n", + "/**\n * @file format-time.js\n *\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @private\n * @function formatTime\n */\nfunction formatTime(seconds, guide=seconds) {\n seconds = seconds < 0 ? 0 : seconds;\n let s = Math.floor(seconds % 60);\n let m = Math.floor(seconds / 60 % 60);\n let h = Math.floor(seconds / 3600);\n const gm = Math.floor(guide / 60 % 60);\n const gh = Math.floor(guide / 3600);\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-';\n }\n\n // Check if we need to show hours\n h = (h > 0 || gh > 0) ? h + ':' : '';\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = (((h || gm >= 10) && m < 10) ? '0' + m : m) + ':';\n\n // Check if leading zero is need for seconds\n s = (s < 10) ? '0' + s : s;\n\n return h + m + s;\n}\n\nexport default formatTime;\n", + "/**\n * @file guid.js\n *\n * Unique ID for an element or function\n * @type {Number}\n * @private\n */\nlet _guid = 1;\n\n/**\n * Get the next unique ID\n *\n * @return {String} \n * @function newGUID\n */\nexport function newGUID() {\n return _guid++;\n}\n", + "/**\n * @file log.js\n */\nimport window from 'global/window';\n\n/**\n * Log plain debug messages\n */\nconst log = function(){\n _logType(null, arguments);\n};\n\n/**\n * Keep a history of log messages\n * @type {Array}\n */\nlog.history = [];\n\n/**\n * Log error messages\n */\nlog.error = function(){\n _logType('error', arguments);\n};\n\n/**\n * Log warning messages\n */\nlog.warn = function(){\n _logType('warn', arguments);\n};\n\n/**\n * Log messages to the console and history based on the type of message\n *\n * @param {String} type The type of message, or `null` for `log`\n * @param {Object} args The args to be passed to the log\n * @private\n * @method _logType\n */\nfunction _logType(type, args){\n // convert args to an array to get array functions\n let argsArray = Array.prototype.slice.call(args);\n // if there's no console then don't try to output messages\n // they will still be stored in log.history\n // Was setting these once outside of this function, but containing them\n // in the function makes it easier to test cases where console doesn't exist\n let noop = function(){};\n\n let console = window['console'] || {\n 'log': noop,\n 'warn': noop,\n 'error': noop\n };\n\n if (type) {\n // add the type to the front of the message\n argsArray.unshift(type.toUpperCase()+':');\n } else {\n // default to log with no prefix\n type = 'log';\n }\n\n // add to history\n log.history.push(argsArray);\n\n // add console prefix after adding to history\n argsArray.unshift('VIDEOJS:');\n\n // call appropriate log function\n if (console[type].apply) {\n console[type].apply(console, argsArray);\n } else {\n // ie8 doesn't allow error.apply, but it will just join() the array anyway\n console[type](argsArray.join(' '));\n }\n}\n\nexport default log;\n", + "/**\n * @file merge-options.js\n */\nimport merge from 'lodash-compat/object/merge';\n\nfunction isPlain(obj) {\n return !!obj\n && typeof obj === 'object'\n && obj.toString() === '[object Object]'\n && obj.constructor === Object;\n}\n\n/**\n * Merge customizer. video.js simply overwrites non-simple objects\n * (like arrays) instead of attempting to overlay them.\n * @see https://lodash.com/docs#merge\n */\nconst customizer = function(destination, source) {\n // If we're not working with a plain object, copy the value as is\n // If source is an array, for instance, it will replace destination\n if (!isPlain(source)) {\n return source;\n }\n\n // If the new value is a plain object but the first object value is not\n // we need to create a new object for the first object to merge with.\n // This makes it consistent with how merge() works by default\n // and also protects from later changes the to first object affecting\n // the second object's values.\n if (!isPlain(destination)) {\n return mergeOptions(source);\n }\n};\n\n/**\n * Merge one or more options objects, recursively merging **only**\n * plain object properties. Previously `deepMerge`.\n *\n * @param {...Object} source One or more objects to merge\n * @returns {Object} a new object that is the union of all\n * provided objects\n * @function mergeOptions\n */\nexport default function mergeOptions() {\n // contruct the call dynamically to handle the variable number of\n // objects to merge\n let args = Array.prototype.slice.call(arguments);\n\n // unshift an empty object into the front of the call as the target\n // of the merge\n args.unshift({});\n\n // customize conflict resolution to match our historical merge behavior\n args.push(customizer);\n\n merge.apply(null, args);\n\n // return the mutated result object\n return args[0];\n}\n", + "import document from 'global/document';\n\nexport let createStyleElement = function(className) {\n let style = document.createElement('style');\n style.className = className;\n\n return style;\n};\n\nexport let setTextContent = function(el, content) {\n if (el.styleSheet) {\n el.styleSheet.cssText = content;\n } else {\n el.textContent = content;\n }\n};\n", + "import log from './log.js';\n\n/**\n * @file time-ranges.js\n *\n * Should create a fake TimeRange object\n * Mimics an HTML5 time range instance, which has functions that\n * return the start and end times for a range\n * TimeRanges are returned by the buffered() method\n *\n * @param {(Number|Array)} Start of a single range or an array of ranges\n * @param {Number} End of a single range\n * @private\n * @method createTimeRanges\n */\nexport function createTimeRanges(start, end){\n if (Array.isArray(start)) {\n return createTimeRangesObj(start);\n } else if (start === undefined || end === undefined) {\n return createTimeRangesObj();\n }\n return createTimeRangesObj([[start, end]]);\n}\n\nexport { createTimeRanges as createTimeRange };\n\nfunction createTimeRangesObj(ranges){\n if (ranges === undefined || ranges.length === 0) {\n return {\n length: 0,\n start: function() {\n throw new Error('This TimeRanges object is empty');\n },\n end: function() {\n throw new Error('This TimeRanges object is empty');\n }\n };\n }\n return {\n length: ranges.length,\n start: getRange.bind(null, 'start', 0, ranges),\n end: getRange.bind(null, 'end', 1, ranges)\n };\n}\n\nfunction getRange(fnName, valueIndex, ranges, rangeIndex){\n if (rangeIndex === undefined) {\n log.warn(`DEPRECATED: Function '${fnName}' on 'TimeRanges' called without an index argument.`);\n rangeIndex = 0;\n }\n rangeCheck(fnName, rangeIndex, ranges.length - 1);\n return ranges[rangeIndex][valueIndex];\n}\n\nfunction rangeCheck(fnName, index, maxIndex){\n if (index < 0 || index > maxIndex) {\n throw new Error(`Failed to execute '${fnName}' on 'TimeRanges': The index provided (${index}) is greater than or equal to the maximum bound (${maxIndex}).`);\n }\n}\n", + "/**\n * @file to-title-case.js\n *\n * Uppercase the first letter of a string\n *\n * @param {String} string String to be uppercased\n * @return {String}\n * @private\n * @method toTitleCase\n */\nfunction toTitleCase(string){\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport default toTitleCase;\n", + "/**\n * @file url.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nexport const parseUrl = function(url) {\n const props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];\n\n // add the url to an anchor and let the browser parse the URL\n let a = document.createElement('a');\n a.href = url;\n\n // IE8 (and 9?) Fix\n // ie8 doesn't parse the URL correctly until the anchor is actually\n // added to the body, and an innerHTML is needed to trigger the parsing\n let addToBody = (a.host === '' && a.protocol !== 'file:');\n let div;\n if (addToBody) {\n div = document.createElement('div');\n div.innerHTML = ``;\n a = div.firstChild;\n // prevent the div from affecting layout\n div.setAttribute('style', 'display:none; position:absolute;');\n document.body.appendChild(div);\n }\n\n // Copy the specific URL properties to a new object\n // This is also needed for IE8 because the anchor loses its\n // properties when it's removed from the dom\n let details = {};\n for (var i = 0; i < props.length; i++) {\n details[props[i]] = a[props[i]];\n }\n\n // IE9 adds the port to the host property unlike everyone else. If\n // a port identifier is added for standard ports, strip it.\n if (details.protocol === 'http:') {\n details.host = details.host.replace(/:80$/, '');\n }\n if (details.protocol === 'https:') {\n details.host = details.host.replace(/:443$/, '');\n }\n\n if (addToBody) {\n document.body.removeChild(div);\n }\n\n return details;\n};\n\n/**\n * Get absolute version of relative URL. Used to tell flash correct URL.\n * http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n *\n * @param {String} url URL to make absolute\n * @return {String} Absolute URL\n * @private\n * @method getAbsoluteURL\n */\nexport const getAbsoluteURL = function(url){\n // Check if absolute URL\n if (!url.match(/^https?:\\/\\//)) {\n // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\n let div = document.createElement('div');\n div.innerHTML = `x`;\n url = div.firstChild.href;\n }\n\n return url;\n};\n\n/**\n * Returns the extension of the passed file name. It will return an empty string if you pass an invalid path\n *\n * @param {String} path The fileName path like '/path/to/file.mp4'\n * @returns {String} The extension in lower case or an empty string if no extension could be found.\n * @method getFileExtension\n */\nexport const getFileExtension = function(path) {\n if(typeof path === 'string'){\n let splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/i;\n let pathParts = splitPathRe.exec(path);\n\n if (pathParts) {\n return pathParts.pop().toLowerCase();\n }\n }\n\n return '';\n};\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nexport const isCrossOrigin = function(url) {\n let winLoc = window.location;\n let urlInfo = parseUrl(url);\n\n // IE8 protocol relative urls will return ':' for protocol\n let srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;\n\n // Check if url is for another domain/origin\n // IE8 doesn't know location.origin, so we won't rely on it here\n let crossOrigin = (srcProtocol + urlInfo.host) !== (winLoc.protocol + winLoc.host);\n\n return crossOrigin;\n};\n", + "/**\n * @file video.js\n */\nimport window from 'global/window';\nimport document from 'global/document';\nimport * as setup from './setup';\nimport * as stylesheet from './utils/stylesheet.js';\nimport Component from './component';\nimport EventTarget from './event-target';\nimport * as Events from './utils/events.js';\nimport Player from './player';\nimport plugin from './plugins.js';\nimport mergeOptions from '../../src/js/utils/merge-options.js';\nimport * as Fn from './utils/fn.js';\nimport TextTrack from './tracks/text-track.js';\n\nimport assign from 'object.assign';\nimport { createTimeRanges } from './utils/time-ranges.js';\nimport formatTime from './utils/format-time.js';\nimport log from './utils/log.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\nimport * as Url from './utils/url.js';\nimport extendFn from './extend.js';\nimport merge from 'lodash-compat/object/merge';\nimport createDeprecationProxy from './utils/create-deprecation-proxy.js';\nimport xhr from 'xhr';\n\n// Include the built-in techs\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\nimport Flash from './tech/flash.js';\n\n// HTML5 Element Shim for IE8\nif (typeof HTMLVideoElement === 'undefined') {\n document.createElement('video');\n document.createElement('audio');\n document.createElement('track');\n}\n\n/**\n * Doubles as the main function for users to create a player instance and also\n * the main library object.\n * The `videojs` function can be used to initialize or retrieve a player.\n * ```js\n * var myPlayer = videojs('my_video_id');\n * ```\n *\n * @param {String|Element} id Video element or video element ID\n * @param {Object=} options Optional options object for config/settings\n * @param {Function=} ready Optional ready callback\n * @return {Player} A player instance\n * @mixes videojs\n * @method videojs\n */\nlet videojs = function(id, options, ready){\n let tag; // Element of ID\n\n // Allow for element or ID to be passed in\n // String ID\n if (typeof id === 'string') {\n\n // Adjust for jQuery ID syntax\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n // If a player instance has already been created for this ID return it.\n if (videojs.getPlayers()[id]) {\n\n // If options or ready funtion are passed, warn\n if (options) {\n log.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n }\n\n if (ready) {\n videojs.getPlayers()[id].ready(ready);\n }\n\n return videojs.getPlayers()[id];\n\n // Otherwise get element for ID\n } else {\n tag = Dom.getEl(id);\n }\n\n // ID is a media element\n } else {\n tag = id;\n }\n\n // Check for a useable element\n if (!tag || !tag.nodeName) { // re: nodeName, could be a box div also\n throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns\n }\n\n // Element may have a player attr referring to an already created player instance.\n // If not, set up a new player and return the instance.\n return tag['player'] || Player.players[tag.playerId] || new Player(tag, options, ready);\n};\n\n// Add default styles\nif (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n let style = Dom.$('.vjs-styles-defaults');\n\n if (!style) {\n style = stylesheet.createStyleElement('vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(style, head.firstChild);\n stylesheet.setTextContent(style, `\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n `);\n }\n}\n\n// Run Auto-load players\n// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version)\nsetup.autoSetupTimeout(1, videojs);\n\n/*\n * Current software version (semver)\n *\n * @type {String}\n */\nvideojs.VERSION = '__VERSION__';\n\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * ```js\n * videojs.options.autoplay = true\n * // -> all players will autoplay by default\n * ```\n *\n * @type {Object}\n */\nvideojs.options = Player.prototype.options_;\n\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object} The created players\n * @mixes videojs\n * @method getPlayers\n */\nvideojs.getPlayers = function() {\n return Player.players;\n};\n\n/**\n * For backward compatibility, expose players object.\n *\n * @deprecated\n * @memberOf videojs\n * @property {Object|Proxy} players\n */\nvideojs.players = createDeprecationProxy(Player.players, {\n get: 'Access to videojs.players is deprecated; use videojs.getPlayers instead',\n set: 'Modification of videojs.players is deprecated'\n});\n\n/**\n * Get a component class object by name\n * ```js\n * var VjsButton = videojs.getComponent('Button');\n * // Create a new instance of the component\n * var myButton = new VjsButton(myPlayer);\n * ```\n *\n * @return {Component} Component identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getComponent = Component.getComponent;\n\n/**\n * Register a component so it can referred to by name\n * Used when adding to other\n * components, either through addChild\n * `component.addChild('myComponent')`\n * or through default children options\n * `{ children: ['myComponent'] }`.\n * ```js\n * // Get a component to subclass\n * var VjsButton = videojs.getComponent('Button');\n * // Subclass the component (see 'extend' doc for more info)\n * var MySpecialButton = videojs.extend(VjsButton, {});\n * // Register the new component\n * VjsButton.registerComponent('MySepcialButton', MySepcialButton);\n * // (optionally) add the new component as a default player child\n * myPlayer.addChild('MySepcialButton');\n * ```\n * NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {String} The class name of the component\n * @param {Component} The component class\n * @return {Component} The newly registered component\n * @mixes videojs\n * @method registerComponent\n */\nvideojs.registerComponent = (name, comp) => {\n if (Tech.isTech(comp)) {\n log.warn(`The ${name} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`);\n }\n\n Component.registerComponent.call(Component, name, comp);\n};\n\n/**\n * Get a Tech class object by name\n * ```js\n * var Html5 = videojs.getTech('Html5');\n * // Create a new instance of the component\n * var html5 = new Html5(options);\n * ```\n *\n * @return {Tech} Tech identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getTech = Tech.getTech;\n\n/**\n * Register a Tech so it can referred to by name.\n * This is used in the tech order for the player.\n *\n * ```js\n * // get the Html5 Tech\n * var Html5 = videojs.getTech('Html5');\n * var MyTech = videojs.extend(Html5, {});\n * // Register the new Tech\n * VjsButton.registerTech('Tech', MyTech);\n * var player = videojs('myplayer', {\n * techOrder: ['myTech', 'html5']\n * });\n * ```\n *\n * @param {String} The class name of the tech\n * @param {Tech} The tech class\n * @return {Tech} The newly registered Tech\n * @mixes videojs\n * @method registerTech\n */\nvideojs.registerTech = Tech.registerTech;\n\n/**\n * A suite of browser and device tests\n *\n * @type {Object}\n * @private\n */\nvideojs.browser = browser;\n\n/**\n * Whether or not the browser supports touch events. Included for backward\n * compatibility with 4.x, but deprecated. Use `videojs.browser.TOUCH_ENABLED`\n * instead going forward.\n *\n * @deprecated\n * @type {Boolean}\n */\nvideojs.TOUCH_ENABLED = browser.TOUCH_ENABLED;\n\n/**\n * Subclass an existing class\n * Mimics ES6 subclassing with the `extend` keyword\n * ```js\n * // Create a basic javascript 'class'\n * function MyClass(name){\n * // Set a property at initialization\n * this.myName = name;\n * }\n * // Create an instance method\n * MyClass.prototype.sayMyName = function(){\n * alert(this.myName);\n * };\n * // Subclass the exisitng class and change the name\n * // when initializing\n * var MySubClass = videojs.extend(MyClass, {\n * constructor: function(name) {\n * // Call the super class constructor for the subclass\n * MyClass.call(this, name)\n * }\n * });\n * // Create an instance of the new sub class\n * var myInstance = new MySubClass('John');\n * myInstance.sayMyName(); // -> should alert \"John\"\n * ```\n *\n * @param {Function} The Class to subclass\n * @param {Object} An object including instace methods for the new class\n * Optionally including a `constructor` function\n * @return {Function} The newly created subclass\n * @mixes videojs\n * @method extend\n */\nvideojs.extend = extendFn;\n\n/**\n * Merge two options objects recursively\n * Performs a deep merge like lodash.merge but **only merges plain objects**\n * (not arrays, elements, anything else)\n * Other values will be copied directly from the second object.\n * ```js\n * var defaultOptions = {\n * foo: true,\n * bar: {\n * a: true,\n * b: [1,2,3]\n * }\n * };\n * var newOptions = {\n * foo: false,\n * bar: {\n * b: [4,5,6]\n * }\n * };\n * var result = videojs.mergeOptions(defaultOptions, newOptions);\n * // result.foo = false;\n * // result.bar.a = true;\n * // result.bar.b = [4,5,6];\n * ```\n *\n * @param {Object} defaults The options object whose values will be overriden\n * @param {Object} overrides The options object with values to override the first\n * @param {Object} etc Any number of additional options objects\n *\n * @return {Object} a new object with the merged values\n * @mixes videojs\n * @method mergeOptions\n */\nvideojs.mergeOptions = mergeOptions;\n\n/**\n * Change the context (this) of a function\n *\n * videojs.bind(newContext, function(){\n * this === newContext\n * });\n *\n * NOTE: as of v5.0 we require an ES5 shim, so you should use the native\n * `function(){}.bind(newContext);` instead of this.\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n */\nvideojs.bind = Fn.bind;\n\n/**\n * Create a Video.js player plugin\n * Plugins are only initialized when options for the plugin are included\n * in the player options, or the plugin function on the player instance is\n * called.\n * **See the plugin guide in the docs for a more detailed example**\n * ```js\n * // Make a plugin that alerts when the player plays\n * videojs.plugin('myPlugin', function(myPluginOptions) {\n * myPluginOptions = myPluginOptions || {};\n *\n * var player = this;\n * var alertText = myPluginOptions.text || 'Player is playing!'\n *\n * player.on('play', function(){\n * alert(alertText);\n * });\n * });\n * // USAGE EXAMPLES\n * // EXAMPLE 1: New player with plugin options, call plugin immediately\n * var player1 = videojs('idOne', {\n * myPlugin: {\n * text: 'Custom text!'\n * }\n * });\n * // Click play\n * // --> Should alert 'Custom text!'\n * // EXAMPLE 3: New player, initialize plugin later\n * var player3 = videojs('idThree');\n * // Click play\n * // --> NO ALERT\n * // Click pause\n * // Initialize plugin using the plugin function on the player instance\n * player3.myPlugin({\n * text: 'Plugin added later!'\n * });\n * // Click play\n * // --> Should alert 'Plugin added later!'\n * ```\n *\n * @param {String} name The plugin name\n * @param {Function} fn The plugin function that will be called with options\n * @mixes videojs\n * @method plugin\n */\nvideojs.plugin = plugin;\n\n/**\n * Adding languages so that they're available to all players.\n * ```js\n * videojs.addLanguage('es', { 'Hello': 'Hola' });\n * ```\n *\n * @param {String} code The language code or dictionary property\n * @param {Object} data The data values to be translated\n * @return {Object} The resulting language dictionary object\n * @mixes videojs\n * @method addLanguage\n */\nvideojs.addLanguage = function(code, data){\n code = ('' + code).toLowerCase();\n return merge(videojs.options.languages, { [code]: data })[code];\n};\n\n/**\n * Log debug messages.\n *\n * @param {...Object} messages One or more messages to log\n */\nvideojs.log = log;\n\n/**\n * Creates an emulated TimeRange object.\n *\n * @param {Number|Array} start Start time in seconds or an array of ranges\n * @param {Number} end End time in seconds\n * @return {Object} Fake TimeRange object\n * @method createTimeRange\n */\nvideojs.createTimeRange = videojs.createTimeRanges = createTimeRanges;\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @method formatTime\n */\nvideojs.formatTime = formatTime;\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nvideojs.parseUrl = Url.parseUrl;\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nvideojs.isCrossOrigin = Url.isCrossOrigin;\n\n/**\n * Event target class.\n *\n * @type {Function}\n */\nvideojs.EventTarget = EventTarget;\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nvideojs.on = Events.on;\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nvideojs.one = Events.one;\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nvideojs.off = Events.off;\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nvideojs.trigger = Events.trigger;\n\n/**\n * A cross-browser XMLHttpRequest wrapper. Here's a simple example:\n *\n * videojs.xhr({\n * body: someJSONString,\n * uri: \"/foo\",\n * headers: {\n * \"Content-Type\": \"application/json\"\n * }\n * }, function (err, resp, body) {\n * // check resp.statusCode\n * });\n *\n * Check out the [full\n * documentation](https://github.com/Raynos/xhr/blob/v2.1.0/README.md)\n * for more options.\n *\n * @param {Object} options settings for the request.\n * @return {XMLHttpRequest|XDomainRequest} the request object.\n * @see https://github.com/Raynos/xhr\n */\nvideojs.xhr = xhr;\n\n/**\n * TextTrack class\n *\n * @type {Function}\n */\nvideojs.TextTrack = TextTrack;\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @method isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isEl = Dom.isEl;\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @method isTextNode\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isTextNode = Dom.isTextNode;\n\n/**\n * Creates an element and applies properties.\n *\n * @method createEl\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n */\nvideojs.createEl = Dom.createEl;\n\n/**\n * Check if an element has a CSS class\n *\n * @method hasClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nvideojs.hasClass = Dom.hasElClass;\n\n/**\n * Add a CSS class name to an element\n *\n * @method addClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nvideojs.addClass = Dom.addElClass;\n\n/**\n * Remove a CSS class name from an element\n *\n * @method removeClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nvideojs.removeClass = Dom.removeElClass;\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @method toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nvideojs.toggleClass = Dom.toggleElClass;\n\n/**\n * Apply attributes to an HTML element.\n *\n * @method setAttributes\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n */\nvideojs.setAttributes = Dom.setElAttributes;\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @method getAttributes\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n */\nvideojs.getAttributes = Dom.getElAttributes;\n\n/**\n * Empties the contents of an element.\n *\n * @method emptyEl\n * @param {Element} el\n * @return {Element}\n */\nvideojs.emptyEl = Dom.emptyEl;\n\n/**\n * Normalizes and appends content to an element.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.appendContent = Dom.appendContent;\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.insertContent = Dom.insertContent;\n\n/*\n * Custom Universal Module Definition (UMD)\n *\n * Video.js will never be a non-browser lib so we can simplify UMD a bunch and\n * still support requirejs and browserify. This also needs to be closure\n * compiler compatible, so string keys are used.\n */\nif (typeof define === 'function' && define['amd']) {\n define('videojs', [], function(){ return videojs; });\n\n// checking that module is an object too because of umdjs/umd#35\n} else if (typeof exports === 'object' && typeof module === 'object') {\n module['exports'] = videojs;\n}\n\nexport default videojs;\n" + ] +} \ No newline at end of file diff --git a/vendor/assets/javascripts/videojs/video.min.js b/vendor/assets/javascripts/videojs/video.min.js new file mode 100755 index 00000000000..adc33b3168b --- /dev/null +++ b/vendor/assets/javascripts/videojs/video.min.js @@ -0,0 +1,23 @@ +/** + * @license + * Video.js 5.9.0 + * Copyright Brightcove, Inc. + * Available under Apache License Version 2.0 + * + * + * Includes vtt.js + * Available under Apache License Version 2.0 + * + */ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.videojs=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=a||a>b?i(s,n):r=setTimeout(j,a)}function k(){i(v,r)}function l(){if(m=arguments,p=e(),q=this,s=v&&(r||!w),u===!1)var c=w&&!r;else{n||w||(t=p);var d=u-(p-t),f=0>=d||d>u;f?(n&&(n=clearTimeout(n)),t=p,o=a.apply(q,m)):n||(n=setTimeout(k,d))}return f&&r?r=clearTimeout(r):r||b===u||(r=setTimeout(j,b)),c&&(f=!0,o=a.apply(q,m)),!f||r||n||(m=q=void 0),o}var m,n,o,p,q,r,s,t=0,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(f);if(b=0>b?0:+b||0,c===!0){var w=!0;v=!1}else d(c)&&(w=!!c.leading,u="maxWait"in c&&g(+c.maxWait||0,b),v="trailing"in c?!!c.trailing:v);return l.cancel=h,l}var d=a("../lang/isObject"),e=a("../date/now"),f="Expected a function",g=Math.max;b.exports=c},{"../date/now":4,"../lang/isObject":33}],6:[function(a,b){function c(a,b){if("function"!=typeof a)throw new TypeError(d);return b=e(void 0===b?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,f=e(c.length-b,0),g=Array(f);++d2?c[g-2]:void 0,i=g>2?c[2]:void 0,j=g>1?c[g-1]:void 0;for("function"==typeof h?(h=d(h,j,5),g-=2):(h="function"==typeof j?j:void 0,g-=h?1:0),i&&e(c[0],c[1],i)&&(h=3>g?void 0:h,g=1);++f-1&&a%1==0&&b>a}var d=/^\d+$/,e=9007199254740991;b.exports=c},{}],24:[function(a,b){function c(a,b,c){if(!f(c))return!1;var g=typeof b;if("number"==g?d(c)&&e(b,c.length):"string"==g&&b in c){var h=c[b];return a===a?a===h:h!==h}return!1}var d=a("./isArrayLike"),e=a("./isIndex"),f=a("../lang/isObject");b.exports=c},{"../lang/isObject":33,"./isArrayLike":21,"./isIndex":23}],25:[function(a,b){function c(a){return"number"==typeof a&&a>-1&&a%1==0&&d>=a}var d=9007199254740991;b.exports=c},{}],26:[function(a,b){function c(a){return!!a&&"object"==typeof a}b.exports=c},{}],27:[function(a,b){function c(a){for(var b=i(a),c=b.length,j=c&&a.length,l=!!j&&g(j)&&(e(a)||d(a)||h(a)),m=-1,n=[];++m0,r=l.enumErrorProps&&(a===w||a instanceof Error),t=l.enumPrototypes&&g(a);++d2?arguments[2]:{},g=c(b);e&&(g=g.concat(Object.getOwnPropertySymbols(b))),d(g,function(c){j(a,c,b[c],f[c])})};k.supportsDescriptors=!!i,b.exports=k},{foreach:47,"object-keys":50}],47:[function(a,b){var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString;b.exports=function(a,b,e){if("[object Function]"!==d.call(b))throw new TypeError("iterator must be a function");var f=a.length;if(f===+f)for(var g=0;f>g;g++)b.call(e,a[g],g,a);else for(var h in a)c.call(a,h)&&b.call(e,a[h],h,a)}},{}],48:[function(a,b){var c="Function.prototype.bind called on incompatible ",d=Array.prototype.slice,e=Object.prototype.toString,f="[object Function]";b.exports=function(a){var b=this;if("function"!=typeof b||e.call(b)!==f)throw new TypeError(c+b);for(var g,h=d.call(arguments,1),i=function(){if(this instanceof g){var c=b.apply(this,h.concat(d.call(arguments)));return Object(c)===c?c:this}return b.apply(a,h.concat(d.call(arguments)))},j=Math.max(0,b.length-h.length),k=[],l=0;j>l;l++)k.push("$"+l);if(g=Function("binder","return function ("+k.join(",")+"){ return binder.apply(this,arguments); }")(i),b.prototype){var m=function(){};m.prototype=b.prototype,g.prototype=new m,m.prototype=null}return g}},{}],49:[function(a,b){var c=a("./implementation");b.exports=Function.prototype.bind||c},{"./implementation":48}],50:[function(a,b){"use strict";var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString,e=Array.prototype.slice,f=a("./isArguments"),g=!{toString:null}.propertyIsEnumerable("toString"),h=function(){}.propertyIsEnumerable("prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],j=function(a){var b=a.constructor;return b&&b.prototype===a},k={$console:!0,$frame:!0,$frameElement:!0,$frames:!0,$parent:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},l=function(){if("undefined"==typeof window)return!1;for(var a in window)try{if(!k["$"+a]&&c.call(window,a)&&null!==window[a]&&"object"==typeof window[a])try{j(window[a])}catch(b){return!0}}catch(b){return!0}return!1}(),m=function(a){if("undefined"==typeof window||!l)return j(a);try{return j(a)}catch(b){return!1}},n=function(a){var b=null!==a&&"object"==typeof a,e="[object Function]"===d.call(a),j=f(a),k=b&&"[object String]"===d.call(a),l=[];if(!b&&!e&&!j)throw new TypeError("Object.keys called on a non-object");var n=h&&e;if(k&&a.length>0&&!c.call(a,0))for(var o=0;o0)for(var p=0;p=0&&"[object Function]"===c.call(a.callee)),d}},{}],52:[function(a,b){"use strict";var c=a("./implementation"),d=function(){if(!Object.assign)return!1;for(var a="abcdefghijklmnopqrst",b=a.split(""),c={},d=0;d0&&(o=setTimeout(function(){n=!0,k.abort("timeout");var a=new Error("XMLHttpRequest timeout");a.code="ETIMEDOUT",e(a)},a.timeout)),k.setRequestHeader)for(m in s)s.hasOwnProperty(m)&&k.setRequestHeader(m,s[m]);else if(a.headers&&!d(a.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(k.responseType=a.responseType),"beforeSend"in a&&"function"==typeof a.beforeSend&&a.beforeSend(k),k.send(r),k}function h(){}var i=a("global/window"),j=a("once"),k=a("is-function"),l=a("parse-headers"),m=a("xtend");b.exports=f,f.XMLHttpRequest=i.XMLHttpRequest||h,f.XDomainRequest="withCredentials"in new f.XMLHttpRequest?f.XMLHttpRequest:i.XDomainRequest,c(["get","put","post","patch","head","delete"],function(a){f["delete"===a?"del":a]=function(b,c,d){return c=e(b,c,d),c.method=a.toUpperCase(),g(c)}})},{"global/window":2,"is-function":57,once:58,"parse-headers":61,xtend:62}],57:[function(a,b){function c(a){var b=d.call(a);return"[object Function]"===b||"function"==typeof a&&"[object RegExp]"!==b||"undefined"!=typeof window&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}b.exports=c;var d=Object.prototype.toString},{}],58:[function(a,b){function c(a){var b=!1;return function(){return b?void 0:(b=!0,a.apply(this,arguments))}}b.exports=c,c.proto=c(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return c(this)},configurable:!0})})},{}],59:[function(a,b){function c(a,b,c){if(!g(b))throw new TypeError("iterator must be a function");arguments.length<3&&(c=this),"[object Array]"===h.call(a)?d(a,b,c):"string"==typeof a?e(a,b,c):f(a,b,c)}function d(a,b,c){for(var d=0,e=a.length;e>d;d++)i.call(a,d)&&b.call(c,a[d],d,a)}function e(a,b,c){for(var d=0,e=a.length;e>d;d++)b.call(c,a.charAt(d),d,a)}function f(a,b,c){for(var d in a)i.call(a,d)&&b.call(c,a[d],d,a)}var g=a("is-function");b.exports=c;var h=Object.prototype.toString,i=Object.prototype.hasOwnProperty},{"is-function":57}],60:[function(a,b,c){function d(a){return a.replace(/^\s*|\s*$/g,"")}c=b.exports=d,c.left=function(a){return a.replace(/^\s*/,"")},c.right=function(a){return a.replace(/\s*$/,"")}},{}],61:[function(a,b){var c=a("trim"),d=a("for-each"),e=function(a){return"[object Array]"===Object.prototype.toString.call(a)};b.exports=function(a){if(!a)return{};var b={};return d(c(a).split("\n"),function(a){var d=a.indexOf(":"),f=c(a.slice(0,d)).toLowerCase(),g=c(a.slice(d+1));"undefined"==typeof b[f]?b[f]=g:e(b[f])?b[f].push(g):b[f]=[b[f],g]}),b}},{"for-each":59,trim:60}],62:[function(a,b){function c(){for(var a={},b=0;b=0;a--)this.children_[a].dispose&&this.children_[a].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),j.removeElData(this.el_),this.el_=null},a.prototype.player=function(){return this.player_},a.prototype.options=function(a){return r["default"].warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),a?(this.options_=x["default"](this.options_,a),this.options_):this.options_},a.prototype.el=function(){return this.el_},a.prototype.createEl=function(a,b,c){return j.createEl(a,b,c)},a.prototype.localize=function(a){var b=this.player_.language&&this.player_.language(),c=this.player_.languages&&this.player_.languages();if(!b||!c)return a;var d=c[b];if(d&&d[a])return d[a];var e=b.split("-")[0],f=c[e];return f&&f[a]?f[a]:a},a.prototype.contentEl=function(){return this.contentEl_||this.el_},a.prototype.id=function(){return this.id_},a.prototype.name=function(){return this.name_},a.prototype.children=function(){return this.children_},a.prototype.getChildById=function(a){return this.childIndex_[a]},a.prototype.getChild=function(a){return this.childNameIndex_[a]},a.prototype.addChild=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?this.children_.length:arguments[2],e=void 0,f=void 0;if("string"==typeof b){f=b,c||(c={}),c===!0&&(r["default"].warn("Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`."),c={});var g=c.componentClass||t["default"](f);c.name=f;var h=a.getComponent(g);if(!h)throw new Error("Component "+g+" does not exist");if("function"!=typeof h)return null;e=new h(this.player_||this,c)}else e=b;if(this.children_.splice(d,0,e),"function"==typeof e.id&&(this.childIndex_[e.id()]=e),f=f||e.name&&e.name(),f&&(this.childNameIndex_[f]=e),"function"==typeof e.el&&e.el()){var i=this.contentEl().children,j=i[d]||null;this.contentEl().insertBefore(e.el(),j)}return e},a.prototype.removeChild=function(a){if("string"==typeof a&&(a=this.getChild(a)),a&&this.children_){for(var b=!1,c=this.children_.length-1;c>=0;c--)if(this.children_[c]===a){b=!0,this.children_.splice(c,1);break}if(b){this.childIndex_[a.id()]=null,this.childNameIndex_[a.name()]=null;var d=a.el();d&&d.parentNode===this.contentEl()&&this.contentEl().removeChild(a.el())}}},a.prototype.initChildren=function(){var b=this,c=this.options_.children;c&&!function(){var d=b.options_,e=function(a){var c=a.name,e=a.opts;if(void 0!==d[c]&&(e=d[c]),e!==!1){e===!0&&(e={}),e.playerOptions=b.options_.playerOptions;var f=b.addChild(c,e);f&&(b[c]=f)}},f=void 0,g=a.getComponent("Tech");f=Array.isArray(c)?c:Object.keys(c),f.concat(Object.keys(b.options_).filter(function(a){return!f.some(function(b){return"string"==typeof b?a===b:a===b.name})})).map(function(a){var d=void 0,e=void 0;return"string"==typeof a?(d=a,e=c[d]||b.options_[d]||{}):(d=a.name,e=a),{name:d,opts:e}}).filter(function(b){var c=a.getComponent(b.opts.componentClass||t["default"](b.name));return c&&!g.isTech(c)}).forEach(e)}()},a.prototype.buildCSSClass=function(){return""},a.prototype.on=function(a,b,c){var d=this;return"string"==typeof a||Array.isArray(a)?p.on(this.el_,a,l.bind(this,b)):!function(){var e=a,f=b,g=l.bind(d,c),h=function(){return d.off(e,f,g)};h.guid=g.guid,d.on("dispose",h);var i=function(){return d.off("dispose",h)};i.guid=g.guid,a.nodeName?(p.on(e,f,g),p.on(e,"dispose",i)):"function"==typeof a.on&&(e.on(f,g),e.on("dispose",i))}(),this},a.prototype.off=function(a,b,c){if(!a||"string"==typeof a||Array.isArray(a))p.off(this.el_,a,b);else{var d=a,e=b,f=l.bind(this,c);this.off("dispose",f),a.nodeName?(p.off(d,e,f),p.off(d,"dispose",f)):(d.off(e,f),d.off("dispose",f))}return this},a.prototype.one=function(a,b,c){var d=this,e=arguments;return"string"==typeof a||Array.isArray(a)?p.one(this.el_,a,l.bind(this,b)):!function(){var f=a,g=b,h=l.bind(d,c),i=function j(){d.off(f,g,j),h.apply(null,e)};i.guid=h.guid,d.on(f,g,i)}(),this},a.prototype.trigger=function(a,b){return p.trigger(this.el_,a,b),this},a.prototype.ready=function(a){var b=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];return a&&(this.isReady_?b?a.call(this):this.setTimeout(a,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(a))),this},a.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var a=this.readyQueue_;this.readyQueue_=[],a&&a.length>0&&a.forEach(function(a){a.call(this)},this),this.trigger("ready")},1)},a.prototype.$=function(a,b){return j.$(a,b||this.contentEl())},a.prototype.$$=function(a,b){return j.$$(a,b||this.contentEl())},a.prototype.hasClass=function(a){return j.hasElClass(this.el_,a)},a.prototype.addClass=function(a){return j.addElClass(this.el_,a),this},a.prototype.removeClass=function(a){return j.removeElClass(this.el_,a),this},a.prototype.toggleClass=function(a,b){return j.toggleElClass(this.el_,a,b),this},a.prototype.show=function(){return this.removeClass("vjs-hidden"),this},a.prototype.hide=function(){return this.addClass("vjs-hidden"),this},a.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},a.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},a.prototype.width=function(a,b){return this.dimension("width",a,b)},a.prototype.height=function(a,b){return this.dimension("height",a,b)},a.prototype.dimensions=function(a,b){return this.width(a,!0).height(b)},a.prototype.dimension=function(a,b,c){if(void 0!==b)return(null===b||b!==b)&&(b=0),this.el_.style[a]=-1!==(""+b).indexOf("%")||-1!==(""+b).indexOf("px")?b:"auto"===b?"":b+"px",c||this.trigger("resize"),this;if(!this.el_)return 0;var d=this.el_.style[a],e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(this.el_["offset"+t["default"](a)],10)},a.prototype.currentDimension=function(a){var b=0;if("width"!==a&&"height"!==a)throw new Error("currentDimension only accepts width or height value");if("function"==typeof h["default"].getComputedStyle){var c=h["default"].getComputedStyle(this.el_);b=c.getPropertyValue(a)||c[a]}else if(this.el_.currentStyle){var d="offset"+t["default"](a);b=this.el_[d]}return b=parseFloat(b)},a.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},a.prototype.currentWidth=function(){return this.currentDimension("width")},a.prototype.currentHeight=function(){return this.currentDimension("height")},a.prototype.emitTapEvents=function(){var a=0,b=null,c=10,d=200,e=void 0;this.on("touchstart",function(c){1===c.touches.length&&(b=v["default"]({},c.touches[0]),a=(new Date).getTime(),e=!0)}),this.on("touchmove",function(a){if(a.touches.length>1)e=!1;else if(b){var d=a.touches[0].pageX-b.pageX,f=a.touches[0].pageY-b.pageY,g=Math.sqrt(d*d+f*f);g>c&&(e=!1)}});var f=function(){e=!1};this.on("touchleave",f),this.on("touchcancel",f),this.on("touchend",function(c){if(b=null,e===!0){var f=(new Date).getTime()-a;d>f&&(c.preventDefault(),this.trigger("tap"))}})},a.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var a=l.bind(this.player(),this.player().reportUserActivity),b=void 0;this.on("touchstart",function(){a(),this.clearInterval(b),b=this.setInterval(a,250)});var c=function(){a(),this.clearInterval(b)};this.on("touchmove",a),this.on("touchend",c),this.on("touchcancel",c)}},a.prototype.setTimeout=function(a,b){a=l.bind(this,a);var c=h["default"].setTimeout(a,b),d=function(){this.clearTimeout(c)};return d.guid="vjs-timeout-"+c,this.on("dispose",d),c},a.prototype.clearTimeout=function(a){h["default"].clearTimeout(a);var b=function(){};return b.guid="vjs-timeout-"+a,this.off("dispose",b),a},a.prototype.setInterval=function(a,b){a=l.bind(this,a);var c=h["default"].setInterval(a,b),d=function(){this.clearInterval(c)};return d.guid="vjs-interval-"+c,this.on("dispose",d),c},a.prototype.clearInterval=function(a){h["default"].clearInterval(a);var b=function(){};return b.guid="vjs-interval-"+a,this.off("dispose",b),a},a.registerComponent=function(b,c){return a.components_||(a.components_={}),a.components_[b]=c,c},a.getComponent=function(b){return a.components_&&a.components_[b]?a.components_[b]:h["default"]&&h["default"].videojs&&h["default"].videojs[b]?(r["default"].warn("The "+b+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),h["default"].videojs[b]):void 0},a.extend=function(b){b=b||{},r["default"].warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var c=b.init||b.init||this.prototype.init||this.prototype.init||function(){},d=function(){c.apply(this,arguments)};d.prototype=Object.create(this.prototype),d.prototype.constructor=d,d.extend=a.extend;for(var e in b)b.hasOwnProperty(e)&&(d.prototype[e]=b[e]);return d},a}();y.registerComponent("Component",y),c["default"]=y,b.exports=c["default"]},{"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/guid.js":138,"./utils/log.js":139,"./utils/merge-options.js":140,"./utils/to-title-case.js":143,"global/window":2,"object.assign":45}],68:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../component.js"),h=d(g),i=a("./play-toggle.js"),j=(d(i),a("./time-controls/current-time-display.js")),k=(d(j),a("./time-controls/duration-display.js")),l=(d(k),a("./time-controls/time-divider.js")),m=(d(l),a("./time-controls/remaining-time-display.js")),n=(d(m),a("./live-display.js")),o=(d(n),a("./progress-control/progress-control.js")),p=(d(o),a("./fullscreen-toggle.js")),q=(d(p),a("./volume-control/volume-control.js")),r=(d(q),a("./volume-menu-button.js")),s=(d(r),a("./mute-toggle.js")),t=(d(s),a("./text-track-controls/chapters-button.js")),u=(d(t),a("./text-track-controls/descriptions-button.js")),v=(d(u),a("./text-track-controls/subtitles-button.js")),w=(d(v),a("./text-track-controls/captions-button.js")),x=(d(w),a("./playback-rate-menu/playback-rate-menu-button.js")),y=(d(x),a("./spacer-controls/custom-control-spacer.js")),z=(d(y),function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},b}(h["default"]));z.prototype.options_={loadEvent:"play",children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","fullscreenToggle"]},h["default"].registerComponent("ControlBar",z),c["default"]=z,b.exports=c["default"]},{"../component.js":67,"./fullscreen-toggle.js":69,"./live-display.js":70,"./mute-toggle.js":71,"./play-toggle.js":72,"./playback-rate-menu/playback-rate-menu-button.js":73,"./progress-control/progress-control.js":78,"./spacer-controls/custom-control-spacer.js":81,"./text-track-controls/captions-button.js":84,"./text-track-controls/chapters-button.js":85,"./text-track-controls/descriptions-button.js":87,"./text-track-controls/subtitles-button.js":89,"./time-controls/current-time-display.js":92,"./time-controls/duration-display.js":93,"./time-controls/remaining-time-display.js":94,"./time-controls/time-divider.js":95,"./volume-control/volume-control.js":97,"./volume-menu-button.js":99}],69:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../button.js"),h=d(g),i=a("../component.js"),j=d(i),k=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.player_.isFullscreen()?(this.player_.exitFullscreen(),this.controlText("Fullscreen")):(this.player_.requestFullscreen(),this.controlText("Non-Fullscreen"))},b}(h["default"]);k.prototype.controlText_="Fullscreen",j["default"].registerComponent("FullscreenToggle",k),c["default"]=k,b.exports=c["default"]},{"../button.js":64,"../component.js":67}],70:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateShowing(),this.on(this.player(),"durationchange",this.updateShowing)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+""+this.localize("LIVE")},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateShowing=function(){this.player().duration()===1/0?this.show():this.hide()},b}(i["default"]);i["default"].registerComponent("LiveDisplay",l),c["default"]=l,b.exports=c["default"]},{"../component":67,"../utils/dom.js":134}],71:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../button"),i=e(h),j=a("../component"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"volumechange",this.update),c.tech_&&c.tech_.featuresVolumeControl===!1&&this.addClass("vjs-hidden"),this.on(c,"loadstart",function(){this.update(),c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.player_.muted(this.player_.muted()?!1:!0)},b.prototype.update=function(){var a=this.player_.volume(),b=3;0===a||this.player_.muted()?b=0:.33>a?b=1:.67>a&&(b=2);var c=this.player_.muted()?"Unmute":"Mute";this.controlText()!==c&&this.controlText(c);for(var d=0;4>d;d++)m.removeElClass(this.el_,"vjs-vol-"+d);m.addElClass(this.el_,"vjs-vol-"+b)},b}(i["default"]);n.prototype.controlText_="Mute",k["default"].registerComponent("MuteToggle",n),c["default"]=n,b.exports=c["default"]},{"../button":64,"../component":67,"../utils/dom.js":134}],72:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../button.js"),h=d(g),i=a("../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b),a.call(this,c,d),this.on(c,"play",this.handlePlay),this.on(c,"pause",this.handlePause)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-play-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},b.prototype.handlePlay=function(){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},b.prototype.handlePause=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},b}(h["default"]);k.prototype.controlText_="Play",j["default"].registerComponent("PlayToggle",k),c["default"]=k,b.exports=c["default"]},{"../button.js":64,"../component.js":67}],73:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-button.js"),i=e(h),j=a("../../menu/menu.js"),k=e(j),l=a("./playback-rate-menu-item.js"),m=e(l),n=a("../../component.js"),o=e(n),p=a("../../utils/dom.js"),q=d(p),r=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateVisibility(),this.updateLabel(),this.on(c,"loadstart",this.updateVisibility),this.on(c,"ratechange",this.updateLabel)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this);return this.labelEl_=q.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),b.appendChild(this.labelEl_),b},b.prototype.buildCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildCSSClass.call(this)},b.prototype.createMenu=function(){var a=new k["default"](this.player()),b=this.playbackRates();if(b)for(var c=b.length-1;c>=0;c--)a.addChild(new m["default"](this.player(),{rate:b[c]+"x"}));return a},b.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},b.prototype.handleClick=function(){for(var a=this.player().playbackRate(),b=this.playbackRates(),c=b[0],d=0;da){c=b[d];break}this.player().playbackRate(c)},b.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},b.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},b.prototype.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},b.prototype.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},b}(i["default"]);r.prototype.controlText_="Playback Rate",o["default"].registerComponent("PlaybackRateMenuButton",r),c["default"]=r,b.exports=c["default"]},{"../../component.js":67,"../../menu/menu-button.js":106,"../../menu/menu.js":108,"../../utils/dom.js":134,"./playback-rate-menu-item.js":74}],74:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../menu/menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b);var f=d.rate,g=parseFloat(f,10);d.label=f,d.selected=1===g,a.call(this,c,d),this.label=f,this.rate=g,this.on(c,"ratechange",this.update)}return f(b,a),b.prototype.handleClick=function(){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},b.prototype.update=function(){this.selected(this.player().playbackRate()===this.rate)},b}(h["default"]);k.prototype.contentElType="button",j["default"].registerComponent("PlaybackRateMenuItem",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"../../menu/menu-item.js":107}],75:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"progress",this.update)}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},b.prototype.update=function(){var a=this.player_.buffered(),b=this.player_.duration(),c=this.player_.bufferedEnd(),d=this.el_.children,e=function(a,b){var c=a/b||0;return 100*(c>=1?1:c)+"%"};this.el_.style.width=e(c,b);for(var f=0;fa.length;f--)this.el_.removeChild(d[f-1])},b}(i["default"]);i["default"].registerComponent("LoadProgressBar",l),c["default"]=l,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134}],76:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/dom.js"),m=d(l),n=a("../../utils/fn.js"),o=d(n),p=a("../../utils/format-time.js"),q=e(p),r=a("lodash-compat/function/throttle"),s=e(r),t=function(a){function b(c,d){var e=this;f(this,b),a.call(this,c,d),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&(this.tooltip=m.createEl("div",{className:"vjs-time-tooltip"}),this.el().appendChild(this.tooltip),this.addClass("vjs-keep-tooltips-inside")),this.update(0,0),c.on("ready",function(){e.on(c.controlBar.progressControl.el(),"mousemove",s["default"](o.bind(e,e.handleMouseMove),25))})}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},b.prototype.handleMouseMove=function(a){var b=this.player_.duration(),c=this.calculateDistance(a)*b,d=a.pageX-m.findElPosition(this.el().parentNode).left;this.update(c,d)},b.prototype.update=function(a,b){var c=q["default"](a,this.player_.duration());if(this.el().style.left=b+"px",this.el().setAttribute("data-current-time",c),this.keepTooltipsInside){var d=this.clampPosition_(b),e=b-d+1,f=parseFloat(i["default"].getComputedStyle(this.tooltip).width),g=f/2;this.tooltip.innerHTML=c,this.tooltip.style.right="-"+(g-e)+"px"}},b.prototype.calculateDistance=function(a){return m.getPointerPosition(this.el().parentNode,a).x},b.prototype.clampPosition_=function(a){if(!this.keepTooltipsInside)return a;var b=parseFloat(i["default"].getComputedStyle(this.player().el()).width),c=parseFloat(i["default"].getComputedStyle(this.tooltip).width),d=c/2,e=a;return d>a?e=Math.ceil(d):a>b-d&&(e=Math.floor(b-d)),e},b}(k["default"]);k["default"].registerComponent("MouseTimeDisplay",t),c["default"]=t,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137,"global/window":2,"lodash-compat/function/throttle":7}],77:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/fn.js"),k=d(j),l=a("../../utils/dom.js"),m=(d(l),a("../../utils/format-time.js")),n=e(m),o=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateDataAttr(),this.on(c,"timeupdate",this.updateDataAttr),c.ready(k.bind(this,this.updateDataAttr)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&this.addClass("vjs-keep-tooltips-inside")}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},b.prototype.updateDataAttr=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("data-current-time",n["default"](a,this.player_.duration()))},b}(i["default"]);i["default"].registerComponent("PlayProgressBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137}],78:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=a("./seek-bar.js"),j=(d(i),a("./mouse-time-display.js")),k=(d(j),function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},b}(h["default"]));k.prototype.options_={children:["seekBar"]},h["default"].registerComponent("ProgressControl",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./mouse-time-display.js":76,"./seek-bar.js":79}],79:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0, +configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("../../slider/slider.js"),k=e(j),l=a("../../component.js"),m=e(l),n=a("./load-progress-bar.js"),o=(e(n),a("./play-progress-bar.js")),p=(e(o),a("./tooltip-progress-bar.js")),q=(e(p),a("../../utils/fn.js")),r=d(q),s=a("../../utils/format-time.js"),t=e(s),u=a("object.assign"),v=(e(u),function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.updateProgress),this.on(c,"ended",this.updateProgress),c.ready(r.bind(this,this.updateProgress)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&(this.tooltipProgressBar=this.addChild("TooltipProgressBar"))}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},b.prototype.updateProgress=function(){if(this.updateAriaAttributes(this.el_),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.el_),this.tooltipProgressBar.el_.style.width=this.bar.el_.style.width;var a=parseFloat(i["default"].getComputedStyle(this.player().el()).width),b=parseFloat(i["default"].getComputedStyle(this.tooltipProgressBar.tooltip).width),c=this.tooltipProgressBar.el().style;c.maxWidth=Math.floor(a-b/2)+"px",c.minWidth=Math.ceil(b/2)+"px",c.right="-"+b/2+"px"}},b.prototype.updateAriaAttributes=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),a.setAttribute("aria-valuetext",t["default"](b,this.player_.duration()))},b.prototype.getPercent=function(){var a=this.player_.currentTime()/this.player_.duration();return a>=1?1:a},b.prototype.handleMouseDown=function(b){a.prototype.handleMouseDown.call(this,b),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause()},b.prototype.handleMouseMove=function(a){var b=this.calculateDistance(a)*this.player_.duration();b===this.player_.duration()&&(b-=.1),this.player_.currentTime(b)},b.prototype.handleMouseUp=function(b){a.prototype.handleMouseUp.call(this,b),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()},b.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},b.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},b}(k["default"]));v.prototype.options_={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},v.prototype.playerEvent="timeupdate",m["default"].registerComponent("SeekBar",v),c["default"]=v,b.exports=c["default"]},{"../../component.js":67,"../../slider/slider.js":116,"../../utils/fn.js":136,"../../utils/format-time.js":137,"./load-progress-bar.js":75,"./play-progress-bar.js":77,"./tooltip-progress-bar.js":80,"global/window":2,"object.assign":45}],80:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/fn.js"),k=d(j),l=a("../../utils/dom.js"),m=(d(l),a("../../utils/format-time.js")),n=e(m),o=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateDataAttr(),this.on(c,"timeupdate",this.updateDataAttr),c.ready(k.bind(this,this.updateDataAttr))}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar",innerHTML:'
    \n '+this.localize("Progress")+": 0%"});return this.tooltip=b.querySelector(".vjs-time-tooltip"),b},b.prototype.updateDataAttr=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),b=n["default"](a,this.player_.duration());this.el_.setAttribute("data-current-time",b),this.tooltip.innerHTML=b},b}(i["default"]);i["default"].registerComponent("TooltipProgressBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137}],81:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./spacer.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,{className:this.buildCSSClass()});return b.innerHTML=" ",b},b}(h["default"]);j["default"].registerComponent("CustomControlSpacer",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./spacer.js":82}],82:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b}(h["default"]);h["default"].registerComponent("Spacer",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":67}],83:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b),d.track={kind:d.kind,player:c,label:d.kind+" settings",selectable:!1,"default":!1,mode:"disabled"},d.selectable=!1,a.call(this,c,d),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+d.kind+" settings dialog")}return f(b,a),b.prototype.handleClick=function(){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").el_.focus()},b}(h["default"]);j["default"].registerComponent("CaptionSettingsMenuItem",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./text-track-menu-item.js":91}],84:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-button.js"),h=d(g),i=a("../../component.js"),j=d(i),k=a("./caption-settings-menu-item.js"),l=d(k),m=function(a){function b(c,d,f){e(this,b),a.call(this,c,d,f),this.el_.setAttribute("aria-label","Captions Menu")}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-captions-button "+a.prototype.buildCSSClass.call(this)},b.prototype.update=function(){var b=2;a.prototype.update.call(this),this.player().tech_&&this.player().tech_.featuresNativeTextTracks&&(b=1),this.items&&this.items.length>b?this.show():this.hide()},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||b.push(new l["default"](this.player_,{kind:this.kind_})),a.prototype.createItems.call(this,b)},b}(h["default"]);m.prototype.kind_="captions",m.prototype.controlText_="Captions",j["default"].registerComponent("CaptionsButton",m),c["default"]=m,b.exports=c["default"]},{"../../component.js":67,"./caption-settings-menu-item.js":83,"./text-track-button.js":90}],85:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./text-track-button.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("./text-track-menu-item.js"),m=e(l),n=a("./chapters-track-menu-item.js"),o=e(n),p=a("../../menu/menu.js"),q=e(p),r=a("../../utils/dom.js"),s=d(r),t=a("../../utils/fn.js"),u=(d(t),a("../../utils/to-title-case.js")),v=e(u),w=a("global/window"),x=(e(w),function(a){function b(c,d,e){f(this,b),a.call(this,c,d,e),this.el_.setAttribute("aria-label","Chapters Menu")}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-chapters-button "+a.prototype.buildCSSClass.call(this)},b.prototype.createItems=function(){var a=[],b=this.player_.textTracks();if(!b)return a;for(var c=0;ce;e++){var g=b[e];if(g.kind===this.kind_){c=g;break}}var h=this.menu;if(void 0===h){h=new q["default"](this.player_);var i=s.createEl("li",{className:"vjs-menu-title",innerHTML:v["default"](this.kind_),tabIndex:-1});h.children_.unshift(i),s.insertElFirst(i,h.contentEl())}if(c&&null==c.cues){c.mode="hidden";var j=this.player_.remoteTextTrackEls().getTrackElementByTrack_(c);j&&j.addEventListener("load",function(){return a.update()})}if(c&&c.cues&&c.cues.length>0){for(var k=c.cues,l=void 0,e=0,m=k.length;m>e;e++){l=k[e];var n=new o["default"](this.player_,{track:c,cue:l});d.push(n),h.addChild(n)}this.addChild(h)}return this.items.length>0&&this.show(),h},b}(i["default"]));x.prototype.kind_="chapters",x.prototype.controlText_="Chapters",k["default"].registerComponent("ChaptersButton",x),c["default"]=x,b.exports=c["default"]},{"../../component.js":67,"../../menu/menu.js":108,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/to-title-case.js":143,"./chapters-track-menu-item.js":86,"./text-track-button.js":90,"./text-track-menu-item.js":91,"global/window":2}],86:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-item.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=function(a){function b(c,d){f(this,b);var e=d.track,g=d.cue,h=c.currentTime();d.label=g.text,d.selected=g.startTime<=h&&hc;c++){var e=a[c];if(e.kind!==this.kind_&&"showing"===e.mode){b=!0;break}}b?this.disable():this.enable()},b.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildCSSClass.call(this)},b}(i["default"]);n.prototype.kind_="descriptions",n.prototype.controlText_="Descriptions",k["default"].registerComponent("DescriptionsButton",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":67,"../../utils/fn.js":136,"./text-track-button.js":90}],88:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b),d.track={kind:d.kind,player:c,label:d.kind+" off","default":!1,mode:"disabled"},d.selectable=!0,a.call(this,c,d),this.selected(!0)}return f(b,a),b.prototype.handleTracksChange=function(){for(var a=this.player().textTracks(),b=!0,c=0,d=a.length;d>c;c++){var e=a[c];if(e.kind===this.track.kind&&"showing"===e.mode){b=!1;break}}this.selected(b)},b}(h["default"]);j["default"].registerComponent("OffTextTrackMenuItem",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./text-track-menu-item.js":91}],89:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-button.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d,f){e(this,b),a.call(this,c,d,f),this.el_.setAttribute("aria-label","Subtitles Menu")}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+a.prototype.buildCSSClass.call(this)},b}(h["default"]);k.prototype.kind_="subtitles",k.prototype.controlText_="Subtitles",j["default"].registerComponent("SubtitlesButton",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./text-track-button.js":90}],90:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-button.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=a("./text-track-menu-item.js"),o=e(n),p=a("./off-text-track-menu-item.js"),q=e(p),r=function(a){function b(c,d){f(this,b),a.call(this,c,d);var e=this.player_.textTracks();if(this.items.length<=1&&this.hide(),e){var g=m.bind(this,this.update);e.addEventListener("removetrack",g),e.addEventListener("addtrack",g),this.player_.on("dispose",function(){e.removeEventListener("removetrack",g),e.removeEventListener("addtrack",g)})}}return g(b,a),b.prototype.createItems=function(){var a=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];a.push(new q["default"](this.player_,{kind:this.kind_}));var b=this.player_.textTracks();if(!b)return a;for(var c=0;cCurrent Time 0:00'},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),b=this.localize("Current Time"),c=m["default"](a,this.player_.duration());c!==this.formattedTime_&&(this.formattedTime_=c,this.contentEl_.innerHTML=''+b+" "+c)},b}(i["default"]);i["default"].registerComponent("CurrentTimeDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],93:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=a("../../utils/format-time.js"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.updateContent),this.on(c,"loadedmetadata",this.updateContent)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){var a=this.player_.duration();if(a&&this.duration_!==a){this.duration_=a;var b=this.localize("Duration Time"),c=m["default"](a);this.contentEl_.innerHTML=''+b+" "+c}},b}(i["default"]);i["default"].registerComponent("DurationDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],94:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=a("../../utils/format-time.js"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.updateContent)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){if(this.player_.duration()){var a=this.localize("Remaining Time"),b=m["default"](this.player_.remainingTime());b!==this.formattedTime_&&(this.formattedTime_=b,this.contentEl_.innerHTML=''+a+" -"+b)}},b}(i["default"]);i["default"].registerComponent("RemainingTimeDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],95:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
    /
    "})},b}(h["default"]);h["default"].registerComponent("TimeDivider",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":67}],96:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../slider/slider.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=a("./volume-level.js"),o=(e(n),function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"volumechange",this.updateARIAAttributes),c.ready(m.bind(this,this.updateARIAAttributes))}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},b.prototype.handleMouseMove=function(a){this.checkMuted(),this.player_.volume(this.calculateDistance(a))},b.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},b.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},b.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},b.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},b.prototype.updateARIAAttributes=function(){var a=(100*this.player_.volume()).toFixed(2);this.el_.setAttribute("aria-valuenow",a),this.el_.setAttribute("aria-valuetext",a+"%")},b}(i["default"]));o.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},o.prototype.playerEvent="volumechange",k["default"].registerComponent("VolumeBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":67,"../../slider/slider.js":116,"../../utils/fn.js":136,"./volume-level.js":98}],97:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=a("./volume-bar.js"),j=(d(i),function(a){function b(c,d){e(this,b),a.call(this,c,d),c.tech_&&c.tech_.featuresVolumeControl===!1&&this.addClass("vjs-hidden"),this.on(c,"loadstart",function(){c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},b}(h["default"]));j.prototype.options_={children:["volumeBar"]},h["default"].registerComponent("VolumeControl",j),c["default"]=j,b.exports=c["default"]},{"../../component.js":67,"./volume-bar.js":96}],98:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},b}(h["default"]);h["default"].registerComponent("VolumeLevel",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":67}],99:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function"); + +}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../utils/fn.js"),i=e(h),j=a("../component.js"),k=d(j),l=a("../popup/popup.js"),m=d(l),n=a("../popup/popup-button.js"),o=d(n),p=a("./mute-toggle.js"),q=d(p),r=a("./volume-control/volume-bar.js"),s=d(r),t=function(a){function b(c){function d(){c.tech_&&c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),void 0===e.inline&&(e.inline=!0),void 0===e.vertical&&(e.vertical=e.inline?!1:!0),e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=!!e.vertical,a.call(this,c,e),this.on(c,"volumechange",this.volumeUpdate),this.on(c,"loadstart",this.volumeUpdate),d.call(this),this.on(c,"loadstart",d),this.on(this.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")}),this.on(this.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")}),this.on(this.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")}),this.on(this.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")})}return g(b,a),b.prototype.buildCSSClass=function(){var b="";return b=this.options_.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+a.prototype.buildCSSClass.call(this)+" "+b},b.prototype.createPopup=function(){var a=new m["default"](this.player_,{contentElType:"div"}),b=new s["default"](this.player_,this.options_.volumeBar);return a.addChild(b),this.menuContent=a,this.volumeBar=b,this.attachVolumeBarEvents(),a},b.prototype.handleClick=function(){q["default"].prototype.handleClick.call(this),a.prototype.handleClick.call(this)},b.prototype.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],i.bind(this,this.handleMouseDown))},b.prototype.handleMouseDown=function(){this.on(["mousemove","touchmove"],i.bind(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.el_.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},b.prototype.handleMouseUp=function(){this.off(["mousemove","touchmove"],i.bind(this.volumeBar,this.volumeBar.handleMouseMove))},b}(o["default"]);t.prototype.volumeUpdate=q["default"].prototype.update,t.prototype.controlText_="Mute",k["default"].registerComponent("VolumeMenuButton",t),c["default"]=t,b.exports=c["default"]},{"../component.js":67,"../popup/popup-button.js":112,"../popup/popup.js":113,"../utils/fn.js":136,"./mute-toggle.js":71,"./volume-control/volume-bar.js":96}],100:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component"),i=e(h),j=a("./modal-dialog"),k=e(j),l=a("./utils/dom"),m=(d(l),a("./utils/merge-options")),n=e(m),o=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"error",this.open)}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-error-display "+a.prototype.buildCSSClass.call(this)},b.prototype.content=function(){var a=this.player().error();return a?this.localize(a.message):""},b}(k["default"]);o.prototype.options_=n["default"](k["default"].prototype.options_,{fillAlways:!0,temporary:!1,uncloseable:!0}),i["default"].registerComponent("ErrorDisplay",o),c["default"]=o,b.exports=c["default"]},{"./component":67,"./modal-dialog":109,"./utils/dom":134,"./utils/merge-options":140}],101:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}c.__esModule=!0;var e=a("./utils/events.js"),f=d(e),g=function(){};g.prototype.allowedEvents_={},g.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=Function.prototype,f.on(this,a,b),this.addEventListener=c},g.prototype.addEventListener=g.prototype.on,g.prototype.off=function(a,b){f.off(this,a,b)},g.prototype.removeEventListener=g.prototype.off,g.prototype.one=function(a,b){f.one(this,a,b)},g.prototype.trigger=function(a){var b=a.type||a;"string"==typeof a&&(a={type:b}),a=f.fixEvent(a),this.allowedEvents_[b]&&this["on"+b]&&this["on"+b](a),f.trigger(this,a)},g.prototype.dispatchEvent=g.prototype.trigger,c["default"]=g,b.exports=c["default"]},{"./utils/events.js":135}],102:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("./utils/log"),f=d(e),g=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.super_=b)},h=function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=function(){a.apply(this,arguments)},d={};"object"==typeof b?("function"==typeof b.init&&(f["default"].warn("Constructor logic via init() is deprecated; please use constructor() instead."),b.constructor=b.init),b.constructor!==Object.prototype.constructor&&(c=b.constructor),d=b):"function"==typeof b&&(c=b),g(c,a);for(var e in d)d.hasOwnProperty(e)&&(c.prototype[e]=d[e]);return c};c["default"]=h,b.exports=c["default"]},{"./utils/log":139}],103:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;for(var e=a("global/document"),f=d(e),g={},h=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=h[0],j=void 0,k=0;k1&&this.show()},b.prototype.createMenu=function(){var a=new m["default"](this.player_);if(this.options_.title){var b=o.createEl("li",{className:"vjs-menu-title",innerHTML:s["default"](this.options_.title),tabIndex:-1});a.children_.unshift(b),o.insertElFirst(b,a.contentEl())}if(this.items=this.createItems(),this.items)for(var c=0;c0&&(0>a?a=0:a>=b.length&&(a=b.length-1),this.focusedChild_=a,b[a].el_.focus())},b}(i["default"]);i["default"].registerComponent("Menu",p),c["default"]=p,b.exports=c["default"]},{"../component.js":67,"../utils/dom.js":134,"../utils/events.js":135,"../utils/fn.js":136}],109:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./utils/dom"),i=e(h),j=a("./utils/fn"),k=e(j),l=a("./utils/log"),m=(d(l),a("./component")),n=d(m),o=a("./close-button"),p=(d(o),"vjs-modal-dialog"),q=27,r=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=i.createEl("div",{className:p+"-content"},{role:"document"}),this.descEl_=i.createEl("p",{className:p+"-description vjs-offscreen",id:this.el().getAttribute("aria-describedby")}),i.textContent(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},b.prototype.buildCSSClass=function(){return p+" vjs-hidden "+a.prototype.buildCSSClass.call(this)},b.prototype.handleKeyPress=function(a){a.which===q&&this.closeable()&&this.close()},b.prototype.label=function(){return this.options_.label||this.localize("Modal Window")},b.prototype.description=function(){var a=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(a+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),a},b.prototype.open=function(){if(!this.opened_){var a=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!a.paused(),this.wasPlaying_&&a.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",k.bind(this,this.handleKeyPress)),a.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}return this},b.prototype.opened=function(a){return"boolean"==typeof a&&this[a?"open":"close"](),this.opened_},b.prototype.close=function(){if(this.opened_){var a=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&a.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",k.bind(this,this.handleKeyPress)),a.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.options_.temporary&&this.dispose()}return this},b.prototype.closeable=function c(a){if("boolean"==typeof a){var c=this.closeable_=!!a,b=this.getChild("closeButton");if(c&&!b){var d=this.contentEl_;this.contentEl_=this.el_,b=this.addChild("closeButton"),this.contentEl_=d,this.on(b,"close",this.close)}!c&&b&&(this.off(b,"close",this.close),this.removeChild(b),b.dispose())}return this.closeable_},b.prototype.fill=function(){return this.fillWith(this.content())},b.prototype.fillWith=function(a){var b=this.contentEl(),c=b.parentNode,d=b.nextSibling;return this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,c.removeChild(b),this.empty(),i.insertContent(b,a),this.trigger("modalfill"),d?c.insertBefore(b,d):c.appendChild(b),this},b.prototype.empty=function(){return this.trigger("beforemodalempty"),i.emptyEl(this.contentEl()),this.trigger("modalempty"),this},b.prototype.content=function(a){return"undefined"!=typeof a&&(this.content_=a),this.content_},b}(n["default"]);r.prototype.options_={temporary:!0},n["default"].registerComponent("ModalDialog",r),c["default"]=r,b.exports=c["default"]},{"./close-button":66,"./component":67,"./utils/dom":134,"./utils/fn":136,"./utils/log":139}],110:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component.js"),i=e(h),j=a("global/document"),k=e(j),l=a("global/window"),m=e(l),n=a("./utils/events.js"),o=d(n),p=a("./utils/dom.js"),q=d(p),r=a("./utils/fn.js"),s=d(r),t=a("./utils/guid.js"),u=d(t),v=a("./utils/browser.js"),w=d(v),x=a("./utils/log.js"),y=e(x),z=a("./utils/to-title-case.js"),A=e(z),B=a("./utils/time-ranges.js"),C=a("./utils/buffer.js"),D=a("./utils/stylesheet.js"),E=d(D),F=a("./fullscreen-api.js"),G=e(F),H=a("./media-error.js"),I=e(H),J=a("safe-json-parse/tuple"),K=e(J),L=a("object.assign"),M=e(L),N=a("./utils/merge-options.js"),O=e(N),P=a("./tracks/text-track-list-converter.js"),Q=e(P),R=a("./tech/loader.js"),S=(e(R),a("./poster-image.js")),T=(e(S),a("./tracks/text-track-display.js")),U=(e(T),a("./loading-spinner.js")),V=(e(U),a("./big-play-button.js")),W=(e(V),a("./control-bar/control-bar.js")),X=(e(W),a("./error-display.js")),Y=(e(X),a("./tracks/text-track-settings.js")),Z=(e(Y),a("./modal-dialog")),$=e(Z),_=a("./tech/tech.js"),aa=e(_),ba=a("./tech/html5.js"),ca=(e(ba),function(a){function b(c,d,e){var g=this;if(f(this,b),c.id=c.id||"vjs_video_"+u.newGUID(),d=M["default"](b.getTagSettings(c),d),d.initChildren=!1,d.createEl=!1,d.reportTouchActivity=!1,a.call(this,null,d,e),!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");this.tag=c,this.tagAttributes=c&&q.getElAttributes(c),this.language(this.options_.language),d.languages?!function(){var a={};Object.getOwnPropertyNames(d.languages).forEach(function(b){a[b.toLowerCase()]=d.languages[b]}),g.languages_=a}():this.languages_=b.prototype.options_.languages,this.cache_={},this.poster_=d.poster||"",this.controls_=!!d.controls,c.controls=!1,this.scrubbing_=!1,this.el_=this.createEl();var h=O["default"](this.options_);d.plugins&&!function(){var a=d.plugins;Object.getOwnPropertyNames(a).forEach(function(b){"function"==typeof this[b]?this[b](a[b]):y["default"].error("Unable to find plugin:",b)},g)}(),this.options_.playerOptions=h,this.initChildren(),this.isAudio("audio"===c.nodeName.toLowerCase()),this.addClass(this.controls()?"vjs-controls-enabled":"vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label","audio player"):this.el_.setAttribute("aria-label","video player"),this.isAudio()&&this.addClass("vjs-audio"),this.flexNotSupported_()&&this.addClass("vjs-no-flex"),w.IS_IOS||this.addClass("vjs-workinghover"),b.players[this.id_]=this,this.userActive(!0),this.reportUserActivity(),this.listenForUserActivity_(),this.on("fullscreenchange",this.handleFullscreenChange_),this.on("stageclick",this.handleStageClick_)}return g(b,a),b.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_),b.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&this.tech_.dispose(),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var b=this.el_=a.prototype.createEl.call(this,"div"),c=this.tag;c.removeAttribute("width"),c.removeAttribute("height");var d=q.getElAttributes(c);if(Object.getOwnPropertyNames(d).forEach(function(a){"class"===a?b.className=d[a]:b.setAttribute(a,d[a])}),c.playerId=c.id,c.id+="_html5_api",c.className="vjs-tech",c.player=b.player=this,this.addClass("vjs-paused"),m["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=E.createStyleElement("vjs-styles-dimensions");var e=q.$(".vjs-styles-defaults"),f=q.$("head");f.insertBefore(this.styleEl_,e?e.nextSibling:f.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var g=c.getElementsByTagName("a"),h=0;h=0&&(c.width=a),b>=0&&(c.height=b)))}var d=void 0,e=void 0,f=void 0,g=void 0;f=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9";var h=f.split(":"),i=h[1]/h[0];d=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,e=void 0!==this.height_?this.height_:d*i,g=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(g),E.setTextContent(this.styleEl_,"\n ."+g+" {\n width: "+d+"px;\n height: "+e+"px;\n }\n\n ."+g+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")},b.prototype.loadTech_=function(a,b){this.tech_&&this.unloadTech_(),"Html5"!==a&&this.tag&&(aa["default"].getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=a,this.isReady_=!1;var c=M["default"]({nativeControlsForTouch:this.options_.nativeControlsForTouch,source:b,playerId:this.id(),techId:this.id()+"_"+a+"_api",textTracks:this.textTracks_,autoplay:this.options_.autoplay,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),"vtt.js":this.options_["vtt.js"]},this.options_[a.toLowerCase()]);this.tag&&(c.tag=this.tag),b&&(this.currentType_=b.type,b.src===this.cache_.src&&this.cache_.currentTime>0&&(c.startTime=this.cache_.currentTime),this.cache_.src=b.src);var d=aa["default"].getTech(a);d||(d=i["default"].getComponent(a)),this.tech_=new d(c),this.tech_.ready(s.bind(this,this.handleTechReady_),!0),Q["default"].jsonToTextTracks(this.textTracksJson_||[],this.tech_),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"progress",this.handleTechProgress_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"suspend",this.handleTechSuspend_),this.on(this.tech_,"abort",this.handleTechAbort_),this.on(this.tech_,"emptied",this.handleTechEmptied_),this.on(this.tech_,"stalled",this.handleTechStalled_),this.on(this.tech_,"loadedmetadata",this.handleTechLoadedMetaData_),this.on(this.tech_,"loadeddata",this.handleTechLoadedData_),this.on(this.tech_,"timeupdate",this.handleTechTimeUpdate_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.on(this.tech_,"volumechange",this.handleTechVolumeChange_),this.on(this.tech_,"texttrackchange",this.handleTechTextTrackChange_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===a&&this.tag||q.insertElFirst(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},b.prototype.unloadTech_=function(){this.textTracks_=this.textTracks(),this.textTracksJson_=Q["default"].textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},b.prototype.tech=function(a){if(a&&a.IWillNotUseThisInPlugins)return this.tech_;var b="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw m["default"].alert(b),new Error(b)},b.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},b.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},b.prototype.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),this.src()&&this.tag&&this.options_.autoplay&&this.paused()&&(delete this.tag.poster,this.play())},b.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},b.prototype.hasStarted=function(a){return void 0!==a?(this.hasStarted_!==a&&(this.hasStarted_=a,a?(this.addClass("vjs-has-started"), +this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_},b.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},b.prototype.handleTechWaiting_=function(){var a=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return a.removeClass("vjs-waiting")})},b.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},b.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},b.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},b.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},b.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},b.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&this.currentTime(this.options_.starttime),this.addClass("vjs-has-started"),this.trigger("firstplay")},b.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},b.prototype.handleTechProgress_=function(){this.trigger("progress")},b.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},b.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},b.prototype.handleTechClick_=function(a){0===a.button&&this.controls()&&(this.paused()?this.play():this.pause())},b.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},b.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},b.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},b.prototype.handleTechTouchEnd_=function(a){a.preventDefault()},b.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},b.prototype.handleStageClick_=function(){this.reportUserActivity()},b.prototype.handleTechFullscreenChange_=function(a,b){b&&this.isFullscreen(b.isFullscreen),this.trigger("fullscreenchange")},b.prototype.handleTechError_=function(){var a=this.tech_.error();this.error(a&&a.code)},b.prototype.handleTechSuspend_=function(){this.trigger("suspend")},b.prototype.handleTechAbort_=function(){this.trigger("abort")},b.prototype.handleTechEmptied_=function(){this.trigger("emptied")},b.prototype.handleTechStalled_=function(){this.trigger("stalled")},b.prototype.handleTechLoadedMetaData_=function(){this.trigger("loadedmetadata")},b.prototype.handleTechLoadedData_=function(){this.trigger("loadeddata")},b.prototype.handleTechTimeUpdate_=function(){this.trigger("timeupdate")},b.prototype.handleTechRateChange_=function(){this.trigger("ratechange")},b.prototype.handleTechVolumeChange_=function(){this.trigger("volumechange")},b.prototype.handleTechTextTrackChange_=function(){this.trigger("texttrackchange")},b.prototype.getCache=function(){return this.cache_},b.prototype.techCall_=function(a,b){if(this.tech_&&!this.tech_.isReady_)this.tech_.ready(function(){this[a](b)},!0);else try{this.tech_[a](b)}catch(c){throw y["default"](c),c}},b.prototype.techGet_=function(a){if(this.tech_&&this.tech_.isReady_)try{return this.tech_[a]()}catch(b){throw void 0===this.tech_[a]?y["default"]("Video.js: "+a+" method not defined for "+this.techName_+" playback technology.",b):"TypeError"===b.name?(y["default"]("Video.js: "+a+" unavailable on "+this.techName_+" playback technology element.",b),this.tech_.isReady_=!1):y["default"](b),b}},b.prototype.play=function(){return this.techCall_("play"),this},b.prototype.pause=function(){return this.techCall_("pause"),this},b.prototype.paused=function(){return this.techGet_("paused")===!1?!1:!0},b.prototype.scrubbing=function(a){return void 0!==a?(this.scrubbing_=!!a,a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_},b.prototype.currentTime=function(a){return void 0!==a?(this.techCall_("setCurrentTime",a),this):this.cache_.currentTime=this.techGet_("currentTime")||0},b.prototype.duration=function(a){return void 0===a?this.cache_.duration||0:(a=parseFloat(a)||0,0>a&&(a=1/0),a!==this.cache_.duration&&(this.cache_.duration=a,a===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},b.prototype.remainingTime=function(){return this.duration()-this.currentTime()},b.prototype.buffered=function c(){var c=this.techGet_("buffered");return c&&c.length||(c=B.createTimeRange(0,0)),c},b.prototype.bufferedPercent=function(){return C.bufferedPercent(this.buffered(),this.duration())},b.prototype.bufferedEnd=function(){var a=this.buffered(),b=this.duration(),c=a.end(a.length-1);return c>b&&(c=b),c},b.prototype.volume=function(a){var b=void 0;return void 0!==a?(b=Math.max(0,Math.min(1,parseFloat(a))),this.cache_.volume=b,this.techCall_("setVolume",b),this):(b=parseFloat(this.techGet_("volume")),isNaN(b)?1:b)},b.prototype.muted=function(a){return void 0!==a?(this.techCall_("setMuted",a),this):this.techGet_("muted")||!1},b.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},b.prototype.isFullscreen=function(a){return void 0!==a?(this.isFullscreen_=!!a,this):!!this.isFullscreen_},b.prototype.requestFullscreen=function(){var a=G["default"];return this.isFullscreen(!0),a.requestFullscreen?(o.on(k["default"],a.fullscreenchange,s.bind(this,function b(){this.isFullscreen(k["default"][a.fullscreenElement]),this.isFullscreen()===!1&&o.off(k["default"],a.fullscreenchange,b),this.trigger("fullscreenchange")})),this.el_[a.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},b.prototype.exitFullscreen=function(){var a=G["default"];return this.isFullscreen(!1),a.requestFullscreen?k["default"][a.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},b.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=k["default"].documentElement.style.overflow,o.on(k["default"],"keydown",s.bind(this,this.fullWindowOnEscKey)),k["default"].documentElement.style.overflow="hidden",q.addElClass(k["default"].body,"vjs-full-window"),this.trigger("enterFullWindow")},b.prototype.fullWindowOnEscKey=function(a){27===a.keyCode&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},b.prototype.exitFullWindow=function(){this.isFullWindow=!1,o.off(k["default"],"keydown",this.fullWindowOnEscKey),k["default"].documentElement.style.overflow=this.docOrigOverflow,q.removeElClass(k["default"].body,"vjs-full-window"),this.trigger("exitFullWindow")},b.prototype.canPlayType=function(a){for(var b=void 0,c=0,d=this.options_.techOrder;c0&&(h=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},a))}},250)}},b.prototype.playbackRate=function(a){return void 0!==a?(this.techCall_("setPlaybackRate",a),this):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},b.prototype.isAudio=function(a){return void 0!==a?(this.isAudio_=!!a,this):!!this.isAudio_},b.prototype.networkState=function(){return this.techGet_("networkState")},b.prototype.readyState=function(){return this.techGet_("readyState")},b.prototype.textTracks=function(){return this.tech_&&this.tech_.textTracks()},b.prototype.remoteTextTracks=function(){return this.tech_&&this.tech_.remoteTextTracks()},b.prototype.remoteTextTrackEls=function(){return this.tech_&&this.tech_.remoteTextTrackEls()},b.prototype.addTextTrack=function(a,b,c){return this.tech_&&this.tech_.addTextTrack(a,b,c)},b.prototype.addRemoteTextTrack=function(a){return this.tech_&&this.tech_.addRemoteTextTrack(a)},b.prototype.removeRemoteTextTrack=function(a){this.tech_&&this.tech_.removeRemoteTextTrack(a)},b.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},b.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},b.prototype.language=function(a){return void 0===a?this.language_:(this.language_=(""+a).toLowerCase(),this)},b.prototype.languages=function(){return O["default"](b.prototype.options_.languages,this.languages_)},b.prototype.toJSON=function(){var a=O["default"](this.options_),b=a.tracks;a.tracks=[];for(var c=0;ci;i++){var k=h[i],l=k.nodeName.toLowerCase();"source"===l?b.sources.push(q.getElAttributes(k)):"track"===l&&b.tracks.push(q.getElAttributes(k))}return b},b}(i["default"]));ca.players={};var da=m["default"].navigator;ca.prototype.options_={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:k["default"].getElementsByTagName("html")[0].getAttribute("lang")||da.languages&&da.languages[0]||da.userLanguage||da.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},ca.prototype.handleLoadedMetaData_,ca.prototype.handleLoadedData_,ca.prototype.handleUserActive_,ca.prototype.handleUserInactive_,ca.prototype.handleTimeUpdate_,ca.prototype.handleTechEnded_,ca.prototype.handleVolumeChange_,ca.prototype.handleError_,ca.prototype.flexNotSupported_=function(){var a=k["default"].createElement("i");return!("flexBasis"in a.style||"webkitFlexBasis"in a.style||"mozFlexBasis"in a.style||"msFlexBasis"in a.style||"msFlexOrder"in a.style)},i["default"].registerComponent("Player",ca),c["default"]=ca,b.exports=c["default"]},{"./big-play-button.js":63,"./component.js":67,"./control-bar/control-bar.js":68,"./error-display.js":100,"./fullscreen-api.js":103,"./loading-spinner.js":104,"./media-error.js":105,"./modal-dialog":109,"./poster-image.js":114,"./tech/html5.js":119,"./tech/loader.js":120,"./tech/tech.js":121,"./tracks/text-track-display.js":125,"./tracks/text-track-list-converter.js":127,"./tracks/text-track-settings.js":129,"./utils/browser.js":131,"./utils/buffer.js":132,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/guid.js":138,"./utils/log.js":139,"./utils/merge-options.js":140,"./utils/stylesheet.js":141,"./utils/time-ranges.js":142,"./utils/to-title-case.js":143,"global/document":1,"global/window":2,"object.assign":45,"safe-json-parse/tuple":54}],111:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("./player.js"),f=d(e),g=function(a,b){f["default"].prototype[a]=b};c["default"]=g,b.exports=c["default"]},{"./player.js":110}],112:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../clickable-component.js"),i=e(h),j=a("../component.js"),k=e(j),l=a("./popup.js"),m=(e(l),a("../utils/dom.js")),n=(d(m),a("../utils/fn.js")),o=(d(n),a("../utils/to-title-case.js")),p=(e(o),function(a){function b(c){var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),a.call(this,c,d),this.update()}return g(b,a),b.prototype.update=function(){var a=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=a,this.addChild(a),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},b.prototype.createPopup=function(){},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b.prototype.buildCSSClass=function(){var b="vjs-menu-button";return b+=this.options_.inline===!0?"-inline":"-popup","vjs-menu-button "+b+" "+a.prototype.buildCSSClass.call(this)},b}(i["default"]));k["default"].registerComponent("PopupButton",p),c["default"]=p,b.exports=c["default"]},{"../clickable-component.js":65,"../component.js":67,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/to-title-case.js":143,"./popup.js":113}],113:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component.js"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=a("../utils/fn.js"),m=d(l),n=a("../utils/events.js"),o=d(n),p=function(a){function b(){f(this,b),a.apply(this,arguments)}return g(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",m.bind(this,function(){this.unlockShowing()}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=k.createEl(b,{className:"vjs-menu-content"});var c=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return c.appendChild(this.contentEl_),o.on(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b}(i["default"]);i["default"].registerComponent("Popup",p),c["default"]=p,b.exports=c["default"]},{"../component.js":67,"../utils/dom.js":134,"../utils/events.js":135,"../utils/fn.js":136}],114:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./clickable-component.js"),i=e(h),j=a("./component.js"),k=e(j),l=a("./utils/fn.js"),m=d(l),n=a("./utils/dom.js"),o=d(n),p=a("./utils/browser.js"),q=d(p),r=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.update(),c.on("posterchange",m.bind(this,this.update))}return g(b,a),b.prototype.dispose=function(){this.player().off("posterchange",this.update),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=o.createEl("div",{className:"vjs-poster",tabIndex:-1});return q.BACKGROUND_SIZE_SUPPORTED||(this.fallbackImg_=o.createEl("img"),a.appendChild(this.fallbackImg_)),a},b.prototype.update=function(){var a=this.player().poster();this.setSrc(a),a?this.show():this.hide()},b.prototype.setSrc=function(a){if(this.fallbackImg_)this.fallbackImg_.src=a;else{var b="";a&&(b='url("'+a+'")'),this.el_.style.backgroundImage=b}},b.prototype.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},b}(i["default"]);k["default"].registerComponent("PosterImage",r),c["default"]=r,b.exports=c["default"]},{"./clickable-component.js":65,"./component.js":67,"./utils/browser.js":131,"./utils/dom.js":134,"./utils/fn.js":136}],115:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}c.__esModule=!0;var f=a("./utils/events.js"),g=e(f),h=a("global/document"),i=d(h),j=a("global/window"),k=d(j),l=!1,m=void 0,n=function(){var a=i["default"].getElementsByTagName("video"),b=i["default"].getElementsByTagName("audio"),c=[];if(a&&a.length>0)for(var d=0,e=a.length;e>d;d++)c.push(a[d]);if(b&&b.length>0)for(var d=0,e=b.length;e>d;d++)c.push(b[d]);if(c&&c.length>0)for(var d=0,e=c.length;e>d;d++){var f=c[d];if(!f||!f.getAttribute){o(1);break}if(void 0===f.player){var g=f.getAttribute("data-setup");if(null!==g){m(f)}}}else l||o(1)},o=function(a,b){b&&(m=b),setTimeout(n,a)};"complete"===i["default"].readyState?l=!0:g.one(k["default"],"load",function(){l=!0});var p=function(){return l};c.autoSetup=n,c.autoSetupTimeout=o,c.hasLoaded=p},{"./utils/events.js":135,"global/document":1,"global/window":2}],116:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component.js"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=a("object.assign"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(c,"controlsvisible",this.update),this.on(c,this.playerEvent,this.update)}return g(b,a),b.prototype.createEl=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return c.className=c.className+" vjs-slider",c=m["default"]({tabIndex:0},c),d=m["default"]({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},d),a.prototype.createEl.call(this,b,c,d)},b.prototype.handleMouseDown=function(a){var b=this.bar.el_.ownerDocument;a.preventDefault(),k.blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(b,"mousemove",this.handleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchmove",this.handleMouseMove),this.on(b,"touchend",this.handleMouseUp),this.handleMouseMove(a)},b.prototype.handleMouseMove=function(){},b.prototype.handleMouseUp=function(){var a=this.bar.el_.ownerDocument;k.unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(a,"mousemove",this.handleMouseMove),this.off(a,"mouseup",this.handleMouseUp),this.off(a,"touchmove",this.handleMouseMove),this.off(a,"touchend",this.handleMouseUp),this.update()},b.prototype.update=function(){if(this.el_){var a=this.getPercent(),b=this.bar;if(b){("number"!=typeof a||a!==a||0>a||a===1/0)&&(a=0);var c=(100*a).toFixed(2)+"%";this.vertical()?b.el().style.height=c:b.el().style.width=c}}},b.prototype.calculateDistance=function(a){var b=k.getPointerPosition(this.el_,a);return this.vertical()?b.y:b.x},b.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepBack()):(38===a.which||39===a.which)&&(a.preventDefault(),this.stepForward())},b.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleClick=function(a){a.stopImmediatePropagation(),a.preventDefault()},b.prototype.vertical=function(a){return void 0===a?this.vertical_||!1:(this.vertical_=!!a,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal"),this)},b}(i["default"]);i["default"].registerComponent("Slider",n),c["default"]=n,b.exports=c["default"]},{"../component.js":67,"../utils/dom.js":134,"object.assign":45}],117:[function(a,b,c){"use strict";function d(a){return a.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},a.streamFromParts=function(a,b){return a+"&"+b},a.streamToParts=function(a){var b={connection:"",stream:""};if(!a)return b;var c=a.search(/&(?!\w+=)/),d=void 0;return-1!==c?d=c+1:(c=d=a.lastIndexOf("/")+1,0===c&&(c=d=a.length)),b.connection=a.substring(0,c),b.stream=a.substring(d,a.length),b},a.isStreamingType=function(b){return b in a.streamingFormats},a.RTMP_RE=/^rtmp[set]?:\/\//i,a.isStreamingSrc=function(b){return a.RTMP_RE.test(b)},a.rtmpSourceHandler={},a.rtmpSourceHandler.canPlayType=function(b){return a.isStreamingType(b)?"maybe":""},a.rtmpSourceHandler.canHandleSource=function(b){var c=a.rtmpSourceHandler.canPlayType(b.type);return c?c:a.isStreamingSrc(b.src)?"maybe":""},a.rtmpSourceHandler.handleSource=function(b,c){var d=a.streamToParts(b.src);c.setRtmpConnection(d.connection),c.setRtmpStream(d.stream)},a.registerSourceHandler(a.rtmpSourceHandler),a}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],118:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a){var b=a.charAt(0).toUpperCase()+a.slice(1);A["set"+b]=function(b){return this.el_.vjs_setProperty(a,b)}}function i(a){A[a]=function(){return this.el_.vjs_getProperty(a)}}c.__esModule=!0;for(var j=a("./tech"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=a("../utils/url.js"),o=d(n),p=a("../utils/time-ranges.js"),q=a("./flash-rtmp"),r=e(q),s=a("../component"),t=e(s),u=a("global/window"),v=e(u),w=a("object.assign"),x=e(w),y=v["default"].navigator,z=function(a){function b(c,d){f(this,b),a.call(this,c,d),c.source&&this.ready(function(){this.setSource(c.source)},!0),c.startTime&&this.ready(function(){this.load(),this.play(),this.currentTime(c.startTime)},!0),v["default"].videojs=v["default"].videojs||{},v["default"].videojs.Flash=v["default"].videojs.Flash||{},v["default"].videojs.Flash.onReady=b.onReady,v["default"].videojs.Flash.onEvent=b.onEvent,v["default"].videojs.Flash.onError=b.onError,this.on("seeked",function(){this.lastSeekTarget_=void 0})}return g(b,a),b.prototype.createEl=function(){var a=this.options_;a.swf||(a.swf="//vjs.zencdn.net/swf/5.0.1/video-js.swf");var c=a.techId,d=x["default"]({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.preload,loop:a.loop,muted:a.muted},a.flashVars),e=x["default"]({wmode:"opaque",bgcolor:"#000000"},a.params),f=x["default"]({id:c,name:c,"class":"vjs-tech"},a.attributes);return this.el_=b.embed(a.swf,d,e,f),this.el_.tech=this,this.el_},b.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},b.prototype.pause=function(){this.el_.vjs_pause()},b.prototype.src=function(a){return void 0===a?this.currentSrc():this.setSrc(a)},b.prototype.setSrc=function(a){if(a=o.getAbsoluteURL(a),this.el_.vjs_src(a),this.autoplay()){var b=this;this.setTimeout(function(){b.play()},0)}},b.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},b.prototype.setCurrentTime=function(b){var c=this.seekable();c.length&&(b=b>c.start(0)?b:c.start(0),b=b=10},k["default"].withSourceHandlers(z),z.nativeSourceHandler={},z.nativeSourceHandler.canPlayType=function(a){return a in z.formats?"maybe":""},z.nativeSourceHandler.canHandleSource=function(a){function b(a){var b=o.getFileExtension(a);return b?"video/"+b:""}var c;return c=a.type?a.type.replace(/;.*/,"").toLowerCase():b(a.src),z.nativeSourceHandler.canPlayType(c)},z.nativeSourceHandler.handleSource=function(a,b){ +b.setSrc(a.src)},z.nativeSourceHandler.dispose=function(){},z.registerSourceHandler(z.nativeSourceHandler),z.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},z.onReady=function(a){var b=m.getEl(a),c=b&&b.tech;c&&c.el()&&z.checkReady(c)},z.checkReady=function(a){a.el()&&(a.el().vjs_getProperty?a.triggerReady():this.setTimeout(function(){z.checkReady(a)},50))},z.onEvent=function(a,b){var c=m.getEl(a).tech;c.trigger(b)},z.onError=function(a,b){var c=m.getEl(a).tech;return"srcnotfound"===b?c.error(4):void c.error("FLASH: "+b)},z.version=function(){var a="0,0,0";try{a=new v["default"].ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{y.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(y.plugins["Shockwave Flash 2.0"]||y.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(c){}}return a.split(",")},z.embed=function(a,b,c,d){var e=z.getEmbedCode(a,b,c,d),f=m.createEl("div",{innerHTML:e}).childNodes[0];return f},z.getEmbedCode=function(a,b,c,d){var e=''}),d=x["default"]({data:a,width:"100%",height:"100%"},d),Object.getOwnPropertyNames(d).forEach(function(a){h+=a+'="'+d[a]+'" '}),""+e+h+">"+g+""},r["default"](z),t["default"].registerComponent("Flash",z),k["default"].registerTech("Flash",z),c["default"]=z,b.exports=c["default"]},{"../component":67,"../utils/dom.js":134,"../utils/time-ranges.js":142,"../utils/url.js":144,"./flash-rtmp":117,"./tech":121,"global/window":2,"object.assign":45}],119:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./tech.js"),i=e(h),j=a("../component"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=a("../utils/url.js"),o=d(n),p=a("../utils/fn.js"),q=d(p),r=a("../utils/log.js"),s=e(r),t=a("../utils/browser.js"),u=d(t),v=a("global/document"),w=e(v),x=a("global/window"),y=e(x),z=a("object.assign"),A=e(z),B=a("../utils/merge-options.js"),C=e(B),D=function(a){function b(c,d){f(this,b),a.call(this,c,d);var e=c.source;if(e&&(this.el_.currentSrc!==e.src||c.tag&&3===c.tag.initNetworkState_)?this.setSource(e):this.handleLateInit_(this.el_),this.el_.hasChildNodes()){for(var g=this.el_.childNodes,h=g.length,i=[];h--;){var j=g[h],k=j.nodeName.toLowerCase();"track"===k&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(j),this.remoteTextTracks().addTrack_(j.track)):i.push(j))}for(var l=0;l=0;g--){var h=f[g],i={};"undefined"!=typeof this.options_[h]&&(i[h]=this.options_[h]),m.setElAttributes(a,i)}return a},b.prototype.handleLateInit_=function(a){var b=this;if(0!==a.networkState&&3!==a.networkState){if(0===a.readyState){var c=function(){var a=!1,c=function(){a=!0};b.on("loadstart",c);var d=function(){a||this.trigger("loadstart")};return b.on("loadedmetadata",d),b.ready(function(){this.off("loadstart",c),this.off("loadedmetadata",d),a||this.trigger("loadstart")}),{v:void 0}}();if("object"==typeof c)return c.v}var d=["loadstart"];d.push("loadedmetadata"),a.readyState>=2&&d.push("loadeddata"),a.readyState>=3&&d.push("canplay"),a.readyState>=4&&d.push("canplaythrough"),this.ready(function(){d.forEach(function(a){this.trigger(a)},this)})}},b.prototype.proxyNativeTextTracks_=function(){var a=this.el().textTracks;if(a){for(var b=0;b0&&(a="number"!=typeof D.TEST_VID.textTracks[0].mode),a&&u.IS_FIREFOX&&(a=!1),!a||"onremovetrack"in D.TEST_VID.textTracks||(a=!1),a},D.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],D.prototype.featuresVolumeControl=D.canControlVolume(),D.prototype.featuresPlaybackRate=D.canControlPlaybackRate(),D.prototype.movingMediaElementInDOM=!u.IS_IOS,D.prototype.featuresFullscreenResize=!0,D.prototype.featuresProgressEvents=!0,D.prototype.featuresNativeTextTracks=D.supportsNativeTextTracks();var F=void 0,G=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,H=/^video\/mp4/i;D.patchCanPlayType=function(){u.ANDROID_VERSION>=4&&(F||(F=D.TEST_VID.constructor.prototype.canPlayType),D.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&G.test(a)?"maybe":F.call(this,a)}),u.IS_OLD_ANDROID&&(F||(F=D.TEST_VID.constructor.prototype.canPlayType),D.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&H.test(a)?"maybe":F.call(this,a)})},D.unpatchCanPlayType=function(){var a=D.TEST_VID.constructor.prototype.canPlayType;return D.TEST_VID.constructor.prototype.canPlayType=F,F=null,a},D.patchCanPlayType(),D.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},D.resetMediaElement=function(a){if(a){for(var b=a.querySelectorAll("source"),c=b.length;c--;)a.removeChild(b[c]);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},k["default"].registerComponent("Html5",D),i["default"].registerTech("Html5",D),c["default"]=D,b.exports=c["default"]},{"../component":67,"../utils/browser.js":131,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/log.js":139,"../utils/merge-options.js":140,"../utils/url.js":144,"./tech.js":121,"global/document":1,"global/window":2,"object.assign":45}],120:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../component.js"),h=d(g),i=a("./tech.js"),j=d(i),k=a("global/window"),l=(d(k),a("../utils/to-title-case.js")),m=d(l),n=function(a){function b(c,d,f){if(e(this,b),a.call(this,c,d,f),d.playerOptions.sources&&0!==d.playerOptions.sources.length)c.src(d.playerOptions.sources);else for(var g=0,i=d.playerOptions.techOrder;ge;e++)c.addTrackElement_(b[e]);return h.IS_IE8?c:void 0}return a.prototype.addTrackElement_=function(a){this.trackElements_.push(a)},a.prototype.getTrackElementByTrack_=function(a){for(var b=void 0,c=0,d=this.trackElements_.length;d>c;c++)if(a===this.trackElements_[c].track){b=this.trackElements_[c];break}return b},a.prototype.removeTrackElement_=function(a){for(var b=0,c=this.trackElements_.length;c>b;b++)if(a===this.trackElements_[b]){this.trackElements_.splice(b,1);break}},a}();c["default"]=k,b.exports=c["default"]},{"../utils/browser.js":131,"global/document":1}],123:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../utils/browser.js"),i=e(h),j=a("global/document"),k=d(j),l=a("../event-target"),m=d(l),n=a("../tracks/text-track"),o=d(n),p=0,q=1,r=2,s=3,t=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f(this,b),a.call(this);var d=void 0,e=this;if(i.IS_IE8){e=k["default"].createElement("custom");for(var g in b.prototype)"constructor"!==g&&(e[g]=b.prototype[g])}var h=new o["default"](c);return e.kind=h.kind,e.src=h.src,e.srclang=h.language,e.label=h.label,e["default"]=h["default"],Object.defineProperty(e,"readyState",{get:function(){return d}}),Object.defineProperty(e,"track",{get:function(){return h}}),d=p,h.addEventListener("loadeddata",function(){d=r,e.trigger({type:"load",target:e})}),i.IS_IE8?e:void 0}return g(b,a),b}(m["default"]);t.prototype.allowedEvents_={load:"load"},t.NONE=p,t.LOADING=q,t.LOADED=r,t.ERROR=s,c["default"]=t,b.exports=c["default"]},{"../event-target":101,"../tracks/text-track":130,"../utils/browser.js":131,"global/document":1}],124:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var g=a("../utils/browser.js"),h=e(g),i=a("global/document"),j=d(i),k=function(){function a(b){f(this,a);var c=this;if(h.IS_IE8){c=j["default"].createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}return a.prototype.setCues_.call(c,b),Object.defineProperty(c,"length",{get:function(){return this.length_}}),h.IS_IE8?c:void 0}return a.prototype.setCues_=function(a){var b=this.length||0,c=0,d=a.length;this.cues_=a,this.length_=a.length;var e=function(a){""+a in this||Object.defineProperty(this,""+a,{get:function(){return this.cues_[a]}})};if(d>b)for(c=b;d>c;c++)e.call(this,c)},a.prototype.getCueById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},a}();c["default"]=k,b.exports=c["default"]},{"../utils/browser.js":131,"global/document":1}],125:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a,b){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+b+")"}function i(a,b,c){try{a.style[b]=c}catch(d){}}c.__esModule=!0;var j=a("../component"),k=e(j),l=a("../menu/menu.js"),m=(e(l),a("../menu/menu-item.js")),n=(e(m),a("../menu/menu-button.js")),o=(e(n),a("../utils/fn.js")),p=d(o),q=a("global/document"),r=(e(q),a("global/window")),s=e(r),t="#222",u="#ccc",v={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},w=function(a){function b(c,d,e){f(this,b),a.call(this,c,d,e),c.on("loadstart",p.bind(this,this.toggleDisplay)),c.on("texttrackchange",p.bind(this,this.updateDisplay)),c.ready(p.bind(this,function(){if(c.tech_&&c.tech_.featuresNativeTextTracks)return void this.hide();c.on("fullscreenchange",p.bind(this,this.updateDisplay));for(var a=this.options_.playerOptions.tracks||[],b=0;bc;c++)if(this[c]===a){b=this[c],b.off&&b.off(),this.tracks_.splice(c,1);break}b&&this.trigger({track:b,type:"removetrack"})},b.prototype.getTrackById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},b}(i["default"]);p.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var q in p.prototype.allowedEvents_)p.prototype["on"+q]=null;c["default"]=p,b.exports=c["default"]},{"../event-target":101,"../utils/browser.js":131,"../utils/fn.js":136,"global/document":1}],129:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a){var b=void 0;return a.selectedOptions?b=a.selectedOptions[0]:a.options&&(b=a.options[a.options.selectedIndex]),b.value}function i(a,b){if(b){var c=void 0;for(c=0;c select").selectedIndex=0,this.$(".vjs-bg-color > select").selectedIndex=0,this.$(".window-color > select").selectedIndex=0,this.$(".vjs-text-opacity > select").selectedIndex=0,this.$(".vjs-bg-opacity > select").selectedIndex=0,this.$(".vjs-window-opacity > select").selectedIndex=0,this.$(".vjs-edge-style select").selectedIndex=0,this.$(".vjs-font-family select").selectedIndex=0,this.$(".vjs-font-percent select").selectedIndex=2,this.updateDisplay()})),n.on(this.$(".vjs-fg-color > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-bg-color > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".window-color > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-text-opacity > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-bg-opacity > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-window-opacity > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-font-percent select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-edge-style select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-font-family select"),"change",p.bind(this,this.updateDisplay)),this.options_.persistTextTrackSettings&&this.restoreSettings()}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:j()})},b.prototype.getValues=function(){var a=h(this.$(".vjs-edge-style select")),b=h(this.$(".vjs-font-family select")),c=h(this.$(".vjs-fg-color > select")),d=h(this.$(".vjs-text-opacity > select")),e=h(this.$(".vjs-bg-color > select")),f=h(this.$(".vjs-bg-opacity > select")),g=h(this.$(".window-color > select")),i=h(this.$(".vjs-window-opacity > select")),j=v["default"].parseFloat(h(this.$(".vjs-font-percent > select"))),k={backgroundOpacity:f,textOpacity:d,windowOpacity:i,edgeStyle:a,fontFamily:b,color:c,backgroundColor:e,windowColor:g,fontPercent:j};for(var l in k)(""===k[l]||"none"===k[l]||"fontPercent"===l&&1===k[l])&&delete k[l];return k},b.prototype.setValues=function(a){i(this.$(".vjs-edge-style select"),a.edgeStyle),i(this.$(".vjs-font-family select"),a.fontFamily),i(this.$(".vjs-fg-color > select"),a.color),i(this.$(".vjs-text-opacity > select"),a.textOpacity),i(this.$(".vjs-bg-color > select"),a.backgroundColor),i(this.$(".vjs-bg-opacity > select"),a.backgroundOpacity),i(this.$(".window-color > select"),a.windowColor),i(this.$(".vjs-window-opacity > select"),a.windowOpacity);var b=a.fontPercent;b&&(b=b.toFixed(2)),i(this.$(".vjs-font-percent > select"),b)},b.prototype.restoreSettings=function(){var a=void 0,b=void 0;try{var c=t["default"](v["default"].localStorage.getItem("vjs-text-track-settings"));a=c[0],b=c[1],a&&r["default"].error(a)}catch(d){r["default"].warn(d)}b&&this.setValues(b)},b.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var a=this.getValues();try{Object.getOwnPropertyNames(a).length>0?v["default"].localStorage.setItem("vjs-text-track-settings",JSON.stringify(a)):v["default"].localStorage.removeItem("vjs-text-track-settings")}catch(b){r["default"].warn(b)}}},b.prototype.updateDisplay=function(){var a=this.player_.getChild("textTrackDisplay");a&&a.updateDisplay()},b}(l["default"]);l["default"].registerComponent("TextTrackSettings",w),c["default"]=w,b.exports=c["default"]},{"../component":67,"../utils/events.js":135,"../utils/fn.js":136,"../utils/log.js":139,"global/window":2,"safe-json-parse/tuple":54}],130:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./text-track-cue-list"),i=e(h),j=a("../utils/fn.js"),k=d(j),l=a("../utils/guid.js"),m=d(l),n=a("../utils/browser.js"),o=d(n),p=a("./text-track-enums"),q=d(p),r=a("../utils/log.js"),s=e(r),t=a("../event-target"),u=e(t),v=a("global/document"),w=e(v),x=a("global/window"),y=e(x),z=a("../utils/url.js"),A=a("xhr"),B=e(A),C=function(a,b){var c=new y["default"].WebVTT.Parser(y["default"],y["default"].vttjs,y["default"].WebVTT.StringDecoder());c.oncue=function(a){b.addCue(a)},c.onparsingerror=function(a){s["default"].error(a)},c.onflush=function(){b.trigger({type:"loadeddata",target:b})},c.parse(a),c.flush()},D=function(a,b){var c={uri:a},d=z.isCrossOrigin(a);d&&(c.cors=d),B["default"](c,k.bind(this,function(a,c,d){return a?s["default"].error(a,c):(b.loaded_=!0,void("function"!=typeof y["default"].WebVTT?b.tech_&&!function(){var a=function(){return C(d,b)};b.tech_.on("vttjsloaded",a),b.tech_.on("vttjserror",function(){s["default"].error("vttjs failed to load, stopping trying to process "+b.src),b.tech_.off("vttjsloaded",a)})}():C(d,b)))}))},E=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(f(this,b),a.call(this),!c.tech)throw new Error("A tech was not provided.");var d=this;if(o.IS_IE8){d=w["default"].createElement("custom");for(var e in b.prototype)"constructor"!==e&&(d[e]=b.prototype[e])}d.tech_=c.tech;var g=q.TextTrackMode[c.mode]||"disabled",h=q.TextTrackKind[c.kind]||"subtitles",j=c.label||"",l=c.language||c.srclang||"",n=c.id||"vjs_text_track_"+m.newGUID();("metadata"===h||"chapters"===h)&&(g="hidden"),d.cues_=[],d.activeCues_=[];var p=new i["default"](d.cues_),r=new i["default"](d.activeCues_),s=!1,t=k.bind(d,function(){this.activeCues,s&&(this.trigger("cuechange"),s=!1)});return"disabled"!==g&&d.tech_.on("timeupdate",t),Object.defineProperty(d,"kind",{get:function(){return h},set:function(){}}),Object.defineProperty(d,"label",{get:function(){return j},set:function(){}}),Object.defineProperty(d,"language",{get:function(){return l; + +},set:function(){}}),Object.defineProperty(d,"id",{get:function(){return n},set:function(){}}),Object.defineProperty(d,"mode",{get:function(){return g},set:function(a){q.TextTrackMode[a]&&(g=a,"showing"===g&&this.tech_.on("timeupdate",t),this.trigger("modechange"))}}),Object.defineProperty(d,"cues",{get:function(){return this.loaded_?p:null},set:function(){}}),Object.defineProperty(d,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return r;for(var a=this.tech_.currentTime(),b=[],c=0,d=this.cues.length;d>c;c++){var e=this.cues[c];e.startTime<=a&&e.endTime>=a?b.push(e):e.startTime===e.endTime&&e.startTime<=a&&e.startTime+.5>=a&&b.push(e)}if(s=!1,b.length!==this.activeCues_.length)s=!0;else for(var c=0;cc;c++){var e=this.cues_[c];e===a&&(this.cues_.splice(c,1),b=!0)}b&&this.cues.setCues_(this.cues_)},b}(u["default"]);E.prototype.allowedEvents_={cuechange:"cuechange"},c["default"]=E,b.exports=c["default"]},{"../event-target":101,"../utils/browser.js":131,"../utils/fn.js":136,"../utils/guid.js":138,"../utils/log.js":139,"../utils/url.js":144,"./text-track-cue-list":124,"./text-track-enums":126,"global/document":1,"global/window":2,xhr:56}],131:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=a("global/window"),h=d(g),i=h["default"].navigator.userAgent,j=/AppleWebKit\/([\d.]+)/i.exec(i),k=j?parseFloat(j.pop()):null,l=/iPad/i.test(i);c.IS_IPAD=l;var m=/iPhone/i.test(i)&&!l;c.IS_IPHONE=m;var n=/iPod/i.test(i);c.IS_IPOD=n;var o=m||l||n;c.IS_IOS=o;var p=function(){var a=i.match(/OS (\d+)_/i);return a&&a[1]?a[1]:void 0}();c.IOS_VERSION=p;var q=/Android/i.test(i);c.IS_ANDROID=q;var r=function(){var a,b,c=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return c?(a=c[1]&&parseFloat(c[1]),b=c[2]&&parseFloat(c[2]),a&&b?parseFloat(c[1]+"."+c[2]):a?a:null):null}();c.ANDROID_VERSION=r;var s=q&&/webkit/i.test(i)&&2.3>r;c.IS_OLD_ANDROID=s;var t=q&&5>r&&537>k;c.IS_NATIVE_ANDROID=t;var u=/Firefox/i.test(i);c.IS_FIREFOX=u;var v=/Chrome/i.test(i);c.IS_CHROME=v;var w=/MSIE\s8\.0/.test(i);c.IS_IE8=w;var x=!!("ontouchstart"in h["default"]||h["default"].DocumentTouch&&f["default"]instanceof h["default"].DocumentTouch);c.TOUCH_ENABLED=x;var y="backgroundSize"in f["default"].createElement("video").style;c.BACKGROUND_SIZE_SUPPORTED=y},{"global/document":1,"global/window":2}],132:[function(a,b,c){"use strict";function d(a,b){var c,d,f=0;if(!b)return 0;a&&a.length||(a=e.createTimeRange(0,0));for(var g=0;gb&&(d=b),f+=d-c;return f/b}c.__esModule=!0,c.bufferedPercent=d;var e=a("./time-ranges.js")},{"./time-ranges.js":142}],133:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("./log.js"),f=d(e),g={get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c,!0}};c["default"]=function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if("function"==typeof Proxy){var c=function(){var c={};return Object.keys(b).forEach(function(a){g.hasOwnProperty(a)&&(c[a]=function(){return f["default"].warn(b[a]),g[a].apply(this,arguments)})}),{v:new Proxy(a,c)}}();if("object"==typeof c)return c.v}return a},b.exports=c["default"]},{"./log.js":139}],134:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){return a.raw=b,a}function g(a){return"string"==typeof a&&/\S/.test(a)}function h(a){if(/\s/.test(a))throw new Error("class has illegal whitespace characters")}function i(a){return new RegExp("(^|\\s)"+a+"($|\\s)")}function j(a){return function(b,c){return g(b)?(g(c)&&(c=J["default"].querySelector(c)),(B(c)?c:J["default"])[a](b)):J["default"][a](null)}}function k(a){return 0===a.indexOf("#")&&(a=a.slice(1)),J["default"].getElementById(a)}function l(){var a=arguments.length<=0||void 0===arguments[0]?"div":arguments[0],b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=J["default"].createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];-1!==a.indexOf("aria-")||"role"===a||"type"===a?(P["default"].warn(R["default"](H,a,c)),d.setAttribute(a,c)):d[a]=c}),Object.getOwnPropertyNames(c).forEach(function(a){c[a];d.setAttribute(a,c[a])}),d}function m(a,b){"undefined"==typeof a.textContent?a.innerText=b:a.textContent=b}function n(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)}function o(a){var b=a[T];return b||(b=a[T]=N.newGUID()),S[b]||(S[b]={}),S[b]}function p(a){var b=a[T];return b?!!Object.getOwnPropertyNames(S[b]).length:!1}function q(a){var b=a[T];if(b){delete S[b];try{delete a[T]}catch(c){a.removeAttribute?a.removeAttribute(T):a[T]=null}}}function r(a,b){return a.classList?a.classList.contains(b):(h(b),i(b).test(a.className))}function s(a,b){return a.classList?a.classList.add(b):r(a,b)||(a.className=(a.className+" "+b).trim()),a}function t(a,b){return a.classList?a.classList.remove(b):(h(b),a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(" ")),a}function u(a,b,c){var d=r(a,b);return"function"==typeof c&&(c=c(a,b)),"boolean"!=typeof c&&(c=!d),c!==d?(c?s(a,b):t(a,b),a):void 0}function v(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||"undefined"==typeof d||d===!1?a.removeAttribute(c):a.setAttribute(c,d===!0?"":d)})}function w(a){var b,c,d,e,f;if(b={},c=",autoplay,controls,loop,muted,default,",a&&a.attributes&&a.attributes.length>0){d=a.attributes;for(var g=d.length-1;g>=0;g--)e=d[g].name,f=d[g].value,("boolean"==typeof a[e]||-1!==c.indexOf(","+e+","))&&(f=null!==f?!0:!1),b[e]=f}return b}function x(){J["default"].body.focus(),J["default"].onselectstart=function(){return!1}}function y(){J["default"].onselectstart=function(){return!0}}function z(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=J["default"].documentElement,d=J["default"].body,e=c.clientLeft||d.clientLeft||0,f=L["default"].pageXOffset||d.scrollLeft,g=b.left+f-e,h=c.clientTop||d.clientTop||0,i=L["default"].pageYOffset||d.scrollTop,j=b.top+i-h;return{left:Math.round(g),top:Math.round(j)}}function A(a,b){var c={},d=z(a),e=a.offsetWidth,f=a.offsetHeight,g=d.top,h=d.left,i=b.pageY,j=b.pageX;return b.changedTouches&&(j=b.changedTouches[0].pageX,i=b.changedTouches[0].pageY),c.y=Math.max(0,Math.min(1,(g-i+f)/f)),c.x=Math.max(0,Math.min(1,(j-h)/e)),c}function B(a){return!!a&&"object"==typeof a&&1===a.nodeType}function C(a){return!!a&&"object"==typeof a&&3===a.nodeType}function D(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function E(a){return"function"==typeof a&&(a=a()),(Array.isArray(a)?a:[a]).map(function(a){return"function"==typeof a&&(a=a()),B(a)||C(a)?a:"string"==typeof a&&/\S/.test(a)?J["default"].createTextNode(a):void 0}).filter(function(a){return a})}function F(a,b){return E(b).forEach(function(b){return a.appendChild(b)}),a}function G(a,b){return F(D(a),b)}c.__esModule=!0,c.getEl=k,c.createEl=l,c.textContent=m,c.insertElFirst=n,c.getElData=o,c.hasElData=p,c.removeElData=q,c.hasElClass=r,c.addElClass=s,c.removeElClass=t,c.toggleElClass=u,c.setElAttributes=v,c.getElAttributes=w,c.blockTextSelection=x,c.unblockTextSelection=y,c.findElPosition=z,c.getPointerPosition=A,c.isEl=B,c.isTextNode=C,c.emptyEl=D,c.normalizeContent=E,c.appendContent=F,c.insertContent=G;var H=f(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),I=a("global/document"),J=e(I),K=a("global/window"),L=e(K),M=a("./guid.js"),N=d(M),O=a("./log.js"),P=e(O),Q=a("tsml"),R=e(Q),S={},T="vdata"+(new Date).getTime(),U=j("querySelector");c.$=U;var V=j("querySelectorAll");c.$$=V},{"./guid.js":138,"./log.js":139,"global/document":1,"global/window":2,tsml:55}],135:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b,c){if(Array.isArray(b))return l(f,a,b,c);var d=n.getElData(a);d.handlers||(d.handlers={}),d.handlers[b]||(d.handlers[b]=[]),c.guid||(c.guid=p.newGUID()),d.handlers[b].push(c),d.dispatcher||(d.disabled=!1,d.dispatcher=function(b,c){if(!d.disabled){b=j(b);var e=d.handlers[b.type];if(e)for(var f=e.slice(0),g=0,h=f.length;h>g&&!b.isImmediatePropagationStopped();g++)f[g].call(a,b,c)}}),1===d.handlers[b].length&&(a.addEventListener?a.addEventListener(b,d.dispatcher,!1):a.attachEvent&&a.attachEvent("on"+b,d.dispatcher))}function g(a,b,c){if(n.hasElData(a)){var d=n.getElData(a);if(d.handlers){if(Array.isArray(b))return l(g,a,b,c);var e=function(b){d.handlers[b]=[],k(a,b)};if(b){var f=d.handlers[b];if(f){if(!c)return void e(b);if(c.guid)for(var h=0;ha?0:a;var c=Math.floor(a%60),d=Math.floor(a/60%60),e=Math.floor(a/3600),f=Math.floor(b/60%60),g=Math.floor(b/3600);return(isNaN(a)||a===1/0)&&(e=d=c="-"),e=e>0||g>0?e+":":"",d=((e||f>=10)&&10>d?"0"+d:d)+":",c=10>c?"0"+c:c,e+d+c}()}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],138:[function(a,b,c){"use strict";function d(){return e++}c.__esModule=!0,c.newGUID=d;var e=1},{}],139:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){var c=Array.prototype.slice.call(b),d=function(){},e=g["default"].console||{log:d,warn:d,error:d};a?c.unshift(a.toUpperCase()+":"):a="log",h.history.push(c),c.unshift("VIDEOJS:"),e[a].apply?e[a].apply(e,c):e[a](c.join(" "))}c.__esModule=!0;var f=a("global/window"),g=d(f),h=function(){e(null,arguments)};h.history=[],h.error=function(){e("error",arguments)},h.warn=function(){e("warn",arguments)},c["default"]=h,b.exports=c["default"]},{"global/window":2}],140:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){return!!a&&"object"==typeof a&&"[object Object]"===a.toString()&&a.constructor===Object}function f(){var a=Array.prototype.slice.call(arguments);return a.unshift({}),a.push(i),h["default"].apply(null,a),a[0]}c.__esModule=!0,c["default"]=f;var g=a("lodash-compat/object/merge"),h=d(g),i=function(a,b){return e(b)?e(a)?void 0:f(b):b};b.exports=c["default"]},{"lodash-compat/object/merge":40}],141:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=function(a){var b=f["default"].createElement("style");return b.className=a,b};c.createStyleElement=g;var h=function(a,b){a.styleSheet?a.styleSheet.cssText=b:a.textContent=b};c.setTextContent=h},{"global/document":1}],142:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){return Array.isArray(a)?f(a):void 0===a||void 0===b?f():f([[a,b]])}function f(a){return void 0===a||0===a.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:a.length,start:g.bind(null,"start",0,a),end:g.bind(null,"end",1,a)}}function g(a,b,c,d){return void 0===d&&(j["default"].warn("DEPRECATED: Function '"+a+"' on 'TimeRanges' called without an index argument."),d=0),h(a,d,c.length-1),c[d][b]}function h(a,b,c){if(0>b||b>c)throw new Error("Failed to execute '"+a+"' on 'TimeRanges': The index provided ("+b+") is greater than or equal to the maximum bound ("+c+").")}c.__esModule=!0,c.createTimeRanges=e;var i=a("./log.js"),j=d(i);c.createTimeRange=e},{"./log.js":139}],143:[function(a,b,c){"use strict";function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],144:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=a("global/window"),h=d(g),i=function(a){var b=["protocol","hostname","port","pathname","search","hash","host"],c=f["default"].createElement("a");c.href=a;var d=""===c.host&&"file:"!==c.protocol,e=void 0;d&&(e=f["default"].createElement("div"),e.innerHTML='',c=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),f["default"].body.appendChild(e));for(var g={},h=0;hx',a=b.firstChild.href}return a};c.getAbsoluteURL=j;var k=function(a){if("string"==typeof a){var b=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,c=b.exec(a);if(c)return c.pop().toLowerCase()}return""};c.getFileExtension=k;var l=function(a){var b=h["default"].location,c=i(a),d=":"===c.protocol?b.protocol:c.protocol,e=d+c.host!==b.protocol+b.host;return e};c.isCrossOrigin=l},{"global/document":1,"global/window":2}],145:[function(b,c,d){"use strict";function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a){return a&&a.__esModule?a:{"default":a}}d.__esModule=!0;{var g=b("global/window"),h=f(g),i=b("global/document"),j=f(i),k=b("./setup"),l=e(k),m=b("./utils/stylesheet.js"),n=e(m),o=b("./component"),p=f(o),q=b("./event-target"),r=f(q),s=b("./utils/events.js"),t=e(s),u=b("./player"),v=f(u),w=b("./plugins.js"),x=f(w),y=b("../../src/js/utils/merge-options.js"),z=f(y),A=b("./utils/fn.js"),B=e(A),C=b("./tracks/text-track.js"),D=f(C),E=b("object.assign"),F=(f(E),b("./utils/time-ranges.js")),G=b("./utils/format-time.js"),H=f(G),I=b("./utils/log.js"),J=f(I),K=b("./utils/dom.js"),L=e(K),M=b("./utils/browser.js"),N=e(M),O=b("./utils/url.js"),P=e(O),Q=b("./extend.js"),R=f(Q),S=b("lodash-compat/object/merge"),T=f(S),U=b("./utils/create-deprecation-proxy.js"),V=f(U),W=b("xhr"),X=f(W),Y=b("./tech/tech.js"),Z=f(Y),$=b("./tech/html5.js"),_=(f($),b("./tech/flash.js"));f(_)}"undefined"==typeof HTMLVideoElement&&(j["default"].createElement("video"),j["default"].createElement("audio"),j["default"].createElement("track"));var aa=function da(a,b,c){var d=void 0;if("string"==typeof a){if(0===a.indexOf("#")&&(a=a.slice(1)),da.getPlayers()[a])return b&&J["default"].warn('Player "'+a+'" is already initialised. Options will not be applied.'),c&&da.getPlayers()[a].ready(c),da.getPlayers()[a];d=L.getEl(a)}else d=a;if(!d||!d.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return d.player||v["default"].players[d.playerId]||new v["default"](d,b,c)};if(h["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0){var ba=L.$(".vjs-styles-defaults");if(!ba){ba=n.createStyleElement("vjs-styles-defaults");var ca=L.$("head");ca.insertBefore(ba,ca.firstChild),n.setTextContent(ba,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}l.autoSetupTimeout(1,aa),aa.VERSION="5.9.0",aa.options=v["default"].prototype.options_,aa.getPlayers=function(){return v["default"].players},aa.players=V["default"](v["default"].players,{get:"Access to videojs.players is deprecated; use videojs.getPlayers instead",set:"Modification of videojs.players is deprecated"}),aa.getComponent=p["default"].getComponent,aa.registerComponent=function(a,b){Z["default"].isTech(b)&&J["default"].warn("The "+a+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),p["default"].registerComponent.call(p["default"],a,b)},aa.getTech=Z["default"].getTech,aa.registerTech=Z["default"].registerTech,aa.browser=N,aa.TOUCH_ENABLED=N.TOUCH_ENABLED,aa.extend=R["default"],aa.mergeOptions=z["default"],aa.bind=B.bind,aa.plugin=x["default"],aa.addLanguage=function(a,b){var c;return a=(""+a).toLowerCase(),T["default"](aa.options.languages,(c={},c[a]=b,c))[a]},aa.log=J["default"],aa.createTimeRange=aa.createTimeRanges=F.createTimeRanges,aa.formatTime=H["default"],aa.parseUrl=P.parseUrl,aa.isCrossOrigin=P.isCrossOrigin,aa.EventTarget=r["default"],aa.on=t.on,aa.one=t.one,aa.off=t.off,aa.trigger=t.trigger,aa.xhr=X["default"],aa.TextTrack=D["default"],aa.isEl=L.isEl,aa.isTextNode=L.isTextNode,aa.createEl=L.createEl,aa.hasClass=L.hasElClass,aa.addClass=L.addElClass,aa.removeClass=L.removeElClass,aa.toggleClass=L.toggleElClass,aa.setAttributes=L.setElAttributes,aa.getAttributes=L.getElAttributes,aa.emptyEl=L.emptyEl,aa.appendContent=L.appendContent,aa.insertContent=L.insertContent,"function"==typeof a&&a.amd?a("videojs",[],function(){return aa}):"object"==typeof d&&"object"==typeof c&&(c.exports=aa),d["default"]=aa,c.exports=d["default"]},{"../../src/js/utils/merge-options.js":140,"./component":67,"./event-target":101,"./extend.js":102,"./player":110,"./plugins.js":111,"./setup":115,"./tech/flash.js":118,"./tech/html5.js":119,"./tech/tech.js":121,"./tracks/text-track.js":130,"./utils/browser.js":131,"./utils/create-deprecation-proxy.js":133,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/format-time.js":137,"./utils/log.js":139,"./utils/stylesheet.js":141,"./utils/time-ranges.js":142,"./utils/url.js":144,"global/document":1,"global/window":2,"lodash-compat/object/merge":40,"object.assign":45,xhr:56}]},{},[145])(145)}),function(a){var b=a.vttjs={},c=b.VTTCue,d=b.VTTRegion,e=a.VTTCue,f=a.VTTRegion;b.shim=function(){b.VTTCue=c,b.VTTRegion=d},b.restore=function(){b.VTTCue=e,b.VTTRegion=f}}(this),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=h[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){if("string"!=typeof a)return!1;var b=i[a.toLowerCase()];return b?a.toLowerCase():!1}function e(a){for(var b=1;ba||a>100)throw new Error("Position must be between 0 and 100.");u=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",e({},j,{get:function(){return v},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",e({},j,{get:function(){return w},set:function(a){if(0>a||a>100)throw new Error("Size must be between 0 and 100.");w=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",e({},j,{get:function(){return x},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),h.displayState=void 0,i?h:void 0}var g="auto",h={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};f.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},a.VTTCue=a.VTTCue||f,b.VTTCue=f}(this,this.vttjs||{}),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=f[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){return"number"==typeof a&&a>=0&&100>=a}function e(){var a=100,b=3,e=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!d(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!d(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!d(a))throw new Error("RegionAnchorY must be between 0 and 100.");e=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!d(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!d(a))throw new Error("ViewportAnchorX must be between 0 and 100.");g=a}},scroll:{enumerable:!0,get:function(){return i},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var f={"":!0,up:!0};a.VTTRegion=a.VTTRegion||e,b.VTTRegion=e}(this,this.vttjs||{}),function(a){function b(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function c(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function d(){this.values=o(null)}function e(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function f(a,f,g){function h(){var d=c(a);if(null===d)throw new b(b.Errors.BadTimeStamp,"Malformed timestamp: "+k);return a=a.replace(/^[^\sa-zA-Z-]+/,""),d}function i(a,b){var c=new d;e(a,function(a,b){switch(a){case"region":for(var d=g.length-1;d>=0;d--)if(g[d].id===b){c.set(a,g[d].region);break}break;case"vertical":c.alt(a,b,["rl","lr"]);break;case"line":var e=b.split(","),f=e[0];c.integer(a,f),c.percent(a,f)?c.set("snapToLines",!1):null,c.alt(a,f,["auto"]),2===e.length&&c.alt("lineAlign",e[1],["start","middle","end"]);break;case"position":e=b.split(","),c.percent(a,e[0]),2===e.length&&c.alt("positionAlign",e[1],["start","middle","end"]);break;case"size":c.percent(a,b);break;case"align":c.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=c.get("region",null),b.vertical=c.get("vertical",""),b.line=c.get("line","auto"),b.lineAlign=c.get("lineAlign","start"),b.snapToLines=c.get("snapToLines",!0),b.size=c.get("size",100),b.align=c.get("align","middle"),b.position=c.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=c.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function j(){a=a.replace(/^\s+/,"")}var k=a;if(j(),f.startTime=h(),j(),"-->"!==a.substr(0,3))throw new b(b.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+k);a=a.substr(3),j(),f.endTime=h(),j(),i(a,f)}function g(a,b){function d(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function e(a){return p[a]}function f(a){for(;o=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(o[0],e);return a}function g(a,b){return!s[b.localName]||s[b.localName]===a.localName}function h(b,c){var d=q[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=r[b];return f&&c&&(e[f]=c.trim()),e}for(var i,j=a.document.createElement("div"),k=j,l=[];null!==(i=d());)if("<"!==i[0])k.appendChild(a.document.createTextNode(f(i)));else{if("/"===i[1]){l.length&&l[l.length-1]===i.substr(2).replace(">","")&&(l.pop(),k=k.parentNode);continue}var m,n=c(i.substr(1,i.length-2));if(n){m=a.document.createProcessingInstruction("timestamp",n),k.appendChild(m);continue}var o=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!o)continue;if(m=h(o[1],o[3]),!m)continue;if(!g(k,m))continue;o[2]&&(m.className=o[2].substr(1).replace("."," ")),l.push(o[1]),k.appendChild(m),k=m}return j}function h(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;ei&&(e=new l(a),g=i),a=new l(f)}return e||f}var f=new l(b),g=b.cue,h=i(g),j=[];if(g.snapToLines){var k;switch(g.vertical){case"":j=["+y","-y"],k="height";break;case"rl": +j=["+x","-x"],k="width";break;case"lr":j=["-x","+x"],k="width"}var m=f.lineHeight,n=m*Math.round(h),o=c[k]+m,p=j[0];Math.abs(n)>o&&(n=0>n?-1:1,n*=Math.ceil(o/m)*m),0>h&&(n+=""===g.vertical?c.height:c.width,j=j.reverse()),f.move(p,n)}else{var q=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=q/2;break;case"end":h-=q}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}j=["+y","-x","+x","-y"],f=new l(b)}var r=e(f,j);b.move(r.toCSSCompatValues(c))}function n(){}var o=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();b.prototype=o(Error.prototype),b.prototype.constructor=b,b.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d=0&&100>=b)?(this.set(a,b),!0):!1}};var p={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},r={v:"title",lang:"lang"},s={rt:"ruby"},t=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];j.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},j.prototype.formatStyle=function(a,b){return 0===a?0:a+b},k.prototype=o(j.prototype),k.prototype.constructor=k,l.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},l.prototype.overlaps=function(a){return this.lefta.left&&this.topa.top},l.prototype.overlapsAny=function(a){for(var b=0;b=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},l.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.lefta.right;case"+y":return this.topa.bottom}},l.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},l.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},l.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},n.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},n.convertCueToDOMTree=function(a,b){return a&&b?g(a,b):null};var u=.05,v="sans-serif",w="1.5%";n.processCues=function(a,b,c){function d(a){for(var b=0;b")){i.cue.id=j;continue}case"CUE":try{f(j,i.cue,i.regionList)}catch(m){i.reportOrThrowError(m),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var n=-1!==j.indexOf("-->");if(!j||n&&(l=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=j;continue;case"BADCUE":j||(i.state="ID");continue}}}catch(m){i.reportOrThrowError(m),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new b(b.Errors.BadSignature)}catch(c){a.reportOrThrowError(c)}return a.onflush&&a.onflush(),this}},a.WebVTT=n}(this,this.vttjs||{}); +//# sourceMappingURL=video.min.js.map \ No newline at end of file diff --git a/vendor/assets/javascripts/videojs/video.min.js.map b/vendor/assets/javascripts/videojs/video.min.js.map new file mode 100755 index 00000000000..cb7b86eb45d --- /dev/null +++ b/vendor/assets/javascripts/videojs/video.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"video.min.js","sources":["node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-pack/_prelude.js","node_modules/global/document.js","node_modules/global/window.js","node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-resolve/empty.js","node_modules/lodash-compat/date/now.js","node_modules/lodash-compat/function/debounce.js","node_modules/lodash-compat/function/restParam.js","node_modules/lodash-compat/function/throttle.js","node_modules/lodash-compat/internal/arrayCopy.js","node_modules/lodash-compat/internal/arrayEach.js","node_modules/lodash-compat/internal/baseCopy.js","node_modules/lodash-compat/internal/baseFor.js","node_modules/lodash-compat/internal/baseForIn.js","node_modules/lodash-compat/internal/baseMerge.js","node_modules/lodash-compat/internal/baseMergeDeep.js","node_modules/lodash-compat/internal/baseProperty.js","node_modules/lodash-compat/internal/bindCallback.js","node_modules/lodash-compat/internal/createAssigner.js","node_modules/lodash-compat/internal/createBaseFor.js","node_modules/lodash-compat/internal/getLength.js","node_modules/lodash-compat/internal/getNative.js","node_modules/lodash-compat/internal/isArrayLike.js","node_modules/lodash-compat/internal/isHostObject.js","node_modules/lodash-compat/internal/isIndex.js","node_modules/lodash-compat/internal/isIterateeCall.js","node_modules/lodash-compat/internal/isLength.js","node_modules/lodash-compat/internal/isObjectLike.js","node_modules/lodash-compat/internal/shimKeys.js","node_modules/lodash-compat/internal/toObject.js","node_modules/lodash-compat/lang/isArguments.js","node_modules/lodash-compat/lang/isArray.js","node_modules/lodash-compat/lang/isFunction.js","node_modules/lodash-compat/lang/isNative.js","node_modules/lodash-compat/lang/isObject.js","node_modules/lodash-compat/lang/isPlainObject.js","node_modules/lodash-compat/lang/isString.js","node_modules/lodash-compat/lang/isTypedArray.js","node_modules/lodash-compat/lang/toPlainObject.js","node_modules/lodash-compat/object/keys.js","node_modules/lodash-compat/object/keysIn.js","node_modules/lodash-compat/object/merge.js","node_modules/lodash-compat/support.js","node_modules/lodash-compat/utility/identity.js","node_modules/object.assign/hasSymbols.js","node_modules/object.assign/implementation.js","node_modules/object.assign/index.js","node_modules/object.assign/node_modules/define-properties/index.js","node_modules/object.assign/node_modules/define-properties/node_modules/foreach/index.js","node_modules/object.assign/node_modules/function-bind/implementation.js","node_modules/object.assign/node_modules/function-bind/index.js","node_modules/object.assign/node_modules/object-keys/index.js","node_modules/object.assign/node_modules/object-keys/isArguments.js","node_modules/object.assign/polyfill.js","node_modules/object.assign/shim.js","node_modules/safe-json-parse/tuple.js","node_modules/tsml/tsml.js","node_modules/xhr/index.js","node_modules/xhr/node_modules/is-function/index.js","node_modules/xhr/node_modules/once/once.js","node_modules/xhr/node_modules/parse-headers/node_modules/for-each/index.js","node_modules/xhr/node_modules/parse-headers/node_modules/trim/index.js","node_modules/xhr/node_modules/parse-headers/parse-headers.js","node_modules/xhr/node_modules/xtend/immutable.js","src/js/big-play-button.js","src/js/button.js","src/js/clickable-component.js","src/js/close-button.js","src/js/component.js","src/js/control-bar/control-bar.js","src/js/control-bar/fullscreen-toggle.js","src/js/control-bar/live-display.js","src/js/control-bar/mute-toggle.js","src/js/control-bar/play-toggle.js","src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js","src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js","src/js/control-bar/progress-control/load-progress-bar.js","src/js/control-bar/progress-control/mouse-time-display.js","src/js/control-bar/progress-control/play-progress-bar.js","src/js/control-bar/progress-control/progress-control.js","src/js/control-bar/progress-control/seek-bar.js","src/js/control-bar/progress-control/tooltip-progress-bar.js","src/js/control-bar/spacer-controls/custom-control-spacer.js","src/js/control-bar/spacer-controls/spacer.js","src/js/control-bar/text-track-controls/caption-settings-menu-item.js","src/js/control-bar/text-track-controls/captions-button.js","src/js/control-bar/text-track-controls/chapters-button.js","src/js/control-bar/text-track-controls/chapters-track-menu-item.js","src/js/control-bar/text-track-controls/descriptions-button.js","src/js/control-bar/text-track-controls/off-text-track-menu-item.js","src/js/control-bar/text-track-controls/subtitles-button.js","src/js/control-bar/text-track-controls/text-track-button.js","src/js/control-bar/text-track-controls/text-track-menu-item.js","src/js/control-bar/time-controls/current-time-display.js","src/js/control-bar/time-controls/duration-display.js","src/js/control-bar/time-controls/remaining-time-display.js","src/js/control-bar/time-controls/time-divider.js","src/js/control-bar/volume-control/volume-bar.js","src/js/control-bar/volume-control/volume-control.js","src/js/control-bar/volume-control/volume-level.js","src/js/control-bar/volume-menu-button.js","src/js/error-display.js","src/js/event-target.js","src/js/extend.js","src/js/fullscreen-api.js","src/js/loading-spinner.js","src/js/media-error.js","src/js/menu/menu-button.js","src/js/menu/menu-item.js","src/js/menu/menu.js","src/js/modal-dialog.js","src/js/player.js","src/js/plugins.js","src/js/popup/popup-button.js","src/js/popup/popup.js","src/js/poster-image.js","src/js/setup.js","src/js/slider/slider.js","src/js/tech/flash-rtmp.js","src/js/tech/flash.js","src/js/tech/html5.js","src/js/tech/loader.js","src/js/tech/tech.js","src/js/tracks/html-track-element-list.js","src/js/tracks/html-track-element.js","src/js/tracks/text-track-cue-list.js","src/js/tracks/text-track-display.js","src/js/tracks/text-track-enums.js","src/js/tracks/text-track-list-converter.js","src/js/tracks/text-track-list.js","src/js/tracks/text-track-settings.js","src/js/tracks/text-track.js","src/js/utils/browser.js","src/js/utils/buffer.js","src/js/utils/create-deprecation-proxy.js","src/js/utils/dom.js","src/js/utils/events.js","src/js/utils/fn.js","src/js/utils/format-time.js","src/js/utils/guid.js","src/js/utils/log.js","src/js/utils/merge-options.js","src/js/utils/stylesheet.js","src/js/utils/time-ranges.js","src/js/utils/to-title-case.js","src/js/utils/url.js","src/js/video.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","videojs","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length",1,"_dereq_","topLevel","minDoc","document","doccy","min-document",2,3,4,"getNative","nativeNow","Date","now","getTime","../internal/getNative",5,"debounce","func","wait","options","cancel","timeoutId","clearTimeout","maxTimeoutId","lastCalled","trailingCall","undefined","complete","isCalled","id","result","apply","thisArg","args","delayed","remaining","stamp","setTimeout","maxDelayed","trailing","debounced","arguments","leading","maxWait","leadingCall","TypeError","FUNC_ERROR_TEXT","isObject","nativeMax","Math","max","../date/now","../lang/isObject",6,"restParam","start","index","rest","Array","otherArgs",7,"throttle","./debounce",8,"arrayCopy","source","array",9,"arrayEach","iteratee",10,"baseCopy","props","object","key",11,"createBaseFor","baseFor","./createBaseFor",12,"baseForIn","keysIn","../object/keysIn","./baseFor",13,"baseMerge","customizer","stackA","stackB","isSrcArr","isArrayLike","isArray","isTypedArray","keys","srcValue","isObjectLike","baseMergeDeep","value","isCommon","../lang/isArray","../lang/isTypedArray","../object/keys","./arrayEach","./baseMergeDeep","./isArrayLike","./isObjectLike",14,"mergeFunc","isPlainObject","isArguments","toPlainObject","push","../lang/isArguments","../lang/isPlainObject","../lang/toPlainObject","./arrayCopy",15,"baseProperty","toObject","./toObject",16,"bindCallback","argCount","identity","collection","accumulator","other","../utility/identity",17,"createAssigner","assigner","sources","guard","isIterateeCall","../function/restParam","./bindCallback","./isIterateeCall",18,"fromRight","keysFunc","iterable",19,"getLength","./baseProperty",20,"isNative","../lang/isNative",21,"isLength","./getLength","./isLength",22,"isHostObject","Object","toString",23,"isIndex","reIsUint","test","MAX_SAFE_INTEGER",24,"type","./isIndex",25,26,27,"shimKeys","propsLength","allowIndexes","isString","hasOwnProperty","objectProto","prototype","../lang/isString",28,"support","unindexedChars","charAt","../support",29,"propertyIsEnumerable","../internal/isArrayLike","../internal/isObjectLike",30,"arrayTag","objToString","nativeIsArray","../internal/isLength",31,"isFunction","funcTag","./isObject",32,"reIsNative","fnToString","reIsHostCtor","Function","RegExp","replace","../internal/isHostObject","./isFunction",33,34,"Ctor","objectTag","constructor","ownLast","subValue","../internal/baseForIn","./isArguments",35,"stringTag",36,"typedArrayTags","argsTag","boolTag","dateTag","errorTag","mapTag","numberTag","regexpTag","setTag","weakMapTag","arrayBufferTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag",37,"../internal/baseCopy",38,"nativeKeys","enumPrototypes","../internal/shimKeys",39,"proto","isProto","skipIndexes","skipErrorProps","enumErrorProps","errorProto","skipProto","nonEnumShadows","tag","stringProto","nonEnums","nonEnumProps","shadowProps","nonEnum","String","toLocaleString","valueOf","../internal/arrayEach","../internal/isIndex","../lang/isFunction",40,"merge","../internal/baseMerge","../internal/createAssigner",41,"arrayProto","splice","x","0","y","spliceObjects",42,43,"Symbol","getOwnPropertySymbols","iterator","obj","sym","symVal","getOwnPropertyNames","syms","getOwnPropertyDescriptor","descriptor","enumerable","object-keys",44,"bind","canBeObject","hasSymbols","propIsEnumerable","target","objTarget","./hasSymbols","function-bind",45,"defineProperties","getPolyfill","shim","implementation","./implementation","./polyfill","./shim","define-properties",46,"foreach","toStr","fn","arePropertyDescriptorsSupported","defineProperty","_","supportsDescriptors","name","predicate","configurable","writable","map","predicates","concat",47,"hasOwn","ctx","k",48,"ERROR_MESSAGE","slice","funcType","that","bound","binder","boundLength","boundArgs","Empty",49,50,"has","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","ctor","blacklistedKeys","$console","$frame","$frameElement","$frames","$parent","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","equalsConstructorPrototypeIfNotBuggy","keysShim","theKeys","j","skipConstructor","keysWorksWithArguments","originalKeys",51,"str","callee",52,"lacksProperEnumerationOrder","assign","letters","split","actual","assignHasPendingExceptions","preventExtensions","thrower",53,"polyfill",54,"SafeParseTuple","reviver","error","json","JSON","parse","err",55,"clean","sa",56,"forEachArray","isEmpty","initParams","uri","callback","params","xtend","createXHR","_createXHR","readystatechange","xhr","readyState","loadFunc","getBody","body","response","responseType","responseText","responseXML","isJson","errorFunc","evt","timeoutTimer","statusCode","failureResponse","aborted","status","useXDR","method","headers","url","rawRequest","getAllResponseHeaders","parseHeaders","once","cors","XDomainRequest","XMLHttpRequest","data","sync","stringify","onreadystatechange","onload","onerror","onprogress","ontimeout","open","username","password","withCredentials","timeout","abort","setRequestHeader","beforeSend","send","noop","toUpperCase","global/window","is-function","parse-headers",57,"string","alert","confirm","prompt",58,"called",59,"forEach","list","context","forEachString","forEachObject","len",60,"trim","left","right",61,"arg","row","indexOf","toLowerCase","for-each",62,"extend","_componentJs2","_interopRequireDefault","_componentJs","_classCallCheck","BigPlayButton","_Button","player","buildCSSClass","__esModule","newObj","Constructor","instance","_inherits","subClass","superClass","create","setPrototypeOf","__proto__","_clickableComponentJs2","_clickableComponentJs","_objectAssign","attributes","className","_objectAssign2","tabIndex","role","_utilsLogJs2","warn","_component2","addChild","child","default","_component","ClickableComponent","_Component","createEl","el","createControlTextEl","controlTextEl_","innerHTML","localize","controlText_","removeClass","el_","setAttribute","disable","handleFocus","Events","on","_globalDocument2","Fn","handleKeyPress","handleClick","event","CloseButton","_interopRequireWildcard","_globalWindow2","_globalWindow","Dom","_utilsDomJs","Component","player_","id_","Guid","newGUID","childIndex_","childNameIndex_","reportTouchActivity","trigger","bubbles","children_","dispose","removeElData","tagName","properties","languages","language","children","getChildById","componentName","ComponentClass","getComponent","componentClassName","component","removeChild","getChild","childFound","initChildren","opts","parentOptions","newChild","_this","workingChildren","Tech","options_","filter","some","wchild","handleAdd","first","second","removeOnDispose","_this2","off","cleanRemover","guid","third","nodeName","one","_this3","_arguments","newFunc","ready","isReady_","triggerReady","readyQueue","readyQueue_","$$","selector","contentEl","hasClass","classToCheck","hasElClass","addElClass","classToAdd","toggleClass","classToToggle","toggleElClass","show","dimension","num","skipListeners","widthOrHeight","val","style","computedWidthOrHeight","getComputedStyle","computedStyle","parseFloat","width","currentDimension","height","currentWidth","emitTapEvents","touchStart","touchTimeThreshold","couldBeTap","touches","firstTouch","xdiff","pageX","touchDistance","tapMovementThreshold","noTap","touchTime","enableTouchActivity","report","reportUserActivity","touchHolding","clearInterval","setInterval","touchEnd","intervalId","comp","init","subObj","_name","_spacerControlsCustomControlSpacerJs","ControlBar","dir","FullscreenToggle","isFullscreen","controlText","updateShowing","LiveDisplay","contentEl_","aria-live","MuteToggle","update","tech_","addClass","vol","muted","level","handlePlay","handlePause","PlayToggle","play","pause","_menuMenuJs2","_menuMenuJs","PlaybackRateMenuButton","_MenuButton","updateVisibility","appendChild","labelEl_","menu","playbackRate","currentRate","newRate","playbackRates","playerOptions","playbackRateSupported","updateLabel","PlaybackRateMenuItem","_MenuItem","label","rate","buffered","percentify","time","end","percent","part","bufferedEnd","_lodashCompatFunctionThrottle2","_lodashCompatFunctionThrottle","MouseTimeDisplay","controlBar","progressControl","keepTooltipsInside","handleMouseMove","newTime","calculateDistance","duration","position","findElPosition","parentNode","_utilsFormatTimeJs2","clampedPosition","clampPosition_","playerWidth","tooltipWidth","tooltipWidthHalf","ceil","_utilsFormatTimeJs","PlayProgressBar","_mouseTimeDisplayJs","ProgressControl","_loadProgressBarJs","SeekBar","_Slider","tooltipProgressBar","updateProgress","updateAriaAttributes","tooltip","tooltipStyle","scrubbing","getCache","currentTime","getPercent","toFixed","videoWasPlaying","stepForward","stepBack","updateDataAttr","TooltipProgressBar","querySelector","CustomControlSpacer","_Spacer","Spacer","CaptionSettingsMenuItem","_TextTrackMenuItem","kind","_captionSettingsMenuItemJs2","_captionSettingsMenuItemJs","_TextTrackButton","CaptionsButton","threshold","hide","items","kind_","_textTrackMenuItemJs2","_textTrackMenuItemJs","_chaptersTrackMenuItemJs2","_chaptersTrackMenuItemJs","ChaptersButton","createItems","tracks","textTracks","_length","track","chaptersTrack","title","_utilsToTitleCaseJs2","unshift","insertElFirst","cues","remoteTextTrackEl","cue","mi","_utilsFnJs","ChaptersTrackMenuItem","addEventListener","startTime","DescriptionsButton","removeEventListener","changeHandler","disabled","enable","OffTextTrackMenuItem","selected","handleTracksChange","_offTextTrackMenuItemJs","TextTrackButton","updateHandler","_offTextTrackMenuItemJs2","selectable","_globalDocument","TextTrackMenuItem","onchange","Event","dispatchEvent","updateContent","DurationDisplay","duration_","formattedTime","remainingTime","localizedText","TimeDivider","_sliderSliderJs","_volumeLevelJs","updateARIAAttributes","aria-label","volume","VolumeBar","checkMuted","VolumeControl","_volumeBarJs","VolumeLevel","_volumeControlVolumeBarJs","VolumeMenuButton","inline","vertical","volumeBar","volumeUpdate","_PopupButton","orientationClass","createPopup","contentElType","attachVolumeBarEvents","popup","menuContent","handleMouseDown","ErrorDisplay","_ModalDialog","content","message","./modal-dialog","./utils/dom","./utils/merge-options",101,"_utilsEventsJs","EventTarget","allowedEvents_","ael","_utilsLog","_utilsLog2","subClassMethods","methods","FullscreenApi","apiMap","browserApi","LoadingSpinner","MediaError","errorTypes","_utilsToTitleCaseJs","MenuButton","_ClickableComponent","handleSubmenuKeyPress","createMenu","which","buttonPressed_","unpressButton","preventDefault","lockShowing","focus","enabled_","MenuItem","_selected","focusedChild_","unlockShowing","stepChild","Menu","item","shift","ModalDialog","opened_","hasBeenOpened_","hasBeenFilled_","closeable","uncloseable","MODAL_CLASS_NAME","ESC","close","desc","fillAlways","fill","wasPlaying_","paused","ownerDocument","closeable_","_close","temp","fillWith","parentEl","empty","content_","_utilsBrowserJs","_utilsLogJs","_utilsMergeOptionsJs","_tracksTextTrackListConverterJs","_errorDisplayJs","_tracksTextTrackSettingsJs","tagAttributes","getElAttributes","languagesToLower","_utilsMergeOptionsJs2","plugins","playerOptionsCopy","isAudio","controls","flexNotSupported_","Player","styleEl_","players","removeAttribute","attr","attrs","playerId","defaultsStyleEl","$","head","insertBefore","nextSibling","firstChild","aspectRatio","links","getElementsByTagName","linkEl","privDimension","_dimension","parsedVal","updateStyleEl_","fluid","bool","ratio","VIDEOJS_NO_DYNAMIC_STYLE","_height","height_","techEl","_width","idClass","aspectRatio_","videoWidth","videoHeight","ratioParts","width_","ratioMultiplier","loadTech_","techName","_techTechJs2","getTech","disposeMediaElement","techName_","techOptions","nativeControlsForTouch","techId","textTracks_","preload","loop","poster","currentType_","src","cache_","techComponent","handleTechReady_","_tracksTextTrackListConverterJs2","jsonToTextTracks","textTracksJson_","handleTechLoadStart_","handleTechWaiting_","handleTechCanPlay_","handleTechCanPlayThrough_","handleTechPlaying_","handleTechEnded_","handleTechSeeking_","handleTechSeeked_","handleTechPlay_","handleTechFirstPlay_","handleTechPause_","handleTechProgress_","handleTechDurationChange_","handleTechFullscreenChange_","handleTechError_","handleTechAbort_","handleTechStalled_","handleTechLoadedMetaData_","handleTechLoadedData_","handleTechTextTrackChange_","handleTechPosterChange_","usingNativeControls","addTechControlsListeners_","removeTechControlsListeners_","handleTechClick_","handleTechTouchMove_","handleTechTouchEnd_","hasStarted","_hasStarted","hasStarted_","handleTechTap_","userActive","handleTechTouchStart_","userWasActive","handleStageClick_","handleTechSuspend_","handleTechEmptied_","handleTechTimeUpdate_","handleTechRateChange_","handleTechVolumeChange_","techCall_","techGet_","isScrubbing","scrubbing_","seconds","bufferedPercent","_utilsBufferJs","percentAsDecimal","fsApi","fullscreenchange","documentFullscreenChange","requestFullscreen","supportsFullScreen","exitFullscreen","isFullWindow","docOrigOverflow","documentElement","overflow","exitFullWindow","canPlayType","techOrder","tech","techs","_ref","found","innerArray","innerChoice","tester","outerChoice","foundSourceAndTech","flip","_ref2","canPlaySource","currentTech","sourceList_","load","sourceTech","selectSource","controls_","usingNativeControls_","error_","errorDisplay","ended","seeking","seekable","userActivity_","userActive_","stopPropagation","listenForUserActivity_","mouseInProgress","lastMoveX","lastMoveY","handleActivity","screenX","screenY","handleMouseUp","inactivityTimeout","remoteTextTracks","addTextTrack","addRemoteTextTrack","removeRemoteTextTrack","languages_","toJSON","modal","tagOptions","dataSetup","_safeParseTuple","baseOptions","hasChildNodes","childNodes","childName","_playerJs","Popup","append","PosterImage","fallbackImg_","setSrc","_windowLoaded","autoSetup","vids","mediaEls","audios","mediaEl","getAttribute","autoSetupTimeout","vjs","Slider","bar","barName","playerEvent","doc","progress","percentage","handleBlur","stopImmediatePropagation","vertical_","registerComponent","FlashRtmpDecorator","Flash","streamingFormats","streamToParts","parts","connection","stream","connEnd","search","streamBegin","lastIndexOf","substring","rtmpSourceHandler","isStreamingType","canHandleSource","attrUpper","_api","vjs_setProperty","vjs_getProperty","_tech","_utilsUrlJs","_Tech","setSource","swf","objId","eventProxyFunction","errorEventProxyFunction","flashVars","wmode","embed","setCurrentTime","vjs_pause","lastSeekTarget_","currentSource_","setPoster","_utilsTimeRangesJs","createTimeRange","ranges","enterFullScreen","_tech2","_readWrite","_readOnly","_createGetter","nativeSourceHandler","guessMimeType","ext","Url","getFileExtension","video/flv","video/mp4","checkReady","onEvent","swfID","eventName","getEl","version","navigator","description","match","getEmbedCode","flashVarsString","paramsString","attrsString","flashvars","_techJs2","_techJs","Html5","currentSrc","initNetworkState_","removeNodes","node","nodes","nodesLength","featuresNativeTextTracks","remoteTextTrackEls","addTrackElement_","addTrack_","handleTextTrackChange_","handleTextTrackChange","handleTextTrackRemove_","handleTextTrackRemove","proxyNativeTextTracks_","emulatedTt","tt","handleTextTrackAdd_","clone","cloneNode","createElement","browser","TOUCH_ENABLED","setElAttributes","class","settingsAttrs","overwriteAttrs","_ret","loadstartFired","setLoadstartFired","triggerLoadstart","eventsToTrigger","setVolume","setMuted","offsetWidth","offsetHeight","video","networkState","HAVE_METADATA","webkitEnterFullScreen","exitFullScreen","webkitExitFullScreen","_src","reset","resetMediaElement","setPreload","autoplay","setAutoplay","setControls","setLoop","defaultMuted","played","htmlTrackElement","srclang","trackElement","getTrackElementByTrack_","removeTrack_","TEST_VID","isSupported","registerSourceHandler","canControlVolume","canControlPlaybackRate","supportsNativeTextTracks","supportsTextTracks","mpegurlRE","patchCanPlayType","IS_OLD_ANDROID","mp4RE","unpatchCanPlayType","querySelectorAll","MediaLoader","_tracksTextTrackList","manualProgressOn","featuresTimeupdateEvents","nativeCaptions","nativeTextTracks","manualProgress","stopTrackingProgress","progressInterval","numBufferedPercent","onDurationChange","manualTimeUpdates","trackCurrentTime","stopTrackingCurrentTime","currentTimeInterval","manualTimeUpdatesOff","manuallyTriggered","initTextTrackListeners","textTrackListChanges","emulateTextTracks","script","updateDisplay","textTracksChanges","mode","_tracksTextTrackList2","remoteTextTracks_","createTrackHelper","removeTrackElement_","techs_","withSourceHandlers","handler","handlers","sourceHandlers","selectSourceHandler","sh","srcObj","fnName","originalFn","disposeSourceHandler","sourceHandler_","handleSource","HtmlTrackElementList","IS_IE8","prop","trackElements_","get","trackElements","_length2","trackElement_","_length3","HTMLTrackElement","_tracksTextTrack2","NONE","_EventTarget","TextTrackCueList","setCues_","length_","cues_","getCueById","parseInt","color","opacity","darkGray","lightGray","TextTrackDisplay","aria-atomic","clearDisplay","descriptionsTrack","captionsSubtitlesTrack","updateForTrack","overrides","getValues","_i","cueDiv","displayState","textOpacity","tryUpdateStyle","constructColor","backgroundColor","backgroundOpacity","windowColor","windowOpacity","edgeStyle","textShadow","fontPercent","fontSize","bottom","fontFamily","fontVariant","fontMap","trackToJson_","ret","reduce","acc","textTracksToJson","trackObjs","trackEls","TextTrackList","tracks_","rtrack","getTrackById","getSelectedOptionValue","selectedOption","selectedOptions","selectedIndex","option","TextTrackSettings","persistTextTrackSettings","saveSettings","restoreSettings","textEdge","fgColor","bgColor","bgOpacity","setValues","values","setSelectedOption","_safeJsonParseTuple2","localStorage","getItem","ttDisplay","_textTrackCueList2","_textTrackCueList","_eventTarget","_xhr2","_xhr","parseCues","srcContent","parser","WebVTT","Parser","vttjs","StringDecoder","oncue","addCue","onparsingerror","flush","loadTrack","crossOrigin","responseBody","loaded_","loadHandler","TextTrack","TextTrackEnum","TextTrackKind","activeCues","activeCues_","timeupdateHandler","changed","set","newMode","TextTrackMode","active","ct","endTime","removeCue","_removeCue","removed","IS_IPAD","IS_IPHONE","USER_AGENT","IS_IPOD","IOS_VERSION","IS_ANDROID","ANDROID_VERSION","major","minor","IS_NATIVE_ANDROID","appleWebkitVersion","bufferedDuration","_timeRangesJs","_logJs","_logJs2","messages","Proxy","defaultBehaviors","_taggedTemplateLiteralLoose","strings","raw","isNonBlankString","throwIfWhitespace","classRegExp","propName","_tsml2","_templateObject","parent","getElData","elData","elIdAttr","element","knownBooleans","attrName","attrVal","onselectstart","getBoundingClientRect","box","top","docEl","clientLeft","scrollLeft","pageXOffset","getPointerPosition","boxH","boxX","pageY","isEl","nodeType","isTextNode","_tsml","elem","_handleMultipleEvents","dispatcher","hash","fixEvent","m","handlersCopy","isImmediatePropagationStopped","removeType","isPropagationStopped","defaultPrevented","targetData","returnTrue","returnFalse","old","srcElement","relatedTarget","returnValue","cancelBubble","clientX","_cleanUpEvents","detachEvent","h","floor",138,"_logType","console","log","history","argsArray","isPlain","mergeOptions","destination","lodash-compat/object/merge",141,"createStyleElement","createTimeRanges","createTimeRangesObj","getRange","valueIndex","rangeIndex","parseUrl","href","addToBody","div","details","protocol","isCrossOrigin",145,"stylesheet","_utilsStylesheetJs","_player2","_player","_tracksTextTrackJs","_lodashCompatObjectMerge","_utilsCreateDeprecationProxyJs","_techTechJs","_techHtml5Js","getPlayers","addLanguage","setAttributes","insertContent"],"mappings":"AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CACA,SAAAA,GAAA,GAAA,gBAAAC,UAAA,mBAAAC,QAAAA,OAAAD,QAAAD,QAAA,IAAA,kBAAAG,SAAAA,OAAAC,IAAAD,UAAAH,OAAA,CAAA,GAAAK,EAAAA,GAAA,mBAAAC,QAAAA,OAAA,mBAAAC,QAAAA,OAAA,mBAAAC,MAAAA,KAAAC,KAAAJ,EAAAK,QAAAV,MAAA,WAAA,GAAAG,EAAA,OAAA,SAAAQ,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAhB,GAAA,GAAAqB,OAAA,uBAAAL,EAAA,IAAA,MAAAhB,GAAAsB,KAAA,mBAAAtB,EAAA,GAAAuB,GAAAV,EAAAG,IAAAf,WAAAW,GAAAI,GAAA,GAAAQ,KAAAD,EAAAtB,QAAA,SAAAU,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,EAAAA,EAAAF,IAAAY,EAAAA,EAAAtB,QAAAU,EAAAC,EAAAC,EAAAC,GAAA,MAAAD,GAAAG,GAAAf,QAAA,IAAA,GAAAmB,GAAA,kBAAAD,UAAAA,Q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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;wBChBmB,aAAa;;;;2BACV,gBAAgB;;;;;;;;;;;;;;IAWhC,aAAa;YAAb,aAAa;;AAEN,WAFP,aAAa,CAEL,MAAM,EAAE,OAAO,EAAE;0BAFzB,aAAa;;AAGf,uBAAM,MAAM,EAAE,OAAO,CAAC,CAAC;GACxB;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AC;;;;;;;;;AAS5C,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2B9B,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4B1C,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;AAS1C,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;AACjD,QAAM,CAAC,SAAS,EAAE,EAAE,EAAE,YAAU;AAAE,WAAO,OAAO,CAAC;GAAE,CAAC,CAAC;;;CAGtD,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACpE,UAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;GAC7B;;qBAEc,OAAO","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o logs the number of milliseconds it took for the deferred function to be invoked\n */\nvar now = nativeNow || function() {\n return new Date().getTime();\n};\n\nmodule.exports = now;\n","var isObject = require('../lang/isObject'),\n now = require('../date/now');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed invocations. Provide an options object to indicate that `func`\n * should be invoked on the leading and/or trailing edge of the `wait` timeout.\n * Subsequent calls to the debounced function return the result of the last\n * `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the debounced function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=false] Specify invoking on the leading\n * edge of the timeout.\n * @param {number} [options.maxWait] The maximum time `func` is allowed to be\n * delayed before it's invoked.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // avoid costly calculations while the window size is in flux\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // invoke `sendMail` when the click event is fired, debouncing subsequent calls\n * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // ensure `batchLog` is invoked once after 1 second of debounced calls\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', _.debounce(batchLog, 250, {\n * 'maxWait': 1000\n * }));\n *\n * // cancel a debounced call\n * var todoChanges = _.debounce(batchLog, 1000);\n * Object.observe(models.todo, todoChanges);\n *\n * Object.observe(models, function(changes) {\n * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {\n * todoChanges.cancel();\n * }\n * }, ['delete']);\n *\n * // ...at some point `models.todo` is changed\n * models.todo.completed = true;\n *\n * // ...before 1 second has passed `models.todo` is deleted\n * // which cancels the debounced `todoChanges` call\n * delete models.todo;\n */\nfunction debounce(func, wait, options) {\n var args,\n maxTimeoutId,\n result,\n stamp,\n thisArg,\n timeoutId,\n trailingCall,\n lastCalled = 0,\n maxWait = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = wait < 0 ? 0 : (+wait || 0);\n if (options === true) {\n var leading = true;\n trailing = false;\n } else if (isObject(options)) {\n leading = !!options.leading;\n maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (maxTimeoutId) {\n clearTimeout(maxTimeoutId);\n }\n lastCalled = 0;\n maxTimeoutId = timeoutId = trailingCall = undefined;\n }\n\n function complete(isCalled, id) {\n if (id) {\n clearTimeout(id);\n }\n maxTimeoutId = timeoutId = trailingCall = undefined;\n if (isCalled) {\n lastCalled = now();\n result = func.apply(thisArg, args);\n if (!timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n }\n }\n\n function delayed() {\n var remaining = wait - (now() - stamp);\n if (remaining <= 0 || remaining > wait) {\n complete(trailingCall, maxTimeoutId);\n } else {\n timeoutId = setTimeout(delayed, remaining);\n }\n }\n\n function maxDelayed() {\n complete(trailing, timeoutId);\n }\n\n function debounced() {\n args = arguments;\n stamp = now();\n thisArg = this;\n trailingCall = trailing && (timeoutId || !leading);\n\n if (maxWait === false) {\n var leadingCall = leading && !timeoutId;\n } else {\n if (!maxTimeoutId && !leading) {\n lastCalled = stamp;\n }\n var remaining = maxWait - (stamp - lastCalled),\n isCalled = remaining <= 0 || remaining > maxWait;\n\n if (isCalled) {\n if (maxTimeoutId) {\n maxTimeoutId = clearTimeout(maxTimeoutId);\n }\n lastCalled = stamp;\n result = func.apply(thisArg, args);\n }\n else if (!maxTimeoutId) {\n maxTimeoutId = setTimeout(maxDelayed, remaining);\n }\n }\n if (isCalled && timeoutId) {\n timeoutId = clearTimeout(timeoutId);\n }\n else if (!timeoutId && wait !== maxWait) {\n timeoutId = setTimeout(delayed, wait);\n }\n if (leadingCall) {\n isCalled = true;\n result = func.apply(thisArg, args);\n }\n if (isCalled && !timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n return result;\n }\n debounced.cancel = cancel;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as an array.\n *\n * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.restParam(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction restParam(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n rest = Array(length);\n\n while (++index < length) {\n rest[index] = args[start + index];\n }\n switch (start) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, args[0], rest);\n case 2: return func.call(this, args[0], args[1], rest);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = rest;\n return func.apply(this, otherArgs);\n };\n}\n\nmodule.exports = restParam;\n","var debounce = require('./debounce'),\n isObject = require('../lang/isObject');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed invocations. Provide an options object to indicate\n * that `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. Subsequent calls to the throttled function return the\n * result of the last `func` call.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the throttled function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=true] Specify invoking on the leading\n * edge of the timeout.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // avoid excessively updating the position while scrolling\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes\n * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {\n * 'trailing': false\n * }));\n *\n * // cancel a trailing throttled call\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (options === false) {\n leading = false;\n } else if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });\n}\n\nmodule.exports = throttle;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction arrayCopy(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = arrayCopy;\n","/**\n * A specialized version of `_.forEach` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\nfunction baseCopy(source, props, object) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n object[key] = source[key];\n }\n return object;\n}\n\nmodule.exports = baseCopy;\n","var createBaseFor = require('./createBaseFor');\n\n/**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseFor = require('./baseFor'),\n keysIn = require('../object/keysIn');\n\n/**\n * The base implementation of `_.forIn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForIn(object, iteratee) {\n return baseFor(object, iteratee, keysIn);\n}\n\nmodule.exports = baseForIn;\n","var arrayEach = require('./arrayEach'),\n baseMergeDeep = require('./baseMergeDeep'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isObject = require('../lang/isObject'),\n isObjectLike = require('./isObjectLike'),\n isTypedArray = require('../lang/isTypedArray'),\n keys = require('../object/keys');\n\n/**\n * The base implementation of `_.merge` without support for argument juggling,\n * multiple sources, and `this` binding `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {Object} Returns `object`.\n */\nfunction baseMerge(object, source, customizer, stackA, stackB) {\n if (!isObject(object)) {\n return object;\n }\n var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),\n props = isSrcArr ? undefined : keys(source);\n\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObjectLike(srcValue)) {\n stackA || (stackA = []);\n stackB || (stackB = []);\n baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);\n }\n else {\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n }\n if ((result !== undefined || (isSrcArr && !(key in object))) &&\n (isCommon || (result === result ? (result !== value) : (value === value)))) {\n object[key] = result;\n }\n }\n });\n return object;\n}\n\nmodule.exports = baseMerge;\n","var arrayCopy = require('./arrayCopy'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isPlainObject = require('../lang/isPlainObject'),\n isTypedArray = require('../lang/isTypedArray'),\n toPlainObject = require('../lang/toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {\n var length = stackA.length,\n srcValue = source[key];\n\n while (length--) {\n if (stackA[length] == srcValue) {\n object[key] = stackB[length];\n return;\n }\n }\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {\n result = isArray(value)\n ? value\n : (isArrayLike(value) ? arrayCopy(value) : []);\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n result = isArguments(value)\n ? toPlainObject(value)\n : (isPlainObject(value) ? value : {});\n }\n else {\n isCommon = false;\n }\n }\n // Add the source value to the stack of traversed objects and associate\n // it with its merged value.\n stackA.push(srcValue);\n stackB.push(result);\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);\n } else if (result === result ? (result !== value) : (value === value)) {\n object[key] = result;\n }\n}\n\nmodule.exports = baseMergeDeep;\n","var toObject = require('./toObject');\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : toObject(object)[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var identity = require('../utility/identity');\n\n/**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction bindCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return identity;\n }\n if (thisArg === undefined) {\n return func;\n }\n switch (argCount) {\n case 1: return function(value) {\n return func.call(thisArg, value);\n };\n case 3: return function(value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n case 5: return function(value, other, key, object, source) {\n return func.call(thisArg, value, other, key, object, source);\n };\n }\n return function() {\n return func.apply(thisArg, arguments);\n };\n}\n\nmodule.exports = bindCallback;\n","var bindCallback = require('./bindCallback'),\n isIterateeCall = require('./isIterateeCall'),\n restParam = require('../function/restParam');\n\n/**\n * Creates a `_.assign`, `_.defaults`, or `_.merge` function.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return restParam(function(object, sources) {\n var index = -1,\n length = object == null ? 0 : sources.length,\n customizer = length > 2 ? sources[length - 2] : undefined,\n guard = length > 2 ? sources[2] : undefined,\n thisArg = length > 1 ? sources[length - 1] : undefined;\n\n if (typeof customizer == 'function') {\n customizer = bindCallback(customizer, thisArg, 5);\n length -= 2;\n } else {\n customizer = typeof thisArg == 'function' ? thisArg : undefined;\n length -= (customizer ? 1 : 0);\n }\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var toObject = require('./toObject');\n\n/**\n * Creates a base function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var iterable = toObject(object),\n props = keysFunc(object),\n length = props.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length)) {\n var key = props[index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var baseProperty = require('./baseProperty');\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\nmodule.exports = getLength;\n","var isNative = require('../lang/isNative');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getLength = require('./getLength'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nfunction isArrayLike(value) {\n return value != null && isLength(getLength(value));\n}\n\nmodule.exports = isArrayLike;\n","/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nvar isHostObject = (function() {\n try {\n Object({ 'toString': 0 } + '');\n } catch(e) {\n return function() { return false; };\n }\n return function(value) {\n // IE < 9 presents many host objects as `Object` objects that can coerce\n // to strings despite having improperly defined `toString` methods.\n return typeof value.toString != 'function' && typeof (value + '') == 'string';\n };\n}());\n\nmodule.exports = isHostObject;\n","/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;\n","var isArrayLike = require('./isArrayLike'),\n isIndex = require('./isIndex'),\n isObject = require('../lang/isObject');\n\n/**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)) {\n var other = object[index];\n return value === value ? (value === other) : (other !== other);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isIndex = require('./isIndex'),\n isLength = require('./isLength'),\n isString = require('../lang/isString'),\n keysIn = require('../object/keysIn');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction shimKeys(object) {\n var props = keysIn(object),\n propsLength = props.length,\n length = propsLength && object.length;\n\n var allowIndexes = !!length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object));\n\n var index = -1,\n result = [];\n\n while (++index < propsLength) {\n var key = props[index];\n if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = shimKeys;\n","var isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\nfunction toObject(value) {\n if (support.unindexedChars && isString(value)) {\n var index = -1,\n length = value.length,\n result = Object(value);\n\n while (++index < length) {\n result[index] = value.charAt(index);\n }\n return result;\n }\n return isObject(value) ? value : Object(value);\n}\n\nmodule.exports = toObject;\n","var isArrayLike = require('../internal/isArrayLike'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is classified as an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n return isObjectLike(value) && isArrayLike(value) &&\n hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n}\n\nmodule.exports = isArguments;\n","var getNative = require('../internal/getNative'),\n isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\nmodule.exports = isArray;\n","var isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 which returns 'object' for typed array constructors.\n return isObject(value) && objToString.call(value) == funcTag;\n}\n\nmodule.exports = isFunction;\n","var isFunction = require('./isFunction'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);\n}\n\nmodule.exports = isNative;\n","/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseForIn = require('../internal/baseForIn'),\n isArguments = require('./isArguments'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * **Note:** This method assumes objects created by the `Object` constructor\n * have no inherited enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n var Ctor;\n\n // Exit early for non `Object` objects.\n if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) ||\n (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {\n return false;\n }\n // IE < 9 iterates inherited properties before own properties. If the first\n // iterated property is an object's own property then there are no inherited\n // enumerable properties.\n var result;\n if (support.ownLast) {\n baseForIn(value, function(subValue, key, object) {\n result = hasOwnProperty.call(object, key);\n return false;\n });\n return result !== false;\n }\n // In most environments an object's own properties are iterated before\n // its inherited properties. If the last iterated property is an object's\n // own property then there are no inherited enumerable properties.\n baseForIn(value, function(subValue, key) {\n result = key;\n });\n return result === undefined || hasOwnProperty.call(value, result);\n}\n\nmodule.exports = isPlainObject;\n","var isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n","var baseCopy = require('../internal/baseCopy'),\n keysIn = require('../object/keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable\n * properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return baseCopy(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var getNative = require('../internal/getNative'),\n isArrayLike = require('../internal/isArrayLike'),\n isObject = require('../lang/isObject'),\n shimKeys = require('../internal/shimKeys'),\n support = require('../support');\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = getNative(Object, 'keys');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n var Ctor = object == null ? undefined : object.constructor;\n if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {\n return shimKeys(object);\n }\n return isObject(object) ? nativeKeys(object) : [];\n};\n\nmodule.exports = keys;\n","var arrayEach = require('../internal/arrayEach'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isFunction = require('../lang/isFunction'),\n isIndex = require('../internal/isIndex'),\n isLength = require('../internal/isLength'),\n isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n/** Used to fix the JScript `[[DontEnum]]` bug. */\nvar shadowProps = [\n 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',\n 'toLocaleString', 'toString', 'valueOf'\n];\n\n/** Used for native method references. */\nvar errorProto = Error.prototype,\n objectProto = Object.prototype,\n stringProto = String.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to avoid iterating over non-enumerable properties in IE < 9. */\nvar nonEnumProps = {};\nnonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };\nnonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };\nnonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };\nnonEnumProps[objectTag] = { 'constructor': true };\n\narrayEach(shadowProps, function(key) {\n for (var tag in nonEnumProps) {\n if (hasOwnProperty.call(nonEnumProps, tag)) {\n var props = nonEnumProps[tag];\n props[key] = hasOwnProperty.call(props, key);\n }\n }\n});\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!isObject(object)) {\n object = Object(object);\n }\n var length = object.length;\n\n length = (length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object)) && length) || 0;\n\n var Ctor = object.constructor,\n index = -1,\n proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,\n isProto = proto === object,\n result = Array(length),\n skipIndexes = length > 0,\n skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),\n skipProto = support.enumPrototypes && isFunction(object);\n\n while (++index < length) {\n result[index] = (index + '');\n }\n // lodash skips the `constructor` property when it infers it's iterating\n // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`\n // attribute of an existing property and the `constructor` property of a\n // prototype defaults to non-enumerable.\n for (var key in object) {\n if (!(skipProto && key == 'prototype') &&\n !(skipErrorProps && (key == 'message' || key == 'name')) &&\n !(skipIndexes && isIndex(key, length)) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n if (support.nonEnumShadows && object !== objectProto) {\n var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),\n nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];\n\n if (tag == objectTag) {\n proto = objectProto;\n }\n length = shadowProps.length;\n while (length--) {\n key = shadowProps[length];\n var nonEnum = nonEnums[key];\n if (!(isProto && nonEnum) &&\n (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {\n result.push(key);\n }\n }\n }\n return result;\n}\n\nmodule.exports = keysIn;\n","var baseMerge = require('../internal/baseMerge'),\n createAssigner = require('../internal/createAssigner');\n\n/**\n * Recursively merges own enumerable properties of the source object(s), that\n * don't resolve to `undefined` into the destination object. Subsequent sources\n * overwrite property assignments of previous sources. If `customizer` is\n * provided it's invoked to produce the merged values of the destination and\n * source properties. If `customizer` returns `undefined` merging is handled\n * by the method instead. The `customizer` is bound to `thisArg` and invoked\n * with five arguments: (objectValue, sourceValue, key, object, source).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var users = {\n * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n * };\n *\n * var ages = {\n * 'data': [{ 'age': 36 }, { 'age': 40 }]\n * };\n *\n * _.merge(users, ages);\n * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n *\n * // using a customizer callback\n * var object = {\n * 'fruits': ['apple'],\n * 'vegetables': ['beet']\n * };\n *\n * var other = {\n * 'fruits': ['banana'],\n * 'vegetables': ['carrot']\n * };\n *\n * _.merge(object, other, function(a, b) {\n * if (_.isArray(a)) {\n * return a.concat(b);\n * }\n * });\n * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n */\nvar merge = createAssigner(baseMerge);\n\nmodule.exports = merge;\n","/** Used for native method references. */\nvar arrayProto = Array.prototype,\n errorProto = Error.prototype,\n objectProto = Object.prototype;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/**\n * An object environment feature flags.\n *\n * @static\n * @memberOf _\n * @type Object\n */\nvar support = {};\n\n(function(x) {\n var Ctor = function() { this.x = x; },\n object = { '0': x, 'length': x },\n props = [];\n\n Ctor.prototype = { 'valueOf': x, 'y': x };\n for (var key in new Ctor) { props.push(key); }\n\n /**\n * Detect if `name` or `message` properties of `Error.prototype` are\n * enumerable by default (IE < 9, Safari < 5.1).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||\n propertyIsEnumerable.call(errorProto, 'name');\n\n /**\n * Detect if `prototype` properties are enumerable by default.\n *\n * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1\n * (if the prototype or a property on the prototype has been set)\n * incorrectly set the `[[Enumerable]]` value of a function's `prototype`\n * property to `true`.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');\n\n /**\n * Detect if properties shadowing those on `Object.prototype` are non-enumerable.\n *\n * In IE < 9 an object's own properties, shadowing non-enumerable ones,\n * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.nonEnumShadows = !/valueOf/.test(props);\n\n /**\n * Detect if own properties are iterated after inherited properties (IE < 9).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.ownLast = props[0] != 'x';\n\n /**\n * Detect if `Array#shift` and `Array#splice` augment array-like objects\n * correctly.\n *\n * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array\n * `shift()` and `splice()` functions that fail to remove the last element,\n * `value[0]`, of array-like objects even though the \"length\" property is\n * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,\n * while `splice()` is buggy regardless of mode in IE < 9.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.spliceObjects = (splice.call(object, 0, 1), !object[0]);\n\n /**\n * Detect lack of support for accessing string characters by index.\n *\n * IE < 8 can't access characters by index. IE 8 can only access characters\n * by index on string literals, not string objects.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';\n}(1, 0));\n\nmodule.exports = support;\n","/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","'use strict';\n\nvar keys = require('object-keys');\n\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tif (typeof sym === 'string') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(Object(sym) instanceof Symbol)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; }\n\tif (keys(obj).length !== 0) { return false; }\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = require('object-keys');\nvar bind = require('function-bind');\nvar canBeObject = function (obj) {\n\treturn typeof obj !== 'undefined' && obj !== null;\n};\nvar hasSymbols = require('./hasSymbols')();\nvar toObject = Object;\nvar push = bind.call(Function.call, Array.prototype.push);\nvar propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);\n\nmodule.exports = function assign(target, source1) {\n\tif (!canBeObject(target)) { throw new TypeError('target must be an object'); }\n\tvar objTarget = toObject(target);\n\tvar s, source, i, props, syms, value, key;\n\tfor (s = 1; s < arguments.length; ++s) {\n\t\tsource = toObject(arguments[s]);\n\t\tprops = keys(source);\n\t\tif (hasSymbols && Object.getOwnPropertySymbols) {\n\t\t\tsyms = Object.getOwnPropertySymbols(source);\n\t\t\tfor (i = 0; i < syms.length; ++i) {\n\t\t\t\tkey = syms[i];\n\t\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\t\tpush(props, key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < props.length; ++i) {\n\t\t\tkey = props[i];\n\t\t\tvalue = source[key];\n\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\tobjTarget[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn objTarget;\n};\n","'use strict';\n\nvar defineProperties = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\ndefineProperties(implementation, {\n\timplementation: implementation,\n\tgetPolyfill: getPolyfill,\n\tshim: shim\n});\n\nmodule.exports = implementation;\n","'use strict';\n\nvar keys = require('object-keys');\nvar foreach = require('foreach');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';\n\nvar toStr = Object.prototype.toString;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\tObject.defineProperty(obj, 'x', { enumerable: false, value: obj });\n /* eslint-disable no-unused-vars, no-restricted-syntax */\n for (var _ in obj) { return false; }\n /* eslint-enable no-unused-vars, no-restricted-syntax */\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\tObject.defineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = props.concat(Object.getOwnPropertySymbols(map));\n\t}\n\tforeach(props, function (name) {\n\t\tdefineProperty(object, name, map[name], predicates[name]);\n\t});\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n","var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","var implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\nvar hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');\nvar hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar blacklistedKeys = {\n\t$console: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$parent: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) {\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar lacksProperEnumerationOrder = function () {\n\tif (!Object.assign) {\n\t\treturn false;\n\t}\n\t// v8, specifically in node 4.x, has a bug with incorrect property enumeration order\n\t// note: this does not detect the bug unless there's 20 characters\n\tvar str = 'abcdefghijklmnopqrst';\n\tvar letters = str.split('');\n\tvar map = {};\n\tfor (var i = 0; i < letters.length; ++i) {\n\t\tmap[letters[i]] = letters[i];\n\t}\n\tvar obj = Object.assign({}, map);\n\tvar actual = '';\n\tfor (var k in obj) {\n\t\tactual += k;\n\t}\n\treturn str !== actual;\n};\n\nvar assignHasPendingExceptions = function () {\n\tif (!Object.assign || !Object.preventExtensions) {\n\t\treturn false;\n\t}\n\t// Firefox 37 still has \"pending exception\" logic in its Object.assign implementation,\n\t// which is 72% slower than our shim, and Firefox 40's native implementation.\n\tvar thrower = Object.preventExtensions({ 1: 2 });\n\ttry {\n\t\tObject.assign(thrower, 'xy');\n\t} catch (e) {\n\t\treturn thrower[1] === 'y';\n\t}\n};\n\nmodule.exports = function getPolyfill() {\n\tif (!Object.assign) {\n\t\treturn implementation;\n\t}\n\tif (lacksProperEnumerationOrder()) {\n\t\treturn implementation;\n\t}\n\tif (assignHasPendingExceptions()) {\n\t\treturn implementation;\n\t}\n\treturn Object.assign;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimAssign() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tObject,\n\t\t{ assign: polyfill },\n\t\t{ assign: function () { return Object.assign !== polyfill; } }\n\t);\n\treturn polyfill;\n};\n","module.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n var json\n var error = null\n\n try {\n json = JSON.parse(obj, reviver)\n } catch (err) {\n error = err\n }\n\n return [error, json]\n}\n","function clean (s) {\n return s.replace(/\\n\\r?\\s*/g, '')\n}\n\n\nmodule.exports = function tsml (sa) {\n var s = ''\n , i = 0\n\n for (; i < arguments.length; i++)\n s += clean(sa[i]) + (arguments[i + 1] || '')\n\n return s\n}","\"use strict\";\nvar window = require(\"global/window\")\nvar once = require(\"once\")\nvar isFunction = require(\"is-function\")\nvar parseHeaders = require(\"parse-headers\")\nvar xtend = require(\"xtend\")\n\nmodule.exports = createXHR\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\n\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\n options = initParams(uri, options, callback)\n options.method = method.toUpperCase()\n return _createXHR(options)\n }\n})\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i])\n }\n}\n\nfunction isEmpty(obj){\n for(var i in obj){\n if(obj.hasOwnProperty(i)) return false\n }\n return true\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri\n\n if (isFunction(options)) {\n callback = options\n if (typeof uri === \"string\") {\n params = {uri:uri}\n }\n } else {\n params = xtend(options, {uri: uri})\n }\n\n params.callback = callback\n return params\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback)\n return _createXHR(options)\n}\n\nfunction _createXHR(options) {\n var callback = options.callback\n if(typeof callback === \"undefined\"){\n throw new Error(\"callback argument missing\")\n }\n callback = once(callback)\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n loadFunc()\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined\n\n if (xhr.response) {\n body = xhr.response\n } else if (xhr.responseType === \"text\" || !xhr.responseType) {\n body = xhr.responseText || xhr.responseXML\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body)\n } catch (e) {}\n }\n\n return body\n }\n\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer)\n if(!(evt instanceof Error)){\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\n }\n evt.statusCode = 0\n callback(evt, failureResponse)\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return\n var status\n clearTimeout(timeoutTimer)\n if(options.useXDR && xhr.status===undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200\n } else {\n status = (xhr.status === 1223 ? 204 : xhr.status)\n }\n var response = failureResponse\n var err = null\n\n if (status !== 0){\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n }\n if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders())\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\")\n }\n callback(err, response, response.body)\n\n }\n\n var xhr = options.xhr || null\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest()\n }else{\n xhr = new createXHR.XMLHttpRequest()\n }\n }\n\n var key\n var aborted\n var uri = xhr.url = options.uri || options.url\n var method = xhr.method = options.method || \"GET\"\n var body = options.body || options.data || null\n var headers = xhr.headers = options.headers || {}\n var sync = !!options.sync\n var isJson = false\n var timeoutTimer\n\n if (\"json\" in options) {\n isJson = true\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don't override existing accept header declared by user\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don't override existing accept header declared by user\n body = JSON.stringify(options.json)\n }\n }\n\n xhr.onreadystatechange = readystatechange\n xhr.onload = loadFunc\n xhr.onerror = errorFunc\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n }\n xhr.ontimeout = errorFunc\n xhr.open(method, uri, !sync, options.username, options.password)\n //has to be after open\n if(!sync) {\n xhr.withCredentials = !!options.withCredentials\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0 ) {\n timeoutTimer = setTimeout(function(){\n aborted=true//IE9 may still call readystatechange\n xhr.abort(\"timeout\")\n var e = new Error(\"XMLHttpRequest timeout\")\n e.code = \"ETIMEDOUT\"\n errorFunc(e)\n }, options.timeout )\n }\n\n if (xhr.setRequestHeader) {\n for(key in headers){\n if(headers.hasOwnProperty(key)){\n xhr.setRequestHeader(key, headers[key])\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\")\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType\n }\n\n if (\"beforeSend\" in options &&\n typeof options.beforeSend === \"function\"\n ) {\n options.beforeSend(xhr)\n }\n\n xhr.send(body)\n\n return xhr\n\n\n}\n\nfunction noop() {}\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n","module.exports = once\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var called = false\n return function () {\n if (called) return\n called = true\n return fn.apply(this, arguments)\n }\n}\n","var isFunction = require('is-function')\n\nmodule.exports = forEach\n\nvar toString = Object.prototype.toString\nvar hasOwnProperty = Object.prototype.hasOwnProperty\n\nfunction forEach(list, iterator, context) {\n if (!isFunction(iterator)) {\n throw new TypeError('iterator must be a function')\n }\n\n if (arguments.length < 3) {\n context = this\n }\n \n if (toString.call(list) === '[object Array]')\n forEachArray(list, iterator, context)\n else if (typeof list === 'string')\n forEachString(list, iterator, context)\n else\n forEachObject(list, iterator, context)\n}\n\nfunction forEachArray(array, iterator, context) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n iterator.call(context, array[i], i, array)\n }\n }\n}\n\nfunction forEachString(string, iterator, context) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n iterator.call(context, string.charAt(i), i, string)\n }\n}\n\nfunction forEachObject(object, iterator, context) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n iterator.call(context, object[k], k, object)\n }\n }\n}\n","\nexports = module.exports = trim;\n\nfunction trim(str){\n return str.replace(/^\\s*|\\s*$/g, '');\n}\n\nexports.left = function(str){\n return str.replace(/^\\s*/, '');\n};\n\nexports.right = function(str){\n return str.replace(/\\s*$/, '');\n};\n","var trim = require('trim')\n , forEach = require('for-each')\n , isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n }\n\nmodule.exports = function (headers) {\n if (!headers)\n return {}\n\n var result = {}\n\n forEach(\n trim(headers).split('\\n')\n , function (row) {\n var index = row.indexOf(':')\n , key = trim(row.slice(0, index)).toLowerCase()\n , value = trim(row.slice(index + 1))\n\n if (typeof(result[key]) === 'undefined') {\n result[key] = value\n } else if (isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [ result[key], value ]\n }\n }\n )\n\n return result\n}","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","/**\n * @file big-play-button.js\n */\nimport Button from './button.js';\nimport Component from './component.js';\n\n/**\n * Initial play button. Shows before the video has played. The hiding of the\n * big play button is done via CSS and player states.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Button\n * @class BigPlayButton\n */\nclass BigPlayButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return 'vjs-big-play-button';\n }\n\n /**\n * Handles click for play\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.play();\n }\n\n}\n\nBigPlayButton.prototype.controlText_ = 'Play Video';\n\nComponent.registerComponent('BigPlayButton', BigPlayButton);\nexport default BigPlayButton;\n","/**\n * @file button.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Base class for all buttons\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends ClickableComponent\n * @class Button\n */\nclass Button extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='button', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass()\n }, props);\n\n if (tag !== 'button') {\n log.warn(`Creating a Button with an HTML element of ${tag} is deprecated; use ClickableComponent instead.`);\n\n // Add properties for clickable element which is not a native HTML button\n props = assign({\n tabIndex: 0\n }, props);\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button'\n }, attributes);\n }\n\n // Add attributes for button element\n attributes = assign({\n type: 'button', // Necessary since the default button type is \"submit\"\n 'aria-live': 'polite' // let the screen reader user know that the text of the button may change\n }, attributes);\n\n let el = Component.prototype.createEl.call(this, tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * Adds a child component inside this button\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @deprecated\n * @method addChild\n */\n addChild(child, options={}) {\n let className = this.constructor.name;\n log.warn(`Adding an actionable (user controllable) child to a Button (${className}) is not supported; use a ClickableComponent instead.`);\n\n // Avoid the error message generated by ClickableComponent's addChild method\n return Component.prototype.addChild.call(this, child, options);\n }\n\n /**\n * Handle KeyPress (document level) - Extend with specific functionality for button\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Ignore Space (32) or Enter (13) key operation, which is handled by the browser for a button.\n if (event.which === 32 || event.which === 13) {\n } else {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n}\n\nComponent.registerComponent('Button', Button);\nexport default Button;\n","/**\n * @file button.js\n */\nimport Component from './component';\nimport * as Dom from './utils/dom.js';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Clickable Component which is clickable or keyboard actionable, but is not a native HTML button\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class ClickableComponent\n */\nclass ClickableComponent extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.emitTapEvents();\n\n this.on('tap', this.handleClick);\n this.on('click', this.handleClick);\n this.on('focus', this.handleFocus);\n this.on('blur', this.handleBlur);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='div', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass(),\n tabIndex: 0\n }, props);\n\n if (tag === 'button') {\n log.error(`Creating a ClickableComponent with an HTML element of ${tag} is not supported; use a Button instead.`);\n }\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button',\n 'aria-live': 'polite' // let the screen reader user know that the text of the element may change\n }, attributes);\n\n let el = super.createEl(tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * create control text\n *\n * @param {Element} el Parent element for the control text\n * @return {Element}\n * @method controlText\n */\n createControlTextEl(el) {\n this.controlTextEl_ = Dom.createEl('span', {\n className: 'vjs-control-text'\n });\n\n if (el) {\n el.appendChild(this.controlTextEl_);\n }\n\n this.controlText(this.controlText_);\n\n return this.controlTextEl_;\n }\n\n /**\n * Controls text - both request and localize\n *\n * @param {String} text Text for element\n * @return {String}\n * @method controlText\n */\n controlText(text) {\n if (!text) return this.controlText_ || 'Need Text';\n\n this.controlText_ = text;\n this.controlTextEl_.innerHTML = this.localize(this.controlText_);\n\n return this;\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String}\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-control vjs-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Adds a child component inside this clickable-component\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}) {\n // TODO: Fix adding an actionable child to a ClickableComponent; currently\n // it will cause issues with assistive technology (e.g. screen readers)\n // which support ARIA, since an element with role=\"button\" cannot have\n // actionable child elements.\n\n //let className = this.constructor.name;\n //log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role=\"button\" cannot have actionable child elements.`);\n\n return super.addChild(child, options);\n }\n\n /**\n * Enable the component element\n *\n * @return {Component}\n * @method enable\n */\n enable() {\n this.removeClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'false');\n return this;\n }\n\n /**\n * Disable the component element\n *\n * @return {Component}\n * @method disable\n */\n disable() {\n this.addClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'true');\n return this;\n }\n\n /**\n * Handle Click - Override with specific functionality for component\n *\n * @method handleClick\n */\n handleClick() {}\n\n /**\n * Handle Focus - Add keyboard functionality to element\n *\n * @method handleFocus\n */\n handleFocus() {\n Events.on(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n /**\n * Handle KeyPress (document level) - Trigger click when Space or Enter key is pressed\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Support Space (32) or Enter (13) key operation to fire a click event\n if (event.which === 32 || event.which === 13) {\n event.preventDefault();\n this.handleClick(event);\n } else if (super.handleKeyPress) {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n /**\n * Handle Blur - Remove keyboard triggers\n *\n * @method handleBlur\n */\n handleBlur() {\n Events.off(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n}\n\nComponent.registerComponent('ClickableComponent', ClickableComponent);\nexport default ClickableComponent;\n","import Button from './button';\nimport Component from './component';\n\n/**\n * The `CloseButton` component is a button which fires a \"close\" event\n * when it is activated.\n *\n * @extends Button\n * @class CloseButton\n */\nclass CloseButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n this.controlText(options && options.controlText || this.localize('Close'));\n }\n\n buildCSSClass() {\n return `vjs-close-button ${super.buildCSSClass()}`;\n }\n\n handleClick() {\n this.trigger({type: 'close', bubbles: false});\n }\n}\n\nComponent.registerComponent('CloseButton', CloseButton);\nexport default CloseButton;\n","/**\n * @file component.js\n *\n * Player Component - Base class for all UI objects\n */\n\nimport window from 'global/window';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as Events from './utils/events.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\n\n\n/**\n * Base UI Component class\n * Components are embeddable UI objects that are represented by both a\n * javascript object and an element in the DOM. They can be children of other\n * components, and can have many children themselves.\n * ```js\n * // adding a button to the player\n * var button = player.addChild('button');\n * button.el(); // -> button element\n * ```\n * ```html\n *
    \n *
    Button
    \n *
    \n * ```\n * Components are also event targets.\n * ```js\n * button.on('click', function(){\n * console.log('Button Clicked!');\n * });\n * button.trigger('customevent');\n * ```\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @class Component\n */\nclass Component {\n\n constructor(player, options, ready) {\n\n // The component might be the player itself and we can't pass `this` to super\n if (!player && this.play) {\n this.player_ = player = this; // eslint-disable-line\n } else {\n this.player_ = player;\n }\n\n // Make a copy of prototype.options_ to protect against overriding defaults\n this.options_ = mergeOptions({}, this.options_);\n\n // Updated options with supplied options\n options = this.options_ = mergeOptions(this.options_, options);\n\n // Get ID from options or options element if one is supplied\n this.id_ = options.id || (options.el && options.el.id);\n\n // If there was no ID from the options, generate one\n if (!this.id_) {\n // Don't require the player ID function in the case of mock players\n let id = player && player.id && player.id() || 'no_player';\n\n this.id_ = `${id}_component_${Guid.newGUID()}`;\n }\n\n this.name_ = options.name || null;\n\n // Create element if one wasn't provided in options\n if (options.el) {\n this.el_ = options.el;\n } else if (options.createEl !== false) {\n this.el_ = this.createEl();\n }\n\n this.children_ = [];\n this.childIndex_ = {};\n this.childNameIndex_ = {};\n\n // Add any child components in options\n if (options.initChildren !== false) {\n this.initChildren();\n }\n\n this.ready(ready);\n // Don't want to trigger ready here or it will before init is actually\n // finished for all children that run this constructor\n\n if (options.reportTouchActivity !== false) {\n this.enableTouchActivity();\n }\n }\n\n /**\n * Dispose of the component and all child components\n *\n * @method dispose\n */\n dispose() {\n this.trigger({ type: 'dispose', bubbles: false });\n\n // Dispose all children.\n if (this.children_) {\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i].dispose) {\n this.children_[i].dispose();\n }\n }\n }\n\n // Delete child references\n this.children_ = null;\n this.childIndex_ = null;\n this.childNameIndex_ = null;\n\n // Remove all event listeners.\n this.off();\n\n // Remove element from DOM\n if (this.el_.parentNode) {\n this.el_.parentNode.removeChild(this.el_);\n }\n\n Dom.removeElData(this.el_);\n this.el_ = null;\n }\n\n /**\n * Return the component's player\n *\n * @return {Player}\n * @method player\n */\n player() {\n return this.player_;\n }\n\n /**\n * Deep merge of options objects\n * Whenever a property is an object on both options objects\n * the two properties will be merged using mergeOptions.\n *\n * ```js\n * Parent.prototype.options_ = {\n * optionSet: {\n * 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' },\n * 'childTwo': {},\n * 'childThree': {}\n * }\n * }\n * newOptions = {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'abc': '123' }\n * 'childTwo': null,\n * 'childFour': {}\n * }\n * }\n *\n * this.options(newOptions);\n * ```\n * RESULT\n * ```js\n * {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' },\n * 'childTwo': null, // Disabled. Won't be initialized.\n * 'childThree': {},\n * 'childFour': {}\n * }\n * }\n * ```\n *\n * @param {Object} obj Object of new option values\n * @return {Object} A NEW object of this.options_ and obj merged\n * @method options\n */\n options(obj) {\n log.warn('this.options() has been deprecated and will be moved to the constructor in 6.0');\n\n if (!obj) {\n return this.options_;\n }\n\n this.options_ = mergeOptions(this.options_, obj);\n return this.options_;\n }\n\n /**\n * Get the component's DOM element\n * ```js\n * var domEl = myComponent.el();\n * ```\n *\n * @return {Element}\n * @method el\n */\n el() {\n return this.el_;\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} tagName Element's node type. e.g. 'div'\n * @param {Object=} properties An object of properties that should be set\n * @param {Object=} attributes An object of attributes that should be set\n * @return {Element}\n * @method createEl\n */\n createEl(tagName, properties, attributes) {\n return Dom.createEl(tagName, properties, attributes);\n }\n\n localize(string) {\n let code = this.player_.language && this.player_.language();\n let languages = this.player_.languages && this.player_.languages();\n\n if (!code || !languages) {\n return string;\n }\n\n let language = languages[code];\n\n if (language && language[string]) {\n return language[string];\n }\n\n let primaryCode = code.split('-')[0];\n let primaryLang = languages[primaryCode];\n\n if (primaryLang && primaryLang[string]) {\n return primaryLang[string];\n }\n\n return string;\n }\n\n /**\n * Return the component's DOM element where children are inserted.\n * Will either be the same as el() or a new element defined in createEl().\n *\n * @return {Element}\n * @method contentEl\n */\n contentEl() {\n return this.contentEl_ || this.el_;\n }\n\n /**\n * Get the component's ID\n * ```js\n * var id = myComponent.id();\n * ```\n *\n * @return {String}\n * @method id\n */\n id() {\n return this.id_;\n }\n\n /**\n * Get the component's name. The name is often used to reference the component.\n * ```js\n * var name = myComponent.name();\n * ```\n *\n * @return {String}\n * @method name\n */\n name() {\n return this.name_;\n }\n\n /**\n * Get an array of all child components\n * ```js\n * var kids = myComponent.children();\n * ```\n *\n * @return {Array} The children\n * @method children\n */\n children() {\n return this.children_;\n }\n\n /**\n * Returns a child component with the provided ID\n *\n * @return {Component}\n * @method getChildById\n */\n getChildById(id) {\n return this.childIndex_[id];\n }\n\n /**\n * Returns a child component with the provided name\n *\n * @return {Component}\n * @method getChild\n */\n getChild(name) {\n return this.childNameIndex_[name];\n }\n\n /**\n * Adds a child component inside this component\n * ```js\n * myComponent.el();\n * // ->
    \n * myComponent.children();\n * // [empty array]\n *\n * var myButton = myComponent.addChild('MyButton');\n * // ->
    myButton
    \n * // -> myButton === myComponent.children()[0];\n * ```\n * Pass in options for child constructors and options for children of the child\n * ```js\n * var myButton = myComponent.addChild('MyButton', {\n * text: 'Press Me',\n * buttonChildExample: {\n * buttonChildOption: true\n * }\n * });\n * ```\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @param {Number} index into our children array to attempt to add the child\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}, index=this.children_.length) {\n let component;\n let componentName;\n\n // If child is a string, create nt with options\n if (typeof child === 'string') {\n componentName = child;\n\n // Options can also be specified as a boolean, so convert to an empty object if false.\n if (!options) {\n options = {};\n }\n\n // Same as above, but true is deprecated so show a warning.\n if (options === true) {\n log.warn('Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`.');\n options = {};\n }\n\n // If no componentClass in options, assume componentClass is the name lowercased\n // (e.g. playButton)\n let componentClassName = options.componentClass || toTitleCase(componentName);\n\n // Set name through options\n options.name = componentName;\n\n // Create a new object & element for this controls set\n // If there's no .player_, this is a player\n let ComponentClass = Component.getComponent(componentClassName);\n\n if (!ComponentClass) {\n throw new Error(`Component ${componentClassName} does not exist`);\n }\n\n // data stored directly on the videojs object may be\n // misidentified as a component to retain\n // backwards-compatibility with 4.x. check to make sure the\n // component class can be instantiated.\n if (typeof ComponentClass !== 'function') {\n return null;\n }\n\n component = new ComponentClass(this.player_ || this, options);\n\n // child is a component instance\n } else {\n component = child;\n }\n\n this.children_.splice(index, 0, component);\n\n if (typeof component.id === 'function') {\n this.childIndex_[component.id()] = component;\n }\n\n // If a name wasn't used to create the component, check if we can use the\n // name function of the component\n componentName = componentName || (component.name && component.name());\n\n if (componentName) {\n this.childNameIndex_[componentName] = component;\n }\n\n // Add the UI object's element to the container div (box)\n // Having an element is not required\n if (typeof component.el === 'function' && component.el()) {\n let childNodes = this.contentEl().children;\n let refNode = childNodes[index] || null;\n this.contentEl().insertBefore(component.el(), refNode);\n }\n\n // Return so it can stored on parent object if desired.\n return component;\n }\n\n /**\n * Remove a child component from this component's list of children, and the\n * child component's element from this component's element\n *\n * @param {Component} component Component to remove\n * @method removeChild\n */\n removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n\n if (!component || !this.children_) {\n return;\n }\n\n let childFound = false;\n\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i] === component) {\n childFound = true;\n this.children_.splice(i, 1);\n break;\n }\n }\n\n if (!childFound) {\n return;\n }\n\n this.childIndex_[component.id()] = null;\n this.childNameIndex_[component.name()] = null;\n\n let compEl = component.el();\n\n if (compEl && compEl.parentNode === this.contentEl()) {\n this.contentEl().removeChild(component.el());\n }\n }\n\n /**\n * Add and initialize default child components from options\n * ```js\n * // when an instance of MyComponent is created, all children in options\n * // will be added to the instance by their name strings and options\n * MyComponent.prototype.options_ = {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * };\n *\n * // Or when creating the component\n * var myComp = new MyComponent(player, {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * });\n * ```\n * The children option can also be an array of\n * child options objects (that also include a 'name' key).\n * This can be used if you have two child components of the\n * same type that need different options.\n * ```js\n * var myComp = new MyComponent(player, {\n * children: [\n * 'button',\n * {\n * name: 'button',\n * someOtherOption: true\n * },\n * {\n * name: 'button',\n * someOtherOption: false\n * }\n * ]\n * });\n * ```\n *\n * @method initChildren\n */\n initChildren() {\n let children = this.options_.children;\n\n if (children) {\n // `this` is `parent`\n let parentOptions = this.options_;\n\n let handleAdd = (child) => {\n let name = child.name;\n let opts = child.opts;\n\n // Allow options for children to be set at the parent options\n // e.g. videojs(id, { controlBar: false });\n // instead of videojs(id, { children: { controlBar: false });\n if (parentOptions[name] !== undefined) {\n opts = parentOptions[name];\n }\n\n // Allow for disabling default components\n // e.g. options['children']['posterImage'] = false\n if (opts === false) {\n return;\n }\n\n // Allow options to be passed as a simple boolean if no configuration\n // is necessary.\n if (opts === true) {\n opts = {};\n }\n\n // We also want to pass the original player options to each component as well so they don't need to\n // reach back into the player for options later.\n opts.playerOptions = this.options_.playerOptions;\n\n // Create and add the child component.\n // Add a direct reference to the child by name on the parent instance.\n // If two of the same component are used, different names should be supplied\n // for each\n let newChild = this.addChild(name, opts);\n if (newChild) {\n this[name] = newChild;\n }\n };\n\n // Allow for an array of children details to passed in the options\n let workingChildren;\n let Tech = Component.getComponent('Tech');\n\n if (Array.isArray(children)) {\n workingChildren = children;\n } else {\n workingChildren = Object.keys(children);\n }\n\n workingChildren\n // children that are in this.options_ but also in workingChildren would\n // give us extra children we do not want. So, we want to filter them out.\n .concat(Object.keys(this.options_)\n .filter(function(child) {\n return !workingChildren.some(function(wchild) {\n if (typeof wchild === 'string') {\n return child === wchild;\n } else {\n return child === wchild.name;\n }\n });\n }))\n .map((child) => {\n let name, opts;\n\n if (typeof child === 'string') {\n name = child;\n opts = children[name] || this.options_[name] || {};\n } else {\n name = child.name;\n opts = child;\n }\n\n return {name, opts};\n })\n .filter((child) => {\n // we have to make sure that child.name isn't in the techOrder since\n // techs are registerd as Components but can't aren't compatible\n // See https://github.com/videojs/video.js/issues/2772\n let c = Component.getComponent(child.opts.componentClass ||\n toTitleCase(child.name));\n return c && !Tech.isTech(c);\n })\n .forEach(handleAdd);\n }\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n // Child classes can include a function that does:\n // return 'CLASS NAME' + this._super();\n return '';\n }\n\n /**\n * Add an event listener to this component's element\n * ```js\n * var myFunc = function(){\n * var myComponent = this;\n * // Do something when the event is fired\n * };\n *\n * myComponent.on('eventType', myFunc);\n * ```\n * The context of myFunc will be myComponent unless previously bound.\n * Alternatively, you can add a listener to another element or component.\n * ```js\n * myComponent.on(otherElement, 'eventName', myFunc);\n * myComponent.on(otherComponent, 'eventName', myFunc);\n * ```\n * The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)`\n * and `otherComponent.on('eventName', myFunc)` is that this way the listeners\n * will be automatically cleaned up when either component is disposed.\n * It will also bind myComponent as the context of myFunc.\n * **NOTE**: When using this on elements in the page other than window\n * and document (both permanent), if you remove the element from the DOM\n * you need to call `myComponent.trigger(el, 'dispose')` on it to clean up\n * references to it and allow the browser to garbage collect it.\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The event handler or event type\n * @param {Function} third The event handler\n * @return {Component}\n * @method on\n */\n on(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.on(this.el_, first, Fn.bind(this, second));\n\n // Targeting another component or element\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n // When this component is disposed, remove the listener from the other component\n const removeOnDispose = () => this.off(target, type, fn);\n\n // Use the same function ID so we can remove it later it using the ID\n // of the original listener\n removeOnDispose.guid = fn.guid;\n this.on('dispose', removeOnDispose);\n\n // If the other component is disposed first we need to clean the reference\n // to the other component in this component's removeOnDispose listener\n // Otherwise we create a memory leak.\n const cleanRemover = () => this.off('dispose', removeOnDispose);\n\n // Add the same function ID so we can easily remove it later\n cleanRemover.guid = fn.guid;\n\n // Check if this is a DOM node\n if (first.nodeName) {\n // Add the listener to the other element\n Events.on(target, type, fn);\n Events.on(target, 'dispose', cleanRemover);\n\n // Should be a component\n // Not using `instanceof Component` because it makes mock players difficult\n } else if (typeof first.on === 'function') {\n // Add the listener to the other component\n target.on(type, fn);\n target.on('dispose', cleanRemover);\n }\n }\n\n return this;\n }\n\n /**\n * Remove an event listener from this component's element\n * ```js\n * myComponent.off('eventType', myFunc);\n * ```\n * If myFunc is excluded, ALL listeners for the event type will be removed.\n * If eventType is excluded, ALL listeners will be removed from the component.\n * Alternatively you can use `off` to remove listeners that were added to other\n * elements or components using `myComponent.on(otherComponent...`.\n * In this case both the event type and listener function are REQUIRED.\n * ```js\n * myComponent.off(otherElement, 'eventType', myFunc);\n * myComponent.off(otherComponent, 'eventType', myFunc);\n * ```\n *\n * @param {String=|Component} first The event type or other component\n * @param {Function=|String} second The listener function or event type\n * @param {Function=} third The listener for other component\n * @return {Component}\n * @method off\n */\n off(first, second, third) {\n if (!first || typeof first === 'string' || Array.isArray(first)) {\n Events.off(this.el_, first, second);\n } else {\n const target = first;\n const type = second;\n // Ensure there's at least a guid, even if the function hasn't been used\n const fn = Fn.bind(this, third);\n\n // Remove the dispose listener on this component,\n // which was given the same guid as the event listener\n this.off('dispose', fn);\n\n if (first.nodeName) {\n // Remove the listener\n Events.off(target, type, fn);\n // Remove the listener for cleaning the dispose listener\n Events.off(target, 'dispose', fn);\n } else {\n target.off(type, fn);\n target.off('dispose', fn);\n }\n }\n\n return this;\n }\n\n /**\n * Add an event listener to be triggered only once and then removed\n * ```js\n * myComponent.one('eventName', myFunc);\n * ```\n * Alternatively you can add a listener to another element or component\n * that will be triggered only once.\n * ```js\n * myComponent.one(otherElement, 'eventName', myFunc);\n * myComponent.one(otherComponent, 'eventName', myFunc);\n * ```\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The listener function or event type\n * @param {Function=} third The listener function for other component\n * @return {Component}\n * @method one\n */\n one(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.one(this.el_, first, Fn.bind(this, second));\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n const newFunc = () => {\n this.off(target, type, newFunc);\n fn.apply(null, arguments);\n };\n\n // Keep the same function ID so we can remove it later\n newFunc.guid = fn.guid;\n\n this.on(target, type, newFunc);\n }\n\n return this;\n }\n\n /**\n * Trigger an event on an element\n * ```js\n * myComponent.trigger('eventName');\n * myComponent.trigger({'type':'eventName'});\n * myComponent.trigger('eventName', {data: 'some data'});\n * myComponent.trigger({'type':'eventName'}, {data: 'some data'});\n * ```\n *\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Component} self\n * @method trigger\n */\n trigger(event, hash) {\n Events.trigger(this.el_, event, hash);\n return this;\n }\n\n /**\n * Bind a listener to the component's ready state.\n * Different from event listeners in that if the ready event has already happened\n * it will trigger the function immediately.\n *\n * @param {Function} fn Ready listener\n * @param {Boolean} sync Exec the listener synchronously if component is ready\n * @return {Component}\n * @method ready\n */\n ready(fn, sync=false) {\n if (fn) {\n if (this.isReady_) {\n if (sync) {\n fn.call(this);\n } else {\n // Call the function asynchronously by default for consistency\n this.setTimeout(fn, 1);\n }\n } else {\n this.readyQueue_ = this.readyQueue_ || [];\n this.readyQueue_.push(fn);\n }\n }\n return this;\n }\n\n /**\n * Trigger the ready listeners\n *\n * @return {Component}\n * @method triggerReady\n */\n triggerReady() {\n this.isReady_ = true;\n\n // Ensure ready is triggerd asynchronously\n this.setTimeout(function(){\n let readyQueue = this.readyQueue_;\n\n // Reset Ready Queue\n this.readyQueue_ = [];\n\n if (readyQueue && readyQueue.length > 0) {\n readyQueue.forEach(function(fn){\n fn.call(this);\n }, this);\n }\n\n // Allow for using event listeners also\n this.trigger('ready');\n }, 1);\n }\n\n /**\n * Finds a single DOM element matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\n $(selector, context) {\n return Dom.$(selector, context || this.contentEl());\n }\n\n /**\n * Finds a all DOM elements matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\n $$(selector, context) {\n return Dom.$$(selector, context || this.contentEl());\n }\n\n /**\n * Check if a component's element has a CSS class name\n *\n * @param {String} classToCheck Classname to check\n * @return {Component}\n * @method hasClass\n */\n hasClass(classToCheck) {\n return Dom.hasElClass(this.el_, classToCheck);\n }\n\n /**\n * Add a CSS class name to the component's element\n *\n * @param {String} classToAdd Classname to add\n * @return {Component}\n * @method addClass\n */\n addClass(classToAdd) {\n Dom.addElClass(this.el_, classToAdd);\n return this;\n }\n\n /**\n * Remove a CSS class name from the component's element\n *\n * @param {String} classToRemove Classname to remove\n * @return {Component}\n * @method removeClass\n */\n removeClass(classToRemove) {\n Dom.removeElClass(this.el_, classToRemove);\n return this;\n }\n\n /**\n * Add or remove a CSS class name from the component's element\n *\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n *\n * @return {Component}\n * @method toggleClass\n */\n toggleClass(classToToggle, predicate) {\n Dom.toggleElClass(this.el_, classToToggle, predicate);\n return this;\n }\n\n /**\n * Show the component element if hidden\n *\n * @return {Component}\n * @method show\n */\n show() {\n this.removeClass('vjs-hidden');\n return this;\n }\n\n /**\n * Hide the component element if currently showing\n *\n * @return {Component}\n * @method hide\n */\n hide() {\n this.addClass('vjs-hidden');\n return this;\n }\n\n /**\n * Lock an item in its visible state\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method lockShowing\n */\n lockShowing() {\n this.addClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Unlock an item to be hidden\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method unlockShowing\n */\n unlockShowing() {\n this.removeClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Set or get the width of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num Optional width number\n * @param {Boolean} skipListeners Skip the 'resize' event trigger\n * @return {Component} This component, when setting the width\n * @return {Number|String} The width, when getting\n * @method width\n */\n width(num, skipListeners) {\n return this.dimension('width', num, skipListeners);\n }\n\n /**\n * Get or set the height of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num New component height\n * @param {Boolean=} skipListeners Skip the resize event trigger\n * @return {Component} This component, when setting the height\n * @return {Number|String} The height, when getting\n * @method height\n */\n height(num, skipListeners) {\n return this.dimension('height', num, skipListeners);\n }\n\n /**\n * Set both width and height at the same time\n *\n * @param {Number|String} width Width of player\n * @param {Number|String} height Height of player\n * @return {Component} The component\n * @method dimensions\n */\n dimensions(width, height) {\n // Skip resize listeners on width for optimization\n return this.width(width, true).height(height);\n }\n\n /**\n * Get or set width or height\n * This is the shared code for the width() and height() methods.\n * All for an integer, integer + 'px' or integer + '%';\n * Known issue: Hidden elements officially have a width of 0. We're defaulting\n * to the style.width value and falling back to computedStyle which has the\n * hidden element issue. Info, but probably not an efficient fix:\n * http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/\n *\n * @param {String} widthOrHeight 'width' or 'height'\n * @param {Number|String=} num New dimension\n * @param {Boolean=} skipListeners Skip resize event trigger\n * @return {Component} The component if a dimension was set\n * @return {Number|String} The dimension if nothing was set\n * @private\n * @method dimension\n */\n dimension(widthOrHeight, num, skipListeners) {\n if (num !== undefined) {\n // Set to zero if null or literally NaN (NaN !== NaN)\n if (num === null || num !== num) {\n num = 0;\n }\n\n // Check if using css width/height (% or px) and adjust\n if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n this.el_.style[widthOrHeight] = num;\n } else if (num === 'auto') {\n this.el_.style[widthOrHeight] = '';\n } else {\n this.el_.style[widthOrHeight] = num + 'px';\n }\n\n // skipListeners allows us to avoid triggering the resize event when setting both width and height\n if (!skipListeners) {\n this.trigger('resize');\n }\n\n // Return component\n return this;\n }\n\n // Not setting a value, so getting it\n // Make sure element exists\n if (!this.el_) {\n return 0;\n }\n\n // Get dimension value from style\n let val = this.el_.style[widthOrHeight];\n let pxIndex = val.indexOf('px');\n\n if (pxIndex !== -1) {\n // Return the pixel value with no 'px'\n return parseInt(val.slice(0, pxIndex), 10);\n }\n\n // No px so using % or no style was set, so falling back to offsetWidth/height\n // If component has display:none, offset will return 0\n // TODO: handle display:none and no dimension style using px\n return parseInt(this.el_['offset' + toTitleCase(widthOrHeight)], 10);\n }\n\n /**\n * Get width or height of computed style\n * @param {String} widthOrHeight 'width' or 'height'\n * @return {Number|Boolean} The bolean false if nothing was set\n * @method currentDimension\n */\n currentDimension(widthOrHeight) {\n let computedWidthOrHeight = 0;\n\n if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n throw new Error('currentDimension only accepts width or height value');\n }\n\n if (typeof window.getComputedStyle === 'function') {\n const computedStyle = window.getComputedStyle(this.el_);\n computedWidthOrHeight = computedStyle.getPropertyValue(widthOrHeight) || computedStyle[widthOrHeight];\n } else if (this.el_.currentStyle) {\n // ie 8 doesn't support computed style, shim it\n // return clientWidth or clientHeight instead for better accuracy\n const rule = `offset${toTitleCase(widthOrHeight)}`;\n computedWidthOrHeight = this.el_[rule];\n }\n\n // remove 'px' from variable and parse as integer\n computedWidthOrHeight = parseFloat(computedWidthOrHeight);\n return computedWidthOrHeight;\n }\n\n /**\n * Get an object which contains width and height values of computed style\n * @return {Object} The dimensions of element\n * @method currentDimensions\n */\n currentDimensions() {\n return {\n width: this.currentDimension('width'),\n height: this.currentDimension('height')\n };\n }\n\n /**\n * Get width of computed style\n * @return {Integer}\n * @method currentWidth\n */\n currentWidth() {\n return this.currentDimension('width');\n }\n\n /**\n * Get height of computed style\n * @return {Integer}\n * @method currentHeight\n */\n currentHeight() {\n return this.currentDimension('height');\n }\n\n /**\n * Emit 'tap' events when touch events are supported\n * This is used to support toggling the controls through a tap on the video.\n * We're requiring them to be enabled because otherwise every component would\n * have this extra overhead unnecessarily, on mobile devices where extra\n * overhead is especially bad.\n *\n * @private\n * @method emitTapEvents\n */\n emitTapEvents() {\n // Track the start time so we can determine how long the touch lasted\n let touchStart = 0;\n let firstTouch = null;\n\n // Maximum movement allowed during a touch event to still be considered a tap\n // Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number.\n const tapMovementThreshold = 10;\n\n // The maximum length a touch can be while still being considered a tap\n const touchTimeThreshold = 200;\n\n let couldBeTap;\n\n this.on('touchstart', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length === 1) {\n // Copy the touches object to prevent modifying the original\n firstTouch = assign({}, event.touches[0]);\n // Record start time so we can detect a tap vs. \"touch and hold\"\n touchStart = new Date().getTime();\n // Reset couldBeTap tracking\n couldBeTap = true;\n }\n });\n\n this.on('touchmove', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length > 1) {\n couldBeTap = false;\n } else if (firstTouch) {\n // Some devices will throw touchmoves for all but the slightest of taps.\n // So, if we moved only a small distance, this could still be a tap\n const xdiff = event.touches[0].pageX - firstTouch.pageX;\n const ydiff = event.touches[0].pageY - firstTouch.pageY;\n const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n\n if (touchDistance > tapMovementThreshold) {\n couldBeTap = false;\n }\n }\n });\n\n const noTap = function() {\n couldBeTap = false;\n };\n\n // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n this.on('touchleave', noTap);\n this.on('touchcancel', noTap);\n\n // When the touch ends, measure how long it took and trigger the appropriate\n // event\n this.on('touchend', function(event) {\n firstTouch = null;\n // Proceed only if the touchmove/leave/cancel event didn't happen\n if (couldBeTap === true) {\n // Measure how long the touch lasted\n const touchTime = new Date().getTime() - touchStart;\n\n // Make sure the touch was less than the threshold to be considered a tap\n if (touchTime < touchTimeThreshold) {\n // Don't let browser turn this into a click\n event.preventDefault();\n this.trigger('tap');\n // It may be good to copy the touchend event object and change the\n // type to tap, if the other event properties aren't exact after\n // Events.fixEvent runs (e.g. event.target)\n }\n }\n });\n }\n\n /**\n * Report user touch activity when touch events occur\n * User activity is used to determine when controls should show/hide. It's\n * relatively simple when it comes to mouse events, because any mouse event\n * should show the controls. So we capture mouse events that bubble up to the\n * player and report activity when that happens.\n * With touch events it isn't as easy. We can't rely on touch events at the\n * player level, because a tap (touchstart + touchend) on the video itself on\n * mobile devices is meant to turn controls off (and on). User activity is\n * checked asynchronously, so what could happen is a tap event on the video\n * turns the controls off, then the touchend event bubbles up to the player,\n * which if it reported user activity, would turn the controls right back on.\n * (We also don't want to completely block touch events from bubbling up)\n * Also a touchmove, touch+hold, and anything other than a tap is not supposed\n * to turn the controls back on on a mobile device.\n * Here we're setting the default component behavior to report user activity\n * whenever touch events happen, and this can be turned off by components that\n * want touch events to act differently.\n *\n * @method enableTouchActivity\n */\n enableTouchActivity() {\n // Don't continue if the root player doesn't support reporting user activity\n if (!this.player() || !this.player().reportUserActivity) {\n return;\n }\n\n // listener for reporting that the user is active\n const report = Fn.bind(this.player(), this.player().reportUserActivity);\n\n let touchHolding;\n\n this.on('touchstart', function() {\n report();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(touchHolding);\n // report at the same interval as activityCheck\n touchHolding = this.setInterval(report, 250);\n });\n\n const touchEnd = function(event) {\n report();\n // stop the interval that maintains activity if the touch is holding\n this.clearInterval(touchHolding);\n };\n\n this.on('touchmove', report);\n this.on('touchend', touchEnd);\n this.on('touchcancel', touchEnd);\n }\n\n /**\n * Creates timeout and sets up disposal automatically.\n *\n * @param {Function} fn The function to run after the timeout.\n * @param {Number} timeout Number of ms to delay before executing specified function.\n * @return {Number} Returns the timeout ID\n * @method setTimeout\n */\n setTimeout(fn, timeout) {\n fn = Fn.bind(this, fn);\n\n // window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't.\n let timeoutId = window.setTimeout(fn, timeout);\n\n const disposeFn = function() {\n this.clearTimeout(timeoutId);\n };\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.on('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Clears a timeout and removes the associated dispose listener\n *\n * @param {Number} timeoutId The id of the timeout to clear\n * @return {Number} Returns the timeout ID\n * @method clearTimeout\n */\n clearTimeout(timeoutId) {\n window.clearTimeout(timeoutId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.off('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Creates an interval and sets up disposal automatically.\n *\n * @param {Function} fn The function to run every N seconds.\n * @param {Number} interval Number of ms to delay before executing specified function.\n * @return {Number} Returns the interval ID\n * @method setInterval\n */\n setInterval(fn, interval) {\n fn = Fn.bind(this, fn);\n\n let intervalId = window.setInterval(fn, interval);\n\n const disposeFn = function() {\n this.clearInterval(intervalId);\n };\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.on('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Clears an interval and removes the associated dispose listener\n *\n * @param {Number} intervalId The id of the interval to clear\n * @return {Number} Returns the interval ID\n * @method clearInterval\n */\n clearInterval(intervalId) {\n window.clearInterval(intervalId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.off('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Registers a component\n *\n * @param {String} name Name of the component to register\n * @param {Object} comp The component to register\n * @static\n * @method registerComponent\n */\n static registerComponent(name, comp) {\n if (!Component.components_) {\n Component.components_ = {};\n }\n\n Component.components_[name] = comp;\n return comp;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getComponent(name) {\n if (Component.components_ && Component.components_[name]) {\n return Component.components_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)`);\n return window.videojs[name];\n }\n }\n\n /**\n * Sets up the constructor using the supplied init method\n * or uses the init of the parent object\n *\n * @param {Object} props An object of properties\n * @static\n * @deprecated\n * @method extend\n */\n static extend(props) {\n props = props || {};\n\n log.warn('Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead');\n\n // Set up the constructor using the supplied init method\n // or using the init of the parent object\n // Make sure to check the unobfuscated version for external libs\n let init = props.init || props.init || this.prototype.init || this.prototype.init || function() {};\n // In Resig's simple class inheritance (previously used) the constructor\n // is a function that calls `this.init.apply(arguments)`\n // However that would prevent us from using `ParentObject.call(this);`\n // in a Child constructor because the `this` in `this.init`\n // would still refer to the Child and cause an infinite loop.\n // We would instead have to do\n // `ParentObject.prototype.init.apply(this, arguments);`\n // Bleh. We're not creating a _super() function, so it's good to keep\n // the parent constructor reference simple.\n let subObj = function() {\n init.apply(this, arguments);\n };\n\n // Inherit from this object's prototype\n subObj.prototype = Object.create(this.prototype);\n // Reset the constructor property for subObj otherwise\n // instances of subObj would have the constructor of the parent Object\n subObj.prototype.constructor = subObj;\n\n // Make the class extendable\n subObj.extend = Component.extend;\n\n // Extend subObj's prototype with functions and other properties from props\n for (let name in props) {\n if (props.hasOwnProperty(name)) {\n subObj.prototype[name] = props[name];\n }\n }\n\n return subObj;\n }\n}\n\nComponent.registerComponent('Component', Component);\nexport default Component;\n","/**\n * @file control-bar.js\n */\nimport Component from '../component.js';\n\n// Required children\nimport PlayToggle from './play-toggle.js';\nimport CurrentTimeDisplay from './time-controls/current-time-display.js';\nimport DurationDisplay from './time-controls/duration-display.js';\nimport TimeDivider from './time-controls/time-divider.js';\nimport RemainingTimeDisplay from './time-controls/remaining-time-display.js';\nimport LiveDisplay from './live-display.js';\nimport ProgressControl from './progress-control/progress-control.js';\nimport FullscreenToggle from './fullscreen-toggle.js';\nimport VolumeControl from './volume-control/volume-control.js';\nimport VolumeMenuButton from './volume-menu-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport ChaptersButton from './text-track-controls/chapters-button.js';\nimport DescriptionsButton from './text-track-controls/descriptions-button.js';\nimport SubtitlesButton from './text-track-controls/subtitles-button.js';\nimport CaptionsButton from './text-track-controls/captions-button.js';\nimport PlaybackRateMenuButton from './playback-rate-menu/playback-rate-menu-button.js';\nimport CustomControlSpacer from './spacer-controls/custom-control-spacer.js';\n\n/**\n * Container of main controls\n *\n * @extends Component\n * @class ControlBar\n */\nclass ControlBar extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-control-bar',\n dir: 'ltr'\n }, {\n 'role': 'group' // The control bar is a group, so it can contain menuitems\n });\n }\n}\n\nControlBar.prototype.options_ = {\n loadEvent: 'play',\n children: [\n 'playToggle',\n 'volumeMenuButton',\n 'currentTimeDisplay',\n 'timeDivider',\n 'durationDisplay',\n 'progressControl',\n 'liveDisplay',\n 'remainingTimeDisplay',\n 'customControlSpacer',\n 'playbackRateMenuButton',\n 'chaptersButton',\n 'descriptionsButton',\n 'subtitlesButton',\n 'captionsButton',\n 'fullscreenToggle'\n ]\n};\n\nComponent.registerComponent('ControlBar', ControlBar);\nexport default ControlBar;\n","/**\n * @file fullscreen-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n * @class FullscreenToggle\n */\nclass FullscreenToggle extends Button {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-fullscreen-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles click for full screen\n *\n * @method handleClick\n */\n handleClick() {\n if (!this.player_.isFullscreen()) {\n this.player_.requestFullscreen();\n this.controlText('Non-Fullscreen');\n } else {\n this.player_.exitFullscreen();\n this.controlText('Fullscreen');\n }\n }\n\n}\n\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\n\nComponent.registerComponent('FullscreenToggle', FullscreenToggle);\nexport default FullscreenToggle;\n","/**\n * @file live-display.js\n */\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * Displays the live indicator\n * TODO - Future make it click to snap to live\n *\n * @extends Component\n * @class LiveDisplay\n */\nclass LiveDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.updateShowing();\n this.on(this.player(), 'durationchange', this.updateShowing);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n var el = super.createEl('div', {\n className: 'vjs-live-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-live-display',\n innerHTML: `${this.localize('Stream Type')}${this.localize('LIVE')}`\n }, {\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n updateShowing() {\n if (this.player().duration() === Infinity) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n}\n\nComponent.registerComponent('LiveDisplay', LiveDisplay);\nexport default LiveDisplay;\n","/**\n * @file mute-toggle.js\n */\nimport Button from '../button';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * A button component for muting the audio\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MuteToggle\n */\nclass MuteToggle extends Button {\n\n constructor(player, options) {\n super(player, options);\n\n this.on(player, 'volumechange', this.update);\n\n // hide mute toggle if the current tech doesn't support volume control\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n\n this.on(player, 'loadstart', function() {\n this.update(); // We need to update the button to account for a default muted state.\n\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-mute-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click on mute\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.muted( this.player_.muted() ? false : true );\n }\n\n /**\n * Update volume\n *\n * @method update\n */\n update() {\n var vol = this.player_.volume(),\n level = 3;\n\n if (vol === 0 || this.player_.muted()) {\n level = 0;\n } else if (vol < 0.33) {\n level = 1;\n } else if (vol < 0.67) {\n level = 2;\n }\n\n // Don't rewrite the button text if the actual text doesn't change.\n // This causes unnecessary and confusing information for screen reader users.\n // This check is needed because this function gets called every time the volume level is changed.\n let toMute = this.player_.muted() ? 'Unmute' : 'Mute';\n if (this.controlText() !== toMute) {\n this.controlText(toMute);\n }\n\n /* TODO improve muted icon classes */\n for (var i = 0; i < 4; i++) {\n Dom.removeElClass(this.el_, `vjs-vol-${i}`);\n }\n Dom.addElClass(this.el_, `vjs-vol-${level}`);\n }\n\n}\n\nMuteToggle.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('MuteToggle', MuteToggle);\nexport default MuteToggle;\n","/**\n * @file play-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Button to toggle between play and pause\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PlayToggle\n */\nclass PlayToggle extends Button {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'play', this.handlePlay);\n this.on(player, 'pause', this.handlePause);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-play-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click to toggle between play and pause\n *\n * @method handleClick\n */\n handleClick() {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n /**\n * Add the vjs-playing class to the element so it can change appearance\n *\n * @method handlePlay\n */\n handlePlay() {\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n this.controlText('Pause'); // change the button text to \"Pause\"\n }\n\n /**\n * Add the vjs-paused class to the element so it can change appearance\n *\n * @method handlePause\n */\n handlePause() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.controlText('Play'); // change the button text to \"Play\"\n }\n\n}\n\nPlayToggle.prototype.controlText_ = 'Play';\n\nComponent.registerComponent('PlayToggle', PlayToggle);\nexport default PlayToggle;\n","/**\n * @file playback-rate-menu-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Menu from '../../menu/menu.js';\nimport PlaybackRateMenuItem from './playback-rate-menu-item.js';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * The component for controlling the playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class PlaybackRateMenuButton\n */\nclass PlaybackRateMenuButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n this.updateVisibility();\n this.updateLabel();\n\n this.on(player, 'loadstart', this.updateVisibility);\n this.on(player, 'ratechange', this.updateLabel);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl();\n\n this.labelEl_ = Dom.createEl('div', {\n className: 'vjs-playback-rate-value',\n innerHTML: 1.0\n });\n\n el.appendChild(this.labelEl_);\n\n return el;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-playback-rate ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the playback rate menu\n *\n * @return {Menu} Menu object populated with items\n * @method createMenu\n */\n createMenu() {\n let menu = new Menu(this.player());\n let rates = this.playbackRates();\n\n if (rates) {\n for (let i = rates.length - 1; i >= 0; i--) {\n menu.addChild(\n new PlaybackRateMenuItem(this.player(), { 'rate': rates[i] + 'x'})\n );\n }\n }\n\n return menu;\n }\n\n /**\n * Updates ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current playback rate\n this.el().setAttribute('aria-valuenow', this.player().playbackRate());\n }\n\n /**\n * Handle menu item click\n *\n * @method handleClick\n */\n handleClick() {\n // select next rate option\n let currentRate = this.player().playbackRate();\n let rates = this.playbackRates();\n\n // this will select first one if the last one currently selected\n let newRate = rates[0];\n for (let i = 0; i < rates.length ; i++) {\n if (rates[i] > currentRate) {\n newRate = rates[i];\n break;\n }\n }\n this.player().playbackRate(newRate);\n }\n\n /**\n * Get possible playback rates\n *\n * @return {Array} Possible playback rates\n * @method playbackRates\n */\n playbackRates() {\n return this.options_['playbackRates'] || (this.options_.playerOptions && this.options_.playerOptions['playbackRates']);\n }\n\n /**\n * Get supported playback rates\n *\n * @return {Array} Supported playback rates\n * @method playbackRateSupported\n */\n playbackRateSupported() {\n return this.player().tech_\n && this.player().tech_['featuresPlaybackRate']\n && this.playbackRates()\n && this.playbackRates().length > 0\n ;\n }\n\n /**\n * Hide playback rate controls when they're no playback rate options to select\n *\n * @method updateVisibility\n */\n updateVisibility() {\n if (this.playbackRateSupported()) {\n this.removeClass('vjs-hidden');\n } else {\n this.addClass('vjs-hidden');\n }\n }\n\n /**\n * Update button label when rate changed\n *\n * @method updateLabel\n */\n updateLabel() {\n if (this.playbackRateSupported()) {\n this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\n }\n }\n\n}\n\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\n\nComponent.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\nexport default PlaybackRateMenuButton;\n","/**\n * @file playback-rate-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The specific menu item type for selecting a playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class PlaybackRateMenuItem\n */\nclass PlaybackRateMenuItem extends MenuItem {\n\n constructor(player, options){\n let label = options['rate'];\n let rate = parseFloat(label, 10);\n\n // Modify options for parent MenuItem class's init.\n options['label'] = label;\n options['selected'] = rate === 1;\n super(player, options);\n\n this.label = label;\n this.rate = rate;\n\n this.on(player, 'ratechange', this.update);\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player().playbackRate(this.rate);\n }\n\n /**\n * Update playback rate with selected rate\n *\n * @method update\n */\n update() {\n this.selected(this.player().playbackRate() === this.rate);\n }\n\n}\n\nPlaybackRateMenuItem.prototype.contentElType = 'button';\n\nComponent.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\nexport default PlaybackRateMenuItem;\n","/**\n * @file load-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * Shows load progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class LoadProgressBar\n */\nclass LoadProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'progress', this.update);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-load-progress',\n innerHTML: `${this.localize('Loaded')}: 0%`\n });\n }\n\n /**\n * Update progress bar\n *\n * @method update\n */\n update() {\n let buffered = this.player_.buffered();\n let duration = this.player_.duration();\n let bufferedEnd = this.player_.bufferedEnd();\n let children = this.el_.children;\n\n // get the percent width of a time compared to the total end\n let percentify = function (time, end){\n let percent = (time / end) || 0; // no NaN\n return ((percent >= 1 ? 1 : percent) * 100) + '%';\n };\n\n // update the width of the progress bar\n this.el_.style.width = percentify(bufferedEnd, duration);\n\n // add child elements to represent the individual buffered time ranges\n for (let i = 0; i < buffered.length; i++) {\n let start = buffered.start(i);\n let end = buffered.end(i);\n let part = children[i];\n\n if (!part) {\n part = this.el_.appendChild(Dom.createEl());\n }\n\n // set the percent based on the width of the progress bar (bufferedEnd)\n part.style.left = percentify(start, bufferedEnd);\n part.style.width = percentify(end - start, bufferedEnd);\n }\n\n // remove unused buffered range elements\n for (let i = children.length; i > buffered.length; i--) {\n this.el_.removeChild(children[i-1]);\n }\n }\n\n}\n\nComponent.registerComponent('LoadProgressBar', LoadProgressBar);\nexport default LoadProgressBar;\n","/**\n * @file mouse-time-display.js\n */\nimport window from 'global/window';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport throttle from 'lodash-compat/function/throttle';\n\n/**\n * The Mouse Time Display component shows the time you will seek to\n * when hovering over the progress bar\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class MouseTimeDisplay\n */\nclass MouseTimeDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.tooltip = Dom.createEl('div', {className: 'vjs-time-tooltip'});\n this.el().appendChild(this.tooltip);\n this.addClass('vjs-keep-tooltips-inside');\n }\n\n this.update(0, 0);\n\n player.on('ready', () => {\n this.on(player.controlBar.progressControl.el(), 'mousemove', throttle(Fn.bind(this, this.handleMouseMove), 25));\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-mouse-display'\n });\n }\n\n handleMouseMove(event) {\n let duration = this.player_.duration();\n let newTime = this.calculateDistance(event) * duration;\n let position = event.pageX - Dom.findElPosition(this.el().parentNode).left;\n\n this.update(newTime, position);\n }\n\n update(newTime, position) {\n let time = formatTime(newTime, this.player_.duration());\n\n this.el().style.left = position + 'px';\n this.el().setAttribute('data-current-time', time);\n\n if (this.keepTooltipsInside) {\n let clampedPosition = this.clampPosition_(position);\n let difference = position - clampedPosition + 1;\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltip).width);\n let tooltipWidthHalf = tooltipWidth / 2;\n\n this.tooltip.innerHTML = time;\n this.tooltip.style.right = `-${tooltipWidthHalf - difference}px`;\n }\n }\n\n calculateDistance(event) {\n return Dom.getPointerPosition(this.el().parentNode, event).x;\n }\n\n /**\n * This takes in a horizontal position for the bar and returns a clamped position.\n * Clamped position means that it will keep the position greater than half the width\n * of the tooltip and smaller than the player width minus half the width o the tooltip.\n * It will only clamp the position if `keepTooltipsInside` option is set.\n *\n * @param {Number} position the position the bar wants to be\n * @return {Number} newPosition the (potentially) clamped position\n * @method clampPosition_\n */\n clampPosition_(position) {\n if (!this.keepTooltipsInside) {\n return position;\n }\n\n let playerWidth = parseFloat(window.getComputedStyle(this.player().el()).width);\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltip).width);\n let tooltipWidthHalf = tooltipWidth / 2;\n let actualPosition = position;\n\n if (position < tooltipWidthHalf) {\n actualPosition = Math.ceil(tooltipWidthHalf);\n } else if (position > (playerWidth - tooltipWidthHalf)) {\n actualPosition = Math.floor(playerWidth - tooltipWidthHalf);\n }\n\n return actualPosition;\n }\n}\n\nComponent.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\nexport default MouseTimeDisplay;\n","/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass PlayProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.addClass('vjs-keep-tooltips-inside');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-play-progress vjs-slider-bar',\n innerHTML: `${this.localize('Progress')}: 0%`\n });\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.el_.setAttribute('data-current-time', formatTime(time, this.player_.duration()));\n }\n\n}\n\nComponent.registerComponent('PlayProgressBar', PlayProgressBar);\nexport default PlayProgressBar;\n","/**\n * @file progress-control.js\n */\nimport Component from '../../component.js';\nimport SeekBar from './seek-bar.js';\nimport MouseTimeDisplay from './mouse-time-display.js';\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class ProgressControl\n */\nclass ProgressControl extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-control vjs-control'\n });\n }\n}\n\nProgressControl.prototype.options_ = {\n children: [\n 'seekBar'\n ]\n};\n\nComponent.registerComponent('ProgressControl', ProgressControl);\nexport default ProgressControl;\n","/**\n * @file seek-bar.js\n */\nimport window from 'global/window';\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport LoadProgressBar from './load-progress-bar.js';\nimport PlayProgressBar from './play-progress-bar.js';\nimport TooltipProgressBar from './tooltip-progress-bar.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport assign from 'object.assign';\n\n/**\n * Seek Bar and holder for the progress bars\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class SeekBar\n */\nclass SeekBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'timeupdate', this.updateProgress);\n this.on(player, 'ended', this.updateProgress);\n player.ready(Fn.bind(this, this.updateProgress));\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.tooltipProgressBar = this.addChild('TooltipProgressBar');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-holder'\n }, {\n 'aria-label': 'progress bar'\n });\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateProgress() {\n this.updateAriaAttributes(this.el_);\n\n if (this.keepTooltipsInside) {\n this.updateAriaAttributes(this.tooltipProgressBar.el_);\n this.tooltipProgressBar.el_.style.width = this.bar.el_.style.width;\n\n let playerWidth = parseFloat(window.getComputedStyle(this.player().el()).width);\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltipProgressBar.tooltip).width);\n let tooltipStyle = this.tooltipProgressBar.el().style;\n tooltipStyle.maxWidth = Math.floor(playerWidth - (tooltipWidth / 2)) + 'px';\n tooltipStyle.minWidth = Math.ceil(tooltipWidth / 2) + 'px';\n tooltipStyle.right = `-${tooltipWidth / 2}px`;\n }\n }\n\n updateAriaAttributes(el) {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n el.setAttribute('aria-valuenow', (this.getPercent() * 100).toFixed(2)); // machine readable value of progress bar (percentage complete)\n el.setAttribute('aria-valuetext', formatTime(time, this.player_.duration())); // human readable value of progress bar (time complete)\n }\n\n /**\n * Get percentage of video played\n *\n * @return {Number} Percentage played\n * @method getPercent\n */\n getPercent() {\n let percent = this.player_.currentTime() / this.player_.duration();\n return percent >= 1 ? 1 : percent;\n }\n\n /**\n * Handle mouse down on seek bar\n *\n * @method handleMouseDown\n */\n handleMouseDown(event) {\n super.handleMouseDown(event);\n\n this.player_.scrubbing(true);\n\n this.videoWasPlaying = !this.player_.paused();\n this.player_.pause();\n }\n\n /**\n * Handle mouse move on seek bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n let newTime = this.calculateDistance(event) * this.player_.duration();\n\n // Don't let video end while scrubbing.\n if (newTime === this.player_.duration()) { newTime = newTime - 0.1; }\n\n // Set new time (tell player to seek to new time)\n this.player_.currentTime(newTime);\n }\n\n /**\n * Handle mouse up on seek bar\n *\n * @method handleMouseUp\n */\n handleMouseUp(event) {\n super.handleMouseUp(event);\n\n this.player_.scrubbing(false);\n if (this.videoWasPlaying) {\n this.player_.play();\n }\n }\n\n /**\n * Move more quickly fast forward for keyboard-only users\n *\n * @method stepForward\n */\n stepForward() {\n this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users\n }\n\n /**\n * Move more quickly rewind for keyboard-only users\n *\n * @method stepBack\n */\n stepBack() {\n this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users\n }\n\n}\n\nSeekBar.prototype.options_ = {\n children: [\n 'loadProgressBar',\n 'mouseTimeDisplay',\n 'playProgressBar'\n ],\n 'barName': 'playProgressBar'\n};\n\nSeekBar.prototype.playerEvent = 'timeupdate';\n\nComponent.registerComponent('SeekBar', SeekBar);\nexport default SeekBar;\n","/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass TooltipProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-tooltip-progress-bar vjs-slider-bar',\n innerHTML: `
    \n ${this.localize('Progress')}: 0%`\n });\n\n this.tooltip = el.querySelector('.vjs-time-tooltip');\n\n return el;\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let formattedTime = formatTime(time, this.player_.duration());\n this.el_.setAttribute('data-current-time', formattedTime);\n this.tooltip.innerHTML = formattedTime;\n }\n\n}\n\nComponent.registerComponent('TooltipProgressBar', TooltipProgressBar);\nexport default TooltipProgressBar;\n","/**\n * @file custom-control-spacer.js\n */\nimport Spacer from './spacer.js';\nimport Component from '../../component.js';\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n * @class CustomControlSpacer\n */\nclass CustomControlSpacer extends Spacer {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl({\n className: this.buildCSSClass(),\n });\n\n // No-flex/table-cell mode requires there be some content\n // in the cell to fill the remaining space of the table.\n el.innerHTML = ' ';\n return el;\n }\n}\n\nComponent.registerComponent('CustomControlSpacer', CustomControlSpacer);\nexport default CustomControlSpacer;\n","/**\n * @file spacer.js\n */\nimport Component from '../../component.js';\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n * @class Spacer\n */\nclass Spacer extends Component {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n}\n\nComponent.registerComponent('Spacer', Spacer);\n\nexport default Spacer;\n","/**\n * @file caption-settings-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The menu item for caption track settings menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class CaptionSettingsMenuItem\n */\n class CaptionSettingsMenuItem extends TextTrackMenuItem {\n\n constructor(player, options) {\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' settings',\n 'selectable': false,\n 'default': false,\n mode: 'disabled'\n };\n\n // CaptionSettingsMenuItem has no concept of 'selected'\n options['selectable'] = false;\n\n super(player, options);\n this.addClass('vjs-texttrack-settings');\n this.controlText(', opens ' + options['kind'] + ' settings dialog');\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n this.player().getChild('textTrackSettings').show();\n this.player().getChild('textTrackSettings').el_.focus();\n }\n\n}\n\nComponent.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\nexport default CaptionSettingsMenuItem;\n","/**\n * @file captions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport CaptionSettingsMenuItem from './caption-settings-menu-item.js';\n\n/**\n * The button component for toggling and selecting captions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class CaptionsButton\n */\nclass CaptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Captions Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-captions-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Update caption menu items\n *\n * @method update\n */\n update() {\n let threshold = 2;\n super.update();\n\n // if native, then threshold is 1 because no settings button\n if (this.player().tech_ && this.player().tech_['featuresNativeTextTracks']) {\n threshold = 1;\n }\n\n if (this.items && this.items.length > threshold) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Create caption menu items\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n if (!(this.player().tech_ && this.player().tech_['featuresNativeTextTracks'])) {\n items.push(new CaptionSettingsMenuItem(this.player_, { 'kind': this.kind_ }));\n }\n\n return super.createItems(items);\n }\n\n}\n\nCaptionsButton.prototype.kind_ = 'captions';\nCaptionsButton.prototype.controlText_ = 'Captions';\n\nComponent.registerComponent('CaptionsButton', CaptionsButton);\nexport default CaptionsButton;\n","/**\n * @file chapters-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport ChaptersTrackMenuItem from './chapters-track-menu-item.js';\nimport Menu from '../../menu/menu.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport toTitleCase from '../../utils/to-title-case.js';\nimport window from 'global/window';\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class ChaptersButton\n */\nclass ChaptersButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Chapters Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-chapters-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Create a menu item for each text track\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n /**\n * Create menu from chapter buttons\n *\n * @return {Menu} Menu of chapter buttons\n * @method createMenu\n */\n createMenu() {\n let tracks = this.player_.textTracks() || [];\n let chaptersTrack;\n let items = this.items = [];\n\n for (let i = 0, length = tracks.length; i < length; i++) {\n let track = tracks[i];\n\n if (track['kind'] === this.kind_) {\n chaptersTrack = track;\n\n break;\n }\n }\n\n let menu = this.menu;\n if (menu === undefined) {\n menu = new Menu(this.player_);\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.kind_),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n if (chaptersTrack && chaptersTrack.cues == null) {\n chaptersTrack['mode'] = 'hidden';\n\n let remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(chaptersTrack);\n\n if (remoteTextTrackEl) {\n remoteTextTrackEl.addEventListener('load', (event) => this.update());\n }\n }\n\n if (chaptersTrack && chaptersTrack.cues && chaptersTrack.cues.length > 0) {\n let cues = chaptersTrack['cues'], cue;\n\n for (let i = 0, l = cues.length; i < l; i++) {\n cue = cues[i];\n\n let mi = new ChaptersTrackMenuItem(this.player_, {\n 'track': chaptersTrack,\n 'cue': cue\n });\n\n items.push(mi);\n\n menu.addChild(mi);\n }\n\n this.addChild(menu);\n }\n\n if (this.items.length > 0) {\n this.show();\n }\n\n return menu;\n }\n\n}\n\nChaptersButton.prototype.kind_ = 'chapters';\nChaptersButton.prototype.controlText_ = 'Chapters';\n\nComponent.registerComponent('ChaptersButton', ChaptersButton);\nexport default ChaptersButton;\n","/**\n * @file chapters-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The chapter track menu item\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class ChaptersTrackMenuItem\n */\nclass ChaptersTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let cue = options['cue'];\n let currentTime = player.currentTime();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = cue.text;\n options['selected'] = (cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n super(player, options);\n\n this.track = track;\n this.cue = cue;\n track.addEventListener('cuechange', Fn.bind(this, this.update));\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player_.currentTime(this.cue.startTime);\n this.update(this.cue.startTime);\n }\n\n /**\n * Update chapter menu item\n *\n * @method update\n */\n update() {\n let cue = this.cue;\n let currentTime = this.player_.currentTime();\n\n // vjs.log(currentTime, cue.startTime);\n this.selected(cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n }\n\n}\n\nComponent.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\nexport default ChaptersTrackMenuItem;\n","/**\n * @file descriptions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The button component for toggling and selecting descriptions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class DescriptionsButton\n */\nclass DescriptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label', 'Descriptions Menu');\n\n let tracks = player.textTracks();\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let disabled = false;\n\n // Check whether a track of a different kind is showing\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] !== this.kind_ && track['mode'] === 'showing') {\n disabled = true;\n break;\n }\n }\n\n // If another track is showing, disable this menu button\n if (disabled) {\n this.disable();\n } else {\n this.enable();\n }\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-descriptions-button ${super.buildCSSClass()}`;\n }\n\n}\n\nDescriptionsButton.prototype.kind_ = 'descriptions';\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\n\nComponent.registerComponent('DescriptionsButton', DescriptionsButton);\nexport default DescriptionsButton;\n","/**\n * @file off-text-track-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * A special menu item for turning of a specific type of text track\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class OffTextTrackMenuItem\n */\nclass OffTextTrackMenuItem extends TextTrackMenuItem {\n\n constructor(player, options){\n // Create pseudo track info\n // Requires options['kind']\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' off',\n 'default': false,\n 'mode': 'disabled'\n };\n\n // MenuItem is selectable\n options['selectable'] = true;\n\n super(player, options);\n this.selected(true);\n }\n\n /**\n * Handle text track change\n *\n * @param {Object} event Event object\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let selected = true;\n\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] === this.track['kind'] && track['mode'] === 'showing') {\n selected = false;\n break;\n }\n }\n\n this.selected(selected);\n }\n\n}\n\nComponent.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\nexport default OffTextTrackMenuItem;\n","/**\n * @file subtitles-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class SubtitlesButton\n */\nclass SubtitlesButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Subtitles Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-subtitles-button ${super.buildCSSClass()}`;\n }\n\n}\n\nSubtitlesButton.prototype.kind_ = 'subtitles';\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\n\nComponent.registerComponent('SubtitlesButton', SubtitlesButton);\nexport default SubtitlesButton;\n","/**\n * @file text-track-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport OffTextTrackMenuItem from './off-text-track-menu-item.js';\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class TextTrackButton\n */\nclass TextTrackButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n let tracks = this.player_.textTracks();\n\n if (this.items.length <= 1) {\n this.hide();\n }\n\n if (!tracks) {\n return;\n }\n\n let updateHandler = Fn.bind(this, this.update);\n tracks.addEventListener('removetrack', updateHandler);\n tracks.addEventListener('addtrack', updateHandler);\n\n this.player_.on('dispose', function() {\n tracks.removeEventListener('removetrack', updateHandler);\n tracks.removeEventListener('addtrack', updateHandler);\n });\n }\n\n // Create a menu item for each text track\n createItems(items=[]) {\n // Add an OFF menu item to turn all tracks off\n items.push(new OffTextTrackMenuItem(this.player_, { 'kind': this.kind_ }));\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // only add tracks that are of the appropriate kind and have a label\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n // MenuItem is selectable\n 'selectable': true,\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n}\n\nComponent.registerComponent('TextTrackButton', TextTrackButton);\nexport default TextTrackButton;\n","/**\n * @file text-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class TextTrackMenuItem\n */\nclass TextTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let tracks = player.textTracks();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = track['label'] || track['language'] || 'Unknown';\n options['selected'] = track['default'] || track['mode'] === 'showing';\n\n super(player, options);\n\n this.track = track;\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n\n // iOS7 doesn't dispatch change events to TextTrackLists when an\n // associated track's mode changes. Without something like\n // Object.observe() (also not present on iOS7), it's not\n // possible to detect changes to the mode attribute and polyfill\n // the change event. As a poor substitute, we manually dispatch\n // change events whenever the controls modify the mode.\n if (tracks && tracks.onchange === undefined) {\n let event;\n\n this.on(['tap', 'click'], function() {\n if (typeof window.Event !== 'object') {\n // Android 2.3 throws an Illegal Constructor error for window.Event\n try {\n event = new window.Event('change');\n } catch(err){}\n }\n\n if (!event) {\n event = document.createEvent('Event');\n event.initEvent('change', true, true);\n }\n\n tracks.dispatchEvent(event);\n });\n }\n }\n\n /**\n * Handle click on text track\n *\n * @method handleClick\n */\n handleClick(event) {\n let kind = this.track['kind'];\n let tracks = this.player_.textTracks();\n\n super.handleClick(event);\n\n if (!tracks) return;\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n if (track['kind'] !== kind) {\n continue;\n }\n\n if (track === this.track) {\n track['mode'] = 'showing';\n } else {\n track['mode'] = 'disabled';\n }\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n this.selected(this.track['mode'] === 'showing');\n }\n\n}\n\nComponent.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\nexport default TextTrackMenuItem;\n","/**\n * @file current-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the current time\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class CurrentTimeDisplay\n */\nclass CurrentTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-current-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-current-time-display',\n // label the current time for screen reader users\n innerHTML: 'Current Time ' + '0:00',\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update current time display\n *\n * @method updateContent\n */\n updateContent() {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let localizedText = this.localize('Current Time');\n let formattedTime = formatTime(time, this.player_.duration());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `${localizedText} ${formattedTime}`;\n }\n }\n\n}\n\nComponent.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\nexport default CurrentTimeDisplay;\n","/**\n * @file duration-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the duration\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class DurationDisplay\n */\nclass DurationDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // this might need to be changed to 'durationchange' instead of 'timeupdate' eventually,\n // however the durationchange event fires before this.player_.duration() is set,\n // so the value cannot be written out using this method.\n // Once the order of durationchange and this.player_.duration() being set is figured out,\n // this can be updated.\n this.on(player, 'timeupdate', this.updateContent);\n this.on(player, 'loadedmetadata', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-duration vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-duration-display',\n // label the duration time for screen reader users\n innerHTML: `${this.localize('Duration Time')} 0:00`\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update duration time display\n *\n * @method updateContent\n */\n updateContent() {\n let duration = this.player_.duration();\n if (duration && this.duration_ !== duration) {\n this.duration_ = duration;\n let localizedText = this.localize('Duration Time');\n let formattedTime = formatTime(duration);\n this.contentEl_.innerHTML = `${localizedText} ${formattedTime}`; // label the duration time for screen reader users\n }\n }\n\n}\n\nComponent.registerComponent('DurationDisplay', DurationDisplay);\nexport default DurationDisplay;\n","/**\n * @file remaining-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the time left in the video\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class RemainingTimeDisplay\n */\nclass RemainingTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-remaining-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-remaining-time-display',\n // label the remaining time for screen reader users\n innerHTML: `${this.localize('Remaining Time')} -0:00`,\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update remaining time display\n *\n * @method updateContent\n */\n updateContent() {\n if (this.player_.duration()) {\n const localizedText = this.localize('Remaining Time');\n const formattedTime = formatTime(this.player_.remainingTime());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `${localizedText} -${formattedTime}`;\n }\n }\n\n // Allows for smooth scrubbing, when player can't keep up.\n // var time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n // this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration());\n }\n\n}\n\nComponent.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\nexport default RemainingTimeDisplay;\n","/**\n * @file time-divider.js\n */\nimport Component from '../../component.js';\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class TimeDivider\n */\nclass TimeDivider extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-time-control vjs-time-divider',\n innerHTML: '
    /
    '\n });\n }\n\n}\n\nComponent.registerComponent('TimeDivider', TimeDivider);\nexport default TimeDivider;\n","/**\n * @file volume-bar.js\n */\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n// Required children\nimport VolumeLevel from './volume-level.js';\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class VolumeBar\n */\nclass VolumeBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'volumechange', this.updateARIAAttributes);\n player.ready(Fn.bind(this, this.updateARIAAttributes));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-bar vjs-slider-bar'\n }, {\n 'aria-label': 'volume level'\n });\n }\n\n /**\n * Handle mouse move on volume bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n this.checkMuted();\n this.player_.volume(this.calculateDistance(event));\n }\n\n checkMuted() {\n if (this.player_.muted()) {\n this.player_.muted(false);\n }\n }\n\n /**\n * Get percent of volume level\n *\n * @retun {Number} Volume level percent\n * @method getPercent\n */\n getPercent() {\n if (this.player_.muted()) {\n return 0;\n } else {\n return this.player_.volume();\n }\n }\n\n /**\n * Increase volume level for keyboard users\n *\n * @method stepForward\n */\n stepForward() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() + 0.1);\n }\n\n /**\n * Decrease volume level for keyboard users\n *\n * @method stepBack\n */\n stepBack() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() - 0.1);\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current value of volume bar as a percentage\n let volume = (this.player_.volume() * 100).toFixed(2);\n this.el_.setAttribute('aria-valuenow', volume);\n this.el_.setAttribute('aria-valuetext', volume + '%');\n }\n\n}\n\nVolumeBar.prototype.options_ = {\n children: [\n 'volumeLevel'\n ],\n 'barName': 'volumeLevel'\n};\n\nVolumeBar.prototype.playerEvent = 'volumechange';\n\nComponent.registerComponent('VolumeBar', VolumeBar);\nexport default VolumeBar;\n","/**\n * @file volume-control.js\n */\nimport Component from '../../component.js';\n\n// Required children\nimport VolumeBar from './volume-bar.js';\n\n/**\n * The component for controlling the volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeControl\n */\nclass VolumeControl extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // hide volume controls when they're not supported by the current tech\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n this.on(player, 'loadstart', function(){\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-control vjs-control'\n });\n }\n\n}\n\nVolumeControl.prototype.options_ = {\n children: [\n 'volumeBar'\n ]\n};\n\nComponent.registerComponent('VolumeControl', VolumeControl);\nexport default VolumeControl;\n","/**\n * @file volume-level.js\n */\nimport Component from '../../component.js';\n\n/**\n * Shows volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeLevel\n */\nclass VolumeLevel extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-level',\n innerHTML: ''\n });\n }\n\n}\n\nComponent.registerComponent('VolumeLevel', VolumeLevel);\nexport default VolumeLevel;\n","/**\n * @file volume-menu-button.js\n */\nimport * as Fn from '../utils/fn.js';\nimport Component from '../component.js';\nimport Popup from '../popup/popup.js';\nimport PopupButton from '../popup/popup-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport VolumeBar from './volume-control/volume-bar.js';\n\n/**\n * Button for volume popup\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends PopupButton\n * @class VolumeMenuButton\n */\nclass VolumeMenuButton extends PopupButton {\n\n constructor(player, options={}){\n // Default to inline\n if (options.inline === undefined) {\n options.inline = true;\n }\n\n // If the vertical option isn't passed at all, default to true.\n if (options.vertical === undefined) {\n // If an inline volumeMenuButton is used, we should default to using\n // a horizontal slider for obvious reasons.\n if (options.inline) {\n options.vertical = false;\n } else {\n options.vertical = true;\n }\n }\n\n // The vertical option needs to be set on the volumeBar as well,\n // since that will need to be passed along to the VolumeBar constructor\n options.volumeBar = options.volumeBar || {};\n options.volumeBar.vertical = !!options.vertical;\n\n super(player, options);\n\n // Same listeners as MuteToggle\n this.on(player, 'volumechange', this.volumeUpdate);\n this.on(player, 'loadstart', this.volumeUpdate);\n\n // hide mute toggle if the current tech doesn't support volume control\n function updateVisibility() {\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n }\n\n updateVisibility.call(this);\n this.on(player, 'loadstart', updateVisibility);\n\n this.on(this.volumeBar, ['slideractive', 'focus'], function(){\n this.addClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['sliderinactive', 'blur'], function(){\n this.removeClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['focus'], function(){\n this.addClass('vjs-lock-showing');\n });\n\n this.on(this.volumeBar, ['blur'], function(){\n this.removeClass('vjs-lock-showing');\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n let orientationClass = '';\n if (!!this.options_.vertical) {\n orientationClass = 'vjs-volume-menu-button-vertical';\n } else {\n orientationClass = 'vjs-volume-menu-button-horizontal';\n }\n\n return `vjs-volume-menu-button ${super.buildCSSClass()} ${orientationClass}`;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {Popup} The volume popup button\n * @method createPopup\n */\n createPopup() {\n let popup = new Popup(this.player_, {\n contentElType: 'div'\n });\n\n let vb = new VolumeBar(this.player_, this.options_.volumeBar);\n\n popup.addChild(vb);\n\n this.menuContent = popup;\n this.volumeBar = vb;\n\n this.attachVolumeBarEvents();\n\n return popup;\n }\n\n /**\n * Handle click on volume popup and calls super\n *\n * @method handleClick\n */\n handleClick() {\n MuteToggle.prototype.handleClick.call(this);\n super.handleClick();\n }\n\n attachVolumeBarEvents() {\n this.menuContent.on(['mousedown', 'touchdown'], Fn.bind(this, this.handleMouseDown));\n }\n\n handleMouseDown(event) {\n this.on(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n this.on(this.el_.ownerDocument, ['mouseup', 'touchend'], this.handleMouseUp);\n }\n\n handleMouseUp(event) {\n this.off(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n }\n}\n\nVolumeMenuButton.prototype.volumeUpdate = MuteToggle.prototype.update;\nVolumeMenuButton.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('VolumeMenuButton', VolumeMenuButton);\nexport default VolumeMenuButton;\n","/**\n * @file error-display.js\n */\nimport Component from './component';\nimport ModalDialog from './modal-dialog';\n\nimport * as Dom from './utils/dom';\nimport mergeOptions from './utils/merge-options';\n\n/**\n * Display that an error has occurred making the video unplayable.\n *\n * @extends ModalDialog\n * @class ErrorDisplay\n */\nclass ErrorDisplay extends ModalDialog {\n\n /**\n * Constructor for error display modal.\n *\n * @param {Player} player\n * @param {Object} [options]\n */\n constructor(player, options) {\n super(player, options);\n this.on(player, 'error', this.open);\n }\n\n /**\n * Include the old class for backward-compatibility.\n *\n * This can be removed in 6.0.\n *\n * @method buildCSSClass\n * @deprecated\n * @return {String}\n */\n buildCSSClass() {\n return `vjs-error-display ${super.buildCSSClass()}`;\n }\n\n /**\n * Generates the modal content based on the player error.\n *\n * @return {String|Null}\n */\n content() {\n let error = this.player().error();\n return error ? this.localize(error.message) : '';\n }\n}\n\nErrorDisplay.prototype.options_ = mergeOptions(ModalDialog.prototype.options_, {\n fillAlways: true,\n temporary: false,\n uncloseable: true\n});\n\nComponent.registerComponent('ErrorDisplay', ErrorDisplay);\nexport default ErrorDisplay;\n","/**\n * @file event-target.js\n */\nimport * as Events from './utils/events.js';\n\nvar EventTarget = function() {};\n\nEventTarget.prototype.allowedEvents_ = {};\n\nEventTarget.prototype.on = function(type, fn) {\n // Remove the addEventListener alias before calling Events.on\n // so we don't get into an infinite type loop\n let ael = this.addEventListener;\n this.addEventListener = Function.prototype;\n Events.on(this, type, fn);\n this.addEventListener = ael;\n};\nEventTarget.prototype.addEventListener = EventTarget.prototype.on;\n\nEventTarget.prototype.off = function(type, fn) {\n Events.off(this, type, fn);\n};\nEventTarget.prototype.removeEventListener = EventTarget.prototype.off;\n\nEventTarget.prototype.one = function(type, fn) {\n Events.one(this, type, fn);\n};\n\nEventTarget.prototype.trigger = function(event) {\n let type = event.type || event;\n\n if (typeof event === 'string') {\n event = {\n type: type\n };\n }\n event = Events.fixEvent(event);\n\n if (this.allowedEvents_[type] && this['on' + type]) {\n this['on' + type](event);\n }\n\n Events.trigger(this, event);\n};\n// The standard DOM EventTarget.dispatchEvent() is aliased to trigger()\nEventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;\n\nexport default EventTarget;\n","import log from './utils/log';\n\n/*\n * @file extend.js\n *\n * A combination of node inherits and babel's inherits (after transpile).\n * Both work the same but node adds `super_` to the subClass\n * and Bable adds the superClass as __proto__. Both seem useful.\n */\nconst _inherits = function (subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) {\n // node\n subClass.super_ = superClass;\n }\n};\n\n/*\n * Function for subclassing using the same inheritance that\n * videojs uses internally\n * ```js\n * var Button = videojs.getComponent('Button');\n * ```\n * ```js\n * var MyButton = videojs.extend(Button, {\n * constructor: function(player, options) {\n * Button.call(this, player, options);\n * },\n * onClick: function() {\n * // doSomething\n * }\n * });\n * ```\n */\nconst extendFn = function(superClass, subClassMethods={}) {\n let subClass = function() {\n superClass.apply(this, arguments);\n };\n let methods = {};\n\n if (typeof subClassMethods === 'object') {\n if (typeof subClassMethods.init === 'function') {\n log.warn('Constructor logic via init() is deprecated; please use constructor() instead.');\n subClassMethods.constructor = subClassMethods.init;\n }\n if (subClassMethods.constructor !== Object.prototype.constructor) {\n subClass = subClassMethods.constructor;\n }\n methods = subClassMethods;\n } else if (typeof subClassMethods === 'function') {\n subClass = subClassMethods;\n }\n\n _inherits(subClass, superClass);\n\n // Extend subObj's prototype with functions and other properties from props\n for (var name in methods) {\n if (methods.hasOwnProperty(name)) {\n subClass.prototype[name] = methods[name];\n }\n }\n\n return subClass;\n};\n\nexport default extendFn;\n","/**\n * @file fullscreen-api.js\n */\nimport document from 'global/document';\n\n/*\n * Store the browser-specific methods for the fullscreen API\n * @type {Object|undefined}\n * @private\n */\nlet FullscreenApi = {};\n\n// browser API methods\n// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js\nconst apiMap = [\n // Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html\n [\n 'requestFullscreen',\n 'exitFullscreen',\n 'fullscreenElement',\n 'fullscreenEnabled',\n 'fullscreenchange',\n 'fullscreenerror'\n ],\n // WebKit\n [\n 'webkitRequestFullscreen',\n 'webkitExitFullscreen',\n 'webkitFullscreenElement',\n 'webkitFullscreenEnabled',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Old WebKit (Safari 5.1)\n [\n 'webkitRequestFullScreen',\n 'webkitCancelFullScreen',\n 'webkitCurrentFullScreenElement',\n 'webkitCancelFullScreen',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Mozilla\n [\n 'mozRequestFullScreen',\n 'mozCancelFullScreen',\n 'mozFullScreenElement',\n 'mozFullScreenEnabled',\n 'mozfullscreenchange',\n 'mozfullscreenerror'\n ],\n // Microsoft\n [\n 'msRequestFullscreen',\n 'msExitFullscreen',\n 'msFullscreenElement',\n 'msFullscreenEnabled',\n 'MSFullscreenChange',\n 'MSFullscreenError'\n ]\n];\n\nlet specApi = apiMap[0];\nlet browserApi;\n\n// determine the supported set of functions\nfor (let i = 0; i < apiMap.length; i++) {\n // check for exitFullscreen function\n if (apiMap[i][1] in document) {\n browserApi = apiMap[i];\n break;\n }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n for (let i=0; i 1) {\n this.show();\n }\n }\n\n /**\n * Create menu\n *\n * @return {Menu} The constructed menu\n * @method createMenu\n */\n createMenu() {\n var menu = new Menu(this.player_);\n\n // Add a title list item to the top\n if (this.options_.title) {\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.options_.title),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n this.items = this['createItems']();\n\n if (this.items) {\n // Add menu items to the menu\n for (var i = 0; i < this.items.length; i++) {\n menu.addItem(this.items[i]);\n }\n }\n\n return menu;\n }\n\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n * @method createItems\n */\n createItems(){}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n /**\n * When you click the button it adds focus, which\n * will show the menu indefinitely.\n * So we'll remove focus when the mouse leaves the button.\n * Focus is needed for tab navigation.\n * Allow sub components to stack CSS class names\n *\n * @method handleClick\n */\n handleClick() {\n this.one('mouseout', Fn.bind(this, function(){\n this.menu.unlockShowing();\n this.el_.blur();\n }));\n if (this.buttonPressed_){\n this.unpressButton();\n } else {\n this.pressButton();\n }\n }\n\n /**\n * Handle key press on menu\n *\n * @param {Object} event Key press event\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9) {\n if (this.buttonPressed_) {\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n // Up (38) key or Down (40) key press the 'button'\n } else if (event.which === 38 || event.which === 40) {\n if (!this.buttonPressed_) {\n this.pressButton();\n event.preventDefault();\n }\n } else {\n super.handleKeyPress(event);\n }\n }\n\n /**\n * Handle key press on submenu\n *\n * @param {Object} event Key press event\n * @method handleSubmenuKeyPress\n */\n handleSubmenuKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9){\n if (this.buttonPressed_){\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n }\n }\n\n /**\n * Makes changes based on button pressed\n *\n * @method pressButton\n */\n pressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = true;\n this.menu.lockShowing();\n this.el_.setAttribute('aria-expanded', 'true');\n this.menu.focus(); // set the focus into the submenu\n }\n }\n\n /**\n * Makes changes based on button unpressed\n *\n * @method unpressButton\n */\n unpressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', 'false');\n this.el_.focus(); // Set focus back to this menu button\n }\n }\n\n /**\n * Disable the menu button\n *\n * @return {Component}\n * @method disable\n */\n disable() {\n // Unpress, but don't force focus on this button\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', 'false');\n\n this.enabled_ = false;\n\n return super.disable();\n }\n\n /**\n * Enable the menu button\n *\n * @return {Component}\n * @method disable\n */\n enable() {\n this.enabled_ = true;\n\n return super.enable();\n }\n}\n\nComponent.registerComponent('MenuButton', MenuButton);\nexport default MenuButton;\n","/**\n * @file menu-item.js\n */\nimport ClickableComponent from '../clickable-component.js';\nimport Component from '../component.js';\nimport assign from 'object.assign';\n\n/**\n * The component for a menu item. `
  • `\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MenuItem\n */\nclass MenuItem extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n\n this.selectable = options['selectable'];\n\n this.selected(options['selected']);\n\n if (this.selectable) {\n // TODO: May need to be either menuitemcheckbox or menuitemradio,\n // and may need logical grouping of menu items.\n this.el_.setAttribute('role', 'menuitemcheckbox');\n } else {\n this.el_.setAttribute('role', 'menuitem');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Desc\n * @param {Object=} props Desc\n * @return {Element}\n * @method createEl\n */\n createEl(type, props, attrs) {\n return super.createEl('li', assign({\n className: 'vjs-menu-item',\n innerHTML: this.localize(this.options_['label']),\n tabIndex: -1\n }, props), attrs);\n }\n\n /**\n * Handle a click on the menu item, and set it to selected\n *\n * @method handleClick\n */\n handleClick() {\n this.selected(true);\n }\n\n /**\n * Set this menu item as selected or not\n *\n * @param {Boolean} selected\n * @method selected\n */\n selected(selected) {\n if (this.selectable) {\n if (selected) {\n this.addClass('vjs-selected');\n this.el_.setAttribute('aria-checked','true');\n // aria-checked isn't fully supported by browsers/screen readers,\n // so indicate selected state to screen reader in the control text.\n this.controlText(', selected');\n } else {\n this.removeClass('vjs-selected');\n this.el_.setAttribute('aria-checked','false');\n // Indicate un-selected state to screen reader\n // Note that a space clears out the selected state text\n this.controlText(' ');\n }\n }\n }\n}\n\nComponent.registerComponent('MenuItem', MenuItem);\nexport default MenuItem;\n","/**\n * @file menu.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Menu component is used to build pop up menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n * @class Menu\n */\nclass Menu extends Component {\n\n constructor (player, options) {\n super(player, options);\n\n this.focusedChild_ = -1;\n\n this.on('keydown', this.handleKeyPress);\n }\n\n /**\n * Add a menu item to the menu\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n //TODO: Need to set keyboard focus back to the menuButton\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n this.contentEl_.setAttribute('role', 'menu');\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.setAttribute('role', 'presentation');\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Menu Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n\n /**\n * Handle key press for menu\n *\n * @param {Object} event Event object\n * @method handleKeyPress\n */\n handleKeyPress (event) {\n if (event.which === 37 || event.which === 40) { // Left and Down Arrows\n event.preventDefault();\n this.stepForward();\n } else if (event.which === 38 || event.which === 39) { // Up and Right Arrows\n event.preventDefault();\n this.stepBack();\n }\n }\n\n /**\n * Move to next (lower) menu item for keyboard users\n *\n * @method stepForward\n */\n stepForward () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ + 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Move to previous (higher) menu item for keyboard users\n *\n * @method stepBack\n */\n stepBack () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ - 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Set focus on a menu item in the menu\n *\n * @param {Object|String} item Index of child item set focus on\n * @method focus\n */\n focus (item = 0) {\n let children = this.children().slice();\n let haveTitle = children.length && children[0].className &&\n /vjs-menu-title/.test(children[0].className);\n\n if (haveTitle) {\n children.shift();\n }\n\n if (children.length > 0) {\n if (item < 0) {\n item = 0;\n } else if (item >= children.length) {\n item = children.length - 1;\n }\n\n this.focusedChild_ = item;\n\n children[item].el_.focus();\n }\n }\n}\n\nComponent.registerComponent('Menu', Menu);\nexport default Menu;\n","/**\n * @file modal-dialog.js\n */\nimport * as Dom from './utils/dom';\nimport * as Fn from './utils/fn';\nimport log from './utils/log';\n\nimport Component from './component';\nimport CloseButton from './close-button';\n\nconst MODAL_CLASS_NAME = 'vjs-modal-dialog';\nconst ESC = 27;\n\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n * @class ModalDialog\n */\nclass ModalDialog extends Component {\n\n /**\n * Constructor for modals.\n *\n * @param {Player} player\n * @param {Object} [options]\n * @param {Mixed} [options.content=undefined]\n * Provide customized content for this modal.\n *\n * @param {String} [options.description]\n * A text description for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.fillAlways=false]\n * Normally, modals are automatically filled only the first time\n * they open. This tells the modal to refresh its content\n * every time it opens.\n *\n * @param {String} [options.label]\n * A text label for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.temporary=true]\n * If `true`, the modal can only be opened once; it will be\n * disposed as soon as it's closed.\n *\n * @param {Boolean} [options.uncloseable=false]\n * If `true`, the user will not be able to close the modal\n * through the UI in the normal ways. Programmatic closing is\n * still possible.\n *\n */\n constructor(player, options) {\n super(player, options);\n this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n\n this.closeable(!this.options_.uncloseable);\n this.content(this.options_.content);\n\n // Make sure the contentEl is defined AFTER any children are initialized\n // because we only want the contents of the modal in the contentEl\n // (not the UI elements like the close button).\n this.contentEl_ = Dom.createEl('div', {\n className: `${MODAL_CLASS_NAME}-content`\n }, {\n role: 'document'\n });\n\n this.descEl_ = Dom.createEl('p', {\n className: `${MODAL_CLASS_NAME}-description vjs-offscreen`,\n id: this.el().getAttribute('aria-describedby')\n });\n\n Dom.textContent(this.descEl_, this.description());\n this.el_.appendChild(this.descEl_);\n this.el_.appendChild(this.contentEl_);\n }\n\n /**\n * Create the modal's DOM element\n *\n * @method createEl\n * @return {Element}\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass(),\n tabIndex: -1\n }, {\n 'aria-describedby': `${this.id()}_description`,\n 'aria-hidden': 'true',\n 'aria-label': this.label(),\n role: 'dialog'\n });\n }\n\n /**\n * Build the modal's CSS class.\n *\n * @method buildCSSClass\n * @return {String}\n */\n buildCSSClass() {\n return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles key presses on the document, looking for ESC, which closes\n * the modal.\n *\n * @method handleKeyPress\n * @param {Event} e\n */\n handleKeyPress(e) {\n if (e.which === ESC && this.closeable()) {\n this.close();\n }\n }\n\n /**\n * Returns the label string for this modal. Primarily used for accessibility.\n *\n * @return {String}\n */\n label() {\n return this.options_.label || this.localize('Modal Window');\n }\n\n /**\n * Returns the description string for this modal. Primarily used for\n * accessibility.\n *\n * @return {String}\n */\n description() {\n let desc = this.options_.description || this.localize('This is a modal window.');\n\n // Append a universal closeability message if the modal is closeable.\n if (this.closeable()) {\n desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n }\n\n return desc;\n }\n\n /**\n * Opens the modal.\n *\n * @method open\n * @return {ModalDialog}\n */\n open() {\n if (!this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalopen');\n this.opened_ = true;\n\n // Fill content if the modal has never opened before and\n // never been filled.\n if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n this.fill();\n }\n\n // If the player was playing, pause it and take note of its previously\n // playing state.\n this.wasPlaying_ = !player.paused();\n\n if (this.wasPlaying_) {\n player.pause();\n }\n\n if (this.closeable()) {\n this.on(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(false);\n this.show();\n this.el().setAttribute('aria-hidden', 'false');\n this.trigger('modalopen');\n this.hasBeenOpened_ = true;\n }\n return this;\n }\n\n /**\n * Whether or not the modal is opened currently.\n *\n * @method opened\n * @param {Boolean} [value]\n * If given, it will open (`true`) or close (`false`) the modal.\n *\n * @return {Boolean}\n */\n opened(value) {\n if (typeof value === 'boolean') {\n this[value ? 'open' : 'close']();\n }\n return this.opened_;\n }\n\n /**\n * Closes the modal.\n *\n * @method close\n * @return {ModalDialog}\n */\n close() {\n if (this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalclose');\n this.opened_ = false;\n\n if (this.wasPlaying_) {\n player.play();\n }\n\n if (this.closeable()) {\n this.off(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(true);\n this.hide();\n this.el().setAttribute('aria-hidden', 'true');\n this.trigger('modalclose');\n\n if (this.options_.temporary) {\n this.dispose();\n }\n }\n return this;\n }\n\n /**\n * Whether or not the modal is closeable via the UI.\n *\n * @method closeable\n * @param {Boolean} [value]\n * If given as a Boolean, it will set the `closeable` option.\n *\n * @return {Boolean}\n */\n closeable(value) {\n if (typeof value === 'boolean') {\n let closeable = this.closeable_ = !!value;\n let close = this.getChild('closeButton');\n\n // If this is being made closeable and has no close button, add one.\n if (closeable && !close) {\n\n // The close button should be a child of the modal - not its\n // content element, so temporarily change the content element.\n let temp = this.contentEl_;\n this.contentEl_ = this.el_;\n close = this.addChild('closeButton');\n this.contentEl_ = temp;\n this.on(close, 'close', this.close);\n }\n\n // If this is being made uncloseable and has a close button, remove it.\n if (!closeable && close) {\n this.off(close, 'close', this.close);\n this.removeChild(close);\n close.dispose();\n }\n }\n return this.closeable_;\n }\n\n /**\n * Fill the modal's content element with the modal's \"content\" option.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fill\n * @return {ModalDialog}\n */\n fill() {\n return this.fillWith(this.content());\n }\n\n /**\n * Fill the modal's content element with arbitrary content.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fillWith\n * @param {Mixed} [content]\n * The same rules apply to this as apply to the `content` option.\n *\n * @return {ModalDialog}\n */\n fillWith(content) {\n let contentEl = this.contentEl();\n let parentEl = contentEl.parentNode;\n let nextSiblingEl = contentEl.nextSibling;\n\n this.trigger('beforemodalfill');\n this.hasBeenFilled_ = true;\n\n // Detach the content element from the DOM before performing\n // manipulation to avoid modifying the live DOM multiple times.\n parentEl.removeChild(contentEl);\n this.empty();\n Dom.insertContent(contentEl, content);\n this.trigger('modalfill');\n\n // Re-inject the re-filled content element.\n if (nextSiblingEl) {\n parentEl.insertBefore(contentEl, nextSiblingEl);\n } else {\n parentEl.appendChild(contentEl);\n }\n\n return this;\n }\n\n /**\n * Empties the content element.\n *\n * This happens automatically anytime the modal is filled.\n *\n * @method empty\n * @return {ModalDialog}\n */\n empty() {\n this.trigger('beforemodalempty');\n Dom.emptyEl(this.contentEl());\n this.trigger('modalempty');\n return this;\n }\n\n /**\n * Gets or sets the modal content, which gets normalized before being\n * rendered into the DOM.\n *\n * This does not update the DOM or fill the modal, but it is called during\n * that process.\n *\n * @method content\n * @param {Mixed} [value]\n * If defined, sets the internal content value to be used on the\n * next call(s) to `fill`. This value is normalized before being\n * inserted. To \"clear\" the internal content value, pass `null`.\n *\n * @return {Mixed}\n */\n content(value) {\n if (typeof value !== 'undefined') {\n this.content_ = value;\n }\n return this.content_;\n }\n}\n\n/*\n * Modal dialog default options.\n *\n * @type {Object}\n * @private\n */\nModalDialog.prototype.options_ = {\n temporary: true\n};\n\nComponent.registerComponent('ModalDialog', ModalDialog);\nexport default ModalDialog;\n","/**\n * @file player.js\n */\n // Subclasses Component\nimport Component from './component.js';\n\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Events from './utils/events.js';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as browser from './utils/browser.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport { createTimeRange } from './utils/time-ranges.js';\nimport { bufferedPercent } from './utils/buffer.js';\nimport * as stylesheet from './utils/stylesheet.js';\nimport FullscreenApi from './fullscreen-api.js';\nimport MediaError from './media-error.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\nimport textTrackConverter from './tracks/text-track-list-converter.js';\n\n// Include required child components (importing also registers them)\nimport MediaLoader from './tech/loader.js';\nimport PosterImage from './poster-image.js';\nimport TextTrackDisplay from './tracks/text-track-display.js';\nimport LoadingSpinner from './loading-spinner.js';\nimport BigPlayButton from './big-play-button.js';\nimport ControlBar from './control-bar/control-bar.js';\nimport ErrorDisplay from './error-display.js';\nimport TextTrackSettings from './tracks/text-track-settings.js';\nimport ModalDialog from './modal-dialog';\n\n// Require html5 tech, at least for disposing the original video tag\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\n\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video.\n * ```js\n * var myPlayer = videojs('example_video_1');\n * ```\n * In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.\n * ```html\n * \n * ```\n * After an instance has been created it can be accessed globally using `Video('example_video_1')`.\n *\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class Player\n */\nclass Player extends Component {\n\n /**\n * player's constructor function\n *\n * @constructs\n * @method init\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Player options\n * @param {Function=} ready Ready callback function\n */\n constructor(tag, options, ready){\n // Make sure tag ID exists\n tag.id = tag.id || `vjs_video_${Guid.newGUID()}`;\n\n // Set Options\n // The options argument overrides options set in the video tag\n // which overrides globally set options.\n // This latter part coincides with the load order\n // (tag must exist before Player)\n options = assign(Player.getTagSettings(tag), options);\n\n // Delay the initialization of children because we need to set up\n // player properties first, and can't use `this` before `super()`\n options.initChildren = false;\n\n // Same with creating the element\n options.createEl = false;\n\n // we don't want the player to report touch activity on itself\n // see enableTouchActivity in Component\n options.reportTouchActivity = false;\n\n // Run base component initializing with new options\n super(null, options, ready);\n\n // if the global option object was accidentally blown away by\n // someone, bail early with an informative error\n if (!this.options_ ||\n !this.options_.techOrder ||\n !this.options_.techOrder.length) {\n throw new Error('No techOrder specified. Did you overwrite ' +\n 'videojs.options instead of just changing the ' +\n 'properties you want to override?');\n }\n\n this.tag = tag; // Store the original tag used to set options\n\n // Store the tag attributes used to restore html5 element\n this.tagAttributes = tag && Dom.getElAttributes(tag);\n\n // Update current language\n this.language(this.options_.language);\n\n // Update Supported Languages\n if (options.languages) {\n // Normalise player option languages to lowercase\n let languagesToLower = {};\n\n Object.getOwnPropertyNames(options.languages).forEach(function(name) {\n languagesToLower[name.toLowerCase()] = options.languages[name];\n });\n this.languages_ = languagesToLower;\n } else {\n this.languages_ = Player.prototype.options_.languages;\n }\n\n // Cache for video property values.\n this.cache_ = {};\n\n // Set poster\n this.poster_ = options.poster || '';\n\n // Set controls\n this.controls_ = !!options.controls;\n\n // Original tag settings stored in options\n // now remove immediately so native controls don't flash.\n // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n tag.controls = false;\n\n /*\n * Store the internal state of scrubbing\n *\n * @private\n * @return {Boolean} True if the user is scrubbing\n */\n this.scrubbing_ = false;\n\n this.el_ = this.createEl();\n\n // We also want to pass the original player options to each component and plugin\n // as well so they don't need to reach back into the player for options later.\n // We also need to do another copy of this.options_ so we don't end up with\n // an infinite loop.\n let playerOptionsCopy = mergeOptions(this.options_);\n\n // Load plugins\n if (options.plugins) {\n let plugins = options.plugins;\n\n Object.getOwnPropertyNames(plugins).forEach(function(name){\n if (typeof this[name] === 'function') {\n this[name](plugins[name]);\n } else {\n log.error('Unable to find plugin:', name);\n }\n }, this);\n }\n\n this.options_.playerOptions = playerOptionsCopy;\n\n this.initChildren();\n\n // Set isAudio based on whether or not an audio tag was used\n this.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n // Update controls className. Can't do this when the controls are initially\n // set because the element doesn't exist yet.\n if (this.controls()) {\n this.addClass('vjs-controls-enabled');\n } else {\n this.addClass('vjs-controls-disabled');\n }\n\n // Set ARIA label and region role depending on player type\n this.el_.setAttribute('role', 'region');\n if (this.isAudio()) {\n this.el_.setAttribute('aria-label', 'audio player');\n } else {\n this.el_.setAttribute('aria-label', 'video player');\n }\n\n if (this.isAudio()) {\n this.addClass('vjs-audio');\n }\n\n if (this.flexNotSupported_()) {\n this.addClass('vjs-no-flex');\n }\n\n // TODO: Make this smarter. Toggle user state between touching/mousing\n // using events, since devices can have both touch and mouse events.\n // if (browser.TOUCH_ENABLED) {\n // this.addClass('vjs-touch-enabled');\n // }\n\n // iOS Safari has broken hover handling\n if (!browser.IS_IOS) {\n this.addClass('vjs-workinghover');\n }\n\n // Make player easily findable by ID\n Player.players[this.id_] = this;\n\n // When the player is first initialized, trigger activity so components\n // like the control bar show themselves if needed\n this.userActive(true);\n this.reportUserActivity();\n this.listenForUserActivity_();\n\n this.on('fullscreenchange', this.handleFullscreenChange_);\n this.on('stageclick', this.handleStageClick_);\n }\n\n /**\n * Destroys the video player and does any necessary cleanup\n * ```js\n * myPlayer.dispose();\n * ```\n * This is especially helpful if you are dynamically adding and removing videos\n * to/from the DOM.\n *\n * @method dispose\n */\n dispose() {\n this.trigger('dispose');\n // prevent dispose from being called twice\n this.off('dispose');\n\n if (this.styleEl_ && this.styleEl_.parentNode) {\n this.styleEl_.parentNode.removeChild(this.styleEl_);\n }\n\n // Kill reference to this player\n Player.players[this.id_] = null;\n if (this.tag && this.tag.player) { this.tag.player = null; }\n if (this.el_ && this.el_.player) { this.el_.player = null; }\n\n if (this.tech_) { this.tech_.dispose(); }\n\n super.dispose();\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = this.el_ = super.createEl('div');\n let tag = this.tag;\n\n // Remove width/height attrs from tag so CSS can make it 100% width/height\n tag.removeAttribute('width');\n tag.removeAttribute('height');\n\n // Copy over all the attributes from the tag, including ID and class\n // ID will now reference player box, not the video tag\n const attrs = Dom.getElAttributes(tag);\n\n Object.getOwnPropertyNames(attrs).forEach(function(attr){\n // workaround so we don't totally break IE7\n // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7\n if (attr === 'class') {\n el.className = attrs[attr];\n } else {\n el.setAttribute(attr, attrs[attr]);\n }\n });\n\n // Update tag id/class for use as HTML5 playback tech\n // Might think we should do this after embedding in container so .vjs-tech class\n // doesn't flash 100% width/height, but class only applies with .video-js parent\n tag.playerId = tag.id;\n tag.id += '_html5_api';\n tag.className = 'vjs-tech';\n\n // Make player findable on elements\n tag.player = el.player = this;\n // Default state of video is paused\n this.addClass('vjs-paused');\n\n // Add a style element in the player that we'll use to set the width/height\n // of the player in a way that's still overrideable by CSS, just like the\n // video element\n if (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n this.styleEl_ = stylesheet.createStyleElement('vjs-styles-dimensions');\n let defaultsStyleEl = Dom.$('.vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n }\n\n // Pass in the width/height/aspectRatio options which will update the style el\n this.width(this.options_.width);\n this.height(this.options_.height);\n this.fluid(this.options_.fluid);\n this.aspectRatio(this.options_.aspectRatio);\n\n // Hide any links within the video/audio tag, because IE doesn't hide them completely.\n let links = tag.getElementsByTagName('a');\n for (let i = 0; i < links.length; i++) {\n let linkEl = links.item(i);\n Dom.addElClass(linkEl, 'vjs-hidden');\n linkEl.setAttribute('hidden', 'hidden');\n }\n\n // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n // keep track of the original for later so we can know if the source originally failed\n tag.initNetworkState_ = tag.networkState;\n\n // Wrap video tag in div (el/box) container\n if (tag.parentNode) {\n tag.parentNode.insertBefore(el, tag);\n }\n\n // insert the tag as the first child of the player element\n // then manually add it to the children array so that this.addChild\n // will work properly for other components\n Dom.insertElFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup.\n this.children_.unshift(tag);\n\n this.el_ = el;\n\n return el;\n }\n\n /**\n * Get/set player width\n *\n * @param {Number=} value Value for width\n * @return {Number} Width when getting\n * @method width\n */\n width(value) {\n return this.dimension('width', value);\n }\n\n /**\n * Get/set player height\n *\n * @param {Number=} value Value for height\n * @return {Number} Height when getting\n * @method height\n */\n height(value) {\n return this.dimension('height', value);\n }\n\n /**\n * Get/set dimension for player\n *\n * @param {String} dimension Either width or height\n * @param {Number=} value Value for dimension\n * @return {Component}\n * @method dimension\n */\n dimension(dimension, value) {\n let privDimension = dimension + '_';\n\n if (value === undefined) {\n return this[privDimension] || 0;\n }\n\n if (value === '') {\n // If an empty string is given, reset the dimension to be automatic\n this[privDimension] = undefined;\n } else {\n let parsedVal = parseFloat(value);\n\n if (isNaN(parsedVal)) {\n log.error(`Improper value \"${value}\" supplied for for ${dimension}`);\n return this;\n }\n\n this[privDimension] = parsedVal;\n }\n\n this.updateStyleEl_();\n return this;\n }\n\n /**\n * Add/remove the vjs-fluid class\n *\n * @param {Boolean} bool Value of true adds the class, value of false removes the class\n * @method fluid\n */\n fluid(bool) {\n if (bool === undefined) {\n return !!this.fluid_;\n }\n\n this.fluid_ = !!bool;\n\n if (bool) {\n this.addClass('vjs-fluid');\n } else {\n this.removeClass('vjs-fluid');\n }\n }\n\n /**\n * Get/Set the aspect ratio\n *\n * @param {String=} ratio Aspect ratio for player\n * @return aspectRatio\n * @method aspectRatio\n */\n aspectRatio(ratio) {\n if (ratio === undefined) {\n return this.aspectRatio_;\n }\n\n // Check for width:height format\n if (!/^\\d+\\:\\d+$/.test(ratio)) {\n throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n }\n this.aspectRatio_ = ratio;\n\n // We're assuming if you set an aspect ratio you want fluid mode,\n // because in fixed mode you could calculate width and height yourself.\n this.fluid(true);\n\n this.updateStyleEl_();\n }\n\n /**\n * Update styles of the player element (height, width and aspect ratio)\n *\n * @method updateStyleEl_\n */\n updateStyleEl_() {\n if (window.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n const width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n const height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n let techEl = this.tech_ && this.tech_.el();\n\n if (techEl) {\n if (width >= 0) {\n techEl.width = width;\n }\n if (height >= 0) {\n techEl.height = height;\n }\n }\n\n return;\n }\n\n let width;\n let height;\n let aspectRatio;\n let idClass;\n\n // The aspect ratio is either used directly or to calculate width and height.\n if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n // Use any aspectRatio that's been specifically set\n aspectRatio = this.aspectRatio_;\n } else if (this.videoWidth()) {\n // Otherwise try to get the aspect ratio from the video metadata\n aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n } else {\n // Or use a default. The video element's is 2:1, but 16:9 is more common.\n aspectRatio = '16:9';\n }\n\n // Get the ratio as a decimal we can use to calculate dimensions\n let ratioParts = aspectRatio.split(':');\n let ratioMultiplier = ratioParts[1] / ratioParts[0];\n\n if (this.width_ !== undefined) {\n // Use any width that's been specifically set\n width = this.width_;\n } else if (this.height_ !== undefined) {\n // Or calulate the width from the aspect ratio if a height has been set\n width = this.height_ / ratioMultiplier;\n } else {\n // Or use the video's metadata, or use the video el's default of 300\n width = this.videoWidth() || 300;\n }\n\n if (this.height_ !== undefined) {\n // Use any height that's been specifically set\n height = this.height_;\n } else {\n // Otherwise calculate the height from the ratio and the width\n height = width * ratioMultiplier;\n }\n\n // Ensure the CSS class is valid by starting with an alpha character\n if (/^[^a-zA-Z]/.test(this.id())) {\n idClass = 'dimensions-'+this.id();\n } else {\n idClass = this.id()+'-dimensions';\n }\n\n // Ensure the right class is still on the player for the style element\n this.addClass(idClass);\n\n stylesheet.setTextContent(this.styleEl_, `\n .${idClass} {\n width: ${width}px;\n height: ${height}px;\n }\n\n .${idClass}.vjs-fluid {\n padding-top: ${ratioMultiplier * 100}%;\n }\n `);\n }\n\n /**\n * Load the Media Playback Technology (tech)\n * Load/Create an instance of playback technology including element and API methods\n * And append playback element in player div.\n *\n * @param {String} techName Name of the playback technology\n * @param {String} source Video source\n * @method loadTech_\n * @private\n */\n loadTech_(techName, source) {\n\n // Pause and remove current playback technology\n if (this.tech_) {\n this.unloadTech_();\n }\n\n // get rid of the HTML5 video tag as soon as we are using another tech\n if (techName !== 'Html5' && this.tag) {\n Tech.getTech('Html5').disposeMediaElement(this.tag);\n this.tag.player = null;\n this.tag = null;\n }\n\n this.techName_ = techName;\n\n // Turn off API access because we're loading a new tech that might load asynchronously\n this.isReady_ = false;\n\n // Grab tech-specific options from player options and add source and parent element to use.\n var techOptions = assign({\n 'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n 'source': source,\n 'playerId': this.id(),\n 'techId': `${this.id()}_${techName}_api`,\n 'textTracks': this.textTracks_,\n 'autoplay': this.options_.autoplay,\n 'preload': this.options_.preload,\n 'loop': this.options_.loop,\n 'muted': this.options_.muted,\n 'poster': this.poster(),\n 'language': this.language(),\n 'vtt.js': this.options_['vtt.js']\n }, this.options_[techName.toLowerCase()]);\n\n if (this.tag) {\n techOptions.tag = this.tag;\n }\n\n if (source) {\n this.currentType_ = source.type;\n if (source.src === this.cache_.src && this.cache_.currentTime > 0) {\n techOptions.startTime = this.cache_.currentTime;\n }\n\n this.cache_.src = source.src;\n }\n\n // Initialize tech instance\n let techComponent = Tech.getTech(techName);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!techComponent) {\n techComponent = Component.getComponent(techName);\n }\n this.tech_ = new techComponent(techOptions);\n\n // player.triggerReady is always async, so don't need this to be async\n this.tech_.ready(Fn.bind(this, this.handleTechReady_), true);\n\n textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_);\n\n // Listen to all HTML5-defined events and trigger them on the player\n this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);\n this.on(this.tech_, 'waiting', this.handleTechWaiting_);\n this.on(this.tech_, 'canplay', this.handleTechCanPlay_);\n this.on(this.tech_, 'canplaythrough', this.handleTechCanPlayThrough_);\n this.on(this.tech_, 'playing', this.handleTechPlaying_);\n this.on(this.tech_, 'ended', this.handleTechEnded_);\n this.on(this.tech_, 'seeking', this.handleTechSeeking_);\n this.on(this.tech_, 'seeked', this.handleTechSeeked_);\n this.on(this.tech_, 'play', this.handleTechPlay_);\n this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);\n this.on(this.tech_, 'pause', this.handleTechPause_);\n this.on(this.tech_, 'progress', this.handleTechProgress_);\n this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);\n this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);\n this.on(this.tech_, 'error', this.handleTechError_);\n this.on(this.tech_, 'suspend', this.handleTechSuspend_);\n this.on(this.tech_, 'abort', this.handleTechAbort_);\n this.on(this.tech_, 'emptied', this.handleTechEmptied_);\n this.on(this.tech_, 'stalled', this.handleTechStalled_);\n this.on(this.tech_, 'loadedmetadata', this.handleTechLoadedMetaData_);\n this.on(this.tech_, 'loadeddata', this.handleTechLoadedData_);\n this.on(this.tech_, 'timeupdate', this.handleTechTimeUpdate_);\n this.on(this.tech_, 'ratechange', this.handleTechRateChange_);\n this.on(this.tech_, 'volumechange', this.handleTechVolumeChange_);\n this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_);\n this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);\n this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);\n\n this.usingNativeControls(this.techGet_('controls'));\n\n if (this.controls() && !this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n\n // Add the tech element in the DOM if it was not already there\n // Make sure to not insert the original video element if using Html5\n if (this.tech_.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) {\n Dom.insertElFirst(this.tech_.el(), this.el());\n }\n\n // Get rid of the original video tag reference after the first tech is loaded\n if (this.tag) {\n this.tag.player = null;\n this.tag = null;\n }\n }\n\n /**\n * Unload playback technology\n *\n * @method unloadTech_\n * @private\n */\n unloadTech_() {\n // Save the current text tracks so that we can reuse the same text tracks with the next tech\n this.textTracks_ = this.textTracks();\n this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n\n this.isReady_ = false;\n\n this.tech_.dispose();\n\n this.tech_ = false;\n }\n\n /**\n * Return a reference to the current tech.\n * It will only return a reference to the tech if given an object with the\n * `IWillNotUseThisInPlugins` property on it. This is try and prevent misuse\n * of techs by plugins.\n *\n * @param {Object}\n * @return {Object} The Tech\n * @method tech\n */\n tech(safety) {\n if (safety && safety.IWillNotUseThisInPlugins) {\n return this.tech_;\n }\n let errorText = `\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n \\`IWillNotUseThisInPlugins\\` to the \\`tech\\` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n `;\n window.alert(errorText);\n throw new Error(errorText);\n }\n\n /**\n * Set up click and touch listeners for the playback element\n *\n * On desktops, a click on the video itself will toggle playback,\n * on a mobile device a click on the video toggles controls.\n * (toggling controls is done by toggling the user state between active and\n * inactive)\n * A tap can signal that a user has become active, or has become inactive\n * e.g. a quick tap on an iPhone movie should reveal the controls. Another\n * quick tap should hide them again (signaling the user is in an inactive\n * viewing state)\n * In addition to this, we still want the user to be considered inactive after\n * a few seconds of inactivity.\n * Note: the only part of iOS interaction we can't mimic with this setup\n * is a touch and hold on the video element counting as activity in order to\n * keep the controls showing, but that shouldn't be an issue. A touch and hold\n * on any controls will still keep the user active\n *\n * @private\n * @method addTechControlsListeners_\n */\n addTechControlsListeners_() {\n // Make sure to remove all the previous listeners in case we are called multiple times.\n this.removeTechControlsListeners_();\n\n // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\n // trigger mousedown/up.\n // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\n // Any touch events are set to block the mousedown event from happening\n this.on(this.tech_, 'mousedown', this.handleTechClick_);\n\n // If the controls were hidden we don't want that to change without a tap event\n // so we'll check if the controls were already showing before reporting user\n // activity\n this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.on(this.tech_, 'touchend', this.handleTechTouchEnd_);\n\n // The tap listener needs to come after the touchend listener because the tap\n // listener cancels out any reportedUserActivity when setting userActive(false)\n this.on(this.tech_, 'tap', this.handleTechTap_);\n }\n\n /**\n * Remove the listeners used for click and tap controls. This is needed for\n * toggling to controls disabled, where a tap/touch should do nothing.\n *\n * @method removeTechControlsListeners_\n * @private\n */\n removeTechControlsListeners_() {\n // We don't want to just use `this.off()` because there might be other needed\n // listeners added by techs that extend this.\n this.off(this.tech_, 'tap', this.handleTechTap_);\n this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);\n this.off(this.tech_, 'mousedown', this.handleTechClick_);\n }\n\n /**\n * Player waits for the tech to be ready\n *\n * @method handleTechReady_\n * @private\n */\n handleTechReady_() {\n this.triggerReady();\n\n // Keep the same volume as before\n if (this.cache_.volume) {\n this.techCall_('setVolume', this.cache_.volume);\n }\n\n // Look if the tech found a higher resolution poster while loading\n this.handleTechPosterChange_();\n\n // Update the duration if available\n this.handleTechDurationChange_();\n\n // Chrome and Safari both have issues with autoplay.\n // In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.\n // In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)\n // This fixes both issues. Need to wait for API, so it updates displays correctly\n if (this.src() && this.tag && this.options_.autoplay && this.paused()) {\n delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16.\n this.play();\n }\n }\n\n /**\n * Fired when the user agent begins looking for media data\n *\n * @private\n * @method handleTechLoadStart_\n */\n handleTechLoadStart_() {\n // TODO: Update to use `emptied` event instead. See #1277.\n\n this.removeClass('vjs-ended');\n\n // reset the error state\n this.error(null);\n\n // If it's already playing we want to trigger a firstplay event now.\n // The firstplay event relies on both the play and loadstart events\n // which can happen in any order for a new source\n if (!this.paused()) {\n this.trigger('loadstart');\n this.trigger('firstplay');\n } else {\n // reset the hasStarted state\n this.hasStarted(false);\n this.trigger('loadstart');\n }\n }\n\n /**\n * Add/remove the vjs-has-started class\n *\n * @param {Boolean} hasStarted The value of true adds the class the value of false remove the class\n * @return {Boolean} Boolean value if has started\n * @private\n * @method hasStarted\n */\n hasStarted(hasStarted) {\n if (hasStarted !== undefined) {\n // only update if this is a new value\n if (this.hasStarted_ !== hasStarted) {\n this.hasStarted_ = hasStarted;\n if (hasStarted) {\n this.addClass('vjs-has-started');\n // trigger the firstplay event if this newly has played\n this.trigger('firstplay');\n } else {\n this.removeClass('vjs-has-started');\n }\n }\n return this;\n }\n return !!this.hasStarted_;\n }\n\n /**\n * Fired whenever the media begins or resumes playback\n *\n * @private\n * @method handleTechPlay_\n */\n handleTechPlay_() {\n this.removeClass('vjs-ended');\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n\n // hide the poster when the user hits play\n // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play\n this.hasStarted(true);\n\n this.trigger('play');\n }\n\n /**\n * Fired whenever the media begins waiting\n *\n * @private\n * @method handleTechWaiting_\n */\n handleTechWaiting_() {\n this.addClass('vjs-waiting');\n this.trigger('waiting');\n this.one('timeupdate', () => this.removeClass('vjs-waiting'));\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlay_\n */\n handleTechCanPlay_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplay');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlayThrough_\n */\n handleTechCanPlayThrough_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplaythrough');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechPlaying_\n */\n handleTechPlaying_() {\n this.removeClass('vjs-waiting');\n this.trigger('playing');\n }\n\n /**\n * Fired whenever the player is jumping to a new time\n *\n * @private\n * @method handleTechSeeking_\n */\n handleTechSeeking_() {\n this.addClass('vjs-seeking');\n this.trigger('seeking');\n }\n\n /**\n * Fired when the player has finished jumping to a new time\n *\n * @private\n * @method handleTechSeeked_\n */\n handleTechSeeked_() {\n this.removeClass('vjs-seeking');\n this.trigger('seeked');\n }\n\n /**\n * Fired the first time a video is played\n * Not part of the HLS spec, and we're not sure if this is the best\n * implementation yet, so use sparingly. If you don't have a reason to\n * prevent playback, use `myPlayer.one('play');` instead.\n *\n * @private\n * @method handleTechFirstPlay_\n */\n handleTechFirstPlay_() {\n //If the first starttime attribute is specified\n //then we will start at the given offset in seconds\n if(this.options_.starttime){\n this.currentTime(this.options_.starttime);\n }\n\n this.addClass('vjs-has-started');\n this.trigger('firstplay');\n }\n\n /**\n * Fired whenever the media has been paused\n *\n * @private\n * @method handleTechPause_\n */\n handleTechPause_() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.trigger('pause');\n }\n\n /**\n * Fired while the user agent is downloading media data\n *\n * @private\n * @method handleTechProgress_\n */\n handleTechProgress_() {\n this.trigger('progress');\n }\n\n /**\n * Fired when the end of the media resource is reached (currentTime == duration)\n *\n * @private\n * @method handleTechEnded_\n */\n handleTechEnded_() {\n this.addClass('vjs-ended');\n if (this.options_.loop) {\n this.currentTime(0);\n this.play();\n } else if (!this.paused()) {\n this.pause();\n }\n\n this.trigger('ended');\n }\n\n /**\n * Fired when the duration of the media resource is first known or changed\n *\n * @private\n * @method handleTechDurationChange_\n */\n handleTechDurationChange_() {\n this.duration(this.techGet_('duration'));\n }\n\n /**\n * Handle a click on the media element to play/pause\n *\n * @param {Object=} event Event object\n * @private\n * @method handleTechClick_\n */\n handleTechClick_(event) {\n // We're using mousedown to detect clicks thanks to Flash, but mousedown\n // will also be triggered with right-clicks, so we need to prevent that\n if (event.button !== 0) return;\n\n // When controls are disabled a click should not toggle playback because\n // the click is considered a control\n if (this.controls()) {\n if (this.paused()) {\n this.play();\n } else {\n this.pause();\n }\n }\n }\n\n /**\n * Handle a tap on the media element. It will toggle the user\n * activity state, which hides and shows the controls.\n *\n * @private\n * @method handleTechTap_\n */\n handleTechTap_() {\n this.userActive(!this.userActive());\n }\n\n /**\n * Handle touch to start\n *\n * @private\n * @method handleTechTouchStart_\n */\n handleTechTouchStart_() {\n this.userWasActive = this.userActive();\n }\n\n /**\n * Handle touch to move\n *\n * @private\n * @method handleTechTouchMove_\n */\n handleTechTouchMove_() {\n if (this.userWasActive){\n this.reportUserActivity();\n }\n }\n\n /**\n * Handle touch to end\n *\n * @private\n * @method handleTechTouchEnd_\n */\n handleTechTouchEnd_(event) {\n // Stop the mouse events from also happening\n event.preventDefault();\n }\n\n /**\n * Fired when the player switches in or out of fullscreen mode\n *\n * @private\n * @method handleFullscreenChange_\n */\n handleFullscreenChange_() {\n if (this.isFullscreen()) {\n this.addClass('vjs-fullscreen');\n } else {\n this.removeClass('vjs-fullscreen');\n }\n }\n\n /**\n * native click events on the SWF aren't triggered on IE11, Win8.1RT\n * use stageclick events triggered from inside the SWF instead\n *\n * @private\n * @method handleStageClick_\n */\n handleStageClick_() {\n this.reportUserActivity();\n }\n\n /**\n * Handle Tech Fullscreen Change\n *\n * @private\n * @method handleTechFullscreenChange_\n */\n handleTechFullscreenChange_(event, data) {\n if (data) {\n this.isFullscreen(data.isFullscreen);\n }\n this.trigger('fullscreenchange');\n }\n\n /**\n * Fires when an error occurred during the loading of an audio/video\n *\n * @private\n * @method handleTechError_\n */\n handleTechError_() {\n let error = this.tech_.error();\n this.error(error && error.code);\n }\n\n /**\n * Fires when the browser is intentionally not getting media data\n *\n * @private\n * @method handleTechSuspend_\n */\n handleTechSuspend_() {\n this.trigger('suspend');\n }\n\n /**\n * Fires when the loading of an audio/video is aborted\n *\n * @private\n * @method handleTechAbort_\n */\n handleTechAbort_() {\n this.trigger('abort');\n }\n\n /**\n * Fires when the current playlist is empty\n *\n * @private\n * @method handleTechEmptied_\n */\n handleTechEmptied_() {\n this.trigger('emptied');\n }\n\n /**\n * Fires when the browser is trying to get media data, but data is not available\n *\n * @private\n * @method handleTechStalled_\n */\n handleTechStalled_() {\n this.trigger('stalled');\n }\n\n /**\n * Fires when the browser has loaded meta data for the audio/video\n *\n * @private\n * @method handleTechLoadedMetaData_\n */\n handleTechLoadedMetaData_() {\n this.trigger('loadedmetadata');\n }\n\n /**\n * Fires when the browser has loaded the current frame of the audio/video\n *\n * @private\n * @method handleTechLoadedData_\n */\n handleTechLoadedData_() {\n this.trigger('loadeddata');\n }\n\n /**\n * Fires when the current playback position has changed\n *\n * @private\n * @method handleTechTimeUpdate_\n */\n handleTechTimeUpdate_() {\n this.trigger('timeupdate');\n }\n\n /**\n * Fires when the playing speed of the audio/video is changed\n *\n * @private\n * @method handleTechRateChange_\n */\n handleTechRateChange_() {\n this.trigger('ratechange');\n }\n\n /**\n * Fires when the volume has been changed\n *\n * @private\n * @method handleTechVolumeChange_\n */\n handleTechVolumeChange_() {\n this.trigger('volumechange');\n }\n\n /**\n * Fires when the text track has been changed\n *\n * @private\n * @method handleTechTextTrackChange_\n */\n handleTechTextTrackChange_() {\n this.trigger('texttrackchange');\n }\n\n /**\n * Get object for cached values.\n *\n * @return {Object}\n * @method getCache\n */\n getCache() {\n return this.cache_;\n }\n\n /**\n * Pass values to the playback tech\n *\n * @param {String=} method Method\n * @param {Object=} arg Argument\n * @private\n * @method techCall_\n */\n techCall_(method, arg) {\n // If it's not ready yet, call method when it is\n if (this.tech_ && !this.tech_.isReady_) {\n this.tech_.ready(function(){\n this[method](arg);\n }, true);\n\n // Otherwise call method now\n } else {\n try {\n this.tech_[method](arg);\n } catch(e) {\n log(e);\n throw e;\n }\n }\n }\n\n /**\n * Get calls can't wait for the tech, and sometimes don't need to.\n *\n * @param {String} method Tech method\n * @return {Method}\n * @private\n * @method techGet_\n */\n techGet_(method) {\n if (this.tech_ && this.tech_.isReady_) {\n\n // Flash likes to die and reload when you hide or reposition it.\n // In these cases the object methods go away and we get errors.\n // When that happens we'll catch the errors and inform tech that it's not ready any more.\n try {\n return this.tech_[method]();\n } catch(e) {\n // When building additional tech libs, an expected method may not be defined yet\n if (this.tech_[method] === undefined) {\n log(`Video.js: ${method} method not defined for ${this.techName_} playback technology.`, e);\n } else {\n // When a method isn't available on the object it throws a TypeError\n if (e.name === 'TypeError') {\n log(`Video.js: ${method} unavailable on ${this.techName_} playback technology element.`, e);\n this.tech_.isReady_ = false;\n } else {\n log(e);\n }\n }\n throw e;\n }\n }\n\n return;\n }\n\n /**\n * start media playback\n * ```js\n * myPlayer.play();\n * ```\n *\n * @return {Player} self\n * @method play\n */\n play() {\n this.techCall_('play');\n return this;\n }\n\n /**\n * Pause the video playback\n * ```js\n * myPlayer.pause();\n * ```\n *\n * @return {Player} self\n * @method pause\n */\n pause() {\n this.techCall_('pause');\n return this;\n }\n\n /**\n * Check if the player is paused\n * ```js\n * var isPaused = myPlayer.paused();\n * var isPlaying = !myPlayer.paused();\n * ```\n *\n * @return {Boolean} false if the media is currently playing, or true otherwise\n * @method paused\n */\n paused() {\n // The initial state of paused should be true (in Safari it's actually false)\n return (this.techGet_('paused') === false) ? false : true;\n }\n\n /**\n * Returns whether or not the user is \"scrubbing\". Scrubbing is when the user\n * has clicked the progress bar handle and is dragging it along the progress bar.\n *\n * @param {Boolean} isScrubbing True/false the user is scrubbing\n * @return {Boolean} The scrubbing status when getting\n * @return {Object} The player when setting\n * @method scrubbing\n */\n scrubbing(isScrubbing) {\n if (isScrubbing !== undefined) {\n this.scrubbing_ = !!isScrubbing;\n\n if (isScrubbing) {\n this.addClass('vjs-scrubbing');\n } else {\n this.removeClass('vjs-scrubbing');\n }\n\n return this;\n }\n\n return this.scrubbing_;\n }\n\n /**\n * Get or set the current time (in seconds)\n * ```js\n * // get\n * var whereYouAt = myPlayer.currentTime();\n * // set\n * myPlayer.currentTime(120); // 2 minutes into the video\n * ```\n *\n * @param {Number|String=} seconds The time to seek to\n * @return {Number} The time in seconds, when not setting\n * @return {Player} self, when the current time is set\n * @method currentTime\n */\n currentTime(seconds) {\n if (seconds !== undefined) {\n\n this.techCall_('setCurrentTime', seconds);\n\n return this;\n }\n\n // cache last currentTime and return. default to 0 seconds\n //\n // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n // currentTime when scrubbing, but may not provide much performance benefit afterall.\n // Should be tested. Also something has to read the actual current time or the cache will\n // never get updated.\n return this.cache_.currentTime = (this.techGet_('currentTime') || 0);\n }\n\n /**\n * Get the length in time of the video in seconds\n * ```js\n * var lengthOfVideo = myPlayer.duration();\n * ```\n * **NOTE**: The video must have started loading before the duration can be\n * known, and in the case of Flash, may not be known until the video starts\n * playing.\n *\n * @param {Number} seconds Duration when setting\n * @return {Number} The duration of the video in seconds when getting\n * @method duration\n */\n duration(seconds) {\n if (seconds === undefined) {\n return this.cache_.duration || 0;\n }\n\n seconds = parseFloat(seconds) || 0;\n\n // Standardize on Inifity for signaling video is live\n if (seconds < 0) {\n seconds = Infinity;\n }\n\n if (seconds !== this.cache_.duration) {\n // Cache the last set value for optimized scrubbing (esp. Flash)\n this.cache_.duration = seconds;\n\n if (seconds === Infinity) {\n this.addClass('vjs-live');\n } else {\n this.removeClass('vjs-live');\n }\n\n this.trigger('durationchange');\n }\n\n return this;\n }\n\n /**\n * Calculates how much time is left.\n * ```js\n * var timeLeft = myPlayer.remainingTime();\n * ```\n * Not a native video element function, but useful\n *\n * @return {Number} The time remaining in seconds\n * @method remainingTime\n */\n remainingTime() {\n return this.duration() - this.currentTime();\n }\n\n // http://dev.w3.org/html5/spec/video.html#dom-media-buffered\n // Buffered returns a timerange object.\n // Kind of like an array of portions of the video that have been downloaded.\n\n /**\n * Get a TimeRange object with the times of the video that have been downloaded\n * If you just want the percent of the video that's been downloaded,\n * use bufferedPercent.\n * ```js\n * // Number of different ranges of time have been buffered. Usually 1.\n * numberOfRanges = bufferedTimeRange.length,\n * // Time in seconds when the first range starts. Usually 0.\n * firstRangeStart = bufferedTimeRange.start(0),\n * // Time in seconds when the first range ends\n * firstRangeEnd = bufferedTimeRange.end(0),\n * // Length in seconds of the first time range\n * firstRangeLength = firstRangeEnd - firstRangeStart;\n * ```\n *\n * @return {Object} A mock TimeRange object (following HTML spec)\n * @method buffered\n */\n buffered() {\n var buffered = this.techGet_('buffered');\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0,0);\n }\n\n return buffered;\n }\n\n /**\n * Get the percent (as a decimal) of the video that's been downloaded\n * ```js\n * var howMuchIsDownloaded = myPlayer.bufferedPercent();\n * ```\n * 0 means none, 1 means all.\n * (This method isn't in the HTML5 spec, but it's very convenient)\n *\n * @return {Number} A decimal between 0 and 1 representing the percent\n * @method bufferedPercent\n */\n bufferedPercent() {\n return bufferedPercent(this.buffered(), this.duration());\n }\n\n /**\n * Get the ending time of the last buffered time range\n * This is used in the progress bar to encapsulate all time ranges.\n *\n * @return {Number} The end of the last buffered time range\n * @method bufferedEnd\n */\n bufferedEnd() {\n var buffered = this.buffered(),\n duration = this.duration(),\n end = buffered.end(buffered.length-1);\n\n if (end > duration) {\n end = duration;\n }\n\n return end;\n }\n\n /**\n * Get or set the current volume of the media\n * ```js\n * // get\n * var howLoudIsIt = myPlayer.volume();\n * // set\n * myPlayer.volume(0.5); // Set volume to half\n * ```\n * 0 is off (muted), 1.0 is all the way up, 0.5 is half way.\n *\n * @param {Number} percentAsDecimal The new volume as a decimal percent\n * @return {Number} The current volume when getting\n * @return {Player} self when setting\n * @method volume\n */\n volume(percentAsDecimal) {\n let vol;\n\n if (percentAsDecimal !== undefined) {\n vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1\n this.cache_.volume = vol;\n this.techCall_('setVolume', vol);\n\n return this;\n }\n\n // Default to 1 when returning current volume.\n vol = parseFloat(this.techGet_('volume'));\n return (isNaN(vol)) ? 1 : vol;\n }\n\n\n /**\n * Get the current muted state, or turn mute on or off\n * ```js\n * // get\n * var isVolumeMuted = myPlayer.muted();\n * // set\n * myPlayer.muted(true); // mute the volume\n * ```\n *\n * @param {Boolean=} muted True to mute, false to unmute\n * @return {Boolean} True if mute is on, false if not when getting\n * @return {Player} self when setting mute\n * @method muted\n */\n muted(muted) {\n if (muted !== undefined) {\n this.techCall_('setMuted', muted);\n return this;\n }\n return this.techGet_('muted') || false; // Default to false\n }\n\n // Check if current tech can support native fullscreen\n // (e.g. with built in controls like iOS, so not our flash swf)\n /**\n * Check to see if fullscreen is supported\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return this.techGet_('supportsFullScreen') || false;\n }\n\n /**\n * Check if the player is in fullscreen mode\n * ```js\n * // get\n * var fullscreenOrNot = myPlayer.isFullscreen();\n * // set\n * myPlayer.isFullscreen(true); // tell the player it's in fullscreen\n * ```\n * NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n * property and instead document.fullscreenElement is used. But isFullscreen is\n * still a valuable property for internal player workings.\n *\n * @param {Boolean=} isFS Update the player's fullscreen state\n * @return {Boolean} true if fullscreen false if not when getting\n * @return {Player} self when setting\n * @method isFullscreen\n */\n isFullscreen(isFS) {\n if (isFS !== undefined) {\n this.isFullscreen_ = !!isFS;\n return this;\n }\n return !!this.isFullscreen_;\n }\n\n /**\n * Increase the size of the video to full screen\n * ```js\n * myPlayer.requestFullscreen();\n * ```\n * In some browsers, full screen is not supported natively, so it enters\n * \"full window mode\", where the video fills the browser window.\n * In browsers and devices that support native full screen, sometimes the\n * browser's default controls will be shown, and not the Video.js custom skin.\n * This includes most mobile devices (iOS, Android) and older versions of\n * Safari.\n *\n * @return {Player} self\n * @method requestFullscreen\n */\n requestFullscreen() {\n var fsApi = FullscreenApi;\n\n this.isFullscreen(true);\n\n if (fsApi.requestFullscreen) {\n // the browser supports going fullscreen at the element level so we can\n // take the controls fullscreen as well as the video\n\n // Trigger fullscreenchange event after change\n // We have to specifically add this each time, and remove\n // when canceling fullscreen. Otherwise if there's multiple\n // players on a page, they would all be reacting to the same fullscreen\n // events\n Events.on(document, fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e){\n this.isFullscreen(document[fsApi.fullscreenElement]);\n\n // If cancelling fullscreen, remove event listener.\n if (this.isFullscreen() === false) {\n Events.off(document, fsApi.fullscreenchange, documentFullscreenChange);\n }\n\n this.trigger('fullscreenchange');\n }));\n\n this.el_[fsApi.requestFullscreen]();\n\n } else if (this.tech_.supportsFullScreen()) {\n // we can't take the video.js controls fullscreen but we can go fullscreen\n // with native controls\n this.techCall_('enterFullScreen');\n } else {\n // fullscreen isn't supported so we'll just stretch the video element to\n // fill the viewport\n this.enterFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * Return the video to its normal size after having been in full screen mode\n * ```js\n * myPlayer.exitFullscreen();\n * ```\n *\n * @return {Player} self\n * @method exitFullscreen\n */\n exitFullscreen() {\n var fsApi = FullscreenApi;\n this.isFullscreen(false);\n\n // Check for browser element fullscreen support\n if (fsApi.requestFullscreen) {\n document[fsApi.exitFullscreen]();\n } else if (this.tech_.supportsFullScreen()) {\n this.techCall_('exitFullScreen');\n } else {\n this.exitFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.\n *\n * @method enterFullWindow\n */\n enterFullWindow() {\n this.isFullWindow = true;\n\n // Storing original doc overflow value to return to when fullscreen is off\n this.docOrigOverflow = document.documentElement.style.overflow;\n\n // Add listener for esc key to exit fullscreen\n Events.on(document, 'keydown', Fn.bind(this, this.fullWindowOnEscKey));\n\n // Hide any scroll bars\n document.documentElement.style.overflow = 'hidden';\n\n // Apply fullscreen styles\n Dom.addElClass(document.body, 'vjs-full-window');\n\n this.trigger('enterFullWindow');\n }\n\n /**\n * Check for call to either exit full window or full screen on ESC key\n *\n * @param {String} event Event to check for key press\n * @method fullWindowOnEscKey\n */\n fullWindowOnEscKey(event) {\n if (event.keyCode === 27) {\n if (this.isFullscreen() === true) {\n this.exitFullscreen();\n } else {\n this.exitFullWindow();\n }\n }\n }\n\n /**\n * Exit full window\n *\n * @method exitFullWindow\n */\n exitFullWindow() {\n this.isFullWindow = false;\n Events.off(document, 'keydown', this.fullWindowOnEscKey);\n\n // Unhide scroll bars.\n document.documentElement.style.overflow = this.docOrigOverflow;\n\n // Remove fullscreen styles\n Dom.removeElClass(document.body, 'vjs-full-window');\n\n // Resize the box, controller, and poster to original sizes\n // this.positionAll();\n this.trigger('exitFullWindow');\n }\n\n /**\n * Check whether the player can play a given mimetype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n * @method canPlayType\n */\n canPlayType(type) {\n let can;\n\n // Loop through each playback technology in the options order\n for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n let techName = toTitleCase(j[i]);\n let tech = Tech.getTech(techName);\n\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!tech) {\n tech = Component.getComponent(techName);\n }\n\n // Check if the current tech is defined before continuing\n if (!tech) {\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n continue;\n }\n\n // Check if the browser supports this technology\n if (tech.isSupported()) {\n can = tech.canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n }\n\n return '';\n }\n\n /**\n * Select source based on tech-order or source-order\n * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n * defaults to tech-order selection\n *\n * @param {Array} sources The sources for a media asset\n * @return {Object|Boolean} Object of source and tech order, otherwise false\n * @method selectSource\n */\n selectSource(sources) {\n // Get only the techs specified in `techOrder` that exist and are supported by the\n // current platform\n let techs =\n this.options_.techOrder\n .map(toTitleCase)\n .map((techName) => {\n // `Component.getComponent(...)` is for support of old behavior of techs\n // being registered as components.\n // Remove once that deprecated behavior is removed.\n return [techName, Tech.getTech(techName) || Component.getComponent(techName)];\n })\n .filter(([techName, tech]) => {\n // Check if the current tech is defined before continuing\n if (tech) {\n // Check if the browser supports this technology\n return tech.isSupported();\n }\n\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n return false;\n });\n\n // Iterate over each `innerArray` element once per `outerArray` element and execute\n // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n // that value.\n let findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n let found;\n\n outerArray.some((outerChoice) => {\n return innerArray.some((innerChoice) => {\n found = tester(outerChoice, innerChoice);\n\n if (found) {\n return true;\n }\n });\n });\n\n return found;\n };\n\n let foundSourceAndTech;\n let flip = (fn) => (a, b) => fn(b, a);\n let finder = ([techName, tech], source) => {\n if (tech.canPlaySource(source)) {\n return {source: source, tech: techName};\n }\n };\n\n // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n // to select from them based on their priority.\n if (this.options_.sourceOrder) {\n // Source-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n } else {\n // Tech-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n }\n\n return foundSourceAndTech || false;\n }\n\n /**\n * The source function updates the video source\n * There are three types of variables you can pass as the argument.\n * **URL String**: A URL to the the video file. Use this method if you are sure\n * the current playback technology (HTML5/Flash) can support the source you\n * provide. Currently only MP4 files can be used in both HTML5 and Flash.\n * ```js\n * myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n * ```\n * **Source Object (or element):* * A javascript object containing information\n * about the source file. Use this method if you want the player to determine if\n * it can support the file using the type information.\n * ```js\n * myPlayer.src({ type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" });\n * ```\n * **Array of Source Objects:* * To provide multiple versions of the source so\n * that it can be played using HTML5 across browsers you can use an array of\n * source objects. Video.js will detect which version is supported and load that\n * file.\n * ```js\n * myPlayer.src([\n * { type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" },\n * { type: \"video/webm\", src: \"http://www.example.com/path/to/video.webm\" },\n * { type: \"video/ogg\", src: \"http://www.example.com/path/to/video.ogv\" }\n * ]);\n * ```\n *\n * @param {String|Object|Array=} source The source URL, object, or array of sources\n * @return {String} The current video source when getting\n * @return {String} The player when setting\n * @method src\n */\n src(source) {\n if (source === undefined) {\n return this.techGet_('src');\n }\n\n let currentTech = Tech.getTech(this.techName_);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!currentTech) {\n currentTech = Component.getComponent(this.techName_);\n }\n\n // case: Array of source objects to choose from and pick the best to play\n if (Array.isArray(source)) {\n this.sourceList_(source);\n\n // case: URL String (http://myvideo...)\n } else if (typeof source === 'string') {\n // create a source object from the string\n this.src({ src: source });\n\n // case: Source object { src: '', type: '' ... }\n } else if (source instanceof Object) {\n // check if the source has a type and the loaded tech cannot play the source\n // if there's no type we'll just try the current tech\n if (source.type && !currentTech.canPlaySource(source)) {\n // create a source list with the current source and send through\n // the tech loop to check for a compatible technology\n this.sourceList_([source]);\n } else {\n this.cache_.src = source.src;\n this.currentType_ = source.type || '';\n\n // wait until the tech is ready to set the source\n this.ready(function(){\n\n // The setSource tech method was added with source handlers\n // so older techs won't support it\n // We need to check the direct prototype for the case where subclasses\n // of the tech do not support source handlers\n if (currentTech.prototype.hasOwnProperty('setSource')) {\n this.techCall_('setSource', source);\n } else {\n this.techCall_('src', source.src);\n }\n\n if (this.options_.preload === 'auto') {\n this.load();\n }\n\n if (this.options_.autoplay) {\n this.play();\n }\n\n // Set the source synchronously if possible (#2326)\n }, true);\n }\n }\n\n return this;\n }\n\n /**\n * Handle an array of source objects\n *\n * @param {Array} sources Array of source objects\n * @private\n * @method sourceList_\n */\n sourceList_(sources) {\n var sourceTech = this.selectSource(sources);\n\n if (sourceTech) {\n if (sourceTech.tech === this.techName_) {\n // if this technology is already loaded, set the source\n this.src(sourceTech.source);\n } else {\n // load this technology with the chosen source\n this.loadTech_(sourceTech.tech, sourceTech.source);\n }\n } else {\n // We need to wrap this in a timeout to give folks a chance to add error event handlers\n this.setTimeout( function() {\n this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) });\n }, 0);\n\n // we could not find an appropriate tech, but let's still notify the delegate that this is it\n // this needs a better comment about why this is needed\n this.triggerReady();\n }\n }\n\n /**\n * Begin loading the src data.\n *\n * @return {Player} Returns the player\n * @method load\n */\n load() {\n this.techCall_('load');\n return this;\n }\n\n /**\n * Reset the player. Loads the first tech in the techOrder,\n * and calls `reset` on the tech`.\n *\n * @return {Player} Returns the player\n * @method reset\n */\n reset() {\n this.loadTech_(toTitleCase(this.options_.techOrder[0]), null);\n this.techCall_('reset');\n return this;\n }\n\n /**\n * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n * Can be used in conjuction with `currentType` to assist in rebuilding the current source object.\n *\n * @return {String} The current source\n * @method currentSrc\n */\n currentSrc() {\n return this.techGet_('currentSrc') || this.cache_.src || '';\n }\n\n /**\n * Get the current source type e.g. video/mp4\n * This can allow you rebuild the current source object so that you could load the same\n * source and tech later\n *\n * @return {String} The source MIME type\n * @method currentType\n */\n currentType() {\n return this.currentType_ || '';\n }\n\n /**\n * Get or set the preload attribute\n *\n * @param {Boolean} value Boolean to determine if preload should be used\n * @return {String} The preload attribute value when getting\n * @return {Player} Returns the player when setting\n * @method preload\n */\n preload(value) {\n if (value !== undefined) {\n this.techCall_('setPreload', value);\n this.options_.preload = value;\n return this;\n }\n return this.techGet_('preload');\n }\n\n /**\n * Get or set the autoplay attribute.\n *\n * @param {Boolean} value Boolean to determine if video should autoplay\n * @return {String} The autoplay attribute value when getting\n * @return {Player} Returns the player when setting\n * @method autoplay\n */\n autoplay(value) {\n if (value !== undefined) {\n this.techCall_('setAutoplay', value);\n this.options_.autoplay = value;\n return this;\n }\n return this.techGet_('autoplay', value);\n }\n\n /**\n * Get or set the loop attribute on the video element.\n *\n * @param {Boolean} value Boolean to determine if video should loop\n * @return {String} The loop attribute value when getting\n * @return {Player} Returns the player when setting\n * @method loop\n */\n loop(value) {\n if (value !== undefined) {\n this.techCall_('setLoop', value);\n this.options_['loop'] = value;\n return this;\n }\n return this.techGet_('loop');\n }\n\n /**\n * Get or set the poster image source url\n *\n * ##### EXAMPLE:\n * ```js\n * // get\n * var currentPoster = myPlayer.poster();\n * // set\n * myPlayer.poster('http://example.com/myImage.jpg');\n * ```\n *\n * @param {String=} src Poster image source URL\n * @return {String} poster URL when getting\n * @return {Player} self when setting\n * @method poster\n */\n poster(src) {\n if (src === undefined) {\n return this.poster_;\n }\n\n // The correct way to remove a poster is to set as an empty string\n // other falsey values will throw errors\n if (!src) {\n src = '';\n }\n\n // update the internal poster variable\n this.poster_ = src;\n\n // update the tech's poster\n this.techCall_('setPoster', src);\n\n // alert components that the poster has been set\n this.trigger('posterchange');\n\n return this;\n }\n\n /**\n * Some techs (e.g. YouTube) can provide a poster source in an\n * asynchronous way. We want the poster component to use this\n * poster source so that it covers up the tech's controls.\n * (YouTube's play button). However we only want to use this\n * soruce if the player user hasn't set a poster through\n * the normal APIs.\n *\n * @private\n * @method handleTechPosterChange_\n */\n handleTechPosterChange_() {\n if (!this.poster_ && this.tech_ && this.tech_.poster) {\n this.poster_ = this.tech_.poster() || '';\n\n // Let components know the poster has changed\n this.trigger('posterchange');\n }\n }\n\n /**\n * Get or set whether or not the controls are showing.\n *\n * @param {Boolean} bool Set controls to showing or not\n * @return {Boolean} Controls are showing\n * @method controls\n */\n controls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.controls_ !== bool) {\n this.controls_ = bool;\n\n if (this.usingNativeControls()) {\n this.techCall_('setControls', bool);\n }\n\n if (bool) {\n this.removeClass('vjs-controls-disabled');\n this.addClass('vjs-controls-enabled');\n this.trigger('controlsenabled');\n\n if (!this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n } else {\n this.removeClass('vjs-controls-enabled');\n this.addClass('vjs-controls-disabled');\n this.trigger('controlsdisabled');\n\n if (!this.usingNativeControls()) {\n this.removeTechControlsListeners_();\n }\n }\n }\n return this;\n }\n return !!this.controls_;\n }\n\n /**\n * Toggle native controls on/off. Native controls are the controls built into\n * devices (e.g. default iPhone controls), Flash, or other techs\n * (e.g. Vimeo Controls)\n * **This should only be set by the current tech, because only the tech knows\n * if it can support native controls**\n *\n * @param {Boolean} bool True signals that native controls are on\n * @return {Player} Returns the player\n * @private\n * @method usingNativeControls\n */\n usingNativeControls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.usingNativeControls_ !== bool) {\n this.usingNativeControls_ = bool;\n if (bool) {\n this.addClass('vjs-using-native-controls');\n\n /**\n * player is using the native device controls\n *\n * @event usingnativecontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingnativecontrols');\n } else {\n this.removeClass('vjs-using-native-controls');\n\n /**\n * player is using the custom HTML controls\n *\n * @event usingcustomcontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingcustomcontrols');\n }\n }\n return this;\n }\n return !!this.usingNativeControls_;\n }\n\n /**\n * Set or get the current MediaError\n *\n * @param {*} err A MediaError or a String/Number to be turned into a MediaError\n * @return {MediaError|null} when getting\n * @return {Player} when setting\n * @method error\n */\n error(err) {\n if (err === undefined) {\n return this.error_ || null;\n }\n\n // restoring to default\n if (err === null) {\n this.error_ = err;\n this.removeClass('vjs-error');\n this.errorDisplay.close();\n return this;\n }\n\n // error instance\n if (err instanceof MediaError) {\n this.error_ = err;\n } else {\n this.error_ = new MediaError(err);\n }\n\n // add the vjs-error classname to the player\n this.addClass('vjs-error');\n\n // log the name of the error type and any message\n // ie8 just logs \"[object object]\" if you just log the error object\n log.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`, this.error_.message, this.error_);\n\n // fire an error event on the player\n this.trigger('error');\n\n return this;\n }\n\n /**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method ended\n */\n ended() { return this.techGet_('ended'); }\n\n /**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method seeking\n */\n seeking() { return this.techGet_('seeking'); }\n\n /**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method seekable\n */\n seekable() { return this.techGet_('seekable'); }\n\n /**\n * Report user activity\n *\n * @param {Object} event Event object\n * @method reportUserActivity\n */\n reportUserActivity(event) {\n this.userActivity_ = true;\n }\n\n /**\n * Get/set if user is active\n *\n * @param {Boolean} bool Value when setting\n * @return {Boolean} Value if user is active user when getting\n * @method userActive\n */\n userActive(bool) {\n if (bool !== undefined) {\n bool = !!bool;\n if (bool !== this.userActive_) {\n this.userActive_ = bool;\n if (bool) {\n // If the user was inactive and is now active we want to reset the\n // inactivity timer\n this.userActivity_ = true;\n this.removeClass('vjs-user-inactive');\n this.addClass('vjs-user-active');\n this.trigger('useractive');\n } else {\n // We're switching the state to inactive manually, so erase any other\n // activity\n this.userActivity_ = false;\n\n // Chrome/Safari/IE have bugs where when you change the cursor it can\n // trigger a mousemove event. This causes an issue when you're hiding\n // the cursor when the user is inactive, and a mousemove signals user\n // activity. Making it impossible to go into inactive mode. Specifically\n // this happens in fullscreen when we really need to hide the cursor.\n //\n // When this gets resolved in ALL browsers it can be removed\n // https://code.google.com/p/chromium/issues/detail?id=103041\n if(this.tech_) {\n this.tech_.one('mousemove', function(e){\n e.stopPropagation();\n e.preventDefault();\n });\n }\n\n this.removeClass('vjs-user-active');\n this.addClass('vjs-user-inactive');\n this.trigger('userinactive');\n }\n }\n return this;\n }\n return this.userActive_;\n }\n\n /**\n * Listen for user activity based on timeout value\n *\n * @private\n * @method listenForUserActivity_\n */\n listenForUserActivity_() {\n let mouseInProgress, lastMoveX, lastMoveY;\n\n let handleActivity = Fn.bind(this, this.reportUserActivity);\n\n let handleMouseMove = function(e) {\n // #1068 - Prevent mousemove spamming\n // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n if(e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n lastMoveX = e.screenX;\n lastMoveY = e.screenY;\n handleActivity();\n }\n };\n\n let handleMouseDown = function() {\n handleActivity();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(mouseInProgress);\n // Setting userActivity=true now and setting the interval to the same time\n // as the activityCheck interval (250) should ensure we never miss the\n // next activityCheck\n mouseInProgress = this.setInterval(handleActivity, 250);\n };\n\n let handleMouseUp = function(event) {\n handleActivity();\n // Stop the interval that maintains activity if the mouse/touch is down\n this.clearInterval(mouseInProgress);\n };\n\n // Any mouse movement will be considered user activity\n this.on('mousedown', handleMouseDown);\n this.on('mousemove', handleMouseMove);\n this.on('mouseup', handleMouseUp);\n\n // Listen for keyboard navigation\n // Shouldn't need to use inProgress interval because of key repeat\n this.on('keydown', handleActivity);\n this.on('keyup', handleActivity);\n\n // Run an interval every 250 milliseconds instead of stuffing everything into\n // the mousemove/touchmove function itself, to prevent performance degradation.\n // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n // then gets picked up by this loop\n // http://ejohn.org/blog/learning-from-twitter/\n let inactivityTimeout;\n let activityCheck = this.setInterval(function() {\n // Check to see if mouse/touch activity has happened\n if (this.userActivity_) {\n // Reset the activity tracker\n this.userActivity_ = false;\n\n // If the user state was inactive, set the state to active\n this.userActive(true);\n\n // Clear any existing inactivity timeout to start the timer over\n this.clearTimeout(inactivityTimeout);\n\n var timeout = this.options_['inactivityTimeout'];\n if (timeout > 0) {\n // In milliseconds, if no more activity has occurred the\n // user will be considered inactive\n inactivityTimeout = this.setTimeout(function () {\n // Protect against the case where the inactivityTimeout can trigger just\n // before the next user activity is picked up by the activityCheck loop\n // causing a flicker\n if (!this.userActivity_) {\n this.userActive(false);\n }\n }, timeout);\n }\n }\n }, 250);\n }\n\n /**\n * Gets or sets the current playback rate. A playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed\n * playback, for instance.\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n *\n * @param {Number} rate New playback rate to set.\n * @return {Number} Returns the new playback rate when setting\n * @return {Number} Returns the current playback rate when getting\n * @method playbackRate\n */\n playbackRate(rate) {\n if (rate !== undefined) {\n this.techCall_('setPlaybackRate', rate);\n return this;\n }\n\n if (this.tech_ && this.tech_['featuresPlaybackRate']) {\n return this.techGet_('playbackRate');\n } else {\n return 1.0;\n }\n }\n\n /**\n * Gets or sets the audio flag\n *\n * @param {Boolean} bool True signals that this is an audio player.\n * @return {Boolean} Returns true if player is audio, false if not when getting\n * @return {Player} Returns the player if setting\n * @private\n * @method isAudio\n */\n isAudio(bool) {\n if (bool !== undefined) {\n this.isAudio_ = !!bool;\n return this;\n }\n\n return !!this.isAudio_;\n }\n\n /**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n * The element has not yet been initialised. All attributes are in\n * their initial states.\n * - NETWORK_IDLE (numeric value 1)\n * The element's resource selection algorithm is active and has\n * selected a resource, but it is not actually using the network at\n * this time.\n * - NETWORK_LOADING (numeric value 2)\n * The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n * The element's resource selection algorithm is active, but it has\n * not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {Number} the current network activity state\n * @method networkState\n */\n networkState() {\n return this.techGet_('networkState');\n }\n\n /**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n * No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n * Enough of the resource has been obtained that the duration of the\n * resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n * Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n * Data for the immediate current playback position is available, as\n * well as enough data for the user agent to advance the current\n * playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n * The user agent estimates that enough data is available for\n * playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {Number} the current playback rendering state\n * @method readyState\n */\n readyState() {\n return this.techGet_('readyState');\n }\n\n /**\n * Text tracks are tracks of timed text events.\n * Captions - text displayed over the video for the hearing impaired\n * Subtitles - text displayed over the video for those who don't understand language in the video\n * Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video\n * Descriptions - audio descriptions that are read back to the user by a screen reading device\n */\n\n /**\n * Get an array of associated text tracks. captions, subtitles, chapters, descriptions\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {Array} Array of track objects\n * @method textTracks\n */\n textTracks() {\n // cannot use techGet_ directly because it checks to see whether the tech is ready.\n // Flash is unlikely to be ready in time but textTracks should still work.\n return this.tech_ && this.tech_['textTracks']();\n }\n\n /**\n * Get an array of remote text tracks\n *\n * @return {Array}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n return this.tech_ && this.tech_['remoteTextTracks']();\n }\n\n /**\n * Get an array of remote html track elements\n *\n * @return {HTMLTrackElement[]}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n return this.tech_ && this.tech_['remoteTextTrackEls']();\n }\n\n /**\n * Add a text track\n * In addition to the W3C settings we allow adding additional info through options.\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n *\n * @param {String} kind Captions, subtitles, chapters, descriptions, or metadata\n * @param {String=} label Optional label\n * @param {String=} language Optional language\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n return this.tech_ && this.tech_['addTextTrack'](kind, label, language);\n }\n\n /**\n * Add a remote text track\n *\n * @param {Object} options Options for remote text track\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n return this.tech_ && this.tech_['addRemoteTextTrack'](options);\n }\n\n /**\n * Remove a remote text track\n *\n * @param {Object} track Remote text track to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.tech_ && this.tech_['removeRemoteTextTrack'](track);\n }\n\n /**\n * Get video width\n *\n * @return {Number} Video width\n * @method videoWidth\n */\n videoWidth() {\n return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n }\n\n /**\n * Get video height\n *\n * @return {Number} Video height\n * @method videoHeight\n */\n videoHeight() {\n return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n }\n\n // Methods to add support for\n // initialTime: function(){ return this.techCall_('initialTime'); },\n // startOffsetTime: function(){ return this.techCall_('startOffsetTime'); },\n // played: function(){ return this.techCall_('played'); },\n // videoTracks: function(){ return this.techCall_('videoTracks'); },\n // audioTracks: function(){ return this.techCall_('audioTracks'); },\n // defaultPlaybackRate: function(){ return this.techCall_('defaultPlaybackRate'); },\n // defaultMuted: function(){ return this.techCall_('defaultMuted'); }\n\n /**\n * The player's language code\n * NOTE: The language should be set in the player options if you want the\n * the controls to be built with a specific language. Changing the lanugage\n * later will not update controls text.\n *\n * @param {String} code The locale string\n * @return {String} The locale string when getting\n * @return {Player} self when setting\n * @method language\n */\n language(code) {\n if (code === undefined) {\n return this.language_;\n }\n\n this.language_ = (''+code).toLowerCase();\n return this;\n }\n\n /**\n * Get the player's language dictionary\n * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n * Languages specified directly in the player options have precedence\n *\n * @return {Array} Array of languages\n * @method languages\n */\n languages() {\n return mergeOptions(Player.prototype.options_.languages, this.languages_);\n }\n\n /**\n * Converts track info to JSON\n *\n * @return {Object} JSON object of options\n * @method toJSON\n */\n toJSON() {\n let options = mergeOptions(this.options_);\n let tracks = options.tracks;\n\n options.tracks = [];\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // deep merge tracks and null out player so no circular references\n track = mergeOptions(track);\n track.player = undefined;\n options.tracks[i] = track;\n }\n\n return options;\n }\n\n /**\n * Creates a simple modal dialog (an instance of the `ModalDialog`\n * component) that immediately overlays the player with arbitrary\n * content and removes itself when closed.\n *\n * @param {String|Function|Element|Array|Null} content\n * Same as `ModalDialog#content`'s param of the same name.\n *\n * The most straight-forward usage is to provide a string or DOM\n * element.\n *\n * @param {Object} [options]\n * Extra options which will be passed on to the `ModalDialog`.\n *\n * @return {ModalDialog}\n */\n createModal(content, options) {\n let player = this;\n\n options = options || {};\n options.content = content || '';\n\n let modal = new ModalDialog(player, options);\n\n player.addChild(modal);\n modal.on('dispose', function() {\n player.removeChild(modal);\n });\n\n return modal.open();\n }\n\n /**\n * Gets tag settings\n *\n * @param {Element} tag The player tag\n * @return {Array} An array of sources and track objects\n * @static\n * @method getTagSettings\n */\n static getTagSettings(tag) {\n let baseOptions = {\n 'sources': [],\n 'tracks': []\n };\n\n const tagOptions = Dom.getElAttributes(tag);\n const dataSetup = tagOptions['data-setup'];\n\n // Check if data-setup attr exists.\n if (dataSetup !== null){\n // Parse options JSON\n // If empty string, make it a parsable json object.\n const [err, data] = safeParseTuple(dataSetup || '{}');\n if (err) {\n log.error(err);\n }\n assign(tagOptions, data);\n }\n\n assign(baseOptions, tagOptions);\n\n // Get tag children settings\n if (tag.hasChildNodes()) {\n const children = tag.childNodes;\n\n for (let i=0, j=children.length; i 1) {\n this.show();\n }\n }\n\n /**\n * Create popup - Override with specific functionality for component\n *\n * @return {Popup} The constructed popup\n * @method createPopup\n */\n createPopup() {}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n}\n\nComponent.registerComponent('PopupButton', PopupButton);\nexport default PopupButton;\n","/**\n * @file popup.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Popup component is used to build pop up controls.\n *\n * @extends Component\n * @class Popup\n */\nclass Popup extends Component {\n\n /**\n * Add a popup item to the popup\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Popup Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n}\n\nComponent.registerComponent('Popup', Popup);\nexport default Popup;\n","/**\n * @file poster-image.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component.js';\nimport * as Fn from './utils/fn.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\n\n/**\n * The component that handles showing the poster image.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PosterImage\n */\nclass PosterImage extends ClickableComponent {\n\n constructor(player, options){\n super(player, options);\n\n this.update();\n player.on('posterchange', Fn.bind(this, this.update));\n }\n\n /**\n * Clean up the poster image\n *\n * @method dispose\n */\n dispose() {\n this.player().off('posterchange', this.update);\n super.dispose();\n }\n\n /**\n * Create the poster's image element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = Dom.createEl('div', {\n className: 'vjs-poster',\n\n // Don't want poster to be tabbable.\n tabIndex: -1\n });\n\n // To ensure the poster image resizes while maintaining its original aspect\n // ratio, use a div with `background-size` when available. For browsers that\n // do not support `background-size` (e.g. IE8), fall back on using a regular\n // img element.\n if (!browser.BACKGROUND_SIZE_SUPPORTED) {\n this.fallbackImg_ = Dom.createEl('img');\n el.appendChild(this.fallbackImg_);\n }\n\n return el;\n }\n\n /**\n * Event handler for updates to the player's poster source\n *\n * @method update\n */\n update() {\n let url = this.player().poster();\n\n this.setSrc(url);\n\n // If there's no poster source we should display:none on this component\n // so it's not still clickable or right-clickable\n if (url) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Set the poster source depending on the display method\n *\n * @param {String} url The URL to the poster source\n * @method setSrc\n */\n setSrc(url) {\n if (this.fallbackImg_) {\n this.fallbackImg_.src = url;\n } else {\n let backgroundImage = '';\n // Any falsey values should stay as an empty string, otherwise\n // this will throw an extra error\n if (url) {\n backgroundImage = `url(\"${url}\")`;\n }\n\n this.el_.style.backgroundImage = backgroundImage;\n }\n }\n\n /**\n * Event handler for clicks on the poster image\n *\n * @method handleClick\n */\n handleClick() {\n // We don't want a click to trigger playback when controls are disabled\n // but CSS should be hiding the poster to prevent that from happening\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n}\n\nComponent.registerComponent('PosterImage', PosterImage);\nexport default PosterImage;\n","/**\n * @file setup.js\n *\n * Functions for automatically setting up a player\n * based on the data-setup attribute of the video tag\n */\nimport * as Events from './utils/events.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nlet _windowLoaded = false;\nlet videojs;\n\n\n// Automatically set up any tags that have a data-setup attribute\nvar autoSetup = function(){\n // One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack*\n // var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n // var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n // var mediaEls = vids.concat(audios);\n\n // Because IE8 doesn't support calling slice on a node list, we need to loop through each list of elements\n // to build up a new, combined list of elements.\n var vids = document.getElementsByTagName('video');\n var audios = document.getElementsByTagName('audio');\n var mediaEls = [];\n if (vids && vids.length > 0) {\n for(let i=0, e=vids.length; i 0) {\n for(let i=0, e=audios.length; i 0) {\n\n for (let i=0, e=mediaEls.length; i seekable.start(0) ? time : seekable.start(0);\n time = time < seekable.end(seekable.length - 1) ? time : seekable.end(seekable.length - 1);\n\n this.lastSeekTarget_ = time;\n this.trigger('seeking');\n this.el_.vjs_setProperty('currentTime', time);\n super.setCurrentTime();\n }\n }\n\n /**\n * Get current time\n *\n * @param {Number=} time Current time of video\n * @return {Number} Current time\n * @method currentTime\n */\n currentTime(time) {\n // when seeking make the reported time keep up with the requested time\n // by reading the time we're seeking to\n if (this.seeking()) {\n return this.lastSeekTarget_ || 0;\n }\n return this.el_.vjs_getProperty('currentTime');\n }\n\n /**\n * Get current source\n *\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.vjs_getProperty('currentSrc');\n }\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load() {\n this.el_.vjs_load();\n }\n\n /**\n * Get poster\n *\n * @method poster\n */\n poster() {\n this.el_.vjs_getProperty('poster');\n }\n\n /**\n * Poster images are not handled by the Flash tech so make this a no-op\n *\n * @method setPoster\n */\n setPoster() {}\n\n /**\n * Determine if can seek in media\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() {\n const duration = this.duration();\n if (duration === 0) {\n return createTimeRange();\n }\n return createTimeRange(0, duration);\n }\n\n /**\n * Get buffered time range\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() {\n let ranges = this.el_.vjs_getProperty('buffered');\n if (ranges.length === 0) {\n return createTimeRange();\n }\n return createTimeRange(ranges[0][0], ranges[0][1]);\n }\n\n /**\n * Get fullscreen support -\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return false; // Flash does not allow fullscreen through javascript\n }\n\n /**\n * Request to enter fullscreen\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method enterFullScreen\n */\n enterFullScreen() {\n return false;\n }\n\n}\n\n\n// Create setters and getters for attributes\nconst _api = Flash.prototype;\nconst _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(',');\nconst _readOnly = 'networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(',');\n\nfunction _createSetter(attr){\n var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);\n _api['set'+attrUpper] = function(val){ return this.el_.vjs_setProperty(attr, val); };\n}\nfunction _createGetter(attr) {\n _api[attr] = function(){ return this.el_.vjs_getProperty(attr); };\n}\n\n// Create getter and setters for all read/write attributes\nfor (let i = 0; i < _readWrite.length; i++) {\n _createGetter(_readWrite[i]);\n _createSetter(_readWrite[i]);\n}\n\n// Create getters for read-only attributes\nfor (let i = 0; i < _readOnly.length; i++) {\n _createGetter(_readOnly[i]);\n}\n\n/* Flash Support Testing -------------------------------------------------------- */\n\nFlash.isSupported = function(){\n return Flash.version()[0] >= 10;\n // return swfobject.hasFlashPlayerVersion('10');\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Flash);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler = {};\n\n/**\n * Check if Flash can play the given videotype\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canPlayType = function(type){\n if (type in Flash.formats) {\n return 'maybe';\n }\n\n return '';\n};\n\n/*\n * Check Flash can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canHandleSource = function(source){\n var type;\n\n function guessMimeType(src) {\n var ext = Url.getFileExtension(src);\n if (ext) {\n return `video/${ext}`;\n }\n return '';\n }\n\n if (!source.type) {\n type = guessMimeType(source.src);\n } else {\n // Strip code information from the type because we don't get that specific\n type = source.type.replace(/;.*/, '').toLowerCase();\n }\n\n return Flash.nativeSourceHandler.canPlayType(type);\n};\n\n/*\n * Pass the source to the flash object\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n * Clean up the source handler when disposing the player or switching sources..\n * (no cleanup is needed when supporting the format natively)\n */\nFlash.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nFlash.registerSourceHandler(Flash.nativeSourceHandler);\n\nFlash.formats = {\n 'video/flv': 'FLV',\n 'video/x-flv': 'FLV',\n 'video/mp4': 'MP4',\n 'video/m4v': 'MP4'\n};\n\nFlash.onReady = function(currSwf){\n let el = Dom.getEl(currSwf);\n let tech = el && el.tech;\n\n // if there is no el then the tech has been disposed\n // and the tech element was removed from the player div\n if (tech && tech.el()) {\n // check that the flash object is really ready\n Flash.checkReady(tech);\n }\n};\n\n// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object.\n// If it's not ready, we set a timeout to check again shortly.\nFlash.checkReady = function(tech){\n // stop worrying if the tech has been disposed\n if (!tech.el()) {\n return;\n }\n\n // check if API property exists\n if (tech.el().vjs_getProperty) {\n // tell tech it's ready\n tech.triggerReady();\n } else {\n // wait longer\n this.setTimeout(function(){\n Flash['checkReady'](tech);\n }, 50);\n }\n};\n\n// Trigger events from the swf on the player\nFlash.onEvent = function(swfID, eventName){\n let tech = Dom.getEl(swfID).tech;\n tech.trigger(eventName);\n};\n\n// Log errors from the swf\nFlash.onError = function(swfID, err){\n const tech = Dom.getEl(swfID).tech;\n\n // trigger MEDIA_ERR_SRC_NOT_SUPPORTED\n if (err === 'srcnotfound') {\n return tech.error(4);\n }\n\n // trigger a custom error\n tech.error('FLASH: ' + err);\n};\n\n// Flash Version Check\nFlash.version = function(){\n let version = '0,0,0';\n\n // IE\n try {\n version = new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n\n // other browsers\n } catch(e) {\n try {\n if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin){\n version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n }\n } catch(err) {}\n }\n return version.split(',');\n};\n\n// Flash embedding method. Only used in non-iframe mode\nFlash.embed = function(swf, flashVars, params, attributes){\n const code = Flash.getEmbedCode(swf, flashVars, params, attributes);\n\n // Get element by embedding code and retrieving created element\n const obj = Dom.createEl('div', { innerHTML: code }).childNodes[0];\n\n return obj;\n};\n\nFlash.getEmbedCode = function(swf, flashVars, params, attributes){\n const objTag = '`;\n });\n\n attributes = assign({\n // Add swf to attributes (need both for IE and Others to work)\n 'data': swf,\n\n // Default to 100% width/height\n 'width': '100%',\n 'height': '100%'\n\n }, attributes);\n\n // Create Attributes string\n Object.getOwnPropertyNames(attributes).forEach(function(key){\n attrsString += `${key}=\"${attributes[key]}\" `;\n });\n\n return `${objTag}${attrsString}>${paramsString}`;\n};\n\n// Run Flash through the RTMP decorator\nFlashRtmpDecorator(Flash);\n\nComponent.registerComponent('Flash', Flash);\nTech.registerTech('Flash', Flash);\nexport default Flash;\n","/**\n * @file html5.js\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n */\n\nimport Tech from './tech.js';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\nimport * as Url from '../utils/url.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport window from 'global/window';\nimport assign from 'object.assign';\nimport mergeOptions from '../utils/merge-options.js';\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Tech\n * @class Html5\n */\nclass Html5 extends Tech {\n\n constructor(options, ready){\n super(options, ready);\n\n const source = options.source;\n\n // Set the source if one is provided\n // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n // anyway so the error gets fired.\n if (source && (this.el_.currentSrc !== source.src || (options.tag && options.tag.initNetworkState_ === 3))) {\n this.setSource(source);\n } else {\n this.handleLateInit_(this.el_);\n }\n\n if (this.el_.hasChildNodes()) {\n\n let nodes = this.el_.childNodes;\n let nodesLength = nodes.length;\n let removeNodes = [];\n\n while (nodesLength--) {\n let node = nodes[nodesLength];\n let nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'track') {\n if (!this.featuresNativeTextTracks) {\n // Empty video tag tracks so the built-in player doesn't use them also.\n // This may not be fast enough to stop HTML5 browsers from reading the tags\n // so we'll need to turn off any default tracks if we're manually doing\n // captions and subtitles. videoElement.textTracks\n removeNodes.push(node);\n } else {\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(node);\n this.remoteTextTracks().addTrack_(node.track);\n }\n }\n }\n\n for (let i=0; i= 0; i--) {\n const attr = settingsAttrs[i];\n let overwriteAttrs = {};\n if (typeof this.options_[attr] !== 'undefined') {\n overwriteAttrs[attr] = this.options_[attr];\n }\n Dom.setElAttributes(el, overwriteAttrs);\n }\n\n return el;\n // jenniisawesome = true;\n }\n\n // If we're loading the playback object after it has started loading\n // or playing the video (often with autoplay on) then the loadstart event\n // has already fired and we need to fire it manually because many things\n // rely on it.\n handleLateInit_(el) {\n if (el.networkState === 0 || el.networkState === 3) {\n // The video element hasn't started loading the source yet\n // or didn't find a source\n return;\n }\n\n if (el.readyState === 0) {\n // NetworkState is set synchronously BUT loadstart is fired at the\n // end of the current stack, usually before setInterval(fn, 0).\n // So at this point we know loadstart may have already fired or is\n // about to fire, and either way the player hasn't seen it yet.\n // We don't want to fire loadstart prematurely here and cause a\n // double loadstart so we'll wait and see if it happens between now\n // and the next loop, and fire it if not.\n // HOWEVER, we also want to make sure it fires before loadedmetadata\n // which could also happen between now and the next loop, so we'll\n // watch for that also.\n let loadstartFired = false;\n let setLoadstartFired = function() {\n loadstartFired = true;\n };\n this.on('loadstart', setLoadstartFired);\n\n let triggerLoadstart = function() {\n // We did miss the original loadstart. Make sure the player\n // sees loadstart before loadedmetadata\n if (!loadstartFired) {\n this.trigger('loadstart');\n }\n };\n this.on('loadedmetadata', triggerLoadstart);\n\n this.ready(function(){\n this.off('loadstart', setLoadstartFired);\n this.off('loadedmetadata', triggerLoadstart);\n\n if (!loadstartFired) {\n // We did miss the original native loadstart. Fire it now.\n this.trigger('loadstart');\n }\n });\n\n return;\n }\n\n // From here on we know that loadstart already fired and we missed it.\n // The other readyState events aren't as much of a problem if we double\n // them, so not going to go to as much trouble as loadstart to prevent\n // that unless we find reason to.\n let eventsToTrigger = ['loadstart'];\n\n // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n eventsToTrigger.push('loadedmetadata');\n\n // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n if (el.readyState >= 2) {\n eventsToTrigger.push('loadeddata');\n }\n\n // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n if (el.readyState >= 3) {\n eventsToTrigger.push('canplay');\n }\n\n // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n if (el.readyState >= 4) {\n eventsToTrigger.push('canplaythrough');\n }\n\n // We still need to give the player time to add event listeners\n this.ready(function(){\n eventsToTrigger.forEach(function(type){\n this.trigger(type);\n }, this);\n });\n }\n\n proxyNativeTextTracks_() {\n let tt = this.el().textTracks;\n\n if (tt) {\n // Add tracks - if player is initialised after DOM loaded, textTracks\n // will not trigger addtrack\n for (let i = 0; i < tt.length; i++) {\n this.textTracks().addTrack_(tt[i]);\n }\n\n if (tt.addEventListener) {\n tt.addEventListener('change', this.handleTextTrackChange_);\n tt.addEventListener('addtrack', this.handleTextTrackAdd_);\n tt.addEventListener('removetrack', this.handleTextTrackRemove_);\n }\n }\n }\n\n handleTextTrackChange(e) {\n let tt = this.textTracks();\n this.textTracks().trigger({\n type: 'change',\n target: tt,\n currentTarget: tt,\n srcElement: tt\n });\n }\n\n handleTextTrackAdd(e) {\n this.textTracks().addTrack_(e.track);\n }\n\n handleTextTrackRemove(e) {\n this.textTracks().removeTrack_(e.track);\n }\n\n /**\n * Play for html5 tech\n *\n * @method play\n */\n play() { this.el_.play(); }\n\n /**\n * Pause for html5 tech\n *\n * @method pause\n */\n pause() { this.el_.pause(); }\n\n /**\n * Paused for html5 tech\n *\n * @return {Boolean}\n * @method paused\n */\n paused() { return this.el_.paused; }\n\n /**\n * Get current time\n *\n * @return {Number}\n * @method currentTime\n */\n currentTime() { return this.el_.currentTime; }\n\n /**\n * Set current time\n *\n * @param {Number} seconds Current time of video\n * @method setCurrentTime\n */\n setCurrentTime(seconds) {\n try {\n this.el_.currentTime = seconds;\n } catch(e) {\n log(e, 'Video is not ready. (Video.js)');\n // this.warning(VideoJS.warnings.videoNotReady);\n }\n }\n\n /**\n * Get duration\n *\n * @return {Number}\n * @method duration\n */\n duration() { return this.el_.duration || 0; }\n\n /**\n * Get a TimeRange object that represents the intersection\n * of the time ranges for which the user agent has all\n * relevant media\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() { return this.el_.buffered; }\n\n /**\n * Get volume level\n *\n * @return {Number}\n * @method volume\n */\n volume() { return this.el_.volume; }\n\n /**\n * Set volume level\n *\n * @param {Number} percentAsDecimal Volume percent as a decimal\n * @method setVolume\n */\n setVolume(percentAsDecimal) { this.el_.volume = percentAsDecimal; }\n\n /**\n * Get if muted\n *\n * @return {Boolean}\n * @method muted\n */\n muted() { return this.el_.muted; }\n\n /**\n * Set muted\n *\n * @param {Boolean} If player is to be muted or note\n * @method setMuted\n */\n setMuted(muted) { this.el_.muted = muted; }\n\n /**\n * Get player width\n *\n * @return {Number}\n * @method width\n */\n width() { return this.el_.offsetWidth; }\n\n /**\n * Get player height\n *\n * @return {Number}\n * @method height\n */\n height() { return this.el_.offsetHeight; }\n\n /**\n * Get if there is fullscreen support\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n if (typeof this.el_.webkitEnterFullScreen === 'function') {\n let userAgent = window.navigator.userAgent;\n // Seems to be broken in Chromium/Chrome && Safari in Leopard\n if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Request to enter fullscreen\n *\n * @method enterFullScreen\n */\n enterFullScreen() {\n var video = this.el_;\n\n if ('webkitDisplayingFullscreen' in video) {\n this.one('webkitbeginfullscreen', function() {\n this.one('webkitendfullscreen', function() {\n this.trigger('fullscreenchange', { isFullscreen: false });\n });\n\n this.trigger('fullscreenchange', { isFullscreen: true });\n });\n }\n\n if (video.paused && video.networkState <= video.HAVE_METADATA) {\n // attempt to prime the video element for programmatic access\n // this isn't necessary on the desktop but shouldn't hurt\n this.el_.play();\n\n // playing and pausing synchronously during the transition to fullscreen\n // can get iOS ~6.1 devices into a play/pause loop\n this.setTimeout(function(){\n video.pause();\n video.webkitEnterFullScreen();\n }, 0);\n } else {\n video.webkitEnterFullScreen();\n }\n }\n\n /**\n * Request to exit fullscreen\n *\n * @method exitFullScreen\n */\n exitFullScreen() {\n this.el_.webkitExitFullScreen();\n }\n\n /**\n * Get/set video\n *\n * @param {Object=} src Source object\n * @return {Object}\n * @method src\n */\n src(src) {\n if (src === undefined) {\n return this.el_.src;\n } else {\n // Setting src through `src` instead of `setSrc` will be deprecated\n this.setSrc(src);\n }\n }\n\n /**\n * Set video\n *\n * @param {Object} src Source object\n * @deprecated\n * @method setSrc\n */\n setSrc(src) {\n this.el_.src = src;\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load(){\n this.el_.load();\n }\n\n /**\n * Reset the tech. Removes all sources and calls `load`.\n *\n * @method reset\n */\n reset() {\n Html5.resetMediaElement(this.el_);\n }\n\n /**\n * Get current source\n *\n * @return {Object}\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.currentSrc;\n }\n }\n\n /**\n * Get poster\n *\n * @return {String}\n * @method poster\n */\n poster() { return this.el_.poster; }\n\n /**\n * Set poster\n *\n * @param {String} val URL to poster image\n * @method\n */\n setPoster(val) { this.el_.poster = val; }\n\n /**\n * Get preload attribute\n *\n * @return {String}\n * @method preload\n */\n preload() { return this.el_.preload; }\n\n /**\n * Set preload attribute\n *\n * @param {String} val Value for preload attribute\n * @method setPreload\n */\n setPreload(val) { this.el_.preload = val; }\n\n /**\n * Get autoplay attribute\n *\n * @return {String}\n * @method autoplay\n */\n autoplay() { return this.el_.autoplay; }\n\n /**\n * Set autoplay attribute\n *\n * @param {String} val Value for preload attribute\n * @method setAutoplay\n */\n setAutoplay(val) { this.el_.autoplay = val; }\n\n /**\n * Get controls attribute\n *\n * @return {String}\n * @method controls\n */\n controls() { return this.el_.controls; }\n\n /**\n * Set controls attribute\n *\n * @param {String} val Value for controls attribute\n * @method setControls\n */\n setControls(val) { this.el_.controls = !!val; }\n\n /**\n * Get loop attribute\n *\n * @return {String}\n * @method loop\n */\n loop() { return this.el_.loop; }\n\n /**\n * Set loop attribute\n *\n * @param {String} val Value for loop attribute\n * @method setLoop\n */\n setLoop(val) { this.el_.loop = val; }\n\n /**\n * Get error value\n *\n * @return {String}\n * @method error\n */\n error() { return this.el_.error; }\n\n /**\n * Get whether or not the player is in the \"seeking\" state\n *\n * @return {Boolean}\n * @method seeking\n */\n seeking() { return this.el_.seeking; }\n\n /**\n * Get a TimeRanges object that represents the\n * ranges of the media resource to which it is possible\n * for the user agent to seek.\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() { return this.el_.seekable; }\n\n /**\n * Get if video ended\n *\n * @return {Boolean}\n * @method ended\n */\n ended() { return this.el_.ended; }\n\n /**\n * Get the value of the muted content attribute\n * This attribute has no dynamic effect, it only\n * controls the default state of the element\n *\n * @return {Boolean}\n * @method defaultMuted\n */\n defaultMuted() { return this.el_.defaultMuted; }\n\n /**\n * Get desired speed at which the media resource is to play\n *\n * @return {Number}\n * @method playbackRate\n */\n playbackRate() { return this.el_.playbackRate; }\n\n /**\n * Returns a TimeRanges object that represents the ranges of the\n * media resource that the user agent has played.\n * @return {TimeRangeObject} the range of points on the media\n * timeline that has been reached through normal playback\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-played\n */\n played() { return this.el_.played; }\n\n /**\n * Set desired speed at which the media resource is to play\n *\n * @param {Number} val Speed at which the media resource is to play\n * @method setPlaybackRate\n */\n setPlaybackRate(val) { this.el_.playbackRate = val; }\n\n /**\n * Get the current state of network activity for the element, from\n * the list below\n * NETWORK_EMPTY (numeric value 0)\n * NETWORK_IDLE (numeric value 1)\n * NETWORK_LOADING (numeric value 2)\n * NETWORK_NO_SOURCE (numeric value 3)\n *\n * @return {Number}\n * @method networkState\n */\n networkState() { return this.el_.networkState; }\n\n /**\n * Get a value that expresses the current state of the element\n * with respect to rendering the current playback position, from\n * the codes in the list below\n * HAVE_NOTHING (numeric value 0)\n * HAVE_METADATA (numeric value 1)\n * HAVE_CURRENT_DATA (numeric value 2)\n * HAVE_FUTURE_DATA (numeric value 3)\n * HAVE_ENOUGH_DATA (numeric value 4)\n *\n * @return {Number}\n * @method readyState\n */\n readyState() { return this.el_.readyState; }\n\n /**\n * Get width of video\n *\n * @return {Number}\n * @method videoWidth\n */\n videoWidth() { return this.el_.videoWidth; }\n\n /**\n * Get height of video\n *\n * @return {Number}\n * @method videoHeight\n */\n videoHeight() { return this.el_.videoHeight; }\n\n /**\n * Get text tracks\n *\n * @return {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n return super.textTracks();\n }\n\n /**\n * Creates and returns a text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!this['featuresNativeTextTracks']) {\n return super.addTextTrack(kind, label, language);\n }\n\n return this.el_.addTextTrack(kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options={}) {\n if (!this['featuresNativeTextTracks']) {\n return super.addRemoteTextTrack(options);\n }\n\n let htmlTrackElement = document.createElement('track');\n\n if (options.kind) {\n htmlTrackElement.kind = options.kind;\n }\n if (options.label) {\n htmlTrackElement.label = options.label;\n }\n if (options.language || options.srclang) {\n htmlTrackElement.srclang = options.language || options.srclang;\n }\n if (options.default) {\n htmlTrackElement.default = options.default;\n }\n if (options.id) {\n htmlTrackElement.id = options.id;\n }\n if (options.src) {\n htmlTrackElement.src = options.src;\n }\n\n this.el().appendChild(htmlTrackElement);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote text track from TextTrackList object\n *\n * @param {TextTrackObject} track Texttrack object to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n if (!this['featuresNativeTextTracks']) {\n return super.removeRemoteTextTrack(track);\n }\n\n let tracks, i;\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n\n tracks = this.$$('track');\n\n i = tracks.length;\n while (i--) {\n if (track === tracks[i] || track === tracks[i].track) {\n this.el().removeChild(tracks[i]);\n }\n }\n }\n\n}\n\n\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n/*\n* Element for testing browser HTML5 video capabilities\n*\n* @type {Element}\n* @constant\n* @private\n*/\nHtml5.TEST_VID = document.createElement('video');\nlet track = document.createElement('track');\ntrack.kind = 'captions';\ntrack.srclang = 'en';\ntrack.label = 'English';\nHtml5.TEST_VID.appendChild(track);\n\n/*\n * Check if HTML5 video is supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.isSupported = function(){\n // IE9 with no Media Player is a LIAR! (#984)\n try {\n Html5.TEST_VID['volume'] = 0.5;\n } catch (e) {\n return false;\n }\n\n return !!Html5.TEST_VID.canPlayType;\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Html5);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the HTML5 tech\n */\nHtml5.nativeSourceHandler = {};\n\n/*\n * Check if the video element can play the given videotype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canPlayType = function(type){\n // IE9 on Windows 7 without MediaPlayer throws an error here\n // https://github.com/videojs/video.js/issues/519\n try {\n return Html5.TEST_VID.canPlayType(type);\n } catch(e) {\n return '';\n }\n};\n\n/*\n * Check if the video element can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canHandleSource = function(source){\n var match, ext;\n\n // If a type was provided we should rely on that\n if (source.type) {\n return Html5.nativeSourceHandler.canPlayType(source.type);\n } else if (source.src) {\n // If no type, fall back to checking 'video/[EXTENSION]'\n ext = Url.getFileExtension(source.src);\n\n return Html5.nativeSourceHandler.canPlayType(`video/${ext}`);\n }\n\n return '';\n};\n\n/*\n * Pass the source to the video element\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the Html5 tech\n */\nHtml5.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n* Clean up the source handler when disposing the player or switching sources..\n* (no cleanup is needed when supporting the format natively)\n*/\nHtml5.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\n\n/*\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {Boolean}\n */\nHtml5.canControlVolume = function(){\n var volume = Html5.TEST_VID.volume;\n Html5.TEST_VID.volume = (volume / 2) + 0.1;\n return volume !== Html5.TEST_VID.volume;\n};\n\n/*\n * Check if playbackRate is supported in this browser/device.\n *\n * @return {Number} [description]\n */\nHtml5.canControlPlaybackRate = function(){\n var playbackRate = Html5.TEST_VID.playbackRate;\n Html5.TEST_VID.playbackRate = (playbackRate / 2) + 0.1;\n return playbackRate !== Html5.TEST_VID.playbackRate;\n};\n\n/*\n * Check to see if native text tracks are supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.supportsNativeTextTracks = function() {\n var supportsTextTracks;\n\n // Figure out native text track support\n // If mode is a number, we cannot change it because it'll disappear from view.\n // Browsers with numeric modes include IE10 and older (<=2013) samsung android models.\n // Firefox isn't playing nice either with modifying the mode\n // TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862\n supportsTextTracks = !!Html5.TEST_VID.textTracks;\n if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) {\n supportsTextTracks = typeof Html5.TEST_VID.textTracks[0]['mode'] !== 'number';\n }\n if (supportsTextTracks && browser.IS_FIREFOX) {\n supportsTextTracks = false;\n }\n if (supportsTextTracks && !('onremovetrack' in Html5.TEST_VID.textTracks)) {\n supportsTextTracks = false;\n }\n\n return supportsTextTracks;\n};\n\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\nHtml5.Events = [\n 'loadstart',\n 'suspend',\n 'abort',\n 'error',\n 'emptied',\n 'stalled',\n 'loadedmetadata',\n 'loadeddata',\n 'canplay',\n 'canplaythrough',\n 'playing',\n 'waiting',\n 'seeking',\n 'seeked',\n 'ended',\n 'durationchange',\n 'timeupdate',\n 'progress',\n 'play',\n 'pause',\n 'ratechange',\n 'volumechange'\n];\n\n/*\n * Set the tech's volume control support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresVolumeControl'] = Html5.canControlVolume();\n\n/*\n * Set the tech's playbackRate support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresPlaybackRate'] = Html5.canControlPlaybackRate();\n\n/*\n * Set the tech's status on moving the video element.\n * In iOS, if you move a video element in the DOM, it breaks video playback.\n *\n * @type {Boolean}\n */\nHtml5.prototype['movingMediaElementInDOM'] = !browser.IS_IOS;\n\n/*\n * Set the the tech's fullscreen resize support status.\n * HTML video is able to automatically resize when going to fullscreen.\n * (No longer appears to be used. Can probably be removed.)\n */\nHtml5.prototype['featuresFullscreenResize'] = true;\n\n/*\n * Set the tech's progress event support status\n * (this disables the manual progress events of the Tech)\n */\nHtml5.prototype['featuresProgressEvents'] = true;\n\n/*\n * Sets the tech's status on native text track support\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresNativeTextTracks'] = Html5.supportsNativeTextTracks();\n\n// HTML5 Feature detection and Device Fixes --------------------------------- //\nlet canPlayType;\nconst mpegurlRE = /^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i;\nconst mp4RE = /^video\\/mp4/i;\n\nHtml5.patchCanPlayType = function() {\n // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\n if (browser.ANDROID_VERSION >= 4.0) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type) {\n if (type && mpegurlRE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n\n // Override Android 2.2 and less canPlayType method which is broken\n if (browser.IS_OLD_ANDROID) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type){\n if (type && mp4RE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n};\n\nHtml5.unpatchCanPlayType = function() {\n var r = Html5.TEST_VID.constructor.prototype.canPlayType;\n Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\n canPlayType = null;\n return r;\n};\n\n// by default, patch the video element\nHtml5.patchCanPlayType();\n\nHtml5.disposeMediaElement = function(el){\n if (!el) { return; }\n\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n\n // remove any child track or source nodes to prevent their loading\n while(el.hasChildNodes()) {\n el.removeChild(el.firstChild);\n }\n\n // remove any src reference. not setting `src=''` because that causes a warning\n // in firefox\n el.removeAttribute('src');\n\n // force the media element to update its loading state by calling load()\n // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {\n // not supported\n }\n })();\n }\n};\n\nHtml5.resetMediaElement = function(el){\n if (!el) { return; }\n\n let sources = el.querySelectorAll('source');\n let i = sources.length;\n while (i--) {\n el.removeChild(sources[i]);\n }\n\n // remove any src reference.\n // not setting `src=''` because that throws an error\n el.removeAttribute('src');\n\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {}\n })();\n }\n};\n\nComponent.registerComponent('Html5', Html5);\nTech.registerTech('Html5', Html5);\nexport default Html5;\n","/**\n * @file loader.js\n */\nimport Component from '../component.js';\nimport Tech from './tech.js';\nimport window from 'global/window';\nimport toTitleCase from '../utils/to-title-case.js';\n\n/**\n * The Media Loader is the component that decides which playback technology to load\n * when the player is initialized.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class MediaLoader\n */\nclass MediaLoader extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n // If there are no sources when the player is initialized,\n // load the first supported playback technology.\n\n if (!options.playerOptions['sources'] || options.playerOptions['sources'].length === 0) {\n for (let i=0, j=options.playerOptions['techOrder']; i {\n this.trigger('vttjsloaded');\n };\n script.onerror = () => {\n this.trigger('vttjserror');\n };\n this.on('dispose', () => {\n script.onload = null;\n script.onerror = null;\n });\n this.el().parentNode.appendChild(script);\n window['WebVTT'] = true;\n }\n\n let updateDisplay = () => this.trigger('texttrackchange');\n let textTracksChanges = () => {\n updateDisplay();\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n track.removeEventListener('cuechange', updateDisplay);\n if (track.mode === 'showing') {\n track.addEventListener('cuechange', updateDisplay);\n }\n }\n };\n\n textTracksChanges();\n tracks.addEventListener('change', textTracksChanges);\n\n this.on('dispose', function() {\n tracks.removeEventListener('change', textTracksChanges);\n });\n }\n\n /*\n * Provide default methods for text tracks.\n *\n * Html5 tech overrides these.\n */\n\n /**\n * Get texttracks\n *\n * @returns {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n this.textTracks_ = this.textTracks_ || new TextTrackList();\n return this.textTracks_;\n }\n\n /**\n * Get remote texttracks\n *\n * @returns {TextTrackList}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n this.remoteTextTracks_ = this.remoteTextTracks_ || new TextTrackList();\n return this.remoteTextTracks_;\n }\n\n /**\n * Get remote htmltrackelements\n *\n * @returns {HTMLTrackElementList}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new HTMLTrackElementList();\n return this.remoteTextTrackEls_;\n }\n\n /**\n * Creates and returns a remote text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!kind) {\n throw new Error('TextTrack kind is required but was not provided');\n }\n\n return createTrackHelper(this, kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a emulated html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n let track = mergeOptions(options, {\n tech: this\n });\n\n let htmlTrackElement = new HTMLTrackElement(track);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n // must come after remoteTextTracks()\n this.textTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote texttrack\n *\n * @param {TextTrackObject} track Texttrack to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.textTracks().removeTrack_(track);\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n }\n\n /**\n * Provide a default setPoster method for techs\n * Poster support for techs should be optional, so we don't want techs to\n * break if they don't have a way to set a poster.\n *\n * @method setPoster\n */\n setPoster() {}\n\n /*\n * Check if the tech can support the given type\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n canPlayType() {\n return '';\n }\n\n /*\n * Return whether the argument is a Tech or not.\n * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n *\n * @param {Object} component An item to check\n * @return {Boolean} Whether it is a tech or not\n */\n static isTech(component) {\n return component.prototype instanceof Tech ||\n component instanceof Tech ||\n component === Tech;\n }\n\n /**\n * Registers a Tech\n *\n * @param {String} name Name of the Tech to register\n * @param {Object} tech The tech to register\n * @static\n * @method registerComponent\n */\n static registerTech(name, tech) {\n if (!Tech.techs_) {\n Tech.techs_ = {};\n }\n\n if (!Tech.isTech(tech)) {\n throw new Error(`Tech ${name} must be a Tech`);\n }\n\n Tech.techs_[name] = tech;\n return tech;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getTech(name) {\n if (Tech.techs_ && Tech.techs_[name]) {\n return Tech.techs_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`);\n return window.videojs[name];\n }\n }\n}\n\n/*\n * List of associated text tracks\n *\n * @type {Array}\n * @private\n */\nTech.prototype.textTracks_;\n\nvar createTrackHelper = function(self, kind, label, language, options={}) {\n let tracks = self.textTracks();\n\n options.kind = kind;\n\n if (label) {\n options.label = label;\n }\n if (language) {\n options.language = language;\n }\n options.tech = self;\n\n let track = new TextTrack(options);\n tracks.addTrack_(track);\n\n return track;\n};\n\nTech.prototype.featuresVolumeControl = true;\n\n// Resizing plugins using request fullscreen reloads the plugin\nTech.prototype.featuresFullscreenResize = false;\nTech.prototype.featuresPlaybackRate = false;\n\n// Optional events that we can manually mimic with timers\n// currently not triggered by video-js-swf\nTech.prototype.featuresProgressEvents = false;\nTech.prototype.featuresTimeupdateEvents = false;\n\nTech.prototype.featuresNativeTextTracks = false;\n\n/*\n * A functional mixin for techs that want to use the Source Handler pattern.\n *\n * ##### EXAMPLE:\n *\n * Tech.withSourceHandlers.call(MyTech);\n *\n */\nTech.withSourceHandlers = function(_Tech){\n /*\n * Register a source handler\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * @param {Function} handler The source handler\n * @param {Boolean} first Register it before any existing handlers\n */\n _Tech.registerSourceHandler = function(handler, index){\n let handlers = _Tech.sourceHandlers;\n\n if (!handlers) {\n handlers = _Tech.sourceHandlers = [];\n }\n\n if (index === undefined) {\n // add to the end of the list\n index = handlers.length;\n }\n\n handlers.splice(index, 0, handler);\n };\n\n /*\n * Check if the tech can support the given type\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlayType = function(type){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n\n return '';\n };\n\n /*\n * Return the first source handler that supports the source\n * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n * @param {Object} source The source object\n * @returns {Object} The first source handler that supports the source\n * @returns {null} Null if no source handler is found\n */\n _Tech.selectSourceHandler = function(source){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canHandleSource(source);\n\n if (can) {\n return handlers[i];\n }\n }\n\n return null;\n };\n\n /*\n * Check if the tech can support the given source\n * @param {Object} srcObj The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlaySource = function(srcObj){\n let sh = _Tech.selectSourceHandler(srcObj);\n\n if (sh) {\n return sh.canHandleSource(srcObj);\n }\n\n return '';\n };\n\n /*\n * When using a source handler, prefer its implementation of\n * any function normally provided by the tech.\n */\n let deferrable = [\n 'seekable',\n 'duration'\n ];\n\n deferrable.forEach(function (fnName) {\n let originalFn = this[fnName];\n\n if (typeof originalFn !== 'function') {\n return;\n }\n\n this[fnName] = function() {\n if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n }\n return originalFn.apply(this, arguments);\n };\n }, _Tech.prototype);\n\n /*\n * Create a function for setting the source using a source object\n * and source handlers.\n * Should never be called unless a source handler was found.\n * @param {Object} source A source object with src and type keys\n * @return {Tech} self\n */\n _Tech.prototype.setSource = function(source){\n let sh = _Tech.selectSourceHandler(source);\n\n if (!sh) {\n // Fall back to a native source hander when unsupported sources are\n // deliberately set\n if (_Tech.nativeSourceHandler) {\n sh = _Tech.nativeSourceHandler;\n } else {\n log.error('No source hander found for the current source.');\n }\n }\n\n // Dispose any existing source handler\n this.disposeSourceHandler();\n this.off('dispose', this.disposeSourceHandler);\n\n this.currentSource_ = source;\n this.sourceHandler_ = sh.handleSource(source, this);\n this.on('dispose', this.disposeSourceHandler);\n\n return this;\n };\n\n /*\n * Clean up any existing source handler\n */\n _Tech.prototype.disposeSourceHandler = function(){\n if (this.sourceHandler_ && this.sourceHandler_.dispose) {\n this.sourceHandler_.dispose();\n }\n };\n\n};\n\nComponent.registerComponent('Tech', Tech);\n// Old name for Tech\nComponent.registerComponent('MediaTechController', Tech);\nTech.registerTech('Tech', Tech);\nexport default Tech;\n","/**\n * @file html-track-element-list.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\nclass HtmlTrackElementList {\n constructor(trackElements = []) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in HtmlTrackElementList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = HtmlTrackElementList.prototype[prop];\n }\n }\n }\n\n list.trackElements_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.trackElements_.length;\n }\n });\n\n for (let i = 0, length = trackElements.length; i < length; i++) {\n list.addTrackElement_(trackElements[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n addTrackElement_(trackElement) {\n this.trackElements_.push(trackElement);\n }\n\n getTrackElementByTrack_(track) {\n let trackElement_;\n\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (track === this.trackElements_[i].track) {\n trackElement_ = this.trackElements_[i];\n\n break;\n }\n }\n\n return trackElement_;\n }\n\n removeTrackElement_(trackElement) {\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (trackElement === this.trackElements_[i]) {\n this.trackElements_.splice(i, 1);\n\n break;\n }\n }\n }\n}\n\nexport default HtmlTrackElementList;\n","/**\n * @file html-track-element.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport EventTarget from '../event-target';\nimport TextTrack from '../tracks/text-track';\n\nconst NONE = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst ERROR = 3;\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement\n *\n * interface HTMLTrackElement : HTMLElement {\n * attribute DOMString kind;\n * attribute DOMString src;\n * attribute DOMString srclang;\n * attribute DOMString label;\n * attribute boolean default;\n *\n * const unsigned short NONE = 0;\n * const unsigned short LOADING = 1;\n * const unsigned short LOADED = 2;\n * const unsigned short ERROR = 3;\n * readonly attribute unsigned short readyState;\n *\n * readonly attribute TextTrack track;\n * };\n *\n * @param {Object} options TextTrack configuration\n * @class HTMLTrackElement\n */\n\nclass HTMLTrackElement extends EventTarget {\n constructor(options = {}) {\n super();\n\n let readyState,\n trackElement = this;\n\n if (browser.IS_IE8) {\n trackElement = document.createElement('custom');\n\n for (let prop in HTMLTrackElement.prototype) {\n if (prop !== 'constructor') {\n trackElement[prop] = HTMLTrackElement.prototype[prop];\n }\n }\n }\n\n let track = new TextTrack(options);\n\n trackElement.kind = track.kind;\n trackElement.src = track.src;\n trackElement.srclang = track.language;\n trackElement.label = track.label;\n trackElement.default = track.default;\n\n Object.defineProperty(trackElement, 'readyState', {\n get() {\n return readyState;\n }\n });\n\n Object.defineProperty(trackElement, 'track', {\n get() {\n return track;\n }\n });\n\n readyState = NONE;\n\n track.addEventListener('loadeddata', function() {\n readyState = LOADED;\n\n trackElement.trigger({\n type: 'load',\n target: trackElement\n });\n });\n\n if (browser.IS_IE8) {\n return trackElement;\n }\n }\n}\n\nHTMLTrackElement.prototype.allowedEvents_ = {\n load: 'load'\n};\n\nHTMLTrackElement.NONE = NONE;\nHTMLTrackElement.LOADING = LOADING;\nHTMLTrackElement.LOADED = LOADED;\nHTMLTrackElement.ERROR = ERROR;\n\nexport default HTMLTrackElement;\n","/**\n * @file text-track-cue-list.js\n */\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A List of text track cues as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist\n *\n * interface TextTrackCueList {\n * readonly attribute unsigned long length;\n * getter TextTrackCue (unsigned long index);\n * TextTrackCue? getCueById(DOMString id);\n * };\n *\n * @param {Array} cues A list of cues to be initialized with\n * @class TextTrackCueList\n */\n\nclass TextTrackCueList {\n constructor(cues) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackCueList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackCueList.prototype[prop];\n }\n }\n }\n\n TextTrackCueList.prototype.setCues_.call(list, cues);\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.length_;\n }\n });\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * A setter for cues in this list\n *\n * @param {Array} cues an array of cues\n * @method setCues_\n * @private\n */\n setCues_(cues) {\n let oldLength = this.length || 0;\n let i = 0;\n let l = cues.length;\n\n this.cues_ = cues;\n this.length_ = cues.length;\n\n let defineProp = function(index) {\n if (!('' + index in this)) {\n Object.defineProperty(this, '' + index, {\n get() {\n return this.cues_[index];\n }\n });\n }\n };\n\n if (oldLength < l) {\n i = oldLength;\n\n for (; i < l; i++) {\n defineProp.call(this, i);\n }\n }\n }\n\n /**\n * Get a cue that is currently in the Cue list by id\n *\n * @param {String} id\n * @method getCueById\n * @return {Object} a single cue\n */\n getCueById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let cue = this[i];\n\n if (cue.id === id) {\n result = cue;\n break;\n }\n }\n\n return result;\n }\n}\n\nexport default TextTrackCueList;\n","/**\n * @file text-track-display.js\n */\nimport Component from '../component';\nimport Menu from '../menu/menu.js';\nimport MenuItem from '../menu/menu-item.js';\nimport MenuButton from '../menu/menu-button.js';\nimport * as Fn from '../utils/fn.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst darkGray = '#222';\nconst lightGray = '#ccc';\nconst fontMap = {\n monospace: 'monospace',\n sansSerif: 'sans-serif',\n serif: 'serif',\n monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n monospaceSerif: '\"Courier New\", monospace',\n proportionalSansSerif: 'sans-serif',\n proportionalSerif: 'serif',\n casual: '\"Comic Sans MS\", Impact, fantasy',\n script: '\"Monotype Corsiva\", cursive',\n smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n\n/**\n * The component for displaying text track cues\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class TextTrackDisplay\n */\nclass TextTrackDisplay extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n player.on('loadstart', Fn.bind(this, this.toggleDisplay));\n player.on('texttrackchange', Fn.bind(this, this.updateDisplay));\n\n // This used to be called during player init, but was causing an error\n // if a track should show by default and the display hadn't loaded yet.\n // Should probably be moved to an external track loader when we support\n // tracks that don't need a display.\n player.ready(Fn.bind(this, function() {\n if (player.tech_ && player.tech_['featuresNativeTextTracks']) {\n this.hide();\n return;\n }\n\n player.on('fullscreenchange', Fn.bind(this, this.updateDisplay));\n\n let tracks = this.options_.playerOptions['tracks'] || [];\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n this.player_.addRemoteTextTrack(track);\n }\n }));\n }\n\n /**\n * Toggle display texttracks\n *\n * @method toggleDisplay\n */\n toggleDisplay() {\n if (this.player_.tech_ && this.player_.tech_['featuresNativeTextTracks']) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-text-track-display'\n }, {\n 'aria-live': 'assertive',\n 'aria-atomic': 'true'\n });\n }\n\n /**\n * Clear display texttracks\n *\n * @method clearDisplay\n */\n clearDisplay() {\n if (typeof window['WebVTT'] === 'function') {\n window['WebVTT']['processCues'](window, [], this.el_);\n }\n }\n\n /**\n * Update display texttracks\n *\n * @method updateDisplay\n */\n updateDisplay() {\n var tracks = this.player_.textTracks();\n\n this.clearDisplay();\n\n if (!tracks) {\n return;\n }\n\n // Track display prioritization model: if multiple tracks are 'showing',\n // display the first 'subtitles' or 'captions' track which is 'showing',\n // otherwise display the first 'descriptions' track which is 'showing'\n\n let descriptionsTrack = null;\n let captionsSubtitlesTrack = null;\n\n let i = tracks.length;\n while (i--) {\n let track = tracks[i];\n if (track['mode'] === 'showing') {\n if (track['kind'] === 'descriptions') {\n descriptionsTrack = track;\n } else {\n captionsSubtitlesTrack = track;\n }\n }\n }\n\n if (captionsSubtitlesTrack) {\n this.updateForTrack(captionsSubtitlesTrack);\n } else if (descriptionsTrack) {\n this.updateForTrack(descriptionsTrack);\n }\n }\n\n /**\n * Add texttrack to texttrack list\n *\n * @param {TextTrackObject} track Texttrack object to be added to list\n * @method updateForTrack\n */\n updateForTrack(track) {\n if (typeof window['WebVTT'] !== 'function' || !track['activeCues']) {\n return;\n }\n\n let overrides = this.player_['textTrackSettings'].getValues();\n\n let cues = [];\n for (let i = 0; i < track['activeCues'].length; i++) {\n cues.push(track['activeCues'][i]);\n }\n\n window['WebVTT']['processCues'](window, cues, this.el_);\n\n let i = cues.length;\n while (i--) {\n let cue = cues[i];\n if (!cue) {\n continue;\n }\n\n let cueDiv = cue.displayState;\n if (overrides.color) {\n cueDiv.firstChild.style.color = overrides.color;\n }\n if (overrides.textOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'color',\n constructColor(overrides.color || '#fff',\n overrides.textOpacity));\n }\n if (overrides.backgroundColor) {\n cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n }\n if (overrides.backgroundOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'backgroundColor',\n constructColor(overrides.backgroundColor || '#000',\n overrides.backgroundOpacity));\n }\n if (overrides.windowColor) {\n if (overrides.windowOpacity) {\n tryUpdateStyle(cueDiv,\n 'backgroundColor',\n constructColor(overrides.windowColor, overrides.windowOpacity));\n } else {\n cueDiv.style.backgroundColor = overrides.windowColor;\n }\n }\n if (overrides.edgeStyle) {\n if (overrides.edgeStyle === 'dropshadow') {\n cueDiv.firstChild.style.textShadow = `2px 2px 3px ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n } else if (overrides.edgeStyle === 'raised') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n } else if (overrides.edgeStyle === 'depressed') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n } else if (overrides.edgeStyle === 'uniform') {\n cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n }\n }\n if (overrides.fontPercent && overrides.fontPercent !== 1) {\n const fontSize = window.parseFloat(cueDiv.style.fontSize);\n cueDiv.style.fontSize = (fontSize * overrides.fontPercent) + 'px';\n cueDiv.style.height = 'auto';\n cueDiv.style.top = 'auto';\n cueDiv.style.bottom = '2px';\n }\n if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n if (overrides.fontFamily === 'small-caps') {\n cueDiv.firstChild.style.fontVariant = 'small-caps';\n } else {\n cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n }\n }\n }\n }\n\n}\n\n/**\n* Add cue HTML to display\n*\n* @param {Number} color Hex number for color, like #f0e\n* @param {Number} opacity Value for opacity,0.0 - 1.0\n* @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)'\n* @method constructColor\n*/\nfunction constructColor(color, opacity) {\n return 'rgba(' +\n // color looks like \"#f0e\"\n parseInt(color[1] + color[1], 16) + ',' +\n parseInt(color[2] + color[2], 16) + ',' +\n parseInt(color[3] + color[3], 16) + ',' +\n opacity + ')';\n}\n\n/**\n * Try to update style\n * Some style changes will throw an error, particularly in IE8. Those should be noops.\n *\n * @param {Element} el The element to be styles\n * @param {CSSProperty} style The CSS property to be styled\n * @param {CSSStyle} rule The actual style to be applied to the property\n * @method tryUpdateStyle\n */\nfunction tryUpdateStyle(el, style, rule) {\n //\n try {\n el.style[style] = rule;\n } catch (e) {}\n}\n\nComponent.registerComponent('TextTrackDisplay', TextTrackDisplay);\nexport default TextTrackDisplay;\n","/**\n * @file text-track-enums.js\n */\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n *\n * enum TextTrackMode { \"disabled\", \"hidden\", \"showing\" };\n */\nconst TextTrackMode = {\n disabled: 'disabled',\n hidden: 'hidden',\n showing: 'showing'\n};\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind\n *\n * enum TextTrackKind {\n * \"subtitles\",\n * \"captions\",\n * \"descriptions\",\n * \"chapters\",\n * \"metadata\"\n * };\n */\nconst TextTrackKind = {\n subtitles: 'subtitles',\n captions: 'captions',\n descriptions: 'descriptions',\n chapters: 'chapters',\n metadata: 'metadata'\n};\n\n/* jshint ignore:start */\n// we ignore jshint here because it does not see\n// TextTrackMode or TextTrackKind as defined here somehow...\nexport { TextTrackMode, TextTrackKind };\n/* jshint ignore:end */\n","/**\n * Utilities for capturing text track state and re-creating tracks\n * based on a capture.\n *\n * @file text-track-list-converter.js\n */\n\n/**\n * Examine a single text track and return a JSON-compatible javascript\n * object that represents the text track's state.\n * @param track {TextTrackObject} the text track to query\n * @return {Object} a serializable javascript representation of the\n * @private\n */\nlet trackToJson_ = function(track) {\n let ret = ['kind', 'label', 'language', 'id',\n 'inBandMetadataTrackDispatchType',\n 'mode', 'src'].reduce((acc, prop, i) => {\n if (track[prop]) {\n acc[prop] = track[prop];\n }\n \n return acc;\n }, {\n cues: track.cues && Array.prototype.map.call(track.cues, function(cue) {\n return {\n startTime: cue.startTime,\n endTime: cue.endTime,\n text: cue.text,\n id: cue.id\n };\n })\n });\n\n return ret;\n};\n\n/**\n * Examine a tech and return a JSON-compatible javascript array that\n * represents the state of all text tracks currently configured. The\n * return array is compatible with `jsonToTextTracks`.\n * @param tech {tech} the tech object to query\n * @return {Array} a serializable javascript representation of the\n * @function textTracksToJson\n */\nlet textTracksToJson = function(tech) {\n\n let trackEls = tech.$$('track');\n\n let trackObjs = Array.prototype.map.call(trackEls, (t) => t.track);\n let tracks = Array.prototype.map.call(trackEls, function(trackEl) {\n let json = trackToJson_(trackEl.track);\n if (trackEl.src) {\n json.src = trackEl.src;\n }\n return json;\n });\n\n return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function(track) {\n return trackObjs.indexOf(track) === -1;\n }).map(trackToJson_));\n};\n\n/**\n * Creates a set of remote text tracks on a tech based on an array of\n * javascript text track representations.\n * @param json {Array} an array of text track representation objects,\n * like those that would be produced by `textTracksToJson`\n * @param tech {tech} the tech to create text tracks on\n * @function jsonToTextTracks\n */\nlet jsonToTextTracks = function(json, tech) {\n json.forEach(function(track) {\n let addedTrack = tech.addRemoteTextTrack(track).track;\n if (!track.src && track.cues) {\n track.cues.forEach((cue) => addedTrack.addCue(cue));\n }\n });\n\n return tech.textTracks();\n};\n\nexport default {textTracksToJson, jsonToTextTracks, trackToJson_};\n","/**\n * @file text-track-list.js\n */\nimport EventTarget from '../event-target';\nimport * as Fn from '../utils/fn.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A text track list as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist\n *\n * interface TextTrackList : EventTarget {\n * readonly attribute unsigned long length;\n * getter TextTrack (unsigned long index);\n * TextTrack? getTrackById(DOMString id);\n *\n * attribute EventHandler onchange;\n * attribute EventHandler onaddtrack;\n * attribute EventHandler onremovetrack;\n * };\n *\n * @param {Track[]} tracks A list of tracks to initialize the list with\n * @extends EventTarget\n * @class TextTrackList\n */\n\nclass TextTrackList extends EventTarget {\n constructor(tracks = []) {\n super();\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackList.prototype[prop];\n }\n }\n }\n\n list.tracks_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.tracks_.length;\n }\n });\n\n for (let i = 0; i < tracks.length; i++) {\n list.addTrack_(tracks[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * Add TextTrack from TextTrackList\n *\n * @param {TextTrack} track\n * @method addTrack_\n * @private\n */\n addTrack_(track) {\n let index = this.tracks_.length;\n\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get() {\n return this.tracks_[index];\n }\n });\n }\n\n track.addEventListener('modechange', Fn.bind(this, function() {\n this.trigger('change');\n }));\n\n // Do not add duplicate tracks\n if (this.tracks_.indexOf(track) === -1) {\n this.tracks_.push(track);\n this.trigger({\n track,\n type: 'addtrack'\n });\n }\n\n }\n\n /**\n * Remove TextTrack from TextTrackList\n * NOTE: Be mindful of what is passed in as it may be a HTMLTrackElement\n *\n * @param {TextTrack} rtrack\n * @method removeTrack_\n * @private\n */\n removeTrack_(rtrack) {\n let track;\n\n for (let i = 0, l = this.length; i < l; i++) {\n if (this[i] === rtrack) {\n track = this[i];\n if (track.off) {\n track.off();\n }\n\n this.tracks_.splice(i, 1);\n\n break;\n }\n }\n\n if (!track) {\n return;\n }\n\n this.trigger({\n track,\n type: 'removetrack'\n });\n }\n\n /**\n * Get a TextTrack from TextTrackList by a tracks id\n *\n * @param {String} id - the id of the track to get\n * @method getTrackById\n * @return {TextTrack}\n * @private\n */\n getTrackById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let track = this[i];\n\n if (track.id === id) {\n result = track;\n break;\n }\n }\n\n return result;\n }\n}\n\n/**\n * change - One or more tracks in the track list have been enabled or disabled.\n * addtrack - A track has been added to the track list.\n * removetrack - A track has been removed from the track list.\n */\nTextTrackList.prototype.allowedEvents_ = {\n change: 'change',\n addtrack: 'addtrack',\n removetrack: 'removetrack'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (let event in TextTrackList.prototype.allowedEvents_) {\n TextTrackList.prototype['on' + event] = null;\n}\n\nexport default TextTrackList;\n","/**\n * @file text-track-settings.js\n */\nimport Component from '../component';\nimport * as Events from '../utils/events.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport window from 'global/window';\n\n/**\n * Manipulate settings of texttracks\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class TextTrackSettings\n */\nclass TextTrackSettings extends Component {\n\n constructor(player, options) {\n super(player, options);\n this.hide();\n\n // Grab `persistTextTrackSettings` from the player options if not passed in child options\n if (options.persistTextTrackSettings === undefined) {\n this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n }\n\n Events.on(this.$('.vjs-done-button'), 'click', Fn.bind(this, function() {\n this.saveSettings();\n this.hide();\n }));\n\n Events.on(this.$('.vjs-default-button'), 'click', Fn.bind(this, function() {\n this.$('.vjs-fg-color > select').selectedIndex = 0;\n this.$('.vjs-bg-color > select').selectedIndex = 0;\n this.$('.window-color > select').selectedIndex = 0;\n this.$('.vjs-text-opacity > select').selectedIndex = 0;\n this.$('.vjs-bg-opacity > select').selectedIndex = 0;\n this.$('.vjs-window-opacity > select').selectedIndex = 0;\n this.$('.vjs-edge-style select').selectedIndex = 0;\n this.$('.vjs-font-family select').selectedIndex = 0;\n this.$('.vjs-font-percent select').selectedIndex = 2;\n this.updateDisplay();\n }));\n\n Events.on(this.$('.vjs-fg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.window-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-text-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-window-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-percent select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-edge-style select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-family select'), 'change', Fn.bind(this, this.updateDisplay));\n\n if (this.options_.persistTextTrackSettings) {\n this.restoreSettings();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-caption-settings vjs-modal-overlay',\n innerHTML: captionOptionsMenuTemplate()\n });\n }\n\n /**\n * Get texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @return {Object}\n * @method getValues\n */\n getValues() {\n const textEdge = getSelectedOptionValue(this.$('.vjs-edge-style select'));\n const fontFamily = getSelectedOptionValue(this.$('.vjs-font-family select'));\n const fgColor = getSelectedOptionValue(this.$('.vjs-fg-color > select'));\n const textOpacity = getSelectedOptionValue(this.$('.vjs-text-opacity > select'));\n const bgColor = getSelectedOptionValue(this.$('.vjs-bg-color > select'));\n const bgOpacity = getSelectedOptionValue(this.$('.vjs-bg-opacity > select'));\n const windowColor = getSelectedOptionValue(this.$('.window-color > select'));\n const windowOpacity = getSelectedOptionValue(this.$('.vjs-window-opacity > select'));\n const fontPercent = window['parseFloat'](getSelectedOptionValue(this.$('.vjs-font-percent > select')));\n\n let result = {\n 'backgroundOpacity': bgOpacity,\n 'textOpacity': textOpacity,\n 'windowOpacity': windowOpacity,\n 'edgeStyle': textEdge,\n 'fontFamily': fontFamily,\n 'color': fgColor,\n 'backgroundColor': bgColor,\n 'windowColor': windowColor,\n 'fontPercent': fontPercent\n };\n for (let name in result) {\n if (result[name] === '' || result[name] === 'none' || (name === 'fontPercent' && result[name] === 1.00)) {\n delete result[name];\n }\n }\n return result;\n }\n\n /**\n * Set texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @param {Object} values Object with texttrack setting values\n * @method setValues\n */\n setValues(values) {\n setSelectedOption(this.$('.vjs-edge-style select'), values.edgeStyle);\n setSelectedOption(this.$('.vjs-font-family select'), values.fontFamily);\n setSelectedOption(this.$('.vjs-fg-color > select'), values.color);\n setSelectedOption(this.$('.vjs-text-opacity > select'), values.textOpacity);\n setSelectedOption(this.$('.vjs-bg-color > select'), values.backgroundColor);\n setSelectedOption(this.$('.vjs-bg-opacity > select'), values.backgroundOpacity);\n setSelectedOption(this.$('.window-color > select'), values.windowColor);\n setSelectedOption(this.$('.vjs-window-opacity > select'), values.windowOpacity);\n\n let fontPercent = values.fontPercent;\n\n if (fontPercent) {\n fontPercent = fontPercent.toFixed(2);\n }\n\n setSelectedOption(this.$('.vjs-font-percent > select'), fontPercent);\n }\n\n /**\n * Restore texttrack settings\n *\n * @method restoreSettings\n */\n restoreSettings() {\n let err, values;\n\n try {\n [err, values] = safeParseTuple(window.localStorage.getItem('vjs-text-track-settings'));\n\n if (err) {\n log.error(err);\n }\n } catch (e) {\n log.warn(e);\n }\n\n if (values) {\n this.setValues(values);\n }\n }\n\n /**\n * Save texttrack settings to local storage\n *\n * @method saveSettings\n */\n saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n\n let values = this.getValues();\n try {\n if (Object.getOwnPropertyNames(values).length > 0) {\n window.localStorage.setItem('vjs-text-track-settings', JSON.stringify(values));\n } else {\n window.localStorage.removeItem('vjs-text-track-settings');\n }\n } catch (e) {\n log.warn(e);\n }\n }\n\n /**\n * Update display of texttrack settings\n *\n * @method updateDisplay\n */\n updateDisplay() {\n let ttDisplay = this.player_.getChild('textTrackDisplay');\n if (ttDisplay) {\n ttDisplay.updateDisplay();\n }\n }\n\n}\n\nComponent.registerComponent('TextTrackSettings', TextTrackSettings);\n\nfunction getSelectedOptionValue(target) {\n let selectedOption;\n // not all browsers support selectedOptions, so, fallback to options\n if (target.selectedOptions) {\n selectedOption = target.selectedOptions[0];\n } else if (target.options) {\n selectedOption = target.options[target.options.selectedIndex];\n }\n\n return selectedOption.value;\n}\n\nfunction setSelectedOption(target, value) {\n if (!value) {\n return;\n }\n\n let i;\n for (i = 0; i < target.options.length; i++) {\n const option = target.options[i];\n if (option.value === value) {\n break;\n }\n }\n\n target.selectedIndex = i;\n}\n\nfunction captionOptionsMenuTemplate() {\n let template = `
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    `;\n\n return template;\n}\n\nexport default TextTrackSettings;\n","/**\n * @file text-track.js\n */\nimport TextTrackCueList from './text-track-cue-list';\nimport * as Fn from '../utils/fn.js';\nimport * as Guid from '../utils/guid.js';\nimport * as browser from '../utils/browser.js';\nimport * as TextTrackEnum from './text-track-enums';\nimport log from '../utils/log.js';\nimport EventTarget from '../event-target';\nimport document from 'global/document';\nimport window from 'global/window';\nimport { isCrossOrigin } from '../utils/url.js';\nimport XHR from 'xhr';\n\n/**\n * takes a webvtt file contents and parses it into cues\n *\n * @param {String} srcContent webVTT file contents\n * @param {Track} track track to addcues to\n */\nconst parseCues = function(srcContent, track) {\n let parser = new window.WebVTT.Parser(window,\n window.vttjs,\n window.WebVTT.StringDecoder());\n\n parser.oncue = function(cue) {\n track.addCue(cue);\n };\n\n parser.onparsingerror = function(error) {\n log.error(error);\n };\n\n parser.onflush = function() {\n track.trigger({\n type: 'loadeddata',\n target: track\n });\n };\n\n parser.parse(srcContent);\n parser.flush();\n};\n\n\n/**\n * load a track from a specifed url\n *\n * @param {String} src url to load track from\n * @param {Track} track track to addcues to\n */\nconst loadTrack = function(src, track) {\n let opts = {\n uri: src\n };\n let crossOrigin = isCrossOrigin(src);\n\n if (crossOrigin) {\n opts.cors = crossOrigin;\n }\n\n XHR(opts, Fn.bind(this, function(err, response, responseBody) {\n if (err) {\n return log.error(err, response);\n }\n\n track.loaded_ = true;\n\n // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n // NOTE: this is only used for the alt/video.novtt.js build\n if (typeof window.WebVTT !== 'function') {\n if (track.tech_) {\n let loadHandler = () => parseCues(responseBody, track);\n track.tech_.on('vttjsloaded', loadHandler);\n track.tech_.on('vttjserror', () => {\n log.error(`vttjs failed to load, stopping trying to process ${track.src}`);\n track.tech_.off('vttjsloaded', loadHandler);\n });\n\n }\n } else {\n parseCues(responseBody, track);\n }\n\n }));\n};\n\n/**\n * A single text track as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack\n *\n * interface TextTrack : EventTarget {\n * readonly attribute TextTrackKind kind;\n * readonly attribute DOMString label;\n * readonly attribute DOMString language;\n *\n * readonly attribute DOMString id;\n * readonly attribute DOMString inBandMetadataTrackDispatchType;\n *\n * attribute TextTrackMode mode;\n *\n * readonly attribute TextTrackCueList? cues;\n * readonly attribute TextTrackCueList? activeCues;\n *\n * void addCue(TextTrackCue cue);\n * void removeCue(TextTrackCue cue);\n *\n * attribute EventHandler oncuechange;\n * };\n *\n * @param {Object=} options Object of option names and values\n * @extends EventTarget\n * @class TextTrack\n */\nclass TextTrack extends EventTarget {\n constructor(options = {}) {\n super();\n if (!options.tech) {\n throw new Error('A tech was not provided.');\n }\n\n let tt = this;\n\n if (browser.IS_IE8) {\n tt = document.createElement('custom');\n\n for (let prop in TextTrack.prototype) {\n if (prop !== 'constructor') {\n tt[prop] = TextTrack.prototype[prop];\n }\n }\n }\n\n tt.tech_ = options.tech;\n\n let mode = TextTrackEnum.TextTrackMode[options.mode] || 'disabled';\n let kind = TextTrackEnum.TextTrackKind[options.kind] || 'subtitles';\n let label = options.label || '';\n let language = options.language || options.srclang || '';\n let id = options.id || 'vjs_text_track_' + Guid.newGUID();\n\n if (kind === 'metadata' || kind === 'chapters') {\n mode = 'hidden';\n }\n\n tt.cues_ = [];\n tt.activeCues_ = [];\n\n let cues = new TextTrackCueList(tt.cues_);\n let activeCues = new TextTrackCueList(tt.activeCues_);\n let changed = false;\n let timeupdateHandler = Fn.bind(tt, function() {\n this.activeCues;\n if (changed) {\n this.trigger('cuechange');\n changed = false;\n }\n });\n\n if (mode !== 'disabled') {\n tt.tech_.on('timeupdate', timeupdateHandler);\n }\n\n Object.defineProperty(tt, 'kind', {\n get() {\n return kind;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'label', {\n get() {\n return label;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'language', {\n get() {\n return language;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'id', {\n get() {\n return id;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'mode', {\n get() {\n return mode;\n },\n set(newMode) {\n if (!TextTrackEnum.TextTrackMode[newMode]) {\n return;\n }\n mode = newMode;\n if (mode === 'showing') {\n this.tech_.on('timeupdate', timeupdateHandler);\n }\n this.trigger('modechange');\n }\n });\n\n Object.defineProperty(tt, 'cues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n return cues;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'activeCues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n // nothing to do\n if (this.cues.length === 0) {\n return activeCues;\n }\n\n let ct = this.tech_.currentTime();\n let active = [];\n\n for (let i = 0, l = this.cues.length; i < l; i++) {\n let cue = this.cues[i];\n\n if (cue.startTime <= ct && cue.endTime >= ct) {\n active.push(cue);\n } else if (cue.startTime === cue.endTime &&\n cue.startTime <= ct &&\n cue.startTime + 0.5 >= ct) {\n active.push(cue);\n }\n }\n\n changed = false;\n\n if (active.length !== this.activeCues_.length) {\n changed = true;\n } else {\n for (let i = 0; i < active.length; i++) {\n if (this.activeCues_.indexOf(active[i]) === -1) {\n changed = true;\n }\n }\n }\n\n this.activeCues_ = active;\n activeCues.setCues_(this.activeCues_);\n\n return activeCues;\n },\n set() {}\n });\n\n if (options.src) {\n tt.src = options.src;\n loadTrack(options.src, tt);\n } else {\n tt.loaded_ = true;\n }\n\n if (browser.IS_IE8) {\n return tt;\n }\n }\n\n /**\n * add a cue to the internal list of cues\n *\n * @param {Object} cue the cue to add to our internal list\n * @method addCue\n */\n addCue(cue) {\n let tracks = this.tech_.textTracks();\n\n if (tracks) {\n for (let i = 0; i < tracks.length; i++) {\n if (tracks[i] !== this) {\n tracks[i].removeCue(cue);\n }\n }\n }\n\n this.cues_.push(cue);\n this.cues.setCues_(this.cues_);\n }\n\n /**\n * remvoe a cue from our internal list\n *\n * @param {Object} removeCue the cue to remove from our internal list\n * @method removeCue\n */\n removeCue(removeCue) {\n let removed = false;\n\n for (let i = 0, l = this.cues_.length; i < l; i++) {\n let cue = this.cues_[i];\n\n if (cue === removeCue) {\n this.cues_.splice(i, 1);\n removed = true;\n }\n }\n\n if (removed) {\n this.cues.setCues_(this.cues_);\n }\n }\n}\n\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n */\nTextTrack.prototype.allowedEvents_ = {\n cuechange: 'cuechange'\n};\n\nexport default TextTrack;\n","/**\n * @file browser.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst USER_AGENT = window.navigator.userAgent;\nconst webkitVersionMap = (/AppleWebKit\\/([\\d.]+)/i).exec(USER_AGENT);\nconst appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\n\n/*\n * Device is an iPhone\n *\n * @type {Boolean}\n * @constant\n * @private\n */\nexport const IS_IPAD = (/iPad/i).test(USER_AGENT);\n\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\nexport const IS_IPHONE = (/iPhone/i).test(USER_AGENT) && !IS_IPAD;\nexport const IS_IPOD = (/iPod/i).test(USER_AGENT);\nexport const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\nexport const IOS_VERSION = (function(){\n var match = USER_AGENT.match(/OS (\\d+)_/i);\n if (match && match[1]) { return match[1]; }\n})();\n\nexport const IS_ANDROID = (/Android/i).test(USER_AGENT);\nexport const ANDROID_VERSION = (function() {\n // This matches Android Major.Minor.Patch versions\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i),\n major,\n minor;\n\n if (!match) {\n return null;\n }\n\n major = match[1] && parseFloat(match[1]);\n minor = match[2] && parseFloat(match[2]);\n\n if (major && minor) {\n return parseFloat(match[1] + '.' + match[2]);\n } else if (major) {\n return major;\n } else {\n return null;\n }\n})();\n// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser\nexport const IS_OLD_ANDROID = IS_ANDROID && (/webkit/i).test(USER_AGENT) && ANDROID_VERSION < 2.3;\nexport const IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\n\nexport const IS_FIREFOX = (/Firefox/i).test(USER_AGENT);\nexport const IS_CHROME = (/Chrome/i).test(USER_AGENT);\nexport const IS_IE8 = (/MSIE\\s8\\.0/).test(USER_AGENT);\n\nexport const TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);\nexport const BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in document.createElement('video').style;\n","/**\n * @file buffer.js\n */\nimport { createTimeRange } from './time-ranges.js';\n\n/**\n * Compute how much your video has been buffered\n *\n * @param {Object} Buffered object\n * @param {Number} Total duration\n * @return {Number} Percent buffered of the total duration\n * @private\n * @function bufferedPercent\n */\nexport function bufferedPercent(buffered, duration) {\n var bufferedDuration = 0,\n start, end;\n\n if (!duration) {\n return 0;\n }\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0, 0);\n }\n\n for (let i = 0; i < buffered.length; i++){\n start = buffered.start(i);\n end = buffered.end(i);\n\n // buffered end can be bigger than duration by a very small fraction\n if (end > duration) {\n end = duration;\n }\n\n bufferedDuration += end - start;\n }\n\n return bufferedDuration / duration;\n}\n","import log from './log.js';\n\n/**\n * Object containing the default behaviors for available handler methods.\n *\n * @private\n * @type {Object}\n */\nconst defaultBehaviors = {\n get(obj, key) {\n return obj[key];\n },\n set(obj, key, value) {\n obj[key] = value;\n return true;\n }\n};\n\n/**\n * Expose private objects publicly using a Proxy to log deprecation warnings.\n *\n * Browsers that do not support Proxy objects will simply return the `target`\n * object, so it can be directly exposed.\n *\n * @param {Object} target The target object.\n * @param {Object} messages Messages to display from a Proxy. Only operations\n * with an associated message will be proxied.\n * @param {String} [messages.get]\n * @param {String} [messages.set]\n * @return {Object} A Proxy if supported or the `target` argument.\n */\nexport default (target, messages={}) => {\n if (typeof Proxy === 'function') {\n let handler = {};\n\n // Build a handler object based on those keys that have both messages\n // and default behaviors.\n Object.keys(messages).forEach(key => {\n if (defaultBehaviors.hasOwnProperty(key)) {\n handler[key] = function() {\n log.warn(messages[key]);\n return defaultBehaviors[key].apply(this, arguments);\n };\n }\n });\n\n return new Proxy(target, handler);\n }\n return target;\n};\n","/**\n * @file dom.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Guid from './guid.js';\nimport log from './log.js';\nimport tsml from 'tsml';\n\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction isNonBlankString(str) {\n return typeof str === 'string' && /\\S/.test(str);\n}\n\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction throwIfWhitespace(str) {\n if (/\\s/.test(str)) {\n throw new Error('class has illegal whitespace characters');\n }\n}\n\n/**\n * Produce a regular expression for matching a class name.\n *\n * @param {String} className\n * @return {RegExp}\n */\nfunction classRegExp(className) {\n return new RegExp('(^|\\\\s)' + className + '($|\\\\s)');\n}\n\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @function createQuerier\n * @private\n * @param {String} method\n * @return {Function}\n */\nfunction createQuerier(method) {\n return function (selector, context) {\n if (!isNonBlankString(selector)) {\n return document[method](null);\n }\n if (isNonBlankString(context)) {\n context = document.querySelector(context);\n }\n return (isEl(context) ? context : document)[method](selector);\n };\n}\n\n/**\n * Shorthand for document.getElementById()\n * Also allows for CSS (jQuery) ID syntax. But nothing other than IDs.\n *\n * @param {String} id Element ID\n * @return {Element} Element with supplied ID\n * @function getEl\n */\nexport function getEl(id){\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n return document.getElementById(id);\n}\n\n/**\n * Creates an element and applies properties.\n *\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n * @function createEl\n */\nexport function createEl(tagName='div', properties={}, attributes={}){\n let el = document.createElement(tagName);\n\n Object.getOwnPropertyNames(properties).forEach(function(propName){\n let val = properties[propName];\n\n // See #2176\n // We originally were accepting both properties and attributes in the\n // same object, but that doesn't work so well.\n if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\n log.warn(tsml`Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ${propName} to ${val}.`);\n el.setAttribute(propName, val);\n } else {\n el[propName] = val;\n }\n });\n\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let val = attributes[attrName];\n el.setAttribute(attrName, attributes[attrName]);\n });\n\n return el;\n}\n\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param {Element} el\n * @param {String} text\n * @return {Element}\n * @function textContent\n */\nexport function textContent(el, text) {\n if (typeof el.textContent === 'undefined') {\n el.innerText = text;\n } else {\n el.textContent = text;\n }\n}\n\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child Element to insert\n * @param {Element} parent Element to insert child into\n * @private\n * @function insertElFirst\n */\nexport function insertElFirst(child, parent){\n if (parent.firstChild) {\n parent.insertBefore(child, parent.firstChild);\n } else {\n parent.appendChild(child);\n }\n}\n\n/**\n * Element Data Store. Allows for binding data to an element without putting it directly on the element.\n * Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\nconst elData = {};\n\n/*\n * Unique attribute name to store an element's guid in\n *\n * @type {String}\n * @constant\n * @private\n */\nconst elIdAttr = 'vdata' + (new Date()).getTime();\n\n/**\n * Returns the cache object where data for an element is stored\n *\n * @param {Element} el Element to store data for.\n * @return {Object}\n * @function getElData\n */\nexport function getElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n id = el[elIdAttr] = Guid.newGUID();\n }\n\n if (!elData[id]) {\n elData[id] = {};\n }\n\n return elData[id];\n}\n\n/**\n * Returns whether or not an element has cached data\n *\n * @param {Element} el A dom element\n * @return {Boolean}\n * @private\n * @function hasElData\n */\nexport function hasElData(el) {\n const id = el[elIdAttr];\n\n if (!id) {\n return false;\n }\n\n return !!Object.getOwnPropertyNames(elData[id]).length;\n}\n\n/**\n * Delete data for the element from the cache and the guid attr from getElementById\n *\n * @param {Element} el Remove data for an element\n * @private\n * @function removeElData\n */\nexport function removeElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n return;\n }\n\n // Remove all stored data\n delete elData[id];\n\n // Remove the elIdAttr property from the DOM node\n try {\n delete el[elIdAttr];\n } catch(e) {\n if (el.removeAttribute) {\n el.removeAttribute(elIdAttr);\n } else {\n // IE doesn't appear to support removeAttribute on the document element\n el[elIdAttr] = null;\n }\n }\n}\n\n/**\n * Check if an element has a CSS class\n *\n * @function hasElClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nexport function hasElClass(element, classToCheck) {\n if (element.classList) {\n return element.classList.contains(classToCheck);\n } else {\n throwIfWhitespace(classToCheck);\n return classRegExp(classToCheck).test(element.className);\n }\n}\n\n/**\n * Add a CSS class name to an element\n *\n * @function addElClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nexport function addElClass(element, classToAdd) {\n if (element.classList) {\n element.classList.add(classToAdd);\n\n // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\n // in the case of classList not being supported.\n } else if (!hasElClass(element, classToAdd)) {\n element.className = (element.className + ' ' + classToAdd).trim();\n }\n\n return element;\n}\n\n/**\n * Remove a CSS class name from an element\n *\n * @function removeElClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nexport function removeElClass(element, classToRemove) {\n if (element.classList) {\n element.classList.remove(classToRemove);\n } else {\n throwIfWhitespace(classToRemove);\n element.className = element.className.split(/\\s+/).filter(function(c) {\n return c !== classToRemove;\n }).join(' ');\n }\n\n return element;\n}\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @function toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nexport function toggleElClass(element, classToToggle, predicate) {\n\n // This CANNOT use `classList` internally because IE does not support the\n // second parameter to the `classList.toggle()` method! Which is fine because\n // `classList` will be used by the add/remove functions.\n let has = hasElClass(element, classToToggle);\n\n if (typeof predicate === 'function') {\n predicate = predicate(element, classToToggle);\n }\n\n if (typeof predicate !== 'boolean') {\n predicate = !has;\n }\n\n // If the necessary class operation matches the current state of the\n // element, no action is required.\n if (predicate === has) {\n return;\n }\n\n if (predicate) {\n addElClass(element, classToToggle);\n } else {\n removeElClass(element, classToToggle);\n }\n\n return element;\n}\n\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n * @private\n * @function setElAttributes\n */\nexport function setElAttributes(el, attributes) {\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let attrValue = attributes[attrName];\n\n if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n el.removeAttribute(attrName);\n } else {\n el.setAttribute(attrName, (attrValue === true ? '' : attrValue));\n }\n });\n}\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n * @private\n * @function getElAttributes\n */\nexport function getElAttributes(tag) {\n var obj, knownBooleans, attrs, attrName, attrVal;\n\n obj = {};\n\n // known boolean attributes\n // we can check for matching boolean properties, but older browsers\n // won't know about HTML5 boolean attributes that we still read from\n knownBooleans = ','+'autoplay,controls,loop,muted,default'+',';\n\n if (tag && tag.attributes && tag.attributes.length > 0) {\n attrs = tag.attributes;\n\n for (var i = attrs.length - 1; i >= 0; i--) {\n attrName = attrs[i].name;\n attrVal = attrs[i].value;\n\n // check for known booleans\n // the matching element property will return a value for typeof\n if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(','+attrName+',') !== -1) {\n // the value of an included boolean attribute is typically an empty\n // string ('') which would equal false if we just check for a false value.\n // we also don't want support bad code like autoplay='false'\n attrVal = (attrVal !== null) ? true : false;\n }\n\n obj[attrName] = attrVal;\n }\n }\n\n return obj;\n}\n\n/**\n * Attempt to block the ability to select text while dragging controls\n *\n * @return {Boolean}\n * @function blockTextSelection\n */\nexport function blockTextSelection() {\n document.body.focus();\n document.onselectstart = function() {\n return false;\n };\n}\n\n/**\n * Turn off text selection blocking\n *\n * @return {Boolean}\n * @function unblockTextSelection\n */\nexport function unblockTextSelection() {\n document.onselectstart = function() {\n return true;\n };\n}\n\n/**\n * Offset Left\n * getBoundingClientRect technique from\n * John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @function findElPosition\n * @param {Element} el Element from which to get offset\n * @return {Object}\n */\nexport function findElPosition(el) {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = box.left + scrollLeft - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = box.top + scrollTop - clientTop;\n\n // Android sometimes returns slightly off decimal values, so need to round\n return {\n left: Math.round(left),\n top: Math.round(top)\n };\n}\n\n/**\n * Get pointer position in element\n * Returns an object with x and y coordinates.\n * The base on the coordinates are the bottom left of the element.\n *\n * @function getPointerPosition\n * @param {Element} el Element on which to get the pointer position on\n * @param {Event} event Event object\n * @return {Object} This object will have x and y coordinates corresponding to the mouse position\n */\nexport function getPointerPosition(el, event) {\n let position = {};\n let box = findElPosition(el);\n let boxW = el.offsetWidth;\n let boxH = el.offsetHeight;\n\n let boxY = box.top;\n let boxX = box.left;\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, ((boxY - pageY) + boxH) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @function isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isEl(value) {\n return !!value && typeof value === 'object' && value.nodeType === 1;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isTextNode(value) {\n return !!value && typeof value === 'object' && value.nodeType === 3;\n}\n\n/**\n * Empties the contents of an element.\n *\n * @function emptyEl\n * @param {Element} el\n * @return {Element}\n */\nexport function emptyEl(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n return el;\n}\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but protects\n * from falling into the trap of simply writing to `innerHTML`, which is\n * an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @function normalizeContent\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Array}\n */\nexport function normalizeContent(content) {\n\n // First, invoke content if it is a function. If it produces an array,\n // that needs to happen before normalization.\n if (typeof content === 'function') {\n content = content();\n }\n\n // Next up, normalize to an array, so one or many items can be normalized,\n // filtered, and returned.\n return (Array.isArray(content) ? content : [content]).map(value => {\n\n // First, invoke value if it is a function to produce a new value,\n // which will be subsequently normalized to a Node of some kind.\n if (typeof value === 'function') {\n value = value();\n }\n\n if (isEl(value) || isTextNode(value)) {\n return value;\n }\n\n if (typeof value === 'string' && /\\S/.test(value)) {\n return document.createTextNode(value);\n }\n }).filter(value => value);\n}\n\n/**\n * Normalizes and appends content to an element.\n *\n * @function appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function appendContent(el, content) {\n normalizeContent(content).forEach(node => el.appendChild(node));\n return el;\n}\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @function insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function insertContent(el, content) {\n return appendContent(emptyEl(el), content);\n}\n\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\nexport const $ = createQuerier('querySelector');\n\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\nexport const $$ = createQuerier('querySelectorAll');\n","/**\n * @file events.js\n *\n * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n */\n\nimport * as Dom from './dom.js';\nimport * as Guid from './guid.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nexport function on(elem, type, fn){\n if (Array.isArray(type)) {\n return _handleMultipleEvents(on, elem, type, fn);\n }\n\n let data = Dom.getElData(elem);\n\n // We need a place to store all our handler data\n if (!data.handlers) data.handlers = {};\n\n if (!data.handlers[type]) data.handlers[type] = [];\n\n if (!fn.guid) fn.guid = Guid.newGUID();\n\n data.handlers[type].push(fn);\n\n if (!data.dispatcher) {\n data.disabled = false;\n\n data.dispatcher = function (event, hash){\n\n if (data.disabled) return;\n event = fixEvent(event);\n\n var handlers = data.handlers[event.type];\n\n if (handlers) {\n // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n var handlersCopy = handlers.slice(0);\n\n for (var m = 0, n = handlersCopy.length; m < n; m++) {\n if (event.isImmediatePropagationStopped()) {\n break;\n } else {\n handlersCopy[m].call(elem, event, hash);\n }\n }\n }\n };\n }\n\n if (data.handlers[type].length === 1) {\n if (elem.addEventListener) {\n elem.addEventListener(type, data.dispatcher, false);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + type, data.dispatcher);\n }\n }\n}\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nexport function off(elem, type, fn) {\n // Don't want to add a cache object through getElData if not needed\n if (!Dom.hasElData(elem)) return;\n\n let data = Dom.getElData(elem);\n\n // If no events exist, nothing to unbind\n if (!data.handlers) { return; }\n\n if (Array.isArray(type)) {\n return _handleMultipleEvents(off, elem, type, fn);\n }\n\n // Utility function\n var removeType = function(t){\n data.handlers[t] = [];\n _cleanUpEvents(elem,t);\n };\n\n // Are we removing all bound events?\n if (!type) {\n for (let t in data.handlers) removeType(t);\n return;\n }\n\n var handlers = data.handlers[type];\n\n // If no handlers exist, nothing to unbind\n if (!handlers) return;\n\n // If no listener was provided, remove all listeners for type\n if (!fn) {\n removeType(type);\n return;\n }\n\n // We're only removing a single handler\n if (fn.guid) {\n for (let n = 0; n < handlers.length; n++) {\n if (handlers[n].guid === fn.guid) {\n handlers.splice(n--, 1);\n }\n }\n }\n\n _cleanUpEvents(elem, type);\n}\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nexport function trigger(elem, event, hash) {\n // Fetches element data and a reference to the parent (for bubbling).\n // Don't want to add a data object to cache for every parent,\n // so checking hasElData first.\n var elemData = (Dom.hasElData(elem)) ? Dom.getElData(elem) : {};\n var parent = elem.parentNode || elem.ownerDocument;\n // type = event.type || event,\n // handler;\n\n // If an event name was passed as a string, creates an event out of it\n if (typeof event === 'string') {\n event = { type:event, target:elem };\n }\n // Normalizes the event properties.\n event = fixEvent(event);\n\n // If the passed element has a dispatcher, executes the established handlers.\n if (elemData.dispatcher) {\n elemData.dispatcher.call(elem, event, hash);\n }\n\n // Unless explicitly stopped or the event does not bubble (e.g. media events)\n // recursively calls this function to bubble the event up the DOM.\n if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n trigger.call(null, parent, event, hash);\n\n // If at the top of the DOM, triggers the default action unless disabled.\n } else if (!parent && !event.defaultPrevented) {\n var targetData = Dom.getElData(event.target);\n\n // Checks if the target has a default action for this event.\n if (event.target[event.type]) {\n // Temporarily disables event dispatching on the target as we have already executed the handler.\n targetData.disabled = true;\n // Executes the default action.\n if (typeof event.target[event.type] === 'function') {\n event.target[event.type]();\n }\n // Re-enables event dispatching.\n targetData.disabled = false;\n }\n }\n\n // Inform the triggerer if the default was prevented by returning false\n return !event.defaultPrevented;\n}\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nexport function one(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(one, elem, type, fn);\n }\n var func = function(){\n off(elem, type, func);\n fn.apply(this, arguments);\n };\n // copy the guid to the new function so it can removed using the original function's ID\n func.guid = fn.guid = fn.guid || Guid.newGUID();\n on(elem, type, func);\n}\n\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event Event object to fix\n * @return {Object}\n * @private\n * @method fixEvent\n */\nexport function fixEvent(event) {\n\n function returnTrue() { return true; }\n function returnFalse() { return false; }\n\n // Test if fixing up is needed\n // Used to check if !event.stopPropagation instead of isPropagationStopped\n // But native events return true for stopPropagation, but don't have\n // other expected methods like isPropagationStopped. Seems to be a problem\n // with the Javascript Ninja code. So we're just overriding all events now.\n if (!event || !event.isPropagationStopped) {\n var old = event || window.event;\n\n event = {};\n // Clone the old object so that we can modify the values event = {};\n // IE8 Doesn't like when you mess with native event properties\n // Firefox returns false for event.hasOwnProperty('type') and other props\n // which makes copying more difficult.\n // TODO: Probably best to create a whitelist of event props\n for (var key in old) {\n // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n // and webkitMovementX/Y\n if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' &&\n key !== 'webkitMovementX' && key !== 'webkitMovementY') {\n // Chrome 32+ warns if you try to copy deprecated returnValue, but\n // we still want to if preventDefault isn't supported (IE8).\n if (!(key === 'returnValue' && old.preventDefault)) {\n event[key] = old[key];\n }\n }\n }\n\n // The event occurred on this element\n if (!event.target) {\n event.target = event.srcElement || document;\n }\n\n // Handle which other element the event is related to\n if (!event.relatedTarget) {\n event.relatedTarget = event.fromElement === event.target ?\n event.toElement :\n event.fromElement;\n }\n\n // Stop the default browser action\n event.preventDefault = function () {\n if (old.preventDefault) {\n old.preventDefault();\n }\n event.returnValue = false;\n old.returnValue = false;\n event.defaultPrevented = true;\n };\n\n event.defaultPrevented = false;\n\n // Stop the event from bubbling\n event.stopPropagation = function () {\n if (old.stopPropagation) {\n old.stopPropagation();\n }\n event.cancelBubble = true;\n old.cancelBubble = true;\n event.isPropagationStopped = returnTrue;\n };\n\n event.isPropagationStopped = returnFalse;\n\n // Stop the event from bubbling and executing other handlers\n event.stopImmediatePropagation = function () {\n if (old.stopImmediatePropagation) {\n old.stopImmediatePropagation();\n }\n event.isImmediatePropagationStopped = returnTrue;\n event.stopPropagation();\n };\n\n event.isImmediatePropagationStopped = returnFalse;\n\n // Handle mouse position\n if (event.clientX != null) {\n var doc = document.documentElement, body = document.body;\n\n event.pageX = event.clientX +\n (doc && doc.scrollLeft || body && body.scrollLeft || 0) -\n (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = event.clientY +\n (doc && doc.scrollTop || body && body.scrollTop || 0) -\n (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // Handle key presses\n event.which = event.charCode || event.keyCode;\n\n // Fix button for mouse clicks:\n // 0 == left; 1 == middle; 2 == right\n if (event.button != null) {\n event.button = (event.button & 1 ? 0 :\n (event.button & 4 ? 1 :\n (event.button & 2 ? 2 : 0)));\n }\n }\n\n // Returns fixed-up instance\n return event;\n}\n\n/**\n * Clean up the listener cache and dispatchers\n*\n * @param {Element|Object} elem Element to clean up\n * @param {String} type Type of event to clean up\n * @private\n * @method _cleanUpEvents\n */\nfunction _cleanUpEvents(elem, type) {\n var data = Dom.getElData(elem);\n\n // Remove the events of a particular type if there are none left\n if (data.handlers[type].length === 0) {\n delete data.handlers[type];\n // data.handlers[type] = null;\n // Setting to null was causing an error with data.handlers\n\n // Remove the meta-handler from the element\n if (elem.removeEventListener) {\n elem.removeEventListener(type, data.dispatcher, false);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + type, data.dispatcher);\n }\n }\n\n // Remove the events object if there are no types left\n if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n delete data.handlers;\n delete data.dispatcher;\n delete data.disabled;\n }\n\n // Finally remove the element data if there is no data left\n if (Object.getOwnPropertyNames(data).length === 0) {\n Dom.removeElData(elem);\n }\n}\n\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn The event method we want to use.\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String} type Type of event to bind to.\n * @param {Function} callback Event listener.\n * @private\n * @function _handleMultipleEvents\n */\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n types.forEach(function(type) {\n //Call the event method for each one of the types\n fn(elem, type, callback);\n });\n}\n","/**\n * @file fn.js\n */\nimport { newGUID } from './guid.js';\n\n/**\n * Bind (a.k.a proxy or Context). A simple method for changing the context of a function\n * It also stores a unique id on the function so it can be easily removed from events\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n * @private\n * @method bind\n */\nexport const bind = function(context, fn, uid) {\n // Make sure the function has a unique ID\n if (!fn.guid) { fn.guid = newGUID(); }\n\n // Create the new function that changes the context\n let ret = function() {\n return fn.apply(context, arguments);\n };\n\n // Allow for the ability to individualize this function\n // Needed in the case where multiple objects might share the same prototype\n // IF both items add an event listener with the same function, then you try to remove just one\n // it will remove both because they both have the same guid.\n // when using this, you need to use the bind method when you remove the listener as well.\n // currently used in text tracks\n ret.guid = (uid) ? uid + '_' + fn.guid : fn.guid;\n\n return ret;\n};\n","/**\n * @file format-time.js\n *\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @private\n * @function formatTime\n */\nfunction formatTime(seconds, guide=seconds) {\n seconds = seconds < 0 ? 0 : seconds;\n let s = Math.floor(seconds % 60);\n let m = Math.floor(seconds / 60 % 60);\n let h = Math.floor(seconds / 3600);\n const gm = Math.floor(guide / 60 % 60);\n const gh = Math.floor(guide / 3600);\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-';\n }\n\n // Check if we need to show hours\n h = (h > 0 || gh > 0) ? h + ':' : '';\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = (((h || gm >= 10) && m < 10) ? '0' + m : m) + ':';\n\n // Check if leading zero is need for seconds\n s = (s < 10) ? '0' + s : s;\n\n return h + m + s;\n}\n\nexport default formatTime;\n","/**\n * @file guid.js\n *\n * Unique ID for an element or function\n * @type {Number}\n * @private\n */\nlet _guid = 1;\n\n/**\n * Get the next unique ID\n *\n * @return {String} \n * @function newGUID\n */\nexport function newGUID() {\n return _guid++;\n}\n","/**\n * @file log.js\n */\nimport window from 'global/window';\n\n/**\n * Log plain debug messages\n */\nconst log = function(){\n _logType(null, arguments);\n};\n\n/**\n * Keep a history of log messages\n * @type {Array}\n */\nlog.history = [];\n\n/**\n * Log error messages\n */\nlog.error = function(){\n _logType('error', arguments);\n};\n\n/**\n * Log warning messages\n */\nlog.warn = function(){\n _logType('warn', arguments);\n};\n\n/**\n * Log messages to the console and history based on the type of message\n *\n * @param {String} type The type of message, or `null` for `log`\n * @param {Object} args The args to be passed to the log\n * @private\n * @method _logType\n */\nfunction _logType(type, args){\n // convert args to an array to get array functions\n let argsArray = Array.prototype.slice.call(args);\n // if there's no console then don't try to output messages\n // they will still be stored in log.history\n // Was setting these once outside of this function, but containing them\n // in the function makes it easier to test cases where console doesn't exist\n let noop = function(){};\n\n let console = window['console'] || {\n 'log': noop,\n 'warn': noop,\n 'error': noop\n };\n\n if (type) {\n // add the type to the front of the message\n argsArray.unshift(type.toUpperCase()+':');\n } else {\n // default to log with no prefix\n type = 'log';\n }\n\n // add to history\n log.history.push(argsArray);\n\n // add console prefix after adding to history\n argsArray.unshift('VIDEOJS:');\n\n // call appropriate log function\n if (console[type].apply) {\n console[type].apply(console, argsArray);\n } else {\n // ie8 doesn't allow error.apply, but it will just join() the array anyway\n console[type](argsArray.join(' '));\n }\n}\n\nexport default log;\n","/**\n * @file merge-options.js\n */\nimport merge from 'lodash-compat/object/merge';\n\nfunction isPlain(obj) {\n return !!obj\n && typeof obj === 'object'\n && obj.toString() === '[object Object]'\n && obj.constructor === Object;\n}\n\n/**\n * Merge customizer. video.js simply overwrites non-simple objects\n * (like arrays) instead of attempting to overlay them.\n * @see https://lodash.com/docs#merge\n */\nconst customizer = function(destination, source) {\n // If we're not working with a plain object, copy the value as is\n // If source is an array, for instance, it will replace destination\n if (!isPlain(source)) {\n return source;\n }\n\n // If the new value is a plain object but the first object value is not\n // we need to create a new object for the first object to merge with.\n // This makes it consistent with how merge() works by default\n // and also protects from later changes the to first object affecting\n // the second object's values.\n if (!isPlain(destination)) {\n return mergeOptions(source);\n }\n};\n\n/**\n * Merge one or more options objects, recursively merging **only**\n * plain object properties. Previously `deepMerge`.\n *\n * @param {...Object} source One or more objects to merge\n * @returns {Object} a new object that is the union of all\n * provided objects\n * @function mergeOptions\n */\nexport default function mergeOptions() {\n // contruct the call dynamically to handle the variable number of\n // objects to merge\n let args = Array.prototype.slice.call(arguments);\n\n // unshift an empty object into the front of the call as the target\n // of the merge\n args.unshift({});\n\n // customize conflict resolution to match our historical merge behavior\n args.push(customizer);\n\n merge.apply(null, args);\n\n // return the mutated result object\n return args[0];\n}\n","import document from 'global/document';\n\nexport let createStyleElement = function(className) {\n let style = document.createElement('style');\n style.className = className;\n\n return style;\n};\n\nexport let setTextContent = function(el, content) {\n if (el.styleSheet) {\n el.styleSheet.cssText = content;\n } else {\n el.textContent = content;\n }\n};\n","import log from './log.js';\n\n/**\n * @file time-ranges.js\n *\n * Should create a fake TimeRange object\n * Mimics an HTML5 time range instance, which has functions that\n * return the start and end times for a range\n * TimeRanges are returned by the buffered() method\n *\n * @param {(Number|Array)} Start of a single range or an array of ranges\n * @param {Number} End of a single range\n * @private\n * @method createTimeRanges\n */\nexport function createTimeRanges(start, end){\n if (Array.isArray(start)) {\n return createTimeRangesObj(start);\n } else if (start === undefined || end === undefined) {\n return createTimeRangesObj();\n }\n return createTimeRangesObj([[start, end]]);\n}\n\nexport { createTimeRanges as createTimeRange };\n\nfunction createTimeRangesObj(ranges){\n if (ranges === undefined || ranges.length === 0) {\n return {\n length: 0,\n start: function() {\n throw new Error('This TimeRanges object is empty');\n },\n end: function() {\n throw new Error('This TimeRanges object is empty');\n }\n };\n }\n return {\n length: ranges.length,\n start: getRange.bind(null, 'start', 0, ranges),\n end: getRange.bind(null, 'end', 1, ranges)\n };\n}\n\nfunction getRange(fnName, valueIndex, ranges, rangeIndex){\n if (rangeIndex === undefined) {\n log.warn(`DEPRECATED: Function '${fnName}' on 'TimeRanges' called without an index argument.`);\n rangeIndex = 0;\n }\n rangeCheck(fnName, rangeIndex, ranges.length - 1);\n return ranges[rangeIndex][valueIndex];\n}\n\nfunction rangeCheck(fnName, index, maxIndex){\n if (index < 0 || index > maxIndex) {\n throw new Error(`Failed to execute '${fnName}' on 'TimeRanges': The index provided (${index}) is greater than or equal to the maximum bound (${maxIndex}).`);\n }\n}\n","/**\n * @file to-title-case.js\n *\n * Uppercase the first letter of a string\n *\n * @param {String} string String to be uppercased\n * @return {String}\n * @private\n * @method toTitleCase\n */\nfunction toTitleCase(string){\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport default toTitleCase;\n","/**\n * @file url.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nexport const parseUrl = function(url) {\n const props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];\n\n // add the url to an anchor and let the browser parse the URL\n let a = document.createElement('a');\n a.href = url;\n\n // IE8 (and 9?) Fix\n // ie8 doesn't parse the URL correctly until the anchor is actually\n // added to the body, and an innerHTML is needed to trigger the parsing\n let addToBody = (a.host === '' && a.protocol !== 'file:');\n let div;\n if (addToBody) {\n div = document.createElement('div');\n div.innerHTML = ``;\n a = div.firstChild;\n // prevent the div from affecting layout\n div.setAttribute('style', 'display:none; position:absolute;');\n document.body.appendChild(div);\n }\n\n // Copy the specific URL properties to a new object\n // This is also needed for IE8 because the anchor loses its\n // properties when it's removed from the dom\n let details = {};\n for (var i = 0; i < props.length; i++) {\n details[props[i]] = a[props[i]];\n }\n\n // IE9 adds the port to the host property unlike everyone else. If\n // a port identifier is added for standard ports, strip it.\n if (details.protocol === 'http:') {\n details.host = details.host.replace(/:80$/, '');\n }\n if (details.protocol === 'https:') {\n details.host = details.host.replace(/:443$/, '');\n }\n\n if (addToBody) {\n document.body.removeChild(div);\n }\n\n return details;\n};\n\n/**\n * Get absolute version of relative URL. Used to tell flash correct URL.\n * http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n *\n * @param {String} url URL to make absolute\n * @return {String} Absolute URL\n * @private\n * @method getAbsoluteURL\n */\nexport const getAbsoluteURL = function(url){\n // Check if absolute URL\n if (!url.match(/^https?:\\/\\//)) {\n // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\n let div = document.createElement('div');\n div.innerHTML = `x`;\n url = div.firstChild.href;\n }\n\n return url;\n};\n\n/**\n * Returns the extension of the passed file name. It will return an empty string if you pass an invalid path\n *\n * @param {String} path The fileName path like '/path/to/file.mp4'\n * @returns {String} The extension in lower case or an empty string if no extension could be found.\n * @method getFileExtension\n */\nexport const getFileExtension = function(path) {\n if(typeof path === 'string'){\n let splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/i;\n let pathParts = splitPathRe.exec(path);\n\n if (pathParts) {\n return pathParts.pop().toLowerCase();\n }\n }\n\n return '';\n};\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nexport const isCrossOrigin = function(url) {\n let winLoc = window.location;\n let urlInfo = parseUrl(url);\n\n // IE8 protocol relative urls will return ':' for protocol\n let srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;\n\n // Check if url is for another domain/origin\n // IE8 doesn't know location.origin, so we won't rely on it here\n let crossOrigin = (srcProtocol + urlInfo.host) !== (winLoc.protocol + winLoc.host);\n\n return crossOrigin;\n};\n","/**\n * @file video.js\n */\nimport window from 'global/window';\nimport document from 'global/document';\nimport * as setup from './setup';\nimport * as stylesheet from './utils/stylesheet.js';\nimport Component from './component';\nimport EventTarget from './event-target';\nimport * as Events from './utils/events.js';\nimport Player from './player';\nimport plugin from './plugins.js';\nimport mergeOptions from '../../src/js/utils/merge-options.js';\nimport * as Fn from './utils/fn.js';\nimport TextTrack from './tracks/text-track.js';\n\nimport assign from 'object.assign';\nimport { createTimeRanges } from './utils/time-ranges.js';\nimport formatTime from './utils/format-time.js';\nimport log from './utils/log.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\nimport * as Url from './utils/url.js';\nimport extendFn from './extend.js';\nimport merge from 'lodash-compat/object/merge';\nimport createDeprecationProxy from './utils/create-deprecation-proxy.js';\nimport xhr from 'xhr';\n\n// Include the built-in techs\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\nimport Flash from './tech/flash.js';\n\n// HTML5 Element Shim for IE8\nif (typeof HTMLVideoElement === 'undefined') {\n document.createElement('video');\n document.createElement('audio');\n document.createElement('track');\n}\n\n/**\n * Doubles as the main function for users to create a player instance and also\n * the main library object.\n * The `videojs` function can be used to initialize or retrieve a player.\n * ```js\n * var myPlayer = videojs('my_video_id');\n * ```\n *\n * @param {String|Element} id Video element or video element ID\n * @param {Object=} options Optional options object for config/settings\n * @param {Function=} ready Optional ready callback\n * @return {Player} A player instance\n * @mixes videojs\n * @method videojs\n */\nlet videojs = function(id, options, ready){\n let tag; // Element of ID\n\n // Allow for element or ID to be passed in\n // String ID\n if (typeof id === 'string') {\n\n // Adjust for jQuery ID syntax\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n // If a player instance has already been created for this ID return it.\n if (videojs.getPlayers()[id]) {\n\n // If options or ready funtion are passed, warn\n if (options) {\n log.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n }\n\n if (ready) {\n videojs.getPlayers()[id].ready(ready);\n }\n\n return videojs.getPlayers()[id];\n\n // Otherwise get element for ID\n } else {\n tag = Dom.getEl(id);\n }\n\n // ID is a media element\n } else {\n tag = id;\n }\n\n // Check for a useable element\n if (!tag || !tag.nodeName) { // re: nodeName, could be a box div also\n throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns\n }\n\n // Element may have a player attr referring to an already created player instance.\n // If not, set up a new player and return the instance.\n return tag['player'] || Player.players[tag.playerId] || new Player(tag, options, ready);\n};\n\n// Add default styles\nif (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n let style = Dom.$('.vjs-styles-defaults');\n\n if (!style) {\n style = stylesheet.createStyleElement('vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(style, head.firstChild);\n stylesheet.setTextContent(style, `\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n `);\n }\n}\n\n// Run Auto-load players\n// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version)\nsetup.autoSetupTimeout(1, videojs);\n\n/*\n * Current software version (semver)\n *\n * @type {String}\n */\nvideojs.VERSION = '__VERSION__';\n\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * ```js\n * videojs.options.autoplay = true\n * // -> all players will autoplay by default\n * ```\n *\n * @type {Object}\n */\nvideojs.options = Player.prototype.options_;\n\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object} The created players\n * @mixes videojs\n * @method getPlayers\n */\nvideojs.getPlayers = function() {\n return Player.players;\n};\n\n/**\n * For backward compatibility, expose players object.\n *\n * @deprecated\n * @memberOf videojs\n * @property {Object|Proxy} players\n */\nvideojs.players = createDeprecationProxy(Player.players, {\n get: 'Access to videojs.players is deprecated; use videojs.getPlayers instead',\n set: 'Modification of videojs.players is deprecated'\n});\n\n/**\n * Get a component class object by name\n * ```js\n * var VjsButton = videojs.getComponent('Button');\n * // Create a new instance of the component\n * var myButton = new VjsButton(myPlayer);\n * ```\n *\n * @return {Component} Component identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getComponent = Component.getComponent;\n\n/**\n * Register a component so it can referred to by name\n * Used when adding to other\n * components, either through addChild\n * `component.addChild('myComponent')`\n * or through default children options\n * `{ children: ['myComponent'] }`.\n * ```js\n * // Get a component to subclass\n * var VjsButton = videojs.getComponent('Button');\n * // Subclass the component (see 'extend' doc for more info)\n * var MySpecialButton = videojs.extend(VjsButton, {});\n * // Register the new component\n * VjsButton.registerComponent('MySepcialButton', MySepcialButton);\n * // (optionally) add the new component as a default player child\n * myPlayer.addChild('MySepcialButton');\n * ```\n * NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {String} The class name of the component\n * @param {Component} The component class\n * @return {Component} The newly registered component\n * @mixes videojs\n * @method registerComponent\n */\nvideojs.registerComponent = (name, comp) => {\n if (Tech.isTech(comp)) {\n log.warn(`The ${name} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`);\n }\n\n Component.registerComponent.call(Component, name, comp);\n};\n\n/**\n * Get a Tech class object by name\n * ```js\n * var Html5 = videojs.getTech('Html5');\n * // Create a new instance of the component\n * var html5 = new Html5(options);\n * ```\n *\n * @return {Tech} Tech identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getTech = Tech.getTech;\n\n/**\n * Register a Tech so it can referred to by name.\n * This is used in the tech order for the player.\n *\n * ```js\n * // get the Html5 Tech\n * var Html5 = videojs.getTech('Html5');\n * var MyTech = videojs.extend(Html5, {});\n * // Register the new Tech\n * VjsButton.registerTech('Tech', MyTech);\n * var player = videojs('myplayer', {\n * techOrder: ['myTech', 'html5']\n * });\n * ```\n *\n * @param {String} The class name of the tech\n * @param {Tech} The tech class\n * @return {Tech} The newly registered Tech\n * @mixes videojs\n * @method registerTech\n */\nvideojs.registerTech = Tech.registerTech;\n\n/**\n * A suite of browser and device tests\n *\n * @type {Object}\n * @private\n */\nvideojs.browser = browser;\n\n/**\n * Whether or not the browser supports touch events. Included for backward\n * compatibility with 4.x, but deprecated. Use `videojs.browser.TOUCH_ENABLED`\n * instead going forward.\n *\n * @deprecated\n * @type {Boolean}\n */\nvideojs.TOUCH_ENABLED = browser.TOUCH_ENABLED;\n\n/**\n * Subclass an existing class\n * Mimics ES6 subclassing with the `extend` keyword\n * ```js\n * // Create a basic javascript 'class'\n * function MyClass(name){\n * // Set a property at initialization\n * this.myName = name;\n * }\n * // Create an instance method\n * MyClass.prototype.sayMyName = function(){\n * alert(this.myName);\n * };\n * // Subclass the exisitng class and change the name\n * // when initializing\n * var MySubClass = videojs.extend(MyClass, {\n * constructor: function(name) {\n * // Call the super class constructor for the subclass\n * MyClass.call(this, name)\n * }\n * });\n * // Create an instance of the new sub class\n * var myInstance = new MySubClass('John');\n * myInstance.sayMyName(); // -> should alert \"John\"\n * ```\n *\n * @param {Function} The Class to subclass\n * @param {Object} An object including instace methods for the new class\n * Optionally including a `constructor` function\n * @return {Function} The newly created subclass\n * @mixes videojs\n * @method extend\n */\nvideojs.extend = extendFn;\n\n/**\n * Merge two options objects recursively\n * Performs a deep merge like lodash.merge but **only merges plain objects**\n * (not arrays, elements, anything else)\n * Other values will be copied directly from the second object.\n * ```js\n * var defaultOptions = {\n * foo: true,\n * bar: {\n * a: true,\n * b: [1,2,3]\n * }\n * };\n * var newOptions = {\n * foo: false,\n * bar: {\n * b: [4,5,6]\n * }\n * };\n * var result = videojs.mergeOptions(defaultOptions, newOptions);\n * // result.foo = false;\n * // result.bar.a = true;\n * // result.bar.b = [4,5,6];\n * ```\n *\n * @param {Object} defaults The options object whose values will be overriden\n * @param {Object} overrides The options object with values to override the first\n * @param {Object} etc Any number of additional options objects\n *\n * @return {Object} a new object with the merged values\n * @mixes videojs\n * @method mergeOptions\n */\nvideojs.mergeOptions = mergeOptions;\n\n/**\n * Change the context (this) of a function\n *\n * videojs.bind(newContext, function(){\n * this === newContext\n * });\n *\n * NOTE: as of v5.0 we require an ES5 shim, so you should use the native\n * `function(){}.bind(newContext);` instead of this.\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n */\nvideojs.bind = Fn.bind;\n\n/**\n * Create a Video.js player plugin\n * Plugins are only initialized when options for the plugin are included\n * in the player options, or the plugin function on the player instance is\n * called.\n * **See the plugin guide in the docs for a more detailed example**\n * ```js\n * // Make a plugin that alerts when the player plays\n * videojs.plugin('myPlugin', function(myPluginOptions) {\n * myPluginOptions = myPluginOptions || {};\n *\n * var player = this;\n * var alertText = myPluginOptions.text || 'Player is playing!'\n *\n * player.on('play', function(){\n * alert(alertText);\n * });\n * });\n * // USAGE EXAMPLES\n * // EXAMPLE 1: New player with plugin options, call plugin immediately\n * var player1 = videojs('idOne', {\n * myPlugin: {\n * text: 'Custom text!'\n * }\n * });\n * // Click play\n * // --> Should alert 'Custom text!'\n * // EXAMPLE 3: New player, initialize plugin later\n * var player3 = videojs('idThree');\n * // Click play\n * // --> NO ALERT\n * // Click pause\n * // Initialize plugin using the plugin function on the player instance\n * player3.myPlugin({\n * text: 'Plugin added later!'\n * });\n * // Click play\n * // --> Should alert 'Plugin added later!'\n * ```\n *\n * @param {String} name The plugin name\n * @param {Function} fn The plugin function that will be called with options\n * @mixes videojs\n * @method plugin\n */\nvideojs.plugin = plugin;\n\n/**\n * Adding languages so that they're available to all players.\n * ```js\n * videojs.addLanguage('es', { 'Hello': 'Hola' });\n * ```\n *\n * @param {String} code The language code or dictionary property\n * @param {Object} data The data values to be translated\n * @return {Object} The resulting language dictionary object\n * @mixes videojs\n * @method addLanguage\n */\nvideojs.addLanguage = function(code, data){\n code = ('' + code).toLowerCase();\n return merge(videojs.options.languages, { [code]: data })[code];\n};\n\n/**\n * Log debug messages.\n *\n * @param {...Object} messages One or more messages to log\n */\nvideojs.log = log;\n\n/**\n * Creates an emulated TimeRange object.\n *\n * @param {Number|Array} start Start time in seconds or an array of ranges\n * @param {Number} end End time in seconds\n * @return {Object} Fake TimeRange object\n * @method createTimeRange\n */\nvideojs.createTimeRange = videojs.createTimeRanges = createTimeRanges;\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @method formatTime\n */\nvideojs.formatTime = formatTime;\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nvideojs.parseUrl = Url.parseUrl;\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nvideojs.isCrossOrigin = Url.isCrossOrigin;\n\n/**\n * Event target class.\n *\n * @type {Function}\n */\nvideojs.EventTarget = EventTarget;\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nvideojs.on = Events.on;\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nvideojs.one = Events.one;\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nvideojs.off = Events.off;\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nvideojs.trigger = Events.trigger;\n\n/**\n * A cross-browser XMLHttpRequest wrapper. Here's a simple example:\n *\n * videojs.xhr({\n * body: someJSONString,\n * uri: \"/foo\",\n * headers: {\n * \"Content-Type\": \"application/json\"\n * }\n * }, function (err, resp, body) {\n * // check resp.statusCode\n * });\n *\n * Check out the [full\n * documentation](https://github.com/Raynos/xhr/blob/v2.1.0/README.md)\n * for more options.\n *\n * @param {Object} options settings for the request.\n * @return {XMLHttpRequest|XDomainRequest} the request object.\n * @see https://github.com/Raynos/xhr\n */\nvideojs.xhr = xhr;\n\n/**\n * TextTrack class\n *\n * @type {Function}\n */\nvideojs.TextTrack = TextTrack;\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @method isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isEl = Dom.isEl;\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @method isTextNode\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isTextNode = Dom.isTextNode;\n\n/**\n * Creates an element and applies properties.\n *\n * @method createEl\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n */\nvideojs.createEl = Dom.createEl;\n\n/**\n * Check if an element has a CSS class\n *\n * @method hasClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nvideojs.hasClass = Dom.hasElClass;\n\n/**\n * Add a CSS class name to an element\n *\n * @method addClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nvideojs.addClass = Dom.addElClass;\n\n/**\n * Remove a CSS class name from an element\n *\n * @method removeClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nvideojs.removeClass = Dom.removeElClass;\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @method toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nvideojs.toggleClass = Dom.toggleElClass;\n\n/**\n * Apply attributes to an HTML element.\n *\n * @method setAttributes\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n */\nvideojs.setAttributes = Dom.setElAttributes;\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @method getAttributes\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n */\nvideojs.getAttributes = Dom.getElAttributes;\n\n/**\n * Empties the contents of an element.\n *\n * @method emptyEl\n * @param {Element} el\n * @return {Element}\n */\nvideojs.emptyEl = Dom.emptyEl;\n\n/**\n * Normalizes and appends content to an element.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.appendContent = Dom.appendContent;\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.insertContent = Dom.insertContent;\n\n/*\n * Custom Universal Module Definition (UMD)\n *\n * Video.js will never be a non-browser lib so we can simplify UMD a bunch and\n * still support requirejs and browserify. This also needs to be closure\n * compiler compatible, so string keys are used.\n */\nif (typeof define === 'function' && define['amd']) {\n define('videojs', [], function(){ return videojs; });\n\n// checking that module is an object too because of umdjs/umd#35\n} else if (typeof exports === 'object' && typeof module === 'object') {\n module['exports'] = videojs;\n}\n\nexport default videojs;\n"]} \ No newline at end of file -- cgit v1.2.1 From 356b2d2bd782289b6130a22531523562514aa7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 8 Jul 2016 18:30:32 +0200 Subject: Get rid of `is_image` in FileUploader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/uploaders/file_uploader.rb | 1 - doc/api/projects.md | 1 - spec/controllers/projects/uploads_controller_spec.rb | 12 +++++------- spec/lib/gitlab/email/attachment_uploader_spec.rb | 1 - spec/lib/gitlab/email/receiver_spec.rb | 1 - spec/requests/api/projects_spec.rb | 1 - spec/services/projects/download_service_spec.rb | 4 ---- spec/services/projects/upload_service_spec.rb | 8 -------- 8 files changed, 5 insertions(+), 24 deletions(-) diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb index 80284fa294a..2f5f49f7de7 100644 --- a/app/uploaders/file_uploader.rb +++ b/app/uploaders/file_uploader.rb @@ -42,7 +42,6 @@ class FileUploader < CarrierWave::Uploader::Base { alt: filename, url: self.secure_url, - is_image: image_or_video?, markdown: markdown } end diff --git a/doc/api/projects.md b/doc/api/projects.md index dceee7b4ea7..0ba0bffb4ac 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -850,7 +850,6 @@ Parameters: { "alt": "dk", "url": "/uploads/66dbcd21ec5d24ed6ea225176098d52b/dk.png", - "is_image": true, "markdown": "![dk](/uploads/66dbcd21ec5d24ed6ea225176098d52b/dk.png)" } ``` diff --git a/spec/controllers/projects/uploads_controller_spec.rb b/spec/controllers/projects/uploads_controller_spec.rb index 0893ee89f6a..71d0e4be834 100644 --- a/spec/controllers/projects/uploads_controller_spec.rb +++ b/spec/controllers/projects/uploads_controller_spec.rb @@ -14,9 +14,9 @@ describe Projects::UploadsController do context "without params['file']" do it "returns an error" do - post :create, + post :create, namespace_id: project.namespace.to_param, - project_id: project.to_param, + project_id: project.to_param, format: :json expect(response).to have_http_status(422) end @@ -34,23 +34,21 @@ describe Projects::UploadsController do it 'returns a content with original filename, new link, and correct type.' do expect(response.body).to match '\"alt\":\"rails_sample\"' expect(response.body).to match "\"url\":\"/uploads" - expect(response.body).to match '\"is_image\":true' end end context 'with valid non-image file' do before do - post :create, + post :create, namespace_id: project.namespace.to_param, - project_id: project.to_param, - file: txt, + project_id: project.to_param, + file: txt, format: :json end it 'returns a content with original filename, new link, and correct type.' do expect(response.body).to match '\"alt\":\"doc_sample.txt\"' expect(response.body).to match "\"url\":\"/uploads" - expect(response.body).to match '\"is_image\":false' end end end diff --git a/spec/lib/gitlab/email/attachment_uploader_spec.rb b/spec/lib/gitlab/email/attachment_uploader_spec.rb index 476a21bf996..08b2577ecc4 100644 --- a/spec/lib/gitlab/email/attachment_uploader_spec.rb +++ b/spec/lib/gitlab/email/attachment_uploader_spec.rb @@ -11,7 +11,6 @@ describe Gitlab::Email::AttachmentUploader, lib: true do link = links.first expect(link).not_to be_nil - expect(link[:is_image]).to be_truthy expect(link[:alt]).to eq("bricks") expect(link[:url]).to include("bricks.png") end diff --git a/spec/lib/gitlab/email/receiver_spec.rb b/spec/lib/gitlab/email/receiver_spec.rb index 36267faeb93..84d2584a791 100644 --- a/spec/lib/gitlab/email/receiver_spec.rb +++ b/spec/lib/gitlab/email/receiver_spec.rb @@ -115,7 +115,6 @@ describe Gitlab::Email::Receiver, lib: true do [ { url: "uploads/image.png", - is_image: true, alt: "image", markdown: markdown } diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 152cd802839..1e049e9e99f 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -396,7 +396,6 @@ describe API::API, api: true do expect(json_response['alt']).to eq("dk") expect(json_response['url']).to start_with("/uploads/") expect(json_response['url']).to end_with("/dk.png") - expect(json_response['is_image']).to eq(true) end end diff --git a/spec/services/projects/download_service_spec.rb b/spec/services/projects/download_service_spec.rb index f252e2c5902..122a7cea2a1 100644 --- a/spec/services/projects/download_service_spec.rb +++ b/spec/services/projects/download_service_spec.rb @@ -35,8 +35,6 @@ describe Projects::DownloadService, services: true do it { expect(@link_to_file).to have_key(:alt) } it { expect(@link_to_file).to have_key(:url) } - it { expect(@link_to_file).to have_key(:is_image) } - it { expect(@link_to_file[:is_image]).to be true } it { expect(@link_to_file[:url]).to match('rails_sample.jpg') } it { expect(@link_to_file[:alt]).to eq('rails_sample') } end @@ -49,8 +47,6 @@ describe Projects::DownloadService, services: true do it { expect(@link_to_file).to have_key(:alt) } it { expect(@link_to_file).to have_key(:url) } - it { expect(@link_to_file).to have_key(:is_image) } - it { expect(@link_to_file[:is_image]).to be false } it { expect(@link_to_file[:url]).to match('doc_sample.txt') } it { expect(@link_to_file[:alt]).to eq('doc_sample.txt') } end diff --git a/spec/services/projects/upload_service_spec.rb b/spec/services/projects/upload_service_spec.rb index 9268a9fb1a2..c42eeba4b9c 100644 --- a/spec/services/projects/upload_service_spec.rb +++ b/spec/services/projects/upload_service_spec.rb @@ -15,9 +15,7 @@ describe Projects::UploadService, services: true do it { expect(@link_to_file).to have_key(:alt) } it { expect(@link_to_file).to have_key(:url) } - it { expect(@link_to_file).to have_key(:is_image) } it { expect(@link_to_file).to have_value('banana_sample') } - it { expect(@link_to_file[:is_image]).to equal(true) } it { expect(@link_to_file[:url]).to match('banana_sample.gif') } end @@ -31,8 +29,6 @@ describe Projects::UploadService, services: true do it { expect(@link_to_file).to have_key(:alt) } it { expect(@link_to_file).to have_key(:url) } it { expect(@link_to_file).to have_value('dk') } - it { expect(@link_to_file).to have_key(:is_image) } - it { expect(@link_to_file[:is_image]).to equal(true) } it { expect(@link_to_file[:url]).to match('dk.png') } end @@ -44,9 +40,7 @@ describe Projects::UploadService, services: true do it { expect(@link_to_file).to have_key(:alt) } it { expect(@link_to_file).to have_key(:url) } - it { expect(@link_to_file).to have_key(:is_image) } it { expect(@link_to_file).to have_value('rails_sample') } - it { expect(@link_to_file[:is_image]).to equal(true) } it { expect(@link_to_file[:url]).to match('rails_sample.jpg') } end @@ -58,9 +52,7 @@ describe Projects::UploadService, services: true do it { expect(@link_to_file).to have_key(:alt) } it { expect(@link_to_file).to have_key(:url) } - it { expect(@link_to_file).to have_key(:is_image) } it { expect(@link_to_file).to have_value('doc_sample.txt') } - it { expect(@link_to_file[:is_image]).to equal(false) } it { expect(@link_to_file[:url]).to match('doc_sample.txt') } end -- cgit v1.2.1 From 29ea8d09e05d749f0b6a784311aea942f7d2d0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 8 Jul 2016 18:55:49 +0200 Subject: Remove duplication, useless rescue, and avoid using ActionView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/uploaders/uploader_helper.rb | 29 ++++++++++++++++------------- config/initializers/mime_types.rb | 6 ++---- lib/banzai/filter/video_link_filter.rb | 23 +++++++++-------------- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/app/uploaders/uploader_helper.rb b/app/uploaders/uploader_helper.rb index 6d510fe7dde..703f7820913 100644 --- a/app/uploaders/uploader_helper.rb +++ b/app/uploaders/uploader_helper.rb @@ -1,18 +1,19 @@ # Extra methods for uploader module UploaderHelper - IMAGE_EXT = %w(png jpg jpeg gif bmp tiff) - VIDEO_EXT = %w(mov mp4 ogg webm flv) + IMAGE_EXT = %w[png jpg jpeg gif bmp tiff] + # We recommend using the .mp4 format over .mov. Videos in .mov format can + # still be used but you really need to make sure they are served with the + # proper MIME type video/mp4 and not video/quicktime or your videos won’t play + # on IE ≥ 9. + # http://archive.sublimevideo.info/20150912/docs.sublimevideo.net/troubleshooting.html + VIDEO_EXT = %w[mp4 m4v mov webm ogv] def image? extension_match?(IMAGE_EXT) - rescue - false end def video? extension_match?(VIDEO_EXT) - rescue - false end def image_or_video? @@ -20,13 +21,15 @@ module UploaderHelper end def extension_match?(extensions) - if file.respond_to?(:extension) - extensions.include?(file.extension.downcase) - else - # Not all CarrierWave storages respond to :extension - ext = file.path.split('.').last.downcase - extensions.include?(ext) - end + extension = + if file.respond_to?(:extension) + file.extension + else + # Not all CarrierWave storages respond to :extension + File.extname(file.path).delete('.') + end + + extensions.include?(extension.downcase) end def file_storage? diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index 4c6de622f17..cd449b65818 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -9,8 +9,6 @@ Mime::Type.register_alias "text/plain", :patch Mime::Type.register_alias "text/html", :markdown Mime::Type.register_alias "text/html", :md +Mime::Type.register "video/mp4", :mp4, [], [:m4v, :mov] Mime::Type.register "video/webm", :webm -Mime::Type.register "video/ogg", :ogg -Mime::Type.register "video/ogg", :ogv -Mime::Type.register "video/mp4", :mp4 -Mime::Type.register "video/mp4", :m4v +Mime::Type.register "video/ogg", :ogv, [], [:ogg] diff --git a/lib/banzai/filter/video_link_filter.rb b/lib/banzai/filter/video_link_filter.rb index 0ae885708f7..a8316e72a68 100644 --- a/lib/banzai/filter/video_link_filter.rb +++ b/lib/banzai/filter/video_link_filter.rb @@ -7,13 +7,9 @@ module Banzai include ActionView::Helpers::TagHelper include ActionView::Context - EXTENSIONS = %w(.mov .mp4 .ogg .webm .flv) - def call doc.search('img').each do |el| - if video?(el) - el.replace video_node(el) - end + el.replace(video_tag(doc, el)) if video?(el) end doc @@ -22,19 +18,18 @@ module Banzai private def video?(element) - EXTENSIONS.include? File.extname(element.attribute('src').value) + extension = File.extname(element.attribute('src').value).delete('.') + UploaderHelper::VIDEO_EXT.include?(extension) end # Return a video tag Nokogiri node # - def video_node(element) - vtag = content_tag(:video, "", { - src: element.attribute('src').value, - class: 'video-js', preload: 'auto', - controls: true - }) - - Nokogiri::HTML::DocumentFragment.parse(vtag) + def video_node(doc, element) + doc.document.create_element( + 'video', + src: element.attribute('src').value, + class: 'video-js', + controls: true) end end -- cgit v1.2.1 From 98e540532cc2706e4cdc027bd2acb8406e954ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Tue, 12 Jul 2016 19:31:20 +0200 Subject: Use a more powerful query to match videos in img tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also, always add a link to download videos since video playback is tricky. Also, it solves the issue with email client not supporting videos. Signed-off-by: Rémy Coutable --- lib/banzai/filter/video_link_filter.rb | 43 +++++++++++++++++++----- lib/banzai/pipeline/gfm_pipeline.rb | 2 +- spec/lib/banzai/filter/video_link_filter_spec.rb | 26 ++++++++------ 3 files changed, 51 insertions(+), 20 deletions(-) diff --git a/lib/banzai/filter/video_link_filter.rb b/lib/banzai/filter/video_link_filter.rb index a8316e72a68..4dfbff8ec86 100644 --- a/lib/banzai/filter/video_link_filter.rb +++ b/lib/banzai/filter/video_link_filter.rb @@ -8,8 +8,8 @@ module Banzai include ActionView::Context def call - doc.search('img').each do |el| - el.replace(video_tag(doc, el)) if video?(el) + doc.xpath(query).each do |el| + el.replace(video_node(doc, el)) end doc @@ -17,19 +17,44 @@ module Banzai private - def video?(element) - extension = File.extname(element.attribute('src').value).delete('.') - UploaderHelper::VIDEO_EXT.include?(extension) + def query + @query ||= begin + src_query = UploaderHelper::VIDEO_EXT.map do |ext| + "'.#{ext}' = substring(@src, string-length(@src) - #{ext.size})" + end + + "descendant-or-self::img[not(ancestor::a) and (#{src_query.join(' or ')})]" + end end # Return a video tag Nokogiri node # def video_node(doc, element) - doc.document.create_element( + container = doc.document.create_element( + 'div', + class: 'video-container' + ) + + video = doc.document.create_element( 'video', - src: element.attribute('src').value, - class: 'video-js', - controls: true) + src: element['src'], + class: 'video-js vjs-sublime-skin', + controls: true, + "data-setup": '{}') + + link = doc.document.create_element( + 'a', + element['title'] || element['alt'], + href: element['src'], + target: '_blank', + title: "Downlad '#{element['title'] || element['alt']}'") + download_paragraph = doc.document.create_element('p') + download_paragraph.children = link + + container.add_child(video) + container.add_child(download_paragraph) + + container end end diff --git a/lib/banzai/pipeline/gfm_pipeline.rb b/lib/banzai/pipeline/gfm_pipeline.rb index d9edca7046c..8d94b199c66 100644 --- a/lib/banzai/pipeline/gfm_pipeline.rb +++ b/lib/banzai/pipeline/gfm_pipeline.rb @@ -7,8 +7,8 @@ module Banzai Filter::SanitizationFilter, Filter::UploadLinkFilter, - Filter::ImageLinkFilter, Filter::VideoLinkFilter, + Filter::ImageLinkFilter, Filter::EmojiFilter, Filter::TableOfContentsFilter, Filter::AutolinkFilter, diff --git a/spec/lib/banzai/filter/video_link_filter_spec.rb b/spec/lib/banzai/filter/video_link_filter_spec.rb index 8ccfb9c0fca..bdf76c458b0 100644 --- a/spec/lib/banzai/filter/video_link_filter_spec.rb +++ b/spec/lib/banzai/filter/video_link_filter_spec.rb @@ -9,28 +9,34 @@ describe Banzai::Filter::VideoLinkFilter, lib: true do described_class.call(doc, contexts) end - def image(path) + def link_to_image(path) %() end let(:project) { create(:project) } context 'when the element src has a video extension' do - it 'replaces the image tag with a video tag' do - doc = filter(image("/path/video.mov")) - element = doc.children.first - expect(element.name).to eq( "video" ) - expect(element['src']).to eq( "/path/video.mov" ) + UploaderHelper::VIDEO_EXT.each do |ext| + it "replaces the image tag 'path/video.#{ext}' with a video tag" do + element = filter(link_to_image("/path/video.#{ext}")).children.first + + expect(element.name).to eq 'video' + expect(element['src']).to eq "/path/video.#{ext}" + + fallback_link = element.children.first + expect(fallback_link.name).to eq 'a' + expect(fallback_link['href']).to eq "/path/video.#{ext}" + expect(fallback_link['target']).to eq '_blank' + end end end context 'when the element src is an image' do it 'leaves the document unchanged' do - doc = filter(image("/path/my_image.jpg")) - element = doc.children.first - expect(element.name).to eq( "img" ) + element = filter(link_to_image("/path/my_image.jpg")).children.first + + expect(element.name).to eq 'img' end end - end -- cgit v1.2.1 From 0465876197b58bee0223b5ca5cfd2da971ea60b9 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 00:52:16 +0800 Subject: Use default_branch rather than master, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13173871 --- app/models/ci/pipeline.rb | 2 +- app/models/project.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 7efa67466c1..3646baea88e 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -21,7 +21,7 @@ module Ci after_save :keep_around_commits # ref can't be HEAD or SHA, can only be branch/tag name - scope :latest_successful_for, ->(ref) do + scope :latest_successful_for, ->(ref = default_branch) do where(ref: ref).success.order(id: :desc) end diff --git a/app/models/project.rb b/app/models/project.rb index 29aaaf5117f..4ba3881d30e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -430,7 +430,7 @@ class Project < ActiveRecord::Base end # ref can't be HEAD, can only be branch/tag name or SHA - def latest_successful_builds_for(ref = 'master') + def latest_successful_builds_for(ref = default_branch) Ci::Build.joins(:pipeline). merge(pipelines.latest_successful_for(ref)). latest_successful_with_artifacts -- cgit v1.2.1 From 091142118ee9555544acf6d05f61fd109e400ff2 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 01:08:16 +0800 Subject: Now we could use normal relation, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13173842 --- app/models/project.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 4ba3881d30e..026fff0da0c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,8 +431,7 @@ class Project < ActiveRecord::Base # ref can't be HEAD, can only be branch/tag name or SHA def latest_successful_builds_for(ref = default_branch) - Ci::Build.joins(:pipeline). - merge(pipelines.latest_successful_for(ref)). + builds.where(pipeline: pipelines.latest_successful_for(ref)). latest_successful_with_artifacts end -- cgit v1.2.1 From 16a8160e9f1cc2874a39dfd2d6a6abea9bcfead5 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 19 Jul 2016 11:17:14 -0600 Subject: Fix help page paths to make sure shortcuts and the UI help page work. Add a test to make sure the help page UI path doesn't break in the future. Fix #19972 and #19889. --- config/routes.rb | 9 ++++----- lib/gitlab/gon_helper.rb | 2 +- spec/controllers/help_controller_spec.rb | 9 +++++++++ spec/routing/routing_spec.rb | 7 ++----- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index be651d8903f..2a9fe30b0e6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -89,11 +89,10 @@ Rails.application.routes.draw do mount Grack::AuthSpawner, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\/(info\/lfs|gitlab-lfs)/.match(request.path_info) }, via: [:get, :post, :put] # Help - - get 'help' => 'help#index' - get 'help/*path' => 'help#show', as: :help_page - get 'help/shortcuts' - get 'help/ui' => 'help#ui' + get 'help' => 'help#index' + get 'help/shortcuts' => 'help#shortcuts' + get 'help/ui' => 'help#ui' + get 'help/*path' => 'help#show', as: :help_page # # Global snippets diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index d4f12cb1df9..c5a11148d33 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -5,7 +5,7 @@ module Gitlab gon.default_avatar_url = URI::join(Gitlab.config.gitlab.url, ActionController::Base.helpers.image_path('no_avatar.png')).to_s gon.max_file_size = current_application_settings.max_attachment_size gon.relative_url_root = Gitlab.config.gitlab.relative_url_root - gon.shortcuts_path = help_shortcuts_path + gon.shortcuts_path = help_page_path('shortcuts') gon.user_color_scheme = Gitlab::ColorSchemes.for_user(current_user).css_class gon.award_menu_url = emojis_path diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb index 267d511c2db..347bef1e129 100644 --- a/spec/controllers/help_controller_spec.rb +++ b/spec/controllers/help_controller_spec.rb @@ -63,4 +63,13 @@ describe HelpController do end end end + + describe 'GET #ui' do + context 'for UI Development Kit' do + it 'renders found' do + get :ui + expect(response).to have_http_status(200) + end + end + end end diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 2c755919456..0a52c1ab933 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -116,12 +116,9 @@ describe HelpController, "routing" do expect(get(path)).to route_to('help#show', path: 'workflow/protected_branches/protected_branches1', format: 'png') - path = '/help/shortcuts' - expect(get(path)).to route_to('help#show', - path: 'shortcuts') + path = '/help/ui' - expect(get(path)).to route_to('help#show', - path: 'ui') + expect(get(path)).to route_to('help#ui') end end -- cgit v1.2.1 From 764924b6a96ad1079dfb0e78fa71f8a90efc3752 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 19 Jul 2016 10:28:48 -0700 Subject: upgrade rouge to 2.0.4 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4bb7a8d0604..ef35410d4ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -578,7 +578,7 @@ GEM railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (2.0.3) + rouge (2.0.4) rqrcode (0.7.0) chunky_png rqrcode-rails3 (0.1.7) -- cgit v1.2.1 From dc6afd575fdcceb51e44565e68f4db9bf3e19124 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 01:29:44 +0800 Subject: Just use default_branch, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13176885 --- spec/models/build_spec.rb | 8 ++++---- spec/requests/api/builds_spec.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index e4fdfdcf03e..d01a066f4f6 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -6,7 +6,7 @@ describe Ci::Build, models: true do let(:pipeline) do create(:ci_pipeline, project: project, sha: project.commit.id, - ref: 'fix', + ref: project.default_branch, status: 'success') end @@ -680,8 +680,8 @@ describe Ci::Build, models: true do end context 'with succeed pipeline' do - it 'returns builds for ref' do - builds = project.latest_successful_builds_for('fix') + it 'returns builds for ref for default_branch' do + builds = project.latest_successful_builds_for expect(builds).to contain_exactly(build) end @@ -700,7 +700,7 @@ describe Ci::Build, models: true do end it 'returns empty relation' do - builds = project.latest_successful_builds_for('fix') + builds = project.latest_successful_builds_for expect(builds).to be_kind_of(ActiveRecord::Relation) expect(builds).to be_empty diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index f28c027287f..2782d7e0490 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -192,8 +192,8 @@ describe API::API, api: true do let(:pipeline) do create(:ci_pipeline, project: project, - sha: project.commit('fix').sha, - ref: 'fix') + sha: project.commit.sha, + ref: project.default_branch) end let(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) } -- cgit v1.2.1 From cfd7c44513c1c04f170c6956eba9f76d2fd5c811 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 01:34:54 +0800 Subject: Move Project#latest_successful_builds_for to project_spec.rb Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13173313 --- spec/models/build_spec.rb | 34 ---------------------------------- spec/models/project_spec.rb | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index d01a066f4f6..95573f0a419 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -674,40 +674,6 @@ describe Ci::Build, models: true do end end - describe 'Project#latest_successful_builds_for' do - let!(:build) do - create(:ci_build, :artifacts, :success, pipeline: pipeline) - end - - context 'with succeed pipeline' do - it 'returns builds for ref for default_branch' do - builds = project.latest_successful_builds_for - - expect(builds).to contain_exactly(build) - end - - it 'returns empty relation if the build cannot be found' do - builds = project.latest_successful_builds_for('TAIL') - - expect(builds).to be_kind_of(ActiveRecord::Relation) - expect(builds).to be_empty - end - end - - context 'with pending pipeline' do - before do - pipeline.update(status: 'pending') - end - - it 'returns empty relation' do - builds = project.latest_successful_builds_for - - expect(builds).to be_kind_of(ActiveRecord::Relation) - expect(builds).to be_empty - end - end - end - describe '#manual?' do before do build.update(when: value) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 53b420d808f..b03fdebf8e7 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1114,6 +1114,49 @@ describe Project, models: true do end end + describe '#latest_successful_builds_for' do + let(:project) { create(:project) } + + let(:pipeline) do + create(:ci_pipeline, project: project, + sha: project.commit.id, + ref: project.default_branch, + status: 'success') + end + + let!(:build) do + create(:ci_build, :artifacts, :success, pipeline: pipeline) + end + + context 'with succeed pipeline' do + it 'returns builds for ref for default_branch' do + builds = project.latest_successful_builds_for + + expect(builds).to contain_exactly(build) + end + + it 'returns empty relation if the build cannot be found' do + builds = project.latest_successful_builds_for('TAIL') + + expect(builds).to be_kind_of(ActiveRecord::Relation) + expect(builds).to be_empty + end + end + + context 'with pending pipeline' do + before do + pipeline.update(status: 'pending') + end + + it 'returns empty relation' do + builds = project.latest_successful_builds_for + + expect(builds).to be_kind_of(ActiveRecord::Relation) + expect(builds).to be_empty + end + end + end + describe '.where_paths_in' do context 'without any paths' do it 'returns an empty relation' do -- cgit v1.2.1 From 5b124fc328e5981e36a60b7e0f0ab17c0ddd037b Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Tue, 19 Jul 2016 10:37:55 -0700 Subject: use 2.0.5, actually (2.0.4 was a bad release) --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ef35410d4ab..363904a4baa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -578,7 +578,7 @@ GEM railties (>= 4.2.0, < 5.1) rinku (2.0.0) rotp (2.1.2) - rouge (2.0.4) + rouge (2.0.5) rqrcode (0.7.0) chunky_png rqrcode-rails3 (0.1.7) -- cgit v1.2.1 From 719b0f11aaca424d4a5e4614008108af530ec1da Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 19 Jul 2016 19:24:59 +0200 Subject: Make minimal changes to specs --- spec/requests/api/builds_spec.rb | 73 ++++++++++------------------------------ 1 file changed, 17 insertions(+), 56 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 2782d7e0490..669fb1663e5 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -6,21 +6,16 @@ describe API::API, api: true do let(:user) { create(:user) } let(:api_user) { user } let(:user2) { create(:user) } - let(:project) { create(:project, creator_id: user.id) } - let(:developer) { create(:project_member, :developer, user: user, project: project) } - let(:reporter) { create(:project_member, :reporter, user: user2, project: project) } - let(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id) } - let(:build) { create(:ci_build, pipeline: pipeline) } + let!(:project) { create(:project, creator_id: user.id) } + let!(:developer) { create(:project_member, :developer, user: user, project: project) } + let!(:reporter) { create(:project_member, :reporter, user: user2, project: project) } + let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id, ref: project.default_branch) } + let!(:build) { create(:ci_build, pipeline: pipeline) } describe 'GET /projects/:id/builds ' do let(:query) { '' } - before do - developer - build - - get api("/projects/#{project.id}/builds?#{query}", api_user) - end + before { get api("/projects/#{project.id}/builds?#{query}", api_user) } context 'authorized user' do it 'should return project builds' do @@ -82,9 +77,9 @@ describe API::API, api: true do context 'when user is authorized' do context 'when pipeline has builds' do before do - developer - build + create(:ci_pipeline, project: project, sha: project.commit.id) create(:ci_build, pipeline: pipeline) + create(:ci_build) get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", api_user) end @@ -98,8 +93,6 @@ describe API::API, api: true do context 'when pipeline has no builds' do before do - developer - branch_head = project.commit('feature').id get api("/projects/#{project.id}/repository/commits/#{branch_head}/builds", api_user) end @@ -114,7 +107,8 @@ describe API::API, api: true do context 'when user is not authorized' do before do - build + create(:ci_pipeline, project: project, sha: project.commit.id) + create(:ci_build, pipeline: pipeline) get api("/projects/#{project.id}/repository/commits/#{project.commit.id}/builds", nil) end @@ -128,11 +122,7 @@ describe API::API, api: true do end describe 'GET /projects/:id/builds/:build_id' do - before do - developer - - get api("/projects/#{project.id}/builds/#{build.id}", api_user) - end + before { get api("/projects/#{project.id}/builds/#{build.id}", api_user) } context 'authorized user' do it 'should return specific build data' do @@ -151,11 +141,7 @@ describe API::API, api: true do end describe 'GET /projects/:id/builds/:build_id/artifacts' do - before do - developer - - get api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user) - end + before { get api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user) } context 'build with artifacts' do let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) } @@ -187,26 +173,15 @@ describe API::API, api: true do end describe 'GET /projects/:id/artifacts/:ref_name/download?job=name' do - let(:user) { create(:user) } - let(:project) { create(:project) } - let(:pipeline) do - create(:ci_pipeline, - project: project, - sha: project.commit.sha, - ref: project.default_branch) - end + let(:api_user) { user2 } # is a reporter of the project let(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) } - before do - project.team << [user, :developer] - end - def path_for_ref(ref = pipeline.ref, job = build.name) - api("/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}", user) + api("/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}", api_user) end context 'when unauthorized' do - let(:user) { nil } + let(:api_user) { nil } before do get path_for_ref @@ -334,12 +309,7 @@ describe API::API, api: true do end describe 'POST /projects/:id/builds/:build_id/cancel' do - before do - developer - reporter - - post api("/projects/#{project.id}/builds/#{build.id}/cancel", api_user) - end + before { post api("/projects/#{project.id}/builds/#{build.id}/cancel", api_user) } context 'authorized user' do context 'user with :update_build persmission' do @@ -370,12 +340,7 @@ describe API::API, api: true do describe 'POST /projects/:id/builds/:build_id/retry' do let(:build) { create(:ci_build, :canceled, pipeline: pipeline) } - before do - developer - reporter - - post api("/projects/#{project.id}/builds/#{build.id}/retry", api_user) - end + before { post api("/projects/#{project.id}/builds/#{build.id}/retry", api_user) } context 'authorized user' do context 'user with :update_build permission' do @@ -406,8 +371,6 @@ describe API::API, api: true do describe 'POST /projects/:id/builds/:build_id/erase' do before do - developer - post api("/projects/#{project.id}/builds/#{build.id}/erase", user) end @@ -438,8 +401,6 @@ describe API::API, api: true do describe 'POST /projects/:id/builds/:build_id/artifacts/keep' do before do - developer - post api("/projects/#{project.id}/builds/#{build.id}/artifacts/keep", user) end -- cgit v1.2.1 From 21096189a5712de4ae63818c5cdfaa751a7cbd3c Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Tue, 19 Jul 2016 11:11:52 -0700 Subject: Fix ci_status_helper_spec to look for new SVGs --- spec/helpers/ci_status_helper_spec.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/helpers/ci_status_helper_spec.rb b/spec/helpers/ci_status_helper_spec.rb index 45199d0f09d..637b02d9388 100644 --- a/spec/helpers/ci_status_helper_spec.rb +++ b/spec/helpers/ci_status_helper_spec.rb @@ -7,7 +7,13 @@ describe CiStatusHelper do let(:failed_commit) { double("Ci::Pipeline", status: 'failed') } describe 'ci_icon_for_status' do - it { expect(helper.ci_icon_for_status(success_commit.status)).to include('fa-check') } - it { expect(helper.ci_icon_for_status(failed_commit.status)).to include('fa-close') } + it 'renders to correct svg on success' do + expect(helper).to receive(:render).with('shared/icons/icon_status_success.svg', anything) + helper.ci_icon_for_status(success_commit.status) + end + it 'renders the correct svg on failure' do + expect(helper).to receive(:render).with('shared/icons/icon_status_failed.svg', anything) + helper.ci_icon_for_status(failed_commit.status) + end end end -- cgit v1.2.1 From 2a092da35c612fa34762bc955ab7c6cdb8df8316 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Tue, 19 Jul 2016 11:14:23 -0700 Subject: Fix alignment of icons on project page --- app/assets/stylesheets/pages/projects.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index ea9f7cf0540..1fb15d337c4 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -486,6 +486,11 @@ pre.light-well { > span { margin-left: 10px; } + + svg { + position: relative; + top: 2px; + } } } -- cgit v1.2.1 From 02f58dbd6f8d82fdbb728c2cac34a6fba466a14f Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 02:15:26 +0800 Subject: It's no longer needed --- spec/requests/api/builds_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 669fb1663e5..351eb6caf98 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -287,8 +287,6 @@ describe API::API, api: true do let(:build) { create(:ci_build, :trace, pipeline: pipeline) } before do - developer - get api("/projects/#{project.id}/builds/#{build.id}/trace", api_user) end -- cgit v1.2.1 From 766f9cf2202e7dbab758db4e03bc0e82500943eb Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 17:19:21 +0100 Subject: implements the basic filter functionality --- CHANGELOG | 1 + app/controllers/projects/branches_controller.rb | 3 +- app/finders/branches_finder.rb | 31 ++++++++++ app/helpers/branches_helper.rb | 11 ++++ app/models/repository.rb | 7 +++ app/views/projects/branches/index.html.haml | 21 ++++--- db/schema.rb | 2 +- spec/features/projects/branches_spec.rb | 32 +++++++++++ spec/finders/branches_finder_spec.rb | 75 +++++++++++++++++++++++++ 9 files changed, 172 insertions(+), 11 deletions(-) create mode 100644 app/finders/branches_finder.rb create mode 100644 spec/features/projects/branches_spec.rb create mode 100644 spec/finders/branches_finder_spec.rb diff --git a/CHANGELOG b/CHANGELOG index a5d26db7626..d56db8fff99 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ v 8.10.0 (unreleased) - Add the functionality to be able to rename a file. !5049 (tiagonbotelho) - Disable PostgreSQL statement timeout during migrations - Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho) + - User can now filter branches by name on /branches page. !5144 (tiagonbotelho) - Fix commit builds API, return all builds for all pipelines for given commit. !4849 - Replace Haml with Hamlit to make view rendering faster. !3666 - Refresh the branch cache after `git gc` runs diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index dd9508da049..6126acccaab 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -6,8 +6,7 @@ class Projects::BranchesController < Projects::ApplicationController before_action :authorize_push_code!, only: [:new, :create, :destroy] def index - @sort = params[:sort] || 'name' - @branches = @repository.branches_sorted_by(@sort) + @branches = BranchesFinder.new(@repository, params).execute @branches = Kaminari.paginate_array(@branches).page(params[:page]) @max_commits = @branches.reduce(0) do |memo, branch| diff --git a/app/finders/branches_finder.rb b/app/finders/branches_finder.rb new file mode 100644 index 00000000000..533076585c0 --- /dev/null +++ b/app/finders/branches_finder.rb @@ -0,0 +1,31 @@ +class BranchesFinder + def initialize(repository, params) + @repository = repository + @params = params + end + + def execute + branches = @repository.branches_sorted_by(sort) + filter_by_name(branches) + end + + private + + attr_reader :repository, :params + + def search + @params[:search].presence + end + + def sort + @params[:sort].presence || 'name' + end + + def filter_by_name(branches) + if search + branches.select { |branch| branch.name.include?(search) } + else + branches + end + end +end diff --git a/app/helpers/branches_helper.rb b/app/helpers/branches_helper.rb index bfd23aa4e04..3fc85dc6b2b 100644 --- a/app/helpers/branches_helper.rb +++ b/app/helpers/branches_helper.rb @@ -9,6 +9,17 @@ module BranchesHelper end end + def filter_branches_path(options = {}) + exist_opts = { + search: params[:search], + sort: params[:sort] + } + + options = exist_opts.merge(options) + + namespace_project_branches_path(@project.namespace, @project, @id, options) + end + def can_push_branch?(project, branch_name) return false unless project.repository.branch_exists?(branch_name) diff --git a/app/models/repository.rb b/app/models/repository.rb index 1a2ac90da51..bffcd501986 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -125,6 +125,11 @@ class Repository commits end + def find_similar_branches(search) + raw_repository.branches.select { |branch| branch.name.include?(search) } + + end + def find_branch(name) raw_repository.branches.find { |branch| branch.name == name } end @@ -606,6 +611,8 @@ class Repository # Remove archives older than 2 hours def branches_sorted_by(value) case value + when 'name' + branches.sort_by(&:name) when 'recently_updated' branches.sort do |a, b| commit(b.target).committed_date <=> commit(a.target).committed_date diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index 77b405f1f39..c43e19f4155 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -9,26 +9,31 @@ - if can? current_user, :push_code, @project .nav-controls - = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do - New branch + = form_tag(filter_branches_path, method: :get) do + = search_field_tag :search, params[:search], { placeholder: 'Filter by branch name', id: 'branch-search', class: 'form-control search-text-input input-short', spellcheck: false } .dropdown.inline %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'} %span.light - - if @sort.present? - = @sort.humanize + - if params[:sort].present? + = params[:sort].humanize - else Name %b.caret %ul.dropdown-menu.dropdown-menu-align-right %li - = link_to namespace_project_branches_path(sort: nil) do - Name - = link_to namespace_project_branches_path(sort: 'recently_updated') do + = link_to filter_branches_path(sort: nil) do + = sort_title_name + = link_to filter_branches_path(sort: 'recently_updated') do = sort_title_recently_updated - = link_to namespace_project_branches_path(sort: 'last_updated') do + = link_to filter_branches_path(sort: 'last_updated') do = sort_title_oldest_updated + + = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do + New branch - if @branches.any? %ul.content-list.all-branches - @branches.each do |branch| = render "projects/branches/branch", branch: branch = paginate @branches, theme: 'gitlab' + - else + .nothing-here-block No branches to show diff --git a/db/schema.rb b/db/schema.rb index 8882377f9f4..014ffc27dd9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -84,10 +84,10 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.string "health_check_access_token" t.boolean "send_user_confirmation_email", default: false t.integer "container_registry_token_expire_delay", default: 5 - t.boolean "user_default_external", default: false, null: false t.text "after_sign_up_text" t.string "repository_storage", default: "default" t.string "enabled_git_access_protocol" + t.boolean "user_default_external", default: false, null: false end create_table "audit_events", force: :cascade do |t| diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb new file mode 100644 index 00000000000..79abba21854 --- /dev/null +++ b/spec/features/projects/branches_spec.rb @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe 'Branches', feature: true do + let(:project) { create(:project) } + let(:repository) { project.repository } + + before do + login_as :user + project.team << [@user, :developer] + end + + describe 'Initial branches page' do + it 'shows all the branches' do + visit namespace_project_branches_path(project.namespace, project) + + repository.branches { |branch| expect(page).to have_content("#{branch.name}") } + expect(page).to have_content("Protected branches can be managed in project settings") + end + end + + describe 'Find branches' do + it 'shows filtered branches', js: true do + visit namespace_project_branches_path(project.namespace, project, project.id) + + fill_in 'branch-search', with: 'fix' + find('#branch-search').native.send_keys(:enter) + + expect(page).to have_content('fix') + expect(find('.all-branches')).to have_selector('li', count: 1) + end + end +end diff --git a/spec/finders/branches_finder_spec.rb b/spec/finders/branches_finder_spec.rb new file mode 100644 index 00000000000..e4281431280 --- /dev/null +++ b/spec/finders/branches_finder_spec.rb @@ -0,0 +1,75 @@ +require 'spec_helper' + +describe BranchesFinder do + let(:user) { create(:user) } + let(:project) { create(:project) } + let(:repository) { project.repository } + + describe '#execute' do + context 'sort only' do + it 'sorts by name' do + branches_finder = described_class.new(repository, {}) + + result = branches_finder.execute + + expect(result.first.name).to eq("'test'") + end + + it 'sorts by recently_updated' do + branches_finder = described_class.new(repository, { sort: 'recently_updated' }) + result = branches_finder.execute + + expect(result.first.name).to eq('expand-collapse-lines') + end + + it 'sorts by last_updated' do + branches_finder = described_class.new(repository, { sort: 'last_updated' }) + + result = branches_finder.execute + + expect(result.first.name).to eq('feature') + end + end + + context 'filter only' do + it 'filters branches by name' do + branches_finder = described_class.new(repository, { search: 'fix' }) + + result = branches_finder.execute + + expect(result.first.name).to eq('fix') + expect(result.count).to eq(1) + end + + it 'does not find any branch with that name' do + branches_finder = described_class.new(repository, { search: 'random' }) + + result = branches_finder.execute + + expect(result.count).to eq(0) + end + end + + context 'filter and sort' do + it 'filters branches by name and sorts by recently_updated' do + params = { sort: 'recently_updated', search: 'feature' } + branches_finder = described_class.new(repository, params) + + result = branches_finder.execute + + expect(result.first.name).to eq('feature_conflict') + expect(result.count).to eq(2) + end + + it 'filters branches by name and sorts by last_updated' do + params = { sort: 'last_updated', search: 'feature' } + branches_finder = described_class.new(repository, params) + + result = branches_finder.execute + + expect(result.first.name).to eq('feature') + expect(result.count).to eq(2) + end + end + end +end -- cgit v1.2.1 From 3ec01e576e52bf4ef6638701854ad8d1395bf285 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 7 Jul 2016 17:19:21 +0100 Subject: implements branches filter functionality and tests accordingly refactors find_similar_branches method to a one liner --- app/models/repository.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index bffcd501986..ed7c19eb181 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -127,7 +127,6 @@ class Repository def find_similar_branches(search) raw_repository.branches.select { |branch| branch.name.include?(search) } - end def find_branch(name) -- cgit v1.2.1 From 1c39395964862ba5cad29119e7b5b8f528678f0a Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 12 Jul 2016 19:00:43 +0100 Subject: refactors the search to enable users to filter and sort branches at the same time and writes tests accordingly changes schema.db removes duplicate field inside CHANGELOG fix db/schema --- CHANGELOG | 1 - app/models/repository.rb | 4 ---- app/views/projects/branches/index.html.haml | 1 - db/schema.rb | 2 +- spec/finders/branches_finder_spec.rb | 1 + 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d56db8fff99..a5d26db7626 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,7 +8,6 @@ v 8.10.0 (unreleased) - Add the functionality to be able to rename a file. !5049 (tiagonbotelho) - Disable PostgreSQL statement timeout during migrations - Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho) - - User can now filter branches by name on /branches page. !5144 (tiagonbotelho) - Fix commit builds API, return all builds for all pipelines for given commit. !4849 - Replace Haml with Hamlit to make view rendering faster. !3666 - Refresh the branch cache after `git gc` runs diff --git a/app/models/repository.rb b/app/models/repository.rb index ed7c19eb181..61f6d52dfd3 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -125,10 +125,6 @@ class Repository commits end - def find_similar_branches(search) - raw_repository.branches.select { |branch| branch.name.include?(search) } - end - def find_branch(name) raw_repository.branches.find { |branch| branch.name == name } end diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index c43e19f4155..6f806e3ce53 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -27,7 +27,6 @@ = sort_title_recently_updated = link_to filter_branches_path(sort: 'last_updated') do = sort_title_oldest_updated - = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do New branch - if @branches.any? diff --git a/db/schema.rb b/db/schema.rb index 014ffc27dd9..8882377f9f4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -84,10 +84,10 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.string "health_check_access_token" t.boolean "send_user_confirmation_email", default: false t.integer "container_registry_token_expire_delay", default: 5 + t.boolean "user_default_external", default: false, null: false t.text "after_sign_up_text" t.string "repository_storage", default: "default" t.string "enabled_git_access_protocol" - t.boolean "user_default_external", default: false, null: false end create_table "audit_events", force: :cascade do |t| diff --git a/spec/finders/branches_finder_spec.rb b/spec/finders/branches_finder_spec.rb index e4281431280..9c9763d746b 100644 --- a/spec/finders/branches_finder_spec.rb +++ b/spec/finders/branches_finder_spec.rb @@ -17,6 +17,7 @@ describe BranchesFinder do it 'sorts by recently_updated' do branches_finder = described_class.new(repository, { sort: 'recently_updated' }) + result = branches_finder.execute expect(result.first.name).to eq('expand-collapse-lines') -- cgit v1.2.1 From f668a785cd7174b32e8070fde9cbb503caa04f8e Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 29 Jun 2016 11:06:41 -0600 Subject: Starting work on the warn_on_failure feature for the MR build status. --- app/assets/javascripts/merge_request_widget.js.coffee | 6 ++++-- app/assets/stylesheets/pages/merge_requests.scss | 8 ++++++++ app/assets/stylesheets/pages/status.scss | 8 ++++++-- app/helpers/ci_status_helper.rb | 4 ++++ app/views/projects/merge_requests/widget/_heading.html.haml | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/merge_request_widget.js.coffee b/app/assets/javascripts/merge_request_widget.js.coffee index 779f536d9f0..31f5cb93a51 100644 --- a/app/assets/javascripts/merge_request_widget.js.coffee +++ b/app/assets/javascripts/merge_request_widget.js.coffee @@ -57,6 +57,8 @@ class @MergeRequestWidget ciLabelForStatus: (status) -> if status is 'success' 'passed' + else if status is 'success_with_warnings' + 'passed with warnings' else status @@ -116,7 +118,7 @@ class @MergeRequestWidget showCIStatus: (state) -> return if not state? $('.ci_widget').hide() - allowed_states = ["failed", "canceled", "running", "pending", "success", "skipped", "not_found"] + allowed_states = ["failed", "canceled", "running", "pending", "success", "success_with_warnings", "skipped", "not_found"] if state in allowed_states $('.ci_widget.ci-' + state).show() switch state @@ -124,7 +126,7 @@ class @MergeRequestWidget @setMergeButtonClass('btn-danger') when "running" @setMergeButtonClass('btn-warning') - when "success" + when "success", "success_with_warnings" @setMergeButtonClass('btn-create') else $('.ci_widget.ci-error').show() diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index fbff0c97355..909072db006 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -68,6 +68,14 @@ color: $gl-success; } + &.ci-success_with_warnings { + color: $gl-success; + + i { + color: $gl-warning; + } + } + &.ci-skipped { background-color: #eee; color: #888; diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index c6b053150be..098ae32c040 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -15,7 +15,8 @@ border-color: $gl-danger; } - &.ci-success { + &.ci-success, + &.ci-success_with_warnings { color: $gl-success; border-color: $gl-success; } @@ -49,9 +50,12 @@ .ci-status-icon-failed { color: $gl-danger; } - .ci-status-icon-pending { + + .ci-status-icon-pending, + .ci-status-icon-success_with_warning { color: $gl-warning; } + .ci-status-icon-running { color: $blue-normal; } diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index e6c99c9959e..c9217b846e7 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -17,6 +17,8 @@ module CiStatusHelper def ci_label_for_status(status) if status == 'success' 'passed' + elsif status == 'success_with_warnings' + 'passed with warnings' else status end @@ -27,6 +29,8 @@ module CiStatusHelper case status when 'success' 'check' + when 'success_with_warnings' + 'exclamation-triangle' when 'failed' 'close' when 'pending' diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml index 489c632ae22..6ef640bb654 100644 --- a/app/views/projects/merge_requests/widget/_heading.html.haml +++ b/app/views/projects/merge_requests/widget/_heading.html.haml @@ -1,6 +1,6 @@ - if @pipeline .mr-widget-heading - - %w[success skipped canceled failed running pending].each do |status| + - %w[success success_with_warnings skipped canceled failed running pending].each do |status| .ci_widget{ class: "ci-#{status}", style: ("display:none" unless @pipeline.status == status) } = ci_icon_for_status(status) %span -- cgit v1.2.1 From b306a52114bb155538dcee3b0eab815ac8d2655d Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 12 Jul 2016 11:05:48 -0600 Subject: Add with_warnings? method to Pipelines and add tests. --- CHANGELOG | 1 + .../projects/merge_requests_controller.rb | 2 ++ app/models/ci/pipeline.rb | 6 +++++ spec/models/ci/pipeline_spec.rb | 26 ++++++++++++++++++++++ 4 files changed, 35 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a5d26db7626..0b7a60324d7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -23,6 +23,7 @@ v 8.10.0 (unreleased) - Store when and yaml variables in builds table - Display last commit of deleted branch in push events !4699 (winniehell) - Escape file extension when parsing search results !5141 (winniehell) + - Add "passing with warnings" to the merge request pipeline possible statuses, this happens when builds that allow failures have failed. !5004 - Apply the trusted_proxies config to the rack request object for use with rack_attack - Upgrade to Rails 4.2.7. !5236 - Allow to pull code with deploy key from public projects diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index df659bb8c3b..1d99aeeb672 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -286,6 +286,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController status = pipeline.status coverage = pipeline.try(:coverage) + status = "success_with_warnings" if pipeline.success? && pipeline.with_warnings? + status ||= "preparing" else ci_service = @merge_request.source_project.ci_service diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index aca8607f4e8..e862978d7b4 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -146,6 +146,12 @@ module Ci end end + def with_warnings? + builds.latest.any? do |build| + build.failed? && build.allow_failure + end + end + def config_processor return nil unless ci_yaml_file return @config_processor if defined?(@config_processor) diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index c29e4811385..20520b0a111 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -502,4 +502,30 @@ describe Ci::Pipeline, models: true do end end end + + describe '#with_warnings?' do + subject { pipeline.with_warnings? } + + context 'build which is allowed to fail fails' do + before do + FactoryGirl.create :ci_build, :success, pipeline: pipeline, name: 'rspec' + FactoryGirl.create :ci_build, :allowed_to_fail, :failed, pipeline: pipeline, name: 'rubocop' + end + + it 'returns true' do + is_expected.to be_truthy + end + end + + context 'build which is allowed to fail succeeds' do + before do + FactoryGirl.create :ci_build, :success, pipeline: pipeline, name: 'rspec' + FactoryGirl.create :ci_build, :allowed_to_fail, :success, pipeline: pipeline, name: 'rubocop' + end + + it 'returns false' do + is_expected.to be_falsey + end + end + end end -- cgit v1.2.1 From b2a79554c339a583b6cc0d471b8224a24f11c96d Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Thu, 14 Jul 2016 08:58:05 -0600 Subject: Address feedback. --- .../projects/merge_requests_controller.rb | 2 +- app/models/ci/pipeline.rb | 6 ++---- spec/models/ci/pipeline_spec.rb | 24 ++++++++++++++++------ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 1d99aeeb672..7beeb7d97d0 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -286,7 +286,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController status = pipeline.status coverage = pipeline.try(:coverage) - status = "success_with_warnings" if pipeline.success? && pipeline.with_warnings? + status = "success_with_warnings" if pipeline.success? && pipeline.has_warnings? status ||= "preparing" else diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index e862978d7b4..90ed57e9aa0 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -146,10 +146,8 @@ module Ci end end - def with_warnings? - builds.latest.any? do |build| - build.failed? && build.allow_failure - end + def has_warnings? + builds.latest.ignored.any? end def config_processor diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 20520b0a111..56cc10fa083 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -503,13 +503,13 @@ describe Ci::Pipeline, models: true do end end - describe '#with_warnings?' do - subject { pipeline.with_warnings? } + describe '#has_warnings?' do + subject { pipeline.has_warnings? } context 'build which is allowed to fail fails' do before do - FactoryGirl.create :ci_build, :success, pipeline: pipeline, name: 'rspec' - FactoryGirl.create :ci_build, :allowed_to_fail, :failed, pipeline: pipeline, name: 'rubocop' + create :ci_build, :success, pipeline: pipeline, name: 'rspec' + create :ci_build, :allowed_to_fail, :failed, pipeline: pipeline, name: 'rubocop' end it 'returns true' do @@ -519,13 +519,25 @@ describe Ci::Pipeline, models: true do context 'build which is allowed to fail succeeds' do before do - FactoryGirl.create :ci_build, :success, pipeline: pipeline, name: 'rspec' - FactoryGirl.create :ci_build, :allowed_to_fail, :success, pipeline: pipeline, name: 'rubocop' + create :ci_build, :success, pipeline: pipeline, name: 'rspec' + create :ci_build, :allowed_to_fail, :success, pipeline: pipeline, name: 'rubocop' end it 'returns false' do is_expected.to be_falsey end end + + context 'build is retried and succeeds' do + before do + create :ci_build, :success, pipeline: pipeline, name: 'rubocop' + create :ci_build, :failed, pipeline: pipeline, name: 'rspec' + create :ci_build, :success, pipeline: pipeline, name: 'rspec' + end + + it 'returns false' do + is_expected.to be_falsey + end + end end end -- cgit v1.2.1 From 737e5226f87b06c2fe8633819bce1fde16308f19 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Fri, 15 Jul 2016 14:08:27 -0600 Subject: Use switch statements instead of if/else chains. --- app/assets/javascripts/merge_request_widget.js.coffee | 13 +++++++------ app/helpers/ci_status_helper.rb | 5 +++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/merge_request_widget.js.coffee b/app/assets/javascripts/merge_request_widget.js.coffee index 31f5cb93a51..963a0550c35 100644 --- a/app/assets/javascripts/merge_request_widget.js.coffee +++ b/app/assets/javascripts/merge_request_widget.js.coffee @@ -55,12 +55,13 @@ class @MergeRequestWidget $('.mr-state-widget').replaceWith(data) ciLabelForStatus: (status) -> - if status is 'success' - 'passed' - else if status is 'success_with_warnings' - 'passed with warnings' - else - status + switch status + when 'success' + 'passed' + when 'success_with_warnings' + 'passed with warnings' + else + status pollCIStatus: -> @fetchBuildStatusInterval = setInterval ( => diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index c9217b846e7..44b8b7f6ca1 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -15,9 +15,10 @@ module CiStatusHelper end def ci_label_for_status(status) - if status == 'success' + case status + when 'success' 'passed' - elsif status == 'success_with_warnings' + when 'success_with_warnings' 'passed with warnings' else status -- cgit v1.2.1 From 17bac49154a399d34e7b884551d2fb78dff3cea3 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 19 Jul 2016 13:19:04 -0600 Subject: Ensure Owners are included in the scope for authorized_projects Prior, when providing a `min_access_level` parameter to this method, we called `Gitlab::Access.values` instead of `all_values`, mistakenly omitting the `OWNER` level. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19878 --- app/models/user.rb | 2 +- spec/models/user_spec.rb | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 3d0a033785c..975e935fa20 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -854,7 +854,7 @@ class User < ActiveRecord::Base groups.joins(:shared_projects).select(:project_id)] if min_access_level - scope = { access_level: Gitlab::Access.values.select { |access| access >= min_access_level } } + scope = { access_level: Gitlab::Access.all_values.select { |access| access >= min_access_level } } relations = [relations.shift] + relations.map { |relation| relation.where(members: scope) } end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index fc74488ac0e..3bf82cf2668 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -887,16 +887,25 @@ describe User, models: true do end describe '#authorized_projects' do - let!(:user) { create(:user) } - let!(:private_project) { create(:project, :private) } + context 'with a minimum access level' do + it 'includes projects for which the user is an owner' do + user = create(:user) + project = create(:empty_project, :private, namespace: user.namespace) - before do - private_project.team << [user, Gitlab::Access::MASTER] - end + expect(user.authorized_projects(Gitlab::Access::REPORTER)) + .to contain_exactly(project) + end - subject { user.authorized_projects } + it 'includes projects for which the user is a master' do + user = create(:user) + project = create(:empty_project, :private) + + project.team << [user, Gitlab::Access::MASTER] - it { is_expected.to eq([private_project]) } + expect(user.authorized_projects(Gitlab::Access::REPORTER)) + .to contain_exactly(project) + end + end end describe '#ci_authorized_runners' do -- cgit v1.2.1 From 41b25e5a0d64d33d2d23aaaf3effa79a717f890e Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Tue, 19 Jul 2016 21:01:30 +0200 Subject: Limit git rev-list output count to one in forced push check --- CHANGELOG | 1 + lib/gitlab/checks/force_push.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a5d26db7626..d60d25d9ac4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' + - Limit git rev-list output count to one in forced push check v 8.10.0 (unreleased) - Fix profile activity heatmap to show correct day name (eanplatter) diff --git a/lib/gitlab/checks/force_push.rb b/lib/gitlab/checks/force_push.rb index dfa83a0eab3..5fe86553bd0 100644 --- a/lib/gitlab/checks/force_push.rb +++ b/lib/gitlab/checks/force_push.rb @@ -8,8 +8,8 @@ module Gitlab if Gitlab::Git.blank_ref?(oldrev) || Gitlab::Git.blank_ref?(newrev) false else - missed_refs, _ = Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --git-dir=#{project.repository.path_to_repo} rev-list #{oldrev} ^#{newrev})) - missed_refs.split("\n").size > 0 + missed_ref, _ = Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --git-dir=#{project.repository.path_to_repo} rev-list --max-count=1 #{oldrev} ^#{newrev})) + missed_ref.present? end end end -- cgit v1.2.1 From 22be5aed1d6db526bd945f9492b806c29969676d Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Tue, 19 Jul 2016 13:10:34 -0700 Subject: Change title to CI/CD Pipelines --- app/views/layouts/nav/_project_settings.html.haml | 4 ++-- app/views/projects/builds/settings.html.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 96725ff5e5a..1522fd2f9fb 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -40,6 +40,6 @@ %span Triggers = nav_link(controller: :builds) do - = link_to settings_namespace_project_builds_path(@project.namespace, @project), title: 'CI Pipeline' do + = link_to settings_namespace_project_builds_path(@project.namespace, @project), title: 'CI/CD Pipelines' do %span - CI Pipeline + CI/CD Pipelines diff --git a/app/views/projects/builds/settings.html.haml b/app/views/projects/builds/settings.html.haml index 0f330c587e9..820fb74fd51 100644 --- a/app/views/projects/builds/settings.html.haml +++ b/app/views/projects/builds/settings.html.haml @@ -1,4 +1,4 @@ -- page_title "CI Pipelines" +- page_title "CI/CD Pipelines" .row.prepend-top-default .col-lg-3.profile-settings-sidebar -- cgit v1.2.1 From 4a74798a7ba16fec37f634d0eaf52b838213e090 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 19 Jul 2016 23:26:13 +0200 Subject: Move Pipelines settings under `gitlab.com/gitlab-org/gitlab-ce/pipelines/settings` --- app/controllers/projects/builds_controller.rb | 7 +- app/controllers/projects/pipelines_controller.rb | 33 ++++++- app/controllers/projects/refs_controller.rb | 2 +- app/services/projects/update_service.rb | 1 + app/views/layouts/nav/_project_settings.html.haml | 4 +- app/views/projects/builds/settings.html.haml | 103 ---------------------- app/views/projects/pipelines/settings.html.haml | 103 ++++++++++++++++++++++ config/routes.rb | 6 +- spec/features/pipelines_spec.rb | 31 ++++++- spec/features/projects/badges/list_spec.rb | 2 +- 10 files changed, 175 insertions(+), 117 deletions(-) delete mode 100644 app/views/projects/builds/settings.html.haml create mode 100644 app/views/projects/pipelines/settings.html.haml diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index b03a37d8148..d7513d75f01 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -1,5 +1,5 @@ class Projects::BuildsController < Projects::ApplicationController - before_action :build, except: [:index, :cancel_all, :settings] + before_action :build, except: [:index, :cancel_all] before_action :authorize_read_build!, except: [:cancel, :cancel_all, :retry] before_action :authorize_update_build!, except: [:index, :show, :status, :raw] layout 'project' @@ -27,11 +27,6 @@ class Projects::BuildsController < Projects::ApplicationController redirect_to namespace_project_builds_path(project.namespace, project) end - def settings - @ref = params[:ref] || @project.default_branch || 'master' - @build_badge = Gitlab::Badge::Build.new(@project, @ref) - end - def show @builds = @project.pipelines.find_by_sha(@build.sha).builds.order('id DESC') @builds = @builds.where("id not in (?)", @build.id) diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 487963fdcd7..990adb15133 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -1,9 +1,10 @@ class Projects::PipelinesController < Projects::ApplicationController - before_action :pipeline, except: [:index, :new, :create] + before_action :pipeline, except: [:index, :new, :create, :settings, :update_settings] before_action :commit, only: [:show] before_action :authorize_read_pipeline! before_action :authorize_create_pipeline!, only: [:new, :create] before_action :authorize_update_pipeline!, only: [:retry, :cancel] + before_action :authorize_admin_pipeline!, only: [:settings, :update_settings] def index @scope = params[:scope] @@ -43,12 +44,42 @@ class Projects::PipelinesController < Projects::ApplicationController redirect_back_or_default default: namespace_project_pipelines_path(project.namespace, project) end + def settings + @ref = params[:ref] || @project.default_branch || 'master' + @build_badge = Gitlab::Badge::Build.new(@project, @ref) + end + + def update_settings + status = ::Projects::UpdateService.new(@project, current_user, pipelines_settings_params).execute + + respond_to do |format| + if status + flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." + format.html do + redirect_to( + settings_namespace_project_pipelines_path(@project.namespace, @project), + notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." + ) + end + else + format.html { render 'settings' } + end + end + end + private def create_params params.require(:pipeline).permit(:ref) end + def pipelines_settings_params + params.require(:project).permit( + :runners_token, :builds_enabled, :build_allow_git_fetch, :build_timeout_in_minutes, :build_coverage_regex, + :public_builds + ) + end + def pipeline @pipeline ||= project.pipelines.find_by!(id: params[:id]) end diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index 3b08573ca99..08d74634315 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -25,7 +25,7 @@ class Projects::RefsController < Projects::ApplicationController when "graphs_commits" commits_namespace_project_graph_path(@project.namespace, @project, @id) when "badges" - settings_namespace_project_builds_path(@project.namespace, @project, ref: @id) + settings_namespace_project_pipelines_path(@project.namespace, @project, ref: @id) else namespace_project_commits_path(@project.namespace, @project, @id) end diff --git a/app/services/projects/update_service.rb b/app/services/projects/update_service.rb index f06311511cc..47dbc214968 100644 --- a/app/services/projects/update_service.rb +++ b/app/services/projects/update_service.rb @@ -23,6 +23,7 @@ module Projects if project.previous_changes.include?('path') project.rename_repo end + true end end end diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 1522fd2f9fb..ca7b502eb5a 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -39,7 +39,7 @@ = link_to namespace_project_triggers_path(@project.namespace, @project), title: 'Triggers' do %span Triggers - = nav_link(controller: :builds) do - = link_to settings_namespace_project_builds_path(@project.namespace, @project), title: 'CI/CD Pipelines' do + = nav_link(controller: :pipelines) do + = link_to settings_namespace_project_pipelines_path(@project.namespace, @project), title: 'CI/CD Pipelines' do %span CI/CD Pipelines diff --git a/app/views/projects/builds/settings.html.haml b/app/views/projects/builds/settings.html.haml deleted file mode 100644 index 820fb74fd51..00000000000 --- a/app/views/projects/builds/settings.html.haml +++ /dev/null @@ -1,103 +0,0 @@ -- page_title "CI/CD Pipelines" - -.row.prepend-top-default - .col-lg-3.profile-settings-sidebar - %h4.prepend-top-0 - = page_title - .col-lg-9 - %h5.prepend-top-0 - Pipelines - = form_for [@project.namespace.becomes(Namespace), @project], remote: true, authenticity_token: true do |f| - %fieldset.builds-feature - - unless @repository.gitlab_ci_yml - .form-group - %p Pipelines need to be configured before you can begin using Continuous Integration. - = link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' - .form-group - %p Get recent application code using the following command: - .radio - = f.label :build_allow_git_fetch_false do - = f.radio_button :build_allow_git_fetch, 'false' - %strong git clone - %br - %span.descr Slower but makes sure you have a clean dir before every build - .radio - = f.label :build_allow_git_fetch_true do - = f.radio_button :build_allow_git_fetch, 'true' - %strong git fetch - %br - %span.descr Faster - - .form-group - = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light' - = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0' - %p.help-block per build in minutes - .form-group - = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' - .input-group - %span.input-group-addon / - = f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered' - %span.input-group-addon / - %p.help-block - We will use this regular expression to find test coverage output in build trace. - Leave blank if you want to disable this feature - .bs-callout.bs-callout-info - %p Below are examples of regex for existing tools: - %ul - %li - Simplecov (Ruby) - - %code \(\d+.\d+\%\) covered - %li - pytest-cov (Python) - - %code \d+\%\s*$ - %li - phpunit --coverage-text --colors=never (PHP) - - %code ^\s*Lines:\s*\d+.\d+\% - %li - gcovr (C/C++) - - %code ^TOTAL.*\s+(\d+\%)$ - %li - tap --coverage-report=text-summary (Node.js) - - %code ^Statements\s*:\s*([^%]+) - - .form-group - .checkbox - = f.label :public_builds do - = f.check_box :public_builds - %strong Public pipelines - .help-block Allow everyone to access pipelines for Public and Internal projects - - .form-group.append-bottom-default - = f.label :runners_token, "Runners token", class: 'label-light' - = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' - %p.help-block The secure token used to checkout project. - - = f.submit 'Save changes', class: "btn btn-save" - -%hr - -.row.prepend-top-default - .col-lg-3.profile-settings-sidebar - %h4.prepend-top-0 - Builds Badge - .col-lg-9 - .prepend-top-10 - .panel.panel-default - .panel-heading - %b Builds badge · - = @build_badge.to_html - .pull-right - = render 'shared/ref_switcher', destination: 'badges', align_right: true - .panel-body - .row - .col-md-2.text-center - Markdown - .col-md-10.code.js-syntax-highlight - = highlight('.md', @build_badge.to_markdown) - .row - %hr - .row - .col-md-2.text-center - HTML - .col-md-10.code.js-syntax-highlight - = highlight('.html', @build_badge.to_html) diff --git a/app/views/projects/pipelines/settings.html.haml b/app/views/projects/pipelines/settings.html.haml new file mode 100644 index 00000000000..8c90defc2be --- /dev/null +++ b/app/views/projects/pipelines/settings.html.haml @@ -0,0 +1,103 @@ +- page_title "CI/CD Pipelines" + +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + = page_title + .col-lg-9 + %h5.prepend-top-0 + Pipelines + = form_for @project, url: settings_namespace_project_pipelines_path(@project.namespace.becomes(Namespace), @project), remote: true, authenticity_token: true do |f| + %fieldset.builds-feature + - unless @repository.gitlab_ci_yml + .form-group + %p Pipelines need to be configured before you can begin using Continuous Integration. + = link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' + .form-group + %p Get recent application code using the following command: + .radio + = f.label :build_allow_git_fetch_false do + = f.radio_button :build_allow_git_fetch, 'false' + %strong git clone + %br + %span.descr Slower but makes sure you have a clean dir before every build + .radio + = f.label :build_allow_git_fetch_true do + = f.radio_button :build_allow_git_fetch, 'true' + %strong git fetch + %br + %span.descr Faster + + .form-group + = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light' + = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0' + %p.help-block per build in minutes + .form-group + = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' + .input-group + %span.input-group-addon / + = f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered' + %span.input-group-addon / + %p.help-block + We will use this regular expression to find test coverage output in build trace. + Leave blank if you want to disable this feature + .bs-callout.bs-callout-info + %p Below are examples of regex for existing tools: + %ul + %li + Simplecov (Ruby) - + %code \(\d+.\d+\%\) covered + %li + pytest-cov (Python) - + %code \d+\%\s*$ + %li + phpunit --coverage-text --colors=never (PHP) - + %code ^\s*Lines:\s*\d+.\d+\% + %li + gcovr (C/C++) - + %code ^TOTAL.*\s+(\d+\%)$ + %li + tap --coverage-report=text-summary (Node.js) - + %code ^Statements\s*:\s*([^%]+) + + .form-group + .checkbox + = f.label :public_builds do + = f.check_box :public_builds + %strong Public pipelines + .help-block Allow everyone to access pipelines for Public and Internal projects + + .form-group.append-bottom-default + = f.label :runners_token, "Runners token", class: 'label-light' + = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' + %p.help-block The secure token used to checkout project. + + = f.submit 'Save changes', class: "btn btn-save" + +%hr + +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + Builds Badge + .col-lg-9 + .prepend-top-10 + .panel.panel-default + .panel-heading + %b Builds badge · + = @build_badge.to_html + .pull-right + = render 'shared/ref_switcher', destination: 'badges', align_right: true + .panel-body + .row + .col-md-2.text-center + Markdown + .col-md-10.code.js-syntax-highlight + = highlight('.md', @build_badge.to_markdown) + .row + %hr + .row + .col-md-2.text-center + HTML + .col-md-10.code.js-syntax-highlight + = highlight('.html', @build_badge.to_html) diff --git a/config/routes.rb b/config/routes.rb index d09c021dac7..70cbc99d614 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -733,6 +733,11 @@ Rails.application.routes.draw do resources :triggers, only: [:index, :create, :destroy] resources :pipelines, only: [:index, :new, :create, :show] do + collection do + get :settings + patch :settings, to: 'pipelines#update_settings' + end + member do post :cancel post :retry @@ -744,7 +749,6 @@ Rails.application.routes.draw do resources :builds, only: [:index, :show], constraints: { id: /\d+/ } do collection do post :cancel_all - get :settings end member do diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb index e7ee0aaea3c..01fa6394217 100644 --- a/spec/features/pipelines_spec.rb +++ b/spec/features/pipelines_spec.rb @@ -1,14 +1,15 @@ require 'spec_helper' -describe "Pipelines" do +feature "Pipelines", feature: true do include GitlabRoutingHelper let(:project) { create(:empty_project) } let(:user) { create(:user) } + let(:role) { :developer } before do login_as(user) - project.team << [user, :developer] + project.team << [user, role] end describe 'GET /:project/pipelines' do @@ -186,4 +187,30 @@ describe "Pipelines" do it { expect(page).to have_content('Reference not found') } end end + + describe 'Pipelines settings' do + background do + visit settings_namespace_project_pipelines_path(project.namespace, project) + end + + context 'for developer' do + given(:role) { :developer } + + scenario 'to be disallowed to view' do + expect(page.status_code).to eq(404) + end + end + + context 'for master' do + given(:role) { :master } + + scenario 'be allowed to change' do + fill_in('Test coverage parsing', with: 'coverage_regex') + click_on 'Save changes' + + expect(page.status_code).to eq(200) + expect(page).to have_field('Test coverage parsing', with: 'coverage_regex') + end + end + end end diff --git a/spec/features/projects/badges/list_spec.rb b/spec/features/projects/badges/list_spec.rb index e5e900b5202..d29fb265f91 100644 --- a/spec/features/projects/badges/list_spec.rb +++ b/spec/features/projects/badges/list_spec.rb @@ -6,7 +6,7 @@ feature 'list of badges' do project = create(:project) project.team << [user, :master] login_as(user) - visit settings_namespace_project_builds_path(project.namespace, project) + visit settings_namespace_project_pipelines_path(project.namespace, project) end scenario 'user displays list of badges' do -- cgit v1.2.1 From 1a057d2b4013feb151e77aa71dd0b5a83412d2d6 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Tue, 19 Jul 2016 17:08:40 -0500 Subject: Reorder allowed params for `ApplicationSetting` and add more details to docs. --- app/controllers/admin/application_settings_controller.rb | 6 +++--- doc/api/settings.md | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index c5b44ff8c44..9e1dc15de84 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -85,6 +85,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :default_snippet_visibility, :default_group_visibility, :domain_whitelist_raw, + :domain_blacklist_enabled, + :domain_blacklist_raw, + :domain_blacklist_file, :version_check_enabled, :admin_notification_email, :user_oauth_applications, @@ -113,9 +116,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :container_registry_token_expire_delay, :repository_storage, :enabled_git_access_protocol, - :domain_blacklist_enabled, - :domain_blacklist_raw, - :domain_blacklist_file, restricted_visibility_levels: [], import_sources: [], disabled_oauth_sign_in_sources: [] diff --git a/doc/api/settings.md b/doc/api/settings.md index c925fa1861e..ea39b32561c 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -34,6 +34,8 @@ Example response: "home_page_url" : null, "default_snippet_visibility" : 0, "domain_whitelist" : [], + "domain_blacklist_enabled" : false, + "domain_blacklist" : [], "created_at" : "2016-01-04T15:44:55.176Z", "default_project_visibility" : 0, "gravatar_enabled" : true, @@ -64,6 +66,8 @@ PUT /application/settings | `default_project_visibility` | integer | no | What visibility level new projects receive. Can take `0` _(Private)_, `1` _(Internal)_ and `2` _(Public)_ as a parameter. Default is `0`.| | `default_snippet_visibility` | integer | no | What visibility level new snippets receive. Can take `0` _(Private)_, `1` _(Internal)_ and `2` _(Public)_ as a parameter. Default is `0`.| | `domain_whitelist` | array of strings | no | Force people to use only corporate emails for sign-up. Default is null, meaning there is no restriction. | +| `domain_blacklist_enabled` | boolean | no | Enable/disable the `domain_blacklist` | +| `domain_blacklist` | array of strings | yes (if `domain_whitelist_enabled` is `true` | People trying to sign-up with emails from this domain will not be allowed to do so. | | `user_oauth_applications` | boolean | no | Allow users to register any application to use GitLab as an OAuth provider | | `after_sign_out_path` | string | no | Where to redirect users after logout | | `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes | @@ -94,6 +98,8 @@ Example response: "default_project_visibility": 1, "default_snippet_visibility": 0, "domain_whitelist": [], + "domain_blacklist_enabled" : false, + "domain_blacklist" : [], "user_oauth_applications": true, "after_sign_out_path": "", "container_registry_token_expire_delay": 5, -- cgit v1.2.1 From e6cbd626845ee3436fdcf36b087fd1de894804a0 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 00:08:54 +0200 Subject: Update all exposed variables to CI builds --- app/models/ci/build.rb | 23 +++-- doc/ci/variables/README.md | 17 ++-- spec/models/build_spec.rb | 181 ++++++++++++++++++++++++------------ spec/requests/ci/api/builds_spec.rb | 10 +- 4 files changed, 152 insertions(+), 79 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index cc4809b3abe..6115ffd87c2 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -451,7 +451,7 @@ module Ci variables << { key: 'CI', value: 'true', public: true } variables << { key: 'GITLAB_CI', value: 'true', public: true } - variables << { key: 'CI_BUILD_ID', value: id, public: true } + variables << { key: 'CI_BUILD_ID', value: id.to_s, public: true } variables << { key: 'CI_BUILD_TOKEN', value: token, public: false } variables << { key: 'CI_BUILD_REF', value: sha, public: true } variables << { key: 'CI_BUILD_BEFORE_SHA', value: before_sha, public: true } @@ -461,21 +461,32 @@ module Ci variables << { key: 'CI_BUILD_STAGE', value: stage, public: true } variables << { key: 'CI_BUILD_TRIGGERED', value: 'true', public: true } if trigger_request - variables << { key: 'CI_PIPELINE_ID', value: pipeline.id, public: true } + variables << { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true } - variables << { key: 'CI_PROJECT_ID', value: project_id, public: true } + variables << { key: 'CI_PROJECT_ID', value: project.id.to_s, public: true } variables << { key: 'CI_PROJECT_NAME', value: project.path, public: true } variables << { key: 'CI_PROJECT_PATH', value: project.path_with_namespace, public: true } variables << { key: 'CI_PROJECT_NAMESPACE', value: project.namespace.path, public: true } variables << { key: 'CI_PROJECT_URL', value: project.web_url, public: true } - variables << { key: 'CI_REGISTRY', value: Gitlab.config.registry.host_port, public: true } if Gitlab.config.registry.enabled - variables << { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_repository_url, public: true } if project.container_registry_repository_url + if Gitlab.config.registry.enabled + variables << { key: 'CI_REGISTRY', value: Gitlab.config.registry.host_port, public: true } + + if project.container_registry_enabled? + variables << { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_repository_url, public: true } + end + end variables << { key: 'CI_SERVER_NAME', value: 'GitLab', public: true } variables << { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true } variables << { key: 'CI_SERVER_REVISION', value: Gitlab::REVISION, public: true } - variables << { key: 'CI_SERVER_URL', value: Gitlab::REVISION, public: true } + + if runner + variables << { key: 'CI_RUNNER_ID', value: runner.id.to_s, public: true } + variables << { key: 'CI_RUNNER_DESCRIPTION', value: runner.description, public: true } + variables << { key: 'CI_RUNNER_TAGS', value: runner.tag_list.to_s, public: true } + end + variables end diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index 3683470b54c..6fb164e950b 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -35,15 +35,18 @@ The `API_TOKEN` will take the Secure Variable value: `SECURE`. | **CI_BUILD_REPO** | all | all | The URL to clone the Git repository | | **CI_BUILD_TRIGGERED** | all | 0.5 | The flag to indicate that build was [triggered] | | **CI_BUILD_TOKEN** | all | 1.2 | Token used for authenticating with the GitLab Container Registry | -| **CI_PIPELINE_ID** | 8.9 | 0.5 | The unique id of the current pipeline that GitLab CI uses internally | +| **CI_PIPELINE_ID** | 8.10 | 0.5 | The unique id of the current pipeline that GitLab CI uses internally | | **CI_PROJECT_ID** | all | all | The unique id of the current project that GitLab CI uses internally | -| **CI_PROJECT_NAME** | 8.9 | 0.5 | The project name that is currently build | -| **CI_PROJECT_NAMESPACE**| 8.9 | 0.5 | The project namespace that is currently build | -| **CI_PROJECT_PATH** | 8.9 | 0.5 | The namespace with project name | -| **CI_PROJECT_URL** | 8.9 | 0.5 | The HTTP address to access project | +| **CI_PROJECT_NAME** | 8.10 | 0.5 | The project name that is currently build | +| **CI_PROJECT_NAMESPACE**| 8.10 | 0.5 | The project namespace that is currently build | +| **CI_PROJECT_PATH** | 8.10 | 0.5 | The namespace with project name | +| **CI_PROJECT_URL** | 8.10 | 0.5 | The HTTP address to access project | | **CI_PROJECT_DIR** | all | all | The full path where the repository is cloned and where the build is ran | -| **CI_REGISTRY** | 8.9 | 0.5 | If the Container Registry is enabled it returns address of GitLab's Container Registry | -| **CI_REGISTRY_IMAGE** | 8.9 | 0.5 | If the Container Registry is for project it returns the address of registry tied to specific project | +| **CI_REGISTRY** | 8.10 | 0.5 | If the Container Registry is enabled it returns address of GitLab's Container Registry | +| **CI_REGISTRY_IMAGE** | 8.10 | 0.5 | If the Container Registry is for project it returns the address of registry tied to specific project | +| **CI_RUNNER_ID** | 8.10 | 0.5 | The unique id of the used runner | +| **CI_RUNNER_DESCRIPTION** | 8.10 | 0.5 | The description of runners as saved in GitLab | +| **CI_RUNNER_TAGS** | 8.10 | 0.5 | The defined runner tags | **Some of the variables are only available when using runner with at least defined version.** diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 06d984c7a40..796f39c1aa3 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -191,79 +191,87 @@ describe Ci::Build, models: true do end describe '#variables' do + let(:container_registry_enabled) { false } let(:predefined_variables) do [ - { key: :CI_BUILD_NAME, value: 'test', public: true }, - { key: :CI_BUILD_STAGE, value: 'test', public: true }, + { key: 'CI', value: 'true', public: true }, + { key: 'GITLAB_CI', value: 'true', public: true }, + { key: 'CI_BUILD_ID', value: build.id.to_s, public: true }, + { key: 'CI_BUILD_TOKEN', value: build.token, public: false }, + { key: 'CI_BUILD_REF', value: build.sha, public: true }, + { key: 'CI_BUILD_BEFORE_SHA', value: build.before_sha, public: true }, + { key: 'CI_BUILD_REF_NAME', value: 'master', public: true }, + { key: 'CI_BUILD_NAME', value: 'test', public: true }, + { key: 'CI_BUILD_STAGE', value: 'test', public: true }, + { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true }, + { key: 'CI_PROJECT_ID', value: project.id.to_s, public: true }, + { key: 'CI_PROJECT_NAME', value: project.path, public: true }, + { key: 'CI_PROJECT_PATH', value: project.path_with_namespace, public: true }, + { key: 'CI_PROJECT_NAMESPACE', value: project.namespace.path, public: true }, + { key: 'CI_PROJECT_URL', value: project.web_url, public: true }, + { key: 'CI_SERVER_NAME', value: 'GitLab', public: true }, + { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true }, + { key: 'CI_SERVER_REVISION', value: Gitlab::REVISION, public: true } ] end + before do + stub_container_registry_config(enabled: container_registry_enabled, host_port: 'registry.example.com') + end + subject { build.variables } context 'returns variables' do - let(:yaml_variables) do - [ - { key: :DB_NAME, value: 'postgres', public: true } - ] - end - before do - build.yaml_variables = yaml_variables + build.yaml_variables = [] end - it { is_expected.to eq(predefined_variables + yaml_variables) } - - context 'for tag' do - let(:tag_variable) do - [ - { key: :CI_BUILD_TAG, value: 'master', public: true } - ] - end + it { is_expected.to eq(predefined_variables) } + end - before do - build.update_attributes(tag: true) - end + context 'when build is for tag' do + let(:tag_variable) do + { key: 'CI_BUILD_TAG', value: 'master', public: true } + end - it { is_expected.to eq(tag_variable + predefined_variables + yaml_variables) } + before do + build.update_attributes(tag: true) end - context 'and secure variables' do - let(:secure_variables) do - [ - { key: 'SECRET_KEY', value: 'secret_value', public: false } - ] - end + it { is_expected.to include(tag_variable) } + end - before do - build.project.variables << Ci::Variable.new(key: 'SECRET_KEY', value: 'secret_value') - end + context 'when secure variable is defined' do + let(:secure_variable) do + { key: 'SECRET_KEY', value: 'secret_value', public: false } + end - it { is_expected.to eq(predefined_variables + yaml_variables + secure_variables) } + before do + build.project.variables << Ci::Variable.new(key: 'SECRET_KEY', value: 'secret_value') + end - context 'and trigger variables' do - let(:trigger) { create(:ci_trigger, project: project) } - let(:trigger_request) { create(:ci_trigger_request_with_variables, pipeline: pipeline, trigger: trigger) } - let(:trigger_variables) do - [ - { key: :TRIGGER_KEY, value: 'TRIGGER_VALUE', public: false } - ] - end - let(:predefined_trigger_variable) do - [ - { key: :CI_BUILD_TRIGGERED, value: 'true', public: true } - ] - end + it { is_expected.to include(secure_variable) } + end - before do - build.trigger_request = trigger_request - end + context 'when build is for triggers' do + let(:trigger) { create(:ci_trigger, project: project) } + let(:trigger_request) { create(:ci_trigger_request_with_variables, pipeline: pipeline, trigger: trigger) } + let(:user_trigger_variable) do + { key: :TRIGGER_KEY, value: 'TRIGGER_VALUE', public: false } + end + let(:predefined_trigger_variable) do + { key: 'CI_BUILD_TRIGGERED', value: 'true', public: true } + end - it { is_expected.to eq(predefined_variables + predefined_trigger_variable + yaml_variables + secure_variables + trigger_variables) } - end + before do + build.trigger_request = trigger_request end + + it { is_expected.to include(user_trigger_variable) } + it { is_expected.to include(predefined_trigger_variable) } end - context 'when yaml_variables is undefined' do + context 'when yaml_variables are undefined' do before do build.yaml_variables = nil end @@ -282,10 +290,10 @@ describe Ci::Build, models: true do context 'if config does not have a questioned job' do let(:config) do YAML.dump({ - test_other: { - script: 'Hello World' - } - }) + test_other: { + script: 'Hello World' + } + }) end it { is_expected.to eq(predefined_variables) } @@ -294,13 +302,13 @@ describe Ci::Build, models: true do context 'if config has variables' do let(:config) do YAML.dump({ - test: { - script: 'Hello World', - variables: { - KEY: 'value' - } - } - }) + test: { + script: 'Hello World', + variables: { + KEY: 'value' + } + } + }) end let(:variables) do [{ key: :KEY, value: 'value', public: true }] @@ -310,6 +318,57 @@ describe Ci::Build, models: true do end end end + + context 'when container registry is enabled' do + let(:container_registry_enabled) { true } + let(:ci_registry) do + { key: 'CI_REGISTRY', value: 'registry.example.com', public: true} + end + let(:ci_registry_image) do + { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_repository_url, public: true} + end + + context 'and is disabled for project' do + before do + project.update(container_registry_enabled: false) + end + + it { is_expected.to include(ci_registry) } + it { is_expected.not_to include(ci_registry_image) } + end + + context 'and is enabled for project' do + before do + project.update(container_registry_enabled: true) + end + + it { is_expected.to include(ci_registry) } + it { is_expected.to include(ci_registry_image) } + end + end + + context 'when runner is assigned to build' do + let(:runner) { create(:ci_runner, description: 'description', tag_list: ['docker', 'linux']) } + + before do + build.update(runner: runner) + end + + it { is_expected.to include({ key: 'CI_RUNNER_ID', value: runner.id.to_s, public: true }) } + it { is_expected.to include({ key: 'CI_RUNNER_DESCRIPTION', value: 'description', public: true }) } + it { is_expected.to include({ key: 'CI_RUNNER_TAGS', value: 'docker, linux', public: true }) } + end + + context 'returns variables in valid order' do + before do + allow(build).to receive(:predefined_variables) { ['predefined'] } + allow(build).to receive(:yaml_variables) { ['yaml variables'] } + allow(build).to receive(:project_variables) { ['secure variables'] } + allow(build).to receive(:trigger_variables) { ['trigger variables'] } + end + + it { is_expected.to eq(['predefined', 'yaml variables', 'secure variables', 'trigger variables']) } + end end describe '#has_tags?' do diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb index e7cbc3dd3a7..1c7c60ec644 100644 --- a/spec/requests/ci/api/builds_spec.rb +++ b/spec/requests/ci/api/builds_spec.rb @@ -73,12 +73,12 @@ describe Ci::API::API do post ci_api("/builds/register"), token: runner.token, info: { platform: :darwin } expect(response).to have_http_status(201) - expect(json_response["variables"]).to eq([ + expect(json_response["variables"]).to include( { "key" => "CI_BUILD_NAME", "value" => "spinach", "public" => true }, { "key" => "CI_BUILD_STAGE", "value" => "test", "public" => true }, { "key" => "DB_NAME", "value" => "postgres", "public" => true }, { "key" => "SECRET_KEY", "value" => "secret_value", "public" => false } - ]) + ) end it "returns variables for triggers" do @@ -92,14 +92,14 @@ describe Ci::API::API do post ci_api("/builds/register"), token: runner.token, info: { platform: :darwin } expect(response).to have_http_status(201) - expect(json_response["variables"]).to eq([ + expect(json_response["variables"]).to include( { "key" => "CI_BUILD_NAME", "value" => "spinach", "public" => true }, { "key" => "CI_BUILD_STAGE", "value" => "test", "public" => true }, { "key" => "CI_BUILD_TRIGGERED", "value" => "true", "public" => true }, { "key" => "DB_NAME", "value" => "postgres", "public" => true }, { "key" => "SECRET_KEY", "value" => "secret_value", "public" => false }, - { "key" => "TRIGGER_KEY", "value" => "TRIGGER_VALUE", "public" => false }, - ]) + { "key" => "TRIGGER_KEY", "value" => "TRIGGER_VALUE", "public" => false } + ) end it "returns dependent builds" do -- cgit v1.2.1 From 3c3e50f9cb5283cafc461ba9f7dd450b0f72fdb7 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 00:17:19 +0200 Subject: Update documentation --- CHANGELOG | 1 + doc/ci/variables/README.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 0dc7e5b114f..4614cb4197a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -26,6 +26,7 @@ v 8.10.0 (unreleased) - Escape file extension when parsing search results !5141 (winniehell) - Apply the trusted_proxies config to the rack request object for use with rack_attack - Upgrade to Rails 4.2.7. !5236 + - Extend exposed environment variables for CI builds - Allow to pull code with deploy key from public projects - Add Sidekiq queue duration to transaction metrics. - Add a new column `artifacts_size` to table `ci_builds` !4964 diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index 6fb164e950b..420a3c831fa 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -71,6 +71,9 @@ export CI_PROJECT_PATH="gitlab-org/gitlab-ce" export CI_PROJECT_URL="https://gitlab.com/gitlab-org/gitlab-ce.git" export CI_REGISTRY="registry.gitlab.com" export CI_REGISTRY_IMAGE="registry.gitlab.com/gitlab-org/gitlab-ce" +export CI_RUNNER_ID="10" +export CI_RUNNER_DESCRIPTION="my runner" +export CI_RUNNER_TAGS="docker, linux" export CI_SERVER="yes" export CI_SERVER_NAME="GitLab" export CI_SERVER_REVISION="8.9.0" -- cgit v1.2.1 From a7cb1263f146843971f8d44422a3450030b01590 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 00:25:29 +0200 Subject: Fix updating settings for pipelines --- app/controllers/projects/pipelines_controller.rb | 22 ++++++++-------------- app/services/projects/update_service.rb | 1 - 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 990adb15133..55b68b89d0d 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -50,20 +50,14 @@ class Projects::PipelinesController < Projects::ApplicationController end def update_settings - status = ::Projects::UpdateService.new(@project, current_user, pipelines_settings_params).execute - - respond_to do |format| - if status - flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." - format.html do - redirect_to( - settings_namespace_project_pipelines_path(@project.namespace, @project), - notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." - ) - end - else - format.html { render 'settings' } - end + if @project.update_attributes(pipelines_settings_params) + flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." + redirect_to( + settings_namespace_project_pipelines_path(@project.namespace, @project), + notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." + ) + else + render 'settings' end end diff --git a/app/services/projects/update_service.rb b/app/services/projects/update_service.rb index 47dbc214968..f06311511cc 100644 --- a/app/services/projects/update_service.rb +++ b/app/services/projects/update_service.rb @@ -23,7 +23,6 @@ module Projects if project.previous_changes.include?('path') project.rename_repo end - true end end end -- cgit v1.2.1 From 8bd520d70e035cd67d19b7962911ae9c31d1ff3d Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Wed, 6 Jul 2016 17:52:00 -0300 Subject: Allow slack service to send messages on different channels --- CHANGELOG | 1 + app/controllers/admin/services_controller.rb | 7 ++- app/controllers/projects/services_controller.rb | 7 ++- app/helpers/services_helper.rb | 25 ++++++++ app/models/project_services/slack_service.rb | 48 ++++++++++++--- app/views/admin/services/_form.html.haml | 5 +- app/views/projects/services/_form.html.haml | 6 +- .../services/slack/_service_settings.html.haml | 34 +++++++++++ features/steps/admin/settings.rb | 16 ++--- spec/models/project_services/slack_service_spec.rb | 71 ++++++++++++++++++++++ 10 files changed, 199 insertions(+), 21 deletions(-) create mode 100644 app/helpers/services_helper.rb create mode 100644 app/views/projects/services/slack/_service_settings.html.haml diff --git a/CHANGELOG b/CHANGELOG index d60d25d9ac4..53553d25165 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -101,6 +101,7 @@ v 8.10.0 (unreleased) - Don't render discussion notes when requesting diff tab through AJAX - Add basic system information like memory and disk usage to the admin panel - Don't garbage collect commits that have related DB records like comments + - Allow to setup event by channel on slack service - More descriptive message for git hooks and file locks - Aliases of award emoji should be stored as original name. !5060 (dixpac) - Handle custom Git hook result in GitLab UI diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 46133588332..40938986a92 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -39,11 +39,14 @@ class Admin::ServicesController < Admin::ApplicationController end def application_services_params + dynamic_params = [] + dynamic_params.concat(@service.event_channel_names) if @service.is_a?(SlackService) + application_services_params = params.permit(:id, - service: Projects::ServicesController::ALLOWED_PARAMS) + service: Projects::ServicesController::ALLOWED_PARAMS + dynamic_params) if application_services_params[:service].is_a?(Hash) Projects::ServicesController::FILTER_BLANK_PARAMS.each do |param| - application_services_params[:service].delete(param) if application_services_params[:service][param].blank? + application_services_params[:service].delete(param) if application_services_params[:service][param].blank? end end application_services_params diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index 1b91882048e..80553e035f0 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -66,10 +66,15 @@ class Projects::ServicesController < Projects::ApplicationController end def service_params - service_params = params.require(:service).permit(ALLOWED_PARAMS) + dynamic_params = [] + dynamic_params.concat(@service.event_channel_names) if @service.is_a?(SlackService) + + service_params = params.require(:service).permit(ALLOWED_PARAMS + dynamic_params) + FILTER_BLANK_PARAMS.each do |param| service_params.delete(param) if service_params[param].blank? end + service_params end end diff --git a/app/helpers/services_helper.rb b/app/helpers/services_helper.rb new file mode 100644 index 00000000000..98753ab2c93 --- /dev/null +++ b/app/helpers/services_helper.rb @@ -0,0 +1,25 @@ +module ServicesHelper + def service_event_description(event) + case event + when "push" + "Webhook will triggered by a push to the repository" + when "tag_push" + "Webhook will be triggered when a new tag is pushed to the repository" + when "note" + "Webhook will be triggered when someone adds a comment" + when "issue" + "Webhook will be triggered when an issue is created/updated/merged" + when "merge_request" + "Webhook will be triggered when a merge request is created/updated/merged" + when "build" + "Webhook will be triggered when a build status changes" + when "wiki_page" + "Webhook will be triggered when a wiki page is created/updated" + end + end + + def service_event_field_name(event) + event = event.pluralize if %w(merge_request issue).include?(event) + "#{event}_events" + end +end diff --git a/app/models/project_services/slack_service.rb b/app/models/project_services/slack_service.rb index cf9e4d5a8b6..a1f146ac05a 100644 --- a/app/models/project_services/slack_service.rb +++ b/app/models/project_services/slack_service.rb @@ -4,6 +4,9 @@ class SlackService < Service validates :webhook, presence: true, url: true, if: :activated? def initialize_properties + # Custom serialized properties initialization + self.supported_events.each { |event| self.class.prop_accessor event_channel_name(event) } + if properties.nil? self.properties = {} self.notify_only_broken_builds = true @@ -29,13 +32,15 @@ class SlackService < Service end def fields - [ - { type: 'text', name: 'webhook', - placeholder: 'https://hooks.slack.com/services/...' }, - { type: 'text', name: 'username', placeholder: 'username' }, - { type: 'text', name: 'channel', placeholder: '#channel' }, - { type: 'checkbox', name: 'notify_only_broken_builds' }, - ] + default_fields = + [ + { type: 'text', name: 'webhook', placeholder: 'https://hooks.slack.com/services/...' }, + { type: 'text', name: 'username', placeholder: 'username' }, + { type: 'text', name: 'channel', placeholder: "#General" }, + { type: 'checkbox', name: 'notify_only_broken_builds' }, + ] + + default_fields + build_event_channels end def supported_events @@ -74,7 +79,10 @@ class SlackService < Service end opt = {} - opt[:channel] = channel if channel + + event_channel = get_channel_field(object_kind) || channel + + opt[:channel] = event_channel if event_channel opt[:username] = username if username if message @@ -83,8 +91,32 @@ class SlackService < Service end end + def event_channel_names + supported_events.map { |event| event_channel_name(event) } + end + private + def get_channel_field(event) + field_name = event_channel_name(event) + self.send(field_name) + end + + def build_event_channels + channels = [] + + supported_events.each do |event| + channel_name = event_channel_name(event) + channels << { type: 'text', name: channel_name, placeholder: "#General" } + end + + channels + end + + def event_channel_name(event) + "#{event}_channel" + end + def project_name project.name_with_namespace.gsub(/\s/, '') end diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index cdbfc60f9a4..c6f8fc61a04 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -4,7 +4,10 @@ %p #{@service.description} template = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |form| - = render 'shared/service_settings', form: form + - if @service.is_a?(SlackService) + = render 'projects/services/slack/service_settings', form: form + - else + = render 'shared/service_settings', form: form .form-actions = form.submit 'Save', class: 'btn btn-save' diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 166dc4a01fc..abad7954db5 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -7,7 +7,11 @@ %p= @service.description .col-lg-9 = form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |form| - = render 'shared/service_settings', form: form + - if @service.is_a?(SlackService) + = render 'projects/services/slack/service_settings', form: form + - else + = render 'shared/service_settings', form: form + = form.submit 'Save changes', class: 'btn btn-save'   - if @service.valid? && @service.activated? diff --git a/app/views/projects/services/slack/_service_settings.html.haml b/app/views/projects/services/slack/_service_settings.html.haml new file mode 100644 index 00000000000..12f4c2e45b9 --- /dev/null +++ b/app/views/projects/services/slack/_service_settings.html.haml @@ -0,0 +1,34 @@ += form_errors(@service) + +- if @service.help.present? + .well + = preserve do + = markdown @service.help + +.form-group + = form.label :active, "Active", class: "control-label" + .col-sm-10 + = form.check_box :active + +.form-group + = form.label :url, "Trigger", class: 'control-label' + + .col-sm-10 + - @service.supported_events.each do |event| + %div + = form.check_box service_event_field_name(event), class: 'pull-left' + .prepend-left-20 + = form.label service_event_field_name(event), class: 'list-label' do + %strong + = event.humanize + + %p + - field = @service.fields.select{ |field| field[:name] == "#{event}_channel"}.first + = form.text_field field[:name], class: "form-control", placeholder: field[:placeholder] + + %p.light + = service_event_description(event) + +- @service.fields.each do |field| + - if %w(webhook username notify_only_broken_builds).include?(field[:name]) + = render 'shared/field', form: form, field: field diff --git a/features/steps/admin/settings.rb b/features/steps/admin/settings.rb index 037f7494a77..03f87df7a60 100644 --- a/features/steps/admin/settings.rb +++ b/features/steps/admin/settings.rb @@ -27,19 +27,19 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps step 'I check all events and submit form' do page.check('Active') - page.check('Push events') - page.check('Tag push events') - page.check('Comments') - page.check('Issues events') - page.check('Merge Request events') - page.check('Build events') + page.check('Push') + page.check('Tag push') + page.check('Note') + page.check('Issue') + page.check('Merge request') + page.check('Build') click_on 'Save' end step 'I fill out Slack settings' do fill_in 'Webhook', with: 'http://localhost' fill_in 'Username', with: 'test_user' - fill_in 'Channel', with: '#test_channel' + fill_in 'service_push_channel', with: '#test_channel' page.check('Notify only broken builds') end @@ -56,6 +56,6 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps step 'I should see Slack settings saved' do expect(find_field('Webhook').value).to eq 'http://localhost' expect(find_field('Username').value).to eq 'test_user' - expect(find_field('Channel').value).to eq '#test_channel' + expect(find('#service_push_channel').value).to eq '#test_channel' end end diff --git a/spec/models/project_services/slack_service_spec.rb b/spec/models/project_services/slack_service_spec.rb index 155f3e74e0d..1beb7c63b0b 100644 --- a/spec/models/project_services/slack_service_spec.rb +++ b/spec/models/project_services/slack_service_spec.rb @@ -124,6 +124,7 @@ describe SlackService, models: true do and_return( double(:slack_service).as_null_object ) + slack.execute(push_sample_data) end @@ -136,6 +137,76 @@ describe SlackService, models: true do ) slack.execute(push_sample_data) end + + context "event channels" do + it "should user the right channel for push event" do + slack.update_attributes(push_channel: "random") + + expect(Slack::Notifier).to receive(:new). + with(webhook_url, channel: "random"). + and_return( + double(:slack_service).as_null_object + ) + + slack.execute(push_sample_data) + end + + it "should use the right channel for merge request event" do + slack.update_attributes(merge_request_channel: "random") + + expect(Slack::Notifier).to receive(:new). + with(webhook_url, channel: "random"). + and_return( + double(:slack_service).as_null_object + ) + + slack.execute(@merge_sample_data) + end + + it "should use the right channel for issue event" do + slack.update_attributes(issue_channel: "random") + + expect(Slack::Notifier).to receive(:new). + with(webhook_url, channel: "random"). + and_return( + double(:slack_service).as_null_object + ) + + slack.execute(@issues_sample_data) + end + + it "should use the right channel for wiki event" do + slack.update_attributes(wiki_page_channel: "random") + + expect(Slack::Notifier).to receive(:new). + with(webhook_url, channel: "random"). + and_return( + double(:slack_service).as_null_object + ) + + slack.execute(@wiki_page_sample_data) + end + + context "note event" do + let(:issue_note) do + create(:note_on_issue, project: project, note: "issue note") + end + + it "should use the right channel" do + slack.update_attributes(note_channel: "random") + + note_data = Gitlab::NoteDataBuilder.build(issue_note, user) + + expect(Slack::Notifier).to receive(:new). + with(webhook_url, channel: "random"). + and_return( + double(:slack_service).as_null_object + ) + + slack.execute(note_data) + end + end + end end describe "Note events" do -- cgit v1.2.1 From ede048b930b2ceb89013793d878524eb20248d1f Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Tue, 12 Jul 2016 17:00:49 -0300 Subject: Add project service documentation and update integration documentation --- app/controllers/admin/services_controller.rb | 16 ++--------- app/controllers/concerns/service_params.rb | 35 +++++++++++++++++++++++ app/controllers/projects/services_controller.rb | 17 +---------- app/helpers/services_helper.rb | 4 +-- app/models/project_services/slack_service.rb | 15 ++++------ app/models/service.rb | 4 +++ doc/integration/slack.md | 5 ++-- doc/project_services/img/slack_configuration.png | Bin 0 -> 67350 bytes doc/project_services/project_services.md | 2 +- doc/project_services/slack.md | 26 +++++++++++++++++ 10 files changed, 78 insertions(+), 46 deletions(-) create mode 100644 app/controllers/concerns/service_params.rb create mode 100644 doc/project_services/img/slack_configuration.png create mode 100644 doc/project_services/slack.md diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 40938986a92..9d6287f3b61 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -1,4 +1,6 @@ class Admin::ServicesController < Admin::ApplicationController + include ServiceParams + before_action :service, only: [:edit, :update] def index @@ -37,18 +39,4 @@ class Admin::ServicesController < Admin::ApplicationController def service @service ||= Service.where(id: params[:id], template: true).first end - - def application_services_params - dynamic_params = [] - dynamic_params.concat(@service.event_channel_names) if @service.is_a?(SlackService) - - application_services_params = params.permit(:id, - service: Projects::ServicesController::ALLOWED_PARAMS + dynamic_params) - if application_services_params[:service].is_a?(Hash) - Projects::ServicesController::FILTER_BLANK_PARAMS.each do |param| - application_services_params[:service].delete(param) if application_services_params[:service][param].blank? - end - end - application_services_params - end end diff --git a/app/controllers/concerns/service_params.rb b/app/controllers/concerns/service_params.rb new file mode 100644 index 00000000000..a1c5cd28a27 --- /dev/null +++ b/app/controllers/concerns/service_params.rb @@ -0,0 +1,35 @@ +module ServiceParams + extend ActiveSupport::Concern + + ALLOWED_PARAMS = [:title, :token, :type, :active, :api_key, :api_url, :api_version, :subdomain, + :room, :recipients, :project_url, :webhook, + :user_key, :device, :priority, :sound, :bamboo_url, :username, :password, + :build_key, :server, :teamcity_url, :drone_url, :build_type, + :description, :issues_url, :new_issue_url, :restrict_to_branch, :channel, + :colorize_messages, :channels, + :push_events, :issues_events, :merge_requests_events, :tag_push_events, + :note_events, :build_events, :wiki_page_events, + :notify_only_broken_builds, :add_pusher, + :send_from_committer_email, :disable_diffs, :external_wiki_url, + :notify, :color, + :server_host, :server_port, :default_irc_uri, :enable_ssl_verification, + :jira_issue_transition_id] + + # Parameters to ignore if no value is specified + FILTER_BLANK_PARAMS = [:password] + + def application_services_params + dynamic_params = [] + dynamic_params.concat(@service.event_channel_names) + + application_services_params = params.permit(:id, service: ALLOWED_PARAMS + dynamic_params) + + if application_services_params[:service].is_a?(Hash) + FILTER_BLANK_PARAMS.each do |param| + application_services_params[:service].delete(param) if application_services_params[:service][param].blank? + end + end + + application_services_params + end +end diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index 80553e035f0..b0b66a9f599 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -1,20 +1,5 @@ class Projects::ServicesController < Projects::ApplicationController - ALLOWED_PARAMS = [:title, :token, :type, :active, :api_key, :api_url, :api_version, :subdomain, - :room, :recipients, :project_url, :webhook, - :user_key, :device, :priority, :sound, :bamboo_url, :username, :password, - :build_key, :server, :teamcity_url, :drone_url, :build_type, - :description, :issues_url, :new_issue_url, :restrict_to_branch, :channel, - :colorize_messages, :channels, - :push_events, :issues_events, :merge_requests_events, :tag_push_events, - :note_events, :build_events, :wiki_page_events, - :notify_only_broken_builds, :add_pusher, - :send_from_committer_email, :disable_diffs, :external_wiki_url, - :notify, :color, - :server_host, :server_port, :default_irc_uri, :enable_ssl_verification, - :jira_issue_transition_id] - - # Parameters to ignore if no value is specified - FILTER_BLANK_PARAMS = [:password] + include ServiceParams # Authorize before_action :authorize_admin_project! diff --git a/app/helpers/services_helper.rb b/app/helpers/services_helper.rb index 98753ab2c93..5d0f6e67c0c 100644 --- a/app/helpers/services_helper.rb +++ b/app/helpers/services_helper.rb @@ -2,7 +2,7 @@ module ServicesHelper def service_event_description(event) case event when "push" - "Webhook will triggered by a push to the repository" + "Webhook will be triggered by a push to the repository" when "tag_push" "Webhook will be triggered when a new tag is pushed to the repository" when "note" @@ -19,7 +19,7 @@ module ServicesHelper end def service_event_field_name(event) - event = event.pluralize if %w(merge_request issue).include?(event) + event = event.pluralize if %w[merge_request issue].include?(event) "#{event}_events" end end diff --git a/app/models/project_services/slack_service.rb b/app/models/project_services/slack_service.rb index a1f146ac05a..647188cc2ab 100644 --- a/app/models/project_services/slack_service.rb +++ b/app/models/project_services/slack_service.rb @@ -5,7 +5,7 @@ class SlackService < Service def initialize_properties # Custom serialized properties initialization - self.supported_events.each { |event| self.class.prop_accessor event_channel_name(event) } + self.supported_events.each { |event| self.class.prop_accessor(event_channel_name(event)) } if properties.nil? self.properties = {} @@ -36,7 +36,7 @@ class SlackService < Service [ { type: 'text', name: 'webhook', placeholder: 'https://hooks.slack.com/services/...' }, { type: 'text', name: 'username', placeholder: 'username' }, - { type: 'text', name: 'channel', placeholder: "#General" }, + { type: 'text', name: 'channel', placeholder: "#general" }, { type: 'checkbox', name: 'notify_only_broken_builds' }, ] @@ -99,18 +99,13 @@ class SlackService < Service def get_channel_field(event) field_name = event_channel_name(event) - self.send(field_name) + self.public_send(field_name) end def build_event_channels - channels = [] - - supported_events.each do |event| - channel_name = event_channel_name(event) - channels << { type: 'text', name: channel_name, placeholder: "#General" } + supported_events.reduce([]) do |channels, event| + channels << { type: 'text', name: event_channel_name(event), placeholder: "#general" } end - - channels end def event_channel_name(event) diff --git a/app/models/service.rb b/app/models/service.rb index 5432f8c7ab4..5e80b5e65d7 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -80,6 +80,10 @@ class Service < ActiveRecord::Base Gitlab::PushDataBuilder.build_sample(project, user) end + def event_channel_names + [] + end + def supported_events %w(push tag_push issue merge_request wiki_page) end diff --git a/doc/integration/slack.md b/doc/integration/slack.md index f6ba80f46d5..8dc6c4a24bb 100644 --- a/doc/integration/slack.md +++ b/doc/integration/slack.md @@ -26,14 +26,13 @@ After Slack is ready we need to setup GitLab. Here are the steps to achieve this 1. Navigate to Settings -> Services -> Slack -1. Pick the triggers you want to activate +1. Pick the triggers you want to activate and respective channel(#general by default). 1. Fill in your Slack details - Webhook: Paste the Webhook URL from the step above - Username: Fill this in if you want to change the username of the bot - - Channel: Fill this in if you want to change the channel where the messages will be posted - Mark it as active - + 1. Save your settings Have fun :) diff --git a/doc/project_services/img/slack_configuration.png b/doc/project_services/img/slack_configuration.png new file mode 100644 index 00000000000..0cc672c47c9 Binary files /dev/null and b/doc/project_services/img/slack_configuration.png differ diff --git a/doc/project_services/project_services.md b/doc/project_services/project_services.md index e15d5db3253..4442b7c1742 100644 --- a/doc/project_services/project_services.md +++ b/doc/project_services/project_services.md @@ -45,7 +45,7 @@ further configuration instructions and details. Contributions are welcome. | PivotalTracker | Project Management Software (Source Commits Endpoint) | | Pushover | Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop | | [Redmine](redmine.md) | Redmine issue tracker | -| Slack | A team communication tool for the 21st century | +| [Slack](slack.md) | A team communication tool for the 21st century | ## Services Templates diff --git a/doc/project_services/slack.md b/doc/project_services/slack.md new file mode 100644 index 00000000000..1503d9cd983 --- /dev/null +++ b/doc/project_services/slack.md @@ -0,0 +1,26 @@ +# Slack Service + +Go to your project's **Settings > Services > Slack** and you will see a checkbox with the following events that can be triggered: + +* Push +* Issue +* Merge request +* Note +* Tag push +* Build +* Wiki page + +Bellow each of these event checkboxes you will have a input to insert which Slack channel do you want to send that event message, +#general channel is default. + + +![Slack configuration](img/slack_configuration.png) + + +| Field | Description | +| ----- | ----------- | +| `Webhook` | The incoming webhook url which you have to setup on slack. (https://my.slack.com/services/new/incoming-webhook/) | +| `Username` | Optional username which can be on messages sent to slack. | +| `notify only broken builds` | Notify only about broken builds, when build events are marked to be sent.| + + -- cgit v1.2.1 From 38577d6825e36cb144db5d505834cad0b00d27f7 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Tue, 19 Jul 2016 22:24:27 -0600 Subject: Fix the Sentry spam from CSP violations by disabling it. --- config/initializers/secure_headers.rb | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 9fd24a667cc..253e3cf7410 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -4,14 +4,7 @@ require 'gitlab/current_settings' include Gitlab::CurrentSettings -# If Sentry is enabled and the Rails app is running in production mode, -# this will construct the Report URI for Sentry. -if Rails.env.production? && current_application_settings.sentry_enabled - uri = URI.parse(current_application_settings.sentry_dsn) - CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}" -else - CSP_REPORT_URI = '' -end +CSP_REPORT_URI = '' # Content Security Policy Headers # For more information on CSP see: @@ -71,10 +64,7 @@ SecureHeaders::Configuration.default do |config| upgrade_insecure_requests: true } - # Reports are sent to Sentry if it's enabled. - if current_application_settings.sentry_enabled - config.csp[:report_uri] = %W(#{CSP_REPORT_URI}) - end + config.csp[:report_uri] = %W(#{CSP_REPORT_URI}) # Allow Bootstrap Linter in development mode. if Rails.env.development? -- cgit v1.2.1 From cf4c9b494e915fa0530edb67c624192617e9d473 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Wed, 20 Jul 2016 08:35:29 +0200 Subject: Use YAML inheritance to DRY the .gitlab-ci.yml --- .gitlab-ci.yml | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0bd3df4c9e8..aea4b03c455 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,11 +63,14 @@ update-knapsack: # Execute all testing suites -.rspec-knapsack: &rspec-knapsack - stage: test +.use-db: &use-db services: - mysql:latest - redis:alpine + +.rspec-knapsack: &rspec-knapsack + stage: test + <<: *use-db script: - bundle exec rake assets:precompile 2>/dev/null - JOB_NAME=( $CI_BUILD_NAME ) @@ -83,9 +86,7 @@ update-knapsack: .spinach-knapsack: &spinach-knapsack stage: test - services: - - mysql:latest - - redis:alpine + <<: *use-db script: - bundle exec rake assets:precompile 2>/dev/null - JOB_NAME=( $CI_BUILD_NAME ) @@ -134,9 +135,7 @@ spinach 9 10: *spinach-knapsack # Execute all testing suites against Ruby 2.3 .ruby-23: &ruby-23 image: "ruby:2.3" - services: - - mysql:latest - - redis:alpine + <<: *use-db only: - master cache: @@ -187,11 +186,14 @@ spinach 9 10 ruby23: *spinach-knapsack-ruby23 # Other generic tests -.exec: &exec +.static-analyses-variables: &static-analyses-variables variables: SIMPLECOV: "false" USE_DB: "false" USE_BUNDLE_INSTALL: "true" + +.exec: &exec + <<: *static-analyses-variables stage: test script: - bundle exec $CI_BUILD_NAME @@ -205,26 +207,19 @@ license_finder: *exec rake db:migrate:reset: stage: test - services: - - mysql:latest - - redis:alpine + <<: *use-db script: - rake db:migrate:reset teaspoon: stage: test - services: - - mysql:latest - - redis:alpine + <<: *use-db script: - teaspoon bundler:audit: stage: test - variables: - SIMPLECOV: "false" - USE_DB: "false" - USE_BUNDLE_INSTALL: "true" + <<: *static-analyses-variables only: - master script: -- cgit v1.2.1 From 839aec1a61b5b8003e27091a871c8988fbf8892c Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Wed, 20 Jul 2016 08:55:44 +0200 Subject: Replace parse_boolean with to_boolean --- lib/api/commit_statuses.rb | 2 +- lib/api/helpers.rb | 6 +----- lib/api/merge_requests.rb | 2 +- lib/api/projects.rb | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index acb4812b5cf..4df6ca8333e 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -24,7 +24,7 @@ module API pipelines = user_project.pipelines.where(sha: params[:sha]) statuses = ::CommitStatus.where(pipeline: pipelines) - statuses = statuses.latest unless parse_boolean(params[:all]) + statuses = statuses.latest unless to_boolean(params[:all]) statuses = statuses.where(ref: params[:ref]) if params[:ref].present? statuses = statuses.where(stage: params[:stage]) if params[:stage].present? statuses = statuses.where(name: params[:name]) if params[:name].present? diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index d6e4eb2afd7..130509cdad6 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -5,10 +5,6 @@ module API SUDO_HEADER = "HTTP_SUDO" SUDO_PARAM = :sudo - def parse_boolean(value) - [ true, 1, '1', 't', 'T', 'true', 'TRUE', 'on', 'ON' ].include?(value) - end - def to_boolean(value) return true if value =~ /^(true|t|yes|y|1|on)$/i return false if value =~ /^(false|f|no|n|0|off)$/i @@ -297,7 +293,7 @@ module API def filter_projects(projects) # If the archived parameter is passed, limit results accordingly if params[:archived].present? - projects = projects.where(archived: parse_boolean(params[:archived])) + projects = projects.where(archived: to_boolean(params[:archived])) end if params[:search].present? diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index 4fcdf8968c9..2b685621da9 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -242,7 +242,7 @@ module API should_remove_source_branch: params[:should_remove_source_branch] } - if parse_boolean(params[:merge_when_build_succeeds]) && merge_request.pipeline && merge_request.pipeline.active? + if to_boolean(params[:merge_when_build_succeeds]) && merge_request.pipeline && merge_request.pipeline.active? ::MergeRequests::MergeWhenBuildSucceedsService.new(merge_request.target_project, current_user, merge_params). execute(merge_request) else diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 6d2a6f3946c..8fed7db8803 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -8,7 +8,7 @@ module API def map_public_to_visibility_level(attrs) publik = attrs.delete(:public) if publik.present? && !attrs[:visibility_level].present? - publik = parse_boolean(publik) + publik = to_boolean(publik) # Since setting the public attribute to private could mean either # private or internal, use the more conservative option, private. attrs[:visibility_level] = (publik == true) ? Gitlab::VisibilityLevel::PUBLIC : Gitlab::VisibilityLevel::PRIVATE -- cgit v1.2.1 From eb122e40a2ba8d1fe79d746deb4c7c803f8164a0 Mon Sep 17 00:00:00 2001 From: Paco Guzman Date: Wed, 20 Jul 2016 09:31:56 +0200 Subject: Expire tags/branches repo cache before delete a repository --- app/models/repository.rb | 5 +++++ spec/models/repository_spec.rb | 48 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/app/models/repository.rb b/app/models/repository.rb index 1a2ac90da51..511df2d67c6 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -392,6 +392,11 @@ class Repository expire_cache if exists? + # expire cache that don't depend on repository data (when expiring) + expire_tags_cache + expire_tag_count_cache + expire_branches_cache + expire_branch_count_cache expire_root_ref_cache expire_emptiness_caches expire_exists_cache diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 110df6bbd22..59c5732c075 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -749,6 +749,30 @@ describe Repository, models: true do repository.before_delete end + it 'flushes the tags cache' do + expect(repository).to receive(:expire_tags_cache) + + repository.before_delete + end + + it 'flushes the tag count cache' do + expect(repository).to receive(:expire_tag_count_cache) + + repository.before_delete + end + + it 'flushes the branches cache' do + expect(repository).to receive(:expire_branches_cache) + + repository.before_delete + end + + it 'flushes the branch count cache' do + expect(repository).to receive(:expire_branch_count_cache) + + repository.before_delete + end + it 'flushes the root ref cache' do expect(repository).to receive(:expire_root_ref_cache) @@ -779,6 +803,30 @@ describe Repository, models: true do repository.before_delete end + it 'flushes the tags cache' do + expect(repository).to receive(:expire_tags_cache) + + repository.before_delete + end + + it 'flushes the tag count cache' do + expect(repository).to receive(:expire_tag_count_cache) + + repository.before_delete + end + + it 'flushes the branches cache' do + expect(repository).to receive(:expire_branches_cache) + + repository.before_delete + end + + it 'flushes the branch count cache' do + expect(repository).to receive(:expire_branch_count_cache) + + repository.before_delete + end + it 'flushes the root ref cache' do expect(repository).to receive(:expire_root_ref_cache) -- cgit v1.2.1 From b0f7384f95e94961b6ed91ef0fdddbbe28d77e6e Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 16:25:28 +0800 Subject: Create the pipelines/builds in mixed order, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13176921 Also we give undesired builds another artifacts so that we could tell if returned artifacts was we actual expected. --- spec/requests/api/builds_spec.rb | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 351eb6caf98..e19c7a98799 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -213,6 +213,10 @@ describe API::API, api: true do end context 'find proper build' do + let(:another_artifacts) do + fixture_file_upload(Rails.root + 'spec/fixtures/dk.png', 'image/gif') + end + def verify download_headers = { 'Content-Transfer-Encoding' => 'binary', @@ -223,11 +227,6 @@ describe API::API, api: true do expect(response.headers).to include(download_headers) end - def create_new_pipeline(status) - new_pipeline = create(:ci_pipeline, status: 'success') - create(:ci_build, status, :artifacts, pipeline: new_pipeline) - end - context 'with regular branch' do before do pipeline.update(ref: 'master', @@ -256,8 +255,13 @@ describe API::API, api: true do context 'with latest pipeline' do before do - 3.times do # creating some old pipelines - create_new_pipeline(:success) + pipelines = 3.times.map do # creating some old pipelines + create(:ci_pipeline, status: 'success') + end + + pipelines.reverse_each do |pipe| + new_build = create(:ci_build, :success, pipeline: pipe) + new_build.update(artifacts_file: another_artifacts) end end @@ -271,7 +275,10 @@ describe API::API, api: true do context 'with success pipeline' do before do build # make sure pipeline was old, but still the latest success one - create_new_pipeline(:pending) + new_pipeline = create(:ci_pipeline, status: 'success') + new_build = create(:ci_build, :pending, + pipeline: new_pipeline) + new_build.update(artifacts_file: another_artifacts) end before do -- cgit v1.2.1 From cf2e09a16f7906ee1a2d206d02c224026b80b69d Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 10:29:11 +0200 Subject: Make rubocop happy --- spec/models/build_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 796f39c1aa3..bff46d8cbab 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -322,10 +322,10 @@ describe Ci::Build, models: true do context 'when container registry is enabled' do let(:container_registry_enabled) { true } let(:ci_registry) do - { key: 'CI_REGISTRY', value: 'registry.example.com', public: true} + { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } end let(:ci_registry_image) do - { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_repository_url, public: true} + { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_repository_url, public: true } end context 'and is disabled for project' do -- cgit v1.2.1 From 709e805d65ef15081341e12dce6acf356893459b Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 16:33:04 +0800 Subject: That means different things but it's ok here. rubocop was complaining --- spec/requests/api/builds_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index e19c7a98799..871309827c0 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -255,7 +255,7 @@ describe API::API, api: true do context 'with latest pipeline' do before do - pipelines = 3.times.map do # creating some old pipelines + pipelines = Array.new(3).map do # creating some old pipelines create(:ci_pipeline, status: 'success') end -- cgit v1.2.1 From cf78c35701dc282a99894566a67b42b235dfc151 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 17:30:34 +0800 Subject: Use shared_example rather than methods, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13173653 --- spec/requests/api/builds_spec.rb | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 871309827c0..06ebe4a8dd3 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -217,14 +217,15 @@ describe API::API, api: true do fixture_file_upload(Rails.root + 'spec/fixtures/dk.png', 'image/gif') end - def verify - download_headers = - { 'Content-Transfer-Encoding' => 'binary', - 'Content-Disposition' => - "attachment; filename=#{build.artifacts_file.filename}" } + let(:download_headers) do + { 'Content-Transfer-Encoding' => 'binary', + 'Content-Disposition' => + "attachment; filename=#{build.artifacts_file.filename}" } + end - expect(response).to have_http_status(200) - expect(response.headers).to include(download_headers) + shared_examples 'a valid file' do + it { expect(response).to have_http_status(200) } + it { expect(response.headers).to include(download_headers) } end context 'with regular branch' do @@ -237,7 +238,7 @@ describe API::API, api: true do get path_for_ref('master') end - it('gives the file') { verify } + it_behaves_like 'a valid file' end context 'with branch name containing slash' do @@ -250,7 +251,7 @@ describe API::API, api: true do get path_for_ref('improve/awesome') end - it('gives the file') { verify } + it_behaves_like 'a valid file' end context 'with latest pipeline' do @@ -269,7 +270,7 @@ describe API::API, api: true do get path_for_ref end - it('gives the file') { verify } + it_behaves_like 'a valid file' end context 'with success pipeline' do @@ -285,7 +286,7 @@ describe API::API, api: true do get path_for_ref end - it('gives the file') { verify } + it_behaves_like 'a valid file' end end end -- cgit v1.2.1 From 6b7e9c7655e4ffc74de90f01a0850a230b10a03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Tue, 12 Jul 2016 19:28:39 +0200 Subject: Remove VideoJS and clean the integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handle videos in: - MD preview in notes: commit, issue/MR, MR diff - New notes in: commit, issue/MR, MR diff - Persisted notes in: commit, issue/MR, MR diff Signed-off-by: Rémy Coutable --- app/assets/javascripts/application.js.coffee | 1 - app/assets/javascripts/video_setup.js.coffee | 3 - app/assets/stylesheets/application.scss | 5 - app/assets/stylesheets/pages/issuable.scss | 2 +- app/controllers/help_controller.rb | 2 +- app/uploaders/uploader_helper.rb | 6 +- doc/markdown/img/video.mp4 | Bin 0 -> 383631 bytes doc/markdown/markdown.md | 15 + lib/banzai/filter/video_link_filter.rb | 15 +- spec/features/markdown_spec.rb | 12 + spec/fixtures/markdown.md.erb | 4 + spec/lib/banzai/filter/video_link_filter_spec.rb | 25 +- spec/support/matchers/markdown_matchers.rb | 11 + spec/uploaders/file_uploader_spec.rb | 59 +- vendor/assets/javascripts/videojs/font/VideoJS.eot | Bin 5780 -> 0 bytes vendor/assets/javascripts/videojs/font/VideoJS.svg | 99 - vendor/assets/javascripts/videojs/font/VideoJS.ttf | Bin 5616 -> 0 bytes .../assets/javascripts/videojs/font/VideoJS.woff | Bin 3632 -> 0 bytes vendor/assets/javascripts/videojs/video-js.css | 1264 - vendor/assets/javascripts/videojs/video-js.min.css | 1 - vendor/assets/javascripts/videojs/video-js.swf | Bin 16794 -> 0 bytes vendor/assets/javascripts/videojs/video.js | 22872 ------------------- vendor/assets/javascripts/videojs/video.js.map | 303 - vendor/assets/javascripts/videojs/video.min.js | 23 - vendor/assets/javascripts/videojs/video.min.js.map | 1 - 25 files changed, 102 insertions(+), 24621 deletions(-) delete mode 100644 app/assets/javascripts/video_setup.js.coffee create mode 100644 doc/markdown/img/video.mp4 delete mode 100755 vendor/assets/javascripts/videojs/font/VideoJS.eot delete mode 100755 vendor/assets/javascripts/videojs/font/VideoJS.svg delete mode 100755 vendor/assets/javascripts/videojs/font/VideoJS.ttf delete mode 100755 vendor/assets/javascripts/videojs/font/VideoJS.woff delete mode 100755 vendor/assets/javascripts/videojs/video-js.css delete mode 100755 vendor/assets/javascripts/videojs/video-js.min.css delete mode 100755 vendor/assets/javascripts/videojs/video-js.swf delete mode 100755 vendor/assets/javascripts/videojs/video.js delete mode 100755 vendor/assets/javascripts/videojs/video.js.map delete mode 100755 vendor/assets/javascripts/videojs/video.min.js delete mode 100755 vendor/assets/javascripts/videojs/video.min.js.map diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index c98763d6271..eceff6d91d5 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -53,7 +53,6 @@ #= require_directory ./u2f #= require_directory . #= require fuzzaldrin-plus -#= require u2f window.slugify = (text) -> text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase() diff --git a/app/assets/javascripts/video_setup.js.coffee b/app/assets/javascripts/video_setup.js.coffee deleted file mode 100644 index 01aea2d5c99..00000000000 --- a/app/assets/javascripts/video_setup.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Disables dynamic sizing of video tag, which defaults to 300px. -# Without this the video naturally fills the container. -window.VIDEOJS_NO_DYNAMIC_STYLE = true diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index c39c2947dd0..8b93665d085 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -29,11 +29,6 @@ */ @import "font-awesome"; -/* - * Styles for VideoJS. - */ -@import "videojs/video-js"; - /* * Page specific styles (issues, projects etc): */ diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 542fa244689..300b4ac9c2e 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -268,7 +268,7 @@ .issuable-header-btn { background: $gray-normal; border: 1px solid $border-gray-normal; - + &:hover { background: $gray-dark; border: 1px solid $border-gray-dark; diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index d3dd98c8a4e..f7b44099b78 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -30,7 +30,7 @@ class HelpController < ApplicationController end # Allow access to images in the doc folder - format.any(:png, :gif, :jpeg) do + format.any(:png, :gif, :jpeg, :mp4) do # Note: We are purposefully NOT using `Rails.root.join` path = File.join(Rails.root, 'doc', "#{@path}.#{params[:format]}") diff --git a/app/uploaders/uploader_helper.rb b/app/uploaders/uploader_helper.rb index 703f7820913..b10ad71d052 100644 --- a/app/uploaders/uploader_helper.rb +++ b/app/uploaders/uploader_helper.rb @@ -3,8 +3,8 @@ module UploaderHelper IMAGE_EXT = %w[png jpg jpeg gif bmp tiff] # We recommend using the .mp4 format over .mov. Videos in .mov format can # still be used but you really need to make sure they are served with the - # proper MIME type video/mp4 and not video/quicktime or your videos won’t play - # on IE ≥ 9. + # proper MIME type video/mp4 and not video/quicktime or your videos won't play + # on IE >= 9. # http://archive.sublimevideo.info/20150912/docs.sublimevideo.net/troubleshooting.html VIDEO_EXT = %w[mp4 m4v mov webm ogv] @@ -21,6 +21,8 @@ module UploaderHelper end def extension_match?(extensions) + return false unless file + extension = if file.respond_to?(:extension) file.extension diff --git a/doc/markdown/img/video.mp4 b/doc/markdown/img/video.mp4 new file mode 100644 index 00000000000..1fc478842f5 Binary files /dev/null and b/doc/markdown/img/video.mp4 differ diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index fb2dd582754..d407eec2494 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -13,6 +13,7 @@ * [Emoji](#emoji) * [Special GitLab references](#special-gitlab-references) * [Task Lists](#task-lists) +* [Videos](#videos) **[Standard Markdown](#standard-markdown)** @@ -281,6 +282,20 @@ You can add task lists to issues, merge requests and comments. To create a task Task lists can only be created in descriptions, not in titles. Task item state can be managed by editing the description's Markdown or by toggling the rendered check boxes. +## Videos + +Image tags with a video extension are automatically converted to a video player. + +The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, `.ogv`, and `.ogg`. + + Here's a sample video: + + ![Sample Video](img/video.mp4) + +Here's a sample video: + +![Sample Video](img/video.mp4) + # Standard Markdown ## Headers diff --git a/lib/banzai/filter/video_link_filter.rb b/lib/banzai/filter/video_link_filter.rb index 4dfbff8ec86..fd8b9a6f0cc 100644 --- a/lib/banzai/filter/video_link_filter.rb +++ b/lib/banzai/filter/video_link_filter.rb @@ -1,11 +1,10 @@ module Banzai module Filter - # HTML Filter that handles video uploads. - + # Find every image that isn't already wrapped in an `a` tag, and that has + # a `src` attribute ending with a video extension, add a new video node and + # a "Download" link in the case the video cannot be played. class VideoLinkFilter < HTML::Pipeline::Filter - include ActionView::Helpers::TagHelper - include ActionView::Context def call doc.xpath(query).each do |el| @@ -27,8 +26,6 @@ module Banzai end end - # Return a video tag Nokogiri node - # def video_node(doc, element) container = doc.document.create_element( 'div', @@ -38,16 +35,16 @@ module Banzai video = doc.document.create_element( 'video', src: element['src'], - class: 'video-js vjs-sublime-skin', + width: '400', controls: true, - "data-setup": '{}') + 'data-setup' => '{}') link = doc.document.create_element( 'a', element['title'] || element['alt'], href: element['src'], target: '_blank', - title: "Downlad '#{element['title'] || element['alt']}'") + title: "Download '#{element['title'] || element['alt']}'") download_paragraph = doc.document.create_element('p') download_paragraph.children = link diff --git a/spec/features/markdown_spec.rb b/spec/features/markdown_spec.rb index 09ccc77c101..32159559c37 100644 --- a/spec/features/markdown_spec.rb +++ b/spec/features/markdown_spec.rb @@ -236,6 +236,14 @@ describe 'GitLab Markdown', feature: true do it 'includes TaskListFilter' do expect(doc).to parse_task_lists end + + it 'includes InlineDiffFilter' do + expect(doc).to parse_inline_diffs + end + + it 'includes VideoLinkFilter' do + expect(doc).to parse_video_links + end end context 'wiki pipeline' do @@ -293,6 +301,10 @@ describe 'GitLab Markdown', feature: true do it 'includes InlineDiffFilter' do expect(doc).to parse_inline_diffs end + + it 'includes VideoLinkFilter' do + expect(doc).to parse_video_links + end end # Fake a `current_user` helper diff --git a/spec/fixtures/markdown.md.erb b/spec/fixtures/markdown.md.erb index c75d28d9801..f3e7c2d1a9f 100644 --- a/spec/fixtures/markdown.md.erb +++ b/spec/fixtures/markdown.md.erb @@ -256,3 +256,7 @@ However the wrapping tags can not be mixed as such - - [+ additions +} - {- delletions -] - [- delletions -} + +### Videos + +![My Video](/assets/videos/gitlab-demo.mp4) diff --git a/spec/lib/banzai/filter/video_link_filter_spec.rb b/spec/lib/banzai/filter/video_link_filter_spec.rb index bdf76c458b0..cc4349f80ba 100644 --- a/spec/lib/banzai/filter/video_link_filter_spec.rb +++ b/spec/lib/banzai/filter/video_link_filter_spec.rb @@ -18,24 +18,33 @@ describe Banzai::Filter::VideoLinkFilter, lib: true do context 'when the element src has a video extension' do UploaderHelper::VIDEO_EXT.each do |ext| it "replaces the image tag 'path/video.#{ext}' with a video tag" do - element = filter(link_to_image("/path/video.#{ext}")).children.first + container = filter(link_to_image("/path/video.#{ext}")).children.first - expect(element.name).to eq 'video' - expect(element['src']).to eq "/path/video.#{ext}" + expect(container.name).to eq 'div' + expect(container['class']).to eq 'video-container' - fallback_link = element.children.first - expect(fallback_link.name).to eq 'a' - expect(fallback_link['href']).to eq "/path/video.#{ext}" - expect(fallback_link['target']).to eq '_blank' + video, paragraph = container.children + + expect(video.name).to eq 'video' + expect(video['src']).to eq "/path/video.#{ext}" + + expect(paragraph.name).to eq 'p' + + link = paragraph.children.first + + expect(link.name).to eq 'a' + expect(link['href']).to eq "/path/video.#{ext}" + expect(link['target']).to eq '_blank' end end end context 'when the element src is an image' do it 'leaves the document unchanged' do - element = filter(link_to_image("/path/my_image.jpg")).children.first + element = filter(link_to_image('/path/my_image.jpg')).children.first expect(element.name).to eq 'img' + expect(element['src']).to eq '/path/my_image.jpg' end end diff --git a/spec/support/matchers/markdown_matchers.rb b/spec/support/matchers/markdown_matchers.rb index e005058ba5b..8c98b1f988c 100644 --- a/spec/support/matchers/markdown_matchers.rb +++ b/spec/support/matchers/markdown_matchers.rb @@ -178,6 +178,17 @@ module MarkdownMatchers expect(actual).to have_selector('span.idiff.deletion', count: 2) end end + + # VideoLinkFilter + matcher :parse_video_links do + set_default_markdown_messages + + match do |actual| + video = actual.at_css('video') + + expect(video['src']).to end_with('/assets/videos/gitlab-demo.mp4') + end + end end # Monkeypatch the matcher DSL so that we can reduce some noisy duplication for diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb index b59f44e0a65..e8300abed5d 100644 --- a/spec/uploaders/file_uploader_spec.rb +++ b/spec/uploaders/file_uploader_spec.rb @@ -1,42 +1,45 @@ -require "spec_helper" - -# provides matchers like `have_dimensions` -# https://github.com/carrierwaveuploader/carrierwave#testing-with-carrierwave -# require "carrierwave/test/matchers" - +require 'spec_helper' describe FileUploader do - # include CarrierWave::Test::Matchers - - let(:project){ create(:project) } - - let(:image_file){ File.new Rails.root.join("spec", "fixtures", "rails_sample.jpg") } - let(:video_file){ File.new Rails.root.join("spec", "fixtures", "video_sample.mp4") } - let(:text_file) { File.new Rails.root.join("spec", "fixtures", "doc_sample.txt") } + let(:project) { create(:project) } before do + @previous_enable_processing = FileUploader.enable_processing FileUploader.enable_processing = false @uploader = FileUploader.new(project) end after do - FileUploader.enable_processing = true + FileUploader.enable_processing = @previous_enable_processing @uploader.remove! end - it "should detect an image based on file extension" do - @uploader.store!(image_file) - expect(@uploader.image_or_video?).to be true + describe '#image_or_video?' do + context 'given an image file' do + before do + @uploader.store!(File.new(Rails.root.join('spec', 'fixtures', 'rails_sample.jpg'))) + end + + it 'detects an image based on file extension' do + expect(@uploader.image_or_video?).to be true + end + end + + context 'given an video file' do + before do + video_file = File.new(Rails.root.join('spec', 'fixtures', 'video_sample.mp4')) + @uploader.store!(video_file) + end + + it 'detects a video based on file extension' do + expect(@uploader.image_or_video?).to be true + end + end + + it 'does not return image_or_video? for other types' do + @uploader.store!(File.new(Rails.root.join('spec', 'fixtures', 'doc_sample.txt'))) + + expect(@uploader.image_or_video?).to be false + end end - - it "should detect a video based on file extension" do - @uploader.store!(video_file) - expect(@uploader.image_or_video?).to be true - end - - it "should not return image_or_video? for other types" do - @uploader.store!(text_file) - expect(@uploader.image_or_video?).to be false - end - end diff --git a/vendor/assets/javascripts/videojs/font/VideoJS.eot b/vendor/assets/javascripts/videojs/font/VideoJS.eot deleted file mode 100755 index a47889f9303..00000000000 Binary files a/vendor/assets/javascripts/videojs/font/VideoJS.eot and /dev/null differ diff --git a/vendor/assets/javascripts/videojs/font/VideoJS.svg b/vendor/assets/javascripts/videojs/font/VideoJS.svg deleted file mode 100755 index 7741c677803..00000000000 --- a/vendor/assets/javascripts/videojs/font/VideoJS.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/assets/javascripts/videojs/font/VideoJS.ttf b/vendor/assets/javascripts/videojs/font/VideoJS.ttf deleted file mode 100755 index 6ddd3f26d79..00000000000 Binary files a/vendor/assets/javascripts/videojs/font/VideoJS.ttf and /dev/null differ diff --git a/vendor/assets/javascripts/videojs/font/VideoJS.woff b/vendor/assets/javascripts/videojs/font/VideoJS.woff deleted file mode 100755 index a85d38e8751..00000000000 Binary files a/vendor/assets/javascripts/videojs/font/VideoJS.woff and /dev/null differ diff --git a/vendor/assets/javascripts/videojs/video-js.css b/vendor/assets/javascripts/videojs/video-js.css deleted file mode 100755 index a5c93724df3..00000000000 --- a/vendor/assets/javascripts/videojs/video-js.css +++ /dev/null @@ -1,1264 +0,0 @@ -.video-js .vjs-big-play-button:before, .video-js .vjs-control:before, .video-js .vjs-modal-dialog, .vjs-modal-dialog .vjs-modal-dialog-content { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; } - -.video-js .vjs-big-play-button:before, .video-js .vjs-control:before { - text-align: center; } - -@font-face { - font-family: VideoJS; - src: url("font/VideoJS.eot?#iefix") format("eot"); } - -@font-face { - font-family: VideoJS; - src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAA4wAAoAAAAAFfAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAD4AAABWUZFeBGNtYXAAAAE0AAAAOgAAAUriLxC2Z2x5ZgAAAXAAAAnnAAAO5OV/F/5oZWFkAAALWAAAACsAAAA2C4eUa2hoZWEAAAuEAAAAGAAAACQOogcfaG10eAAAC5wAAAAPAAAAeNIAAABsb2NhAAALrAAAAD4AAAA+MMgtQm1heHAAAAvsAAAAHwAAACABLwB5bmFtZQAADAwAAAElAAACCtXH9aBwb3N0AAANNAAAAPkAAAF5vawAenicY2BkZ2CcwMDKwMFSyPKMgYHhF4RmjmEIZzzHwMDEwMrMgBUEpLmmMDh8ZPwoyw7iLmSHCDOCCADu/Qo9AAB4nGNgYGBmgGAZBkYGEHAB8hjBfBYGDSDNBqQZGZgYGD7K/v8PUvCREUTzM0DVAwEjG8OIBwCOWgbUAAB4nI1XfVBU1xV/574vlsUlj/14grDs48FuAgaR3X2LEnY3UZSgEkTwAySAgkIwI8bRfFDjTszYCWRMW9lNa4y2meokmq+2k5ia0dpkmknbkWgSSW3GyaaNf0RTx0wxX7A3Pe/tQmIgHXf3vXvvueeee+45v3POXQYY/PCD/CBDGAYkIE2sxg+OXSJmhmH1OaFX6MU5C5PDMCZi5Rg2i+ELGSthwM14NCbgYGSBIZfhFA1H6Zu0OS0NDkMVfg+npdFm+maCvigI0JBIQIMg0BdJGdTj9ylj7nr+b97+Hl8C1+H2xNAvjP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BvAEoAUwBWAGUAcgBzAGkAbwBuACAAMQAuADAAVgBpAGQAZQBvAEoAUwBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAACAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAAECAQMBBAEFAQYBBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4EcGxheQtwbGF5LWNpcmNsZQVwYXVzZQt2b2x1bWUtbXV0ZQp2b2x1bWUtbG93CnZvbHVtZS1taWQLdm9sdW1lLWhpZ2gQZnVsbHNjcmVlbi1lbnRlcg9mdWxsc2NyZWVuLWV4aXQGc3F1YXJlB3NwaW5uZXIJc3VidGl0bGVzCGNhcHRpb25zCGNoYXB0ZXJzBXNoYXJlA2NvZwZjaXJjbGUOY2lyY2xlLW91dGxpbmUTY2lyY2xlLWlubmVyLWNpcmNsZQJoZAZjYW5jZWwGcmVwbGF5CGZhY2Vib29rBWdwbHVzCGxpbmtlZGluB3R3aXR0ZXIGdHVtYmxyCXBpbnRlcmVzdBFhdWRpby1kZXNjcmlwdGlvbgAAAAAA) format("truetype"); - font-weight: normal; - font-style: normal; } - -.vjs-icon-play, .video-js .vjs-big-play-button, .video-js .vjs-play-control { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-play:before, .video-js .vjs-big-play-button:before, .video-js .vjs-play-control:before { - content: '\f101'; } - -.vjs-icon-play-circle { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-play-circle:before { - content: '\f102'; } - -.vjs-icon-pause, .video-js .vjs-play-control.vjs-playing { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-pause:before, .video-js .vjs-play-control.vjs-playing:before { - content: '\f103'; } - -.vjs-icon-volume-mute, .video-js .vjs-mute-control.vjs-vol-0, -.video-js .vjs-volume-menu-button.vjs-vol-0 { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-volume-mute:before, .video-js .vjs-mute-control.vjs-vol-0:before, - .video-js .vjs-volume-menu-button.vjs-vol-0:before { - content: '\f104'; } - -.vjs-icon-volume-low, .video-js .vjs-mute-control.vjs-vol-1, -.video-js .vjs-volume-menu-button.vjs-vol-1 { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-volume-low:before, .video-js .vjs-mute-control.vjs-vol-1:before, - .video-js .vjs-volume-menu-button.vjs-vol-1:before { - content: '\f105'; } - -.vjs-icon-volume-mid, .video-js .vjs-mute-control.vjs-vol-2, -.video-js .vjs-volume-menu-button.vjs-vol-2 { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-volume-mid:before, .video-js .vjs-mute-control.vjs-vol-2:before, - .video-js .vjs-volume-menu-button.vjs-vol-2:before { - content: '\f106'; } - -.vjs-icon-volume-high, .video-js .vjs-mute-control, -.video-js .vjs-volume-menu-button { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-volume-high:before, .video-js .vjs-mute-control:before, - .video-js .vjs-volume-menu-button:before { - content: '\f107'; } - -.vjs-icon-fullscreen-enter, .video-js .vjs-fullscreen-control { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-fullscreen-enter:before, .video-js .vjs-fullscreen-control:before { - content: '\f108'; } - -.vjs-icon-fullscreen-exit, .video-js.vjs-fullscreen .vjs-fullscreen-control { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-fullscreen-exit:before, .video-js.vjs-fullscreen .vjs-fullscreen-control:before { - content: '\f109'; } - -.vjs-icon-square { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-square:before { - content: '\f10a'; } - -.vjs-icon-spinner { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-spinner:before { - content: '\f10b'; } - -.vjs-icon-subtitles, .video-js .vjs-subtitles-button { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-subtitles:before, .video-js .vjs-subtitles-button:before { - content: '\f10c'; } - -.vjs-icon-captions, .video-js .vjs-captions-button { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-captions:before, .video-js .vjs-captions-button:before { - content: '\f10d'; } - -.vjs-icon-chapters, .video-js .vjs-chapters-button { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-chapters:before, .video-js .vjs-chapters-button:before { - content: '\f10e'; } - -.vjs-icon-share { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-share:before { - content: '\f10f'; } - -.vjs-icon-cog { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-cog:before { - content: '\f110'; } - -.vjs-icon-circle, .video-js .vjs-mouse-display, .video-js .vjs-play-progress, .video-js .vjs-volume-level { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-circle:before, .video-js .vjs-mouse-display:before, .video-js .vjs-play-progress:before, .video-js .vjs-volume-level:before { - content: '\f111'; } - -.vjs-icon-circle-outline { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-circle-outline:before { - content: '\f112'; } - -.vjs-icon-circle-inner-circle { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-circle-inner-circle:before { - content: '\f113'; } - -.vjs-icon-hd { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-hd:before { - content: '\f114'; } - -.vjs-icon-cancel, .video-js .vjs-control.vjs-close-button { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-cancel:before, .video-js .vjs-control.vjs-close-button:before { - content: '\f115'; } - -.vjs-icon-replay { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-replay:before { - content: '\f116'; } - -.vjs-icon-facebook { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-facebook:before { - content: '\f117'; } - -.vjs-icon-gplus { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-gplus:before { - content: '\f118'; } - -.vjs-icon-linkedin { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-linkedin:before { - content: '\f119'; } - -.vjs-icon-twitter { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-twitter:before { - content: '\f11a'; } - -.vjs-icon-tumblr { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-tumblr:before { - content: '\f11b'; } - -.vjs-icon-pinterest { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-pinterest:before { - content: '\f11c'; } - -.vjs-icon-audio-description, .video-js .vjs-descriptions-button { - font-family: VideoJS; - font-weight: normal; - font-style: normal; } - .vjs-icon-audio-description:before, .video-js .vjs-descriptions-button:before { - content: '\f11d'; } - -.video-js { - display: block; - vertical-align: top; - box-sizing: border-box; - color: #fff; - background-color: #000; - position: relative; - padding: 0; - font-size: 10px; - line-height: 1; - font-weight: normal; - font-style: normal; - font-family: Arial, Helvetica, sans-serif; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - .video-js:-moz-full-screen { - position: absolute; } - .video-js:-webkit-full-screen { - width: 100% !important; - height: 100% !important; } - -.video-js *, -.video-js *:before, -.video-js *:after { - box-sizing: inherit; } - -.video-js ul { - font-family: inherit; - font-size: inherit; - line-height: inherit; - list-style-position: outside; - margin-left: 0; - margin-right: 0; - margin-top: 0; - margin-bottom: 0; } - -.video-js.vjs-fluid, -.video-js.vjs-16-9, -.video-js.vjs-4-3 { - width: 100%; - max-width: 100%; - height: 0; } - -.video-js.vjs-16-9 { - padding-top: 56.25%; } - -.video-js.vjs-4-3 { - padding-top: 75%; } - -.video-js.vjs-fill { - width: 100%; - height: 100%; } - -.video-js .vjs-tech { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; } - -body.vjs-full-window { - padding: 0; - margin: 0; - height: 100%; - overflow-y: auto; } - -.vjs-full-window .video-js.vjs-fullscreen { - position: fixed; - overflow: hidden; - z-index: 1000; - left: 0; - top: 0; - bottom: 0; - right: 0; } - -.video-js.vjs-fullscreen { - width: 100% !important; - height: 100% !important; - padding-top: 0 !important; } - -.video-js.vjs-fullscreen.vjs-user-inactive { - cursor: none; } - -.vjs-hidden { - display: none !important; } - -.vjs-disabled { - opacity: 0.5; - cursor: default; } - -.video-js .vjs-offscreen { - height: 1px; - left: -9999px; - position: absolute; - top: 0; - width: 1px; } - -.vjs-lock-showing { - display: block !important; - opacity: 1; - visibility: visible; } - -.vjs-no-js { - padding: 20px; - color: #fff; - background-color: #000; - font-size: 18px; - font-family: Arial, Helvetica, sans-serif; - text-align: center; - width: 300px; - height: 150px; - margin: 0px auto; } - -.vjs-no-js a, -.vjs-no-js a:visited { - color: #66A8CC; } - -.video-js .vjs-big-play-button { - font-size: 3em; - line-height: 1.5em; - height: 1.5em; - width: 3em; - display: block; - position: absolute; - top: 10px; - left: 10px; - padding: 0; - cursor: pointer; - opacity: 1; - border: 0.06666em solid #fff; - background-color: #2B333F; - background-color: rgba(43, 51, 63, 0.7); - -webkit-border-radius: 0.3em; - -moz-border-radius: 0.3em; - border-radius: 0.3em; - -webkit-transition: all 0.4s; - -moz-transition: all 0.4s; - -o-transition: all 0.4s; - transition: all 0.4s; } - -.vjs-big-play-centered .vjs-big-play-button { - top: 50%; - left: 50%; - margin-top: -0.75em; - margin-left: -1.5em; } - -.video-js:hover .vjs-big-play-button, -.video-js .vjs-big-play-button:focus { - outline: 0; - border-color: #fff; - background-color: #73859f; - background-color: rgba(115, 133, 159, 0.5); - -webkit-transition: all 0s; - -moz-transition: all 0s; - -o-transition: all 0s; - transition: all 0s; } - -.vjs-controls-disabled .vjs-big-play-button, -.vjs-has-started .vjs-big-play-button, -.vjs-using-native-controls .vjs-big-play-button, -.vjs-error .vjs-big-play-button { - display: none; } - -.video-js button { - background: none; - border: none; - color: inherit; - display: inline-block; - overflow: visible; - font-size: inherit; - line-height: inherit; - text-transform: none; - text-decoration: none; - transition: none; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; } - -.video-js .vjs-control.vjs-close-button { - cursor: pointer; - height: 3em; - position: absolute; - right: 0; - top: 0.5em; - z-index: 2; } - -.vjs-menu-button { - cursor: pointer; } - -.vjs-menu-button.vjs-disabled { - cursor: default; } - -.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu { - display: none; } - -.vjs-menu .vjs-menu-content { - display: block; - padding: 0; - margin: 0; - overflow: auto; } - -.vjs-scrubbing .vjs-menu-button:hover .vjs-menu { - display: none; } - -.vjs-menu li { - list-style: none; - margin: 0; - padding: 0.2em 0; - line-height: 1.4em; - font-size: 1.2em; - text-align: center; - text-transform: lowercase; } - -.vjs-menu li:focus, -.vjs-menu li:hover { - outline: 0; - background-color: #73859f; - background-color: rgba(115, 133, 159, 0.5); } - -.vjs-menu li.vjs-selected, -.vjs-menu li.vjs-selected:focus, -.vjs-menu li.vjs-selected:hover { - background-color: #fff; - color: #2B333F; } - -.vjs-menu li.vjs-menu-title { - text-align: center; - text-transform: uppercase; - font-size: 1em; - line-height: 2em; - padding: 0; - margin: 0 0 0.3em 0; - font-weight: bold; - cursor: default; } - -.vjs-menu-button-popup .vjs-menu { - display: none; - position: absolute; - bottom: 0; - width: 10em; - left: -3em; - height: 0em; - margin-bottom: 1.5em; - border-top-color: rgba(43, 51, 63, 0.7); } - -.vjs-menu-button-popup .vjs-menu .vjs-menu-content { - background-color: #2B333F; - background-color: rgba(43, 51, 63, 0.7); - position: absolute; - width: 100%; - bottom: 1.5em; - max-height: 15em; } - -.vjs-workinghover .vjs-menu-button-popup:hover .vjs-menu, -.vjs-menu-button-popup .vjs-menu.vjs-lock-showing { - display: block; } - -.video-js .vjs-menu-button-inline { - -webkit-transition: all 0.4s; - -moz-transition: all 0.4s; - -o-transition: all 0.4s; - transition: all 0.4s; - overflow: hidden; } - -.video-js .vjs-menu-button-inline:before { - width: 2.222222222em; } - -.video-js .vjs-menu-button-inline:hover, -.video-js .vjs-menu-button-inline:focus, -.video-js .vjs-menu-button-inline.vjs-slider-active, -.video-js.vjs-no-flex .vjs-menu-button-inline { - width: 12em; } - -.video-js .vjs-menu-button-inline.vjs-slider-active { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; } - -.vjs-menu-button-inline .vjs-menu { - opacity: 0; - height: 100%; - width: auto; - position: absolute; - left: 4em; - top: 0; - padding: 0; - margin: 0; - -webkit-transition: all 0.4s; - -moz-transition: all 0.4s; - -o-transition: all 0.4s; - transition: all 0.4s; } - -.vjs-menu-button-inline:hover .vjs-menu, -.vjs-menu-button-inline:focus .vjs-menu, -.vjs-menu-button-inline.vjs-slider-active .vjs-menu { - display: block; - opacity: 1; } - -.vjs-no-flex .vjs-menu-button-inline .vjs-menu { - display: block; - opacity: 1; - position: relative; - width: auto; } - -.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu, -.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu, -.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu { - width: auto; } - -.vjs-menu-button-inline .vjs-menu-content { - width: auto; - height: 100%; - margin: 0; - overflow: hidden; } - -.video-js .vjs-control-bar { - display: none; - width: 100%; - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 3.0em; - background-color: #2B333F; - background-color: rgba(43, 51, 63, 0.7); } - -.vjs-has-started .vjs-control-bar { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - visibility: visible; - opacity: 1; - -webkit-transition: visibility 0.1s, opacity 0.1s; - -moz-transition: visibility 0.1s, opacity 0.1s; - -o-transition: visibility 0.1s, opacity 0.1s; - transition: visibility 0.1s, opacity 0.1s; } - -.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar { - visibility: hidden; - opacity: 0; - -webkit-transition: visibility 1s, opacity 1s; - -moz-transition: visibility 1s, opacity 1s; - -o-transition: visibility 1s, opacity 1s; - transition: visibility 1s, opacity 1s; } - -.vjs-controls-disabled .vjs-control-bar, -.vjs-using-native-controls .vjs-control-bar, -.vjs-error .vjs-control-bar { - display: none !important; } - -.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar { - opacity: 1; - visibility: visible; } - -@media \0screen { - .vjs-user-inactive.vjs-playing .vjs-control-bar :before { - content: ""; } } - -.vjs-has-started.vjs-no-flex .vjs-control-bar { - display: table; } - -.video-js .vjs-control { - outline: none; - position: relative; - text-align: center; - margin: 0; - padding: 0; - height: 100%; - width: 4em; - -webkit-box-flex: none; - -moz-box-flex: none; - -webkit-flex: none; - -ms-flex: none; - flex: none; } - .video-js .vjs-control:before { - font-size: 1.8em; - line-height: 1.67; } - -.video-js .vjs-control:focus:before, -.video-js .vjs-control:hover:before, -.video-js .vjs-control:focus { - text-shadow: 0em 0em 1em white; } - -.video-js .vjs-control-text { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; } - -.vjs-no-flex .vjs-control { - display: table-cell; - vertical-align: middle; } - -.video-js .vjs-custom-control-spacer { - display: none; } - -.video-js .vjs-progress-control { - -webkit-box-flex: auto; - -moz-box-flex: auto; - -webkit-flex: auto; - -ms-flex: auto; - flex: auto; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - min-width: 4em; } - -.vjs-live .vjs-progress-control { - display: none; } - -.video-js .vjs-progress-holder { - -webkit-box-flex: auto; - -moz-box-flex: auto; - -webkit-flex: auto; - -ms-flex: auto; - flex: auto; - -webkit-transition: all 0.2s; - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - transition: all 0.2s; - height: 0.3em; } - -.video-js .vjs-progress-control:hover .vjs-progress-holder { - font-size: 1.666666666666666666em; } - -/* If we let the font size grow as much as everything else, the current time tooltip ends up - ginormous. If you'd like to enable the current time tooltip all the time, this should be disabled - to avoid a weird hitch when you roll off the hover. */ -.video-js .vjs-progress-control:hover .vjs-time-tooltip, -.video-js .vjs-progress-control:hover .vjs-mouse-display:after, -.video-js .vjs-progress-control:hover .vjs-play-progress:after { - font-family: Arial, Helvetica, sans-serif; - visibility: visible; - font-size: 0.6em; } - -.video-js .vjs-progress-holder .vjs-play-progress, -.video-js .vjs-progress-holder .vjs-load-progress, -.video-js .vjs-progress-holder .vjs-tooltip-progress-bar, -.video-js .vjs-progress-holder .vjs-load-progress div { - position: absolute; - display: block; - height: 0.3em; - margin: 0; - padding: 0; - width: 0; - left: 0; - top: 0; } - -.video-js .vjs-mouse-display:before { - display: none; } - -.video-js .vjs-play-progress { - background-color: #fff; } - .video-js .vjs-play-progress:before { - position: absolute; - top: -0.333333333333333em; - right: -0.5em; - font-size: 0.9em; } - -.video-js .vjs-time-tooltip, -.video-js .vjs-mouse-display:after, -.video-js .vjs-play-progress:after { - visibility: hidden; - pointer-events: none; - position: absolute; - top: -3.4em; - right: -1.9em; - font-size: 0.9em; - color: #000; - content: attr(data-current-time); - padding: 6px 8px 8px 8px; - background-color: #fff; - background-color: rgba(255, 255, 255, 0.8); - -webkit-border-radius: 0.3em; - -moz-border-radius: 0.3em; - border-radius: 0.3em; } - -.video-js .vjs-time-tooltip, -.video-js .vjs-play-progress:before, -.video-js .vjs-play-progress:after { - z-index: 1; } - -.video-js .vjs-progress-control .vjs-keep-tooltips-inside:after { - display: none; } - -.video-js .vjs-load-progress { - background: #bfc7d3; - background: rgba(115, 133, 159, 0.5); } - -.video-js .vjs-load-progress div { - background: white; - background: rgba(115, 133, 159, 0.75); } - -.video-js.vjs-no-flex .vjs-progress-control { - width: auto; } - -.video-js .vjs-time-tooltip { - display: inline-block; - height: 2.4em; - position: relative; - float: right; - right: -1.9em; } - -.vjs-tooltip-progress-bar { - visibility: hidden; } - -.video-js .vjs-progress-control .vjs-mouse-display { - display: none; - position: absolute; - width: 1px; - height: 100%; - background-color: #000; - z-index: 1; } - -.vjs-no-flex .vjs-progress-control .vjs-mouse-display { - z-index: 0; } - -.video-js .vjs-progress-control:hover .vjs-mouse-display { - display: block; } - -.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display, -.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display:after { - visibility: hidden; - opacity: 0; - -webkit-transition: visibility 1s, opacity 1s; - -moz-transition: visibility 1s, opacity 1s; - -o-transition: visibility 1s, opacity 1s; - transition: visibility 1s, opacity 1s; } - -.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display, -.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display:after { - display: none; } - -.vjs-mouse-display .vjs-time-tooltip, -.video-js .vjs-progress-control .vjs-mouse-display:after { - color: #fff; - background-color: #000; - background-color: rgba(0, 0, 0, 0.8); } - -.video-js .vjs-slider { - outline: 0; - position: relative; - cursor: pointer; - padding: 0; - margin: 0 0.45em 0 0.45em; - background-color: #73859f; - background-color: rgba(115, 133, 159, 0.5); } - -.video-js .vjs-slider:focus { - text-shadow: 0em 0em 1em white; - -webkit-box-shadow: 0 0 1em #fff; - -moz-box-shadow: 0 0 1em #fff; - box-shadow: 0 0 1em #fff; } - -.video-js .vjs-mute-control, -.video-js .vjs-volume-menu-button { - cursor: pointer; - -webkit-box-flex: none; - -moz-box-flex: none; - -webkit-flex: none; - -ms-flex: none; - flex: none; } - -.video-js .vjs-volume-control { - width: 5em; - -webkit-box-flex: none; - -moz-box-flex: none; - -webkit-flex: none; - -ms-flex: none; - flex: none; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; } - -.video-js .vjs-volume-bar { - margin: 1.35em 0.45em; } - -.vjs-volume-bar.vjs-slider-horizontal { - width: 5em; - height: 0.3em; } - -.vjs-volume-bar.vjs-slider-vertical { - width: 0.3em; - height: 5em; - margin: 1.35em auto; } - -.video-js .vjs-volume-level { - position: absolute; - bottom: 0; - left: 0; - background-color: #fff; } - .video-js .vjs-volume-level:before { - position: absolute; - font-size: 0.9em; } - -.vjs-slider-vertical .vjs-volume-level { - width: 0.3em; } - .vjs-slider-vertical .vjs-volume-level:before { - top: -0.5em; - left: -0.3em; } - -.vjs-slider-horizontal .vjs-volume-level { - height: 0.3em; } - .vjs-slider-horizontal .vjs-volume-level:before { - top: -0.3em; - right: -0.5em; } - -.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level { - height: 100%; } - -.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level { - width: 100%; } - -.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu { - display: block; - width: 0; - height: 0; - border-top-color: transparent; } - -.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu { - left: 0.5em; - height: 8em; } - -.vjs-menu-button-popup.vjs-volume-menu-button-horizontal .vjs-menu { - left: -2em; } - -.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu-content { - height: 0; - width: 0; - overflow-x: hidden; - overflow-y: hidden; } - -.vjs-volume-menu-button-vertical:hover .vjs-menu-content, -.vjs-volume-menu-button-vertical:focus .vjs-menu-content, -.vjs-volume-menu-button-vertical.vjs-slider-active .vjs-menu-content, -.vjs-volume-menu-button-vertical .vjs-lock-showing .vjs-menu-content { - height: 8em; - width: 2.9em; } - -.vjs-volume-menu-button-horizontal:hover .vjs-menu-content, -.vjs-volume-menu-button-horizontal:focus .vjs-menu-content, -.vjs-volume-menu-button-horizontal .vjs-slider-active .vjs-menu-content, -.vjs-volume-menu-button-horizontal .vjs-lock-showing .vjs-menu-content { - height: 2.9em; - width: 8em; } - -.vjs-volume-menu-button.vjs-menu-button-inline .vjs-menu-content { - background-color: transparent !important; } - -.vjs-poster { - display: inline-block; - vertical-align: middle; - background-repeat: no-repeat; - background-position: 50% 50%; - background-size: contain; - cursor: pointer; - margin: 0; - padding: 0; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - height: 100%; } - -.vjs-poster img { - display: block; - vertical-align: middle; - margin: 0 auto; - max-height: 100%; - padding: 0; - width: 100%; } - -.vjs-has-started .vjs-poster { - display: none; } - -.vjs-audio.vjs-has-started .vjs-poster { - display: block; } - -.vjs-controls-disabled .vjs-poster { - display: none; } - -.vjs-using-native-controls .vjs-poster { - display: none; } - -.video-js .vjs-live-control { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-align: flex-start; - -webkit-align-items: flex-start; - -ms-flex-align: flex-start; - align-items: flex-start; - -webkit-box-flex: auto; - -moz-box-flex: auto; - -webkit-flex: auto; - -ms-flex: auto; - flex: auto; - font-size: 1em; - line-height: 3em; } - -.vjs-no-flex .vjs-live-control { - display: table-cell; - width: auto; - text-align: left; } - -.video-js .vjs-time-control { - -webkit-box-flex: none; - -moz-box-flex: none; - -webkit-flex: none; - -ms-flex: none; - flex: none; - font-size: 1em; - line-height: 3em; - min-width: 2em; - width: auto; - padding-left: 1em; - padding-right: 1em; } - -.vjs-live .vjs-time-control { - display: none; } - -.video-js .vjs-current-time, -.vjs-no-flex .vjs-current-time { - display: none; } - -.video-js .vjs-duration, -.vjs-no-flex .vjs-duration { - display: none; } - -.vjs-time-divider { - display: none; - line-height: 3em; } - -.vjs-live .vjs-time-divider { - display: none; } - -.video-js .vjs-play-control { - cursor: pointer; - -webkit-box-flex: none; - -moz-box-flex: none; - -webkit-flex: none; - -ms-flex: none; - flex: none; } - -.vjs-text-track-display { - position: absolute; - bottom: 3em; - left: 0; - right: 0; - top: 0; - pointer-events: none; } - -.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display { - bottom: 1em; } - -.video-js .vjs-text-track { - font-size: 1.4em; - text-align: center; - margin-bottom: 0.1em; - background-color: #000; - background-color: rgba(0, 0, 0, 0.5); } - -.vjs-subtitles { - color: #fff; } - -.vjs-captions { - color: #fc6; } - -.vjs-tt-cue { - display: block; } - -video::-webkit-media-text-track-display { - -moz-transform: translateY(-3em); - -ms-transform: translateY(-3em); - -o-transform: translateY(-3em); - -webkit-transform: translateY(-3em); - transform: translateY(-3em); } - -.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display { - -moz-transform: translateY(-1.5em); - -ms-transform: translateY(-1.5em); - -o-transform: translateY(-1.5em); - -webkit-transform: translateY(-1.5em); - transform: translateY(-1.5em); } - -.video-js .vjs-fullscreen-control { - cursor: pointer; - -webkit-box-flex: none; - -moz-box-flex: none; - -webkit-flex: none; - -ms-flex: none; - flex: none; } - -.vjs-playback-rate .vjs-playback-rate-value { - font-size: 1.5em; - line-height: 2; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - text-align: center; } - -.vjs-playback-rate .vjs-menu { - width: 4em; - left: 0em; } - -.vjs-error .vjs-error-display .vjs-modal-dialog-content { - font-size: 1.4em; - text-align: center; } - -.vjs-error .vjs-error-display:before { - color: #fff; - content: 'X'; - font-family: Arial, Helvetica, sans-serif; - font-size: 4em; - left: 0; - line-height: 1; - margin-top: -0.5em; - position: absolute; - text-shadow: 0.05em 0.05em 0.1em #000; - text-align: center; - top: 50%; - vertical-align: middle; - width: 100%; } - -.vjs-loading-spinner { - display: none; - position: absolute; - top: 50%; - left: 50%; - margin: -25px 0 0 -25px; - opacity: 0.85; - text-align: left; - border: 6px solid rgba(43, 51, 63, 0.7); - box-sizing: border-box; - background-clip: padding-box; - width: 50px; - height: 50px; - border-radius: 25px; } - -.vjs-seeking .vjs-loading-spinner, -.vjs-waiting .vjs-loading-spinner { - display: block; } - -.vjs-loading-spinner:before, -.vjs-loading-spinner:after { - content: ""; - position: absolute; - margin: -6px; - box-sizing: inherit; - width: inherit; - height: inherit; - border-radius: inherit; - opacity: 1; - border: inherit; - border-color: transparent; - border-top-color: white; } - -.vjs-seeking .vjs-loading-spinner:before, -.vjs-seeking .vjs-loading-spinner:after, -.vjs-waiting .vjs-loading-spinner:before, -.vjs-waiting .vjs-loading-spinner:after { - -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; - animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite; } - -.vjs-seeking .vjs-loading-spinner:before, -.vjs-waiting .vjs-loading-spinner:before { - border-top-color: white; } - -.vjs-seeking .vjs-loading-spinner:after, -.vjs-waiting .vjs-loading-spinner:after { - border-top-color: white; - -webkit-animation-delay: 0.44s; - animation-delay: 0.44s; } - -@keyframes vjs-spinner-spin { - 100% { - transform: rotate(360deg); } } - -@-webkit-keyframes vjs-spinner-spin { - 100% { - -webkit-transform: rotate(360deg); } } - -@keyframes vjs-spinner-fade { - 0% { - border-top-color: #73859f; } - 20% { - border-top-color: #73859f; } - 35% { - border-top-color: white; } - 60% { - border-top-color: #73859f; } - 100% { - border-top-color: #73859f; } } - -@-webkit-keyframes vjs-spinner-fade { - 0% { - border-top-color: #73859f; } - 20% { - border-top-color: #73859f; } - 35% { - border-top-color: white; } - 60% { - border-top-color: #73859f; } - 100% { - border-top-color: #73859f; } } - -.vjs-chapters-button .vjs-menu ul { - width: 24em; } - -.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-custom-control-spacer { - -webkit-box-flex: auto; - -moz-box-flex: auto; - -webkit-flex: auto; - -ms-flex: auto; - flex: auto; } - -.video-js.vjs-layout-tiny:not(.vjs-fullscreen).vjs-no-flex .vjs-custom-control-spacer { - width: auto; } - -.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-remaining-time, -.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-playback-rate, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-progress-control, -.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-menu-button, -.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subtitles-button { - display: none; } - -.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-remaining-time, -.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-playback-rate, -.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-control, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-menu-button, -.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subtitles-button { - display: none; } - -.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-current-time, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-time-divider, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-duration, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-remaining-time, -.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-playback-rate, -.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-mute-control, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-control, -.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-chapters-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-captions-button, .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-subtitles-button { - display: none; } - -.vjs-caption-settings { - position: relative; - top: 1em; - background-color: #2B333F; - background-color: rgba(43, 51, 63, 0.75); - color: #fff; - margin: 0 auto; - padding: 0.5em; - height: 15em; - font-size: 12px; - width: 40em; } - -.vjs-caption-settings .vjs-tracksettings { - top: 0; - bottom: 2em; - left: 0; - right: 0; - position: absolute; - overflow: auto; } - -.vjs-caption-settings .vjs-tracksettings-colors, -.vjs-caption-settings .vjs-tracksettings-font { - float: left; } - -.vjs-caption-settings .vjs-tracksettings-colors:after, -.vjs-caption-settings .vjs-tracksettings-font:after, -.vjs-caption-settings .vjs-tracksettings-controls:after { - clear: both; } - -.vjs-caption-settings .vjs-tracksettings-controls { - position: absolute; - bottom: 1em; - right: 1em; } - -.vjs-caption-settings .vjs-tracksetting { - margin: 5px; - padding: 3px; - min-height: 40px; } - -.vjs-caption-settings .vjs-tracksetting label { - display: block; - width: 100px; - margin-bottom: 5px; } - -.vjs-caption-settings .vjs-tracksetting span { - display: inline; - margin-left: 5px; } - -.vjs-caption-settings .vjs-tracksetting > div { - margin-bottom: 5px; - min-height: 20px; } - -.vjs-caption-settings .vjs-tracksetting > div:last-child { - margin-bottom: 0; - padding-bottom: 0; - min-height: 0; } - -.vjs-caption-settings label > input { - margin-right: 10px; } - -.vjs-caption-settings input[type="button"] { - width: 40px; - height: 40px; } - -.video-js .vjs-modal-dialog { - background: rgba(0, 0, 0, 0.8); - background: -webkit-linear-gradient(-90deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0)); - background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0)); } - -.vjs-modal-dialog .vjs-modal-dialog-content { - font-size: 1.2em; - line-height: 1.5; - padding: 20px 24px; - z-index: 1; } diff --git a/vendor/assets/javascripts/videojs/video-js.min.css b/vendor/assets/javascripts/videojs/video-js.min.css deleted file mode 100755 index face351b1a7..00000000000 --- a/vendor/assets/javascripts/videojs/video-js.min.css +++ /dev/null @@ -1 +0,0 @@ -.video-js .vjs-big-play-button:before,.video-js .vjs-control:before,.video-js .vjs-modal-dialog,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button:before,.video-js .vjs-control:before{text-align:center}@font-face{font-family:VideoJS;src:url(font/VideoJS.eot?#iefix) format("eot")}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAA4wAAoAAAAAFfAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAD4AAABWUZFeBGNtYXAAAAE0AAAAOgAAAUriLxC2Z2x5ZgAAAXAAAAnnAAAO5OV/F/5oZWFkAAALWAAAACsAAAA2C4eUa2hoZWEAAAuEAAAAGAAAACQOogcfaG10eAAAC5wAAAAPAAAAeNIAAABsb2NhAAALrAAAAD4AAAA+MMgtQm1heHAAAAvsAAAAHwAAACABLwB5bmFtZQAADAwAAAElAAACCtXH9aBwb3N0AAANNAAAAPkAAAF5vawAenicY2BkZ2CcwMDKwMFSyPKMgYHhF4RmjmEIZzzHwMDEwMrMgBUEpLmmMDh8ZPwoyw7iLmSHCDOCCADu/Qo9AAB4nGNgYGBmgGAZBkYGEHAB8hjBfBYGDSDNBqQZGZgYGD7K/v8PUvCREUTzM0DVAwEjG8OIBwCOWgbUAAB4nI1XfVBU1xV/574vlsUlj/14grDs48FuAgaR3X2LEnY3UZSgEkTwAySAgkIwI8bRfFDjTszYCWRMW9lNa4y2meokmq+2k5ia0dpkmknbkWgSSW3GyaaNf0RTx0wxX7A3Pe/tQmIgHXf3vXvvueeee+45v3POXQYY/PCD/CBDGAYkIE2sxg+OXSJmhmH1OaFX6MU5C5PDMCZi5Rg2i+ELGSthwM14NCbgYGSBIZfhFA1H6Zu0OS0NDkMVfg+npdFm+maCvigI0JBIQIMg0BdJGdTj9ylj7nr+b97+Hl8C1+H2xN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QAZQBvAEoAUwBWAGUAcgBzAGkAbwBuACAAMQAuADAAVgBpAGQAZQBvAEoAUwBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAACAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAAECAQMBBAEFAQYBBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4EcGxheQtwbGF5LWNpcmNsZQVwYXVzZQt2b2x1bWUtbXV0ZQp2b2x1bWUtbG93CnZvbHVtZS1taWQLdm9sdW1lLWhpZ2gQZnVsbHNjcmVlbi1lbnRlcg9mdWxsc2NyZWVuLWV4aXQGc3F1YXJlB3NwaW5uZXIJc3VidGl0bGVzCGNhcHRpb25zCGNoYXB0ZXJzBXNoYXJlA2NvZwZjaXJjbGUOY2lyY2xlLW91dGxpbmUTY2lyY2xlLWlubmVyLWNpcmNsZQJoZAZjYW5jZWwGcmVwbGF5CGZhY2Vib29rBWdwbHVzCGxpbmtlZGluB3R3aXR0ZXIGdHVtYmxyCXBpbnRlcmVzdBFhdWRpby1kZXNjcmlwdGlvbgAAAAAA) format("truetype");font-weight:400;font-style:normal}.vjs-icon-play,.video-js .vjs-big-play-button,.video-js .vjs-play-control{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play:before,.video-js .vjs-big-play-button:before,.video-js .vjs-play-control:before{content:'\f101'}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:'\f102'}.vjs-icon-pause,.video-js .vjs-play-control.vjs-playing{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pause:before,.video-js .vjs-play-control.vjs-playing:before{content:'\f103'}.vjs-icon-volume-mute,.video-js .vjs-mute-control.vjs-vol-0,.video-js .vjs-volume-menu-button.vjs-vol-0{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mute:before,.video-js .vjs-mute-control.vjs-vol-0:before,.video-js .vjs-volume-menu-button.vjs-vol-0:before{content:'\f104'}.vjs-icon-volume-low,.video-js .vjs-mute-control.vjs-vol-1,.video-js .vjs-volume-menu-button.vjs-vol-1{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-low:before,.video-js .vjs-mute-control.vjs-vol-1:before,.video-js .vjs-volume-menu-button.vjs-vol-1:before{content:'\f105'}.vjs-icon-volume-mid,.video-js .vjs-mute-control.vjs-vol-2,.video-js .vjs-volume-menu-button.vjs-vol-2{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mid:before,.video-js .vjs-mute-control.vjs-vol-2:before,.video-js .vjs-volume-menu-button.vjs-vol-2:before{content:'\f106'}.vjs-icon-volume-high,.video-js .vjs-mute-control,.video-js .vjs-volume-menu-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-high:before,.video-js .vjs-mute-control:before,.video-js .vjs-volume-menu-button:before{content:'\f107'}.vjs-icon-fullscreen-enter,.video-js .vjs-fullscreen-control{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-enter:before,.video-js .vjs-fullscreen-control:before{content:'\f108'}.vjs-icon-fullscreen-exit,.video-js.vjs-fullscreen .vjs-fullscreen-control{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-exit:before,.video-js.vjs-fullscreen .vjs-fullscreen-control:before{content:'\f109'}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:'\f10a'}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:'\f10b'}.vjs-icon-subtitles,.video-js .vjs-subtitles-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-subtitles:before,.video-js .vjs-subtitles-button:before{content:'\f10c'}.vjs-icon-captions,.video-js .vjs-captions-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-captions:before,.video-js .vjs-captions-button:before{content:'\f10d'}.vjs-icon-chapters,.video-js .vjs-chapters-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-chapters:before,.video-js .vjs-chapters-button:before{content:'\f10e'}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:'\f10f'}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:'\f110'}.vjs-icon-circle,.video-js .vjs-mouse-display,.video-js .vjs-play-progress,.video-js .vjs-volume-level{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle:before,.video-js .vjs-mouse-display:before,.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before{content:'\f111'}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:'\f112'}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:'\f113'}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:'\f114'}.vjs-icon-cancel,.video-js .vjs-control.vjs-close-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cancel:before,.video-js .vjs-control.vjs-close-button:before{content:'\f115'}.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay:before{content:'\f116'}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:'\f117'}.vjs-icon-gplus{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-gplus:before{content:'\f118'}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:'\f119'}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:'\f11a'}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:'\f11b'}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:'\f11c'}.vjs-icon-audio-description,.video-js .vjs-descriptions-button{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio-description:before,.video-js .vjs-descriptions-button:before{content:'\f11d'}.video-js{display:block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js *,.video-js :before,.video-js :after{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.video-js.vjs-fluid,.video-js.vjs-16-9,.video-js.vjs-4-3{width:100%;max-width:100%;height:0}.video-js.vjs-16-9{padding-top:56.25%}.video-js.vjs-4-3{padding-top:75%}.video-js.vjs-fill{width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}body.vjs-full-window{padding:0;margin:0;height:100%;overflow-y:auto}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen{width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66A8CC}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.5em;width:3em;display:block;position:absolute;top:10px;left:10px;padding:0;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2B333F;background-color:rgba(43,51,63,.7);-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-big-play-centered .vjs-big-play-button{top:50%;left:50%;margin-top:-.75em;margin-left:-1.5em}.video-js:hover .vjs-big-play-button,.video-js .vjs-big-play-button:focus{outline:0;border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button,.vjs-error .vjs-big-play-button{display:none}.video-js button{background:0 0;border:0;color:inherit;display:inline-block;overflow:visible;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;overflow:auto}.vjs-scrubbing .vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-menu li:focus,.vjs-menu li:hover{outline:0;background-color:#73859f;background-color:rgba(115,133,159,.5)}.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2B333F}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2B333F;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-workinghover .vjs-menu-button-popup:hover .vjs-menu,.vjs-menu-button-popup .vjs-menu.vjs-lock-showing{display:block}.video-js .vjs-menu-button-inline{-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline:hover,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js.vjs-no-flex .vjs-menu-button-inline{width:12em}.video-js .vjs-menu-button-inline.vjs-slider-active{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;-webkit-transition:all .4s;-moz-transition:all .4s;-o-transition:all .4s;transition:all .4s}.vjs-menu-button-inline:hover .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline.vjs-slider-active .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2B333F;background-color:rgba(43,51,63,.7)}.vjs-has-started .vjs-control-bar{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;visibility:visible;opacity:1;-webkit-transition:visibility .1s,opacity .1s;-moz-transition:visibility .1s,opacity .1s;-o-transition:visibility .1s,opacity .1s;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar,.vjs-error .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}@media \0screen{.vjs-user-inactive.vjs-playing .vjs-control-bar :before{content:""}}.vjs-has-started.vjs-no-flex .vjs-control-bar{display:table}.video-js .vjs-control{outline:0;position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none}.video-js .vjs-control:before{font-size:1.8em;line-height:1.67}.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before,.video-js .vjs-control:focus{text-shadow:0 0 1em #fff}.video-js .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{-webkit-box-flex:auto;-moz-box-flex:auto;-webkit-flex:auto;-ms-flex:auto;flex:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-width:4em}.vjs-live .vjs-progress-control{display:none}.video-js .vjs-progress-holder{-webkit-box-flex:auto;-moz-box-flex:auto;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;transition:all .2s;height:.3em}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.666666666666666666em}.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-mouse-display:after,.video-js .vjs-progress-control:hover .vjs-play-progress:after{font-family:Arial,Helvetica,sans-serif;visibility:visible;font-size:.6em}.video-js .vjs-progress-holder .vjs-play-progress,.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-tooltip-progress-bar,.video-js .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:.3em;margin:0;padding:0;width:0;left:0;top:0}.video-js .vjs-mouse-display:before{display:none}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{position:absolute;top:-.333333333333333em;right:-.5em;font-size:.9em}.video-js .vjs-time-tooltip,.video-js .vjs-mouse-display:after,.video-js .vjs-play-progress:after{visibility:hidden;pointer-events:none;position:absolute;top:-3.4em;right:-1.9em;font-size:.9em;color:#000;content:attr(data-current-time);padding:6px 8px 8px;background-color:#fff;background-color:rgba(255,255,255,.8);-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em}.video-js .vjs-time-tooltip,.video-js .vjs-play-progress:before,.video-js .vjs-play-progress:after{z-index:1}.video-js .vjs-progress-control .vjs-keep-tooltips-inside:after{display:none}.video-js .vjs-load-progress{background:#bfc7d3;background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:#fff;background:rgba(115,133,159,.75)}.video-js.vjs-no-flex .vjs-progress-control{width:auto}.video-js .vjs-time-tooltip{display:inline-block;height:2.4em;position:relative;float:right;right:-1.9em}.vjs-tooltip-progress-bar{visibility:hidden}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display:after{visibility:hidden;opacity:0;-webkit-transition:visibility 1s,opacity 1s;-moz-transition:visibility 1s,opacity 1s;-o-transition:visibility 1s,opacity 1s;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display,.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display:after{display:none}.vjs-mouse-display .vjs-time-tooltip,.video-js .vjs-progress-control .vjs-mouse-display:after{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{outline:0;position:relative;cursor:pointer;padding:0;margin:0 .45em;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;-webkit-box-shadow:0 0 1em #fff;-moz-box-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control,.video-js .vjs-volume-menu-button{cursor:pointer;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none}.video-js .vjs-volume-control{width:5em;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu{display:block;width:0;height:0;border-top-color:transparent}.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu{left:.5em;height:8em}.vjs-menu-button-popup.vjs-volume-menu-button-horizontal .vjs-menu{left:-2em}.vjs-menu-button-popup.vjs-volume-menu-button .vjs-menu-content{height:0;width:0;overflow-x:hidden;overflow-y:hidden}.vjs-volume-menu-button-vertical:hover .vjs-menu-content,.vjs-volume-menu-button-vertical:focus .vjs-menu-content,.vjs-volume-menu-button-vertical.vjs-slider-active .vjs-menu-content,.vjs-volume-menu-button-vertical .vjs-lock-showing .vjs-menu-content{height:8em;width:2.9em}.vjs-volume-menu-button-horizontal:hover .vjs-menu-content,.vjs-volume-menu-button-horizontal:focus .vjs-menu-content,.vjs-volume-menu-button-horizontal .vjs-slider-active .vjs-menu-content,.vjs-volume-menu-button-horizontal .vjs-lock-showing .vjs-menu-content{height:2.9em;width:8em}.vjs-volume-menu-button.vjs-menu-button-inline .vjs-menu-content{background-color:transparent!important}.vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-poster img{display:block;vertical-align:middle;margin:0 auto;max-height:100%;padding:0;width:100%}.vjs-has-started .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster{display:block}.vjs-controls-disabled .vjs-poster{display:none}.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-live-control{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-flex:auto;-moz-box-flex:auto;-webkit-flex:auto;-ms-flex:auto;flex:auto;font-size:1em;line-height:3em}.vjs-no-flex .vjs-live-control{display:table-cell;width:auto;text-align:left}.video-js .vjs-time-control{-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control{display:none}.video-js .vjs-current-time,.vjs-no-flex .vjs-current-time{display:none}.video-js .vjs-duration,.vjs-no-flex .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-live .vjs-time-divider{display:none}.video-js .vjs-play-control{cursor:pointer;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em;background-color:#000;background-color:rgba(0,0,0,.5)}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{-moz-transform:translateY(-3em);-ms-transform:translateY(-3em);-o-transform:translateY(-3em);-webkit-transform:translateY(-3em);transform:translateY(-3em)}.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{-moz-transform:translateY(-1.5em);-ms-transform:translateY(-1.5em);-o-transform:translateY(-1.5em);-webkit-transform:translateY(-1.5em);transform:translateY(-1.5em)}.video-js .vjs-fullscreen-control{cursor:pointer;-webkit-box-flex:none;-moz-box-flex:none;-webkit-flex:none;-ms-flex:none;flex:none}.vjs-playback-rate .vjs-playback-rate-value{font-size:1.5em;line-height:2;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:'X';font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block}.vjs-loading-spinner:before,.vjs-loading-spinner:after{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:before,.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(0.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(0.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-spin{100%{transform:rotate(360deg)}}@-webkit-keyframes vjs-spinner-spin{100%{-webkit-transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}100%{border-top-color:#73859f}}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-custom-control-spacer{-webkit-box-flex:auto;-moz-box-flex:auto;-webkit-flex:auto;-ms-flex:auto;flex:auto}.video-js.vjs-layout-tiny:not(.vjs-fullscreen).vjs-no-flex .vjs-custom-control-spacer{width:auto}.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-progress-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-menu-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subtitles-button{display:none}.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-control,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-menu-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subtitles-button{display:none}.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-control,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-subtitles-button{display:none}.vjs-caption-settings{position:relative;top:1em;background-color:#2B333F;background-color:rgba(43,51,63,.75);color:#fff;margin:0 auto;padding:.5em;height:15em;font-size:12px;width:40em}.vjs-caption-settings .vjs-tracksettings{top:0;bottom:2em;left:0;right:0;position:absolute;overflow:auto}.vjs-caption-settings .vjs-tracksettings-colors,.vjs-caption-settings .vjs-tracksettings-font{float:left}.vjs-caption-settings .vjs-tracksettings-colors:after,.vjs-caption-settings .vjs-tracksettings-font:after,.vjs-caption-settings .vjs-tracksettings-controls:after{clear:both}.vjs-caption-settings .vjs-tracksettings-controls{position:absolute;bottom:1em;right:1em}.vjs-caption-settings .vjs-tracksetting{margin:5px;padding:3px;min-height:40px}.vjs-caption-settings .vjs-tracksetting label{display:block;width:100px;margin-bottom:5px}.vjs-caption-settings .vjs-tracksetting span{display:inline;margin-left:5px}.vjs-caption-settings .vjs-tracksetting>div{margin-bottom:5px;min-height:20px}.vjs-caption-settings .vjs-tracksetting>div:last-child{margin-bottom:0;padding-bottom:0;min-height:0}.vjs-caption-settings label>input{margin-right:10px}.vjs-caption-settings input[type=button]{width:40px;height:40px}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:-webkit-linear-gradient(-90deg,rgba(0,0,0,.8),rgba(255,255,255,0));background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0))}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1} \ No newline at end of file diff --git a/vendor/assets/javascripts/videojs/video-js.swf b/vendor/assets/javascripts/videojs/video-js.swf deleted file mode 100755 index a36648f3e34..00000000000 Binary files a/vendor/assets/javascripts/videojs/video-js.swf and /dev/null differ diff --git a/vendor/assets/javascripts/videojs/video.js b/vendor/assets/javascripts/videojs/video.js deleted file mode 100755 index 9fdb9cc208d..00000000000 --- a/vendor/assets/javascripts/videojs/video.js +++ /dev/null @@ -1,22872 +0,0 @@ -/** - * @license - * Video.js 5.9.0 - * Copyright Brightcove, Inc. - * Available under Apache License Version 2.0 - * - * - * Includes vtt.js - * Available under Apache License Version 2.0 - * - */ - -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.videojs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o logs the number of milliseconds it took for the deferred function to be invoked - */ -var now = nativeNow || function() { - return new Date().getTime(); -}; - -module.exports = now; - -},{"../internal/getNative":20}],5:[function(_dereq_,module,exports){ -var isObject = _dereq_('../lang/isObject'), - now = _dereq_('../date/now'); - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed invocations. Provide an options object to indicate that `func` - * should be invoked on the leading and/or trailing edge of the `wait` timeout. - * Subsequent calls to the debounced function return the result of the last - * `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the debounced function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=false] Specify invoking on the leading - * edge of the timeout. - * @param {number} [options.maxWait] The maximum time `func` is allowed to be - * delayed before it's invoked. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // avoid costly calculations while the window size is in flux - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // invoke `sendMail` when the click event is fired, debouncing subsequent calls - * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // ensure `batchLog` is invoked once after 1 second of debounced calls - * var source = new EventSource('/stream'); - * jQuery(source).on('message', _.debounce(batchLog, 250, { - * 'maxWait': 1000 - * })); - * - * // cancel a debounced call - * var todoChanges = _.debounce(batchLog, 1000); - * Object.observe(models.todo, todoChanges); - * - * Object.observe(models, function(changes) { - * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { - * todoChanges.cancel(); - * } - * }, ['delete']); - * - * // ...at some point `models.todo` is changed - * models.todo.completed = true; - * - * // ...before 1 second has passed `models.todo` is deleted - * // which cancels the debounced `todoChanges` call - * delete models.todo; - */ -function debounce(func, wait, options) { - var args, - maxTimeoutId, - result, - stamp, - thisArg, - timeoutId, - trailingCall, - lastCalled = 0, - maxWait = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = wait < 0 ? 0 : (+wait || 0); - if (options === true) { - var leading = true; - trailing = false; - } else if (isObject(options)) { - leading = !!options.leading; - maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function cancel() { - if (timeoutId) { - clearTimeout(timeoutId); - } - if (maxTimeoutId) { - clearTimeout(maxTimeoutId); - } - lastCalled = 0; - maxTimeoutId = timeoutId = trailingCall = undefined; - } - - function complete(isCalled, id) { - if (id) { - clearTimeout(id); - } - maxTimeoutId = timeoutId = trailingCall = undefined; - if (isCalled) { - lastCalled = now(); - result = func.apply(thisArg, args); - if (!timeoutId && !maxTimeoutId) { - args = thisArg = undefined; - } - } - } - - function delayed() { - var remaining = wait - (now() - stamp); - if (remaining <= 0 || remaining > wait) { - complete(trailingCall, maxTimeoutId); - } else { - timeoutId = setTimeout(delayed, remaining); - } - } - - function maxDelayed() { - complete(trailing, timeoutId); - } - - function debounced() { - args = arguments; - stamp = now(); - thisArg = this; - trailingCall = trailing && (timeoutId || !leading); - - if (maxWait === false) { - var leadingCall = leading && !timeoutId; - } else { - if (!maxTimeoutId && !leading) { - lastCalled = stamp; - } - var remaining = maxWait - (stamp - lastCalled), - isCalled = remaining <= 0 || remaining > maxWait; - - if (isCalled) { - if (maxTimeoutId) { - maxTimeoutId = clearTimeout(maxTimeoutId); - } - lastCalled = stamp; - result = func.apply(thisArg, args); - } - else if (!maxTimeoutId) { - maxTimeoutId = setTimeout(maxDelayed, remaining); - } - } - if (isCalled && timeoutId) { - timeoutId = clearTimeout(timeoutId); - } - else if (!timeoutId && wait !== maxWait) { - timeoutId = setTimeout(delayed, wait); - } - if (leadingCall) { - isCalled = true; - result = func.apply(thisArg, args); - } - if (isCalled && !timeoutId && !maxTimeoutId) { - args = thisArg = undefined; - } - return result; - } - debounced.cancel = cancel; - return debounced; -} - -module.exports = debounce; - -},{"../date/now":4,"../lang/isObject":33}],6:[function(_dereq_,module,exports){ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. - * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; -} - -module.exports = restParam; - -},{}],7:[function(_dereq_,module,exports){ -var debounce = _dereq_('./debounce'), - isObject = _dereq_('../lang/isObject'); - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed invocations. Provide an options object to indicate - * that `func` should be invoked on the leading and/or trailing edge of the - * `wait` timeout. Subsequent calls to the throttled function return the - * result of the last `func` call. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the throttled function is - * invoked more than once during the `wait` timeout. - * - * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options] The options object. - * @param {boolean} [options.leading=true] Specify invoking on the leading - * edge of the timeout. - * @param {boolean} [options.trailing=true] Specify invoking on the trailing - * edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // avoid excessively updating the position while scrolling - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes - * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { - * 'trailing': false - * })); - * - * // cancel a trailing throttled call - * jQuery(window).on('popstate', throttled.cancel); - */ -function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (options === false) { - leading = false; - } else if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); -} - -module.exports = throttle; - -},{"../lang/isObject":33,"./debounce":5}],8:[function(_dereq_,module,exports){ -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function arrayCopy(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -module.exports = arrayCopy; - -},{}],9:[function(_dereq_,module,exports){ -/** - * A specialized version of `_.forEach` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEach; - -},{}],10:[function(_dereq_,module,exports){ -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property names to copy. - * @param {Object} [object={}] The object to copy properties to. - * @returns {Object} Returns `object`. - */ -function baseCopy(source, props, object) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - object[key] = source[key]; - } - return object; -} - -module.exports = baseCopy; - -},{}],11:[function(_dereq_,module,exports){ -var createBaseFor = _dereq_('./createBaseFor'); - -/** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -module.exports = baseFor; - -},{"./createBaseFor":18}],12:[function(_dereq_,module,exports){ -var baseFor = _dereq_('./baseFor'), - keysIn = _dereq_('../object/keysIn'); - -/** - * The base implementation of `_.forIn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForIn(object, iteratee) { - return baseFor(object, iteratee, keysIn); -} - -module.exports = baseForIn; - -},{"../object/keysIn":39,"./baseFor":11}],13:[function(_dereq_,module,exports){ -var arrayEach = _dereq_('./arrayEach'), - baseMergeDeep = _dereq_('./baseMergeDeep'), - isArray = _dereq_('../lang/isArray'), - isArrayLike = _dereq_('./isArrayLike'), - isObject = _dereq_('../lang/isObject'), - isObjectLike = _dereq_('./isObjectLike'), - isTypedArray = _dereq_('../lang/isTypedArray'), - keys = _dereq_('../object/keys'); - -/** - * The base implementation of `_.merge` without support for argument juggling, - * multiple sources, and `this` binding `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} [customizer] The function to customize merged values. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {Object} Returns `object`. - */ -function baseMerge(object, source, customizer, stackA, stackB) { - if (!isObject(object)) { - return object; - } - var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), - props = isSrcArr ? undefined : keys(source); - - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } - if (isObjectLike(srcValue)) { - stackA || (stackA = []); - stackB || (stackB = []); - baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); - } - else { - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = result === undefined; - - if (isCommon) { - result = srcValue; - } - if ((result !== undefined || (isSrcArr && !(key in object))) && - (isCommon || (result === result ? (result !== value) : (value === value)))) { - object[key] = result; - } - } - }); - return object; -} - -module.exports = baseMerge; - -},{"../lang/isArray":30,"../lang/isObject":33,"../lang/isTypedArray":36,"../object/keys":38,"./arrayEach":9,"./baseMergeDeep":14,"./isArrayLike":21,"./isObjectLike":26}],14:[function(_dereq_,module,exports){ -var arrayCopy = _dereq_('./arrayCopy'), - isArguments = _dereq_('../lang/isArguments'), - isArray = _dereq_('../lang/isArray'), - isArrayLike = _dereq_('./isArrayLike'), - isPlainObject = _dereq_('../lang/isPlainObject'), - isTypedArray = _dereq_('../lang/isTypedArray'), - toPlainObject = _dereq_('../lang/toPlainObject'); - -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize merged values. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates values with source counterparts. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { - var length = stackA.length, - srcValue = source[key]; - - while (length--) { - if (stackA[length] == srcValue) { - object[key] = stackB[length]; - return; - } - } - var value = object[key], - result = customizer ? customizer(value, srcValue, key, object, source) : undefined, - isCommon = result === undefined; - - if (isCommon) { - result = srcValue; - if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { - result = isArray(value) - ? value - : (isArrayLike(value) ? arrayCopy(value) : []); - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - result = isArguments(value) - ? toPlainObject(value) - : (isPlainObject(value) ? value : {}); - } - else { - isCommon = false; - } - } - // Add the source value to the stack of traversed objects and associate - // it with its merged value. - stackA.push(srcValue); - stackB.push(result); - - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); - } else if (result === result ? (result !== value) : (value === value)) { - object[key] = result; - } -} - -module.exports = baseMergeDeep; - -},{"../lang/isArguments":29,"../lang/isArray":30,"../lang/isPlainObject":34,"../lang/isTypedArray":36,"../lang/toPlainObject":37,"./arrayCopy":8,"./isArrayLike":21}],15:[function(_dereq_,module,exports){ -var toObject = _dereq_('./toObject'); - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : toObject(object)[key]; - }; -} - -module.exports = baseProperty; - -},{"./toObject":28}],16:[function(_dereq_,module,exports){ -var identity = _dereq_('../utility/identity'); - -/** - * A specialized version of `baseCallback` which only supports `this` binding - * and specifying the number of arguments to provide to `func`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function bindCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - if (thisArg === undefined) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - case 5: return function(value, other, key, object, source) { - return func.call(thisArg, value, other, key, object, source); - }; - } - return function() { - return func.apply(thisArg, arguments); - }; -} - -module.exports = bindCallback; - -},{"../utility/identity":42}],17:[function(_dereq_,module,exports){ -var bindCallback = _dereq_('./bindCallback'), - isIterateeCall = _dereq_('./isIterateeCall'), - restParam = _dereq_('../function/restParam'); - -/** - * Creates a `_.assign`, `_.defaults`, or `_.merge` function. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return restParam(function(object, sources) { - var index = -1, - length = object == null ? 0 : sources.length, - customizer = length > 2 ? sources[length - 2] : undefined, - guard = length > 2 ? sources[2] : undefined, - thisArg = length > 1 ? sources[length - 1] : undefined; - - if (typeof customizer == 'function') { - customizer = bindCallback(customizer, thisArg, 5); - length -= 2; - } else { - customizer = typeof thisArg == 'function' ? thisArg : undefined; - length -= (customizer ? 1 : 0); - } - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, customizer); - } - } - return object; - }); -} - -module.exports = createAssigner; - -},{"../function/restParam":6,"./bindCallback":16,"./isIterateeCall":24}],18:[function(_dereq_,module,exports){ -var toObject = _dereq_('./toObject'); - -/** - * Creates a base function for `_.forIn` or `_.forInRight`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var iterable = toObject(object), - props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -module.exports = createBaseFor; - -},{"./toObject":28}],19:[function(_dereq_,module,exports){ -var baseProperty = _dereq_('./baseProperty'); - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -module.exports = getLength; - -},{"./baseProperty":15}],20:[function(_dereq_,module,exports){ -var isNative = _dereq_('../lang/isNative'); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; -} - -module.exports = getNative; - -},{"../lang/isNative":32}],21:[function(_dereq_,module,exports){ -var getLength = _dereq_('./getLength'), - isLength = _dereq_('./isLength'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -module.exports = isArrayLike; - -},{"./getLength":19,"./isLength":25}],22:[function(_dereq_,module,exports){ -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -var isHostObject = (function() { - try { - Object({ 'toString': 0 } + ''); - } catch(e) { - return function() { return false; }; - } - return function(value) { - // IE < 9 presents many host objects as `Object` objects that can coerce - // to strings despite having improperly defined `toString` methods. - return typeof value.toString != 'function' && typeof (value + '') == 'string'; - }; -}()); - -module.exports = isHostObject; - -},{}],23:[function(_dereq_,module,exports){ -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -module.exports = isIndex; - -},{}],24:[function(_dereq_,module,exports){ -var isArrayLike = _dereq_('./isArrayLike'), - isIndex = _dereq_('./isIndex'), - isObject = _dereq_('../lang/isObject'); - -/** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; -} - -module.exports = isIterateeCall; - -},{"../lang/isObject":33,"./isArrayLike":21,"./isIndex":23}],25:[function(_dereq_,module,exports){ -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = isLength; - -},{}],26:[function(_dereq_,module,exports){ -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = isObjectLike; - -},{}],27:[function(_dereq_,module,exports){ -var isArguments = _dereq_('../lang/isArguments'), - isArray = _dereq_('../lang/isArray'), - isIndex = _dereq_('./isIndex'), - isLength = _dereq_('./isLength'), - isString = _dereq_('../lang/isString'), - keysIn = _dereq_('../object/keysIn'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; - - var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object) || isString(object)); - - var index = -1, - result = []; - - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } - } - return result; -} - -module.exports = shimKeys; - -},{"../lang/isArguments":29,"../lang/isArray":30,"../lang/isString":35,"../object/keysIn":39,"./isIndex":23,"./isLength":25}],28:[function(_dereq_,module,exports){ -var isObject = _dereq_('../lang/isObject'), - isString = _dereq_('../lang/isString'), - support = _dereq_('../support'); - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - if (support.unindexedChars && isString(value)) { - var index = -1, - length = value.length, - result = Object(value); - - while (++index < length) { - result[index] = value.charAt(index); - } - return result; - } - return isObject(value) ? value : Object(value); -} - -module.exports = toObject; - -},{"../lang/isObject":33,"../lang/isString":35,"../support":41}],29:[function(_dereq_,module,exports){ -var isArrayLike = _dereq_('../internal/isArrayLike'), - isObjectLike = _dereq_('../internal/isObjectLike'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && - hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); -} - -module.exports = isArguments; - -},{"../internal/isArrayLike":21,"../internal/isObjectLike":26}],30:[function(_dereq_,module,exports){ -var getNative = _dereq_('../internal/getNative'), - isLength = _dereq_('../internal/isLength'), - isObjectLike = _dereq_('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = getNative(Array, 'isArray'); - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(function() { return arguments; }()); - * // => false - */ -var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; -}; - -module.exports = isArray; - -},{"../internal/getNative":20,"../internal/isLength":25,"../internal/isObjectLike":26}],31:[function(_dereq_,module,exports){ -var isObject = _dereq_('./isObject'); - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 which returns 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -module.exports = isFunction; - -},{"./isObject":33}],32:[function(_dereq_,module,exports){ -var isFunction = _dereq_('./isFunction'), - isHostObject = _dereq_('../internal/isHostObject'), - isObjectLike = _dereq_('../internal/isObjectLike'); - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (value == null) { - return false; - } - if (isFunction(value)) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); -} - -module.exports = isNative; - -},{"../internal/isHostObject":22,"../internal/isObjectLike":26,"./isFunction":31}],33:[function(_dereq_,module,exports){ -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - -},{}],34:[function(_dereq_,module,exports){ -var baseForIn = _dereq_('../internal/baseForIn'), - isArguments = _dereq_('./isArguments'), - isHostObject = _dereq_('../internal/isHostObject'), - isObjectLike = _dereq_('../internal/isObjectLike'), - support = _dereq_('../support'); - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * **Note:** This method assumes objects created by the `Object` constructor - * have no inherited enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - var Ctor; - - // Exit early for non `Object` objects. - if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) || - (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { - return false; - } - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - var result; - if (support.ownLast) { - baseForIn(value, function(subValue, key, object) { - result = hasOwnProperty.call(object, key); - return false; - }); - return result !== false; - } - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - baseForIn(value, function(subValue, key) { - result = key; - }); - return result === undefined || hasOwnProperty.call(value, result); -} - -module.exports = isPlainObject; - -},{"../internal/baseForIn":12,"../internal/isHostObject":22,"../internal/isObjectLike":26,"../support":41,"./isArguments":29}],35:[function(_dereq_,module,exports){ -var isObjectLike = _dereq_('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); -} - -module.exports = isString; - -},{"../internal/isObjectLike":26}],36:[function(_dereq_,module,exports){ -var isLength = _dereq_('../internal/isLength'), - isObjectLike = _dereq_('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -function isTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; -} - -module.exports = isTypedArray; - -},{"../internal/isLength":25,"../internal/isObjectLike":26}],37:[function(_dereq_,module,exports){ -var baseCopy = _dereq_('../internal/baseCopy'), - keysIn = _dereq_('../object/keysIn'); - -/** - * Converts `value` to a plain object flattening inherited enumerable - * properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return baseCopy(value, keysIn(value)); -} - -module.exports = toPlainObject; - -},{"../internal/baseCopy":10,"../object/keysIn":39}],38:[function(_dereq_,module,exports){ -var getNative = _dereq_('../internal/getNative'), - isArrayLike = _dereq_('../internal/isArrayLike'), - isObject = _dereq_('../lang/isObject'), - shimKeys = _dereq_('../internal/shimKeys'), - support = _dereq_('../support'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeKeys = getNative(Object, 'keys'); - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -var keys = !nativeKeys ? shimKeys : function(object) { - var Ctor = object == null ? undefined : object.constructor; - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) { - return shimKeys(object); - } - return isObject(object) ? nativeKeys(object) : []; -}; - -module.exports = keys; - -},{"../internal/getNative":20,"../internal/isArrayLike":21,"../internal/shimKeys":27,"../lang/isObject":33,"../support":41}],39:[function(_dereq_,module,exports){ -var arrayEach = _dereq_('../internal/arrayEach'), - isArguments = _dereq_('../lang/isArguments'), - isArray = _dereq_('../lang/isArray'), - isFunction = _dereq_('../lang/isFunction'), - isIndex = _dereq_('../internal/isIndex'), - isLength = _dereq_('../internal/isLength'), - isObject = _dereq_('../lang/isObject'), - isString = _dereq_('../lang/isString'), - support = _dereq_('../support'); - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -/** Used to fix the JScript `[[DontEnum]]` bug. */ -var shadowProps = [ - 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', - 'toLocaleString', 'toString', 'valueOf' -]; - -/** Used for native method references. */ -var errorProto = Error.prototype, - objectProto = Object.prototype, - stringProto = String.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Used to avoid iterating over non-enumerable properties in IE < 9. */ -var nonEnumProps = {}; -nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; -nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true }; -nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true }; -nonEnumProps[objectTag] = { 'constructor': true }; - -arrayEach(shadowProps, function(key) { - for (var tag in nonEnumProps) { - if (hasOwnProperty.call(nonEnumProps, tag)) { - var props = nonEnumProps[tag]; - props[key] = hasOwnProperty.call(props, key); - } - } -}); - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - - length = (length && isLength(length) && - (isArray(object) || isArguments(object) || isString(object)) && length) || 0; - - var Ctor = object.constructor, - index = -1, - proto = (isFunction(Ctor) && Ctor.prototype) || objectProto, - isProto = proto === object, - result = Array(length), - skipIndexes = length > 0, - skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error), - skipProto = support.enumPrototypes && isFunction(object); - - while (++index < length) { - result[index] = (index + ''); - } - // lodash skips the `constructor` property when it infers it's iterating - // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]` - // attribute of an existing property and the `constructor` property of a - // prototype defaults to non-enumerable. - for (var key in object) { - if (!(skipProto && key == 'prototype') && - !(skipErrorProps && (key == 'message' || key == 'name')) && - !(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - if (support.nonEnumShadows && object !== objectProto) { - var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)), - nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag]; - - if (tag == objectTag) { - proto = objectProto; - } - length = shadowProps.length; - while (length--) { - key = shadowProps[length]; - var nonEnum = nonEnums[key]; - if (!(isProto && nonEnum) && - (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) { - result.push(key); - } - } - } - return result; -} - -module.exports = keysIn; - -},{"../internal/arrayEach":9,"../internal/isIndex":23,"../internal/isLength":25,"../lang/isArguments":29,"../lang/isArray":30,"../lang/isFunction":31,"../lang/isObject":33,"../lang/isString":35,"../support":41}],40:[function(_dereq_,module,exports){ -var baseMerge = _dereq_('../internal/baseMerge'), - createAssigner = _dereq_('../internal/createAssigner'); - -/** - * Recursively merges own enumerable properties of the source object(s), that - * don't resolve to `undefined` into the destination object. Subsequent sources - * overwrite property assignments of previous sources. If `customizer` is - * provided it's invoked to produce the merged values of the destination and - * source properties. If `customizer` returns `undefined` merging is handled - * by the method instead. The `customizer` is bound to `thisArg` and invoked - * with five arguments: (objectValue, sourceValue, key, object, source). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. - * @example - * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] - * }; - * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] - * }; - * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } - * - * // using a customizer callback - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(object, other, function(a, b) { - * if (_.isArray(a)) { - * return a.concat(b); - * } - * }); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } - */ -var merge = createAssigner(baseMerge); - -module.exports = merge; - -},{"../internal/baseMerge":13,"../internal/createAssigner":17}],41:[function(_dereq_,module,exports){ -/** Used for native method references. */ -var arrayProto = Array.prototype, - errorProto = Error.prototype, - objectProto = Object.prototype; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; - -/** - * An object environment feature flags. - * - * @static - * @memberOf _ - * @type Object - */ -var support = {}; - -(function(x) { - var Ctor = function() { this.x = x; }, - object = { '0': x, 'length': x }, - props = []; - - Ctor.prototype = { 'valueOf': x, 'y': x }; - for (var key in new Ctor) { props.push(key); } - - /** - * Detect if `name` or `message` properties of `Error.prototype` are - * enumerable by default (IE < 9, Safari < 5.1). - * - * @memberOf _.support - * @type boolean - */ - support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || - propertyIsEnumerable.call(errorProto, 'name'); - - /** - * Detect if `prototype` properties are enumerable by default. - * - * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 - * (if the prototype or a property on the prototype has been set) - * incorrectly set the `[[Enumerable]]` value of a function's `prototype` - * property to `true`. - * - * @memberOf _.support - * @type boolean - */ - support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype'); - - /** - * Detect if properties shadowing those on `Object.prototype` are non-enumerable. - * - * In IE < 9 an object's own properties, shadowing non-enumerable ones, - * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug). - * - * @memberOf _.support - * @type boolean - */ - support.nonEnumShadows = !/valueOf/.test(props); - - /** - * Detect if own properties are iterated after inherited properties (IE < 9). - * - * @memberOf _.support - * @type boolean - */ - support.ownLast = props[0] != 'x'; - - /** - * Detect if `Array#shift` and `Array#splice` augment array-like objects - * correctly. - * - * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array - * `shift()` and `splice()` functions that fail to remove the last element, - * `value[0]`, of array-like objects even though the "length" property is - * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8, - * while `splice()` is buggy regardless of mode in IE < 9. - * - * @memberOf _.support - * @type boolean - */ - support.spliceObjects = (splice.call(object, 0, 1), !object[0]); - - /** - * Detect lack of support for accessing string characters by index. - * - * IE < 8 can't access characters by index. IE 8 can only access characters - * by index on string literals, not string objects. - * - * @memberOf _.support - * @type boolean - */ - support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; -}(1, 0)); - -module.exports = support; - -},{}],42:[function(_dereq_,module,exports){ -/** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'user': 'fred' }; - * - * _.identity(object) === object; - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; - -},{}],43:[function(_dereq_,module,exports){ -'use strict'; - -var keys = _dereq_('object-keys'); - -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - if (typeof sym === 'string') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(Object(sym) instanceof Symbol)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } - if (keys(obj).length !== 0) { return false; } - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - -},{"object-keys":50}],44:[function(_dereq_,module,exports){ -'use strict'; - -// modified from https://github.com/es-shims/es6-shim -var keys = _dereq_('object-keys'); -var bind = _dereq_('function-bind'); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; -var hasSymbols = _dereq_('./hasSymbols')(); -var toObject = Object; -var push = bind.call(Function.call, Array.prototype.push); -var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable); - -module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); - if (hasSymbols && Object.getOwnPropertySymbols) { - syms = Object.getOwnPropertySymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if (propIsEnumerable(source, key)) { - push(props, key); - } - } - } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if (propIsEnumerable(source, key)) { - objTarget[key] = value; - } - } - } - return objTarget; -}; - -},{"./hasSymbols":43,"function-bind":49,"object-keys":50}],45:[function(_dereq_,module,exports){ -'use strict'; - -var defineProperties = _dereq_('define-properties'); - -var implementation = _dereq_('./implementation'); -var getPolyfill = _dereq_('./polyfill'); -var shim = _dereq_('./shim'); - -defineProperties(implementation, { - implementation: implementation, - getPolyfill: getPolyfill, - shim: shim -}); - -module.exports = implementation; - -},{"./implementation":44,"./polyfill":52,"./shim":53,"define-properties":46}],46:[function(_dereq_,module,exports){ -'use strict'; - -var keys = _dereq_('object-keys'); -var foreach = _dereq_('foreach'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; - -var toStr = Object.prototype.toString; - -var isFunction = function (fn) { - return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; -}; - -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); - /* eslint-disable no-unused-vars, no-restricted-syntax */ - for (var _ in obj) { return false; } - /* eslint-enable no-unused-vars, no-restricted-syntax */ - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported(); - -var defineProperty = function (object, name, value, predicate) { - if (name in object && (!isFunction(predicate) || !predicate())) { - return; - } - if (supportsDescriptors) { - Object.defineProperty(object, name, { - configurable: true, - enumerable: false, - value: value, - writable: true - }); - } else { - object[name] = value; - } -}; - -var defineProperties = function (object, map) { - var predicates = arguments.length > 2 ? arguments[2] : {}; - var props = keys(map); - if (hasSymbols) { - props = props.concat(Object.getOwnPropertySymbols(map)); - } - foreach(props, function (name) { - defineProperty(object, name, map[name], predicates[name]); - }); -}; - -defineProperties.supportsDescriptors = !!supportsDescriptors; - -module.exports = defineProperties; - -},{"foreach":47,"object-keys":50}],47:[function(_dereq_,module,exports){ - -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -module.exports = function forEach (obj, fn, ctx) { - if (toString.call(fn) !== '[object Function]') { - throw new TypeError('iterator must be a function'); - } - var l = obj.length; - if (l === +l) { - for (var i = 0; i < l; i++) { - fn.call(ctx, obj[i], i, obj); - } - } else { - for (var k in obj) { - if (hasOwn.call(obj, k)) { - fn.call(ctx, obj[k], k, obj); - } - } - } -}; - - -},{}],48:[function(_dereq_,module,exports){ -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - -},{}],49:[function(_dereq_,module,exports){ -var implementation = _dereq_('./implementation'); - -module.exports = Function.prototype.bind || implementation; - -},{"./implementation":48}],50:[function(_dereq_,module,exports){ -'use strict'; - -// modified from https://github.com/es-shims/es5-shim -var has = Object.prototype.hasOwnProperty; -var toStr = Object.prototype.toString; -var slice = Array.prototype.slice; -var isArgs = _dereq_('./isArguments'); -var hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'); -var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype'); -var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' -]; -var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; -}; -var blacklistedKeys = { - $console: true, - $frame: true, - $frameElement: true, - $frames: true, - $parent: true, - $self: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $window: true -}; -var hasAutomationEqualityBug = (function () { - /* global window */ - if (typeof window === 'undefined') { return false; } - for (var k in window) { - try { - if (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { - try { - equalsConstructorPrototype(window[k]); - } catch (e) { - return true; - } - } - } catch (e) { - return true; - } - } - return false; -}()); -var equalsConstructorPrototypeIfNotBuggy = function (o) { - /* global window */ - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(o); - } - try { - return equalsConstructorPrototype(o); - } catch (e) { - return false; - } -}; - -var keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object'; - var isFunction = toStr.call(object) === '[object Function]'; - var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === '[object String]'; - var theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError('Object.keys called on a non-object'); - } - - var skipProto = hasProtoEnumBug && isFunction; - if (isString && object.length > 0 && !has.call(object, 0)) { - for (var i = 0; i < object.length; ++i) { - theKeys.push(String(i)); - } - } - - if (isArguments && object.length > 0) { - for (var j = 0; j < object.length; ++j) { - theKeys.push(String(j)); - } - } else { - for (var name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(String(name)); - } - } - } - - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - - for (var k = 0; k < dontEnums.length; ++k) { - if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { - theKeys.push(dontEnums[k]); - } - } - } - return theKeys; -}; - -keysShim.shim = function shimObjectKeys() { - if (Object.keys) { - var keysWorksWithArguments = (function () { - // Safari 5.0 bug - return (Object.keys(arguments) || '').length === 2; - }(1, 2)); - if (!keysWorksWithArguments) { - var originalKeys = Object.keys; - Object.keys = function keys(object) { - if (isArgs(object)) { - return originalKeys(slice.call(object)); - } else { - return originalKeys(object); - } - }; - } - } else { - Object.keys = keysShim; - } - return Object.keys || keysShim; -}; - -module.exports = keysShim; - -},{"./isArguments":51}],51:[function(_dereq_,module,exports){ -'use strict'; - -var toStr = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toStr.call(value); - var isArgs = str === '[object Arguments]'; - if (!isArgs) { - isArgs = str !== '[object Array]' && - value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - toStr.call(value.callee) === '[object Function]'; - } - return isArgs; -}; - -},{}],52:[function(_dereq_,module,exports){ -'use strict'; - -var implementation = _dereq_('./implementation'); - -var lacksProperEnumerationOrder = function () { - if (!Object.assign) { - return false; - } - // v8, specifically in node 4.x, has a bug with incorrect property enumeration order - // note: this does not detect the bug unless there's 20 characters - var str = 'abcdefghijklmnopqrst'; - var letters = str.split(''); - var map = {}; - for (var i = 0; i < letters.length; ++i) { - map[letters[i]] = letters[i]; - } - var obj = Object.assign({}, map); - var actual = ''; - for (var k in obj) { - actual += k; - } - return str !== actual; -}; - -var assignHasPendingExceptions = function () { - if (!Object.assign || !Object.preventExtensions) { - return false; - } - // Firefox 37 still has "pending exception" logic in its Object.assign implementation, - // which is 72% slower than our shim, and Firefox 40's native implementation. - var thrower = Object.preventExtensions({ 1: 2 }); - try { - Object.assign(thrower, 'xy'); - } catch (e) { - return thrower[1] === 'y'; - } -}; - -module.exports = function getPolyfill() { - if (!Object.assign) { - return implementation; - } - if (lacksProperEnumerationOrder()) { - return implementation; - } - if (assignHasPendingExceptions()) { - return implementation; - } - return Object.assign; -}; - -},{"./implementation":44}],53:[function(_dereq_,module,exports){ -'use strict'; - -var define = _dereq_('define-properties'); -var getPolyfill = _dereq_('./polyfill'); - -module.exports = function shimAssign() { - var polyfill = getPolyfill(); - define( - Object, - { assign: polyfill }, - { assign: function () { return Object.assign !== polyfill; } } - ); - return polyfill; -}; - -},{"./polyfill":52,"define-properties":46}],54:[function(_dereq_,module,exports){ -module.exports = SafeParseTuple - -function SafeParseTuple(obj, reviver) { - var json - var error = null - - try { - json = JSON.parse(obj, reviver) - } catch (err) { - error = err - } - - return [error, json] -} - -},{}],55:[function(_dereq_,module,exports){ -function clean (s) { - return s.replace(/\n\r?\s*/g, '') -} - - -module.exports = function tsml (sa) { - var s = '' - , i = 0 - - for (; i < arguments.length; i++) - s += clean(sa[i]) + (arguments[i + 1] || '') - - return s -} -},{}],56:[function(_dereq_,module,exports){ -"use strict"; -var window = _dereq_("global/window") -var once = _dereq_("once") -var isFunction = _dereq_("is-function") -var parseHeaders = _dereq_("parse-headers") -var xtend = _dereq_("xtend") - -module.exports = createXHR -createXHR.XMLHttpRequest = window.XMLHttpRequest || noop -createXHR.XDomainRequest = "withCredentials" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest - -forEachArray(["get", "put", "post", "patch", "head", "delete"], function(method) { - createXHR[method === "delete" ? "del" : method] = function(uri, options, callback) { - options = initParams(uri, options, callback) - options.method = method.toUpperCase() - return _createXHR(options) - } -}) - -function forEachArray(array, iterator) { - for (var i = 0; i < array.length; i++) { - iterator(array[i]) - } -} - -function isEmpty(obj){ - for(var i in obj){ - if(obj.hasOwnProperty(i)) return false - } - return true -} - -function initParams(uri, options, callback) { - var params = uri - - if (isFunction(options)) { - callback = options - if (typeof uri === "string") { - params = {uri:uri} - } - } else { - params = xtend(options, {uri: uri}) - } - - params.callback = callback - return params -} - -function createXHR(uri, options, callback) { - options = initParams(uri, options, callback) - return _createXHR(options) -} - -function _createXHR(options) { - var callback = options.callback - if(typeof callback === "undefined"){ - throw new Error("callback argument missing") - } - callback = once(callback) - - function readystatechange() { - if (xhr.readyState === 4) { - loadFunc() - } - } - - function getBody() { - // Chrome with requestType=blob throws errors arround when even testing access to responseText - var body = undefined - - if (xhr.response) { - body = xhr.response - } else if (xhr.responseType === "text" || !xhr.responseType) { - body = xhr.responseText || xhr.responseXML - } - - if (isJson) { - try { - body = JSON.parse(body) - } catch (e) {} - } - - return body - } - - var failureResponse = { - body: undefined, - headers: {}, - statusCode: 0, - method: method, - url: uri, - rawRequest: xhr - } - - function errorFunc(evt) { - clearTimeout(timeoutTimer) - if(!(evt instanceof Error)){ - evt = new Error("" + (evt || "Unknown XMLHttpRequest Error") ) - } - evt.statusCode = 0 - callback(evt, failureResponse) - } - - // will load the data & process the response in a special response object - function loadFunc() { - if (aborted) return - var status - clearTimeout(timeoutTimer) - if(options.useXDR && xhr.status===undefined) { - //IE8 CORS GET successful response doesn't have a status field, but body is fine - status = 200 - } else { - status = (xhr.status === 1223 ? 204 : xhr.status) - } - var response = failureResponse - var err = null - - if (status !== 0){ - response = { - body: getBody(), - statusCode: status, - method: method, - headers: {}, - url: uri, - rawRequest: xhr - } - if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE - response.headers = parseHeaders(xhr.getAllResponseHeaders()) - } - } else { - err = new Error("Internal XMLHttpRequest Error") - } - callback(err, response, response.body) - - } - - var xhr = options.xhr || null - - if (!xhr) { - if (options.cors || options.useXDR) { - xhr = new createXHR.XDomainRequest() - }else{ - xhr = new createXHR.XMLHttpRequest() - } - } - - var key - var aborted - var uri = xhr.url = options.uri || options.url - var method = xhr.method = options.method || "GET" - var body = options.body || options.data || null - var headers = xhr.headers = options.headers || {} - var sync = !!options.sync - var isJson = false - var timeoutTimer - - if ("json" in options) { - isJson = true - headers["accept"] || headers["Accept"] || (headers["Accept"] = "application/json") //Don't override existing accept header declared by user - if (method !== "GET" && method !== "HEAD") { - headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json") //Don't override existing accept header declared by user - body = JSON.stringify(options.json) - } - } - - xhr.onreadystatechange = readystatechange - xhr.onload = loadFunc - xhr.onerror = errorFunc - // IE9 must have onprogress be set to a unique function. - xhr.onprogress = function () { - // IE must die - } - xhr.ontimeout = errorFunc - xhr.open(method, uri, !sync, options.username, options.password) - //has to be after open - if(!sync) { - xhr.withCredentials = !!options.withCredentials - } - // Cannot set timeout with sync request - // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly - // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent - if (!sync && options.timeout > 0 ) { - timeoutTimer = setTimeout(function(){ - aborted=true//IE9 may still call readystatechange - xhr.abort("timeout") - var e = new Error("XMLHttpRequest timeout") - e.code = "ETIMEDOUT" - errorFunc(e) - }, options.timeout ) - } - - if (xhr.setRequestHeader) { - for(key in headers){ - if(headers.hasOwnProperty(key)){ - xhr.setRequestHeader(key, headers[key]) - } - } - } else if (options.headers && !isEmpty(options.headers)) { - throw new Error("Headers cannot be set on an XDomainRequest object") - } - - if ("responseType" in options) { - xhr.responseType = options.responseType - } - - if ("beforeSend" in options && - typeof options.beforeSend === "function" - ) { - options.beforeSend(xhr) - } - - xhr.send(body) - - return xhr - - -} - -function noop() {} - -},{"global/window":2,"is-function":57,"once":58,"parse-headers":61,"xtend":62}],57:[function(_dereq_,module,exports){ -module.exports = isFunction - -var toString = Object.prototype.toString - -function isFunction (fn) { - var string = toString.call(fn) - return string === '[object Function]' || - (typeof fn === 'function' && string !== '[object RegExp]') || - (typeof window !== 'undefined' && - // IE8 and below - (fn === window.setTimeout || - fn === window.alert || - fn === window.confirm || - fn === window.prompt)) -}; - -},{}],58:[function(_dereq_,module,exports){ -module.exports = once - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) -}) - -function once (fn) { - var called = false - return function () { - if (called) return - called = true - return fn.apply(this, arguments) - } -} - -},{}],59:[function(_dereq_,module,exports){ -var isFunction = _dereq_('is-function') - -module.exports = forEach - -var toString = Object.prototype.toString -var hasOwnProperty = Object.prototype.hasOwnProperty - -function forEach(list, iterator, context) { - if (!isFunction(iterator)) { - throw new TypeError('iterator must be a function') - } - - if (arguments.length < 3) { - context = this - } - - if (toString.call(list) === '[object Array]') - forEachArray(list, iterator, context) - else if (typeof list === 'string') - forEachString(list, iterator, context) - else - forEachObject(list, iterator, context) -} - -function forEachArray(array, iterator, context) { - for (var i = 0, len = array.length; i < len; i++) { - if (hasOwnProperty.call(array, i)) { - iterator.call(context, array[i], i, array) - } - } -} - -function forEachString(string, iterator, context) { - for (var i = 0, len = string.length; i < len; i++) { - // no such thing as a sparse string. - iterator.call(context, string.charAt(i), i, string) - } -} - -function forEachObject(object, iterator, context) { - for (var k in object) { - if (hasOwnProperty.call(object, k)) { - iterator.call(context, object[k], k, object) - } - } -} - -},{"is-function":57}],60:[function(_dereq_,module,exports){ - -exports = module.exports = trim; - -function trim(str){ - return str.replace(/^\s*|\s*$/g, ''); -} - -exports.left = function(str){ - return str.replace(/^\s*/, ''); -}; - -exports.right = function(str){ - return str.replace(/\s*$/, ''); -}; - -},{}],61:[function(_dereq_,module,exports){ -var trim = _dereq_('trim') - , forEach = _dereq_('for-each') - , isArray = function(arg) { - return Object.prototype.toString.call(arg) === '[object Array]'; - } - -module.exports = function (headers) { - if (!headers) - return {} - - var result = {} - - forEach( - trim(headers).split('\n') - , function (row) { - var index = row.indexOf(':') - , key = trim(row.slice(0, index)).toLowerCase() - , value = trim(row.slice(index + 1)) - - if (typeof(result[key]) === 'undefined') { - result[key] = value - } else if (isArray(result[key])) { - result[key].push(value) - } else { - result[key] = [ result[key], value ] - } - } - ) - - return result -} -},{"for-each":59,"trim":60}],62:[function(_dereq_,module,exports){ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} - -},{}],63:[function(_dereq_,module,exports){ -/** - * @file big-play-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _buttonJs = _dereq_('./button.js'); - -var _buttonJs2 = _interopRequireDefault(_buttonJs); - -var _componentJs = _dereq_('./component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * Initial play button. Shows before the video has played. The hiding of the - * big play button is done via CSS and player states. - * - * @param {Object} player Main Player - * @param {Object=} options Object of option names and values - * @extends Button - * @class BigPlayButton - */ - -var BigPlayButton = (function (_Button) { - _inherits(BigPlayButton, _Button); - - function BigPlayButton(player, options) { - _classCallCheck(this, BigPlayButton); - - _Button.call(this, player, options); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - BigPlayButton.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-big-play-button'; - }; - - /** - * Handles click for play - * - * @method handleClick - */ - - BigPlayButton.prototype.handleClick = function handleClick() { - this.player_.play(); - }; - - return BigPlayButton; -})(_buttonJs2['default']); - -BigPlayButton.prototype.controlText_ = 'Play Video'; - -_componentJs2['default'].registerComponent('BigPlayButton', BigPlayButton); -exports['default'] = BigPlayButton; -module.exports = exports['default']; - -},{"./button.js":64,"./component.js":67}],64:[function(_dereq_,module,exports){ -/** - * @file button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _clickableComponentJs = _dereq_('./clickable-component.js'); - -var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); - -var _component = _dereq_('./component'); - -var _component2 = _interopRequireDefault(_component); - -var _utilsEventsJs = _dereq_('./utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -var _utilsFnJs = _dereq_('./utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsLogJs = _dereq_('./utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -/** - * Base class for all buttons - * - * @param {Object} player Main Player - * @param {Object=} options Object of option names and values - * @extends ClickableComponent - * @class Button - */ - -var Button = (function (_ClickableComponent) { - _inherits(Button, _ClickableComponent); - - function Button(player, options) { - _classCallCheck(this, Button); - - _ClickableComponent.call(this, player, options); - } - - /** - * Create the component's DOM element - * - * @param {String=} type Element's node type. e.g. 'div' - * @param {Object=} props An object of properties that should be set on the element - * @param {Object=} attributes An object of attributes that should be set on the element - * @return {Element} - * @method createEl - */ - - Button.prototype.createEl = function createEl() { - var tag = arguments.length <= 0 || arguments[0] === undefined ? 'button' : arguments[0]; - var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var attributes = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - - props = _objectAssign2['default']({ - className: this.buildCSSClass() - }, props); - - if (tag !== 'button') { - _utilsLogJs2['default'].warn('Creating a Button with an HTML element of ' + tag + ' is deprecated; use ClickableComponent instead.'); - - // Add properties for clickable element which is not a native HTML button - props = _objectAssign2['default']({ - tabIndex: 0 - }, props); - - // Add ARIA attributes for clickable element which is not a native HTML button - attributes = _objectAssign2['default']({ - role: 'button' - }, attributes); - } - - // Add attributes for button element - attributes = _objectAssign2['default']({ - type: 'button', // Necessary since the default button type is "submit" - 'aria-live': 'polite' // let the screen reader user know that the text of the button may change - }, attributes); - - var el = _component2['default'].prototype.createEl.call(this, tag, props, attributes); - - this.createControlTextEl(el); - - return el; - }; - - /** - * Adds a child component inside this button - * - * @param {String|Component} child The class name or instance of a child to add - * @param {Object=} options Options, including options to be passed to children of the child. - * @return {Component} The child component (created by this process if a string was used) - * @deprecated - * @method addChild - */ - - Button.prototype.addChild = function addChild(child) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var className = this.constructor.name; - _utilsLogJs2['default'].warn('Adding an actionable (user controllable) child to a Button (' + className + ') is not supported; use a ClickableComponent instead.'); - - // Avoid the error message generated by ClickableComponent's addChild method - return _component2['default'].prototype.addChild.call(this, child, options); - }; - - /** - * Handle KeyPress (document level) - Extend with specific functionality for button - * - * @method handleKeyPress - */ - - Button.prototype.handleKeyPress = function handleKeyPress(event) { - // Ignore Space (32) or Enter (13) key operation, which is handled by the browser for a button. - if (event.which === 32 || event.which === 13) {} else { - _ClickableComponent.prototype.handleKeyPress.call(this, event); // Pass keypress handling up for unsupported keys - } - }; - - return Button; -})(_clickableComponentJs2['default']); - -_component2['default'].registerComponent('Button', Button); -exports['default'] = Button; -module.exports = exports['default']; - -},{"./clickable-component.js":65,"./component":67,"./utils/events.js":135,"./utils/fn.js":136,"./utils/log.js":139,"global/document":1,"object.assign":45}],65:[function(_dereq_,module,exports){ -/** - * @file button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _component = _dereq_('./component'); - -var _component2 = _interopRequireDefault(_component); - -var _utilsDomJs = _dereq_('./utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsEventsJs = _dereq_('./utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -var _utilsFnJs = _dereq_('./utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsLogJs = _dereq_('./utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -/** - * Clickable Component which is clickable or keyboard actionable, but is not a native HTML button - * - * @param {Object} player Main Player - * @param {Object=} options Object of option names and values - * @extends Component - * @class ClickableComponent - */ - -var ClickableComponent = (function (_Component) { - _inherits(ClickableComponent, _Component); - - function ClickableComponent(player, options) { - _classCallCheck(this, ClickableComponent); - - _Component.call(this, player, options); - - this.emitTapEvents(); - - this.on('tap', this.handleClick); - this.on('click', this.handleClick); - this.on('focus', this.handleFocus); - this.on('blur', this.handleBlur); - } - - /** - * Create the component's DOM element - * - * @param {String=} type Element's node type. e.g. 'div' - * @param {Object=} props An object of properties that should be set on the element - * @param {Object=} attributes An object of attributes that should be set on the element - * @return {Element} - * @method createEl - */ - - ClickableComponent.prototype.createEl = function createEl() { - var tag = arguments.length <= 0 || arguments[0] === undefined ? 'div' : arguments[0]; - var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var attributes = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - - props = _objectAssign2['default']({ - className: this.buildCSSClass(), - tabIndex: 0 - }, props); - - if (tag === 'button') { - _utilsLogJs2['default'].error('Creating a ClickableComponent with an HTML element of ' + tag + ' is not supported; use a Button instead.'); - } - - // Add ARIA attributes for clickable element which is not a native HTML button - attributes = _objectAssign2['default']({ - role: 'button', - 'aria-live': 'polite' // let the screen reader user know that the text of the element may change - }, attributes); - - var el = _Component.prototype.createEl.call(this, tag, props, attributes); - - this.createControlTextEl(el); - - return el; - }; - - /** - * create control text - * - * @param {Element} el Parent element for the control text - * @return {Element} - * @method controlText - */ - - ClickableComponent.prototype.createControlTextEl = function createControlTextEl(el) { - this.controlTextEl_ = Dom.createEl('span', { - className: 'vjs-control-text' - }); - - if (el) { - el.appendChild(this.controlTextEl_); - } - - this.controlText(this.controlText_); - - return this.controlTextEl_; - }; - - /** - * Controls text - both request and localize - * - * @param {String} text Text for element - * @return {String} - * @method controlText - */ - - ClickableComponent.prototype.controlText = function controlText(text) { - if (!text) return this.controlText_ || 'Need Text'; - - this.controlText_ = text; - this.controlTextEl_.innerHTML = this.localize(this.controlText_); - - return this; - }; - - /** - * Allows sub components to stack CSS class names - * - * @return {String} - * @method buildCSSClass - */ - - ClickableComponent.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-control vjs-button ' + _Component.prototype.buildCSSClass.call(this); - }; - - /** - * Adds a child component inside this clickable-component - * - * @param {String|Component} child The class name or instance of a child to add - * @param {Object=} options Options, including options to be passed to children of the child. - * @return {Component} The child component (created by this process if a string was used) - * @method addChild - */ - - ClickableComponent.prototype.addChild = function addChild(child) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - // TODO: Fix adding an actionable child to a ClickableComponent; currently - // it will cause issues with assistive technology (e.g. screen readers) - // which support ARIA, since an element with role="button" cannot have - // actionable child elements. - - //let className = this.constructor.name; - //log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role="button" cannot have actionable child elements.`); - - return _Component.prototype.addChild.call(this, child, options); - }; - - /** - * Enable the component element - * - * @return {Component} - * @method enable - */ - - ClickableComponent.prototype.enable = function enable() { - this.removeClass('vjs-disabled'); - this.el_.setAttribute('aria-disabled', 'false'); - return this; - }; - - /** - * Disable the component element - * - * @return {Component} - * @method disable - */ - - ClickableComponent.prototype.disable = function disable() { - this.addClass('vjs-disabled'); - this.el_.setAttribute('aria-disabled', 'true'); - return this; - }; - - /** - * Handle Click - Override with specific functionality for component - * - * @method handleClick - */ - - ClickableComponent.prototype.handleClick = function handleClick() {}; - - /** - * Handle Focus - Add keyboard functionality to element - * - * @method handleFocus - */ - - ClickableComponent.prototype.handleFocus = function handleFocus() { - Events.on(_globalDocument2['default'], 'keydown', Fn.bind(this, this.handleKeyPress)); - }; - - /** - * Handle KeyPress (document level) - Trigger click when Space or Enter key is pressed - * - * @method handleKeyPress - */ - - ClickableComponent.prototype.handleKeyPress = function handleKeyPress(event) { - // Support Space (32) or Enter (13) key operation to fire a click event - if (event.which === 32 || event.which === 13) { - event.preventDefault(); - this.handleClick(event); - } else if (_Component.prototype.handleKeyPress) { - _Component.prototype.handleKeyPress.call(this, event); // Pass keypress handling up for unsupported keys - } - }; - - /** - * Handle Blur - Remove keyboard triggers - * - * @method handleBlur - */ - - ClickableComponent.prototype.handleBlur = function handleBlur() { - Events.off(_globalDocument2['default'], 'keydown', Fn.bind(this, this.handleKeyPress)); - }; - - return ClickableComponent; -})(_component2['default']); - -_component2['default'].registerComponent('ClickableComponent', ClickableComponent); -exports['default'] = ClickableComponent; -module.exports = exports['default']; - -},{"./component":67,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/log.js":139,"global/document":1,"object.assign":45}],66:[function(_dereq_,module,exports){ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _button = _dereq_('./button'); - -var _button2 = _interopRequireDefault(_button); - -var _component = _dereq_('./component'); - -var _component2 = _interopRequireDefault(_component); - -/** - * The `CloseButton` component is a button which fires a "close" event - * when it is activated. - * - * @extends Button - * @class CloseButton - */ - -var CloseButton = (function (_Button) { - _inherits(CloseButton, _Button); - - function CloseButton(player, options) { - _classCallCheck(this, CloseButton); - - _Button.call(this, player, options); - this.controlText(options && options.controlText || this.localize('Close')); - } - - CloseButton.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-close-button ' + _Button.prototype.buildCSSClass.call(this); - }; - - CloseButton.prototype.handleClick = function handleClick() { - this.trigger({ type: 'close', bubbles: false }); - }; - - return CloseButton; -})(_button2['default']); - -_component2['default'].registerComponent('CloseButton', CloseButton); -exports['default'] = CloseButton; -module.exports = exports['default']; - -},{"./button":64,"./component":67}],67:[function(_dereq_,module,exports){ -/** - * @file component.js - * - * Player Component - Base class for all UI objects - */ - -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _utilsDomJs = _dereq_('./utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFnJs = _dereq_('./utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsGuidJs = _dereq_('./utils/guid.js'); - -var Guid = _interopRequireWildcard(_utilsGuidJs); - -var _utilsEventsJs = _dereq_('./utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -var _utilsLogJs = _dereq_('./utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _utilsToTitleCaseJs = _dereq_('./utils/to-title-case.js'); - -var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -var _utilsMergeOptionsJs = _dereq_('./utils/merge-options.js'); - -var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs); - -/** - * Base UI Component class - * Components are embeddable UI objects that are represented by both a - * javascript object and an element in the DOM. They can be children of other - * components, and can have many children themselves. - * ```js - * // adding a button to the player - * var button = player.addChild('button'); - * button.el(); // -> button element - * ``` - * ```html - *
    - *
    Button
    - *
    - * ``` - * Components are also event targets. - * ```js - * button.on('click', function(){ - * console.log('Button Clicked!'); - * }); - * button.trigger('customevent'); - * ``` - * - * @param {Object} player Main Player - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @class Component - */ - -var Component = (function () { - function Component(player, options, ready) { - _classCallCheck(this, Component); - - // The component might be the player itself and we can't pass `this` to super - if (!player && this.play) { - this.player_ = player = this; // eslint-disable-line - } else { - this.player_ = player; - } - - // Make a copy of prototype.options_ to protect against overriding defaults - this.options_ = _utilsMergeOptionsJs2['default']({}, this.options_); - - // Updated options with supplied options - options = this.options_ = _utilsMergeOptionsJs2['default'](this.options_, options); - - // Get ID from options or options element if one is supplied - this.id_ = options.id || options.el && options.el.id; - - // If there was no ID from the options, generate one - if (!this.id_) { - // Don't require the player ID function in the case of mock players - var id = player && player.id && player.id() || 'no_player'; - - this.id_ = id + '_component_' + Guid.newGUID(); - } - - this.name_ = options.name || null; - - // Create element if one wasn't provided in options - if (options.el) { - this.el_ = options.el; - } else if (options.createEl !== false) { - this.el_ = this.createEl(); - } - - this.children_ = []; - this.childIndex_ = {}; - this.childNameIndex_ = {}; - - // Add any child components in options - if (options.initChildren !== false) { - this.initChildren(); - } - - this.ready(ready); - // Don't want to trigger ready here or it will before init is actually - // finished for all children that run this constructor - - if (options.reportTouchActivity !== false) { - this.enableTouchActivity(); - } - } - - /** - * Dispose of the component and all child components - * - * @method dispose - */ - - Component.prototype.dispose = function dispose() { - this.trigger({ type: 'dispose', bubbles: false }); - - // Dispose all children. - if (this.children_) { - for (var i = this.children_.length - 1; i >= 0; i--) { - if (this.children_[i].dispose) { - this.children_[i].dispose(); - } - } - } - - // Delete child references - this.children_ = null; - this.childIndex_ = null; - this.childNameIndex_ = null; - - // Remove all event listeners. - this.off(); - - // Remove element from DOM - if (this.el_.parentNode) { - this.el_.parentNode.removeChild(this.el_); - } - - Dom.removeElData(this.el_); - this.el_ = null; - }; - - /** - * Return the component's player - * - * @return {Player} - * @method player - */ - - Component.prototype.player = function player() { - return this.player_; - }; - - /** - * Deep merge of options objects - * Whenever a property is an object on both options objects - * the two properties will be merged using mergeOptions. - * - * ```js - * Parent.prototype.options_ = { - * optionSet: { - * 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' }, - * 'childTwo': {}, - * 'childThree': {} - * } - * } - * newOptions = { - * optionSet: { - * 'childOne': { 'foo': 'baz', 'abc': '123' } - * 'childTwo': null, - * 'childFour': {} - * } - * } - * - * this.options(newOptions); - * ``` - * RESULT - * ```js - * { - * optionSet: { - * 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' }, - * 'childTwo': null, // Disabled. Won't be initialized. - * 'childThree': {}, - * 'childFour': {} - * } - * } - * ``` - * - * @param {Object} obj Object of new option values - * @return {Object} A NEW object of this.options_ and obj merged - * @method options - */ - - Component.prototype.options = function options(obj) { - _utilsLogJs2['default'].warn('this.options() has been deprecated and will be moved to the constructor in 6.0'); - - if (!obj) { - return this.options_; - } - - this.options_ = _utilsMergeOptionsJs2['default'](this.options_, obj); - return this.options_; - }; - - /** - * Get the component's DOM element - * ```js - * var domEl = myComponent.el(); - * ``` - * - * @return {Element} - * @method el - */ - - Component.prototype.el = function el() { - return this.el_; - }; - - /** - * Create the component's DOM element - * - * @param {String=} tagName Element's node type. e.g. 'div' - * @param {Object=} properties An object of properties that should be set - * @param {Object=} attributes An object of attributes that should be set - * @return {Element} - * @method createEl - */ - - Component.prototype.createEl = function createEl(tagName, properties, attributes) { - return Dom.createEl(tagName, properties, attributes); - }; - - Component.prototype.localize = function localize(string) { - var code = this.player_.language && this.player_.language(); - var languages = this.player_.languages && this.player_.languages(); - - if (!code || !languages) { - return string; - } - - var language = languages[code]; - - if (language && language[string]) { - return language[string]; - } - - var primaryCode = code.split('-')[0]; - var primaryLang = languages[primaryCode]; - - if (primaryLang && primaryLang[string]) { - return primaryLang[string]; - } - - return string; - }; - - /** - * Return the component's DOM element where children are inserted. - * Will either be the same as el() or a new element defined in createEl(). - * - * @return {Element} - * @method contentEl - */ - - Component.prototype.contentEl = function contentEl() { - return this.contentEl_ || this.el_; - }; - - /** - * Get the component's ID - * ```js - * var id = myComponent.id(); - * ``` - * - * @return {String} - * @method id - */ - - Component.prototype.id = function id() { - return this.id_; - }; - - /** - * Get the component's name. The name is often used to reference the component. - * ```js - * var name = myComponent.name(); - * ``` - * - * @return {String} - * @method name - */ - - Component.prototype.name = function name() { - return this.name_; - }; - - /** - * Get an array of all child components - * ```js - * var kids = myComponent.children(); - * ``` - * - * @return {Array} The children - * @method children - */ - - Component.prototype.children = function children() { - return this.children_; - }; - - /** - * Returns a child component with the provided ID - * - * @return {Component} - * @method getChildById - */ - - Component.prototype.getChildById = function getChildById(id) { - return this.childIndex_[id]; - }; - - /** - * Returns a child component with the provided name - * - * @return {Component} - * @method getChild - */ - - Component.prototype.getChild = function getChild(name) { - return this.childNameIndex_[name]; - }; - - /** - * Adds a child component inside this component - * ```js - * myComponent.el(); - * // ->
    - * myComponent.children(); - * // [empty array] - * - * var myButton = myComponent.addChild('MyButton'); - * // ->
    myButton
    - * // -> myButton === myComponent.children()[0]; - * ``` - * Pass in options for child constructors and options for children of the child - * ```js - * var myButton = myComponent.addChild('MyButton', { - * text: 'Press Me', - * buttonChildExample: { - * buttonChildOption: true - * } - * }); - * ``` - * - * @param {String|Component} child The class name or instance of a child to add - * @param {Object=} options Options, including options to be passed to children of the child. - * @param {Number} index into our children array to attempt to add the child - * @return {Component} The child component (created by this process if a string was used) - * @method addChild - */ - - Component.prototype.addChild = function addChild(child) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var index = arguments.length <= 2 || arguments[2] === undefined ? this.children_.length : arguments[2]; - - var component = undefined; - var componentName = undefined; - - // If child is a string, create nt with options - if (typeof child === 'string') { - componentName = child; - - // Options can also be specified as a boolean, so convert to an empty object if false. - if (!options) { - options = {}; - } - - // Same as above, but true is deprecated so show a warning. - if (options === true) { - _utilsLogJs2['default'].warn('Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`.'); - options = {}; - } - - // If no componentClass in options, assume componentClass is the name lowercased - // (e.g. playButton) - var componentClassName = options.componentClass || _utilsToTitleCaseJs2['default'](componentName); - - // Set name through options - options.name = componentName; - - // Create a new object & element for this controls set - // If there's no .player_, this is a player - var ComponentClass = Component.getComponent(componentClassName); - - if (!ComponentClass) { - throw new Error('Component ' + componentClassName + ' does not exist'); - } - - // data stored directly on the videojs object may be - // misidentified as a component to retain - // backwards-compatibility with 4.x. check to make sure the - // component class can be instantiated. - if (typeof ComponentClass !== 'function') { - return null; - } - - component = new ComponentClass(this.player_ || this, options); - - // child is a component instance - } else { - component = child; - } - - this.children_.splice(index, 0, component); - - if (typeof component.id === 'function') { - this.childIndex_[component.id()] = component; - } - - // If a name wasn't used to create the component, check if we can use the - // name function of the component - componentName = componentName || component.name && component.name(); - - if (componentName) { - this.childNameIndex_[componentName] = component; - } - - // Add the UI object's element to the container div (box) - // Having an element is not required - if (typeof component.el === 'function' && component.el()) { - var childNodes = this.contentEl().children; - var refNode = childNodes[index] || null; - this.contentEl().insertBefore(component.el(), refNode); - } - - // Return so it can stored on parent object if desired. - return component; - }; - - /** - * Remove a child component from this component's list of children, and the - * child component's element from this component's element - * - * @param {Component} component Component to remove - * @method removeChild - */ - - Component.prototype.removeChild = function removeChild(component) { - if (typeof component === 'string') { - component = this.getChild(component); - } - - if (!component || !this.children_) { - return; - } - - var childFound = false; - - for (var i = this.children_.length - 1; i >= 0; i--) { - if (this.children_[i] === component) { - childFound = true; - this.children_.splice(i, 1); - break; - } - } - - if (!childFound) { - return; - } - - this.childIndex_[component.id()] = null; - this.childNameIndex_[component.name()] = null; - - var compEl = component.el(); - - if (compEl && compEl.parentNode === this.contentEl()) { - this.contentEl().removeChild(component.el()); - } - }; - - /** - * Add and initialize default child components from options - * ```js - * // when an instance of MyComponent is created, all children in options - * // will be added to the instance by their name strings and options - * MyComponent.prototype.options_ = { - * children: [ - * 'myChildComponent' - * ], - * myChildComponent: { - * myChildOption: true - * } - * }; - * - * // Or when creating the component - * var myComp = new MyComponent(player, { - * children: [ - * 'myChildComponent' - * ], - * myChildComponent: { - * myChildOption: true - * } - * }); - * ``` - * The children option can also be an array of - * child options objects (that also include a 'name' key). - * This can be used if you have two child components of the - * same type that need different options. - * ```js - * var myComp = new MyComponent(player, { - * children: [ - * 'button', - * { - * name: 'button', - * someOtherOption: true - * }, - * { - * name: 'button', - * someOtherOption: false - * } - * ] - * }); - * ``` - * - * @method initChildren - */ - - Component.prototype.initChildren = function initChildren() { - var _this = this; - - var children = this.options_.children; - - if (children) { - (function () { - // `this` is `parent` - var parentOptions = _this.options_; - - var handleAdd = function handleAdd(child) { - var name = child.name; - var opts = child.opts; - - // Allow options for children to be set at the parent options - // e.g. videojs(id, { controlBar: false }); - // instead of videojs(id, { children: { controlBar: false }); - if (parentOptions[name] !== undefined) { - opts = parentOptions[name]; - } - - // Allow for disabling default components - // e.g. options['children']['posterImage'] = false - if (opts === false) { - return; - } - - // Allow options to be passed as a simple boolean if no configuration - // is necessary. - if (opts === true) { - opts = {}; - } - - // We also want to pass the original player options to each component as well so they don't need to - // reach back into the player for options later. - opts.playerOptions = _this.options_.playerOptions; - - // Create and add the child component. - // Add a direct reference to the child by name on the parent instance. - // If two of the same component are used, different names should be supplied - // for each - var newChild = _this.addChild(name, opts); - if (newChild) { - _this[name] = newChild; - } - }; - - // Allow for an array of children details to passed in the options - var workingChildren = undefined; - var Tech = Component.getComponent('Tech'); - - if (Array.isArray(children)) { - workingChildren = children; - } else { - workingChildren = Object.keys(children); - } - - workingChildren - // children that are in this.options_ but also in workingChildren would - // give us extra children we do not want. So, we want to filter them out. - .concat(Object.keys(_this.options_).filter(function (child) { - return !workingChildren.some(function (wchild) { - if (typeof wchild === 'string') { - return child === wchild; - } else { - return child === wchild.name; - } - }); - })).map(function (child) { - var name = undefined, - opts = undefined; - - if (typeof child === 'string') { - name = child; - opts = children[name] || _this.options_[name] || {}; - } else { - name = child.name; - opts = child; - } - - return { name: name, opts: opts }; - }).filter(function (child) { - // we have to make sure that child.name isn't in the techOrder since - // techs are registerd as Components but can't aren't compatible - // See https://github.com/videojs/video.js/issues/2772 - var c = Component.getComponent(child.opts.componentClass || _utilsToTitleCaseJs2['default'](child.name)); - return c && !Tech.isTech(c); - }).forEach(handleAdd); - })(); - } - }; - - /** - * Allows sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - Component.prototype.buildCSSClass = function buildCSSClass() { - // Child classes can include a function that does: - // return 'CLASS NAME' + this._super(); - return ''; - }; - - /** - * Add an event listener to this component's element - * ```js - * var myFunc = function(){ - * var myComponent = this; - * // Do something when the event is fired - * }; - * - * myComponent.on('eventType', myFunc); - * ``` - * The context of myFunc will be myComponent unless previously bound. - * Alternatively, you can add a listener to another element or component. - * ```js - * myComponent.on(otherElement, 'eventName', myFunc); - * myComponent.on(otherComponent, 'eventName', myFunc); - * ``` - * The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)` - * and `otherComponent.on('eventName', myFunc)` is that this way the listeners - * will be automatically cleaned up when either component is disposed. - * It will also bind myComponent as the context of myFunc. - * **NOTE**: When using this on elements in the page other than window - * and document (both permanent), if you remove the element from the DOM - * you need to call `myComponent.trigger(el, 'dispose')` on it to clean up - * references to it and allow the browser to garbage collect it. - * - * @param {String|Component} first The event type or other component - * @param {Function|String} second The event handler or event type - * @param {Function} third The event handler - * @return {Component} - * @method on - */ - - Component.prototype.on = function on(first, second, third) { - var _this2 = this; - - if (typeof first === 'string' || Array.isArray(first)) { - Events.on(this.el_, first, Fn.bind(this, second)); - - // Targeting another component or element - } else { - (function () { - var target = first; - var type = second; - var fn = Fn.bind(_this2, third); - - // When this component is disposed, remove the listener from the other component - var removeOnDispose = function removeOnDispose() { - return _this2.off(target, type, fn); - }; - - // Use the same function ID so we can remove it later it using the ID - // of the original listener - removeOnDispose.guid = fn.guid; - _this2.on('dispose', removeOnDispose); - - // If the other component is disposed first we need to clean the reference - // to the other component in this component's removeOnDispose listener - // Otherwise we create a memory leak. - var cleanRemover = function cleanRemover() { - return _this2.off('dispose', removeOnDispose); - }; - - // Add the same function ID so we can easily remove it later - cleanRemover.guid = fn.guid; - - // Check if this is a DOM node - if (first.nodeName) { - // Add the listener to the other element - Events.on(target, type, fn); - Events.on(target, 'dispose', cleanRemover); - - // Should be a component - // Not using `instanceof Component` because it makes mock players difficult - } else if (typeof first.on === 'function') { - // Add the listener to the other component - target.on(type, fn); - target.on('dispose', cleanRemover); - } - })(); - } - - return this; - }; - - /** - * Remove an event listener from this component's element - * ```js - * myComponent.off('eventType', myFunc); - * ``` - * If myFunc is excluded, ALL listeners for the event type will be removed. - * If eventType is excluded, ALL listeners will be removed from the component. - * Alternatively you can use `off` to remove listeners that were added to other - * elements or components using `myComponent.on(otherComponent...`. - * In this case both the event type and listener function are REQUIRED. - * ```js - * myComponent.off(otherElement, 'eventType', myFunc); - * myComponent.off(otherComponent, 'eventType', myFunc); - * ``` - * - * @param {String=|Component} first The event type or other component - * @param {Function=|String} second The listener function or event type - * @param {Function=} third The listener for other component - * @return {Component} - * @method off - */ - - Component.prototype.off = function off(first, second, third) { - if (!first || typeof first === 'string' || Array.isArray(first)) { - Events.off(this.el_, first, second); - } else { - var target = first; - var type = second; - // Ensure there's at least a guid, even if the function hasn't been used - var fn = Fn.bind(this, third); - - // Remove the dispose listener on this component, - // which was given the same guid as the event listener - this.off('dispose', fn); - - if (first.nodeName) { - // Remove the listener - Events.off(target, type, fn); - // Remove the listener for cleaning the dispose listener - Events.off(target, 'dispose', fn); - } else { - target.off(type, fn); - target.off('dispose', fn); - } - } - - return this; - }; - - /** - * Add an event listener to be triggered only once and then removed - * ```js - * myComponent.one('eventName', myFunc); - * ``` - * Alternatively you can add a listener to another element or component - * that will be triggered only once. - * ```js - * myComponent.one(otherElement, 'eventName', myFunc); - * myComponent.one(otherComponent, 'eventName', myFunc); - * ``` - * - * @param {String|Component} first The event type or other component - * @param {Function|String} second The listener function or event type - * @param {Function=} third The listener function for other component - * @return {Component} - * @method one - */ - - Component.prototype.one = function one(first, second, third) { - var _this3 = this, - _arguments = arguments; - - if (typeof first === 'string' || Array.isArray(first)) { - Events.one(this.el_, first, Fn.bind(this, second)); - } else { - (function () { - var target = first; - var type = second; - var fn = Fn.bind(_this3, third); - - var newFunc = function newFunc() { - _this3.off(target, type, newFunc); - fn.apply(null, _arguments); - }; - - // Keep the same function ID so we can remove it later - newFunc.guid = fn.guid; - - _this3.on(target, type, newFunc); - })(); - } - - return this; - }; - - /** - * Trigger an event on an element - * ```js - * myComponent.trigger('eventName'); - * myComponent.trigger({'type':'eventName'}); - * myComponent.trigger('eventName', {data: 'some data'}); - * myComponent.trigger({'type':'eventName'}, {data: 'some data'}); - * ``` - * - * @param {Event|Object|String} event A string (the type) or an event object with a type attribute - * @param {Object} [hash] data hash to pass along with the event - * @return {Component} self - * @method trigger - */ - - Component.prototype.trigger = function trigger(event, hash) { - Events.trigger(this.el_, event, hash); - return this; - }; - - /** - * Bind a listener to the component's ready state. - * Different from event listeners in that if the ready event has already happened - * it will trigger the function immediately. - * - * @param {Function} fn Ready listener - * @param {Boolean} sync Exec the listener synchronously if component is ready - * @return {Component} - * @method ready - */ - - Component.prototype.ready = function ready(fn) { - var sync = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; - - if (fn) { - if (this.isReady_) { - if (sync) { - fn.call(this); - } else { - // Call the function asynchronously by default for consistency - this.setTimeout(fn, 1); - } - } else { - this.readyQueue_ = this.readyQueue_ || []; - this.readyQueue_.push(fn); - } - } - return this; - }; - - /** - * Trigger the ready listeners - * - * @return {Component} - * @method triggerReady - */ - - Component.prototype.triggerReady = function triggerReady() { - this.isReady_ = true; - - // Ensure ready is triggerd asynchronously - this.setTimeout(function () { - var readyQueue = this.readyQueue_; - - // Reset Ready Queue - this.readyQueue_ = []; - - if (readyQueue && readyQueue.length > 0) { - readyQueue.forEach(function (fn) { - fn.call(this); - }, this); - } - - // Allow for using event listeners also - this.trigger('ready'); - }, 1); - }; - - /** - * Finds a single DOM element matching `selector` within the component's - * `contentEl` or another custom context. - * - * @method $ - * @param {String} selector - * A valid CSS selector, which will be passed to `querySelector`. - * - * @param {Element|String} [context=document] - * A DOM element within which to query. Can also be a selector - * string in which case the first matching element will be used - * as context. If missing (or no element matches selector), falls - * back to `document`. - * - * @return {Element|null} - */ - - Component.prototype.$ = function $(selector, context) { - return Dom.$(selector, context || this.contentEl()); - }; - - /** - * Finds a all DOM elements matching `selector` within the component's - * `contentEl` or another custom context. - * - * @method $$ - * @param {String} selector - * A valid CSS selector, which will be passed to `querySelectorAll`. - * - * @param {Element|String} [context=document] - * A DOM element within which to query. Can also be a selector - * string in which case the first matching element will be used - * as context. If missing (or no element matches selector), falls - * back to `document`. - * - * @return {NodeList} - */ - - Component.prototype.$$ = function $$(selector, context) { - return Dom.$$(selector, context || this.contentEl()); - }; - - /** - * Check if a component's element has a CSS class name - * - * @param {String} classToCheck Classname to check - * @return {Component} - * @method hasClass - */ - - Component.prototype.hasClass = function hasClass(classToCheck) { - return Dom.hasElClass(this.el_, classToCheck); - }; - - /** - * Add a CSS class name to the component's element - * - * @param {String} classToAdd Classname to add - * @return {Component} - * @method addClass - */ - - Component.prototype.addClass = function addClass(classToAdd) { - Dom.addElClass(this.el_, classToAdd); - return this; - }; - - /** - * Remove a CSS class name from the component's element - * - * @param {String} classToRemove Classname to remove - * @return {Component} - * @method removeClass - */ - - Component.prototype.removeClass = function removeClass(classToRemove) { - Dom.removeElClass(this.el_, classToRemove); - return this; - }; - - /** - * Add or remove a CSS class name from the component's element - * - * @param {String} classToToggle - * @param {Boolean|Function} [predicate] - * Can be a function that returns a Boolean. If `true`, the class - * will be added; if `false`, the class will be removed. If not - * given, the class will be added if not present and vice versa. - * - * @return {Component} - * @method toggleClass - */ - - Component.prototype.toggleClass = function toggleClass(classToToggle, predicate) { - Dom.toggleElClass(this.el_, classToToggle, predicate); - return this; - }; - - /** - * Show the component element if hidden - * - * @return {Component} - * @method show - */ - - Component.prototype.show = function show() { - this.removeClass('vjs-hidden'); - return this; - }; - - /** - * Hide the component element if currently showing - * - * @return {Component} - * @method hide - */ - - Component.prototype.hide = function hide() { - this.addClass('vjs-hidden'); - return this; - }; - - /** - * Lock an item in its visible state - * To be used with fadeIn/fadeOut. - * - * @return {Component} - * @private - * @method lockShowing - */ - - Component.prototype.lockShowing = function lockShowing() { - this.addClass('vjs-lock-showing'); - return this; - }; - - /** - * Unlock an item to be hidden - * To be used with fadeIn/fadeOut. - * - * @return {Component} - * @private - * @method unlockShowing - */ - - Component.prototype.unlockShowing = function unlockShowing() { - this.removeClass('vjs-lock-showing'); - return this; - }; - - /** - * Set or get the width of the component (CSS values) - * Setting the video tag dimension values only works with values in pixels. - * Percent values will not work. - * Some percents can be used, but width()/height() will return the number + %, - * not the actual computed width/height. - * - * @param {Number|String=} num Optional width number - * @param {Boolean} skipListeners Skip the 'resize' event trigger - * @return {Component} This component, when setting the width - * @return {Number|String} The width, when getting - * @method width - */ - - Component.prototype.width = function width(num, skipListeners) { - return this.dimension('width', num, skipListeners); - }; - - /** - * Get or set the height of the component (CSS values) - * Setting the video tag dimension values only works with values in pixels. - * Percent values will not work. - * Some percents can be used, but width()/height() will return the number + %, - * not the actual computed width/height. - * - * @param {Number|String=} num New component height - * @param {Boolean=} skipListeners Skip the resize event trigger - * @return {Component} This component, when setting the height - * @return {Number|String} The height, when getting - * @method height - */ - - Component.prototype.height = function height(num, skipListeners) { - return this.dimension('height', num, skipListeners); - }; - - /** - * Set both width and height at the same time - * - * @param {Number|String} width Width of player - * @param {Number|String} height Height of player - * @return {Component} The component - * @method dimensions - */ - - Component.prototype.dimensions = function dimensions(width, height) { - // Skip resize listeners on width for optimization - return this.width(width, true).height(height); - }; - - /** - * Get or set width or height - * This is the shared code for the width() and height() methods. - * All for an integer, integer + 'px' or integer + '%'; - * Known issue: Hidden elements officially have a width of 0. We're defaulting - * to the style.width value and falling back to computedStyle which has the - * hidden element issue. Info, but probably not an efficient fix: - * http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/ - * - * @param {String} widthOrHeight 'width' or 'height' - * @param {Number|String=} num New dimension - * @param {Boolean=} skipListeners Skip resize event trigger - * @return {Component} The component if a dimension was set - * @return {Number|String} The dimension if nothing was set - * @private - * @method dimension - */ - - Component.prototype.dimension = function dimension(widthOrHeight, num, skipListeners) { - if (num !== undefined) { - // Set to zero if null or literally NaN (NaN !== NaN) - if (num === null || num !== num) { - num = 0; - } - - // Check if using css width/height (% or px) and adjust - if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) { - this.el_.style[widthOrHeight] = num; - } else if (num === 'auto') { - this.el_.style[widthOrHeight] = ''; - } else { - this.el_.style[widthOrHeight] = num + 'px'; - } - - // skipListeners allows us to avoid triggering the resize event when setting both width and height - if (!skipListeners) { - this.trigger('resize'); - } - - // Return component - return this; - } - - // Not setting a value, so getting it - // Make sure element exists - if (!this.el_) { - return 0; - } - - // Get dimension value from style - var val = this.el_.style[widthOrHeight]; - var pxIndex = val.indexOf('px'); - - if (pxIndex !== -1) { - // Return the pixel value with no 'px' - return parseInt(val.slice(0, pxIndex), 10); - } - - // No px so using % or no style was set, so falling back to offsetWidth/height - // If component has display:none, offset will return 0 - // TODO: handle display:none and no dimension style using px - return parseInt(this.el_['offset' + _utilsToTitleCaseJs2['default'](widthOrHeight)], 10); - }; - - /** - * Get width or height of computed style - * @param {String} widthOrHeight 'width' or 'height' - * @return {Number|Boolean} The bolean false if nothing was set - * @method currentDimension - */ - - Component.prototype.currentDimension = function currentDimension(widthOrHeight) { - var computedWidthOrHeight = 0; - - if (widthOrHeight !== 'width' && widthOrHeight !== 'height') { - throw new Error('currentDimension only accepts width or height value'); - } - - if (typeof _globalWindow2['default'].getComputedStyle === 'function') { - var computedStyle = _globalWindow2['default'].getComputedStyle(this.el_); - computedWidthOrHeight = computedStyle.getPropertyValue(widthOrHeight) || computedStyle[widthOrHeight]; - } else if (this.el_.currentStyle) { - // ie 8 doesn't support computed style, shim it - // return clientWidth or clientHeight instead for better accuracy - var rule = 'offset' + _utilsToTitleCaseJs2['default'](widthOrHeight); - computedWidthOrHeight = this.el_[rule]; - } - - // remove 'px' from variable and parse as integer - computedWidthOrHeight = parseFloat(computedWidthOrHeight); - return computedWidthOrHeight; - }; - - /** - * Get an object which contains width and height values of computed style - * @return {Object} The dimensions of element - * @method currentDimensions - */ - - Component.prototype.currentDimensions = function currentDimensions() { - return { - width: this.currentDimension('width'), - height: this.currentDimension('height') - }; - }; - - /** - * Get width of computed style - * @return {Integer} - * @method currentWidth - */ - - Component.prototype.currentWidth = function currentWidth() { - return this.currentDimension('width'); - }; - - /** - * Get height of computed style - * @return {Integer} - * @method currentHeight - */ - - Component.prototype.currentHeight = function currentHeight() { - return this.currentDimension('height'); - }; - - /** - * Emit 'tap' events when touch events are supported - * This is used to support toggling the controls through a tap on the video. - * We're requiring them to be enabled because otherwise every component would - * have this extra overhead unnecessarily, on mobile devices where extra - * overhead is especially bad. - * - * @private - * @method emitTapEvents - */ - - Component.prototype.emitTapEvents = function emitTapEvents() { - // Track the start time so we can determine how long the touch lasted - var touchStart = 0; - var firstTouch = null; - - // Maximum movement allowed during a touch event to still be considered a tap - // Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number. - var tapMovementThreshold = 10; - - // The maximum length a touch can be while still being considered a tap - var touchTimeThreshold = 200; - - var couldBeTap = undefined; - - this.on('touchstart', function (event) { - // If more than one finger, don't consider treating this as a click - if (event.touches.length === 1) { - // Copy the touches object to prevent modifying the original - firstTouch = _objectAssign2['default']({}, event.touches[0]); - // Record start time so we can detect a tap vs. "touch and hold" - touchStart = new Date().getTime(); - // Reset couldBeTap tracking - couldBeTap = true; - } - }); - - this.on('touchmove', function (event) { - // If more than one finger, don't consider treating this as a click - if (event.touches.length > 1) { - couldBeTap = false; - } else if (firstTouch) { - // Some devices will throw touchmoves for all but the slightest of taps. - // So, if we moved only a small distance, this could still be a tap - var xdiff = event.touches[0].pageX - firstTouch.pageX; - var ydiff = event.touches[0].pageY - firstTouch.pageY; - var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff); - - if (touchDistance > tapMovementThreshold) { - couldBeTap = false; - } - } - }); - - var noTap = function noTap() { - couldBeTap = false; - }; - - // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s - this.on('touchleave', noTap); - this.on('touchcancel', noTap); - - // When the touch ends, measure how long it took and trigger the appropriate - // event - this.on('touchend', function (event) { - firstTouch = null; - // Proceed only if the touchmove/leave/cancel event didn't happen - if (couldBeTap === true) { - // Measure how long the touch lasted - var touchTime = new Date().getTime() - touchStart; - - // Make sure the touch was less than the threshold to be considered a tap - if (touchTime < touchTimeThreshold) { - // Don't let browser turn this into a click - event.preventDefault(); - this.trigger('tap'); - // It may be good to copy the touchend event object and change the - // type to tap, if the other event properties aren't exact after - // Events.fixEvent runs (e.g. event.target) - } - } - }); - }; - - /** - * Report user touch activity when touch events occur - * User activity is used to determine when controls should show/hide. It's - * relatively simple when it comes to mouse events, because any mouse event - * should show the controls. So we capture mouse events that bubble up to the - * player and report activity when that happens. - * With touch events it isn't as easy. We can't rely on touch events at the - * player level, because a tap (touchstart + touchend) on the video itself on - * mobile devices is meant to turn controls off (and on). User activity is - * checked asynchronously, so what could happen is a tap event on the video - * turns the controls off, then the touchend event bubbles up to the player, - * which if it reported user activity, would turn the controls right back on. - * (We also don't want to completely block touch events from bubbling up) - * Also a touchmove, touch+hold, and anything other than a tap is not supposed - * to turn the controls back on on a mobile device. - * Here we're setting the default component behavior to report user activity - * whenever touch events happen, and this can be turned off by components that - * want touch events to act differently. - * - * @method enableTouchActivity - */ - - Component.prototype.enableTouchActivity = function enableTouchActivity() { - // Don't continue if the root player doesn't support reporting user activity - if (!this.player() || !this.player().reportUserActivity) { - return; - } - - // listener for reporting that the user is active - var report = Fn.bind(this.player(), this.player().reportUserActivity); - - var touchHolding = undefined; - - this.on('touchstart', function () { - report(); - // For as long as the they are touching the device or have their mouse down, - // we consider them active even if they're not moving their finger or mouse. - // So we want to continue to update that they are active - this.clearInterval(touchHolding); - // report at the same interval as activityCheck - touchHolding = this.setInterval(report, 250); - }); - - var touchEnd = function touchEnd(event) { - report(); - // stop the interval that maintains activity if the touch is holding - this.clearInterval(touchHolding); - }; - - this.on('touchmove', report); - this.on('touchend', touchEnd); - this.on('touchcancel', touchEnd); - }; - - /** - * Creates timeout and sets up disposal automatically. - * - * @param {Function} fn The function to run after the timeout. - * @param {Number} timeout Number of ms to delay before executing specified function. - * @return {Number} Returns the timeout ID - * @method setTimeout - */ - - Component.prototype.setTimeout = function setTimeout(fn, timeout) { - fn = Fn.bind(this, fn); - - // window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't. - var timeoutId = _globalWindow2['default'].setTimeout(fn, timeout); - - var disposeFn = function disposeFn() { - this.clearTimeout(timeoutId); - }; - - disposeFn.guid = 'vjs-timeout-' + timeoutId; - - this.on('dispose', disposeFn); - - return timeoutId; - }; - - /** - * Clears a timeout and removes the associated dispose listener - * - * @param {Number} timeoutId The id of the timeout to clear - * @return {Number} Returns the timeout ID - * @method clearTimeout - */ - - Component.prototype.clearTimeout = function clearTimeout(timeoutId) { - _globalWindow2['default'].clearTimeout(timeoutId); - - var disposeFn = function disposeFn() {}; - - disposeFn.guid = 'vjs-timeout-' + timeoutId; - - this.off('dispose', disposeFn); - - return timeoutId; - }; - - /** - * Creates an interval and sets up disposal automatically. - * - * @param {Function} fn The function to run every N seconds. - * @param {Number} interval Number of ms to delay before executing specified function. - * @return {Number} Returns the interval ID - * @method setInterval - */ - - Component.prototype.setInterval = function setInterval(fn, interval) { - fn = Fn.bind(this, fn); - - var intervalId = _globalWindow2['default'].setInterval(fn, interval); - - var disposeFn = function disposeFn() { - this.clearInterval(intervalId); - }; - - disposeFn.guid = 'vjs-interval-' + intervalId; - - this.on('dispose', disposeFn); - - return intervalId; - }; - - /** - * Clears an interval and removes the associated dispose listener - * - * @param {Number} intervalId The id of the interval to clear - * @return {Number} Returns the interval ID - * @method clearInterval - */ - - Component.prototype.clearInterval = function clearInterval(intervalId) { - _globalWindow2['default'].clearInterval(intervalId); - - var disposeFn = function disposeFn() {}; - - disposeFn.guid = 'vjs-interval-' + intervalId; - - this.off('dispose', disposeFn); - - return intervalId; - }; - - /** - * Registers a component - * - * @param {String} name Name of the component to register - * @param {Object} comp The component to register - * @static - * @method registerComponent - */ - - Component.registerComponent = function registerComponent(name, comp) { - if (!Component.components_) { - Component.components_ = {}; - } - - Component.components_[name] = comp; - return comp; - }; - - /** - * Gets a component by name - * - * @param {String} name Name of the component to get - * @return {Component} - * @static - * @method getComponent - */ - - Component.getComponent = function getComponent(name) { - if (Component.components_ && Component.components_[name]) { - return Component.components_[name]; - } - - if (_globalWindow2['default'] && _globalWindow2['default'].videojs && _globalWindow2['default'].videojs[name]) { - _utilsLogJs2['default'].warn('The ' + name + ' component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)'); - return _globalWindow2['default'].videojs[name]; - } - }; - - /** - * Sets up the constructor using the supplied init method - * or uses the init of the parent object - * - * @param {Object} props An object of properties - * @static - * @deprecated - * @method extend - */ - - Component.extend = function extend(props) { - props = props || {}; - - _utilsLogJs2['default'].warn('Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead'); - - // Set up the constructor using the supplied init method - // or using the init of the parent object - // Make sure to check the unobfuscated version for external libs - var init = props.init || props.init || this.prototype.init || this.prototype.init || function () {}; - // In Resig's simple class inheritance (previously used) the constructor - // is a function that calls `this.init.apply(arguments)` - // However that would prevent us from using `ParentObject.call(this);` - // in a Child constructor because the `this` in `this.init` - // would still refer to the Child and cause an infinite loop. - // We would instead have to do - // `ParentObject.prototype.init.apply(this, arguments);` - // Bleh. We're not creating a _super() function, so it's good to keep - // the parent constructor reference simple. - var subObj = function subObj() { - init.apply(this, arguments); - }; - - // Inherit from this object's prototype - subObj.prototype = Object.create(this.prototype); - // Reset the constructor property for subObj otherwise - // instances of subObj would have the constructor of the parent Object - subObj.prototype.constructor = subObj; - - // Make the class extendable - subObj.extend = Component.extend; - - // Extend subObj's prototype with functions and other properties from props - for (var _name in props) { - if (props.hasOwnProperty(_name)) { - subObj.prototype[_name] = props[_name]; - } - } - - return subObj; - }; - - return Component; -})(); - -Component.registerComponent('Component', Component); -exports['default'] = Component; -module.exports = exports['default']; - -},{"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/guid.js":138,"./utils/log.js":139,"./utils/merge-options.js":140,"./utils/to-title-case.js":143,"global/window":2,"object.assign":45}],68:[function(_dereq_,module,exports){ -/** - * @file control-bar.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -// Required children - -var _playToggleJs = _dereq_('./play-toggle.js'); - -var _playToggleJs2 = _interopRequireDefault(_playToggleJs); - -var _timeControlsCurrentTimeDisplayJs = _dereq_('./time-controls/current-time-display.js'); - -var _timeControlsCurrentTimeDisplayJs2 = _interopRequireDefault(_timeControlsCurrentTimeDisplayJs); - -var _timeControlsDurationDisplayJs = _dereq_('./time-controls/duration-display.js'); - -var _timeControlsDurationDisplayJs2 = _interopRequireDefault(_timeControlsDurationDisplayJs); - -var _timeControlsTimeDividerJs = _dereq_('./time-controls/time-divider.js'); - -var _timeControlsTimeDividerJs2 = _interopRequireDefault(_timeControlsTimeDividerJs); - -var _timeControlsRemainingTimeDisplayJs = _dereq_('./time-controls/remaining-time-display.js'); - -var _timeControlsRemainingTimeDisplayJs2 = _interopRequireDefault(_timeControlsRemainingTimeDisplayJs); - -var _liveDisplayJs = _dereq_('./live-display.js'); - -var _liveDisplayJs2 = _interopRequireDefault(_liveDisplayJs); - -var _progressControlProgressControlJs = _dereq_('./progress-control/progress-control.js'); - -var _progressControlProgressControlJs2 = _interopRequireDefault(_progressControlProgressControlJs); - -var _fullscreenToggleJs = _dereq_('./fullscreen-toggle.js'); - -var _fullscreenToggleJs2 = _interopRequireDefault(_fullscreenToggleJs); - -var _volumeControlVolumeControlJs = _dereq_('./volume-control/volume-control.js'); - -var _volumeControlVolumeControlJs2 = _interopRequireDefault(_volumeControlVolumeControlJs); - -var _volumeMenuButtonJs = _dereq_('./volume-menu-button.js'); - -var _volumeMenuButtonJs2 = _interopRequireDefault(_volumeMenuButtonJs); - -var _muteToggleJs = _dereq_('./mute-toggle.js'); - -var _muteToggleJs2 = _interopRequireDefault(_muteToggleJs); - -var _textTrackControlsChaptersButtonJs = _dereq_('./text-track-controls/chapters-button.js'); - -var _textTrackControlsChaptersButtonJs2 = _interopRequireDefault(_textTrackControlsChaptersButtonJs); - -var _textTrackControlsDescriptionsButtonJs = _dereq_('./text-track-controls/descriptions-button.js'); - -var _textTrackControlsDescriptionsButtonJs2 = _interopRequireDefault(_textTrackControlsDescriptionsButtonJs); - -var _textTrackControlsSubtitlesButtonJs = _dereq_('./text-track-controls/subtitles-button.js'); - -var _textTrackControlsSubtitlesButtonJs2 = _interopRequireDefault(_textTrackControlsSubtitlesButtonJs); - -var _textTrackControlsCaptionsButtonJs = _dereq_('./text-track-controls/captions-button.js'); - -var _textTrackControlsCaptionsButtonJs2 = _interopRequireDefault(_textTrackControlsCaptionsButtonJs); - -var _playbackRateMenuPlaybackRateMenuButtonJs = _dereq_('./playback-rate-menu/playback-rate-menu-button.js'); - -var _playbackRateMenuPlaybackRateMenuButtonJs2 = _interopRequireDefault(_playbackRateMenuPlaybackRateMenuButtonJs); - -var _spacerControlsCustomControlSpacerJs = _dereq_('./spacer-controls/custom-control-spacer.js'); - -var _spacerControlsCustomControlSpacerJs2 = _interopRequireDefault(_spacerControlsCustomControlSpacerJs); - -/** - * Container of main controls - * - * @extends Component - * @class ControlBar - */ - -var ControlBar = (function (_Component) { - _inherits(ControlBar, _Component); - - function ControlBar() { - _classCallCheck(this, ControlBar); - - _Component.apply(this, arguments); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - ControlBar.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-control-bar', - dir: 'ltr' - }, { - 'role': 'group' // The control bar is a group, so it can contain menuitems - }); - }; - - return ControlBar; -})(_componentJs2['default']); - -ControlBar.prototype.options_ = { - loadEvent: 'play', - children: ['playToggle', 'volumeMenuButton', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subtitlesButton', 'captionsButton', 'fullscreenToggle'] -}; - -_componentJs2['default'].registerComponent('ControlBar', ControlBar); -exports['default'] = ControlBar; -module.exports = exports['default']; - -},{"../component.js":67,"./fullscreen-toggle.js":69,"./live-display.js":70,"./mute-toggle.js":71,"./play-toggle.js":72,"./playback-rate-menu/playback-rate-menu-button.js":73,"./progress-control/progress-control.js":78,"./spacer-controls/custom-control-spacer.js":81,"./text-track-controls/captions-button.js":84,"./text-track-controls/chapters-button.js":85,"./text-track-controls/descriptions-button.js":87,"./text-track-controls/subtitles-button.js":89,"./time-controls/current-time-display.js":92,"./time-controls/duration-display.js":93,"./time-controls/remaining-time-display.js":94,"./time-controls/time-divider.js":95,"./volume-control/volume-control.js":97,"./volume-menu-button.js":99}],69:[function(_dereq_,module,exports){ -/** - * @file fullscreen-toggle.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _buttonJs = _dereq_('../button.js'); - -var _buttonJs2 = _interopRequireDefault(_buttonJs); - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * Toggle fullscreen video - * - * @extends Button - * @class FullscreenToggle - */ - -var FullscreenToggle = (function (_Button) { - _inherits(FullscreenToggle, _Button); - - function FullscreenToggle() { - _classCallCheck(this, FullscreenToggle); - - _Button.apply(this, arguments); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - FullscreenToggle.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-fullscreen-control ' + _Button.prototype.buildCSSClass.call(this); - }; - - /** - * Handles click for full screen - * - * @method handleClick - */ - - FullscreenToggle.prototype.handleClick = function handleClick() { - if (!this.player_.isFullscreen()) { - this.player_.requestFullscreen(); - this.controlText('Non-Fullscreen'); - } else { - this.player_.exitFullscreen(); - this.controlText('Fullscreen'); - } - }; - - return FullscreenToggle; -})(_buttonJs2['default']); - -FullscreenToggle.prototype.controlText_ = 'Fullscreen'; - -_componentJs2['default'].registerComponent('FullscreenToggle', FullscreenToggle); -exports['default'] = FullscreenToggle; -module.exports = exports['default']; - -},{"../button.js":64,"../component.js":67}],70:[function(_dereq_,module,exports){ -/** - * @file live-display.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _component = _dereq_('../component'); - -var _component2 = _interopRequireDefault(_component); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -/** - * Displays the live indicator - * TODO - Future make it click to snap to live - * - * @extends Component - * @class LiveDisplay - */ - -var LiveDisplay = (function (_Component) { - _inherits(LiveDisplay, _Component); - - function LiveDisplay(player, options) { - _classCallCheck(this, LiveDisplay); - - _Component.call(this, player, options); - - this.updateShowing(); - this.on(this.player(), 'durationchange', this.updateShowing); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - LiveDisplay.prototype.createEl = function createEl() { - var el = _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-live-control vjs-control' - }); - - this.contentEl_ = Dom.createEl('div', { - className: 'vjs-live-display', - innerHTML: '' + this.localize('Stream Type') + '' + this.localize('LIVE') - }, { - 'aria-live': 'off' - }); - - el.appendChild(this.contentEl_); - return el; - }; - - LiveDisplay.prototype.updateShowing = function updateShowing() { - if (this.player().duration() === Infinity) { - this.show(); - } else { - this.hide(); - } - }; - - return LiveDisplay; -})(_component2['default']); - -_component2['default'].registerComponent('LiveDisplay', LiveDisplay); -exports['default'] = LiveDisplay; -module.exports = exports['default']; - -},{"../component":67,"../utils/dom.js":134}],71:[function(_dereq_,module,exports){ -/** - * @file mute-toggle.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _button = _dereq_('../button'); - -var _button2 = _interopRequireDefault(_button); - -var _component = _dereq_('../component'); - -var _component2 = _interopRequireDefault(_component); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -/** - * A button component for muting the audio - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Button - * @class MuteToggle - */ - -var MuteToggle = (function (_Button) { - _inherits(MuteToggle, _Button); - - function MuteToggle(player, options) { - _classCallCheck(this, MuteToggle); - - _Button.call(this, player, options); - - this.on(player, 'volumechange', this.update); - - // hide mute toggle if the current tech doesn't support volume control - if (player.tech_ && player.tech_['featuresVolumeControl'] === false) { - this.addClass('vjs-hidden'); - } - - this.on(player, 'loadstart', function () { - this.update(); // We need to update the button to account for a default muted state. - - if (player.tech_['featuresVolumeControl'] === false) { - this.addClass('vjs-hidden'); - } else { - this.removeClass('vjs-hidden'); - } - }); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - MuteToggle.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-mute-control ' + _Button.prototype.buildCSSClass.call(this); - }; - - /** - * Handle click on mute - * - * @method handleClick - */ - - MuteToggle.prototype.handleClick = function handleClick() { - this.player_.muted(this.player_.muted() ? false : true); - }; - - /** - * Update volume - * - * @method update - */ - - MuteToggle.prototype.update = function update() { - var vol = this.player_.volume(), - level = 3; - - if (vol === 0 || this.player_.muted()) { - level = 0; - } else if (vol < 0.33) { - level = 1; - } else if (vol < 0.67) { - level = 2; - } - - // Don't rewrite the button text if the actual text doesn't change. - // This causes unnecessary and confusing information for screen reader users. - // This check is needed because this function gets called every time the volume level is changed. - var toMute = this.player_.muted() ? 'Unmute' : 'Mute'; - if (this.controlText() !== toMute) { - this.controlText(toMute); - } - - /* TODO improve muted icon classes */ - for (var i = 0; i < 4; i++) { - Dom.removeElClass(this.el_, 'vjs-vol-' + i); - } - Dom.addElClass(this.el_, 'vjs-vol-' + level); - }; - - return MuteToggle; -})(_button2['default']); - -MuteToggle.prototype.controlText_ = 'Mute'; - -_component2['default'].registerComponent('MuteToggle', MuteToggle); -exports['default'] = MuteToggle; -module.exports = exports['default']; - -},{"../button":64,"../component":67,"../utils/dom.js":134}],72:[function(_dereq_,module,exports){ -/** - * @file play-toggle.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _buttonJs = _dereq_('../button.js'); - -var _buttonJs2 = _interopRequireDefault(_buttonJs); - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * Button to toggle between play and pause - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Button - * @class PlayToggle - */ - -var PlayToggle = (function (_Button) { - _inherits(PlayToggle, _Button); - - function PlayToggle(player, options) { - _classCallCheck(this, PlayToggle); - - _Button.call(this, player, options); - - this.on(player, 'play', this.handlePlay); - this.on(player, 'pause', this.handlePause); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - PlayToggle.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-play-control ' + _Button.prototype.buildCSSClass.call(this); - }; - - /** - * Handle click to toggle between play and pause - * - * @method handleClick - */ - - PlayToggle.prototype.handleClick = function handleClick() { - if (this.player_.paused()) { - this.player_.play(); - } else { - this.player_.pause(); - } - }; - - /** - * Add the vjs-playing class to the element so it can change appearance - * - * @method handlePlay - */ - - PlayToggle.prototype.handlePlay = function handlePlay() { - this.removeClass('vjs-paused'); - this.addClass('vjs-playing'); - this.controlText('Pause'); // change the button text to "Pause" - }; - - /** - * Add the vjs-paused class to the element so it can change appearance - * - * @method handlePause - */ - - PlayToggle.prototype.handlePause = function handlePause() { - this.removeClass('vjs-playing'); - this.addClass('vjs-paused'); - this.controlText('Play'); // change the button text to "Play" - }; - - return PlayToggle; -})(_buttonJs2['default']); - -PlayToggle.prototype.controlText_ = 'Play'; - -_componentJs2['default'].registerComponent('PlayToggle', PlayToggle); -exports['default'] = PlayToggle; -module.exports = exports['default']; - -},{"../button.js":64,"../component.js":67}],73:[function(_dereq_,module,exports){ -/** - * @file playback-rate-menu-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _menuMenuButtonJs = _dereq_('../../menu/menu-button.js'); - -var _menuMenuButtonJs2 = _interopRequireDefault(_menuMenuButtonJs); - -var _menuMenuJs = _dereq_('../../menu/menu.js'); - -var _menuMenuJs2 = _interopRequireDefault(_menuMenuJs); - -var _playbackRateMenuItemJs = _dereq_('./playback-rate-menu-item.js'); - -var _playbackRateMenuItemJs2 = _interopRequireDefault(_playbackRateMenuItemJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -/** - * The component for controlling the playback rate - * - * @param {Player|Object} player - * @param {Object=} options - * @extends MenuButton - * @class PlaybackRateMenuButton - */ - -var PlaybackRateMenuButton = (function (_MenuButton) { - _inherits(PlaybackRateMenuButton, _MenuButton); - - function PlaybackRateMenuButton(player, options) { - _classCallCheck(this, PlaybackRateMenuButton); - - _MenuButton.call(this, player, options); - - this.updateVisibility(); - this.updateLabel(); - - this.on(player, 'loadstart', this.updateVisibility); - this.on(player, 'ratechange', this.updateLabel); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - PlaybackRateMenuButton.prototype.createEl = function createEl() { - var el = _MenuButton.prototype.createEl.call(this); - - this.labelEl_ = Dom.createEl('div', { - className: 'vjs-playback-rate-value', - innerHTML: 1.0 - }); - - el.appendChild(this.labelEl_); - - return el; - }; - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - PlaybackRateMenuButton.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-playback-rate ' + _MenuButton.prototype.buildCSSClass.call(this); - }; - - /** - * Create the playback rate menu - * - * @return {Menu} Menu object populated with items - * @method createMenu - */ - - PlaybackRateMenuButton.prototype.createMenu = function createMenu() { - var menu = new _menuMenuJs2['default'](this.player()); - var rates = this.playbackRates(); - - if (rates) { - for (var i = rates.length - 1; i >= 0; i--) { - menu.addChild(new _playbackRateMenuItemJs2['default'](this.player(), { 'rate': rates[i] + 'x' })); - } - } - - return menu; - }; - - /** - * Updates ARIA accessibility attributes - * - * @method updateARIAAttributes - */ - - PlaybackRateMenuButton.prototype.updateARIAAttributes = function updateARIAAttributes() { - // Current playback rate - this.el().setAttribute('aria-valuenow', this.player().playbackRate()); - }; - - /** - * Handle menu item click - * - * @method handleClick - */ - - PlaybackRateMenuButton.prototype.handleClick = function handleClick() { - // select next rate option - var currentRate = this.player().playbackRate(); - var rates = this.playbackRates(); - - // this will select first one if the last one currently selected - var newRate = rates[0]; - for (var i = 0; i < rates.length; i++) { - if (rates[i] > currentRate) { - newRate = rates[i]; - break; - } - } - this.player().playbackRate(newRate); - }; - - /** - * Get possible playback rates - * - * @return {Array} Possible playback rates - * @method playbackRates - */ - - PlaybackRateMenuButton.prototype.playbackRates = function playbackRates() { - return this.options_['playbackRates'] || this.options_.playerOptions && this.options_.playerOptions['playbackRates']; - }; - - /** - * Get supported playback rates - * - * @return {Array} Supported playback rates - * @method playbackRateSupported - */ - - PlaybackRateMenuButton.prototype.playbackRateSupported = function playbackRateSupported() { - return this.player().tech_ && this.player().tech_['featuresPlaybackRate'] && this.playbackRates() && this.playbackRates().length > 0; - }; - - /** - * Hide playback rate controls when they're no playback rate options to select - * - * @method updateVisibility - */ - - PlaybackRateMenuButton.prototype.updateVisibility = function updateVisibility() { - if (this.playbackRateSupported()) { - this.removeClass('vjs-hidden'); - } else { - this.addClass('vjs-hidden'); - } - }; - - /** - * Update button label when rate changed - * - * @method updateLabel - */ - - PlaybackRateMenuButton.prototype.updateLabel = function updateLabel() { - if (this.playbackRateSupported()) { - this.labelEl_.innerHTML = this.player().playbackRate() + 'x'; - } - }; - - return PlaybackRateMenuButton; -})(_menuMenuButtonJs2['default']); - -PlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate'; - -_componentJs2['default'].registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton); -exports['default'] = PlaybackRateMenuButton; -module.exports = exports['default']; - -},{"../../component.js":67,"../../menu/menu-button.js":106,"../../menu/menu.js":108,"../../utils/dom.js":134,"./playback-rate-menu-item.js":74}],74:[function(_dereq_,module,exports){ -/** - * @file playback-rate-menu-item.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _menuMenuItemJs = _dereq_('../../menu/menu-item.js'); - -var _menuMenuItemJs2 = _interopRequireDefault(_menuMenuItemJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * The specific menu item type for selecting a playback rate - * - * @param {Player|Object} player - * @param {Object=} options - * @extends MenuItem - * @class PlaybackRateMenuItem - */ - -var PlaybackRateMenuItem = (function (_MenuItem) { - _inherits(PlaybackRateMenuItem, _MenuItem); - - function PlaybackRateMenuItem(player, options) { - _classCallCheck(this, PlaybackRateMenuItem); - - var label = options['rate']; - var rate = parseFloat(label, 10); - - // Modify options for parent MenuItem class's init. - options['label'] = label; - options['selected'] = rate === 1; - _MenuItem.call(this, player, options); - - this.label = label; - this.rate = rate; - - this.on(player, 'ratechange', this.update); - } - - /** - * Handle click on menu item - * - * @method handleClick - */ - - PlaybackRateMenuItem.prototype.handleClick = function handleClick() { - _MenuItem.prototype.handleClick.call(this); - this.player().playbackRate(this.rate); - }; - - /** - * Update playback rate with selected rate - * - * @method update - */ - - PlaybackRateMenuItem.prototype.update = function update() { - this.selected(this.player().playbackRate() === this.rate); - }; - - return PlaybackRateMenuItem; -})(_menuMenuItemJs2['default']); - -PlaybackRateMenuItem.prototype.contentElType = 'button'; - -_componentJs2['default'].registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem); -exports['default'] = PlaybackRateMenuItem; -module.exports = exports['default']; - -},{"../../component.js":67,"../../menu/menu-item.js":107}],75:[function(_dereq_,module,exports){ -/** - * @file load-progress-bar.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -/** - * Shows load progress - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class LoadProgressBar - */ - -var LoadProgressBar = (function (_Component) { - _inherits(LoadProgressBar, _Component); - - function LoadProgressBar(player, options) { - _classCallCheck(this, LoadProgressBar); - - _Component.call(this, player, options); - this.on(player, 'progress', this.update); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - LoadProgressBar.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-load-progress', - innerHTML: '' + this.localize('Loaded') + ': 0%' - }); - }; - - /** - * Update progress bar - * - * @method update - */ - - LoadProgressBar.prototype.update = function update() { - var buffered = this.player_.buffered(); - var duration = this.player_.duration(); - var bufferedEnd = this.player_.bufferedEnd(); - var children = this.el_.children; - - // get the percent width of a time compared to the total end - var percentify = function percentify(time, end) { - var percent = time / end || 0; // no NaN - return (percent >= 1 ? 1 : percent) * 100 + '%'; - }; - - // update the width of the progress bar - this.el_.style.width = percentify(bufferedEnd, duration); - - // add child elements to represent the individual buffered time ranges - for (var i = 0; i < buffered.length; i++) { - var start = buffered.start(i); - var end = buffered.end(i); - var part = children[i]; - - if (!part) { - part = this.el_.appendChild(Dom.createEl()); - } - - // set the percent based on the width of the progress bar (bufferedEnd) - part.style.left = percentify(start, bufferedEnd); - part.style.width = percentify(end - start, bufferedEnd); - } - - // remove unused buffered range elements - for (var i = children.length; i > buffered.length; i--) { - this.el_.removeChild(children[i - 1]); - } - }; - - return LoadProgressBar; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('LoadProgressBar', LoadProgressBar); -exports['default'] = LoadProgressBar; -module.exports = exports['default']; - -},{"../../component.js":67,"../../utils/dom.js":134}],76:[function(_dereq_,module,exports){ -/** - * @file mouse-time-display.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); - -var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); - -var _lodashCompatFunctionThrottle = _dereq_('lodash-compat/function/throttle'); - -var _lodashCompatFunctionThrottle2 = _interopRequireDefault(_lodashCompatFunctionThrottle); - -/** - * The Mouse Time Display component shows the time you will seek to - * when hovering over the progress bar - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class MouseTimeDisplay - */ - -var MouseTimeDisplay = (function (_Component) { - _inherits(MouseTimeDisplay, _Component); - - function MouseTimeDisplay(player, options) { - var _this = this; - - _classCallCheck(this, MouseTimeDisplay); - - _Component.call(this, player, options); - - if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) { - this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside; - } - - if (this.keepTooltipsInside) { - this.tooltip = Dom.createEl('div', { className: 'vjs-time-tooltip' }); - this.el().appendChild(this.tooltip); - this.addClass('vjs-keep-tooltips-inside'); - } - - this.update(0, 0); - - player.on('ready', function () { - _this.on(player.controlBar.progressControl.el(), 'mousemove', _lodashCompatFunctionThrottle2['default'](Fn.bind(_this, _this.handleMouseMove), 25)); - }); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - MouseTimeDisplay.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-mouse-display' - }); - }; - - MouseTimeDisplay.prototype.handleMouseMove = function handleMouseMove(event) { - var duration = this.player_.duration(); - var newTime = this.calculateDistance(event) * duration; - var position = event.pageX - Dom.findElPosition(this.el().parentNode).left; - - this.update(newTime, position); - }; - - MouseTimeDisplay.prototype.update = function update(newTime, position) { - var time = _utilsFormatTimeJs2['default'](newTime, this.player_.duration()); - - this.el().style.left = position + 'px'; - this.el().setAttribute('data-current-time', time); - - if (this.keepTooltipsInside) { - var clampedPosition = this.clampPosition_(position); - var difference = position - clampedPosition + 1; - var tooltipWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.tooltip).width); - var tooltipWidthHalf = tooltipWidth / 2; - - this.tooltip.innerHTML = time; - this.tooltip.style.right = '-' + (tooltipWidthHalf - difference) + 'px'; - } - }; - - MouseTimeDisplay.prototype.calculateDistance = function calculateDistance(event) { - return Dom.getPointerPosition(this.el().parentNode, event).x; - }; - - /** - * This takes in a horizontal position for the bar and returns a clamped position. - * Clamped position means that it will keep the position greater than half the width - * of the tooltip and smaller than the player width minus half the width o the tooltip. - * It will only clamp the position if `keepTooltipsInside` option is set. - * - * @param {Number} position the position the bar wants to be - * @return {Number} newPosition the (potentially) clamped position - * @method clampPosition_ - */ - - MouseTimeDisplay.prototype.clampPosition_ = function clampPosition_(position) { - if (!this.keepTooltipsInside) { - return position; - } - - var playerWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.player().el()).width); - var tooltipWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.tooltip).width); - var tooltipWidthHalf = tooltipWidth / 2; - var actualPosition = position; - - if (position < tooltipWidthHalf) { - actualPosition = Math.ceil(tooltipWidthHalf); - } else if (position > playerWidth - tooltipWidthHalf) { - actualPosition = Math.floor(playerWidth - tooltipWidthHalf); - } - - return actualPosition; - }; - - return MouseTimeDisplay; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('MouseTimeDisplay', MouseTimeDisplay); -exports['default'] = MouseTimeDisplay; -module.exports = exports['default']; - -},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137,"global/window":2,"lodash-compat/function/throttle":7}],77:[function(_dereq_,module,exports){ -/** - * @file play-progress-bar.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); - -var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); - -/** - * Shows play progress - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class PlayProgressBar - */ - -var PlayProgressBar = (function (_Component) { - _inherits(PlayProgressBar, _Component); - - function PlayProgressBar(player, options) { - _classCallCheck(this, PlayProgressBar); - - _Component.call(this, player, options); - this.updateDataAttr(); - this.on(player, 'timeupdate', this.updateDataAttr); - player.ready(Fn.bind(this, this.updateDataAttr)); - - if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) { - this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside; - } - - if (this.keepTooltipsInside) { - this.addClass('vjs-keep-tooltips-inside'); - } - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - PlayProgressBar.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-play-progress vjs-slider-bar', - innerHTML: '' + this.localize('Progress') + ': 0%' - }); - }; - - PlayProgressBar.prototype.updateDataAttr = function updateDataAttr() { - var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); - this.el_.setAttribute('data-current-time', _utilsFormatTimeJs2['default'](time, this.player_.duration())); - }; - - return PlayProgressBar; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('PlayProgressBar', PlayProgressBar); -exports['default'] = PlayProgressBar; -module.exports = exports['default']; - -},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137}],78:[function(_dereq_,module,exports){ -/** - * @file progress-control.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _seekBarJs = _dereq_('./seek-bar.js'); - -var _seekBarJs2 = _interopRequireDefault(_seekBarJs); - -var _mouseTimeDisplayJs = _dereq_('./mouse-time-display.js'); - -var _mouseTimeDisplayJs2 = _interopRequireDefault(_mouseTimeDisplayJs); - -/** - * The Progress Control component contains the seek bar, load progress, - * and play progress - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class ProgressControl - */ - -var ProgressControl = (function (_Component) { - _inherits(ProgressControl, _Component); - - function ProgressControl() { - _classCallCheck(this, ProgressControl); - - _Component.apply(this, arguments); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - ProgressControl.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-progress-control vjs-control' - }); - }; - - return ProgressControl; -})(_componentJs2['default']); - -ProgressControl.prototype.options_ = { - children: ['seekBar'] -}; - -_componentJs2['default'].registerComponent('ProgressControl', ProgressControl); -exports['default'] = ProgressControl; -module.exports = exports['default']; - -},{"../../component.js":67,"./mouse-time-display.js":76,"./seek-bar.js":79}],79:[function(_dereq_,module,exports){ -/** - * @file seek-bar.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _sliderSliderJs = _dereq_('../../slider/slider.js'); - -var _sliderSliderJs2 = _interopRequireDefault(_sliderSliderJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _loadProgressBarJs = _dereq_('./load-progress-bar.js'); - -var _loadProgressBarJs2 = _interopRequireDefault(_loadProgressBarJs); - -var _playProgressBarJs = _dereq_('./play-progress-bar.js'); - -var _playProgressBarJs2 = _interopRequireDefault(_playProgressBarJs); - -var _tooltipProgressBarJs = _dereq_('./tooltip-progress-bar.js'); - -var _tooltipProgressBarJs2 = _interopRequireDefault(_tooltipProgressBarJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); - -var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -/** - * Seek Bar and holder for the progress bars - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Slider - * @class SeekBar - */ - -var SeekBar = (function (_Slider) { - _inherits(SeekBar, _Slider); - - function SeekBar(player, options) { - _classCallCheck(this, SeekBar); - - _Slider.call(this, player, options); - this.on(player, 'timeupdate', this.updateProgress); - this.on(player, 'ended', this.updateProgress); - player.ready(Fn.bind(this, this.updateProgress)); - - if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) { - this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside; - } - - if (this.keepTooltipsInside) { - this.tooltipProgressBar = this.addChild('TooltipProgressBar'); - } - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - SeekBar.prototype.createEl = function createEl() { - return _Slider.prototype.createEl.call(this, 'div', { - className: 'vjs-progress-holder' - }, { - 'aria-label': 'progress bar' - }); - }; - - /** - * Update ARIA accessibility attributes - * - * @method updateARIAAttributes - */ - - SeekBar.prototype.updateProgress = function updateProgress() { - this.updateAriaAttributes(this.el_); - - if (this.keepTooltipsInside) { - this.updateAriaAttributes(this.tooltipProgressBar.el_); - this.tooltipProgressBar.el_.style.width = this.bar.el_.style.width; - - var playerWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.player().el()).width); - var tooltipWidth = parseFloat(_globalWindow2['default'].getComputedStyle(this.tooltipProgressBar.tooltip).width); - var tooltipStyle = this.tooltipProgressBar.el().style; - tooltipStyle.maxWidth = Math.floor(playerWidth - tooltipWidth / 2) + 'px'; - tooltipStyle.minWidth = Math.ceil(tooltipWidth / 2) + 'px'; - tooltipStyle.right = '-' + tooltipWidth / 2 + 'px'; - } - }; - - SeekBar.prototype.updateAriaAttributes = function updateAriaAttributes(el) { - // Allows for smooth scrubbing, when player can't keep up. - var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); - el.setAttribute('aria-valuenow', (this.getPercent() * 100).toFixed(2)); // machine readable value of progress bar (percentage complete) - el.setAttribute('aria-valuetext', _utilsFormatTimeJs2['default'](time, this.player_.duration())); // human readable value of progress bar (time complete) - }; - - /** - * Get percentage of video played - * - * @return {Number} Percentage played - * @method getPercent - */ - - SeekBar.prototype.getPercent = function getPercent() { - var percent = this.player_.currentTime() / this.player_.duration(); - return percent >= 1 ? 1 : percent; - }; - - /** - * Handle mouse down on seek bar - * - * @method handleMouseDown - */ - - SeekBar.prototype.handleMouseDown = function handleMouseDown(event) { - _Slider.prototype.handleMouseDown.call(this, event); - - this.player_.scrubbing(true); - - this.videoWasPlaying = !this.player_.paused(); - this.player_.pause(); - }; - - /** - * Handle mouse move on seek bar - * - * @method handleMouseMove - */ - - SeekBar.prototype.handleMouseMove = function handleMouseMove(event) { - var newTime = this.calculateDistance(event) * this.player_.duration(); - - // Don't let video end while scrubbing. - if (newTime === this.player_.duration()) { - newTime = newTime - 0.1; - } - - // Set new time (tell player to seek to new time) - this.player_.currentTime(newTime); - }; - - /** - * Handle mouse up on seek bar - * - * @method handleMouseUp - */ - - SeekBar.prototype.handleMouseUp = function handleMouseUp(event) { - _Slider.prototype.handleMouseUp.call(this, event); - - this.player_.scrubbing(false); - if (this.videoWasPlaying) { - this.player_.play(); - } - }; - - /** - * Move more quickly fast forward for keyboard-only users - * - * @method stepForward - */ - - SeekBar.prototype.stepForward = function stepForward() { - this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users - }; - - /** - * Move more quickly rewind for keyboard-only users - * - * @method stepBack - */ - - SeekBar.prototype.stepBack = function stepBack() { - this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users - }; - - return SeekBar; -})(_sliderSliderJs2['default']); - -SeekBar.prototype.options_ = { - children: ['loadProgressBar', 'mouseTimeDisplay', 'playProgressBar'], - 'barName': 'playProgressBar' -}; - -SeekBar.prototype.playerEvent = 'timeupdate'; - -_componentJs2['default'].registerComponent('SeekBar', SeekBar); -exports['default'] = SeekBar; -module.exports = exports['default']; - -},{"../../component.js":67,"../../slider/slider.js":116,"../../utils/fn.js":136,"../../utils/format-time.js":137,"./load-progress-bar.js":75,"./play-progress-bar.js":77,"./tooltip-progress-bar.js":80,"global/window":2,"object.assign":45}],80:[function(_dereq_,module,exports){ -/** - * @file play-progress-bar.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); - -var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); - -/** - * Shows play progress - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class PlayProgressBar - */ - -var TooltipProgressBar = (function (_Component) { - _inherits(TooltipProgressBar, _Component); - - function TooltipProgressBar(player, options) { - _classCallCheck(this, TooltipProgressBar); - - _Component.call(this, player, options); - this.updateDataAttr(); - this.on(player, 'timeupdate', this.updateDataAttr); - player.ready(Fn.bind(this, this.updateDataAttr)); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - TooltipProgressBar.prototype.createEl = function createEl() { - var el = _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-tooltip-progress-bar vjs-slider-bar', - innerHTML: '
    \n ' + this.localize('Progress') + ': 0%' - }); - - this.tooltip = el.querySelector('.vjs-time-tooltip'); - - return el; - }; - - TooltipProgressBar.prototype.updateDataAttr = function updateDataAttr() { - var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); - var formattedTime = _utilsFormatTimeJs2['default'](time, this.player_.duration()); - this.el_.setAttribute('data-current-time', formattedTime); - this.tooltip.innerHTML = formattedTime; - }; - - return TooltipProgressBar; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('TooltipProgressBar', TooltipProgressBar); -exports['default'] = TooltipProgressBar; -module.exports = exports['default']; - -},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137}],81:[function(_dereq_,module,exports){ -/** - * @file custom-control-spacer.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _spacerJs = _dereq_('./spacer.js'); - -var _spacerJs2 = _interopRequireDefault(_spacerJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * Spacer specifically meant to be used as an insertion point for new plugins, etc. - * - * @extends Spacer - * @class CustomControlSpacer - */ - -var CustomControlSpacer = (function (_Spacer) { - _inherits(CustomControlSpacer, _Spacer); - - function CustomControlSpacer() { - _classCallCheck(this, CustomControlSpacer); - - _Spacer.apply(this, arguments); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - CustomControlSpacer.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-custom-control-spacer ' + _Spacer.prototype.buildCSSClass.call(this); - }; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - CustomControlSpacer.prototype.createEl = function createEl() { - var el = _Spacer.prototype.createEl.call(this, { - className: this.buildCSSClass() - }); - - // No-flex/table-cell mode requires there be some content - // in the cell to fill the remaining space of the table. - el.innerHTML = ' '; - return el; - }; - - return CustomControlSpacer; -})(_spacerJs2['default']); - -_componentJs2['default'].registerComponent('CustomControlSpacer', CustomControlSpacer); -exports['default'] = CustomControlSpacer; -module.exports = exports['default']; - -},{"../../component.js":67,"./spacer.js":82}],82:[function(_dereq_,module,exports){ -/** - * @file spacer.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * Just an empty spacer element that can be used as an append point for plugins, etc. - * Also can be used to create space between elements when necessary. - * - * @extends Component - * @class Spacer - */ - -var Spacer = (function (_Component) { - _inherits(Spacer, _Component); - - function Spacer() { - _classCallCheck(this, Spacer); - - _Component.apply(this, arguments); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - Spacer.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-spacer ' + _Component.prototype.buildCSSClass.call(this); - }; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - Spacer.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: this.buildCSSClass() - }); - }; - - return Spacer; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('Spacer', Spacer); - -exports['default'] = Spacer; -module.exports = exports['default']; - -},{"../../component.js":67}],83:[function(_dereq_,module,exports){ -/** - * @file caption-settings-menu-item.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _textTrackMenuItemJs = _dereq_('./text-track-menu-item.js'); - -var _textTrackMenuItemJs2 = _interopRequireDefault(_textTrackMenuItemJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * The menu item for caption track settings menu - * - * @param {Player|Object} player - * @param {Object=} options - * @extends TextTrackMenuItem - * @class CaptionSettingsMenuItem - */ - -var CaptionSettingsMenuItem = (function (_TextTrackMenuItem) { - _inherits(CaptionSettingsMenuItem, _TextTrackMenuItem); - - function CaptionSettingsMenuItem(player, options) { - _classCallCheck(this, CaptionSettingsMenuItem); - - options['track'] = { - 'kind': options['kind'], - 'player': player, - 'label': options['kind'] + ' settings', - 'selectable': false, - 'default': false, - mode: 'disabled' - }; - - // CaptionSettingsMenuItem has no concept of 'selected' - options['selectable'] = false; - - _TextTrackMenuItem.call(this, player, options); - this.addClass('vjs-texttrack-settings'); - this.controlText(', opens ' + options['kind'] + ' settings dialog'); - } - - /** - * Handle click on menu item - * - * @method handleClick - */ - - CaptionSettingsMenuItem.prototype.handleClick = function handleClick() { - this.player().getChild('textTrackSettings').show(); - this.player().getChild('textTrackSettings').el_.focus(); - }; - - return CaptionSettingsMenuItem; -})(_textTrackMenuItemJs2['default']); - -_componentJs2['default'].registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem); -exports['default'] = CaptionSettingsMenuItem; -module.exports = exports['default']; - -},{"../../component.js":67,"./text-track-menu-item.js":91}],84:[function(_dereq_,module,exports){ -/** - * @file captions-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _textTrackButtonJs = _dereq_('./text-track-button.js'); - -var _textTrackButtonJs2 = _interopRequireDefault(_textTrackButtonJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _captionSettingsMenuItemJs = _dereq_('./caption-settings-menu-item.js'); - -var _captionSettingsMenuItemJs2 = _interopRequireDefault(_captionSettingsMenuItemJs); - -/** - * The button component for toggling and selecting captions - * - * @param {Object} player Player object - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends TextTrackButton - * @class CaptionsButton - */ - -var CaptionsButton = (function (_TextTrackButton) { - _inherits(CaptionsButton, _TextTrackButton); - - function CaptionsButton(player, options, ready) { - _classCallCheck(this, CaptionsButton); - - _TextTrackButton.call(this, player, options, ready); - this.el_.setAttribute('aria-label', 'Captions Menu'); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - CaptionsButton.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-captions-button ' + _TextTrackButton.prototype.buildCSSClass.call(this); - }; - - /** - * Update caption menu items - * - * @method update - */ - - CaptionsButton.prototype.update = function update() { - var threshold = 2; - _TextTrackButton.prototype.update.call(this); - - // if native, then threshold is 1 because no settings button - if (this.player().tech_ && this.player().tech_['featuresNativeTextTracks']) { - threshold = 1; - } - - if (this.items && this.items.length > threshold) { - this.show(); - } else { - this.hide(); - } - }; - - /** - * Create caption menu items - * - * @return {Array} Array of menu items - * @method createItems - */ - - CaptionsButton.prototype.createItems = function createItems() { - var items = []; - - if (!(this.player().tech_ && this.player().tech_['featuresNativeTextTracks'])) { - items.push(new _captionSettingsMenuItemJs2['default'](this.player_, { 'kind': this.kind_ })); - } - - return _TextTrackButton.prototype.createItems.call(this, items); - }; - - return CaptionsButton; -})(_textTrackButtonJs2['default']); - -CaptionsButton.prototype.kind_ = 'captions'; -CaptionsButton.prototype.controlText_ = 'Captions'; - -_componentJs2['default'].registerComponent('CaptionsButton', CaptionsButton); -exports['default'] = CaptionsButton; -module.exports = exports['default']; - -},{"../../component.js":67,"./caption-settings-menu-item.js":83,"./text-track-button.js":90}],85:[function(_dereq_,module,exports){ -/** - * @file chapters-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _textTrackButtonJs = _dereq_('./text-track-button.js'); - -var _textTrackButtonJs2 = _interopRequireDefault(_textTrackButtonJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _textTrackMenuItemJs = _dereq_('./text-track-menu-item.js'); - -var _textTrackMenuItemJs2 = _interopRequireDefault(_textTrackMenuItemJs); - -var _chaptersTrackMenuItemJs = _dereq_('./chapters-track-menu-item.js'); - -var _chaptersTrackMenuItemJs2 = _interopRequireDefault(_chaptersTrackMenuItemJs); - -var _menuMenuJs = _dereq_('../../menu/menu.js'); - -var _menuMenuJs2 = _interopRequireDefault(_menuMenuJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsToTitleCaseJs = _dereq_('../../utils/to-title-case.js'); - -var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -/** - * The button component for toggling and selecting chapters - * Chapters act much differently than other text tracks - * Cues are navigation vs. other tracks of alternative languages - * - * @param {Object} player Player object - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends TextTrackButton - * @class ChaptersButton - */ - -var ChaptersButton = (function (_TextTrackButton) { - _inherits(ChaptersButton, _TextTrackButton); - - function ChaptersButton(player, options, ready) { - _classCallCheck(this, ChaptersButton); - - _TextTrackButton.call(this, player, options, ready); - this.el_.setAttribute('aria-label', 'Chapters Menu'); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - ChaptersButton.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-chapters-button ' + _TextTrackButton.prototype.buildCSSClass.call(this); - }; - - /** - * Create a menu item for each text track - * - * @return {Array} Array of menu items - * @method createItems - */ - - ChaptersButton.prototype.createItems = function createItems() { - var items = []; - - var tracks = this.player_.textTracks(); - - if (!tracks) { - return items; - } - - for (var i = 0; i < tracks.length; i++) { - var track = tracks[i]; - if (track['kind'] === this.kind_) { - items.push(new _textTrackMenuItemJs2['default'](this.player_, { - 'track': track - })); - } - } - - return items; - }; - - /** - * Create menu from chapter buttons - * - * @return {Menu} Menu of chapter buttons - * @method createMenu - */ - - ChaptersButton.prototype.createMenu = function createMenu() { - var _this = this; - - var tracks = this.player_.textTracks() || []; - var chaptersTrack = undefined; - var items = this.items = []; - - for (var i = 0, _length = tracks.length; i < _length; i++) { - var track = tracks[i]; - - if (track['kind'] === this.kind_) { - chaptersTrack = track; - - break; - } - } - - var menu = this.menu; - if (menu === undefined) { - menu = new _menuMenuJs2['default'](this.player_); - var title = Dom.createEl('li', { - className: 'vjs-menu-title', - innerHTML: _utilsToTitleCaseJs2['default'](this.kind_), - tabIndex: -1 - }); - menu.children_.unshift(title); - Dom.insertElFirst(title, menu.contentEl()); - } - - if (chaptersTrack && chaptersTrack.cues == null) { - chaptersTrack['mode'] = 'hidden'; - - var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(chaptersTrack); - - if (remoteTextTrackEl) { - remoteTextTrackEl.addEventListener('load', function (event) { - return _this.update(); - }); - } - } - - if (chaptersTrack && chaptersTrack.cues && chaptersTrack.cues.length > 0) { - var cues = chaptersTrack['cues'], - cue = undefined; - - for (var i = 0, l = cues.length; i < l; i++) { - cue = cues[i]; - - var mi = new _chaptersTrackMenuItemJs2['default'](this.player_, { - 'track': chaptersTrack, - 'cue': cue - }); - - items.push(mi); - - menu.addChild(mi); - } - - this.addChild(menu); - } - - if (this.items.length > 0) { - this.show(); - } - - return menu; - }; - - return ChaptersButton; -})(_textTrackButtonJs2['default']); - -ChaptersButton.prototype.kind_ = 'chapters'; -ChaptersButton.prototype.controlText_ = 'Chapters'; - -_componentJs2['default'].registerComponent('ChaptersButton', ChaptersButton); -exports['default'] = ChaptersButton; -module.exports = exports['default']; - -},{"../../component.js":67,"../../menu/menu.js":108,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/to-title-case.js":143,"./chapters-track-menu-item.js":86,"./text-track-button.js":90,"./text-track-menu-item.js":91,"global/window":2}],86:[function(_dereq_,module,exports){ -/** - * @file chapters-track-menu-item.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _menuMenuItemJs = _dereq_('../../menu/menu-item.js'); - -var _menuMenuItemJs2 = _interopRequireDefault(_menuMenuItemJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -/** - * The chapter track menu item - * - * @param {Player|Object} player - * @param {Object=} options - * @extends MenuItem - * @class ChaptersTrackMenuItem - */ - -var ChaptersTrackMenuItem = (function (_MenuItem) { - _inherits(ChaptersTrackMenuItem, _MenuItem); - - function ChaptersTrackMenuItem(player, options) { - _classCallCheck(this, ChaptersTrackMenuItem); - - var track = options['track']; - var cue = options['cue']; - var currentTime = player.currentTime(); - - // Modify options for parent MenuItem class's init. - options['label'] = cue.text; - options['selected'] = cue['startTime'] <= currentTime && currentTime < cue['endTime']; - _MenuItem.call(this, player, options); - - this.track = track; - this.cue = cue; - track.addEventListener('cuechange', Fn.bind(this, this.update)); - } - - /** - * Handle click on menu item - * - * @method handleClick - */ - - ChaptersTrackMenuItem.prototype.handleClick = function handleClick() { - _MenuItem.prototype.handleClick.call(this); - this.player_.currentTime(this.cue.startTime); - this.update(this.cue.startTime); - }; - - /** - * Update chapter menu item - * - * @method update - */ - - ChaptersTrackMenuItem.prototype.update = function update() { - var cue = this.cue; - var currentTime = this.player_.currentTime(); - - // vjs.log(currentTime, cue.startTime); - this.selected(cue['startTime'] <= currentTime && currentTime < cue['endTime']); - }; - - return ChaptersTrackMenuItem; -})(_menuMenuItemJs2['default']); - -_componentJs2['default'].registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem); -exports['default'] = ChaptersTrackMenuItem; -module.exports = exports['default']; - -},{"../../component.js":67,"../../menu/menu-item.js":107,"../../utils/fn.js":136}],87:[function(_dereq_,module,exports){ -/** - * @file descriptions-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _textTrackButtonJs = _dereq_('./text-track-button.js'); - -var _textTrackButtonJs2 = _interopRequireDefault(_textTrackButtonJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -/** - * The button component for toggling and selecting descriptions - * - * @param {Object} player Player object - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends TextTrackButton - * @class DescriptionsButton - */ - -var DescriptionsButton = (function (_TextTrackButton) { - _inherits(DescriptionsButton, _TextTrackButton); - - function DescriptionsButton(player, options, ready) { - var _this = this; - - _classCallCheck(this, DescriptionsButton); - - _TextTrackButton.call(this, player, options, ready); - this.el_.setAttribute('aria-label', 'Descriptions Menu'); - - var tracks = player.textTracks(); - - if (tracks) { - (function () { - var changeHandler = Fn.bind(_this, _this.handleTracksChange); - - tracks.addEventListener('change', changeHandler); - _this.on('dispose', function () { - tracks.removeEventListener('change', changeHandler); - }); - })(); - } - } - - /** - * Handle text track change - * - * @method handleTracksChange - */ - - DescriptionsButton.prototype.handleTracksChange = function handleTracksChange(event) { - var tracks = this.player().textTracks(); - var disabled = false; - - // Check whether a track of a different kind is showing - for (var i = 0, l = tracks.length; i < l; i++) { - var track = tracks[i]; - if (track['kind'] !== this.kind_ && track['mode'] === 'showing') { - disabled = true; - break; - } - } - - // If another track is showing, disable this menu button - if (disabled) { - this.disable(); - } else { - this.enable(); - } - }; - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - DescriptionsButton.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-descriptions-button ' + _TextTrackButton.prototype.buildCSSClass.call(this); - }; - - return DescriptionsButton; -})(_textTrackButtonJs2['default']); - -DescriptionsButton.prototype.kind_ = 'descriptions'; -DescriptionsButton.prototype.controlText_ = 'Descriptions'; - -_componentJs2['default'].registerComponent('DescriptionsButton', DescriptionsButton); -exports['default'] = DescriptionsButton; -module.exports = exports['default']; - -},{"../../component.js":67,"../../utils/fn.js":136,"./text-track-button.js":90}],88:[function(_dereq_,module,exports){ -/** - * @file off-text-track-menu-item.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _textTrackMenuItemJs = _dereq_('./text-track-menu-item.js'); - -var _textTrackMenuItemJs2 = _interopRequireDefault(_textTrackMenuItemJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * A special menu item for turning of a specific type of text track - * - * @param {Player|Object} player - * @param {Object=} options - * @extends TextTrackMenuItem - * @class OffTextTrackMenuItem - */ - -var OffTextTrackMenuItem = (function (_TextTrackMenuItem) { - _inherits(OffTextTrackMenuItem, _TextTrackMenuItem); - - function OffTextTrackMenuItem(player, options) { - _classCallCheck(this, OffTextTrackMenuItem); - - // Create pseudo track info - // Requires options['kind'] - options['track'] = { - 'kind': options['kind'], - 'player': player, - 'label': options['kind'] + ' off', - 'default': false, - 'mode': 'disabled' - }; - - // MenuItem is selectable - options['selectable'] = true; - - _TextTrackMenuItem.call(this, player, options); - this.selected(true); - } - - /** - * Handle text track change - * - * @param {Object} event Event object - * @method handleTracksChange - */ - - OffTextTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) { - var tracks = this.player().textTracks(); - var selected = true; - - for (var i = 0, l = tracks.length; i < l; i++) { - var track = tracks[i]; - if (track['kind'] === this.track['kind'] && track['mode'] === 'showing') { - selected = false; - break; - } - } - - this.selected(selected); - }; - - return OffTextTrackMenuItem; -})(_textTrackMenuItemJs2['default']); - -_componentJs2['default'].registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem); -exports['default'] = OffTextTrackMenuItem; -module.exports = exports['default']; - -},{"../../component.js":67,"./text-track-menu-item.js":91}],89:[function(_dereq_,module,exports){ -/** - * @file subtitles-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _textTrackButtonJs = _dereq_('./text-track-button.js'); - -var _textTrackButtonJs2 = _interopRequireDefault(_textTrackButtonJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * The button component for toggling and selecting subtitles - * - * @param {Object} player Player object - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends TextTrackButton - * @class SubtitlesButton - */ - -var SubtitlesButton = (function (_TextTrackButton) { - _inherits(SubtitlesButton, _TextTrackButton); - - function SubtitlesButton(player, options, ready) { - _classCallCheck(this, SubtitlesButton); - - _TextTrackButton.call(this, player, options, ready); - this.el_.setAttribute('aria-label', 'Subtitles Menu'); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - SubtitlesButton.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-subtitles-button ' + _TextTrackButton.prototype.buildCSSClass.call(this); - }; - - return SubtitlesButton; -})(_textTrackButtonJs2['default']); - -SubtitlesButton.prototype.kind_ = 'subtitles'; -SubtitlesButton.prototype.controlText_ = 'Subtitles'; - -_componentJs2['default'].registerComponent('SubtitlesButton', SubtitlesButton); -exports['default'] = SubtitlesButton; -module.exports = exports['default']; - -},{"../../component.js":67,"./text-track-button.js":90}],90:[function(_dereq_,module,exports){ -/** - * @file text-track-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _menuMenuButtonJs = _dereq_('../../menu/menu-button.js'); - -var _menuMenuButtonJs2 = _interopRequireDefault(_menuMenuButtonJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _textTrackMenuItemJs = _dereq_('./text-track-menu-item.js'); - -var _textTrackMenuItemJs2 = _interopRequireDefault(_textTrackMenuItemJs); - -var _offTextTrackMenuItemJs = _dereq_('./off-text-track-menu-item.js'); - -var _offTextTrackMenuItemJs2 = _interopRequireDefault(_offTextTrackMenuItemJs); - -/** - * The base class for buttons that toggle specific text track types (e.g. subtitles) - * - * @param {Player|Object} player - * @param {Object=} options - * @extends MenuButton - * @class TextTrackButton - */ - -var TextTrackButton = (function (_MenuButton) { - _inherits(TextTrackButton, _MenuButton); - - function TextTrackButton(player, options) { - _classCallCheck(this, TextTrackButton); - - _MenuButton.call(this, player, options); - - var tracks = this.player_.textTracks(); - - if (this.items.length <= 1) { - this.hide(); - } - - if (!tracks) { - return; - } - - var updateHandler = Fn.bind(this, this.update); - tracks.addEventListener('removetrack', updateHandler); - tracks.addEventListener('addtrack', updateHandler); - - this.player_.on('dispose', function () { - tracks.removeEventListener('removetrack', updateHandler); - tracks.removeEventListener('addtrack', updateHandler); - }); - } - - // Create a menu item for each text track - - TextTrackButton.prototype.createItems = function createItems() { - var items = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; - - // Add an OFF menu item to turn all tracks off - items.push(new _offTextTrackMenuItemJs2['default'](this.player_, { 'kind': this.kind_ })); - - var tracks = this.player_.textTracks(); - - if (!tracks) { - return items; - } - - for (var i = 0; i < tracks.length; i++) { - var track = tracks[i]; - - // only add tracks that are of the appropriate kind and have a label - if (track['kind'] === this.kind_) { - items.push(new _textTrackMenuItemJs2['default'](this.player_, { - // MenuItem is selectable - 'selectable': true, - 'track': track - })); - } - } - - return items; - }; - - return TextTrackButton; -})(_menuMenuButtonJs2['default']); - -_componentJs2['default'].registerComponent('TextTrackButton', TextTrackButton); -exports['default'] = TextTrackButton; -module.exports = exports['default']; - -},{"../../component.js":67,"../../menu/menu-button.js":106,"../../utils/fn.js":136,"./off-text-track-menu-item.js":88,"./text-track-menu-item.js":91}],91:[function(_dereq_,module,exports){ -/** - * @file text-track-menu-item.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _menuMenuItemJs = _dereq_('../../menu/menu-item.js'); - -var _menuMenuItemJs2 = _interopRequireDefault(_menuMenuItemJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -/** - * The specific menu item type for selecting a language within a text track kind - * - * @param {Player|Object} player - * @param {Object=} options - * @extends MenuItem - * @class TextTrackMenuItem - */ - -var TextTrackMenuItem = (function (_MenuItem) { - _inherits(TextTrackMenuItem, _MenuItem); - - function TextTrackMenuItem(player, options) { - var _this = this; - - _classCallCheck(this, TextTrackMenuItem); - - var track = options['track']; - var tracks = player.textTracks(); - - // Modify options for parent MenuItem class's init. - options['label'] = track['label'] || track['language'] || 'Unknown'; - options['selected'] = track['default'] || track['mode'] === 'showing'; - - _MenuItem.call(this, player, options); - - this.track = track; - - if (tracks) { - (function () { - var changeHandler = Fn.bind(_this, _this.handleTracksChange); - - tracks.addEventListener('change', changeHandler); - _this.on('dispose', function () { - tracks.removeEventListener('change', changeHandler); - }); - })(); - } - - // iOS7 doesn't dispatch change events to TextTrackLists when an - // associated track's mode changes. Without something like - // Object.observe() (also not present on iOS7), it's not - // possible to detect changes to the mode attribute and polyfill - // the change event. As a poor substitute, we manually dispatch - // change events whenever the controls modify the mode. - if (tracks && tracks.onchange === undefined) { - (function () { - var event = undefined; - - _this.on(['tap', 'click'], function () { - if (typeof _globalWindow2['default'].Event !== 'object') { - // Android 2.3 throws an Illegal Constructor error for window.Event - try { - event = new _globalWindow2['default'].Event('change'); - } catch (err) {} - } - - if (!event) { - event = _globalDocument2['default'].createEvent('Event'); - event.initEvent('change', true, true); - } - - tracks.dispatchEvent(event); - }); - })(); - } - } - - /** - * Handle click on text track - * - * @method handleClick - */ - - TextTrackMenuItem.prototype.handleClick = function handleClick(event) { - var kind = this.track['kind']; - var tracks = this.player_.textTracks(); - - _MenuItem.prototype.handleClick.call(this, event); - - if (!tracks) return; - - for (var i = 0; i < tracks.length; i++) { - var track = tracks[i]; - - if (track['kind'] !== kind) { - continue; - } - - if (track === this.track) { - track['mode'] = 'showing'; - } else { - track['mode'] = 'disabled'; - } - } - }; - - /** - * Handle text track change - * - * @method handleTracksChange - */ - - TextTrackMenuItem.prototype.handleTracksChange = function handleTracksChange(event) { - this.selected(this.track['mode'] === 'showing'); - }; - - return TextTrackMenuItem; -})(_menuMenuItemJs2['default']); - -_componentJs2['default'].registerComponent('TextTrackMenuItem', TextTrackMenuItem); -exports['default'] = TextTrackMenuItem; -module.exports = exports['default']; - -},{"../../component.js":67,"../../menu/menu-item.js":107,"../../utils/fn.js":136,"global/document":1,"global/window":2}],92:[function(_dereq_,module,exports){ -/** - * @file current-time-display.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); - -var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); - -/** - * Displays the current time - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class CurrentTimeDisplay - */ - -var CurrentTimeDisplay = (function (_Component) { - _inherits(CurrentTimeDisplay, _Component); - - function CurrentTimeDisplay(player, options) { - _classCallCheck(this, CurrentTimeDisplay); - - _Component.call(this, player, options); - - this.on(player, 'timeupdate', this.updateContent); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - CurrentTimeDisplay.prototype.createEl = function createEl() { - var el = _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-current-time vjs-time-control vjs-control' - }); - - this.contentEl_ = Dom.createEl('div', { - className: 'vjs-current-time-display', - // label the current time for screen reader users - innerHTML: 'Current Time ' + '0:00' - }, { - // tell screen readers not to automatically read the time as it changes - 'aria-live': 'off' - }); - - el.appendChild(this.contentEl_); - return el; - }; - - /** - * Update current time display - * - * @method updateContent - */ - - CurrentTimeDisplay.prototype.updateContent = function updateContent() { - // Allows for smooth scrubbing, when player can't keep up. - var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime(); - var localizedText = this.localize('Current Time'); - var formattedTime = _utilsFormatTimeJs2['default'](time, this.player_.duration()); - if (formattedTime !== this.formattedTime_) { - this.formattedTime_ = formattedTime; - this.contentEl_.innerHTML = '' + localizedText + ' ' + formattedTime; - } - }; - - return CurrentTimeDisplay; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('CurrentTimeDisplay', CurrentTimeDisplay); -exports['default'] = CurrentTimeDisplay; -module.exports = exports['default']; - -},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],93:[function(_dereq_,module,exports){ -/** - * @file duration-display.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); - -var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); - -/** - * Displays the duration - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class DurationDisplay - */ - -var DurationDisplay = (function (_Component) { - _inherits(DurationDisplay, _Component); - - function DurationDisplay(player, options) { - _classCallCheck(this, DurationDisplay); - - _Component.call(this, player, options); - - // this might need to be changed to 'durationchange' instead of 'timeupdate' eventually, - // however the durationchange event fires before this.player_.duration() is set, - // so the value cannot be written out using this method. - // Once the order of durationchange and this.player_.duration() being set is figured out, - // this can be updated. - this.on(player, 'timeupdate', this.updateContent); - this.on(player, 'loadedmetadata', this.updateContent); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - DurationDisplay.prototype.createEl = function createEl() { - var el = _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-duration vjs-time-control vjs-control' - }); - - this.contentEl_ = Dom.createEl('div', { - className: 'vjs-duration-display', - // label the duration time for screen reader users - innerHTML: '' + this.localize('Duration Time') + ' 0:00' - }, { - // tell screen readers not to automatically read the time as it changes - 'aria-live': 'off' - }); - - el.appendChild(this.contentEl_); - return el; - }; - - /** - * Update duration time display - * - * @method updateContent - */ - - DurationDisplay.prototype.updateContent = function updateContent() { - var duration = this.player_.duration(); - if (duration && this.duration_ !== duration) { - this.duration_ = duration; - var localizedText = this.localize('Duration Time'); - var formattedTime = _utilsFormatTimeJs2['default'](duration); - this.contentEl_.innerHTML = '' + localizedText + ' ' + formattedTime; // label the duration time for screen reader users - } - }; - - return DurationDisplay; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('DurationDisplay', DurationDisplay); -exports['default'] = DurationDisplay; -module.exports = exports['default']; - -},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],94:[function(_dereq_,module,exports){ -/** - * @file remaining-time-display.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFormatTimeJs = _dereq_('../../utils/format-time.js'); - -var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); - -/** - * Displays the time left in the video - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class RemainingTimeDisplay - */ - -var RemainingTimeDisplay = (function (_Component) { - _inherits(RemainingTimeDisplay, _Component); - - function RemainingTimeDisplay(player, options) { - _classCallCheck(this, RemainingTimeDisplay); - - _Component.call(this, player, options); - - this.on(player, 'timeupdate', this.updateContent); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - RemainingTimeDisplay.prototype.createEl = function createEl() { - var el = _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-remaining-time vjs-time-control vjs-control' - }); - - this.contentEl_ = Dom.createEl('div', { - className: 'vjs-remaining-time-display', - // label the remaining time for screen reader users - innerHTML: '' + this.localize('Remaining Time') + ' -0:00' - }, { - // tell screen readers not to automatically read the time as it changes - 'aria-live': 'off' - }); - - el.appendChild(this.contentEl_); - return el; - }; - - /** - * Update remaining time display - * - * @method updateContent - */ - - RemainingTimeDisplay.prototype.updateContent = function updateContent() { - if (this.player_.duration()) { - var localizedText = this.localize('Remaining Time'); - var formattedTime = _utilsFormatTimeJs2['default'](this.player_.remainingTime()); - if (formattedTime !== this.formattedTime_) { - this.formattedTime_ = formattedTime; - this.contentEl_.innerHTML = '' + localizedText + ' -' + formattedTime; - } - } - - // Allows for smooth scrubbing, when player can't keep up. - // var time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime(); - // this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration()); - }; - - return RemainingTimeDisplay; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('RemainingTimeDisplay', RemainingTimeDisplay); -exports['default'] = RemainingTimeDisplay; -module.exports = exports['default']; - -},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],95:[function(_dereq_,module,exports){ -/** - * @file time-divider.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * The separator between the current time and duration. - * Can be hidden if it's not needed in the design. - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class TimeDivider - */ - -var TimeDivider = (function (_Component) { - _inherits(TimeDivider, _Component); - - function TimeDivider() { - _classCallCheck(this, TimeDivider); - - _Component.apply(this, arguments); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - TimeDivider.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-time-control vjs-time-divider', - innerHTML: '
    /
    ' - }); - }; - - return TimeDivider; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('TimeDivider', TimeDivider); -exports['default'] = TimeDivider; -module.exports = exports['default']; - -},{"../../component.js":67}],96:[function(_dereq_,module,exports){ -/** - * @file volume-bar.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _sliderSliderJs = _dereq_('../../slider/slider.js'); - -var _sliderSliderJs2 = _interopRequireDefault(_sliderSliderJs); - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsFnJs = _dereq_('../../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -// Required children - -var _volumeLevelJs = _dereq_('./volume-level.js'); - -var _volumeLevelJs2 = _interopRequireDefault(_volumeLevelJs); - -/** - * The bar that contains the volume level and can be clicked on to adjust the level - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Slider - * @class VolumeBar - */ - -var VolumeBar = (function (_Slider) { - _inherits(VolumeBar, _Slider); - - function VolumeBar(player, options) { - _classCallCheck(this, VolumeBar); - - _Slider.call(this, player, options); - this.on(player, 'volumechange', this.updateARIAAttributes); - player.ready(Fn.bind(this, this.updateARIAAttributes)); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - VolumeBar.prototype.createEl = function createEl() { - return _Slider.prototype.createEl.call(this, 'div', { - className: 'vjs-volume-bar vjs-slider-bar' - }, { - 'aria-label': 'volume level' - }); - }; - - /** - * Handle mouse move on volume bar - * - * @method handleMouseMove - */ - - VolumeBar.prototype.handleMouseMove = function handleMouseMove(event) { - this.checkMuted(); - this.player_.volume(this.calculateDistance(event)); - }; - - VolumeBar.prototype.checkMuted = function checkMuted() { - if (this.player_.muted()) { - this.player_.muted(false); - } - }; - - /** - * Get percent of volume level - * - * @retun {Number} Volume level percent - * @method getPercent - */ - - VolumeBar.prototype.getPercent = function getPercent() { - if (this.player_.muted()) { - return 0; - } else { - return this.player_.volume(); - } - }; - - /** - * Increase volume level for keyboard users - * - * @method stepForward - */ - - VolumeBar.prototype.stepForward = function stepForward() { - this.checkMuted(); - this.player_.volume(this.player_.volume() + 0.1); - }; - - /** - * Decrease volume level for keyboard users - * - * @method stepBack - */ - - VolumeBar.prototype.stepBack = function stepBack() { - this.checkMuted(); - this.player_.volume(this.player_.volume() - 0.1); - }; - - /** - * Update ARIA accessibility attributes - * - * @method updateARIAAttributes - */ - - VolumeBar.prototype.updateARIAAttributes = function updateARIAAttributes() { - // Current value of volume bar as a percentage - var volume = (this.player_.volume() * 100).toFixed(2); - this.el_.setAttribute('aria-valuenow', volume); - this.el_.setAttribute('aria-valuetext', volume + '%'); - }; - - return VolumeBar; -})(_sliderSliderJs2['default']); - -VolumeBar.prototype.options_ = { - children: ['volumeLevel'], - 'barName': 'volumeLevel' -}; - -VolumeBar.prototype.playerEvent = 'volumechange'; - -_componentJs2['default'].registerComponent('VolumeBar', VolumeBar); -exports['default'] = VolumeBar; -module.exports = exports['default']; - -},{"../../component.js":67,"../../slider/slider.js":116,"../../utils/fn.js":136,"./volume-level.js":98}],97:[function(_dereq_,module,exports){ -/** - * @file volume-control.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -// Required children - -var _volumeBarJs = _dereq_('./volume-bar.js'); - -var _volumeBarJs2 = _interopRequireDefault(_volumeBarJs); - -/** - * The component for controlling the volume level - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class VolumeControl - */ - -var VolumeControl = (function (_Component) { - _inherits(VolumeControl, _Component); - - function VolumeControl(player, options) { - _classCallCheck(this, VolumeControl); - - _Component.call(this, player, options); - - // hide volume controls when they're not supported by the current tech - if (player.tech_ && player.tech_['featuresVolumeControl'] === false) { - this.addClass('vjs-hidden'); - } - this.on(player, 'loadstart', function () { - if (player.tech_['featuresVolumeControl'] === false) { - this.addClass('vjs-hidden'); - } else { - this.removeClass('vjs-hidden'); - } - }); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - VolumeControl.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-volume-control vjs-control' - }); - }; - - return VolumeControl; -})(_componentJs2['default']); - -VolumeControl.prototype.options_ = { - children: ['volumeBar'] -}; - -_componentJs2['default'].registerComponent('VolumeControl', VolumeControl); -exports['default'] = VolumeControl; -module.exports = exports['default']; - -},{"../../component.js":67,"./volume-bar.js":96}],98:[function(_dereq_,module,exports){ -/** - * @file volume-level.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -/** - * Shows volume level - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class VolumeLevel - */ - -var VolumeLevel = (function (_Component) { - _inherits(VolumeLevel, _Component); - - function VolumeLevel() { - _classCallCheck(this, VolumeLevel); - - _Component.apply(this, arguments); - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - VolumeLevel.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-volume-level', - innerHTML: '' - }); - }; - - return VolumeLevel; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('VolumeLevel', VolumeLevel); -exports['default'] = VolumeLevel; -module.exports = exports['default']; - -},{"../../component.js":67}],99:[function(_dereq_,module,exports){ -/** - * @file volume-menu-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _popupPopupJs = _dereq_('../popup/popup.js'); - -var _popupPopupJs2 = _interopRequireDefault(_popupPopupJs); - -var _popupPopupButtonJs = _dereq_('../popup/popup-button.js'); - -var _popupPopupButtonJs2 = _interopRequireDefault(_popupPopupButtonJs); - -var _muteToggleJs = _dereq_('./mute-toggle.js'); - -var _muteToggleJs2 = _interopRequireDefault(_muteToggleJs); - -var _volumeControlVolumeBarJs = _dereq_('./volume-control/volume-bar.js'); - -var _volumeControlVolumeBarJs2 = _interopRequireDefault(_volumeControlVolumeBarJs); - -/** - * Button for volume popup - * - * @param {Player|Object} player - * @param {Object=} options - * @extends PopupButton - * @class VolumeMenuButton - */ - -var VolumeMenuButton = (function (_PopupButton) { - _inherits(VolumeMenuButton, _PopupButton); - - function VolumeMenuButton(player) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - _classCallCheck(this, VolumeMenuButton); - - // Default to inline - if (options.inline === undefined) { - options.inline = true; - } - - // If the vertical option isn't passed at all, default to true. - if (options.vertical === undefined) { - // If an inline volumeMenuButton is used, we should default to using - // a horizontal slider for obvious reasons. - if (options.inline) { - options.vertical = false; - } else { - options.vertical = true; - } - } - - // The vertical option needs to be set on the volumeBar as well, - // since that will need to be passed along to the VolumeBar constructor - options.volumeBar = options.volumeBar || {}; - options.volumeBar.vertical = !!options.vertical; - - _PopupButton.call(this, player, options); - - // Same listeners as MuteToggle - this.on(player, 'volumechange', this.volumeUpdate); - this.on(player, 'loadstart', this.volumeUpdate); - - // hide mute toggle if the current tech doesn't support volume control - function updateVisibility() { - if (player.tech_ && player.tech_['featuresVolumeControl'] === false) { - this.addClass('vjs-hidden'); - } else { - this.removeClass('vjs-hidden'); - } - } - - updateVisibility.call(this); - this.on(player, 'loadstart', updateVisibility); - - this.on(this.volumeBar, ['slideractive', 'focus'], function () { - this.addClass('vjs-slider-active'); - }); - - this.on(this.volumeBar, ['sliderinactive', 'blur'], function () { - this.removeClass('vjs-slider-active'); - }); - - this.on(this.volumeBar, ['focus'], function () { - this.addClass('vjs-lock-showing'); - }); - - this.on(this.volumeBar, ['blur'], function () { - this.removeClass('vjs-lock-showing'); - }); - } - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - VolumeMenuButton.prototype.buildCSSClass = function buildCSSClass() { - var orientationClass = ''; - if (!!this.options_.vertical) { - orientationClass = 'vjs-volume-menu-button-vertical'; - } else { - orientationClass = 'vjs-volume-menu-button-horizontal'; - } - - return 'vjs-volume-menu-button ' + _PopupButton.prototype.buildCSSClass.call(this) + ' ' + orientationClass; - }; - - /** - * Allow sub components to stack CSS class names - * - * @return {Popup} The volume popup button - * @method createPopup - */ - - VolumeMenuButton.prototype.createPopup = function createPopup() { - var popup = new _popupPopupJs2['default'](this.player_, { - contentElType: 'div' - }); - - var vb = new _volumeControlVolumeBarJs2['default'](this.player_, this.options_.volumeBar); - - popup.addChild(vb); - - this.menuContent = popup; - this.volumeBar = vb; - - this.attachVolumeBarEvents(); - - return popup; - }; - - /** - * Handle click on volume popup and calls super - * - * @method handleClick - */ - - VolumeMenuButton.prototype.handleClick = function handleClick() { - _muteToggleJs2['default'].prototype.handleClick.call(this); - _PopupButton.prototype.handleClick.call(this); - }; - - VolumeMenuButton.prototype.attachVolumeBarEvents = function attachVolumeBarEvents() { - this.menuContent.on(['mousedown', 'touchdown'], Fn.bind(this, this.handleMouseDown)); - }; - - VolumeMenuButton.prototype.handleMouseDown = function handleMouseDown(event) { - this.on(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove)); - this.on(this.el_.ownerDocument, ['mouseup', 'touchend'], this.handleMouseUp); - }; - - VolumeMenuButton.prototype.handleMouseUp = function handleMouseUp(event) { - this.off(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove)); - }; - - return VolumeMenuButton; -})(_popupPopupButtonJs2['default']); - -VolumeMenuButton.prototype.volumeUpdate = _muteToggleJs2['default'].prototype.update; -VolumeMenuButton.prototype.controlText_ = 'Mute'; - -_componentJs2['default'].registerComponent('VolumeMenuButton', VolumeMenuButton); -exports['default'] = VolumeMenuButton; -module.exports = exports['default']; - -},{"../component.js":67,"../popup/popup-button.js":112,"../popup/popup.js":113,"../utils/fn.js":136,"./mute-toggle.js":71,"./volume-control/volume-bar.js":96}],100:[function(_dereq_,module,exports){ -/** - * @file error-display.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _component = _dereq_('./component'); - -var _component2 = _interopRequireDefault(_component); - -var _modalDialog = _dereq_('./modal-dialog'); - -var _modalDialog2 = _interopRequireDefault(_modalDialog); - -var _utilsDom = _dereq_('./utils/dom'); - -var Dom = _interopRequireWildcard(_utilsDom); - -var _utilsMergeOptions = _dereq_('./utils/merge-options'); - -var _utilsMergeOptions2 = _interopRequireDefault(_utilsMergeOptions); - -/** - * Display that an error has occurred making the video unplayable. - * - * @extends ModalDialog - * @class ErrorDisplay - */ - -var ErrorDisplay = (function (_ModalDialog) { - _inherits(ErrorDisplay, _ModalDialog); - - /** - * Constructor for error display modal. - * - * @param {Player} player - * @param {Object} [options] - */ - - function ErrorDisplay(player, options) { - _classCallCheck(this, ErrorDisplay); - - _ModalDialog.call(this, player, options); - this.on(player, 'error', this.open); - } - - /** - * Include the old class for backward-compatibility. - * - * This can be removed in 6.0. - * - * @method buildCSSClass - * @deprecated - * @return {String} - */ - - ErrorDisplay.prototype.buildCSSClass = function buildCSSClass() { - return 'vjs-error-display ' + _ModalDialog.prototype.buildCSSClass.call(this); - }; - - /** - * Generates the modal content based on the player error. - * - * @return {String|Null} - */ - - ErrorDisplay.prototype.content = function content() { - var error = this.player().error(); - return error ? this.localize(error.message) : ''; - }; - - return ErrorDisplay; -})(_modalDialog2['default']); - -ErrorDisplay.prototype.options_ = _utilsMergeOptions2['default'](_modalDialog2['default'].prototype.options_, { - fillAlways: true, - temporary: false, - uncloseable: true -}); - -_component2['default'].registerComponent('ErrorDisplay', ErrorDisplay); -exports['default'] = ErrorDisplay; -module.exports = exports['default']; - -},{"./component":67,"./modal-dialog":109,"./utils/dom":134,"./utils/merge-options":140}],101:[function(_dereq_,module,exports){ -/** - * @file event-target.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -var _utilsEventsJs = _dereq_('./utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -var EventTarget = function EventTarget() {}; - -EventTarget.prototype.allowedEvents_ = {}; - -EventTarget.prototype.on = function (type, fn) { - // Remove the addEventListener alias before calling Events.on - // so we don't get into an infinite type loop - var ael = this.addEventListener; - this.addEventListener = Function.prototype; - Events.on(this, type, fn); - this.addEventListener = ael; -}; -EventTarget.prototype.addEventListener = EventTarget.prototype.on; - -EventTarget.prototype.off = function (type, fn) { - Events.off(this, type, fn); -}; -EventTarget.prototype.removeEventListener = EventTarget.prototype.off; - -EventTarget.prototype.one = function (type, fn) { - Events.one(this, type, fn); -}; - -EventTarget.prototype.trigger = function (event) { - var type = event.type || event; - - if (typeof event === 'string') { - event = { - type: type - }; - } - event = Events.fixEvent(event); - - if (this.allowedEvents_[type] && this['on' + type]) { - this['on' + type](event); - } - - Events.trigger(this, event); -}; -// The standard DOM EventTarget.dispatchEvent() is aliased to trigger() -EventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger; - -exports['default'] = EventTarget; -module.exports = exports['default']; - -},{"./utils/events.js":135}],102:[function(_dereq_,module,exports){ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _utilsLog = _dereq_('./utils/log'); - -var _utilsLog2 = _interopRequireDefault(_utilsLog); - -/* - * @file extend.js - * - * A combination of node inherits and babel's inherits (after transpile). - * Both work the same but node adds `super_` to the subClass - * and Bable adds the superClass as __proto__. Both seem useful. - */ -var _inherits = function _inherits(subClass, superClass) { - if (typeof superClass !== 'function' && superClass !== null) { - throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - - if (superClass) { - // node - subClass.super_ = superClass; - } -}; - -/* - * Function for subclassing using the same inheritance that - * videojs uses internally - * ```js - * var Button = videojs.getComponent('Button'); - * ``` - * ```js - * var MyButton = videojs.extend(Button, { - * constructor: function(player, options) { - * Button.call(this, player, options); - * }, - * onClick: function() { - * // doSomething - * } - * }); - * ``` - */ -var extendFn = function extendFn(superClass) { - var subClassMethods = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - var subClass = function subClass() { - superClass.apply(this, arguments); - }; - var methods = {}; - - if (typeof subClassMethods === 'object') { - if (typeof subClassMethods.init === 'function') { - _utilsLog2['default'].warn('Constructor logic via init() is deprecated; please use constructor() instead.'); - subClassMethods.constructor = subClassMethods.init; - } - if (subClassMethods.constructor !== Object.prototype.constructor) { - subClass = subClassMethods.constructor; - } - methods = subClassMethods; - } else if (typeof subClassMethods === 'function') { - subClass = subClassMethods; - } - - _inherits(subClass, superClass); - - // Extend subObj's prototype with functions and other properties from props - for (var name in methods) { - if (methods.hasOwnProperty(name)) { - subClass.prototype[name] = methods[name]; - } - } - - return subClass; -}; - -exports['default'] = extendFn; -module.exports = exports['default']; - -},{"./utils/log":139}],103:[function(_dereq_,module,exports){ -/** - * @file fullscreen-api.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -/* - * Store the browser-specific methods for the fullscreen API - * @type {Object|undefined} - * @private - */ -var FullscreenApi = {}; - -// browser API methods -// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js -var apiMap = [ -// Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html -['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror'], -// WebKit -['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror'], -// Old WebKit (Safari 5.1) -['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror'], -// Mozilla -['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror'], -// Microsoft -['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError']]; - -var specApi = apiMap[0]; -var browserApi = undefined; - -// determine the supported set of functions -for (var i = 0; i < apiMap.length; i++) { - // check for exitFullscreen function - if (apiMap[i][1] in _globalDocument2['default']) { - browserApi = apiMap[i]; - break; - } -} - -// map the browser API names to the spec API names -if (browserApi) { - for (var i = 0; i < browserApi.length; i++) { - FullscreenApi[specApi[i]] = browserApi[i]; - } -} - -exports['default'] = FullscreenApi; -module.exports = exports['default']; - -},{"global/document":1}],104:[function(_dereq_,module,exports){ -/** - * @file loading-spinner.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _component = _dereq_('./component'); - -var _component2 = _interopRequireDefault(_component); - -/* Loading Spinner -================================================================================ */ -/** - * Loading spinner for waiting events - * - * @extends Component - * @class LoadingSpinner - */ - -var LoadingSpinner = (function (_Component) { - _inherits(LoadingSpinner, _Component); - - function LoadingSpinner() { - _classCallCheck(this, LoadingSpinner); - - _Component.apply(this, arguments); - } - - /** - * Create the component's DOM element - * - * @method createEl - */ - - LoadingSpinner.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-loading-spinner', - dir: 'ltr' - }); - }; - - return LoadingSpinner; -})(_component2['default']); - -_component2['default'].registerComponent('LoadingSpinner', LoadingSpinner); -exports['default'] = LoadingSpinner; -module.exports = exports['default']; - -},{"./component":67}],105:[function(_dereq_,module,exports){ -/** - * @file media-error.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -/* - * Custom MediaError to mimic the HTML5 MediaError - * - * @param {Number} code The media error code - */ -var MediaError = function MediaError(code) { - if (typeof code === 'number') { - this.code = code; - } else if (typeof code === 'string') { - // default code is zero, so this is a custom error - this.message = code; - } else if (typeof code === 'object') { - // object - _objectAssign2['default'](this, code); - } - - if (!this.message) { - this.message = MediaError.defaultMessages[this.code] || ''; - } -}; - -/* - * The error code that refers two one of the defined - * MediaError types - * - * @type {Number} - */ -MediaError.prototype.code = 0; - -/* - * An optional message to be shown with the error. - * Message is not part of the HTML5 video spec - * but allows for more informative custom errors. - * - * @type {String} - */ -MediaError.prototype.message = ''; - -/* - * An optional status code that can be set by plugins - * to allow even more detail about the error. - * For example the HLS plugin might provide the specific - * HTTP status code that was returned when the error - * occurred, then allowing a custom error overlay - * to display more information. - * - * @type {Array} - */ -MediaError.prototype.status = null; - -MediaError.errorTypes = ['MEDIA_ERR_CUSTOM', // = 0 -'MEDIA_ERR_ABORTED', // = 1 -'MEDIA_ERR_NETWORK', // = 2 -'MEDIA_ERR_DECODE', // = 3 -'MEDIA_ERR_SRC_NOT_SUPPORTED', // = 4 -'MEDIA_ERR_ENCRYPTED' // = 5 -]; - -MediaError.defaultMessages = { - 1: 'You aborted the media playback', - 2: 'A network error caused the media download to fail part-way.', - 3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.', - 4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.', - 5: 'The media is encrypted and we do not have the keys to decrypt it.' -}; - -// Add types as properties on MediaError -// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4; -for (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) { - MediaError[MediaError.errorTypes[errNum]] = errNum; - // values should be accessible on both the class and instance - MediaError.prototype[MediaError.errorTypes[errNum]] = errNum; -} - -exports['default'] = MediaError; -module.exports = exports['default']; - -},{"object.assign":45}],106:[function(_dereq_,module,exports){ -/** - * @file menu-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _clickableComponentJs = _dereq_('../clickable-component.js'); - -var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _menuJs = _dereq_('./menu.js'); - -var _menuJs2 = _interopRequireDefault(_menuJs); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsToTitleCaseJs = _dereq_('../utils/to-title-case.js'); - -var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); - -/** - * A button class with a popup menu - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Button - * @class MenuButton - */ - -var MenuButton = (function (_ClickableComponent) { - _inherits(MenuButton, _ClickableComponent); - - function MenuButton(player) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - _classCallCheck(this, MenuButton); - - _ClickableComponent.call(this, player, options); - - this.update(); - - this.enabled_ = true; - - this.el_.setAttribute('aria-haspopup', 'true'); - this.el_.setAttribute('role', 'menuitem'); - this.on('keydown', this.handleSubmenuKeyPress); - } - - /** - * Update menu - * - * @method update - */ - - MenuButton.prototype.update = function update() { - var menu = this.createMenu(); - - if (this.menu) { - this.removeChild(this.menu); - } - - this.menu = menu; - this.addChild(menu); - - /** - * Track the state of the menu button - * - * @type {Boolean} - * @private - */ - this.buttonPressed_ = false; - this.el_.setAttribute('aria-expanded', 'false'); - - if (this.items && this.items.length === 0) { - this.hide(); - } else if (this.items && this.items.length > 1) { - this.show(); - } - }; - - /** - * Create menu - * - * @return {Menu} The constructed menu - * @method createMenu - */ - - MenuButton.prototype.createMenu = function createMenu() { - var menu = new _menuJs2['default'](this.player_); - - // Add a title list item to the top - if (this.options_.title) { - var title = Dom.createEl('li', { - className: 'vjs-menu-title', - innerHTML: _utilsToTitleCaseJs2['default'](this.options_.title), - tabIndex: -1 - }); - menu.children_.unshift(title); - Dom.insertElFirst(title, menu.contentEl()); - } - - this.items = this['createItems'](); - - if (this.items) { - // Add menu items to the menu - for (var i = 0; i < this.items.length; i++) { - menu.addItem(this.items[i]); - } - } - - return menu; - }; - - /** - * Create the list of menu items. Specific to each subclass. - * - * @method createItems - */ - - MenuButton.prototype.createItems = function createItems() {}; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - MenuButton.prototype.createEl = function createEl() { - return _ClickableComponent.prototype.createEl.call(this, 'div', { - className: this.buildCSSClass() - }); - }; - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - MenuButton.prototype.buildCSSClass = function buildCSSClass() { - var menuButtonClass = 'vjs-menu-button'; - - // If the inline option is passed, we want to use different styles altogether. - if (this.options_.inline === true) { - menuButtonClass += '-inline'; - } else { - menuButtonClass += '-popup'; - } - - return 'vjs-menu-button ' + menuButtonClass + ' ' + _ClickableComponent.prototype.buildCSSClass.call(this); - }; - - /** - * When you click the button it adds focus, which - * will show the menu indefinitely. - * So we'll remove focus when the mouse leaves the button. - * Focus is needed for tab navigation. - * Allow sub components to stack CSS class names - * - * @method handleClick - */ - - MenuButton.prototype.handleClick = function handleClick() { - this.one('mouseout', Fn.bind(this, function () { - this.menu.unlockShowing(); - this.el_.blur(); - })); - if (this.buttonPressed_) { - this.unpressButton(); - } else { - this.pressButton(); - } - }; - - /** - * Handle key press on menu - * - * @param {Object} event Key press event - * @method handleKeyPress - */ - - MenuButton.prototype.handleKeyPress = function handleKeyPress(event) { - - // Escape (27) key or Tab (9) key unpress the 'button' - if (event.which === 27 || event.which === 9) { - if (this.buttonPressed_) { - this.unpressButton(); - } - // Don't preventDefault for Tab key - we still want to lose focus - if (event.which !== 9) { - event.preventDefault(); - } - // Up (38) key or Down (40) key press the 'button' - } else if (event.which === 38 || event.which === 40) { - if (!this.buttonPressed_) { - this.pressButton(); - event.preventDefault(); - } - } else { - _ClickableComponent.prototype.handleKeyPress.call(this, event); - } - }; - - /** - * Handle key press on submenu - * - * @param {Object} event Key press event - * @method handleSubmenuKeyPress - */ - - MenuButton.prototype.handleSubmenuKeyPress = function handleSubmenuKeyPress(event) { - - // Escape (27) key or Tab (9) key unpress the 'button' - if (event.which === 27 || event.which === 9) { - if (this.buttonPressed_) { - this.unpressButton(); - } - // Don't preventDefault for Tab key - we still want to lose focus - if (event.which !== 9) { - event.preventDefault(); - } - } - }; - - /** - * Makes changes based on button pressed - * - * @method pressButton - */ - - MenuButton.prototype.pressButton = function pressButton() { - if (this.enabled_) { - this.buttonPressed_ = true; - this.menu.lockShowing(); - this.el_.setAttribute('aria-expanded', 'true'); - this.menu.focus(); // set the focus into the submenu - } - }; - - /** - * Makes changes based on button unpressed - * - * @method unpressButton - */ - - MenuButton.prototype.unpressButton = function unpressButton() { - if (this.enabled_) { - this.buttonPressed_ = false; - this.menu.unlockShowing(); - this.el_.setAttribute('aria-expanded', 'false'); - this.el_.focus(); // Set focus back to this menu button - } - }; - - /** - * Disable the menu button - * - * @return {Component} - * @method disable - */ - - MenuButton.prototype.disable = function disable() { - // Unpress, but don't force focus on this button - this.buttonPressed_ = false; - this.menu.unlockShowing(); - this.el_.setAttribute('aria-expanded', 'false'); - - this.enabled_ = false; - - return _ClickableComponent.prototype.disable.call(this); - }; - - /** - * Enable the menu button - * - * @return {Component} - * @method disable - */ - - MenuButton.prototype.enable = function enable() { - this.enabled_ = true; - - return _ClickableComponent.prototype.enable.call(this); - }; - - return MenuButton; -})(_clickableComponentJs2['default']); - -_componentJs2['default'].registerComponent('MenuButton', MenuButton); -exports['default'] = MenuButton; -module.exports = exports['default']; - -},{"../clickable-component.js":65,"../component.js":67,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/to-title-case.js":143,"./menu.js":108}],107:[function(_dereq_,module,exports){ -/** - * @file menu-item.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _clickableComponentJs = _dereq_('../clickable-component.js'); - -var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -/** - * The component for a menu item. `
  • ` - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Button - * @class MenuItem - */ - -var MenuItem = (function (_ClickableComponent) { - _inherits(MenuItem, _ClickableComponent); - - function MenuItem(player, options) { - _classCallCheck(this, MenuItem); - - _ClickableComponent.call(this, player, options); - - this.selectable = options['selectable']; - - this.selected(options['selected']); - - if (this.selectable) { - // TODO: May need to be either menuitemcheckbox or menuitemradio, - // and may need logical grouping of menu items. - this.el_.setAttribute('role', 'menuitemcheckbox'); - } else { - this.el_.setAttribute('role', 'menuitem'); - } - } - - /** - * Create the component's DOM element - * - * @param {String=} type Desc - * @param {Object=} props Desc - * @return {Element} - * @method createEl - */ - - MenuItem.prototype.createEl = function createEl(type, props, attrs) { - return _ClickableComponent.prototype.createEl.call(this, 'li', _objectAssign2['default']({ - className: 'vjs-menu-item', - innerHTML: this.localize(this.options_['label']), - tabIndex: -1 - }, props), attrs); - }; - - /** - * Handle a click on the menu item, and set it to selected - * - * @method handleClick - */ - - MenuItem.prototype.handleClick = function handleClick() { - this.selected(true); - }; - - /** - * Set this menu item as selected or not - * - * @param {Boolean} selected - * @method selected - */ - - MenuItem.prototype.selected = function selected(_selected) { - if (this.selectable) { - if (_selected) { - this.addClass('vjs-selected'); - this.el_.setAttribute('aria-checked', 'true'); - // aria-checked isn't fully supported by browsers/screen readers, - // so indicate selected state to screen reader in the control text. - this.controlText(', selected'); - } else { - this.removeClass('vjs-selected'); - this.el_.setAttribute('aria-checked', 'false'); - // Indicate un-selected state to screen reader - // Note that a space clears out the selected state text - this.controlText(' '); - } - } - }; - - return MenuItem; -})(_clickableComponentJs2['default']); - -_componentJs2['default'].registerComponent('MenuItem', MenuItem); -exports['default'] = MenuItem; -module.exports = exports['default']; - -},{"../clickable-component.js":65,"../component.js":67,"object.assign":45}],108:[function(_dereq_,module,exports){ -/** - * @file menu.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsEventsJs = _dereq_('../utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -/** - * The Menu component is used to build pop up menus, including subtitle and - * captions selection menus. - * - * @extends Component - * @class Menu - */ - -var Menu = (function (_Component) { - _inherits(Menu, _Component); - - function Menu(player, options) { - _classCallCheck(this, Menu); - - _Component.call(this, player, options); - - this.focusedChild_ = -1; - - this.on('keydown', this.handleKeyPress); - } - - /** - * Add a menu item to the menu - * - * @param {Object|String} component Component or component type to add - * @method addItem - */ - - Menu.prototype.addItem = function addItem(component) { - this.addChild(component); - component.on('click', Fn.bind(this, function () { - this.unlockShowing(); - //TODO: Need to set keyboard focus back to the menuButton - })); - }; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - Menu.prototype.createEl = function createEl() { - var contentElType = this.options_.contentElType || 'ul'; - this.contentEl_ = Dom.createEl(contentElType, { - className: 'vjs-menu-content' - }); - this.contentEl_.setAttribute('role', 'menu'); - var el = _Component.prototype.createEl.call(this, 'div', { - append: this.contentEl_, - className: 'vjs-menu' - }); - el.setAttribute('role', 'presentation'); - el.appendChild(this.contentEl_); - - // Prevent clicks from bubbling up. Needed for Menu Buttons, - // where a click on the parent is significant - Events.on(el, 'click', function (event) { - event.preventDefault(); - event.stopImmediatePropagation(); - }); - - return el; - }; - - /** - * Handle key press for menu - * - * @param {Object} event Event object - * @method handleKeyPress - */ - - Menu.prototype.handleKeyPress = function handleKeyPress(event) { - if (event.which === 37 || event.which === 40) { - // Left and Down Arrows - event.preventDefault(); - this.stepForward(); - } else if (event.which === 38 || event.which === 39) { - // Up and Right Arrows - event.preventDefault(); - this.stepBack(); - } - }; - - /** - * Move to next (lower) menu item for keyboard users - * - * @method stepForward - */ - - Menu.prototype.stepForward = function stepForward() { - var stepChild = 0; - - if (this.focusedChild_ !== undefined) { - stepChild = this.focusedChild_ + 1; - } - this.focus(stepChild); - }; - - /** - * Move to previous (higher) menu item for keyboard users - * - * @method stepBack - */ - - Menu.prototype.stepBack = function stepBack() { - var stepChild = 0; - - if (this.focusedChild_ !== undefined) { - stepChild = this.focusedChild_ - 1; - } - this.focus(stepChild); - }; - - /** - * Set focus on a menu item in the menu - * - * @param {Object|String} item Index of child item set focus on - * @method focus - */ - - Menu.prototype.focus = function focus() { - var item = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0]; - - var children = this.children().slice(); - var haveTitle = children.length && children[0].className && /vjs-menu-title/.test(children[0].className); - - if (haveTitle) { - children.shift(); - } - - if (children.length > 0) { - if (item < 0) { - item = 0; - } else if (item >= children.length) { - item = children.length - 1; - } - - this.focusedChild_ = item; - - children[item].el_.focus(); - } - }; - - return Menu; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('Menu', Menu); -exports['default'] = Menu; -module.exports = exports['default']; - -},{"../component.js":67,"../utils/dom.js":134,"../utils/events.js":135,"../utils/fn.js":136}],109:[function(_dereq_,module,exports){ -/** - * @file modal-dialog.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _utilsDom = _dereq_('./utils/dom'); - -var Dom = _interopRequireWildcard(_utilsDom); - -var _utilsFn = _dereq_('./utils/fn'); - -var Fn = _interopRequireWildcard(_utilsFn); - -var _utilsLog = _dereq_('./utils/log'); - -var _utilsLog2 = _interopRequireDefault(_utilsLog); - -var _component = _dereq_('./component'); - -var _component2 = _interopRequireDefault(_component); - -var _closeButton = _dereq_('./close-button'); - -var _closeButton2 = _interopRequireDefault(_closeButton); - -var MODAL_CLASS_NAME = 'vjs-modal-dialog'; -var ESC = 27; - -/** - * The `ModalDialog` displays over the video and its controls, which blocks - * interaction with the player until it is closed. - * - * Modal dialogs include a "Close" button and will close when that button - * is activated - or when ESC is pressed anywhere. - * - * @extends Component - * @class ModalDialog - */ - -var ModalDialog = (function (_Component) { - _inherits(ModalDialog, _Component); - - /** - * Constructor for modals. - * - * @param {Player} player - * @param {Object} [options] - * @param {Mixed} [options.content=undefined] - * Provide customized content for this modal. - * - * @param {String} [options.description] - * A text description for the modal, primarily for accessibility. - * - * @param {Boolean} [options.fillAlways=false] - * Normally, modals are automatically filled only the first time - * they open. This tells the modal to refresh its content - * every time it opens. - * - * @param {String} [options.label] - * A text label for the modal, primarily for accessibility. - * - * @param {Boolean} [options.temporary=true] - * If `true`, the modal can only be opened once; it will be - * disposed as soon as it's closed. - * - * @param {Boolean} [options.uncloseable=false] - * If `true`, the user will not be able to close the modal - * through the UI in the normal ways. Programmatic closing is - * still possible. - * - */ - - function ModalDialog(player, options) { - _classCallCheck(this, ModalDialog); - - _Component.call(this, player, options); - this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false; - - this.closeable(!this.options_.uncloseable); - this.content(this.options_.content); - - // Make sure the contentEl is defined AFTER any children are initialized - // because we only want the contents of the modal in the contentEl - // (not the UI elements like the close button). - this.contentEl_ = Dom.createEl('div', { - className: MODAL_CLASS_NAME + '-content' - }, { - role: 'document' - }); - - this.descEl_ = Dom.createEl('p', { - className: MODAL_CLASS_NAME + '-description vjs-offscreen', - id: this.el().getAttribute('aria-describedby') - }); - - Dom.textContent(this.descEl_, this.description()); - this.el_.appendChild(this.descEl_); - this.el_.appendChild(this.contentEl_); - } - - /* - * Modal dialog default options. - * - * @type {Object} - * @private - */ - - /** - * Create the modal's DOM element - * - * @method createEl - * @return {Element} - */ - - ModalDialog.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: this.buildCSSClass(), - tabIndex: -1 - }, { - 'aria-describedby': this.id() + '_description', - 'aria-hidden': 'true', - 'aria-label': this.label(), - role: 'dialog' - }); - }; - - /** - * Build the modal's CSS class. - * - * @method buildCSSClass - * @return {String} - */ - - ModalDialog.prototype.buildCSSClass = function buildCSSClass() { - return MODAL_CLASS_NAME + ' vjs-hidden ' + _Component.prototype.buildCSSClass.call(this); - }; - - /** - * Handles key presses on the document, looking for ESC, which closes - * the modal. - * - * @method handleKeyPress - * @param {Event} e - */ - - ModalDialog.prototype.handleKeyPress = function handleKeyPress(e) { - if (e.which === ESC && this.closeable()) { - this.close(); - } - }; - - /** - * Returns the label string for this modal. Primarily used for accessibility. - * - * @return {String} - */ - - ModalDialog.prototype.label = function label() { - return this.options_.label || this.localize('Modal Window'); - }; - - /** - * Returns the description string for this modal. Primarily used for - * accessibility. - * - * @return {String} - */ - - ModalDialog.prototype.description = function description() { - var desc = this.options_.description || this.localize('This is a modal window.'); - - // Append a universal closeability message if the modal is closeable. - if (this.closeable()) { - desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.'); - } - - return desc; - }; - - /** - * Opens the modal. - * - * @method open - * @return {ModalDialog} - */ - - ModalDialog.prototype.open = function open() { - if (!this.opened_) { - var player = this.player(); - - this.trigger('beforemodalopen'); - this.opened_ = true; - - // Fill content if the modal has never opened before and - // never been filled. - if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) { - this.fill(); - } - - // If the player was playing, pause it and take note of its previously - // playing state. - this.wasPlaying_ = !player.paused(); - - if (this.wasPlaying_) { - player.pause(); - } - - if (this.closeable()) { - this.on(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress)); - } - - player.controls(false); - this.show(); - this.el().setAttribute('aria-hidden', 'false'); - this.trigger('modalopen'); - this.hasBeenOpened_ = true; - } - return this; - }; - - /** - * Whether or not the modal is opened currently. - * - * @method opened - * @param {Boolean} [value] - * If given, it will open (`true`) or close (`false`) the modal. - * - * @return {Boolean} - */ - - ModalDialog.prototype.opened = function opened(value) { - if (typeof value === 'boolean') { - this[value ? 'open' : 'close'](); - } - return this.opened_; - }; - - /** - * Closes the modal. - * - * @method close - * @return {ModalDialog} - */ - - ModalDialog.prototype.close = function close() { - if (this.opened_) { - var player = this.player(); - - this.trigger('beforemodalclose'); - this.opened_ = false; - - if (this.wasPlaying_) { - player.play(); - } - - if (this.closeable()) { - this.off(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress)); - } - - player.controls(true); - this.hide(); - this.el().setAttribute('aria-hidden', 'true'); - this.trigger('modalclose'); - - if (this.options_.temporary) { - this.dispose(); - } - } - return this; - }; - - /** - * Whether or not the modal is closeable via the UI. - * - * @method closeable - * @param {Boolean} [value] - * If given as a Boolean, it will set the `closeable` option. - * - * @return {Boolean} - */ - - ModalDialog.prototype.closeable = function closeable(value) { - if (typeof value === 'boolean') { - var closeable = this.closeable_ = !!value; - var _close = this.getChild('closeButton'); - - // If this is being made closeable and has no close button, add one. - if (closeable && !_close) { - - // The close button should be a child of the modal - not its - // content element, so temporarily change the content element. - var temp = this.contentEl_; - this.contentEl_ = this.el_; - _close = this.addChild('closeButton'); - this.contentEl_ = temp; - this.on(_close, 'close', this.close); - } - - // If this is being made uncloseable and has a close button, remove it. - if (!closeable && _close) { - this.off(_close, 'close', this.close); - this.removeChild(_close); - _close.dispose(); - } - } - return this.closeable_; - }; - - /** - * Fill the modal's content element with the modal's "content" option. - * - * The content element will be emptied before this change takes place. - * - * @method fill - * @return {ModalDialog} - */ - - ModalDialog.prototype.fill = function fill() { - return this.fillWith(this.content()); - }; - - /** - * Fill the modal's content element with arbitrary content. - * - * The content element will be emptied before this change takes place. - * - * @method fillWith - * @param {Mixed} [content] - * The same rules apply to this as apply to the `content` option. - * - * @return {ModalDialog} - */ - - ModalDialog.prototype.fillWith = function fillWith(content) { - var contentEl = this.contentEl(); - var parentEl = contentEl.parentNode; - var nextSiblingEl = contentEl.nextSibling; - - this.trigger('beforemodalfill'); - this.hasBeenFilled_ = true; - - // Detach the content element from the DOM before performing - // manipulation to avoid modifying the live DOM multiple times. - parentEl.removeChild(contentEl); - this.empty(); - Dom.insertContent(contentEl, content); - this.trigger('modalfill'); - - // Re-inject the re-filled content element. - if (nextSiblingEl) { - parentEl.insertBefore(contentEl, nextSiblingEl); - } else { - parentEl.appendChild(contentEl); - } - - return this; - }; - - /** - * Empties the content element. - * - * This happens automatically anytime the modal is filled. - * - * @method empty - * @return {ModalDialog} - */ - - ModalDialog.prototype.empty = function empty() { - this.trigger('beforemodalempty'); - Dom.emptyEl(this.contentEl()); - this.trigger('modalempty'); - return this; - }; - - /** - * Gets or sets the modal content, which gets normalized before being - * rendered into the DOM. - * - * This does not update the DOM or fill the modal, but it is called during - * that process. - * - * @method content - * @param {Mixed} [value] - * If defined, sets the internal content value to be used on the - * next call(s) to `fill`. This value is normalized before being - * inserted. To "clear" the internal content value, pass `null`. - * - * @return {Mixed} - */ - - ModalDialog.prototype.content = function content(value) { - if (typeof value !== 'undefined') { - this.content_ = value; - } - return this.content_; - }; - - return ModalDialog; -})(_component2['default']); - -ModalDialog.prototype.options_ = { - temporary: true -}; - -_component2['default'].registerComponent('ModalDialog', ModalDialog); -exports['default'] = ModalDialog; -module.exports = exports['default']; - -},{"./close-button":66,"./component":67,"./utils/dom":134,"./utils/fn":136,"./utils/log":139}],110:[function(_dereq_,module,exports){ -/** - * @file player.js - */ -// Subclasses Component -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('./component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _utilsEventsJs = _dereq_('./utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -var _utilsDomJs = _dereq_('./utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFnJs = _dereq_('./utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsGuidJs = _dereq_('./utils/guid.js'); - -var Guid = _interopRequireWildcard(_utilsGuidJs); - -var _utilsBrowserJs = _dereq_('./utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -var _utilsLogJs = _dereq_('./utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _utilsToTitleCaseJs = _dereq_('./utils/to-title-case.js'); - -var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); - -var _utilsTimeRangesJs = _dereq_('./utils/time-ranges.js'); - -var _utilsBufferJs = _dereq_('./utils/buffer.js'); - -var _utilsStylesheetJs = _dereq_('./utils/stylesheet.js'); - -var stylesheet = _interopRequireWildcard(_utilsStylesheetJs); - -var _fullscreenApiJs = _dereq_('./fullscreen-api.js'); - -var _fullscreenApiJs2 = _interopRequireDefault(_fullscreenApiJs); - -var _mediaErrorJs = _dereq_('./media-error.js'); - -var _mediaErrorJs2 = _interopRequireDefault(_mediaErrorJs); - -var _safeJsonParseTuple = _dereq_('safe-json-parse/tuple'); - -var _safeJsonParseTuple2 = _interopRequireDefault(_safeJsonParseTuple); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -var _utilsMergeOptionsJs = _dereq_('./utils/merge-options.js'); - -var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs); - -var _tracksTextTrackListConverterJs = _dereq_('./tracks/text-track-list-converter.js'); - -var _tracksTextTrackListConverterJs2 = _interopRequireDefault(_tracksTextTrackListConverterJs); - -// Include required child components (importing also registers them) - -var _techLoaderJs = _dereq_('./tech/loader.js'); - -var _techLoaderJs2 = _interopRequireDefault(_techLoaderJs); - -var _posterImageJs = _dereq_('./poster-image.js'); - -var _posterImageJs2 = _interopRequireDefault(_posterImageJs); - -var _tracksTextTrackDisplayJs = _dereq_('./tracks/text-track-display.js'); - -var _tracksTextTrackDisplayJs2 = _interopRequireDefault(_tracksTextTrackDisplayJs); - -var _loadingSpinnerJs = _dereq_('./loading-spinner.js'); - -var _loadingSpinnerJs2 = _interopRequireDefault(_loadingSpinnerJs); - -var _bigPlayButtonJs = _dereq_('./big-play-button.js'); - -var _bigPlayButtonJs2 = _interopRequireDefault(_bigPlayButtonJs); - -var _controlBarControlBarJs = _dereq_('./control-bar/control-bar.js'); - -var _controlBarControlBarJs2 = _interopRequireDefault(_controlBarControlBarJs); - -var _errorDisplayJs = _dereq_('./error-display.js'); - -var _errorDisplayJs2 = _interopRequireDefault(_errorDisplayJs); - -var _tracksTextTrackSettingsJs = _dereq_('./tracks/text-track-settings.js'); - -var _tracksTextTrackSettingsJs2 = _interopRequireDefault(_tracksTextTrackSettingsJs); - -var _modalDialog = _dereq_('./modal-dialog'); - -var _modalDialog2 = _interopRequireDefault(_modalDialog); - -// Require html5 tech, at least for disposing the original video tag - -var _techTechJs = _dereq_('./tech/tech.js'); - -var _techTechJs2 = _interopRequireDefault(_techTechJs); - -var _techHtml5Js = _dereq_('./tech/html5.js'); - -var _techHtml5Js2 = _interopRequireDefault(_techHtml5Js); - -/** - * An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video. - * ```js - * var myPlayer = videojs('example_video_1'); - * ``` - * In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready. - * ```html - * - * ``` - * After an instance has been created it can be accessed globally using `Video('example_video_1')`. - * - * @param {Element} tag The original video tag used for configuring options - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends Component - * @class Player - */ - -var Player = (function (_Component) { - _inherits(Player, _Component); - - /** - * player's constructor function - * - * @constructs - * @method init - * @param {Element} tag The original video tag used for configuring options - * @param {Object=} options Player options - * @param {Function=} ready Ready callback function - */ - - function Player(tag, options, ready) { - var _this = this; - - _classCallCheck(this, Player); - - // Make sure tag ID exists - tag.id = tag.id || 'vjs_video_' + Guid.newGUID(); - - // Set Options - // The options argument overrides options set in the video tag - // which overrides globally set options. - // This latter part coincides with the load order - // (tag must exist before Player) - options = _objectAssign2['default'](Player.getTagSettings(tag), options); - - // Delay the initialization of children because we need to set up - // player properties first, and can't use `this` before `super()` - options.initChildren = false; - - // Same with creating the element - options.createEl = false; - - // we don't want the player to report touch activity on itself - // see enableTouchActivity in Component - options.reportTouchActivity = false; - - // Run base component initializing with new options - _Component.call(this, null, options, ready); - - // if the global option object was accidentally blown away by - // someone, bail early with an informative error - if (!this.options_ || !this.options_.techOrder || !this.options_.techOrder.length) { - throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?'); - } - - this.tag = tag; // Store the original tag used to set options - - // Store the tag attributes used to restore html5 element - this.tagAttributes = tag && Dom.getElAttributes(tag); - - // Update current language - this.language(this.options_.language); - - // Update Supported Languages - if (options.languages) { - (function () { - // Normalise player option languages to lowercase - var languagesToLower = {}; - - Object.getOwnPropertyNames(options.languages).forEach(function (name) { - languagesToLower[name.toLowerCase()] = options.languages[name]; - }); - _this.languages_ = languagesToLower; - })(); - } else { - this.languages_ = Player.prototype.options_.languages; - } - - // Cache for video property values. - this.cache_ = {}; - - // Set poster - this.poster_ = options.poster || ''; - - // Set controls - this.controls_ = !!options.controls; - - // Original tag settings stored in options - // now remove immediately so native controls don't flash. - // May be turned back on by HTML5 tech if nativeControlsForTouch is true - tag.controls = false; - - /* - * Store the internal state of scrubbing - * - * @private - * @return {Boolean} True if the user is scrubbing - */ - this.scrubbing_ = false; - - this.el_ = this.createEl(); - - // We also want to pass the original player options to each component and plugin - // as well so they don't need to reach back into the player for options later. - // We also need to do another copy of this.options_ so we don't end up with - // an infinite loop. - var playerOptionsCopy = _utilsMergeOptionsJs2['default'](this.options_); - - // Load plugins - if (options.plugins) { - (function () { - var plugins = options.plugins; - - Object.getOwnPropertyNames(plugins).forEach(function (name) { - if (typeof this[name] === 'function') { - this[name](plugins[name]); - } else { - _utilsLogJs2['default'].error('Unable to find plugin:', name); - } - }, _this); - })(); - } - - this.options_.playerOptions = playerOptionsCopy; - - this.initChildren(); - - // Set isAudio based on whether or not an audio tag was used - this.isAudio(tag.nodeName.toLowerCase() === 'audio'); - - // Update controls className. Can't do this when the controls are initially - // set because the element doesn't exist yet. - if (this.controls()) { - this.addClass('vjs-controls-enabled'); - } else { - this.addClass('vjs-controls-disabled'); - } - - // Set ARIA label and region role depending on player type - this.el_.setAttribute('role', 'region'); - if (this.isAudio()) { - this.el_.setAttribute('aria-label', 'audio player'); - } else { - this.el_.setAttribute('aria-label', 'video player'); - } - - if (this.isAudio()) { - this.addClass('vjs-audio'); - } - - if (this.flexNotSupported_()) { - this.addClass('vjs-no-flex'); - } - - // TODO: Make this smarter. Toggle user state between touching/mousing - // using events, since devices can have both touch and mouse events. - // if (browser.TOUCH_ENABLED) { - // this.addClass('vjs-touch-enabled'); - // } - - // iOS Safari has broken hover handling - if (!browser.IS_IOS) { - this.addClass('vjs-workinghover'); - } - - // Make player easily findable by ID - Player.players[this.id_] = this; - - // When the player is first initialized, trigger activity so components - // like the control bar show themselves if needed - this.userActive(true); - this.reportUserActivity(); - this.listenForUserActivity_(); - - this.on('fullscreenchange', this.handleFullscreenChange_); - this.on('stageclick', this.handleStageClick_); - } - - /* - * Global player list - * - * @type {Object} - */ - - /** - * Destroys the video player and does any necessary cleanup - * ```js - * myPlayer.dispose(); - * ``` - * This is especially helpful if you are dynamically adding and removing videos - * to/from the DOM. - * - * @method dispose - */ - - Player.prototype.dispose = function dispose() { - this.trigger('dispose'); - // prevent dispose from being called twice - this.off('dispose'); - - if (this.styleEl_ && this.styleEl_.parentNode) { - this.styleEl_.parentNode.removeChild(this.styleEl_); - } - - // Kill reference to this player - Player.players[this.id_] = null; - if (this.tag && this.tag.player) { - this.tag.player = null; - } - if (this.el_ && this.el_.player) { - this.el_.player = null; - } - - if (this.tech_) { - this.tech_.dispose(); - } - - _Component.prototype.dispose.call(this); - }; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - Player.prototype.createEl = function createEl() { - var el = this.el_ = _Component.prototype.createEl.call(this, 'div'); - var tag = this.tag; - - // Remove width/height attrs from tag so CSS can make it 100% width/height - tag.removeAttribute('width'); - tag.removeAttribute('height'); - - // Copy over all the attributes from the tag, including ID and class - // ID will now reference player box, not the video tag - var attrs = Dom.getElAttributes(tag); - - Object.getOwnPropertyNames(attrs).forEach(function (attr) { - // workaround so we don't totally break IE7 - // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7 - if (attr === 'class') { - el.className = attrs[attr]; - } else { - el.setAttribute(attr, attrs[attr]); - } - }); - - // Update tag id/class for use as HTML5 playback tech - // Might think we should do this after embedding in container so .vjs-tech class - // doesn't flash 100% width/height, but class only applies with .video-js parent - tag.playerId = tag.id; - tag.id += '_html5_api'; - tag.className = 'vjs-tech'; - - // Make player findable on elements - tag.player = el.player = this; - // Default state of video is paused - this.addClass('vjs-paused'); - - // Add a style element in the player that we'll use to set the width/height - // of the player in a way that's still overrideable by CSS, just like the - // video element - if (_globalWindow2['default'].VIDEOJS_NO_DYNAMIC_STYLE !== true) { - this.styleEl_ = stylesheet.createStyleElement('vjs-styles-dimensions'); - var defaultsStyleEl = Dom.$('.vjs-styles-defaults'); - var head = Dom.$('head'); - head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild); - } - - // Pass in the width/height/aspectRatio options which will update the style el - this.width(this.options_.width); - this.height(this.options_.height); - this.fluid(this.options_.fluid); - this.aspectRatio(this.options_.aspectRatio); - - // Hide any links within the video/audio tag, because IE doesn't hide them completely. - var links = tag.getElementsByTagName('a'); - for (var i = 0; i < links.length; i++) { - var linkEl = links.item(i); - Dom.addElClass(linkEl, 'vjs-hidden'); - linkEl.setAttribute('hidden', 'hidden'); - } - - // insertElFirst seems to cause the networkState to flicker from 3 to 2, so - // keep track of the original for later so we can know if the source originally failed - tag.initNetworkState_ = tag.networkState; - - // Wrap video tag in div (el/box) container - if (tag.parentNode) { - tag.parentNode.insertBefore(el, tag); - } - - // insert the tag as the first child of the player element - // then manually add it to the children array so that this.addChild - // will work properly for other components - Dom.insertElFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup. - this.children_.unshift(tag); - - this.el_ = el; - - return el; - }; - - /** - * Get/set player width - * - * @param {Number=} value Value for width - * @return {Number} Width when getting - * @method width - */ - - Player.prototype.width = function width(value) { - return this.dimension('width', value); - }; - - /** - * Get/set player height - * - * @param {Number=} value Value for height - * @return {Number} Height when getting - * @method height - */ - - Player.prototype.height = function height(value) { - return this.dimension('height', value); - }; - - /** - * Get/set dimension for player - * - * @param {String} dimension Either width or height - * @param {Number=} value Value for dimension - * @return {Component} - * @method dimension - */ - - Player.prototype.dimension = function dimension(_dimension, value) { - var privDimension = _dimension + '_'; - - if (value === undefined) { - return this[privDimension] || 0; - } - - if (value === '') { - // If an empty string is given, reset the dimension to be automatic - this[privDimension] = undefined; - } else { - var parsedVal = parseFloat(value); - - if (isNaN(parsedVal)) { - _utilsLogJs2['default'].error('Improper value "' + value + '" supplied for for ' + _dimension); - return this; - } - - this[privDimension] = parsedVal; - } - - this.updateStyleEl_(); - return this; - }; - - /** - * Add/remove the vjs-fluid class - * - * @param {Boolean} bool Value of true adds the class, value of false removes the class - * @method fluid - */ - - Player.prototype.fluid = function fluid(bool) { - if (bool === undefined) { - return !!this.fluid_; - } - - this.fluid_ = !!bool; - - if (bool) { - this.addClass('vjs-fluid'); - } else { - this.removeClass('vjs-fluid'); - } - }; - - /** - * Get/Set the aspect ratio - * - * @param {String=} ratio Aspect ratio for player - * @return aspectRatio - * @method aspectRatio - */ - - Player.prototype.aspectRatio = function aspectRatio(ratio) { - if (ratio === undefined) { - return this.aspectRatio_; - } - - // Check for width:height format - if (!/^\d+\:\d+$/.test(ratio)) { - throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.'); - } - this.aspectRatio_ = ratio; - - // We're assuming if you set an aspect ratio you want fluid mode, - // because in fixed mode you could calculate width and height yourself. - this.fluid(true); - - this.updateStyleEl_(); - }; - - /** - * Update styles of the player element (height, width and aspect ratio) - * - * @method updateStyleEl_ - */ - - Player.prototype.updateStyleEl_ = function updateStyleEl_() { - if (_globalWindow2['default'].VIDEOJS_NO_DYNAMIC_STYLE === true) { - var _width = typeof this.width_ === 'number' ? this.width_ : this.options_.width; - var _height = typeof this.height_ === 'number' ? this.height_ : this.options_.height; - var techEl = this.tech_ && this.tech_.el(); - - if (techEl) { - if (_width >= 0) { - techEl.width = _width; - } - if (_height >= 0) { - techEl.height = _height; - } - } - - return; - } - - var width = undefined; - var height = undefined; - var aspectRatio = undefined; - var idClass = undefined; - - // The aspect ratio is either used directly or to calculate width and height. - if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') { - // Use any aspectRatio that's been specifically set - aspectRatio = this.aspectRatio_; - } else if (this.videoWidth()) { - // Otherwise try to get the aspect ratio from the video metadata - aspectRatio = this.videoWidth() + ':' + this.videoHeight(); - } else { - // Or use a default. The video element's is 2:1, but 16:9 is more common. - aspectRatio = '16:9'; - } - - // Get the ratio as a decimal we can use to calculate dimensions - var ratioParts = aspectRatio.split(':'); - var ratioMultiplier = ratioParts[1] / ratioParts[0]; - - if (this.width_ !== undefined) { - // Use any width that's been specifically set - width = this.width_; - } else if (this.height_ !== undefined) { - // Or calulate the width from the aspect ratio if a height has been set - width = this.height_ / ratioMultiplier; - } else { - // Or use the video's metadata, or use the video el's default of 300 - width = this.videoWidth() || 300; - } - - if (this.height_ !== undefined) { - // Use any height that's been specifically set - height = this.height_; - } else { - // Otherwise calculate the height from the ratio and the width - height = width * ratioMultiplier; - } - - // Ensure the CSS class is valid by starting with an alpha character - if (/^[^a-zA-Z]/.test(this.id())) { - idClass = 'dimensions-' + this.id(); - } else { - idClass = this.id() + '-dimensions'; - } - - // Ensure the right class is still on the player for the style element - this.addClass(idClass); - - stylesheet.setTextContent(this.styleEl_, '\n .' + idClass + ' {\n width: ' + width + 'px;\n height: ' + height + 'px;\n }\n\n .' + idClass + '.vjs-fluid {\n padding-top: ' + ratioMultiplier * 100 + '%;\n }\n '); - }; - - /** - * Load the Media Playback Technology (tech) - * Load/Create an instance of playback technology including element and API methods - * And append playback element in player div. - * - * @param {String} techName Name of the playback technology - * @param {String} source Video source - * @method loadTech_ - * @private - */ - - Player.prototype.loadTech_ = function loadTech_(techName, source) { - - // Pause and remove current playback technology - if (this.tech_) { - this.unloadTech_(); - } - - // get rid of the HTML5 video tag as soon as we are using another tech - if (techName !== 'Html5' && this.tag) { - _techTechJs2['default'].getTech('Html5').disposeMediaElement(this.tag); - this.tag.player = null; - this.tag = null; - } - - this.techName_ = techName; - - // Turn off API access because we're loading a new tech that might load asynchronously - this.isReady_ = false; - - // Grab tech-specific options from player options and add source and parent element to use. - var techOptions = _objectAssign2['default']({ - 'nativeControlsForTouch': this.options_.nativeControlsForTouch, - 'source': source, - 'playerId': this.id(), - 'techId': this.id() + '_' + techName + '_api', - 'textTracks': this.textTracks_, - 'autoplay': this.options_.autoplay, - 'preload': this.options_.preload, - 'loop': this.options_.loop, - 'muted': this.options_.muted, - 'poster': this.poster(), - 'language': this.language(), - 'vtt.js': this.options_['vtt.js'] - }, this.options_[techName.toLowerCase()]); - - if (this.tag) { - techOptions.tag = this.tag; - } - - if (source) { - this.currentType_ = source.type; - if (source.src === this.cache_.src && this.cache_.currentTime > 0) { - techOptions.startTime = this.cache_.currentTime; - } - - this.cache_.src = source.src; - } - - // Initialize tech instance - var techComponent = _techTechJs2['default'].getTech(techName); - // Support old behavior of techs being registered as components. - // Remove once that deprecated behavior is removed. - if (!techComponent) { - techComponent = _componentJs2['default'].getComponent(techName); - } - this.tech_ = new techComponent(techOptions); - - // player.triggerReady is always async, so don't need this to be async - this.tech_.ready(Fn.bind(this, this.handleTechReady_), true); - - _tracksTextTrackListConverterJs2['default'].jsonToTextTracks(this.textTracksJson_ || [], this.tech_); - - // Listen to all HTML5-defined events and trigger them on the player - this.on(this.tech_, 'loadstart', this.handleTechLoadStart_); - this.on(this.tech_, 'waiting', this.handleTechWaiting_); - this.on(this.tech_, 'canplay', this.handleTechCanPlay_); - this.on(this.tech_, 'canplaythrough', this.handleTechCanPlayThrough_); - this.on(this.tech_, 'playing', this.handleTechPlaying_); - this.on(this.tech_, 'ended', this.handleTechEnded_); - this.on(this.tech_, 'seeking', this.handleTechSeeking_); - this.on(this.tech_, 'seeked', this.handleTechSeeked_); - this.on(this.tech_, 'play', this.handleTechPlay_); - this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_); - this.on(this.tech_, 'pause', this.handleTechPause_); - this.on(this.tech_, 'progress', this.handleTechProgress_); - this.on(this.tech_, 'durationchange', this.handleTechDurationChange_); - this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_); - this.on(this.tech_, 'error', this.handleTechError_); - this.on(this.tech_, 'suspend', this.handleTechSuspend_); - this.on(this.tech_, 'abort', this.handleTechAbort_); - this.on(this.tech_, 'emptied', this.handleTechEmptied_); - this.on(this.tech_, 'stalled', this.handleTechStalled_); - this.on(this.tech_, 'loadedmetadata', this.handleTechLoadedMetaData_); - this.on(this.tech_, 'loadeddata', this.handleTechLoadedData_); - this.on(this.tech_, 'timeupdate', this.handleTechTimeUpdate_); - this.on(this.tech_, 'ratechange', this.handleTechRateChange_); - this.on(this.tech_, 'volumechange', this.handleTechVolumeChange_); - this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_); - this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_); - this.on(this.tech_, 'posterchange', this.handleTechPosterChange_); - - this.usingNativeControls(this.techGet_('controls')); - - if (this.controls() && !this.usingNativeControls()) { - this.addTechControlsListeners_(); - } - - // Add the tech element in the DOM if it was not already there - // Make sure to not insert the original video element if using Html5 - if (this.tech_.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) { - Dom.insertElFirst(this.tech_.el(), this.el()); - } - - // Get rid of the original video tag reference after the first tech is loaded - if (this.tag) { - this.tag.player = null; - this.tag = null; - } - }; - - /** - * Unload playback technology - * - * @method unloadTech_ - * @private - */ - - Player.prototype.unloadTech_ = function unloadTech_() { - // Save the current text tracks so that we can reuse the same text tracks with the next tech - this.textTracks_ = this.textTracks(); - this.textTracksJson_ = _tracksTextTrackListConverterJs2['default'].textTracksToJson(this.tech_); - - this.isReady_ = false; - - this.tech_.dispose(); - - this.tech_ = false; - }; - - /** - * Return a reference to the current tech. - * It will only return a reference to the tech if given an object with the - * `IWillNotUseThisInPlugins` property on it. This is try and prevent misuse - * of techs by plugins. - * - * @param {Object} - * @return {Object} The Tech - * @method tech - */ - - Player.prototype.tech = function tech(safety) { - if (safety && safety.IWillNotUseThisInPlugins) { - return this.tech_; - } - var errorText = '\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n '; - _globalWindow2['default'].alert(errorText); - throw new Error(errorText); - }; - - /** - * Set up click and touch listeners for the playback element - * - * On desktops, a click on the video itself will toggle playback, - * on a mobile device a click on the video toggles controls. - * (toggling controls is done by toggling the user state between active and - * inactive) - * A tap can signal that a user has become active, or has become inactive - * e.g. a quick tap on an iPhone movie should reveal the controls. Another - * quick tap should hide them again (signaling the user is in an inactive - * viewing state) - * In addition to this, we still want the user to be considered inactive after - * a few seconds of inactivity. - * Note: the only part of iOS interaction we can't mimic with this setup - * is a touch and hold on the video element counting as activity in order to - * keep the controls showing, but that shouldn't be an issue. A touch and hold - * on any controls will still keep the user active - * - * @private - * @method addTechControlsListeners_ - */ - - Player.prototype.addTechControlsListeners_ = function addTechControlsListeners_() { - // Make sure to remove all the previous listeners in case we are called multiple times. - this.removeTechControlsListeners_(); - - // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do - // trigger mousedown/up. - // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object - // Any touch events are set to block the mousedown event from happening - this.on(this.tech_, 'mousedown', this.handleTechClick_); - - // If the controls were hidden we don't want that to change without a tap event - // so we'll check if the controls were already showing before reporting user - // activity - this.on(this.tech_, 'touchstart', this.handleTechTouchStart_); - this.on(this.tech_, 'touchmove', this.handleTechTouchMove_); - this.on(this.tech_, 'touchend', this.handleTechTouchEnd_); - - // The tap listener needs to come after the touchend listener because the tap - // listener cancels out any reportedUserActivity when setting userActive(false) - this.on(this.tech_, 'tap', this.handleTechTap_); - }; - - /** - * Remove the listeners used for click and tap controls. This is needed for - * toggling to controls disabled, where a tap/touch should do nothing. - * - * @method removeTechControlsListeners_ - * @private - */ - - Player.prototype.removeTechControlsListeners_ = function removeTechControlsListeners_() { - // We don't want to just use `this.off()` because there might be other needed - // listeners added by techs that extend this. - this.off(this.tech_, 'tap', this.handleTechTap_); - this.off(this.tech_, 'touchstart', this.handleTechTouchStart_); - this.off(this.tech_, 'touchmove', this.handleTechTouchMove_); - this.off(this.tech_, 'touchend', this.handleTechTouchEnd_); - this.off(this.tech_, 'mousedown', this.handleTechClick_); - }; - - /** - * Player waits for the tech to be ready - * - * @method handleTechReady_ - * @private - */ - - Player.prototype.handleTechReady_ = function handleTechReady_() { - this.triggerReady(); - - // Keep the same volume as before - if (this.cache_.volume) { - this.techCall_('setVolume', this.cache_.volume); - } - - // Look if the tech found a higher resolution poster while loading - this.handleTechPosterChange_(); - - // Update the duration if available - this.handleTechDurationChange_(); - - // Chrome and Safari both have issues with autoplay. - // In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work. - // In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays) - // This fixes both issues. Need to wait for API, so it updates displays correctly - if (this.src() && this.tag && this.options_.autoplay && this.paused()) { - delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16. - this.play(); - } - }; - - /** - * Fired when the user agent begins looking for media data - * - * @private - * @method handleTechLoadStart_ - */ - - Player.prototype.handleTechLoadStart_ = function handleTechLoadStart_() { - // TODO: Update to use `emptied` event instead. See #1277. - - this.removeClass('vjs-ended'); - - // reset the error state - this.error(null); - - // If it's already playing we want to trigger a firstplay event now. - // The firstplay event relies on both the play and loadstart events - // which can happen in any order for a new source - if (!this.paused()) { - this.trigger('loadstart'); - this.trigger('firstplay'); - } else { - // reset the hasStarted state - this.hasStarted(false); - this.trigger('loadstart'); - } - }; - - /** - * Add/remove the vjs-has-started class - * - * @param {Boolean} hasStarted The value of true adds the class the value of false remove the class - * @return {Boolean} Boolean value if has started - * @private - * @method hasStarted - */ - - Player.prototype.hasStarted = function hasStarted(_hasStarted) { - if (_hasStarted !== undefined) { - // only update if this is a new value - if (this.hasStarted_ !== _hasStarted) { - this.hasStarted_ = _hasStarted; - if (_hasStarted) { - this.addClass('vjs-has-started'); - // trigger the firstplay event if this newly has played - this.trigger('firstplay'); - } else { - this.removeClass('vjs-has-started'); - } - } - return this; - } - return !!this.hasStarted_; - }; - - /** - * Fired whenever the media begins or resumes playback - * - * @private - * @method handleTechPlay_ - */ - - Player.prototype.handleTechPlay_ = function handleTechPlay_() { - this.removeClass('vjs-ended'); - this.removeClass('vjs-paused'); - this.addClass('vjs-playing'); - - // hide the poster when the user hits play - // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play - this.hasStarted(true); - - this.trigger('play'); - }; - - /** - * Fired whenever the media begins waiting - * - * @private - * @method handleTechWaiting_ - */ - - Player.prototype.handleTechWaiting_ = function handleTechWaiting_() { - var _this2 = this; - - this.addClass('vjs-waiting'); - this.trigger('waiting'); - this.one('timeupdate', function () { - return _this2.removeClass('vjs-waiting'); - }); - }; - - /** - * A handler for events that signal that waiting has ended - * which is not consistent between browsers. See #1351 - * - * @private - * @method handleTechCanPlay_ - */ - - Player.prototype.handleTechCanPlay_ = function handleTechCanPlay_() { - this.removeClass('vjs-waiting'); - this.trigger('canplay'); - }; - - /** - * A handler for events that signal that waiting has ended - * which is not consistent between browsers. See #1351 - * - * @private - * @method handleTechCanPlayThrough_ - */ - - Player.prototype.handleTechCanPlayThrough_ = function handleTechCanPlayThrough_() { - this.removeClass('vjs-waiting'); - this.trigger('canplaythrough'); - }; - - /** - * A handler for events that signal that waiting has ended - * which is not consistent between browsers. See #1351 - * - * @private - * @method handleTechPlaying_ - */ - - Player.prototype.handleTechPlaying_ = function handleTechPlaying_() { - this.removeClass('vjs-waiting'); - this.trigger('playing'); - }; - - /** - * Fired whenever the player is jumping to a new time - * - * @private - * @method handleTechSeeking_ - */ - - Player.prototype.handleTechSeeking_ = function handleTechSeeking_() { - this.addClass('vjs-seeking'); - this.trigger('seeking'); - }; - - /** - * Fired when the player has finished jumping to a new time - * - * @private - * @method handleTechSeeked_ - */ - - Player.prototype.handleTechSeeked_ = function handleTechSeeked_() { - this.removeClass('vjs-seeking'); - this.trigger('seeked'); - }; - - /** - * Fired the first time a video is played - * Not part of the HLS spec, and we're not sure if this is the best - * implementation yet, so use sparingly. If you don't have a reason to - * prevent playback, use `myPlayer.one('play');` instead. - * - * @private - * @method handleTechFirstPlay_ - */ - - Player.prototype.handleTechFirstPlay_ = function handleTechFirstPlay_() { - //If the first starttime attribute is specified - //then we will start at the given offset in seconds - if (this.options_.starttime) { - this.currentTime(this.options_.starttime); - } - - this.addClass('vjs-has-started'); - this.trigger('firstplay'); - }; - - /** - * Fired whenever the media has been paused - * - * @private - * @method handleTechPause_ - */ - - Player.prototype.handleTechPause_ = function handleTechPause_() { - this.removeClass('vjs-playing'); - this.addClass('vjs-paused'); - this.trigger('pause'); - }; - - /** - * Fired while the user agent is downloading media data - * - * @private - * @method handleTechProgress_ - */ - - Player.prototype.handleTechProgress_ = function handleTechProgress_() { - this.trigger('progress'); - }; - - /** - * Fired when the end of the media resource is reached (currentTime == duration) - * - * @private - * @method handleTechEnded_ - */ - - Player.prototype.handleTechEnded_ = function handleTechEnded_() { - this.addClass('vjs-ended'); - if (this.options_.loop) { - this.currentTime(0); - this.play(); - } else if (!this.paused()) { - this.pause(); - } - - this.trigger('ended'); - }; - - /** - * Fired when the duration of the media resource is first known or changed - * - * @private - * @method handleTechDurationChange_ - */ - - Player.prototype.handleTechDurationChange_ = function handleTechDurationChange_() { - this.duration(this.techGet_('duration')); - }; - - /** - * Handle a click on the media element to play/pause - * - * @param {Object=} event Event object - * @private - * @method handleTechClick_ - */ - - Player.prototype.handleTechClick_ = function handleTechClick_(event) { - // We're using mousedown to detect clicks thanks to Flash, but mousedown - // will also be triggered with right-clicks, so we need to prevent that - if (event.button !== 0) return; - - // When controls are disabled a click should not toggle playback because - // the click is considered a control - if (this.controls()) { - if (this.paused()) { - this.play(); - } else { - this.pause(); - } - } - }; - - /** - * Handle a tap on the media element. It will toggle the user - * activity state, which hides and shows the controls. - * - * @private - * @method handleTechTap_ - */ - - Player.prototype.handleTechTap_ = function handleTechTap_() { - this.userActive(!this.userActive()); - }; - - /** - * Handle touch to start - * - * @private - * @method handleTechTouchStart_ - */ - - Player.prototype.handleTechTouchStart_ = function handleTechTouchStart_() { - this.userWasActive = this.userActive(); - }; - - /** - * Handle touch to move - * - * @private - * @method handleTechTouchMove_ - */ - - Player.prototype.handleTechTouchMove_ = function handleTechTouchMove_() { - if (this.userWasActive) { - this.reportUserActivity(); - } - }; - - /** - * Handle touch to end - * - * @private - * @method handleTechTouchEnd_ - */ - - Player.prototype.handleTechTouchEnd_ = function handleTechTouchEnd_(event) { - // Stop the mouse events from also happening - event.preventDefault(); - }; - - /** - * Fired when the player switches in or out of fullscreen mode - * - * @private - * @method handleFullscreenChange_ - */ - - Player.prototype.handleFullscreenChange_ = function handleFullscreenChange_() { - if (this.isFullscreen()) { - this.addClass('vjs-fullscreen'); - } else { - this.removeClass('vjs-fullscreen'); - } - }; - - /** - * native click events on the SWF aren't triggered on IE11, Win8.1RT - * use stageclick events triggered from inside the SWF instead - * - * @private - * @method handleStageClick_ - */ - - Player.prototype.handleStageClick_ = function handleStageClick_() { - this.reportUserActivity(); - }; - - /** - * Handle Tech Fullscreen Change - * - * @private - * @method handleTechFullscreenChange_ - */ - - Player.prototype.handleTechFullscreenChange_ = function handleTechFullscreenChange_(event, data) { - if (data) { - this.isFullscreen(data.isFullscreen); - } - this.trigger('fullscreenchange'); - }; - - /** - * Fires when an error occurred during the loading of an audio/video - * - * @private - * @method handleTechError_ - */ - - Player.prototype.handleTechError_ = function handleTechError_() { - var error = this.tech_.error(); - this.error(error && error.code); - }; - - /** - * Fires when the browser is intentionally not getting media data - * - * @private - * @method handleTechSuspend_ - */ - - Player.prototype.handleTechSuspend_ = function handleTechSuspend_() { - this.trigger('suspend'); - }; - - /** - * Fires when the loading of an audio/video is aborted - * - * @private - * @method handleTechAbort_ - */ - - Player.prototype.handleTechAbort_ = function handleTechAbort_() { - this.trigger('abort'); - }; - - /** - * Fires when the current playlist is empty - * - * @private - * @method handleTechEmptied_ - */ - - Player.prototype.handleTechEmptied_ = function handleTechEmptied_() { - this.trigger('emptied'); - }; - - /** - * Fires when the browser is trying to get media data, but data is not available - * - * @private - * @method handleTechStalled_ - */ - - Player.prototype.handleTechStalled_ = function handleTechStalled_() { - this.trigger('stalled'); - }; - - /** - * Fires when the browser has loaded meta data for the audio/video - * - * @private - * @method handleTechLoadedMetaData_ - */ - - Player.prototype.handleTechLoadedMetaData_ = function handleTechLoadedMetaData_() { - this.trigger('loadedmetadata'); - }; - - /** - * Fires when the browser has loaded the current frame of the audio/video - * - * @private - * @method handleTechLoadedData_ - */ - - Player.prototype.handleTechLoadedData_ = function handleTechLoadedData_() { - this.trigger('loadeddata'); - }; - - /** - * Fires when the current playback position has changed - * - * @private - * @method handleTechTimeUpdate_ - */ - - Player.prototype.handleTechTimeUpdate_ = function handleTechTimeUpdate_() { - this.trigger('timeupdate'); - }; - - /** - * Fires when the playing speed of the audio/video is changed - * - * @private - * @method handleTechRateChange_ - */ - - Player.prototype.handleTechRateChange_ = function handleTechRateChange_() { - this.trigger('ratechange'); - }; - - /** - * Fires when the volume has been changed - * - * @private - * @method handleTechVolumeChange_ - */ - - Player.prototype.handleTechVolumeChange_ = function handleTechVolumeChange_() { - this.trigger('volumechange'); - }; - - /** - * Fires when the text track has been changed - * - * @private - * @method handleTechTextTrackChange_ - */ - - Player.prototype.handleTechTextTrackChange_ = function handleTechTextTrackChange_() { - this.trigger('texttrackchange'); - }; - - /** - * Get object for cached values. - * - * @return {Object} - * @method getCache - */ - - Player.prototype.getCache = function getCache() { - return this.cache_; - }; - - /** - * Pass values to the playback tech - * - * @param {String=} method Method - * @param {Object=} arg Argument - * @private - * @method techCall_ - */ - - Player.prototype.techCall_ = function techCall_(method, arg) { - // If it's not ready yet, call method when it is - if (this.tech_ && !this.tech_.isReady_) { - this.tech_.ready(function () { - this[method](arg); - }, true); - - // Otherwise call method now - } else { - try { - this.tech_[method](arg); - } catch (e) { - _utilsLogJs2['default'](e); - throw e; - } - } - }; - - /** - * Get calls can't wait for the tech, and sometimes don't need to. - * - * @param {String} method Tech method - * @return {Method} - * @private - * @method techGet_ - */ - - Player.prototype.techGet_ = function techGet_(method) { - if (this.tech_ && this.tech_.isReady_) { - - // Flash likes to die and reload when you hide or reposition it. - // In these cases the object methods go away and we get errors. - // When that happens we'll catch the errors and inform tech that it's not ready any more. - try { - return this.tech_[method](); - } catch (e) { - // When building additional tech libs, an expected method may not be defined yet - if (this.tech_[method] === undefined) { - _utilsLogJs2['default']('Video.js: ' + method + ' method not defined for ' + this.techName_ + ' playback technology.', e); - } else { - // When a method isn't available on the object it throws a TypeError - if (e.name === 'TypeError') { - _utilsLogJs2['default']('Video.js: ' + method + ' unavailable on ' + this.techName_ + ' playback technology element.', e); - this.tech_.isReady_ = false; - } else { - _utilsLogJs2['default'](e); - } - } - throw e; - } - } - - return; - }; - - /** - * start media playback - * ```js - * myPlayer.play(); - * ``` - * - * @return {Player} self - * @method play - */ - - Player.prototype.play = function play() { - this.techCall_('play'); - return this; - }; - - /** - * Pause the video playback - * ```js - * myPlayer.pause(); - * ``` - * - * @return {Player} self - * @method pause - */ - - Player.prototype.pause = function pause() { - this.techCall_('pause'); - return this; - }; - - /** - * Check if the player is paused - * ```js - * var isPaused = myPlayer.paused(); - * var isPlaying = !myPlayer.paused(); - * ``` - * - * @return {Boolean} false if the media is currently playing, or true otherwise - * @method paused - */ - - Player.prototype.paused = function paused() { - // The initial state of paused should be true (in Safari it's actually false) - return this.techGet_('paused') === false ? false : true; - }; - - /** - * Returns whether or not the user is "scrubbing". Scrubbing is when the user - * has clicked the progress bar handle and is dragging it along the progress bar. - * - * @param {Boolean} isScrubbing True/false the user is scrubbing - * @return {Boolean} The scrubbing status when getting - * @return {Object} The player when setting - * @method scrubbing - */ - - Player.prototype.scrubbing = function scrubbing(isScrubbing) { - if (isScrubbing !== undefined) { - this.scrubbing_ = !!isScrubbing; - - if (isScrubbing) { - this.addClass('vjs-scrubbing'); - } else { - this.removeClass('vjs-scrubbing'); - } - - return this; - } - - return this.scrubbing_; - }; - - /** - * Get or set the current time (in seconds) - * ```js - * // get - * var whereYouAt = myPlayer.currentTime(); - * // set - * myPlayer.currentTime(120); // 2 minutes into the video - * ``` - * - * @param {Number|String=} seconds The time to seek to - * @return {Number} The time in seconds, when not setting - * @return {Player} self, when the current time is set - * @method currentTime - */ - - Player.prototype.currentTime = function currentTime(seconds) { - if (seconds !== undefined) { - - this.techCall_('setCurrentTime', seconds); - - return this; - } - - // cache last currentTime and return. default to 0 seconds - // - // Caching the currentTime is meant to prevent a massive amount of reads on the tech's - // currentTime when scrubbing, but may not provide much performance benefit afterall. - // Should be tested. Also something has to read the actual current time or the cache will - // never get updated. - return this.cache_.currentTime = this.techGet_('currentTime') || 0; - }; - - /** - * Get the length in time of the video in seconds - * ```js - * var lengthOfVideo = myPlayer.duration(); - * ``` - * **NOTE**: The video must have started loading before the duration can be - * known, and in the case of Flash, may not be known until the video starts - * playing. - * - * @param {Number} seconds Duration when setting - * @return {Number} The duration of the video in seconds when getting - * @method duration - */ - - Player.prototype.duration = function duration(seconds) { - if (seconds === undefined) { - return this.cache_.duration || 0; - } - - seconds = parseFloat(seconds) || 0; - - // Standardize on Inifity for signaling video is live - if (seconds < 0) { - seconds = Infinity; - } - - if (seconds !== this.cache_.duration) { - // Cache the last set value for optimized scrubbing (esp. Flash) - this.cache_.duration = seconds; - - if (seconds === Infinity) { - this.addClass('vjs-live'); - } else { - this.removeClass('vjs-live'); - } - - this.trigger('durationchange'); - } - - return this; - }; - - /** - * Calculates how much time is left. - * ```js - * var timeLeft = myPlayer.remainingTime(); - * ``` - * Not a native video element function, but useful - * - * @return {Number} The time remaining in seconds - * @method remainingTime - */ - - Player.prototype.remainingTime = function remainingTime() { - return this.duration() - this.currentTime(); - }; - - // http://dev.w3.org/html5/spec/video.html#dom-media-buffered - // Buffered returns a timerange object. - // Kind of like an array of portions of the video that have been downloaded. - - /** - * Get a TimeRange object with the times of the video that have been downloaded - * If you just want the percent of the video that's been downloaded, - * use bufferedPercent. - * ```js - * // Number of different ranges of time have been buffered. Usually 1. - * numberOfRanges = bufferedTimeRange.length, - * // Time in seconds when the first range starts. Usually 0. - * firstRangeStart = bufferedTimeRange.start(0), - * // Time in seconds when the first range ends - * firstRangeEnd = bufferedTimeRange.end(0), - * // Length in seconds of the first time range - * firstRangeLength = firstRangeEnd - firstRangeStart; - * ``` - * - * @return {Object} A mock TimeRange object (following HTML spec) - * @method buffered - */ - - Player.prototype.buffered = function buffered() { - var buffered = this.techGet_('buffered'); - - if (!buffered || !buffered.length) { - buffered = _utilsTimeRangesJs.createTimeRange(0, 0); - } - - return buffered; - }; - - /** - * Get the percent (as a decimal) of the video that's been downloaded - * ```js - * var howMuchIsDownloaded = myPlayer.bufferedPercent(); - * ``` - * 0 means none, 1 means all. - * (This method isn't in the HTML5 spec, but it's very convenient) - * - * @return {Number} A decimal between 0 and 1 representing the percent - * @method bufferedPercent - */ - - Player.prototype.bufferedPercent = function bufferedPercent() { - return _utilsBufferJs.bufferedPercent(this.buffered(), this.duration()); - }; - - /** - * Get the ending time of the last buffered time range - * This is used in the progress bar to encapsulate all time ranges. - * - * @return {Number} The end of the last buffered time range - * @method bufferedEnd - */ - - Player.prototype.bufferedEnd = function bufferedEnd() { - var buffered = this.buffered(), - duration = this.duration(), - end = buffered.end(buffered.length - 1); - - if (end > duration) { - end = duration; - } - - return end; - }; - - /** - * Get or set the current volume of the media - * ```js - * // get - * var howLoudIsIt = myPlayer.volume(); - * // set - * myPlayer.volume(0.5); // Set volume to half - * ``` - * 0 is off (muted), 1.0 is all the way up, 0.5 is half way. - * - * @param {Number} percentAsDecimal The new volume as a decimal percent - * @return {Number} The current volume when getting - * @return {Player} self when setting - * @method volume - */ - - Player.prototype.volume = function volume(percentAsDecimal) { - var vol = undefined; - - if (percentAsDecimal !== undefined) { - vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1 - this.cache_.volume = vol; - this.techCall_('setVolume', vol); - - return this; - } - - // Default to 1 when returning current volume. - vol = parseFloat(this.techGet_('volume')); - return isNaN(vol) ? 1 : vol; - }; - - /** - * Get the current muted state, or turn mute on or off - * ```js - * // get - * var isVolumeMuted = myPlayer.muted(); - * // set - * myPlayer.muted(true); // mute the volume - * ``` - * - * @param {Boolean=} muted True to mute, false to unmute - * @return {Boolean} True if mute is on, false if not when getting - * @return {Player} self when setting mute - * @method muted - */ - - Player.prototype.muted = function muted(_muted) { - if (_muted !== undefined) { - this.techCall_('setMuted', _muted); - return this; - } - return this.techGet_('muted') || false; // Default to false - }; - - // Check if current tech can support native fullscreen - // (e.g. with built in controls like iOS, so not our flash swf) - /** - * Check to see if fullscreen is supported - * - * @return {Boolean} - * @method supportsFullScreen - */ - - Player.prototype.supportsFullScreen = function supportsFullScreen() { - return this.techGet_('supportsFullScreen') || false; - }; - - /** - * Check if the player is in fullscreen mode - * ```js - * // get - * var fullscreenOrNot = myPlayer.isFullscreen(); - * // set - * myPlayer.isFullscreen(true); // tell the player it's in fullscreen - * ``` - * NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official - * property and instead document.fullscreenElement is used. But isFullscreen is - * still a valuable property for internal player workings. - * - * @param {Boolean=} isFS Update the player's fullscreen state - * @return {Boolean} true if fullscreen false if not when getting - * @return {Player} self when setting - * @method isFullscreen - */ - - Player.prototype.isFullscreen = function isFullscreen(isFS) { - if (isFS !== undefined) { - this.isFullscreen_ = !!isFS; - return this; - } - return !!this.isFullscreen_; - }; - - /** - * Increase the size of the video to full screen - * ```js - * myPlayer.requestFullscreen(); - * ``` - * In some browsers, full screen is not supported natively, so it enters - * "full window mode", where the video fills the browser window. - * In browsers and devices that support native full screen, sometimes the - * browser's default controls will be shown, and not the Video.js custom skin. - * This includes most mobile devices (iOS, Android) and older versions of - * Safari. - * - * @return {Player} self - * @method requestFullscreen - */ - - Player.prototype.requestFullscreen = function requestFullscreen() { - var fsApi = _fullscreenApiJs2['default']; - - this.isFullscreen(true); - - if (fsApi.requestFullscreen) { - // the browser supports going fullscreen at the element level so we can - // take the controls fullscreen as well as the video - - // Trigger fullscreenchange event after change - // We have to specifically add this each time, and remove - // when canceling fullscreen. Otherwise if there's multiple - // players on a page, they would all be reacting to the same fullscreen - // events - Events.on(_globalDocument2['default'], fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e) { - this.isFullscreen(_globalDocument2['default'][fsApi.fullscreenElement]); - - // If cancelling fullscreen, remove event listener. - if (this.isFullscreen() === false) { - Events.off(_globalDocument2['default'], fsApi.fullscreenchange, documentFullscreenChange); - } - - this.trigger('fullscreenchange'); - })); - - this.el_[fsApi.requestFullscreen](); - } else if (this.tech_.supportsFullScreen()) { - // we can't take the video.js controls fullscreen but we can go fullscreen - // with native controls - this.techCall_('enterFullScreen'); - } else { - // fullscreen isn't supported so we'll just stretch the video element to - // fill the viewport - this.enterFullWindow(); - this.trigger('fullscreenchange'); - } - - return this; - }; - - /** - * Return the video to its normal size after having been in full screen mode - * ```js - * myPlayer.exitFullscreen(); - * ``` - * - * @return {Player} self - * @method exitFullscreen - */ - - Player.prototype.exitFullscreen = function exitFullscreen() { - var fsApi = _fullscreenApiJs2['default']; - this.isFullscreen(false); - - // Check for browser element fullscreen support - if (fsApi.requestFullscreen) { - _globalDocument2['default'][fsApi.exitFullscreen](); - } else if (this.tech_.supportsFullScreen()) { - this.techCall_('exitFullScreen'); - } else { - this.exitFullWindow(); - this.trigger('fullscreenchange'); - } - - return this; - }; - - /** - * When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us. - * - * @method enterFullWindow - */ - - Player.prototype.enterFullWindow = function enterFullWindow() { - this.isFullWindow = true; - - // Storing original doc overflow value to return to when fullscreen is off - this.docOrigOverflow = _globalDocument2['default'].documentElement.style.overflow; - - // Add listener for esc key to exit fullscreen - Events.on(_globalDocument2['default'], 'keydown', Fn.bind(this, this.fullWindowOnEscKey)); - - // Hide any scroll bars - _globalDocument2['default'].documentElement.style.overflow = 'hidden'; - - // Apply fullscreen styles - Dom.addElClass(_globalDocument2['default'].body, 'vjs-full-window'); - - this.trigger('enterFullWindow'); - }; - - /** - * Check for call to either exit full window or full screen on ESC key - * - * @param {String} event Event to check for key press - * @method fullWindowOnEscKey - */ - - Player.prototype.fullWindowOnEscKey = function fullWindowOnEscKey(event) { - if (event.keyCode === 27) { - if (this.isFullscreen() === true) { - this.exitFullscreen(); - } else { - this.exitFullWindow(); - } - } - }; - - /** - * Exit full window - * - * @method exitFullWindow - */ - - Player.prototype.exitFullWindow = function exitFullWindow() { - this.isFullWindow = false; - Events.off(_globalDocument2['default'], 'keydown', this.fullWindowOnEscKey); - - // Unhide scroll bars. - _globalDocument2['default'].documentElement.style.overflow = this.docOrigOverflow; - - // Remove fullscreen styles - Dom.removeElClass(_globalDocument2['default'].body, 'vjs-full-window'); - - // Resize the box, controller, and poster to original sizes - // this.positionAll(); - this.trigger('exitFullWindow'); - }; - - /** - * Check whether the player can play a given mimetype - * - * @param {String} type The mimetype to check - * @return {String} 'probably', 'maybe', or '' (empty string) - * @method canPlayType - */ - - Player.prototype.canPlayType = function canPlayType(type) { - var can = undefined; - - // Loop through each playback technology in the options order - for (var i = 0, j = this.options_.techOrder; i < j.length; i++) { - var techName = _utilsToTitleCaseJs2['default'](j[i]); - var tech = _techTechJs2['default'].getTech(techName); - - // Support old behavior of techs being registered as components. - // Remove once that deprecated behavior is removed. - if (!tech) { - tech = _componentJs2['default'].getComponent(techName); - } - - // Check if the current tech is defined before continuing - if (!tech) { - _utilsLogJs2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.'); - continue; - } - - // Check if the browser supports this technology - if (tech.isSupported()) { - can = tech.canPlayType(type); - - if (can) { - return can; - } - } - } - - return ''; - }; - - /** - * Select source based on tech-order or source-order - * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise, - * defaults to tech-order selection - * - * @param {Array} sources The sources for a media asset - * @return {Object|Boolean} Object of source and tech order, otherwise false - * @method selectSource - */ - - Player.prototype.selectSource = function selectSource(sources) { - // Get only the techs specified in `techOrder` that exist and are supported by the - // current platform - var techs = this.options_.techOrder.map(_utilsToTitleCaseJs2['default']).map(function (techName) { - // `Component.getComponent(...)` is for support of old behavior of techs - // being registered as components. - // Remove once that deprecated behavior is removed. - return [techName, _techTechJs2['default'].getTech(techName) || _componentJs2['default'].getComponent(techName)]; - }).filter(function (_ref) { - var techName = _ref[0]; - var tech = _ref[1]; - - // Check if the current tech is defined before continuing - if (tech) { - // Check if the browser supports this technology - return tech.isSupported(); - } - - _utilsLogJs2['default'].error('The "' + techName + '" tech is undefined. Skipped browser support check for that tech.'); - return false; - }); - - // Iterate over each `innerArray` element once per `outerArray` element and execute - // `tester` with both. If `tester` returns a non-falsy value, exit early and return - // that value. - var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) { - var found = undefined; - - outerArray.some(function (outerChoice) { - return innerArray.some(function (innerChoice) { - found = tester(outerChoice, innerChoice); - - if (found) { - return true; - } - }); - }); - - return found; - }; - - var foundSourceAndTech = undefined; - var flip = function flip(fn) { - return function (a, b) { - return fn(b, a); - }; - }; - var finder = function finder(_ref2, source) { - var techName = _ref2[0]; - var tech = _ref2[1]; - - if (tech.canPlaySource(source)) { - return { source: source, tech: techName }; - } - }; - - // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources - // to select from them based on their priority. - if (this.options_.sourceOrder) { - // Source-first ordering - foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder)); - } else { - // Tech-first ordering - foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder); - } - - return foundSourceAndTech || false; - }; - - /** - * The source function updates the video source - * There are three types of variables you can pass as the argument. - * **URL String**: A URL to the the video file. Use this method if you are sure - * the current playback technology (HTML5/Flash) can support the source you - * provide. Currently only MP4 files can be used in both HTML5 and Flash. - * ```js - * myPlayer.src("http://www.example.com/path/to/video.mp4"); - * ``` - * **Source Object (or element):* * A javascript object containing information - * about the source file. Use this method if you want the player to determine if - * it can support the file using the type information. - * ```js - * myPlayer.src({ type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" }); - * ``` - * **Array of Source Objects:* * To provide multiple versions of the source so - * that it can be played using HTML5 across browsers you can use an array of - * source objects. Video.js will detect which version is supported and load that - * file. - * ```js - * myPlayer.src([ - * { type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" }, - * { type: "video/webm", src: "http://www.example.com/path/to/video.webm" }, - * { type: "video/ogg", src: "http://www.example.com/path/to/video.ogv" } - * ]); - * ``` - * - * @param {String|Object|Array=} source The source URL, object, or array of sources - * @return {String} The current video source when getting - * @return {String} The player when setting - * @method src - */ - - Player.prototype.src = function src(source) { - if (source === undefined) { - return this.techGet_('src'); - } - - var currentTech = _techTechJs2['default'].getTech(this.techName_); - // Support old behavior of techs being registered as components. - // Remove once that deprecated behavior is removed. - if (!currentTech) { - currentTech = _componentJs2['default'].getComponent(this.techName_); - } - - // case: Array of source objects to choose from and pick the best to play - if (Array.isArray(source)) { - this.sourceList_(source); - - // case: URL String (http://myvideo...) - } else if (typeof source === 'string') { - // create a source object from the string - this.src({ src: source }); - - // case: Source object { src: '', type: '' ... } - } else if (source instanceof Object) { - // check if the source has a type and the loaded tech cannot play the source - // if there's no type we'll just try the current tech - if (source.type && !currentTech.canPlaySource(source)) { - // create a source list with the current source and send through - // the tech loop to check for a compatible technology - this.sourceList_([source]); - } else { - this.cache_.src = source.src; - this.currentType_ = source.type || ''; - - // wait until the tech is ready to set the source - this.ready(function () { - - // The setSource tech method was added with source handlers - // so older techs won't support it - // We need to check the direct prototype for the case where subclasses - // of the tech do not support source handlers - if (currentTech.prototype.hasOwnProperty('setSource')) { - this.techCall_('setSource', source); - } else { - this.techCall_('src', source.src); - } - - if (this.options_.preload === 'auto') { - this.load(); - } - - if (this.options_.autoplay) { - this.play(); - } - - // Set the source synchronously if possible (#2326) - }, true); - } - } - - return this; - }; - - /** - * Handle an array of source objects - * - * @param {Array} sources Array of source objects - * @private - * @method sourceList_ - */ - - Player.prototype.sourceList_ = function sourceList_(sources) { - var sourceTech = this.selectSource(sources); - - if (sourceTech) { - if (sourceTech.tech === this.techName_) { - // if this technology is already loaded, set the source - this.src(sourceTech.source); - } else { - // load this technology with the chosen source - this.loadTech_(sourceTech.tech, sourceTech.source); - } - } else { - // We need to wrap this in a timeout to give folks a chance to add error event handlers - this.setTimeout(function () { - this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) }); - }, 0); - - // we could not find an appropriate tech, but let's still notify the delegate that this is it - // this needs a better comment about why this is needed - this.triggerReady(); - } - }; - - /** - * Begin loading the src data. - * - * @return {Player} Returns the player - * @method load - */ - - Player.prototype.load = function load() { - this.techCall_('load'); - return this; - }; - - /** - * Reset the player. Loads the first tech in the techOrder, - * and calls `reset` on the tech`. - * - * @return {Player} Returns the player - * @method reset - */ - - Player.prototype.reset = function reset() { - this.loadTech_(_utilsToTitleCaseJs2['default'](this.options_.techOrder[0]), null); - this.techCall_('reset'); - return this; - }; - - /** - * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4 - * Can be used in conjuction with `currentType` to assist in rebuilding the current source object. - * - * @return {String} The current source - * @method currentSrc - */ - - Player.prototype.currentSrc = function currentSrc() { - return this.techGet_('currentSrc') || this.cache_.src || ''; - }; - - /** - * Get the current source type e.g. video/mp4 - * This can allow you rebuild the current source object so that you could load the same - * source and tech later - * - * @return {String} The source MIME type - * @method currentType - */ - - Player.prototype.currentType = function currentType() { - return this.currentType_ || ''; - }; - - /** - * Get or set the preload attribute - * - * @param {Boolean} value Boolean to determine if preload should be used - * @return {String} The preload attribute value when getting - * @return {Player} Returns the player when setting - * @method preload - */ - - Player.prototype.preload = function preload(value) { - if (value !== undefined) { - this.techCall_('setPreload', value); - this.options_.preload = value; - return this; - } - return this.techGet_('preload'); - }; - - /** - * Get or set the autoplay attribute. - * - * @param {Boolean} value Boolean to determine if video should autoplay - * @return {String} The autoplay attribute value when getting - * @return {Player} Returns the player when setting - * @method autoplay - */ - - Player.prototype.autoplay = function autoplay(value) { - if (value !== undefined) { - this.techCall_('setAutoplay', value); - this.options_.autoplay = value; - return this; - } - return this.techGet_('autoplay', value); - }; - - /** - * Get or set the loop attribute on the video element. - * - * @param {Boolean} value Boolean to determine if video should loop - * @return {String} The loop attribute value when getting - * @return {Player} Returns the player when setting - * @method loop - */ - - Player.prototype.loop = function loop(value) { - if (value !== undefined) { - this.techCall_('setLoop', value); - this.options_['loop'] = value; - return this; - } - return this.techGet_('loop'); - }; - - /** - * Get or set the poster image source url - * - * ##### EXAMPLE: - * ```js - * // get - * var currentPoster = myPlayer.poster(); - * // set - * myPlayer.poster('http://example.com/myImage.jpg'); - * ``` - * - * @param {String=} src Poster image source URL - * @return {String} poster URL when getting - * @return {Player} self when setting - * @method poster - */ - - Player.prototype.poster = function poster(src) { - if (src === undefined) { - return this.poster_; - } - - // The correct way to remove a poster is to set as an empty string - // other falsey values will throw errors - if (!src) { - src = ''; - } - - // update the internal poster variable - this.poster_ = src; - - // update the tech's poster - this.techCall_('setPoster', src); - - // alert components that the poster has been set - this.trigger('posterchange'); - - return this; - }; - - /** - * Some techs (e.g. YouTube) can provide a poster source in an - * asynchronous way. We want the poster component to use this - * poster source so that it covers up the tech's controls. - * (YouTube's play button). However we only want to use this - * soruce if the player user hasn't set a poster through - * the normal APIs. - * - * @private - * @method handleTechPosterChange_ - */ - - Player.prototype.handleTechPosterChange_ = function handleTechPosterChange_() { - if (!this.poster_ && this.tech_ && this.tech_.poster) { - this.poster_ = this.tech_.poster() || ''; - - // Let components know the poster has changed - this.trigger('posterchange'); - } - }; - - /** - * Get or set whether or not the controls are showing. - * - * @param {Boolean} bool Set controls to showing or not - * @return {Boolean} Controls are showing - * @method controls - */ - - Player.prototype.controls = function controls(bool) { - if (bool !== undefined) { - bool = !!bool; // force boolean - // Don't trigger a change event unless it actually changed - if (this.controls_ !== bool) { - this.controls_ = bool; - - if (this.usingNativeControls()) { - this.techCall_('setControls', bool); - } - - if (bool) { - this.removeClass('vjs-controls-disabled'); - this.addClass('vjs-controls-enabled'); - this.trigger('controlsenabled'); - - if (!this.usingNativeControls()) { - this.addTechControlsListeners_(); - } - } else { - this.removeClass('vjs-controls-enabled'); - this.addClass('vjs-controls-disabled'); - this.trigger('controlsdisabled'); - - if (!this.usingNativeControls()) { - this.removeTechControlsListeners_(); - } - } - } - return this; - } - return !!this.controls_; - }; - - /** - * Toggle native controls on/off. Native controls are the controls built into - * devices (e.g. default iPhone controls), Flash, or other techs - * (e.g. Vimeo Controls) - * **This should only be set by the current tech, because only the tech knows - * if it can support native controls** - * - * @param {Boolean} bool True signals that native controls are on - * @return {Player} Returns the player - * @private - * @method usingNativeControls - */ - - Player.prototype.usingNativeControls = function usingNativeControls(bool) { - if (bool !== undefined) { - bool = !!bool; // force boolean - // Don't trigger a change event unless it actually changed - if (this.usingNativeControls_ !== bool) { - this.usingNativeControls_ = bool; - if (bool) { - this.addClass('vjs-using-native-controls'); - - /** - * player is using the native device controls - * - * @event usingnativecontrols - * @memberof Player - * @instance - * @private - */ - this.trigger('usingnativecontrols'); - } else { - this.removeClass('vjs-using-native-controls'); - - /** - * player is using the custom HTML controls - * - * @event usingcustomcontrols - * @memberof Player - * @instance - * @private - */ - this.trigger('usingcustomcontrols'); - } - } - return this; - } - return !!this.usingNativeControls_; - }; - - /** - * Set or get the current MediaError - * - * @param {*} err A MediaError or a String/Number to be turned into a MediaError - * @return {MediaError|null} when getting - * @return {Player} when setting - * @method error - */ - - Player.prototype.error = function error(err) { - if (err === undefined) { - return this.error_ || null; - } - - // restoring to default - if (err === null) { - this.error_ = err; - this.removeClass('vjs-error'); - this.errorDisplay.close(); - return this; - } - - // error instance - if (err instanceof _mediaErrorJs2['default']) { - this.error_ = err; - } else { - this.error_ = new _mediaErrorJs2['default'](err); - } - - // add the vjs-error classname to the player - this.addClass('vjs-error'); - - // log the name of the error type and any message - // ie8 just logs "[object object]" if you just log the error object - _utilsLogJs2['default'].error('(CODE:' + this.error_.code + ' ' + _mediaErrorJs2['default'].errorTypes[this.error_.code] + ')', this.error_.message, this.error_); - - // fire an error event on the player - this.trigger('error'); - - return this; - }; - - /** - * Returns whether or not the player is in the "ended" state. - * - * @return {Boolean} True if the player is in the ended state, false if not. - * @method ended - */ - - Player.prototype.ended = function ended() { - return this.techGet_('ended'); - }; - - /** - * Returns whether or not the player is in the "seeking" state. - * - * @return {Boolean} True if the player is in the seeking state, false if not. - * @method seeking - */ - - Player.prototype.seeking = function seeking() { - return this.techGet_('seeking'); - }; - - /** - * Returns the TimeRanges of the media that are currently available - * for seeking to. - * - * @return {TimeRanges} the seekable intervals of the media timeline - * @method seekable - */ - - Player.prototype.seekable = function seekable() { - return this.techGet_('seekable'); - }; - - /** - * Report user activity - * - * @param {Object} event Event object - * @method reportUserActivity - */ - - Player.prototype.reportUserActivity = function reportUserActivity(event) { - this.userActivity_ = true; - }; - - /** - * Get/set if user is active - * - * @param {Boolean} bool Value when setting - * @return {Boolean} Value if user is active user when getting - * @method userActive - */ - - Player.prototype.userActive = function userActive(bool) { - if (bool !== undefined) { - bool = !!bool; - if (bool !== this.userActive_) { - this.userActive_ = bool; - if (bool) { - // If the user was inactive and is now active we want to reset the - // inactivity timer - this.userActivity_ = true; - this.removeClass('vjs-user-inactive'); - this.addClass('vjs-user-active'); - this.trigger('useractive'); - } else { - // We're switching the state to inactive manually, so erase any other - // activity - this.userActivity_ = false; - - // Chrome/Safari/IE have bugs where when you change the cursor it can - // trigger a mousemove event. This causes an issue when you're hiding - // the cursor when the user is inactive, and a mousemove signals user - // activity. Making it impossible to go into inactive mode. Specifically - // this happens in fullscreen when we really need to hide the cursor. - // - // When this gets resolved in ALL browsers it can be removed - // https://code.google.com/p/chromium/issues/detail?id=103041 - if (this.tech_) { - this.tech_.one('mousemove', function (e) { - e.stopPropagation(); - e.preventDefault(); - }); - } - - this.removeClass('vjs-user-active'); - this.addClass('vjs-user-inactive'); - this.trigger('userinactive'); - } - } - return this; - } - return this.userActive_; - }; - - /** - * Listen for user activity based on timeout value - * - * @private - * @method listenForUserActivity_ - */ - - Player.prototype.listenForUserActivity_ = function listenForUserActivity_() { - var mouseInProgress = undefined, - lastMoveX = undefined, - lastMoveY = undefined; - - var handleActivity = Fn.bind(this, this.reportUserActivity); - - var handleMouseMove = function handleMouseMove(e) { - // #1068 - Prevent mousemove spamming - // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970 - if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) { - lastMoveX = e.screenX; - lastMoveY = e.screenY; - handleActivity(); - } - }; - - var handleMouseDown = function handleMouseDown() { - handleActivity(); - // For as long as the they are touching the device or have their mouse down, - // we consider them active even if they're not moving their finger or mouse. - // So we want to continue to update that they are active - this.clearInterval(mouseInProgress); - // Setting userActivity=true now and setting the interval to the same time - // as the activityCheck interval (250) should ensure we never miss the - // next activityCheck - mouseInProgress = this.setInterval(handleActivity, 250); - }; - - var handleMouseUp = function handleMouseUp(event) { - handleActivity(); - // Stop the interval that maintains activity if the mouse/touch is down - this.clearInterval(mouseInProgress); - }; - - // Any mouse movement will be considered user activity - this.on('mousedown', handleMouseDown); - this.on('mousemove', handleMouseMove); - this.on('mouseup', handleMouseUp); - - // Listen for keyboard navigation - // Shouldn't need to use inProgress interval because of key repeat - this.on('keydown', handleActivity); - this.on('keyup', handleActivity); - - // Run an interval every 250 milliseconds instead of stuffing everything into - // the mousemove/touchmove function itself, to prevent performance degradation. - // `this.reportUserActivity` simply sets this.userActivity_ to true, which - // then gets picked up by this loop - // http://ejohn.org/blog/learning-from-twitter/ - var inactivityTimeout = undefined; - var activityCheck = this.setInterval(function () { - // Check to see if mouse/touch activity has happened - if (this.userActivity_) { - // Reset the activity tracker - this.userActivity_ = false; - - // If the user state was inactive, set the state to active - this.userActive(true); - - // Clear any existing inactivity timeout to start the timer over - this.clearTimeout(inactivityTimeout); - - var timeout = this.options_['inactivityTimeout']; - if (timeout > 0) { - // In milliseconds, if no more activity has occurred the - // user will be considered inactive - inactivityTimeout = this.setTimeout(function () { - // Protect against the case where the inactivityTimeout can trigger just - // before the next user activity is picked up by the activityCheck loop - // causing a flicker - if (!this.userActivity_) { - this.userActive(false); - } - }, timeout); - } - } - }, 250); - }; - - /** - * Gets or sets the current playback rate. A playback rate of - * 1.0 represents normal speed and 0.5 would indicate half-speed - * playback, for instance. - * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate - * - * @param {Number} rate New playback rate to set. - * @return {Number} Returns the new playback rate when setting - * @return {Number} Returns the current playback rate when getting - * @method playbackRate - */ - - Player.prototype.playbackRate = function playbackRate(rate) { - if (rate !== undefined) { - this.techCall_('setPlaybackRate', rate); - return this; - } - - if (this.tech_ && this.tech_['featuresPlaybackRate']) { - return this.techGet_('playbackRate'); - } else { - return 1.0; - } - }; - - /** - * Gets or sets the audio flag - * - * @param {Boolean} bool True signals that this is an audio player. - * @return {Boolean} Returns true if player is audio, false if not when getting - * @return {Player} Returns the player if setting - * @private - * @method isAudio - */ - - Player.prototype.isAudio = function isAudio(bool) { - if (bool !== undefined) { - this.isAudio_ = !!bool; - return this; - } - - return !!this.isAudio_; - }; - - /** - * Returns the current state of network activity for the element, from - * the codes in the list below. - * - NETWORK_EMPTY (numeric value 0) - * The element has not yet been initialised. All attributes are in - * their initial states. - * - NETWORK_IDLE (numeric value 1) - * The element's resource selection algorithm is active and has - * selected a resource, but it is not actually using the network at - * this time. - * - NETWORK_LOADING (numeric value 2) - * The user agent is actively trying to download data. - * - NETWORK_NO_SOURCE (numeric value 3) - * The element's resource selection algorithm is active, but it has - * not yet found a resource to use. - * - * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states - * @return {Number} the current network activity state - * @method networkState - */ - - Player.prototype.networkState = function networkState() { - return this.techGet_('networkState'); - }; - - /** - * Returns a value that expresses the current state of the element - * with respect to rendering the current playback position, from the - * codes in the list below. - * - HAVE_NOTHING (numeric value 0) - * No information regarding the media resource is available. - * - HAVE_METADATA (numeric value 1) - * Enough of the resource has been obtained that the duration of the - * resource is available. - * - HAVE_CURRENT_DATA (numeric value 2) - * Data for the immediate current playback position is available. - * - HAVE_FUTURE_DATA (numeric value 3) - * Data for the immediate current playback position is available, as - * well as enough data for the user agent to advance the current - * playback position in the direction of playback. - * - HAVE_ENOUGH_DATA (numeric value 4) - * The user agent estimates that enough data is available for - * playback to proceed uninterrupted. - * - * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate - * @return {Number} the current playback rendering state - * @method readyState - */ - - Player.prototype.readyState = function readyState() { - return this.techGet_('readyState'); - }; - - /** - * Text tracks are tracks of timed text events. - * Captions - text displayed over the video for the hearing impaired - * Subtitles - text displayed over the video for those who don't understand language in the video - * Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video - * Descriptions - audio descriptions that are read back to the user by a screen reading device - */ - - /** - * Get an array of associated text tracks. captions, subtitles, chapters, descriptions - * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks - * - * @return {Array} Array of track objects - * @method textTracks - */ - - Player.prototype.textTracks = function textTracks() { - // cannot use techGet_ directly because it checks to see whether the tech is ready. - // Flash is unlikely to be ready in time but textTracks should still work. - return this.tech_ && this.tech_['textTracks'](); - }; - - /** - * Get an array of remote text tracks - * - * @return {Array} - * @method remoteTextTracks - */ - - Player.prototype.remoteTextTracks = function remoteTextTracks() { - return this.tech_ && this.tech_['remoteTextTracks'](); - }; - - /** - * Get an array of remote html track elements - * - * @return {HTMLTrackElement[]} - * @method remoteTextTrackEls - */ - - Player.prototype.remoteTextTrackEls = function remoteTextTrackEls() { - return this.tech_ && this.tech_['remoteTextTrackEls'](); - }; - - /** - * Add a text track - * In addition to the W3C settings we allow adding additional info through options. - * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack - * - * @param {String} kind Captions, subtitles, chapters, descriptions, or metadata - * @param {String=} label Optional label - * @param {String=} language Optional language - * @method addTextTrack - */ - - Player.prototype.addTextTrack = function addTextTrack(kind, label, language) { - return this.tech_ && this.tech_['addTextTrack'](kind, label, language); - }; - - /** - * Add a remote text track - * - * @param {Object} options Options for remote text track - * @method addRemoteTextTrack - */ - - Player.prototype.addRemoteTextTrack = function addRemoteTextTrack(options) { - return this.tech_ && this.tech_['addRemoteTextTrack'](options); - }; - - /** - * Remove a remote text track - * - * @param {Object} track Remote text track to remove - * @method removeRemoteTextTrack - */ - - Player.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) { - this.tech_ && this.tech_['removeRemoteTextTrack'](track); - }; - - /** - * Get video width - * - * @return {Number} Video width - * @method videoWidth - */ - - Player.prototype.videoWidth = function videoWidth() { - return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0; - }; - - /** - * Get video height - * - * @return {Number} Video height - * @method videoHeight - */ - - Player.prototype.videoHeight = function videoHeight() { - return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0; - }; - - // Methods to add support for - // initialTime: function(){ return this.techCall_('initialTime'); }, - // startOffsetTime: function(){ return this.techCall_('startOffsetTime'); }, - // played: function(){ return this.techCall_('played'); }, - // videoTracks: function(){ return this.techCall_('videoTracks'); }, - // audioTracks: function(){ return this.techCall_('audioTracks'); }, - // defaultPlaybackRate: function(){ return this.techCall_('defaultPlaybackRate'); }, - // defaultMuted: function(){ return this.techCall_('defaultMuted'); } - - /** - * The player's language code - * NOTE: The language should be set in the player options if you want the - * the controls to be built with a specific language. Changing the lanugage - * later will not update controls text. - * - * @param {String} code The locale string - * @return {String} The locale string when getting - * @return {Player} self when setting - * @method language - */ - - Player.prototype.language = function language(code) { - if (code === undefined) { - return this.language_; - } - - this.language_ = ('' + code).toLowerCase(); - return this; - }; - - /** - * Get the player's language dictionary - * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time - * Languages specified directly in the player options have precedence - * - * @return {Array} Array of languages - * @method languages - */ - - Player.prototype.languages = function languages() { - return _utilsMergeOptionsJs2['default'](Player.prototype.options_.languages, this.languages_); - }; - - /** - * Converts track info to JSON - * - * @return {Object} JSON object of options - * @method toJSON - */ - - Player.prototype.toJSON = function toJSON() { - var options = _utilsMergeOptionsJs2['default'](this.options_); - var tracks = options.tracks; - - options.tracks = []; - - for (var i = 0; i < tracks.length; i++) { - var track = tracks[i]; - - // deep merge tracks and null out player so no circular references - track = _utilsMergeOptionsJs2['default'](track); - track.player = undefined; - options.tracks[i] = track; - } - - return options; - }; - - /** - * Creates a simple modal dialog (an instance of the `ModalDialog` - * component) that immediately overlays the player with arbitrary - * content and removes itself when closed. - * - * @param {String|Function|Element|Array|Null} content - * Same as `ModalDialog#content`'s param of the same name. - * - * The most straight-forward usage is to provide a string or DOM - * element. - * - * @param {Object} [options] - * Extra options which will be passed on to the `ModalDialog`. - * - * @return {ModalDialog} - */ - - Player.prototype.createModal = function createModal(content, options) { - var player = this; - - options = options || {}; - options.content = content || ''; - - var modal = new _modalDialog2['default'](player, options); - - player.addChild(modal); - modal.on('dispose', function () { - player.removeChild(modal); - }); - - return modal.open(); - }; - - /** - * Gets tag settings - * - * @param {Element} tag The player tag - * @return {Array} An array of sources and track objects - * @static - * @method getTagSettings - */ - - Player.getTagSettings = function getTagSettings(tag) { - var baseOptions = { - 'sources': [], - 'tracks': [] - }; - - var tagOptions = Dom.getElAttributes(tag); - var dataSetup = tagOptions['data-setup']; - - // Check if data-setup attr exists. - if (dataSetup !== null) { - // Parse options JSON - - var _safeParseTuple = _safeJsonParseTuple2['default'](dataSetup || '{}'); - - var err = _safeParseTuple[0]; - var data = _safeParseTuple[1]; - - if (err) { - _utilsLogJs2['default'].error(err); - } - _objectAssign2['default'](tagOptions, data); - } - - _objectAssign2['default'](baseOptions, tagOptions); - - // Get tag children settings - if (tag.hasChildNodes()) { - var children = tag.childNodes; - - for (var i = 0, j = children.length; i < j; i++) { - var child = children[i]; - // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/ - var childName = child.nodeName.toLowerCase(); - if (childName === 'source') { - baseOptions.sources.push(Dom.getElAttributes(child)); - } else if (childName === 'track') { - baseOptions.tracks.push(Dom.getElAttributes(child)); - } - } - } - - return baseOptions; - }; - - return Player; -})(_componentJs2['default']); - -Player.players = {}; - -var navigator = _globalWindow2['default'].navigator; -/* - * Player instance options, surfaced using options - * options = Player.prototype.options_ - * Make changes in options, not here. - * - * @type {Object} - * @private - */ -Player.prototype.options_ = { - // Default order of fallback technology - techOrder: ['html5', 'flash'], - // techOrder: ['flash','html5'], - - html5: {}, - flash: {}, - - // defaultVolume: 0.85, - defaultVolume: 0.00, // The freakin seaguls are driving me crazy! - - // default inactivity timeout - inactivityTimeout: 2000, - - // default playback rates - playbackRates: [], - // Add playback rate selection by adding rates - // 'playbackRates': [0.5, 1, 1.5, 2], - - // Included control sets - children: ['mediaLoader', 'posterImage', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'controlBar', 'errorDisplay', 'textTrackSettings'], - - language: _globalDocument2['default'].getElementsByTagName('html')[0].getAttribute('lang') || navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language || 'en', - - // locales and their language translations - languages: {}, - - // Default message to show when a video cannot be played. - notSupportedMessage: 'No compatible source was found for this media.' -}; - -/** - * Fired when the player has initial duration and dimension information - * - * @event loadedmetadata - */ -Player.prototype.handleLoadedMetaData_; - -/** - * Fired when the player has downloaded data at the current playback position - * - * @event loadeddata - */ -Player.prototype.handleLoadedData_; - -/** - * Fired when the user is active, e.g. moves the mouse over the player - * - * @event useractive - */ -Player.prototype.handleUserActive_; - -/** - * Fired when the user is inactive, e.g. a short delay after the last mouse move or control interaction - * - * @event userinactive - */ -Player.prototype.handleUserInactive_; - -/** - * Fired when the current playback position has changed * - * During playback this is fired every 15-250 milliseconds, depending on the - * playback technology in use. - * - * @event timeupdate - */ -Player.prototype.handleTimeUpdate_; - -/** - * Fired when video playback ends - * - * @event ended - */ -Player.prototype.handleTechEnded_; - -/** - * Fired when the volume changes - * - * @event volumechange - */ -Player.prototype.handleVolumeChange_; - -/** - * Fired when an error occurs - * - * @event error - */ -Player.prototype.handleError_; - -Player.prototype.flexNotSupported_ = function () { - var elem = _globalDocument2['default'].createElement('i'); - - // Note: We don't actually use flexBasis (or flexOrder), but it's one of the more - // common flex features that we can rely on when checking for flex support. - return !('flexBasis' in elem.style || 'webkitFlexBasis' in elem.style || 'mozFlexBasis' in elem.style || 'msFlexBasis' in elem.style || 'msFlexOrder' in elem.style) /* IE10-specific (2012 flex spec) */; -}; - -_componentJs2['default'].registerComponent('Player', Player); -exports['default'] = Player; -module.exports = exports['default']; -// If empty string, make it a parsable json object. - -},{"./big-play-button.js":63,"./component.js":67,"./control-bar/control-bar.js":68,"./error-display.js":100,"./fullscreen-api.js":103,"./loading-spinner.js":104,"./media-error.js":105,"./modal-dialog":109,"./poster-image.js":114,"./tech/html5.js":119,"./tech/loader.js":120,"./tech/tech.js":121,"./tracks/text-track-display.js":125,"./tracks/text-track-list-converter.js":127,"./tracks/text-track-settings.js":129,"./utils/browser.js":131,"./utils/buffer.js":132,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/guid.js":138,"./utils/log.js":139,"./utils/merge-options.js":140,"./utils/stylesheet.js":141,"./utils/time-ranges.js":142,"./utils/to-title-case.js":143,"global/document":1,"global/window":2,"object.assign":45,"safe-json-parse/tuple":54}],111:[function(_dereq_,module,exports){ -/** - * @file plugins.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _playerJs = _dereq_('./player.js'); - -var _playerJs2 = _interopRequireDefault(_playerJs); - -/** - * The method for registering a video.js plugin - * - * @param {String} name The name of the plugin - * @param {Function} init The function that is run when the player inits - * @method plugin - */ -var plugin = function plugin(name, init) { - _playerJs2['default'].prototype[name] = init; -}; - -exports['default'] = plugin; -module.exports = exports['default']; - -},{"./player.js":110}],112:[function(_dereq_,module,exports){ -/** - * @file popup-button.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _clickableComponentJs = _dereq_('../clickable-component.js'); - -var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _popupJs = _dereq_('./popup.js'); - -var _popupJs2 = _interopRequireDefault(_popupJs); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsToTitleCaseJs = _dereq_('../utils/to-title-case.js'); - -var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); - -/** - * A button class with a popup control - * - * @param {Player|Object} player - * @param {Object=} options - * @extends ClickableComponent - * @class PopupButton - */ - -var PopupButton = (function (_ClickableComponent) { - _inherits(PopupButton, _ClickableComponent); - - function PopupButton(player) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - _classCallCheck(this, PopupButton); - - _ClickableComponent.call(this, player, options); - - this.update(); - } - - /** - * Update popup - * - * @method update - */ - - PopupButton.prototype.update = function update() { - var popup = this.createPopup(); - - if (this.popup) { - this.removeChild(this.popup); - } - - this.popup = popup; - this.addChild(popup); - - if (this.items && this.items.length === 0) { - this.hide(); - } else if (this.items && this.items.length > 1) { - this.show(); - } - }; - - /** - * Create popup - Override with specific functionality for component - * - * @return {Popup} The constructed popup - * @method createPopup - */ - - PopupButton.prototype.createPopup = function createPopup() {}; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - PopupButton.prototype.createEl = function createEl() { - return _ClickableComponent.prototype.createEl.call(this, 'div', { - className: this.buildCSSClass() - }); - }; - - /** - * Allow sub components to stack CSS class names - * - * @return {String} The constructed class name - * @method buildCSSClass - */ - - PopupButton.prototype.buildCSSClass = function buildCSSClass() { - var menuButtonClass = 'vjs-menu-button'; - - // If the inline option is passed, we want to use different styles altogether. - if (this.options_.inline === true) { - menuButtonClass += '-inline'; - } else { - menuButtonClass += '-popup'; - } - - return 'vjs-menu-button ' + menuButtonClass + ' ' + _ClickableComponent.prototype.buildCSSClass.call(this); - }; - - return PopupButton; -})(_clickableComponentJs2['default']); - -_componentJs2['default'].registerComponent('PopupButton', PopupButton); -exports['default'] = PopupButton; -module.exports = exports['default']; - -},{"../clickable-component.js":65,"../component.js":67,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/to-title-case.js":143,"./popup.js":113}],113:[function(_dereq_,module,exports){ -/** - * @file popup.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsEventsJs = _dereq_('../utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -/** - * The Popup component is used to build pop up controls. - * - * @extends Component - * @class Popup - */ - -var Popup = (function (_Component) { - _inherits(Popup, _Component); - - function Popup() { - _classCallCheck(this, Popup); - - _Component.apply(this, arguments); - } - - /** - * Add a popup item to the popup - * - * @param {Object|String} component Component or component type to add - * @method addItem - */ - - Popup.prototype.addItem = function addItem(component) { - this.addChild(component); - component.on('click', Fn.bind(this, function () { - this.unlockShowing(); - })); - }; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - Popup.prototype.createEl = function createEl() { - var contentElType = this.options_.contentElType || 'ul'; - this.contentEl_ = Dom.createEl(contentElType, { - className: 'vjs-menu-content' - }); - var el = _Component.prototype.createEl.call(this, 'div', { - append: this.contentEl_, - className: 'vjs-menu' - }); - el.appendChild(this.contentEl_); - - // Prevent clicks from bubbling up. Needed for Popup Buttons, - // where a click on the parent is significant - Events.on(el, 'click', function (event) { - event.preventDefault(); - event.stopImmediatePropagation(); - }); - - return el; - }; - - return Popup; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('Popup', Popup); -exports['default'] = Popup; -module.exports = exports['default']; - -},{"../component.js":67,"../utils/dom.js":134,"../utils/events.js":135,"../utils/fn.js":136}],114:[function(_dereq_,module,exports){ -/** - * @file poster-image.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _clickableComponentJs = _dereq_('./clickable-component.js'); - -var _clickableComponentJs2 = _interopRequireDefault(_clickableComponentJs); - -var _componentJs = _dereq_('./component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsFnJs = _dereq_('./utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsDomJs = _dereq_('./utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsBrowserJs = _dereq_('./utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -/** - * The component that handles showing the poster image. - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Button - * @class PosterImage - */ - -var PosterImage = (function (_ClickableComponent) { - _inherits(PosterImage, _ClickableComponent); - - function PosterImage(player, options) { - _classCallCheck(this, PosterImage); - - _ClickableComponent.call(this, player, options); - - this.update(); - player.on('posterchange', Fn.bind(this, this.update)); - } - - /** - * Clean up the poster image - * - * @method dispose - */ - - PosterImage.prototype.dispose = function dispose() { - this.player().off('posterchange', this.update); - _ClickableComponent.prototype.dispose.call(this); - }; - - /** - * Create the poster's image element - * - * @return {Element} - * @method createEl - */ - - PosterImage.prototype.createEl = function createEl() { - var el = Dom.createEl('div', { - className: 'vjs-poster', - - // Don't want poster to be tabbable. - tabIndex: -1 - }); - - // To ensure the poster image resizes while maintaining its original aspect - // ratio, use a div with `background-size` when available. For browsers that - // do not support `background-size` (e.g. IE8), fall back on using a regular - // img element. - if (!browser.BACKGROUND_SIZE_SUPPORTED) { - this.fallbackImg_ = Dom.createEl('img'); - el.appendChild(this.fallbackImg_); - } - - return el; - }; - - /** - * Event handler for updates to the player's poster source - * - * @method update - */ - - PosterImage.prototype.update = function update() { - var url = this.player().poster(); - - this.setSrc(url); - - // If there's no poster source we should display:none on this component - // so it's not still clickable or right-clickable - if (url) { - this.show(); - } else { - this.hide(); - } - }; - - /** - * Set the poster source depending on the display method - * - * @param {String} url The URL to the poster source - * @method setSrc - */ - - PosterImage.prototype.setSrc = function setSrc(url) { - if (this.fallbackImg_) { - this.fallbackImg_.src = url; - } else { - var backgroundImage = ''; - // Any falsey values should stay as an empty string, otherwise - // this will throw an extra error - if (url) { - backgroundImage = 'url("' + url + '")'; - } - - this.el_.style.backgroundImage = backgroundImage; - } - }; - - /** - * Event handler for clicks on the poster image - * - * @method handleClick - */ - - PosterImage.prototype.handleClick = function handleClick() { - // We don't want a click to trigger playback when controls are disabled - // but CSS should be hiding the poster to prevent that from happening - if (this.player_.paused()) { - this.player_.play(); - } else { - this.player_.pause(); - } - }; - - return PosterImage; -})(_clickableComponentJs2['default']); - -_componentJs2['default'].registerComponent('PosterImage', PosterImage); -exports['default'] = PosterImage; -module.exports = exports['default']; - -},{"./clickable-component.js":65,"./component.js":67,"./utils/browser.js":131,"./utils/dom.js":134,"./utils/fn.js":136}],115:[function(_dereq_,module,exports){ -/** - * @file setup.js - * - * Functions for automatically setting up a player - * based on the data-setup attribute of the video tag - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -var _utilsEventsJs = _dereq_('./utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _windowLoaded = false; -var videojs = undefined; - -// Automatically set up any tags that have a data-setup attribute -var autoSetup = function autoSetup() { - // One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack* - // var vids = Array.prototype.slice.call(document.getElementsByTagName('video')); - // var audios = Array.prototype.slice.call(document.getElementsByTagName('audio')); - // var mediaEls = vids.concat(audios); - - // Because IE8 doesn't support calling slice on a node list, we need to loop through each list of elements - // to build up a new, combined list of elements. - var vids = _globalDocument2['default'].getElementsByTagName('video'); - var audios = _globalDocument2['default'].getElementsByTagName('audio'); - var mediaEls = []; - if (vids && vids.length > 0) { - for (var i = 0, e = vids.length; i < e; i++) { - mediaEls.push(vids[i]); - } - } - if (audios && audios.length > 0) { - for (var i = 0, e = audios.length; i < e; i++) { - mediaEls.push(audios[i]); - } - } - - // Check if any media elements exist - if (mediaEls && mediaEls.length > 0) { - - for (var i = 0, e = mediaEls.length; i < e; i++) { - var mediaEl = mediaEls[i]; - - // Check if element exists, has getAttribute func. - // IE seems to consider typeof el.getAttribute == 'object' instead of 'function' like expected, at least when loading the player immediately. - if (mediaEl && mediaEl.getAttribute) { - - // Make sure this player hasn't already been set up. - if (mediaEl['player'] === undefined) { - var options = mediaEl.getAttribute('data-setup'); - - // Check if data-setup attr exists. - // We only auto-setup if they've added the data-setup attr. - if (options !== null) { - // Create new video.js instance. - var player = videojs(mediaEl); - } - } - - // If getAttribute isn't defined, we need to wait for the DOM. - } else { - autoSetupTimeout(1); - break; - } - } - - // No videos were found, so keep looping unless page is finished loading. - } else if (!_windowLoaded) { - autoSetupTimeout(1); - } -}; - -// Pause to let the DOM keep processing -var autoSetupTimeout = function autoSetupTimeout(wait, vjs) { - if (vjs) { - videojs = vjs; - } - - setTimeout(autoSetup, wait); -}; - -if (_globalDocument2['default'].readyState === 'complete') { - _windowLoaded = true; -} else { - Events.one(_globalWindow2['default'], 'load', function () { - _windowLoaded = true; - }); -} - -var hasLoaded = function hasLoaded() { - return _windowLoaded; -}; - -exports.autoSetup = autoSetup; -exports.autoSetupTimeout = autoSetupTimeout; -exports.hasLoaded = hasLoaded; - -},{"./utils/events.js":135,"global/document":1,"global/window":2}],116:[function(_dereq_,module,exports){ -/** - * @file slider.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -/** - * The base functionality for sliders like the volume bar and seek bar - * - * @param {Player|Object} player - * @param {Object=} options - * @extends Component - * @class Slider - */ - -var Slider = (function (_Component) { - _inherits(Slider, _Component); - - function Slider(player, options) { - _classCallCheck(this, Slider); - - _Component.call(this, player, options); - - // Set property names to bar to match with the child Slider class is looking for - this.bar = this.getChild(this.options_.barName); - - // Set a horizontal or vertical class on the slider depending on the slider type - this.vertical(!!this.options_.vertical); - - this.on('mousedown', this.handleMouseDown); - this.on('touchstart', this.handleMouseDown); - this.on('focus', this.handleFocus); - this.on('blur', this.handleBlur); - this.on('click', this.handleClick); - - this.on(player, 'controlsvisible', this.update); - this.on(player, this.playerEvent, this.update); - } - - /** - * Create the component's DOM element - * - * @param {String} type Type of element to create - * @param {Object=} props List of properties in Object form - * @return {Element} - * @method createEl - */ - - Slider.prototype.createEl = function createEl(type) { - var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var attributes = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - - // Add the slider element class to all sub classes - props.className = props.className + ' vjs-slider'; - props = _objectAssign2['default']({ - tabIndex: 0 - }, props); - - attributes = _objectAssign2['default']({ - 'role': 'slider', - 'aria-valuenow': 0, - 'aria-valuemin': 0, - 'aria-valuemax': 100, - tabIndex: 0 - }, attributes); - - return _Component.prototype.createEl.call(this, type, props, attributes); - }; - - /** - * Handle mouse down on slider - * - * @param {Object} event Mouse down event object - * @method handleMouseDown - */ - - Slider.prototype.handleMouseDown = function handleMouseDown(event) { - var doc = this.bar.el_.ownerDocument; - - event.preventDefault(); - Dom.blockTextSelection(); - - this.addClass('vjs-sliding'); - this.trigger('slideractive'); - - this.on(doc, 'mousemove', this.handleMouseMove); - this.on(doc, 'mouseup', this.handleMouseUp); - this.on(doc, 'touchmove', this.handleMouseMove); - this.on(doc, 'touchend', this.handleMouseUp); - - this.handleMouseMove(event); - }; - - /** - * To be overridden by a subclass - * - * @method handleMouseMove - */ - - Slider.prototype.handleMouseMove = function handleMouseMove() {}; - - /** - * Handle mouse up on Slider - * - * @method handleMouseUp - */ - - Slider.prototype.handleMouseUp = function handleMouseUp() { - var doc = this.bar.el_.ownerDocument; - - Dom.unblockTextSelection(); - - this.removeClass('vjs-sliding'); - this.trigger('sliderinactive'); - - this.off(doc, 'mousemove', this.handleMouseMove); - this.off(doc, 'mouseup', this.handleMouseUp); - this.off(doc, 'touchmove', this.handleMouseMove); - this.off(doc, 'touchend', this.handleMouseUp); - - this.update(); - }; - - /** - * Update slider - * - * @method update - */ - - Slider.prototype.update = function update() { - // In VolumeBar init we have a setTimeout for update that pops and update to the end of the - // execution stack. The player is destroyed before then update will cause an error - if (!this.el_) return; - - // If scrubbing, we could use a cached value to make the handle keep up with the user's mouse. - // On HTML5 browsers scrubbing is really smooth, but some flash players are slow, so we might want to utilize this later. - // var progress = (this.player_.scrubbing()) ? this.player_.getCache().currentTime / this.player_.duration() : this.player_.currentTime() / this.player_.duration(); - var progress = this.getPercent(); - var bar = this.bar; - - // If there's no bar... - if (!bar) return; - - // Protect against no duration and other division issues - if (typeof progress !== 'number' || progress !== progress || progress < 0 || progress === Infinity) { - progress = 0; - } - - // Convert to a percentage for setting - var percentage = (progress * 100).toFixed(2) + '%'; - - // Set the new bar width or height - if (this.vertical()) { - bar.el().style.height = percentage; - } else { - bar.el().style.width = percentage; - } - }; - - /** - * Calculate distance for slider - * - * @param {Object} event Event object - * @method calculateDistance - */ - - Slider.prototype.calculateDistance = function calculateDistance(event) { - var position = Dom.getPointerPosition(this.el_, event); - if (this.vertical()) { - return position.y; - } - return position.x; - }; - - /** - * Handle on focus for slider - * - * @method handleFocus - */ - - Slider.prototype.handleFocus = function handleFocus() { - this.on(this.bar.el_.ownerDocument, 'keydown', this.handleKeyPress); - }; - - /** - * Handle key press for slider - * - * @param {Object} event Event object - * @method handleKeyPress - */ - - Slider.prototype.handleKeyPress = function handleKeyPress(event) { - if (event.which === 37 || event.which === 40) { - // Left and Down Arrows - event.preventDefault(); - this.stepBack(); - } else if (event.which === 38 || event.which === 39) { - // Up and Right Arrows - event.preventDefault(); - this.stepForward(); - } - }; - - /** - * Handle on blur for slider - * - * @method handleBlur - */ - - Slider.prototype.handleBlur = function handleBlur() { - this.off(this.bar.el_.ownerDocument, 'keydown', this.handleKeyPress); - }; - - /** - * Listener for click events on slider, used to prevent clicks - * from bubbling up to parent elements like button menus. - * - * @param {Object} event Event object - * @method handleClick - */ - - Slider.prototype.handleClick = function handleClick(event) { - event.stopImmediatePropagation(); - event.preventDefault(); - }; - - /** - * Get/set if slider is horizontal for vertical - * - * @param {Boolean} bool True if slider is vertical, false is horizontal - * @return {Boolean} True if slider is vertical, false is horizontal - * @method vertical - */ - - Slider.prototype.vertical = function vertical(bool) { - if (bool === undefined) { - return this.vertical_ || false; - } - - this.vertical_ = !!bool; - - if (this.vertical_) { - this.addClass('vjs-slider-vertical'); - } else { - this.addClass('vjs-slider-horizontal'); - } - - return this; - }; - - return Slider; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('Slider', Slider); -exports['default'] = Slider; -module.exports = exports['default']; - -},{"../component.js":67,"../utils/dom.js":134,"object.assign":45}],117:[function(_dereq_,module,exports){ -/** - * @file flash-rtmp.js - */ -'use strict'; - -exports.__esModule = true; -function FlashRtmpDecorator(Flash) { - Flash.streamingFormats = { - 'rtmp/mp4': 'MP4', - 'rtmp/flv': 'FLV' - }; - - Flash.streamFromParts = function (connection, stream) { - return connection + '&' + stream; - }; - - Flash.streamToParts = function (src) { - var parts = { - connection: '', - stream: '' - }; - - if (!src) return parts; - - // Look for the normal URL separator we expect, '&'. - // If found, we split the URL into two pieces around the - // first '&'. - var connEnd = src.search(/&(?!\w+=)/); - var streamBegin = undefined; - if (connEnd !== -1) { - streamBegin = connEnd + 1; - } else { - // If there's not a '&', we use the last '/' as the delimiter. - connEnd = streamBegin = src.lastIndexOf('/') + 1; - if (connEnd === 0) { - // really, there's not a '/'? - connEnd = streamBegin = src.length; - } - } - parts.connection = src.substring(0, connEnd); - parts.stream = src.substring(streamBegin, src.length); - - return parts; - }; - - Flash.isStreamingType = function (srcType) { - return srcType in Flash.streamingFormats; - }; - - // RTMP has four variations, any string starting - // with one of these protocols should be valid - Flash.RTMP_RE = /^rtmp[set]?:\/\//i; - - Flash.isStreamingSrc = function (src) { - return Flash.RTMP_RE.test(src); - }; - - /** - * A source handler for RTMP urls - * @type {Object} - */ - Flash.rtmpSourceHandler = {}; - - /** - * Check if Flash can play the given videotype - * @param {String} type The mimetype to check - * @return {String} 'probably', 'maybe', or '' (empty string) - */ - Flash.rtmpSourceHandler.canPlayType = function (type) { - if (Flash.isStreamingType(type)) { - return 'maybe'; - } - - return ''; - }; - - /** - * Check if Flash can handle the source natively - * @param {Object} source The source object - * @return {String} 'probably', 'maybe', or '' (empty string) - */ - Flash.rtmpSourceHandler.canHandleSource = function (source) { - var can = Flash.rtmpSourceHandler.canPlayType(source.type); - - if (can) { - return can; - } - - if (Flash.isStreamingSrc(source.src)) { - return 'maybe'; - } - - return ''; - }; - - /** - * Pass the source to the flash object - * Adaptive source handlers will have more complicated workflows before passing - * video data to the video element - * @param {Object} source The source object - * @param {Flash} tech The instance of the Flash tech - */ - Flash.rtmpSourceHandler.handleSource = function (source, tech) { - var srcParts = Flash.streamToParts(source.src); - - tech['setRtmpConnection'](srcParts.connection); - tech['setRtmpStream'](srcParts.stream); - }; - - // Register the native source handler - Flash.registerSourceHandler(Flash.rtmpSourceHandler); - - return Flash; -} - -exports['default'] = FlashRtmpDecorator; -module.exports = exports['default']; - -},{}],118:[function(_dereq_,module,exports){ -/** - * @file flash.js - * VideoJS-SWF - Custom Flash Player with HTML5-ish API - * https://github.com/zencoder/video-js-swf - * Not using setupTriggers. Using global onEvent func to distribute events - */ - -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _tech = _dereq_('./tech'); - -var _tech2 = _interopRequireDefault(_tech); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsUrlJs = _dereq_('../utils/url.js'); - -var Url = _interopRequireWildcard(_utilsUrlJs); - -var _utilsTimeRangesJs = _dereq_('../utils/time-ranges.js'); - -var _flashRtmp = _dereq_('./flash-rtmp'); - -var _flashRtmp2 = _interopRequireDefault(_flashRtmp); - -var _component = _dereq_('../component'); - -var _component2 = _interopRequireDefault(_component); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -var navigator = _globalWindow2['default'].navigator; -/** - * Flash Media Controller - Wrapper for fallback SWF API - * - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends Tech - * @class Flash - */ - -var Flash = (function (_Tech) { - _inherits(Flash, _Tech); - - function Flash(options, ready) { - _classCallCheck(this, Flash); - - _Tech.call(this, options, ready); - - // Set the source when ready - if (options.source) { - this.ready(function () { - this.setSource(options.source); - }, true); - } - - // Having issues with Flash reloading on certain page actions (hide/resize/fullscreen) in certain browsers - // This allows resetting the playhead when we catch the reload - if (options.startTime) { - this.ready(function () { - this.load(); - this.play(); - this.currentTime(options.startTime); - }, true); - } - - // Add global window functions that the swf expects - // A 4.x workflow we weren't able to solve for in 5.0 - // because of the need to hard code these functions - // into the swf for security reasons - _globalWindow2['default'].videojs = _globalWindow2['default'].videojs || {}; - _globalWindow2['default'].videojs.Flash = _globalWindow2['default'].videojs.Flash || {}; - _globalWindow2['default'].videojs.Flash.onReady = Flash.onReady; - _globalWindow2['default'].videojs.Flash.onEvent = Flash.onEvent; - _globalWindow2['default'].videojs.Flash.onError = Flash.onError; - - this.on('seeked', function () { - this.lastSeekTarget_ = undefined; - }); - } - - // Create setters and getters for attributes - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - Flash.prototype.createEl = function createEl() { - var options = this.options_; - - // If video.js is hosted locally you should also set the location - // for the hosted swf, which should be relative to the page (not video.js) - // Otherwise this adds a CDN url. - // The CDN also auto-adds a swf URL for that specific version. - if (!options.swf) { - options.swf = '//vjs.zencdn.net/swf/5.0.1/video-js.swf'; - } - - // Generate ID for swf object - var objId = options.techId; - - // Merge default flashvars with ones passed in to init - var flashVars = _objectAssign2['default']({ - - // SWF Callback Functions - 'readyFunction': 'videojs.Flash.onReady', - 'eventProxyFunction': 'videojs.Flash.onEvent', - 'errorEventProxyFunction': 'videojs.Flash.onError', - - // Player Settings - 'autoplay': options.autoplay, - 'preload': options.preload, - 'loop': options.loop, - 'muted': options.muted - - }, options.flashVars); - - // Merge default parames with ones passed in - var params = _objectAssign2['default']({ - 'wmode': 'opaque', // Opaque is needed to overlay controls, but can affect playback performance - 'bgcolor': '#000000' // Using bgcolor prevents a white flash when the object is loading - }, options.params); - - // Merge default attributes with ones passed in - var attributes = _objectAssign2['default']({ - 'id': objId, - 'name': objId, // Both ID and Name needed or swf to identify itself - 'class': 'vjs-tech' - }, options.attributes); - - this.el_ = Flash.embed(options.swf, flashVars, params, attributes); - this.el_.tech = this; - - return this.el_; - }; - - /** - * Play for flash tech - * - * @method play - */ - - Flash.prototype.play = function play() { - if (this.ended()) { - this.setCurrentTime(0); - } - this.el_.vjs_play(); - }; - - /** - * Pause for flash tech - * - * @method pause - */ - - Flash.prototype.pause = function pause() { - this.el_.vjs_pause(); - }; - - /** - * Get/set video - * - * @param {Object=} src Source object - * @return {Object} - * @method src - */ - - Flash.prototype.src = function src(_src) { - if (_src === undefined) { - return this.currentSrc(); - } - - // Setting src through `src` not `setSrc` will be deprecated - return this.setSrc(_src); - }; - - /** - * Set video - * - * @param {Object=} src Source object - * @deprecated - * @method setSrc - */ - - Flash.prototype.setSrc = function setSrc(src) { - // Make sure source URL is absolute. - src = Url.getAbsoluteURL(src); - this.el_.vjs_src(src); - - // Currently the SWF doesn't autoplay if you load a source later. - // e.g. Load player w/ no source, wait 2s, set src. - if (this.autoplay()) { - var tech = this; - this.setTimeout(function () { - tech.play(); - }, 0); - } - }; - - /** - * Returns true if the tech is currently seeking. - * @return {boolean} true if seeking - */ - - Flash.prototype.seeking = function seeking() { - return this.lastSeekTarget_ !== undefined; - }; - - /** - * Set current time - * - * @param {Number} time Current time of video - * @method setCurrentTime - */ - - Flash.prototype.setCurrentTime = function setCurrentTime(time) { - var seekable = this.seekable(); - if (seekable.length) { - // clamp to the current seekable range - time = time > seekable.start(0) ? time : seekable.start(0); - time = time < seekable.end(seekable.length - 1) ? time : seekable.end(seekable.length - 1); - - this.lastSeekTarget_ = time; - this.trigger('seeking'); - this.el_.vjs_setProperty('currentTime', time); - _Tech.prototype.setCurrentTime.call(this); - } - }; - - /** - * Get current time - * - * @param {Number=} time Current time of video - * @return {Number} Current time - * @method currentTime - */ - - Flash.prototype.currentTime = function currentTime(time) { - // when seeking make the reported time keep up with the requested time - // by reading the time we're seeking to - if (this.seeking()) { - return this.lastSeekTarget_ || 0; - } - return this.el_.vjs_getProperty('currentTime'); - }; - - /** - * Get current source - * - * @method currentSrc - */ - - Flash.prototype.currentSrc = function currentSrc() { - if (this.currentSource_) { - return this.currentSource_.src; - } else { - return this.el_.vjs_getProperty('currentSrc'); - } - }; - - /** - * Load media into player - * - * @method load - */ - - Flash.prototype.load = function load() { - this.el_.vjs_load(); - }; - - /** - * Get poster - * - * @method poster - */ - - Flash.prototype.poster = function poster() { - this.el_.vjs_getProperty('poster'); - }; - - /** - * Poster images are not handled by the Flash tech so make this a no-op - * - * @method setPoster - */ - - Flash.prototype.setPoster = function setPoster() {}; - - /** - * Determine if can seek in media - * - * @return {TimeRangeObject} - * @method seekable - */ - - Flash.prototype.seekable = function seekable() { - var duration = this.duration(); - if (duration === 0) { - return _utilsTimeRangesJs.createTimeRange(); - } - return _utilsTimeRangesJs.createTimeRange(0, duration); - }; - - /** - * Get buffered time range - * - * @return {TimeRangeObject} - * @method buffered - */ - - Flash.prototype.buffered = function buffered() { - var ranges = this.el_.vjs_getProperty('buffered'); - if (ranges.length === 0) { - return _utilsTimeRangesJs.createTimeRange(); - } - return _utilsTimeRangesJs.createTimeRange(ranges[0][0], ranges[0][1]); - }; - - /** - * Get fullscreen support - - * Flash does not allow fullscreen through javascript - * so always returns false - * - * @return {Boolean} false - * @method supportsFullScreen - */ - - Flash.prototype.supportsFullScreen = function supportsFullScreen() { - return false; // Flash does not allow fullscreen through javascript - }; - - /** - * Request to enter fullscreen - * Flash does not allow fullscreen through javascript - * so always returns false - * - * @return {Boolean} false - * @method enterFullScreen - */ - - Flash.prototype.enterFullScreen = function enterFullScreen() { - return false; - }; - - return Flash; -})(_tech2['default']); - -var _api = Flash.prototype; -var _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(','); -var _readOnly = 'networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(','); - -function _createSetter(attr) { - var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1); - _api['set' + attrUpper] = function (val) { - return this.el_.vjs_setProperty(attr, val); - }; -} -function _createGetter(attr) { - _api[attr] = function () { - return this.el_.vjs_getProperty(attr); - }; -} - -// Create getter and setters for all read/write attributes -for (var i = 0; i < _readWrite.length; i++) { - _createGetter(_readWrite[i]); - _createSetter(_readWrite[i]); -} - -// Create getters for read-only attributes -for (var i = 0; i < _readOnly.length; i++) { - _createGetter(_readOnly[i]); -} - -/* Flash Support Testing -------------------------------------------------------- */ - -Flash.isSupported = function () { - return Flash.version()[0] >= 10; - // return swfobject.hasFlashPlayerVersion('10'); -}; - -// Add Source Handler pattern functions to this tech -_tech2['default'].withSourceHandlers(Flash); - -/* - * The default native source handler. - * This simply passes the source to the video element. Nothing fancy. - * - * @param {Object} source The source object - * @param {Flash} tech The instance of the Flash tech - */ -Flash.nativeSourceHandler = {}; - -/** - * Check if Flash can play the given videotype - * @param {String} type The mimetype to check - * @return {String} 'probably', 'maybe', or '' (empty string) - */ -Flash.nativeSourceHandler.canPlayType = function (type) { - if (type in Flash.formats) { - return 'maybe'; - } - - return ''; -}; - -/* - * Check Flash can handle the source natively - * - * @param {Object} source The source object - * @return {String} 'probably', 'maybe', or '' (empty string) - */ -Flash.nativeSourceHandler.canHandleSource = function (source) { - var type; - - function guessMimeType(src) { - var ext = Url.getFileExtension(src); - if (ext) { - return 'video/' + ext; - } - return ''; - } - - if (!source.type) { - type = guessMimeType(source.src); - } else { - // Strip code information from the type because we don't get that specific - type = source.type.replace(/;.*/, '').toLowerCase(); - } - - return Flash.nativeSourceHandler.canPlayType(type); -}; - -/* - * Pass the source to the flash object - * Adaptive source handlers will have more complicated workflows before passing - * video data to the video element - * - * @param {Object} source The source object - * @param {Flash} tech The instance of the Flash tech - */ -Flash.nativeSourceHandler.handleSource = function (source, tech) { - tech.setSrc(source.src); -}; - -/* - * Clean up the source handler when disposing the player or switching sources.. - * (no cleanup is needed when supporting the format natively) - */ -Flash.nativeSourceHandler.dispose = function () {}; - -// Register the native source handler -Flash.registerSourceHandler(Flash.nativeSourceHandler); - -Flash.formats = { - 'video/flv': 'FLV', - 'video/x-flv': 'FLV', - 'video/mp4': 'MP4', - 'video/m4v': 'MP4' -}; - -Flash.onReady = function (currSwf) { - var el = Dom.getEl(currSwf); - var tech = el && el.tech; - - // if there is no el then the tech has been disposed - // and the tech element was removed from the player div - if (tech && tech.el()) { - // check that the flash object is really ready - Flash.checkReady(tech); - } -}; - -// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object. -// If it's not ready, we set a timeout to check again shortly. -Flash.checkReady = function (tech) { - // stop worrying if the tech has been disposed - if (!tech.el()) { - return; - } - - // check if API property exists - if (tech.el().vjs_getProperty) { - // tell tech it's ready - tech.triggerReady(); - } else { - // wait longer - this.setTimeout(function () { - Flash['checkReady'](tech); - }, 50); - } -}; - -// Trigger events from the swf on the player -Flash.onEvent = function (swfID, eventName) { - var tech = Dom.getEl(swfID).tech; - tech.trigger(eventName); -}; - -// Log errors from the swf -Flash.onError = function (swfID, err) { - var tech = Dom.getEl(swfID).tech; - - // trigger MEDIA_ERR_SRC_NOT_SUPPORTED - if (err === 'srcnotfound') { - return tech.error(4); - } - - // trigger a custom error - tech.error('FLASH: ' + err); -}; - -// Flash Version Check -Flash.version = function () { - var version = '0,0,0'; - - // IE - try { - version = new _globalWindow2['default'].ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; - - // other browsers - } catch (e) { - try { - if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin) { - version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\D+/g, ',').match(/^,?(.+),?$/)[1]; - } - } catch (err) {} - } - return version.split(','); -}; - -// Flash embedding method. Only used in non-iframe mode -Flash.embed = function (swf, flashVars, params, attributes) { - var code = Flash.getEmbedCode(swf, flashVars, params, attributes); - - // Get element by embedding code and retrieving created element - var obj = Dom.createEl('div', { innerHTML: code }).childNodes[0]; - - return obj; -}; - -Flash.getEmbedCode = function (swf, flashVars, params, attributes) { - var objTag = ''; - }); - - attributes = _objectAssign2['default']({ - // Add swf to attributes (need both for IE and Others to work) - 'data': swf, - - // Default to 100% width/height - 'width': '100%', - 'height': '100%' - - }, attributes); - - // Create Attributes string - Object.getOwnPropertyNames(attributes).forEach(function (key) { - attrsString += key + '="' + attributes[key] + '" '; - }); - - return '' + objTag + attrsString + '>' + paramsString + ''; -}; - -// Run Flash through the RTMP decorator -_flashRtmp2['default'](Flash); - -_component2['default'].registerComponent('Flash', Flash); -_tech2['default'].registerTech('Flash', Flash); -exports['default'] = Flash; -module.exports = exports['default']; - -},{"../component":67,"../utils/dom.js":134,"../utils/time-ranges.js":142,"../utils/url.js":144,"./flash-rtmp":117,"./tech":121,"global/window":2,"object.assign":45}],119:[function(_dereq_,module,exports){ -/** - * @file html5.js - * HTML5 Media Controller - Wrapper for HTML5 Media API - */ - -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _techJs = _dereq_('./tech.js'); - -var _techJs2 = _interopRequireDefault(_techJs); - -var _component = _dereq_('../component'); - -var _component2 = _interopRequireDefault(_component); - -var _utilsDomJs = _dereq_('../utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsUrlJs = _dereq_('../utils/url.js'); - -var Url = _interopRequireWildcard(_utilsUrlJs); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsLogJs = _dereq_('../utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _utilsBrowserJs = _dereq_('../utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -var _utilsMergeOptionsJs = _dereq_('../utils/merge-options.js'); - -var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs); - -/** - * HTML5 Media Controller - Wrapper for HTML5 Media API - * - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends Tech - * @class Html5 - */ - -var Html5 = (function (_Tech) { - _inherits(Html5, _Tech); - - function Html5(options, ready) { - _classCallCheck(this, Html5); - - _Tech.call(this, options, ready); - - var source = options.source; - - // Set the source if one is provided - // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted) - // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source - // anyway so the error gets fired. - if (source && (this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) { - this.setSource(source); - } else { - this.handleLateInit_(this.el_); - } - - if (this.el_.hasChildNodes()) { - - var nodes = this.el_.childNodes; - var nodesLength = nodes.length; - var removeNodes = []; - - while (nodesLength--) { - var node = nodes[nodesLength]; - var nodeName = node.nodeName.toLowerCase(); - - if (nodeName === 'track') { - if (!this.featuresNativeTextTracks) { - // Empty video tag tracks so the built-in player doesn't use them also. - // This may not be fast enough to stop HTML5 browsers from reading the tags - // so we'll need to turn off any default tracks if we're manually doing - // captions and subtitles. videoElement.textTracks - removeNodes.push(node); - } else { - // store HTMLTrackElement and TextTrack to remote list - this.remoteTextTrackEls().addTrackElement_(node); - this.remoteTextTracks().addTrack_(node.track); - } - } - } - - for (var i = 0; i < removeNodes.length; i++) { - this.el_.removeChild(removeNodes[i]); - } - } - - if (this.featuresNativeTextTracks) { - this.handleTextTrackChange_ = Fn.bind(this, this.handleTextTrackChange); - this.handleTextTrackAdd_ = Fn.bind(this, this.handleTextTrackAdd); - this.handleTextTrackRemove_ = Fn.bind(this, this.handleTextTrackRemove); - this.proxyNativeTextTracks_(); - } - - // Determine if native controls should be used - // Our goal should be to get the custom controls on mobile solid everywhere - // so we can remove this all together. Right now this will block custom - // controls on touch enabled laptops like the Chrome Pixel - if (browser.TOUCH_ENABLED && options.nativeControlsForTouch === true || browser.IS_IPHONE || browser.IS_NATIVE_ANDROID) { - this.setControls(true); - } - - this.triggerReady(); - } - - /* HTML5 Support Testing ---------------------------------------------------- */ - - /* - * Element for testing browser HTML5 video capabilities - * - * @type {Element} - * @constant - * @private - */ - - /** - * Dispose of html5 media element - * - * @method dispose - */ - - Html5.prototype.dispose = function dispose() { - var tt = this.el().textTracks; - var emulatedTt = this.textTracks(); - - // remove native event listeners - if (tt && tt.removeEventListener) { - tt.removeEventListener('change', this.handleTextTrackChange_); - tt.removeEventListener('addtrack', this.handleTextTrackAdd_); - tt.removeEventListener('removetrack', this.handleTextTrackRemove_); - } - - // clearout the emulated text track list. - var i = emulatedTt.length; - - while (i--) { - emulatedTt.removeTrack_(emulatedTt[i]); - } - - Html5.disposeMediaElement(this.el_); - _Tech.prototype.dispose.call(this); - }; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - Html5.prototype.createEl = function createEl() { - var el = this.options_.tag; - - // Check if this browser supports moving the element into the box. - // On the iPhone video will break if you move the element, - // So we have to create a brand new element. - if (!el || this['movingMediaElementInDOM'] === false) { - - // If the original tag is still there, clone and remove it. - if (el) { - var clone = el.cloneNode(true); - el.parentNode.insertBefore(clone, el); - Html5.disposeMediaElement(el); - el = clone; - } else { - el = _globalDocument2['default'].createElement('video'); - - // determine if native controls should be used - var tagAttributes = this.options_.tag && Dom.getElAttributes(this.options_.tag); - var attributes = _utilsMergeOptionsJs2['default']({}, tagAttributes); - if (!browser.TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) { - delete attributes.controls; - } - - Dom.setElAttributes(el, _objectAssign2['default'](attributes, { - id: this.options_.techId, - 'class': 'vjs-tech' - })); - } - } - - // Update specific tag settings, in case they were overridden - var settingsAttrs = ['autoplay', 'preload', 'loop', 'muted']; - for (var i = settingsAttrs.length - 1; i >= 0; i--) { - var attr = settingsAttrs[i]; - var overwriteAttrs = {}; - if (typeof this.options_[attr] !== 'undefined') { - overwriteAttrs[attr] = this.options_[attr]; - } - Dom.setElAttributes(el, overwriteAttrs); - } - - return el; - // jenniisawesome = true; - }; - - // If we're loading the playback object after it has started loading - // or playing the video (often with autoplay on) then the loadstart event - // has already fired and we need to fire it manually because many things - // rely on it. - - Html5.prototype.handleLateInit_ = function handleLateInit_(el) { - var _this = this; - - if (el.networkState === 0 || el.networkState === 3) { - // The video element hasn't started loading the source yet - // or didn't find a source - return; - } - - if (el.readyState === 0) { - var _ret = (function () { - // NetworkState is set synchronously BUT loadstart is fired at the - // end of the current stack, usually before setInterval(fn, 0). - // So at this point we know loadstart may have already fired or is - // about to fire, and either way the player hasn't seen it yet. - // We don't want to fire loadstart prematurely here and cause a - // double loadstart so we'll wait and see if it happens between now - // and the next loop, and fire it if not. - // HOWEVER, we also want to make sure it fires before loadedmetadata - // which could also happen between now and the next loop, so we'll - // watch for that also. - var loadstartFired = false; - var setLoadstartFired = function setLoadstartFired() { - loadstartFired = true; - }; - _this.on('loadstart', setLoadstartFired); - - var triggerLoadstart = function triggerLoadstart() { - // We did miss the original loadstart. Make sure the player - // sees loadstart before loadedmetadata - if (!loadstartFired) { - this.trigger('loadstart'); - } - }; - _this.on('loadedmetadata', triggerLoadstart); - - _this.ready(function () { - this.off('loadstart', setLoadstartFired); - this.off('loadedmetadata', triggerLoadstart); - - if (!loadstartFired) { - // We did miss the original native loadstart. Fire it now. - this.trigger('loadstart'); - } - }); - - return { - v: undefined - }; - })(); - - if (typeof _ret === 'object') return _ret.v; - } - - // From here on we know that loadstart already fired and we missed it. - // The other readyState events aren't as much of a problem if we double - // them, so not going to go to as much trouble as loadstart to prevent - // that unless we find reason to. - var eventsToTrigger = ['loadstart']; - - // loadedmetadata: newly equal to HAVE_METADATA (1) or greater - eventsToTrigger.push('loadedmetadata'); - - // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater - if (el.readyState >= 2) { - eventsToTrigger.push('loadeddata'); - } - - // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater - if (el.readyState >= 3) { - eventsToTrigger.push('canplay'); - } - - // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4) - if (el.readyState >= 4) { - eventsToTrigger.push('canplaythrough'); - } - - // We still need to give the player time to add event listeners - this.ready(function () { - eventsToTrigger.forEach(function (type) { - this.trigger(type); - }, this); - }); - }; - - Html5.prototype.proxyNativeTextTracks_ = function proxyNativeTextTracks_() { - var tt = this.el().textTracks; - - if (tt) { - // Add tracks - if player is initialised after DOM loaded, textTracks - // will not trigger addtrack - for (var i = 0; i < tt.length; i++) { - this.textTracks().addTrack_(tt[i]); - } - - if (tt.addEventListener) { - tt.addEventListener('change', this.handleTextTrackChange_); - tt.addEventListener('addtrack', this.handleTextTrackAdd_); - tt.addEventListener('removetrack', this.handleTextTrackRemove_); - } - } - }; - - Html5.prototype.handleTextTrackChange = function handleTextTrackChange(e) { - var tt = this.textTracks(); - this.textTracks().trigger({ - type: 'change', - target: tt, - currentTarget: tt, - srcElement: tt - }); - }; - - Html5.prototype.handleTextTrackAdd = function handleTextTrackAdd(e) { - this.textTracks().addTrack_(e.track); - }; - - Html5.prototype.handleTextTrackRemove = function handleTextTrackRemove(e) { - this.textTracks().removeTrack_(e.track); - }; - - /** - * Play for html5 tech - * - * @method play - */ - - Html5.prototype.play = function play() { - this.el_.play(); - }; - - /** - * Pause for html5 tech - * - * @method pause - */ - - Html5.prototype.pause = function pause() { - this.el_.pause(); - }; - - /** - * Paused for html5 tech - * - * @return {Boolean} - * @method paused - */ - - Html5.prototype.paused = function paused() { - return this.el_.paused; - }; - - /** - * Get current time - * - * @return {Number} - * @method currentTime - */ - - Html5.prototype.currentTime = function currentTime() { - return this.el_.currentTime; - }; - - /** - * Set current time - * - * @param {Number} seconds Current time of video - * @method setCurrentTime - */ - - Html5.prototype.setCurrentTime = function setCurrentTime(seconds) { - try { - this.el_.currentTime = seconds; - } catch (e) { - _utilsLogJs2['default'](e, 'Video is not ready. (Video.js)'); - // this.warning(VideoJS.warnings.videoNotReady); - } - }; - - /** - * Get duration - * - * @return {Number} - * @method duration - */ - - Html5.prototype.duration = function duration() { - return this.el_.duration || 0; - }; - - /** - * Get a TimeRange object that represents the intersection - * of the time ranges for which the user agent has all - * relevant media - * - * @return {TimeRangeObject} - * @method buffered - */ - - Html5.prototype.buffered = function buffered() { - return this.el_.buffered; - }; - - /** - * Get volume level - * - * @return {Number} - * @method volume - */ - - Html5.prototype.volume = function volume() { - return this.el_.volume; - }; - - /** - * Set volume level - * - * @param {Number} percentAsDecimal Volume percent as a decimal - * @method setVolume - */ - - Html5.prototype.setVolume = function setVolume(percentAsDecimal) { - this.el_.volume = percentAsDecimal; - }; - - /** - * Get if muted - * - * @return {Boolean} - * @method muted - */ - - Html5.prototype.muted = function muted() { - return this.el_.muted; - }; - - /** - * Set muted - * - * @param {Boolean} If player is to be muted or note - * @method setMuted - */ - - Html5.prototype.setMuted = function setMuted(muted) { - this.el_.muted = muted; - }; - - /** - * Get player width - * - * @return {Number} - * @method width - */ - - Html5.prototype.width = function width() { - return this.el_.offsetWidth; - }; - - /** - * Get player height - * - * @return {Number} - * @method height - */ - - Html5.prototype.height = function height() { - return this.el_.offsetHeight; - }; - - /** - * Get if there is fullscreen support - * - * @return {Boolean} - * @method supportsFullScreen - */ - - Html5.prototype.supportsFullScreen = function supportsFullScreen() { - if (typeof this.el_.webkitEnterFullScreen === 'function') { - var userAgent = _globalWindow2['default'].navigator.userAgent; - // Seems to be broken in Chromium/Chrome && Safari in Leopard - if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) { - return true; - } - } - return false; - }; - - /** - * Request to enter fullscreen - * - * @method enterFullScreen - */ - - Html5.prototype.enterFullScreen = function enterFullScreen() { - var video = this.el_; - - if ('webkitDisplayingFullscreen' in video) { - this.one('webkitbeginfullscreen', function () { - this.one('webkitendfullscreen', function () { - this.trigger('fullscreenchange', { isFullscreen: false }); - }); - - this.trigger('fullscreenchange', { isFullscreen: true }); - }); - } - - if (video.paused && video.networkState <= video.HAVE_METADATA) { - // attempt to prime the video element for programmatic access - // this isn't necessary on the desktop but shouldn't hurt - this.el_.play(); - - // playing and pausing synchronously during the transition to fullscreen - // can get iOS ~6.1 devices into a play/pause loop - this.setTimeout(function () { - video.pause(); - video.webkitEnterFullScreen(); - }, 0); - } else { - video.webkitEnterFullScreen(); - } - }; - - /** - * Request to exit fullscreen - * - * @method exitFullScreen - */ - - Html5.prototype.exitFullScreen = function exitFullScreen() { - this.el_.webkitExitFullScreen(); - }; - - /** - * Get/set video - * - * @param {Object=} src Source object - * @return {Object} - * @method src - */ - - Html5.prototype.src = function src(_src) { - if (_src === undefined) { - return this.el_.src; - } else { - // Setting src through `src` instead of `setSrc` will be deprecated - this.setSrc(_src); - } - }; - - /** - * Set video - * - * @param {Object} src Source object - * @deprecated - * @method setSrc - */ - - Html5.prototype.setSrc = function setSrc(src) { - this.el_.src = src; - }; - - /** - * Load media into player - * - * @method load - */ - - Html5.prototype.load = function load() { - this.el_.load(); - }; - - /** - * Reset the tech. Removes all sources and calls `load`. - * - * @method reset - */ - - Html5.prototype.reset = function reset() { - Html5.resetMediaElement(this.el_); - }; - - /** - * Get current source - * - * @return {Object} - * @method currentSrc - */ - - Html5.prototype.currentSrc = function currentSrc() { - if (this.currentSource_) { - return this.currentSource_.src; - } else { - return this.el_.currentSrc; - } - }; - - /** - * Get poster - * - * @return {String} - * @method poster - */ - - Html5.prototype.poster = function poster() { - return this.el_.poster; - }; - - /** - * Set poster - * - * @param {String} val URL to poster image - * @method - */ - - Html5.prototype.setPoster = function setPoster(val) { - this.el_.poster = val; - }; - - /** - * Get preload attribute - * - * @return {String} - * @method preload - */ - - Html5.prototype.preload = function preload() { - return this.el_.preload; - }; - - /** - * Set preload attribute - * - * @param {String} val Value for preload attribute - * @method setPreload - */ - - Html5.prototype.setPreload = function setPreload(val) { - this.el_.preload = val; - }; - - /** - * Get autoplay attribute - * - * @return {String} - * @method autoplay - */ - - Html5.prototype.autoplay = function autoplay() { - return this.el_.autoplay; - }; - - /** - * Set autoplay attribute - * - * @param {String} val Value for preload attribute - * @method setAutoplay - */ - - Html5.prototype.setAutoplay = function setAutoplay(val) { - this.el_.autoplay = val; - }; - - /** - * Get controls attribute - * - * @return {String} - * @method controls - */ - - Html5.prototype.controls = function controls() { - return this.el_.controls; - }; - - /** - * Set controls attribute - * - * @param {String} val Value for controls attribute - * @method setControls - */ - - Html5.prototype.setControls = function setControls(val) { - this.el_.controls = !!val; - }; - - /** - * Get loop attribute - * - * @return {String} - * @method loop - */ - - Html5.prototype.loop = function loop() { - return this.el_.loop; - }; - - /** - * Set loop attribute - * - * @param {String} val Value for loop attribute - * @method setLoop - */ - - Html5.prototype.setLoop = function setLoop(val) { - this.el_.loop = val; - }; - - /** - * Get error value - * - * @return {String} - * @method error - */ - - Html5.prototype.error = function error() { - return this.el_.error; - }; - - /** - * Get whether or not the player is in the "seeking" state - * - * @return {Boolean} - * @method seeking - */ - - Html5.prototype.seeking = function seeking() { - return this.el_.seeking; - }; - - /** - * Get a TimeRanges object that represents the - * ranges of the media resource to which it is possible - * for the user agent to seek. - * - * @return {TimeRangeObject} - * @method seekable - */ - - Html5.prototype.seekable = function seekable() { - return this.el_.seekable; - }; - - /** - * Get if video ended - * - * @return {Boolean} - * @method ended - */ - - Html5.prototype.ended = function ended() { - return this.el_.ended; - }; - - /** - * Get the value of the muted content attribute - * This attribute has no dynamic effect, it only - * controls the default state of the element - * - * @return {Boolean} - * @method defaultMuted - */ - - Html5.prototype.defaultMuted = function defaultMuted() { - return this.el_.defaultMuted; - }; - - /** - * Get desired speed at which the media resource is to play - * - * @return {Number} - * @method playbackRate - */ - - Html5.prototype.playbackRate = function playbackRate() { - return this.el_.playbackRate; - }; - - /** - * Returns a TimeRanges object that represents the ranges of the - * media resource that the user agent has played. - * @return {TimeRangeObject} the range of points on the media - * timeline that has been reached through normal playback - * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-played - */ - - Html5.prototype.played = function played() { - return this.el_.played; - }; - - /** - * Set desired speed at which the media resource is to play - * - * @param {Number} val Speed at which the media resource is to play - * @method setPlaybackRate - */ - - Html5.prototype.setPlaybackRate = function setPlaybackRate(val) { - this.el_.playbackRate = val; - }; - - /** - * Get the current state of network activity for the element, from - * the list below - * NETWORK_EMPTY (numeric value 0) - * NETWORK_IDLE (numeric value 1) - * NETWORK_LOADING (numeric value 2) - * NETWORK_NO_SOURCE (numeric value 3) - * - * @return {Number} - * @method networkState - */ - - Html5.prototype.networkState = function networkState() { - return this.el_.networkState; - }; - - /** - * Get a value that expresses the current state of the element - * with respect to rendering the current playback position, from - * the codes in the list below - * HAVE_NOTHING (numeric value 0) - * HAVE_METADATA (numeric value 1) - * HAVE_CURRENT_DATA (numeric value 2) - * HAVE_FUTURE_DATA (numeric value 3) - * HAVE_ENOUGH_DATA (numeric value 4) - * - * @return {Number} - * @method readyState - */ - - Html5.prototype.readyState = function readyState() { - return this.el_.readyState; - }; - - /** - * Get width of video - * - * @return {Number} - * @method videoWidth - */ - - Html5.prototype.videoWidth = function videoWidth() { - return this.el_.videoWidth; - }; - - /** - * Get height of video - * - * @return {Number} - * @method videoHeight - */ - - Html5.prototype.videoHeight = function videoHeight() { - return this.el_.videoHeight; - }; - - /** - * Get text tracks - * - * @return {TextTrackList} - * @method textTracks - */ - - Html5.prototype.textTracks = function textTracks() { - return _Tech.prototype.textTracks.call(this); - }; - - /** - * Creates and returns a text track object - * - * @param {String} kind Text track kind (subtitles, captions, descriptions - * chapters and metadata) - * @param {String=} label Label to identify the text track - * @param {String=} language Two letter language abbreviation - * @return {TextTrackObject} - * @method addTextTrack - */ - - Html5.prototype.addTextTrack = function addTextTrack(kind, label, language) { - if (!this['featuresNativeTextTracks']) { - return _Tech.prototype.addTextTrack.call(this, kind, label, language); - } - - return this.el_.addTextTrack(kind, label, language); - }; - - /** - * Creates a remote text track object and returns a html track element - * - * @param {Object} options The object should contain values for - * kind, language, label and src (location of the WebVTT file) - * @return {HTMLTrackElement} - * @method addRemoteTextTrack - */ - - Html5.prototype.addRemoteTextTrack = function addRemoteTextTrack() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - if (!this['featuresNativeTextTracks']) { - return _Tech.prototype.addRemoteTextTrack.call(this, options); - } - - var htmlTrackElement = _globalDocument2['default'].createElement('track'); - - if (options.kind) { - htmlTrackElement.kind = options.kind; - } - if (options.label) { - htmlTrackElement.label = options.label; - } - if (options.language || options.srclang) { - htmlTrackElement.srclang = options.language || options.srclang; - } - if (options['default']) { - htmlTrackElement['default'] = options['default']; - } - if (options.id) { - htmlTrackElement.id = options.id; - } - if (options.src) { - htmlTrackElement.src = options.src; - } - - this.el().appendChild(htmlTrackElement); - - // store HTMLTrackElement and TextTrack to remote list - this.remoteTextTrackEls().addTrackElement_(htmlTrackElement); - this.remoteTextTracks().addTrack_(htmlTrackElement.track); - - return htmlTrackElement; - }; - - /** - * Remove remote text track from TextTrackList object - * - * @param {TextTrackObject} track Texttrack object to remove - * @method removeRemoteTextTrack - */ - - Html5.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) { - if (!this['featuresNativeTextTracks']) { - return _Tech.prototype.removeRemoteTextTrack.call(this, track); - } - - var tracks = undefined, - i = undefined; - - var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); - - // remove HTMLTrackElement and TextTrack from remote list - this.remoteTextTrackEls().removeTrackElement_(trackElement); - this.remoteTextTracks().removeTrack_(track); - - tracks = this.$$('track'); - - i = tracks.length; - while (i--) { - if (track === tracks[i] || track === tracks[i].track) { - this.el().removeChild(tracks[i]); - } - } - }; - - return Html5; -})(_techJs2['default']); - -Html5.TEST_VID = _globalDocument2['default'].createElement('video'); -var track = _globalDocument2['default'].createElement('track'); -track.kind = 'captions'; -track.srclang = 'en'; -track.label = 'English'; -Html5.TEST_VID.appendChild(track); - -/* - * Check if HTML5 video is supported by this browser/device - * - * @return {Boolean} - */ -Html5.isSupported = function () { - // IE9 with no Media Player is a LIAR! (#984) - try { - Html5.TEST_VID['volume'] = 0.5; - } catch (e) { - return false; - } - - return !!Html5.TEST_VID.canPlayType; -}; - -// Add Source Handler pattern functions to this tech -_techJs2['default'].withSourceHandlers(Html5); - -/* - * The default native source handler. - * This simply passes the source to the video element. Nothing fancy. - * - * @param {Object} source The source object - * @param {Html5} tech The instance of the HTML5 tech - */ -Html5.nativeSourceHandler = {}; - -/* - * Check if the video element can play the given videotype - * - * @param {String} type The mimetype to check - * @return {String} 'probably', 'maybe', or '' (empty string) - */ -Html5.nativeSourceHandler.canPlayType = function (type) { - // IE9 on Windows 7 without MediaPlayer throws an error here - // https://github.com/videojs/video.js/issues/519 - try { - return Html5.TEST_VID.canPlayType(type); - } catch (e) { - return ''; - } -}; - -/* - * Check if the video element can handle the source natively - * - * @param {Object} source The source object - * @return {String} 'probably', 'maybe', or '' (empty string) - */ -Html5.nativeSourceHandler.canHandleSource = function (source) { - var match, ext; - - // If a type was provided we should rely on that - if (source.type) { - return Html5.nativeSourceHandler.canPlayType(source.type); - } else if (source.src) { - // If no type, fall back to checking 'video/[EXTENSION]' - ext = Url.getFileExtension(source.src); - - return Html5.nativeSourceHandler.canPlayType('video/' + ext); - } - - return ''; -}; - -/* - * Pass the source to the video element - * Adaptive source handlers will have more complicated workflows before passing - * video data to the video element - * - * @param {Object} source The source object - * @param {Html5} tech The instance of the Html5 tech - */ -Html5.nativeSourceHandler.handleSource = function (source, tech) { - tech.setSrc(source.src); -}; - -/* -* Clean up the source handler when disposing the player or switching sources.. -* (no cleanup is needed when supporting the format natively) -*/ -Html5.nativeSourceHandler.dispose = function () {}; - -// Register the native source handler -Html5.registerSourceHandler(Html5.nativeSourceHandler); - -/* - * Check if the volume can be changed in this browser/device. - * Volume cannot be changed in a lot of mobile devices. - * Specifically, it can't be changed from 1 on iOS. - * - * @return {Boolean} - */ -Html5.canControlVolume = function () { - var volume = Html5.TEST_VID.volume; - Html5.TEST_VID.volume = volume / 2 + 0.1; - return volume !== Html5.TEST_VID.volume; -}; - -/* - * Check if playbackRate is supported in this browser/device. - * - * @return {Number} [description] - */ -Html5.canControlPlaybackRate = function () { - var playbackRate = Html5.TEST_VID.playbackRate; - Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1; - return playbackRate !== Html5.TEST_VID.playbackRate; -}; - -/* - * Check to see if native text tracks are supported by this browser/device - * - * @return {Boolean} - */ -Html5.supportsNativeTextTracks = function () { - var supportsTextTracks; - - // Figure out native text track support - // If mode is a number, we cannot change it because it'll disappear from view. - // Browsers with numeric modes include IE10 and older (<=2013) samsung android models. - // Firefox isn't playing nice either with modifying the mode - // TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862 - supportsTextTracks = !!Html5.TEST_VID.textTracks; - if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) { - supportsTextTracks = typeof Html5.TEST_VID.textTracks[0]['mode'] !== 'number'; - } - if (supportsTextTracks && browser.IS_FIREFOX) { - supportsTextTracks = false; - } - if (supportsTextTracks && !('onremovetrack' in Html5.TEST_VID.textTracks)) { - supportsTextTracks = false; - } - - return supportsTextTracks; -}; - -/** - * An array of events available on the Html5 tech. - * - * @private - * @type {Array} - */ -Html5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'volumechange']; - -/* - * Set the tech's volume control support status - * - * @type {Boolean} - */ -Html5.prototype['featuresVolumeControl'] = Html5.canControlVolume(); - -/* - * Set the tech's playbackRate support status - * - * @type {Boolean} - */ -Html5.prototype['featuresPlaybackRate'] = Html5.canControlPlaybackRate(); - -/* - * Set the tech's status on moving the video element. - * In iOS, if you move a video element in the DOM, it breaks video playback. - * - * @type {Boolean} - */ -Html5.prototype['movingMediaElementInDOM'] = !browser.IS_IOS; - -/* - * Set the the tech's fullscreen resize support status. - * HTML video is able to automatically resize when going to fullscreen. - * (No longer appears to be used. Can probably be removed.) - */ -Html5.prototype['featuresFullscreenResize'] = true; - -/* - * Set the tech's progress event support status - * (this disables the manual progress events of the Tech) - */ -Html5.prototype['featuresProgressEvents'] = true; - -/* - * Sets the tech's status on native text track support - * - * @type {Boolean} - */ -Html5.prototype['featuresNativeTextTracks'] = Html5.supportsNativeTextTracks(); - -// HTML5 Feature detection and Device Fixes --------------------------------- // -var canPlayType = undefined; -var mpegurlRE = /^application\/(?:x-|vnd\.apple\.)mpegurl/i; -var mp4RE = /^video\/mp4/i; - -Html5.patchCanPlayType = function () { - // Android 4.0 and above can play HLS to some extent but it reports being unable to do so - if (browser.ANDROID_VERSION >= 4.0) { - if (!canPlayType) { - canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType; - } - - Html5.TEST_VID.constructor.prototype.canPlayType = function (type) { - if (type && mpegurlRE.test(type)) { - return 'maybe'; - } - return canPlayType.call(this, type); - }; - } - - // Override Android 2.2 and less canPlayType method which is broken - if (browser.IS_OLD_ANDROID) { - if (!canPlayType) { - canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType; - } - - Html5.TEST_VID.constructor.prototype.canPlayType = function (type) { - if (type && mp4RE.test(type)) { - return 'maybe'; - } - return canPlayType.call(this, type); - }; - } -}; - -Html5.unpatchCanPlayType = function () { - var r = Html5.TEST_VID.constructor.prototype.canPlayType; - Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType; - canPlayType = null; - return r; -}; - -// by default, patch the video element -Html5.patchCanPlayType(); - -Html5.disposeMediaElement = function (el) { - if (!el) { - return; - } - - if (el.parentNode) { - el.parentNode.removeChild(el); - } - - // remove any child track or source nodes to prevent their loading - while (el.hasChildNodes()) { - el.removeChild(el.firstChild); - } - - // remove any src reference. not setting `src=''` because that causes a warning - // in firefox - el.removeAttribute('src'); - - // force the media element to update its loading state by calling load() - // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793) - if (typeof el.load === 'function') { - // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473) - (function () { - try { - el.load(); - } catch (e) { - // not supported - } - })(); - } -}; - -Html5.resetMediaElement = function (el) { - if (!el) { - return; - } - - var sources = el.querySelectorAll('source'); - var i = sources.length; - while (i--) { - el.removeChild(sources[i]); - } - - // remove any src reference. - // not setting `src=''` because that throws an error - el.removeAttribute('src'); - - if (typeof el.load === 'function') { - // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473) - (function () { - try { - el.load(); - } catch (e) {} - })(); - } -}; - -_component2['default'].registerComponent('Html5', Html5); -_techJs2['default'].registerTech('Html5', Html5); -exports['default'] = Html5; -module.exports = exports['default']; - -},{"../component":67,"../utils/browser.js":131,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/log.js":139,"../utils/merge-options.js":140,"../utils/url.js":144,"./tech.js":121,"global/document":1,"global/window":2,"object.assign":45}],120:[function(_dereq_,module,exports){ -/** - * @file loader.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _componentJs = _dereq_('../component.js'); - -var _componentJs2 = _interopRequireDefault(_componentJs); - -var _techJs = _dereq_('./tech.js'); - -var _techJs2 = _interopRequireDefault(_techJs); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _utilsToTitleCaseJs = _dereq_('../utils/to-title-case.js'); - -var _utilsToTitleCaseJs2 = _interopRequireDefault(_utilsToTitleCaseJs); - -/** - * The Media Loader is the component that decides which playback technology to load - * when the player is initialized. - * - * @param {Object} player Main Player - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends Component - * @class MediaLoader - */ - -var MediaLoader = (function (_Component) { - _inherits(MediaLoader, _Component); - - function MediaLoader(player, options, ready) { - _classCallCheck(this, MediaLoader); - - _Component.call(this, player, options, ready); - - // If there are no sources when the player is initialized, - // load the first supported playback technology. - - if (!options.playerOptions['sources'] || options.playerOptions['sources'].length === 0) { - for (var i = 0, j = options.playerOptions['techOrder']; i < j.length; i++) { - var techName = _utilsToTitleCaseJs2['default'](j[i]); - var tech = _techJs2['default'].getTech(techName); - // Support old behavior of techs being registered as components. - // Remove once that deprecated behavior is removed. - if (!techName) { - tech = _componentJs2['default'].getComponent(techName); - } - - // Check if the browser supports this technology - if (tech && tech.isSupported()) { - player.loadTech_(techName); - break; - } - } - } else { - // // Loop through playback technologies (HTML5, Flash) and check for support. - // // Then load the best source. - // // A few assumptions here: - // // All playback technologies respect preload false. - player.src(options.playerOptions['sources']); - } - } - - return MediaLoader; -})(_componentJs2['default']); - -_componentJs2['default'].registerComponent('MediaLoader', MediaLoader); -exports['default'] = MediaLoader; -module.exports = exports['default']; - -},{"../component.js":67,"../utils/to-title-case.js":143,"./tech.js":121,"global/window":2}],121:[function(_dereq_,module,exports){ -/** - * @file tech.js - * Media Technology Controller - Base class for media playback - * technology controllers like Flash and HTML5 - */ - -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _component = _dereq_('../component'); - -var _component2 = _interopRequireDefault(_component); - -var _tracksHtmlTrackElement = _dereq_('../tracks/html-track-element'); - -var _tracksHtmlTrackElement2 = _interopRequireDefault(_tracksHtmlTrackElement); - -var _tracksHtmlTrackElementList = _dereq_('../tracks/html-track-element-list'); - -var _tracksHtmlTrackElementList2 = _interopRequireDefault(_tracksHtmlTrackElementList); - -var _utilsMergeOptionsJs = _dereq_('../utils/merge-options.js'); - -var _utilsMergeOptionsJs2 = _interopRequireDefault(_utilsMergeOptionsJs); - -var _tracksTextTrack = _dereq_('../tracks/text-track'); - -var _tracksTextTrack2 = _interopRequireDefault(_tracksTextTrack); - -var _tracksTextTrackList = _dereq_('../tracks/text-track-list'); - -var _tracksTextTrackList2 = _interopRequireDefault(_tracksTextTrackList); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsLogJs = _dereq_('../utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _utilsTimeRangesJs = _dereq_('../utils/time-ranges.js'); - -var _utilsBufferJs = _dereq_('../utils/buffer.js'); - -var _mediaErrorJs = _dereq_('../media-error.js'); - -var _mediaErrorJs2 = _interopRequireDefault(_mediaErrorJs); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -/** - * Base class for media (HTML5 Video, Flash) controllers - * - * @param {Object=} options Options object - * @param {Function=} ready Ready callback function - * @extends Component - * @class Tech - */ - -var Tech = (function (_Component) { - _inherits(Tech, _Component); - - function Tech() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - var ready = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1]; - - _classCallCheck(this, Tech); - - // we don't want the tech to report user activity automatically. - // This is done manually in addControlsListeners - options.reportTouchActivity = false; - _Component.call(this, null, options, ready); - - // keep track of whether the current source has played at all to - // implement a very limited played() - this.hasStarted_ = false; - this.on('playing', function () { - this.hasStarted_ = true; - }); - this.on('loadstart', function () { - this.hasStarted_ = false; - }); - - this.textTracks_ = options.textTracks; - - // Manually track progress in cases where the browser/flash player doesn't report it. - if (!this.featuresProgressEvents) { - this.manualProgressOn(); - } - - // Manually track timeupdates in cases where the browser/flash player doesn't report it. - if (!this.featuresTimeupdateEvents) { - this.manualTimeUpdatesOn(); - } - - if (options.nativeCaptions === false || options.nativeTextTracks === false) { - this.featuresNativeTextTracks = false; - } - - if (!this.featuresNativeTextTracks) { - this.on('ready', this.emulateTextTracks); - } - - this.initTextTrackListeners(); - - // Turn on component tap events - this.emitTapEvents(); - } - - /* - * List of associated text tracks - * - * @type {Array} - * @private - */ - - /* Fallbacks for unsupported event types - ================================================================================ */ - // Manually trigger progress events based on changes to the buffered amount - // Many flash players and older HTML5 browsers don't send progress or progress-like events - /** - * Turn on progress events - * - * @method manualProgressOn - */ - - Tech.prototype.manualProgressOn = function manualProgressOn() { - this.on('durationchange', this.onDurationChange); - - this.manualProgress = true; - - // Trigger progress watching when a source begins loading - this.one('ready', this.trackProgress); - }; - - /** - * Turn off progress events - * - * @method manualProgressOff - */ - - Tech.prototype.manualProgressOff = function manualProgressOff() { - this.manualProgress = false; - this.stopTrackingProgress(); - - this.off('durationchange', this.onDurationChange); - }; - - /** - * Track progress - * - * @method trackProgress - */ - - Tech.prototype.trackProgress = function trackProgress() { - this.stopTrackingProgress(); - this.progressInterval = this.setInterval(Fn.bind(this, function () { - // Don't trigger unless buffered amount is greater than last time - - var numBufferedPercent = this.bufferedPercent(); - - if (this.bufferedPercent_ !== numBufferedPercent) { - this.trigger('progress'); - } - - this.bufferedPercent_ = numBufferedPercent; - - if (numBufferedPercent === 1) { - this.stopTrackingProgress(); - } - }), 500); - }; - - /** - * Update duration - * - * @method onDurationChange - */ - - Tech.prototype.onDurationChange = function onDurationChange() { - this.duration_ = this.duration(); - }; - - /** - * Create and get TimeRange object for buffering - * - * @return {TimeRangeObject} - * @method buffered - */ - - Tech.prototype.buffered = function buffered() { - return _utilsTimeRangesJs.createTimeRange(0, 0); - }; - - /** - * Get buffered percent - * - * @return {Number} - * @method bufferedPercent - */ - - Tech.prototype.bufferedPercent = function bufferedPercent() { - return _utilsBufferJs.bufferedPercent(this.buffered(), this.duration_); - }; - - /** - * Stops tracking progress by clearing progress interval - * - * @method stopTrackingProgress - */ - - Tech.prototype.stopTrackingProgress = function stopTrackingProgress() { - this.clearInterval(this.progressInterval); - }; - - /*! Time Tracking -------------------------------------------------------------- */ - /** - * Set event listeners for on play and pause and tracking current time - * - * @method manualTimeUpdatesOn - */ - - Tech.prototype.manualTimeUpdatesOn = function manualTimeUpdatesOn() { - this.manualTimeUpdates = true; - - this.on('play', this.trackCurrentTime); - this.on('pause', this.stopTrackingCurrentTime); - }; - - /** - * Remove event listeners for on play and pause and tracking current time - * - * @method manualTimeUpdatesOff - */ - - Tech.prototype.manualTimeUpdatesOff = function manualTimeUpdatesOff() { - this.manualTimeUpdates = false; - this.stopTrackingCurrentTime(); - this.off('play', this.trackCurrentTime); - this.off('pause', this.stopTrackingCurrentTime); - }; - - /** - * Tracks current time - * - * @method trackCurrentTime - */ - - Tech.prototype.trackCurrentTime = function trackCurrentTime() { - if (this.currentTimeInterval) { - this.stopTrackingCurrentTime(); - } - this.currentTimeInterval = this.setInterval(function () { - this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); - }, 250); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15 - }; - - /** - * Turn off play progress tracking (when paused or dragging) - * - * @method stopTrackingCurrentTime - */ - - Tech.prototype.stopTrackingCurrentTime = function stopTrackingCurrentTime() { - this.clearInterval(this.currentTimeInterval); - - // #1002 - if the video ends right before the next timeupdate would happen, - // the progress bar won't make it all the way to the end - this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); - }; - - /** - * Turn off any manual progress or timeupdate tracking - * - * @method dispose - */ - - Tech.prototype.dispose = function dispose() { - // clear out text tracks because we can't reuse them between techs - var textTracks = this.textTracks(); - - if (textTracks) { - var i = textTracks.length; - while (i--) { - this.removeRemoteTextTrack(textTracks[i]); - } - } - - // Turn off any manual progress or timeupdate tracking - if (this.manualProgress) { - this.manualProgressOff(); - } - - if (this.manualTimeUpdates) { - this.manualTimeUpdatesOff(); - } - - _Component.prototype.dispose.call(this); - }; - - /** - * Reset the tech. Removes all sources and resets readyState. - * - * @method reset - */ - - Tech.prototype.reset = function reset() {}; - - /** - * When invoked without an argument, returns a MediaError object - * representing the current error state of the player or null if - * there is no error. When invoked with an argument, set the current - * error state of the player. - * @param {MediaError=} err Optional an error object - * @return {MediaError} the current error object or null - * @method error - */ - - Tech.prototype.error = function error(err) { - if (err !== undefined) { - if (err instanceof _mediaErrorJs2['default']) { - this.error_ = err; - } else { - this.error_ = new _mediaErrorJs2['default'](err); - } - this.trigger('error'); - } - return this.error_; - }; - - /** - * Return the time ranges that have been played through for the - * current source. This implementation is incomplete. It does not - * track the played time ranges, only whether the source has played - * at all or not. - * @return {TimeRangeObject} a single time range if this video has - * played or an empty set of ranges if not. - * @method played - */ - - Tech.prototype.played = function played() { - if (this.hasStarted_) { - return _utilsTimeRangesJs.createTimeRange(0, 0); - } - return _utilsTimeRangesJs.createTimeRange(); - }; - - /** - * Set current time - * - * @method setCurrentTime - */ - - Tech.prototype.setCurrentTime = function setCurrentTime() { - // improve the accuracy of manual timeupdates - if (this.manualTimeUpdates) { - this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); - } - }; - - /** - * Initialize texttrack listeners - * - * @method initTextTrackListeners - */ - - Tech.prototype.initTextTrackListeners = function initTextTrackListeners() { - var textTrackListChanges = Fn.bind(this, function () { - this.trigger('texttrackchange'); - }); - - var tracks = this.textTracks(); - - if (!tracks) return; - - tracks.addEventListener('removetrack', textTrackListChanges); - tracks.addEventListener('addtrack', textTrackListChanges); - - this.on('dispose', Fn.bind(this, function () { - tracks.removeEventListener('removetrack', textTrackListChanges); - tracks.removeEventListener('addtrack', textTrackListChanges); - })); - }; - - /** - * Emulate texttracks - * - * @method emulateTextTracks - */ - - Tech.prototype.emulateTextTracks = function emulateTextTracks() { - var _this = this; - - var tracks = this.textTracks(); - if (!tracks) { - return; - } - - if (!_globalWindow2['default']['WebVTT'] && this.el().parentNode != null) { - (function () { - var script = _globalDocument2['default'].createElement('script'); - script.src = _this.options_['vtt.js'] || 'https://cdn.rawgit.com/gkatsev/vtt.js/vjs-v0.12.1/dist/vtt.min.js'; - script.onload = function () { - _this.trigger('vttjsloaded'); - }; - script.onerror = function () { - _this.trigger('vttjserror'); - }; - _this.on('dispose', function () { - script.onload = null; - script.onerror = null; - }); - _this.el().parentNode.appendChild(script); - _globalWindow2['default']['WebVTT'] = true; - })(); - } - - var updateDisplay = function updateDisplay() { - return _this.trigger('texttrackchange'); - }; - var textTracksChanges = function textTracksChanges() { - updateDisplay(); - - for (var i = 0; i < tracks.length; i++) { - var track = tracks[i]; - track.removeEventListener('cuechange', updateDisplay); - if (track.mode === 'showing') { - track.addEventListener('cuechange', updateDisplay); - } - } - }; - - textTracksChanges(); - tracks.addEventListener('change', textTracksChanges); - - this.on('dispose', function () { - tracks.removeEventListener('change', textTracksChanges); - }); - }; - - /* - * Provide default methods for text tracks. - * - * Html5 tech overrides these. - */ - - /** - * Get texttracks - * - * @returns {TextTrackList} - * @method textTracks - */ - - Tech.prototype.textTracks = function textTracks() { - this.textTracks_ = this.textTracks_ || new _tracksTextTrackList2['default'](); - return this.textTracks_; - }; - - /** - * Get remote texttracks - * - * @returns {TextTrackList} - * @method remoteTextTracks - */ - - Tech.prototype.remoteTextTracks = function remoteTextTracks() { - this.remoteTextTracks_ = this.remoteTextTracks_ || new _tracksTextTrackList2['default'](); - return this.remoteTextTracks_; - }; - - /** - * Get remote htmltrackelements - * - * @returns {HTMLTrackElementList} - * @method remoteTextTrackEls - */ - - Tech.prototype.remoteTextTrackEls = function remoteTextTrackEls() { - this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new _tracksHtmlTrackElementList2['default'](); - return this.remoteTextTrackEls_; - }; - - /** - * Creates and returns a remote text track object - * - * @param {String} kind Text track kind (subtitles, captions, descriptions - * chapters and metadata) - * @param {String=} label Label to identify the text track - * @param {String=} language Two letter language abbreviation - * @return {TextTrackObject} - * @method addTextTrack - */ - - Tech.prototype.addTextTrack = function addTextTrack(kind, label, language) { - if (!kind) { - throw new Error('TextTrack kind is required but was not provided'); - } - - return createTrackHelper(this, kind, label, language); - }; - - /** - * Creates a remote text track object and returns a emulated html track element - * - * @param {Object} options The object should contain values for - * kind, language, label and src (location of the WebVTT file) - * @return {HTMLTrackElement} - * @method addRemoteTextTrack - */ - - Tech.prototype.addRemoteTextTrack = function addRemoteTextTrack(options) { - var track = _utilsMergeOptionsJs2['default'](options, { - tech: this - }); - - var htmlTrackElement = new _tracksHtmlTrackElement2['default'](track); - - // store HTMLTrackElement and TextTrack to remote list - this.remoteTextTrackEls().addTrackElement_(htmlTrackElement); - this.remoteTextTracks().addTrack_(htmlTrackElement.track); - - // must come after remoteTextTracks() - this.textTracks().addTrack_(htmlTrackElement.track); - - return htmlTrackElement; - }; - - /** - * Remove remote texttrack - * - * @param {TextTrackObject} track Texttrack to remove - * @method removeRemoteTextTrack - */ - - Tech.prototype.removeRemoteTextTrack = function removeRemoteTextTrack(track) { - this.textTracks().removeTrack_(track); - - var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); - - // remove HTMLTrackElement and TextTrack from remote list - this.remoteTextTrackEls().removeTrackElement_(trackElement); - this.remoteTextTracks().removeTrack_(track); - }; - - /** - * Provide a default setPoster method for techs - * Poster support for techs should be optional, so we don't want techs to - * break if they don't have a way to set a poster. - * - * @method setPoster - */ - - Tech.prototype.setPoster = function setPoster() {}; - - /* - * Check if the tech can support the given type - * - * The base tech does not support any type, but source handlers might - * overwrite this. - * - * @param {String} type The mimetype to check - * @return {String} 'probably', 'maybe', or '' (empty string) - */ - - Tech.prototype.canPlayType = function canPlayType() { - return ''; - }; - - /* - * Return whether the argument is a Tech or not. - * Can be passed either a Class like `Html5` or a instance like `player.tech_` - * - * @param {Object} component An item to check - * @return {Boolean} Whether it is a tech or not - */ - - Tech.isTech = function isTech(component) { - return component.prototype instanceof Tech || component instanceof Tech || component === Tech; - }; - - /** - * Registers a Tech - * - * @param {String} name Name of the Tech to register - * @param {Object} tech The tech to register - * @static - * @method registerComponent - */ - - Tech.registerTech = function registerTech(name, tech) { - if (!Tech.techs_) { - Tech.techs_ = {}; - } - - if (!Tech.isTech(tech)) { - throw new Error('Tech ' + name + ' must be a Tech'); - } - - Tech.techs_[name] = tech; - return tech; - }; - - /** - * Gets a component by name - * - * @param {String} name Name of the component to get - * @return {Component} - * @static - * @method getComponent - */ - - Tech.getTech = function getTech(name) { - if (Tech.techs_ && Tech.techs_[name]) { - return Tech.techs_[name]; - } - - if (_globalWindow2['default'] && _globalWindow2['default'].videojs && _globalWindow2['default'].videojs[name]) { - _utilsLogJs2['default'].warn('The ' + name + ' tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)'); - return _globalWindow2['default'].videojs[name]; - } - }; - - return Tech; -})(_component2['default']); - -Tech.prototype.textTracks_; - -var createTrackHelper = function createTrackHelper(self, kind, label, language) { - var options = arguments.length <= 4 || arguments[4] === undefined ? {} : arguments[4]; - - var tracks = self.textTracks(); - - options.kind = kind; - - if (label) { - options.label = label; - } - if (language) { - options.language = language; - } - options.tech = self; - - var track = new _tracksTextTrack2['default'](options); - tracks.addTrack_(track); - - return track; -}; - -Tech.prototype.featuresVolumeControl = true; - -// Resizing plugins using request fullscreen reloads the plugin -Tech.prototype.featuresFullscreenResize = false; -Tech.prototype.featuresPlaybackRate = false; - -// Optional events that we can manually mimic with timers -// currently not triggered by video-js-swf -Tech.prototype.featuresProgressEvents = false; -Tech.prototype.featuresTimeupdateEvents = false; - -Tech.prototype.featuresNativeTextTracks = false; - -/* - * A functional mixin for techs that want to use the Source Handler pattern. - * - * ##### EXAMPLE: - * - * Tech.withSourceHandlers.call(MyTech); - * - */ -Tech.withSourceHandlers = function (_Tech) { - /* - * Register a source handler - * Source handlers are scripts for handling specific formats. - * The source handler pattern is used for adaptive formats (HLS, DASH) that - * manually load video data and feed it into a Source Buffer (Media Source Extensions) - * @param {Function} handler The source handler - * @param {Boolean} first Register it before any existing handlers - */ - _Tech.registerSourceHandler = function (handler, index) { - var handlers = _Tech.sourceHandlers; - - if (!handlers) { - handlers = _Tech.sourceHandlers = []; - } - - if (index === undefined) { - // add to the end of the list - index = handlers.length; - } - - handlers.splice(index, 0, handler); - }; - - /* - * Check if the tech can support the given type - * @param {String} type The mimetype to check - * @return {String} 'probably', 'maybe', or '' (empty string) - */ - _Tech.canPlayType = function (type) { - var handlers = _Tech.sourceHandlers || []; - var can = undefined; - - for (var i = 0; i < handlers.length; i++) { - can = handlers[i].canPlayType(type); - - if (can) { - return can; - } - } - - return ''; - }; - - /* - * Return the first source handler that supports the source - * TODO: Answer question: should 'probably' be prioritized over 'maybe' - * @param {Object} source The source object - * @returns {Object} The first source handler that supports the source - * @returns {null} Null if no source handler is found - */ - _Tech.selectSourceHandler = function (source) { - var handlers = _Tech.sourceHandlers || []; - var can = undefined; - - for (var i = 0; i < handlers.length; i++) { - can = handlers[i].canHandleSource(source); - - if (can) { - return handlers[i]; - } - } - - return null; - }; - - /* - * Check if the tech can support the given source - * @param {Object} srcObj The source object - * @return {String} 'probably', 'maybe', or '' (empty string) - */ - _Tech.canPlaySource = function (srcObj) { - var sh = _Tech.selectSourceHandler(srcObj); - - if (sh) { - return sh.canHandleSource(srcObj); - } - - return ''; - }; - - /* - * When using a source handler, prefer its implementation of - * any function normally provided by the tech. - */ - var deferrable = ['seekable', 'duration']; - - deferrable.forEach(function (fnName) { - var originalFn = this[fnName]; - - if (typeof originalFn !== 'function') { - return; - } - - this[fnName] = function () { - if (this.sourceHandler_ && this.sourceHandler_[fnName]) { - return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments); - } - return originalFn.apply(this, arguments); - }; - }, _Tech.prototype); - - /* - * Create a function for setting the source using a source object - * and source handlers. - * Should never be called unless a source handler was found. - * @param {Object} source A source object with src and type keys - * @return {Tech} self - */ - _Tech.prototype.setSource = function (source) { - var sh = _Tech.selectSourceHandler(source); - - if (!sh) { - // Fall back to a native source hander when unsupported sources are - // deliberately set - if (_Tech.nativeSourceHandler) { - sh = _Tech.nativeSourceHandler; - } else { - _utilsLogJs2['default'].error('No source hander found for the current source.'); - } - } - - // Dispose any existing source handler - this.disposeSourceHandler(); - this.off('dispose', this.disposeSourceHandler); - - this.currentSource_ = source; - this.sourceHandler_ = sh.handleSource(source, this); - this.on('dispose', this.disposeSourceHandler); - - return this; - }; - - /* - * Clean up any existing source handler - */ - _Tech.prototype.disposeSourceHandler = function () { - if (this.sourceHandler_ && this.sourceHandler_.dispose) { - this.sourceHandler_.dispose(); - } - }; -}; - -_component2['default'].registerComponent('Tech', Tech); -// Old name for Tech -_component2['default'].registerComponent('MediaTechController', Tech); -Tech.registerTech('Tech', Tech); -exports['default'] = Tech; -module.exports = exports['default']; - -},{"../component":67,"../media-error.js":105,"../tracks/html-track-element":123,"../tracks/html-track-element-list":122,"../tracks/text-track":130,"../tracks/text-track-list":128,"../utils/buffer.js":132,"../utils/fn.js":136,"../utils/log.js":139,"../utils/merge-options.js":140,"../utils/time-ranges.js":142,"global/document":1,"global/window":2}],122:[function(_dereq_,module,exports){ -/** - * @file html-track-element-list.js - */ - -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -var _utilsBrowserJs = _dereq_('../utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var HtmlTrackElementList = (function () { - function HtmlTrackElementList() { - var trackElements = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; - - _classCallCheck(this, HtmlTrackElementList); - - var list = this; - - if (browser.IS_IE8) { - list = _globalDocument2['default'].createElement('custom'); - - for (var prop in HtmlTrackElementList.prototype) { - if (prop !== 'constructor') { - list[prop] = HtmlTrackElementList.prototype[prop]; - } - } - } - - list.trackElements_ = []; - - Object.defineProperty(list, 'length', { - get: function get() { - return this.trackElements_.length; - } - }); - - for (var i = 0, _length = trackElements.length; i < _length; i++) { - list.addTrackElement_(trackElements[i]); - } - - if (browser.IS_IE8) { - return list; - } - } - - HtmlTrackElementList.prototype.addTrackElement_ = function addTrackElement_(trackElement) { - this.trackElements_.push(trackElement); - }; - - HtmlTrackElementList.prototype.getTrackElementByTrack_ = function getTrackElementByTrack_(track) { - var trackElement_ = undefined; - - for (var i = 0, _length2 = this.trackElements_.length; i < _length2; i++) { - if (track === this.trackElements_[i].track) { - trackElement_ = this.trackElements_[i]; - - break; - } - } - - return trackElement_; - }; - - HtmlTrackElementList.prototype.removeTrackElement_ = function removeTrackElement_(trackElement) { - for (var i = 0, _length3 = this.trackElements_.length; i < _length3; i++) { - if (trackElement === this.trackElements_[i]) { - this.trackElements_.splice(i, 1); - - break; - } - } - }; - - return HtmlTrackElementList; -})(); - -exports['default'] = HtmlTrackElementList; -module.exports = exports['default']; - -},{"../utils/browser.js":131,"global/document":1}],123:[function(_dereq_,module,exports){ -/** - * @file html-track-element.js - */ - -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _utilsBrowserJs = _dereq_('../utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _eventTarget = _dereq_('../event-target'); - -var _eventTarget2 = _interopRequireDefault(_eventTarget); - -var _tracksTextTrack = _dereq_('../tracks/text-track'); - -var _tracksTextTrack2 = _interopRequireDefault(_tracksTextTrack); - -var NONE = 0; -var LOADING = 1; -var LOADED = 2; -var ERROR = 3; - -/** - * https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement - * - * interface HTMLTrackElement : HTMLElement { - * attribute DOMString kind; - * attribute DOMString src; - * attribute DOMString srclang; - * attribute DOMString label; - * attribute boolean default; - * - * const unsigned short NONE = 0; - * const unsigned short LOADING = 1; - * const unsigned short LOADED = 2; - * const unsigned short ERROR = 3; - * readonly attribute unsigned short readyState; - * - * readonly attribute TextTrack track; - * }; - * - * @param {Object} options TextTrack configuration - * @class HTMLTrackElement - */ - -var HTMLTrackElement = (function (_EventTarget) { - _inherits(HTMLTrackElement, _EventTarget); - - function HTMLTrackElement() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - _classCallCheck(this, HTMLTrackElement); - - _EventTarget.call(this); - - var readyState = undefined, - trackElement = this; - - if (browser.IS_IE8) { - trackElement = _globalDocument2['default'].createElement('custom'); - - for (var prop in HTMLTrackElement.prototype) { - if (prop !== 'constructor') { - trackElement[prop] = HTMLTrackElement.prototype[prop]; - } - } - } - - var track = new _tracksTextTrack2['default'](options); - - trackElement.kind = track.kind; - trackElement.src = track.src; - trackElement.srclang = track.language; - trackElement.label = track.label; - trackElement['default'] = track['default']; - - Object.defineProperty(trackElement, 'readyState', { - get: function get() { - return readyState; - } - }); - - Object.defineProperty(trackElement, 'track', { - get: function get() { - return track; - } - }); - - readyState = NONE; - - track.addEventListener('loadeddata', function () { - readyState = LOADED; - - trackElement.trigger({ - type: 'load', - target: trackElement - }); - }); - - if (browser.IS_IE8) { - return trackElement; - } - } - - return HTMLTrackElement; -})(_eventTarget2['default']); - -HTMLTrackElement.prototype.allowedEvents_ = { - load: 'load' -}; - -HTMLTrackElement.NONE = NONE; -HTMLTrackElement.LOADING = LOADING; -HTMLTrackElement.LOADED = LOADED; -HTMLTrackElement.ERROR = ERROR; - -exports['default'] = HTMLTrackElement; -module.exports = exports['default']; - -},{"../event-target":101,"../tracks/text-track":130,"../utils/browser.js":131,"global/document":1}],124:[function(_dereq_,module,exports){ -/** - * @file text-track-cue-list.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -var _utilsBrowserJs = _dereq_('../utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -/** - * A List of text track cues as defined in: - * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist - * - * interface TextTrackCueList { - * readonly attribute unsigned long length; - * getter TextTrackCue (unsigned long index); - * TextTrackCue? getCueById(DOMString id); - * }; - * - * @param {Array} cues A list of cues to be initialized with - * @class TextTrackCueList - */ - -var TextTrackCueList = (function () { - function TextTrackCueList(cues) { - _classCallCheck(this, TextTrackCueList); - - var list = this; - - if (browser.IS_IE8) { - list = _globalDocument2['default'].createElement('custom'); - - for (var prop in TextTrackCueList.prototype) { - if (prop !== 'constructor') { - list[prop] = TextTrackCueList.prototype[prop]; - } - } - } - - TextTrackCueList.prototype.setCues_.call(list, cues); - - Object.defineProperty(list, 'length', { - get: function get() { - return this.length_; - } - }); - - if (browser.IS_IE8) { - return list; - } - } - - /** - * A setter for cues in this list - * - * @param {Array} cues an array of cues - * @method setCues_ - * @private - */ - - TextTrackCueList.prototype.setCues_ = function setCues_(cues) { - var oldLength = this.length || 0; - var i = 0; - var l = cues.length; - - this.cues_ = cues; - this.length_ = cues.length; - - var defineProp = function defineProp(index) { - if (!('' + index in this)) { - Object.defineProperty(this, '' + index, { - get: function get() { - return this.cues_[index]; - } - }); - } - }; - - if (oldLength < l) { - i = oldLength; - - for (; i < l; i++) { - defineProp.call(this, i); - } - } - }; - - /** - * Get a cue that is currently in the Cue list by id - * - * @param {String} id - * @method getCueById - * @return {Object} a single cue - */ - - TextTrackCueList.prototype.getCueById = function getCueById(id) { - var result = null; - - for (var i = 0, l = this.length; i < l; i++) { - var cue = this[i]; - - if (cue.id === id) { - result = cue; - break; - } - } - - return result; - }; - - return TextTrackCueList; -})(); - -exports['default'] = TextTrackCueList; -module.exports = exports['default']; - -},{"../utils/browser.js":131,"global/document":1}],125:[function(_dereq_,module,exports){ -/** - * @file text-track-display.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _component = _dereq_('../component'); - -var _component2 = _interopRequireDefault(_component); - -var _menuMenuJs = _dereq_('../menu/menu.js'); - -var _menuMenuJs2 = _interopRequireDefault(_menuMenuJs); - -var _menuMenuItemJs = _dereq_('../menu/menu-item.js'); - -var _menuMenuItemJs2 = _interopRequireDefault(_menuMenuItemJs); - -var _menuMenuButtonJs = _dereq_('../menu/menu-button.js'); - -var _menuMenuButtonJs2 = _interopRequireDefault(_menuMenuButtonJs); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var darkGray = '#222'; -var lightGray = '#ccc'; -var fontMap = { - monospace: 'monospace', - sansSerif: 'sans-serif', - serif: 'serif', - monospaceSansSerif: '"Andale Mono", "Lucida Console", monospace', - monospaceSerif: '"Courier New", monospace', - proportionalSansSerif: 'sans-serif', - proportionalSerif: 'serif', - casual: '"Comic Sans MS", Impact, fantasy', - script: '"Monotype Corsiva", cursive', - smallcaps: '"Andale Mono", "Lucida Console", monospace, sans-serif' -}; - -/** - * The component for displaying text track cues - * - * @param {Object} player Main Player - * @param {Object=} options Object of option names and values - * @param {Function=} ready Ready callback function - * @extends Component - * @class TextTrackDisplay - */ - -var TextTrackDisplay = (function (_Component) { - _inherits(TextTrackDisplay, _Component); - - function TextTrackDisplay(player, options, ready) { - _classCallCheck(this, TextTrackDisplay); - - _Component.call(this, player, options, ready); - - player.on('loadstart', Fn.bind(this, this.toggleDisplay)); - player.on('texttrackchange', Fn.bind(this, this.updateDisplay)); - - // This used to be called during player init, but was causing an error - // if a track should show by default and the display hadn't loaded yet. - // Should probably be moved to an external track loader when we support - // tracks that don't need a display. - player.ready(Fn.bind(this, function () { - if (player.tech_ && player.tech_['featuresNativeTextTracks']) { - this.hide(); - return; - } - - player.on('fullscreenchange', Fn.bind(this, this.updateDisplay)); - - var tracks = this.options_.playerOptions['tracks'] || []; - for (var i = 0; i < tracks.length; i++) { - var track = tracks[i]; - this.player_.addRemoteTextTrack(track); - } - })); - } - - /** - * Add cue HTML to display - * - * @param {Number} color Hex number for color, like #f0e - * @param {Number} opacity Value for opacity,0.0 - 1.0 - * @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)' - * @method constructColor - */ - - /** - * Toggle display texttracks - * - * @method toggleDisplay - */ - - TextTrackDisplay.prototype.toggleDisplay = function toggleDisplay() { - if (this.player_.tech_ && this.player_.tech_['featuresNativeTextTracks']) { - this.hide(); - } else { - this.show(); - } - }; - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - TextTrackDisplay.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-text-track-display' - }, { - 'aria-live': 'assertive', - 'aria-atomic': 'true' - }); - }; - - /** - * Clear display texttracks - * - * @method clearDisplay - */ - - TextTrackDisplay.prototype.clearDisplay = function clearDisplay() { - if (typeof _globalWindow2['default']['WebVTT'] === 'function') { - _globalWindow2['default']['WebVTT']['processCues'](_globalWindow2['default'], [], this.el_); - } - }; - - /** - * Update display texttracks - * - * @method updateDisplay - */ - - TextTrackDisplay.prototype.updateDisplay = function updateDisplay() { - var tracks = this.player_.textTracks(); - - this.clearDisplay(); - - if (!tracks) { - return; - } - - // Track display prioritization model: if multiple tracks are 'showing', - // display the first 'subtitles' or 'captions' track which is 'showing', - // otherwise display the first 'descriptions' track which is 'showing' - - var descriptionsTrack = null; - var captionsSubtitlesTrack = null; - - var i = tracks.length; - while (i--) { - var track = tracks[i]; - if (track['mode'] === 'showing') { - if (track['kind'] === 'descriptions') { - descriptionsTrack = track; - } else { - captionsSubtitlesTrack = track; - } - } - } - - if (captionsSubtitlesTrack) { - this.updateForTrack(captionsSubtitlesTrack); - } else if (descriptionsTrack) { - this.updateForTrack(descriptionsTrack); - } - }; - - /** - * Add texttrack to texttrack list - * - * @param {TextTrackObject} track Texttrack object to be added to list - * @method updateForTrack - */ - - TextTrackDisplay.prototype.updateForTrack = function updateForTrack(track) { - if (typeof _globalWindow2['default']['WebVTT'] !== 'function' || !track['activeCues']) { - return; - } - - var overrides = this.player_['textTrackSettings'].getValues(); - - var cues = []; - for (var _i = 0; _i < track['activeCues'].length; _i++) { - cues.push(track['activeCues'][_i]); - } - - _globalWindow2['default']['WebVTT']['processCues'](_globalWindow2['default'], cues, this.el_); - - var i = cues.length; - while (i--) { - var cue = cues[i]; - if (!cue) { - continue; - } - - var cueDiv = cue.displayState; - if (overrides.color) { - cueDiv.firstChild.style.color = overrides.color; - } - if (overrides.textOpacity) { - tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity)); - } - if (overrides.backgroundColor) { - cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor; - } - if (overrides.backgroundOpacity) { - tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity)); - } - if (overrides.windowColor) { - if (overrides.windowOpacity) { - tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity)); - } else { - cueDiv.style.backgroundColor = overrides.windowColor; - } - } - if (overrides.edgeStyle) { - if (overrides.edgeStyle === 'dropshadow') { - cueDiv.firstChild.style.textShadow = '2px 2px 3px ' + darkGray + ', 2px 2px 4px ' + darkGray + ', 2px 2px 5px ' + darkGray; - } else if (overrides.edgeStyle === 'raised') { - cueDiv.firstChild.style.textShadow = '1px 1px ' + darkGray + ', 2px 2px ' + darkGray + ', 3px 3px ' + darkGray; - } else if (overrides.edgeStyle === 'depressed') { - cueDiv.firstChild.style.textShadow = '1px 1px ' + lightGray + ', 0 1px ' + lightGray + ', -1px -1px ' + darkGray + ', 0 -1px ' + darkGray; - } else if (overrides.edgeStyle === 'uniform') { - cueDiv.firstChild.style.textShadow = '0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray + ', 0 0 4px ' + darkGray; - } - } - if (overrides.fontPercent && overrides.fontPercent !== 1) { - var fontSize = _globalWindow2['default'].parseFloat(cueDiv.style.fontSize); - cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px'; - cueDiv.style.height = 'auto'; - cueDiv.style.top = 'auto'; - cueDiv.style.bottom = '2px'; - } - if (overrides.fontFamily && overrides.fontFamily !== 'default') { - if (overrides.fontFamily === 'small-caps') { - cueDiv.firstChild.style.fontVariant = 'small-caps'; - } else { - cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily]; - } - } - } - }; - - return TextTrackDisplay; -})(_component2['default']); - -function constructColor(color, opacity) { - return 'rgba(' + - // color looks like "#f0e" - parseInt(color[1] + color[1], 16) + ',' + parseInt(color[2] + color[2], 16) + ',' + parseInt(color[3] + color[3], 16) + ',' + opacity + ')'; -} - -/** - * Try to update style - * Some style changes will throw an error, particularly in IE8. Those should be noops. - * - * @param {Element} el The element to be styles - * @param {CSSProperty} style The CSS property to be styled - * @param {CSSStyle} rule The actual style to be applied to the property - * @method tryUpdateStyle - */ -function tryUpdateStyle(el, style, rule) { - // - try { - el.style[style] = rule; - } catch (e) {} -} - -_component2['default'].registerComponent('TextTrackDisplay', TextTrackDisplay); -exports['default'] = TextTrackDisplay; -module.exports = exports['default']; - -},{"../component":67,"../menu/menu-button.js":106,"../menu/menu-item.js":107,"../menu/menu.js":108,"../utils/fn.js":136,"global/document":1,"global/window":2}],126:[function(_dereq_,module,exports){ -/** - * @file text-track-enums.js - */ - -/** - * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode - * - * enum TextTrackMode { "disabled", "hidden", "showing" }; - */ -'use strict'; - -exports.__esModule = true; -var TextTrackMode = { - disabled: 'disabled', - hidden: 'hidden', - showing: 'showing' -}; - -/** - * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind - * - * enum TextTrackKind { - * "subtitles", - * "captions", - * "descriptions", - * "chapters", - * "metadata" - * }; - */ -var TextTrackKind = { - subtitles: 'subtitles', - captions: 'captions', - descriptions: 'descriptions', - chapters: 'chapters', - metadata: 'metadata' -}; - -/* jshint ignore:start */ -// we ignore jshint here because it does not see -// TextTrackMode or TextTrackKind as defined here somehow... -exports.TextTrackMode = TextTrackMode; -exports.TextTrackKind = TextTrackKind; - -/* jshint ignore:end */ - -},{}],127:[function(_dereq_,module,exports){ -/** - * Utilities for capturing text track state and re-creating tracks - * based on a capture. - * - * @file text-track-list-converter.js - */ - -/** - * Examine a single text track and return a JSON-compatible javascript - * object that represents the text track's state. - * @param track {TextTrackObject} the text track to query - * @return {Object} a serializable javascript representation of the - * @private - */ -'use strict'; - -exports.__esModule = true; -var trackToJson_ = function trackToJson_(track) { - var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) { - if (track[prop]) { - acc[prop] = track[prop]; - } - - return acc; - }, { - cues: track.cues && Array.prototype.map.call(track.cues, function (cue) { - return { - startTime: cue.startTime, - endTime: cue.endTime, - text: cue.text, - id: cue.id - }; - }) - }); - - return ret; -}; - -/** - * Examine a tech and return a JSON-compatible javascript array that - * represents the state of all text tracks currently configured. The - * return array is compatible with `jsonToTextTracks`. - * @param tech {tech} the tech object to query - * @return {Array} a serializable javascript representation of the - * @function textTracksToJson - */ -var textTracksToJson = function textTracksToJson(tech) { - - var trackEls = tech.$$('track'); - - var trackObjs = Array.prototype.map.call(trackEls, function (t) { - return t.track; - }); - var tracks = Array.prototype.map.call(trackEls, function (trackEl) { - var json = trackToJson_(trackEl.track); - if (trackEl.src) { - json.src = trackEl.src; - } - return json; - }); - - return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) { - return trackObjs.indexOf(track) === -1; - }).map(trackToJson_)); -}; - -/** - * Creates a set of remote text tracks on a tech based on an array of - * javascript text track representations. - * @param json {Array} an array of text track representation objects, - * like those that would be produced by `textTracksToJson` - * @param tech {tech} the tech to create text tracks on - * @function jsonToTextTracks - */ -var jsonToTextTracks = function jsonToTextTracks(json, tech) { - json.forEach(function (track) { - var addedTrack = tech.addRemoteTextTrack(track).track; - if (!track.src && track.cues) { - track.cues.forEach(function (cue) { - return addedTrack.addCue(cue); - }); - } - }); - - return tech.textTracks(); -}; - -exports['default'] = { textTracksToJson: textTracksToJson, jsonToTextTracks: jsonToTextTracks, trackToJson_: trackToJson_ }; -module.exports = exports['default']; - -},{}],128:[function(_dereq_,module,exports){ -/** - * @file text-track-list.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _eventTarget = _dereq_('../event-target'); - -var _eventTarget2 = _interopRequireDefault(_eventTarget); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsBrowserJs = _dereq_('../utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -/** - * A text track list as defined in: - * https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist - * - * interface TextTrackList : EventTarget { - * readonly attribute unsigned long length; - * getter TextTrack (unsigned long index); - * TextTrack? getTrackById(DOMString id); - * - * attribute EventHandler onchange; - * attribute EventHandler onaddtrack; - * attribute EventHandler onremovetrack; - * }; - * - * @param {Track[]} tracks A list of tracks to initialize the list with - * @extends EventTarget - * @class TextTrackList - */ - -var TextTrackList = (function (_EventTarget) { - _inherits(TextTrackList, _EventTarget); - - function TextTrackList() { - var tracks = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0]; - - _classCallCheck(this, TextTrackList); - - _EventTarget.call(this); - var list = this; - - if (browser.IS_IE8) { - list = _globalDocument2['default'].createElement('custom'); - - for (var prop in TextTrackList.prototype) { - if (prop !== 'constructor') { - list[prop] = TextTrackList.prototype[prop]; - } - } - } - - list.tracks_ = []; - - Object.defineProperty(list, 'length', { - get: function get() { - return this.tracks_.length; - } - }); - - for (var i = 0; i < tracks.length; i++) { - list.addTrack_(tracks[i]); - } - - if (browser.IS_IE8) { - return list; - } - } - - /** - * change - One or more tracks in the track list have been enabled or disabled. - * addtrack - A track has been added to the track list. - * removetrack - A track has been removed from the track list. - */ - - /** - * Add TextTrack from TextTrackList - * - * @param {TextTrack} track - * @method addTrack_ - * @private - */ - - TextTrackList.prototype.addTrack_ = function addTrack_(track) { - var index = this.tracks_.length; - - if (!('' + index in this)) { - Object.defineProperty(this, index, { - get: function get() { - return this.tracks_[index]; - } - }); - } - - track.addEventListener('modechange', Fn.bind(this, function () { - this.trigger('change'); - })); - - // Do not add duplicate tracks - if (this.tracks_.indexOf(track) === -1) { - this.tracks_.push(track); - this.trigger({ - track: track, - type: 'addtrack' - }); - } - }; - - /** - * Remove TextTrack from TextTrackList - * NOTE: Be mindful of what is passed in as it may be a HTMLTrackElement - * - * @param {TextTrack} rtrack - * @method removeTrack_ - * @private - */ - - TextTrackList.prototype.removeTrack_ = function removeTrack_(rtrack) { - var track = undefined; - - for (var i = 0, l = this.length; i < l; i++) { - if (this[i] === rtrack) { - track = this[i]; - if (track.off) { - track.off(); - } - - this.tracks_.splice(i, 1); - - break; - } - } - - if (!track) { - return; - } - - this.trigger({ - track: track, - type: 'removetrack' - }); - }; - - /** - * Get a TextTrack from TextTrackList by a tracks id - * - * @param {String} id - the id of the track to get - * @method getTrackById - * @return {TextTrack} - * @private - */ - - TextTrackList.prototype.getTrackById = function getTrackById(id) { - var result = null; - - for (var i = 0, l = this.length; i < l; i++) { - var track = this[i]; - - if (track.id === id) { - result = track; - break; - } - } - - return result; - }; - - return TextTrackList; -})(_eventTarget2['default']); - -TextTrackList.prototype.allowedEvents_ = { - change: 'change', - addtrack: 'addtrack', - removetrack: 'removetrack' -}; - -// emulate attribute EventHandler support to allow for feature detection -for (var _event in TextTrackList.prototype.allowedEvents_) { - TextTrackList.prototype['on' + _event] = null; -} - -exports['default'] = TextTrackList; -module.exports = exports['default']; - -},{"../event-target":101,"../utils/browser.js":131,"../utils/fn.js":136,"global/document":1}],129:[function(_dereq_,module,exports){ -/** - * @file text-track-settings.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _component = _dereq_('../component'); - -var _component2 = _interopRequireDefault(_component); - -var _utilsEventsJs = _dereq_('../utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsLogJs = _dereq_('../utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _safeJsonParseTuple = _dereq_('safe-json-parse/tuple'); - -var _safeJsonParseTuple2 = _interopRequireDefault(_safeJsonParseTuple); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -/** - * Manipulate settings of texttracks - * - * @param {Object} player Main Player - * @param {Object=} options Object of option names and values - * @extends Component - * @class TextTrackSettings - */ - -var TextTrackSettings = (function (_Component) { - _inherits(TextTrackSettings, _Component); - - function TextTrackSettings(player, options) { - _classCallCheck(this, TextTrackSettings); - - _Component.call(this, player, options); - this.hide(); - - // Grab `persistTextTrackSettings` from the player options if not passed in child options - if (options.persistTextTrackSettings === undefined) { - this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings; - } - - Events.on(this.$('.vjs-done-button'), 'click', Fn.bind(this, function () { - this.saveSettings(); - this.hide(); - })); - - Events.on(this.$('.vjs-default-button'), 'click', Fn.bind(this, function () { - this.$('.vjs-fg-color > select').selectedIndex = 0; - this.$('.vjs-bg-color > select').selectedIndex = 0; - this.$('.window-color > select').selectedIndex = 0; - this.$('.vjs-text-opacity > select').selectedIndex = 0; - this.$('.vjs-bg-opacity > select').selectedIndex = 0; - this.$('.vjs-window-opacity > select').selectedIndex = 0; - this.$('.vjs-edge-style select').selectedIndex = 0; - this.$('.vjs-font-family select').selectedIndex = 0; - this.$('.vjs-font-percent select').selectedIndex = 2; - this.updateDisplay(); - })); - - Events.on(this.$('.vjs-fg-color > select'), 'change', Fn.bind(this, this.updateDisplay)); - Events.on(this.$('.vjs-bg-color > select'), 'change', Fn.bind(this, this.updateDisplay)); - Events.on(this.$('.window-color > select'), 'change', Fn.bind(this, this.updateDisplay)); - Events.on(this.$('.vjs-text-opacity > select'), 'change', Fn.bind(this, this.updateDisplay)); - Events.on(this.$('.vjs-bg-opacity > select'), 'change', Fn.bind(this, this.updateDisplay)); - Events.on(this.$('.vjs-window-opacity > select'), 'change', Fn.bind(this, this.updateDisplay)); - Events.on(this.$('.vjs-font-percent select'), 'change', Fn.bind(this, this.updateDisplay)); - Events.on(this.$('.vjs-edge-style select'), 'change', Fn.bind(this, this.updateDisplay)); - Events.on(this.$('.vjs-font-family select'), 'change', Fn.bind(this, this.updateDisplay)); - - if (this.options_.persistTextTrackSettings) { - this.restoreSettings(); - } - } - - /** - * Create the component's DOM element - * - * @return {Element} - * @method createEl - */ - - TextTrackSettings.prototype.createEl = function createEl() { - return _Component.prototype.createEl.call(this, 'div', { - className: 'vjs-caption-settings vjs-modal-overlay', - innerHTML: captionOptionsMenuTemplate() - }); - }; - - /** - * Get texttrack settings - * Settings are - * .vjs-edge-style - * .vjs-font-family - * .vjs-fg-color - * .vjs-text-opacity - * .vjs-bg-color - * .vjs-bg-opacity - * .window-color - * .vjs-window-opacity - * - * @return {Object} - * @method getValues - */ - - TextTrackSettings.prototype.getValues = function getValues() { - var textEdge = getSelectedOptionValue(this.$('.vjs-edge-style select')); - var fontFamily = getSelectedOptionValue(this.$('.vjs-font-family select')); - var fgColor = getSelectedOptionValue(this.$('.vjs-fg-color > select')); - var textOpacity = getSelectedOptionValue(this.$('.vjs-text-opacity > select')); - var bgColor = getSelectedOptionValue(this.$('.vjs-bg-color > select')); - var bgOpacity = getSelectedOptionValue(this.$('.vjs-bg-opacity > select')); - var windowColor = getSelectedOptionValue(this.$('.window-color > select')); - var windowOpacity = getSelectedOptionValue(this.$('.vjs-window-opacity > select')); - var fontPercent = _globalWindow2['default']['parseFloat'](getSelectedOptionValue(this.$('.vjs-font-percent > select'))); - - var result = { - 'backgroundOpacity': bgOpacity, - 'textOpacity': textOpacity, - 'windowOpacity': windowOpacity, - 'edgeStyle': textEdge, - 'fontFamily': fontFamily, - 'color': fgColor, - 'backgroundColor': bgColor, - 'windowColor': windowColor, - 'fontPercent': fontPercent - }; - for (var _name in result) { - if (result[_name] === '' || result[_name] === 'none' || _name === 'fontPercent' && result[_name] === 1.00) { - delete result[_name]; - } - } - return result; - }; - - /** - * Set texttrack settings - * Settings are - * .vjs-edge-style - * .vjs-font-family - * .vjs-fg-color - * .vjs-text-opacity - * .vjs-bg-color - * .vjs-bg-opacity - * .window-color - * .vjs-window-opacity - * - * @param {Object} values Object with texttrack setting values - * @method setValues - */ - - TextTrackSettings.prototype.setValues = function setValues(values) { - setSelectedOption(this.$('.vjs-edge-style select'), values.edgeStyle); - setSelectedOption(this.$('.vjs-font-family select'), values.fontFamily); - setSelectedOption(this.$('.vjs-fg-color > select'), values.color); - setSelectedOption(this.$('.vjs-text-opacity > select'), values.textOpacity); - setSelectedOption(this.$('.vjs-bg-color > select'), values.backgroundColor); - setSelectedOption(this.$('.vjs-bg-opacity > select'), values.backgroundOpacity); - setSelectedOption(this.$('.window-color > select'), values.windowColor); - setSelectedOption(this.$('.vjs-window-opacity > select'), values.windowOpacity); - - var fontPercent = values.fontPercent; - - if (fontPercent) { - fontPercent = fontPercent.toFixed(2); - } - - setSelectedOption(this.$('.vjs-font-percent > select'), fontPercent); - }; - - /** - * Restore texttrack settings - * - * @method restoreSettings - */ - - TextTrackSettings.prototype.restoreSettings = function restoreSettings() { - var err = undefined, - values = undefined; - - try { - var _safeParseTuple = _safeJsonParseTuple2['default'](_globalWindow2['default'].localStorage.getItem('vjs-text-track-settings')); - - err = _safeParseTuple[0]; - values = _safeParseTuple[1]; - - if (err) { - _utilsLogJs2['default'].error(err); - } - } catch (e) { - _utilsLogJs2['default'].warn(e); - } - - if (values) { - this.setValues(values); - } - }; - - /** - * Save texttrack settings to local storage - * - * @method saveSettings - */ - - TextTrackSettings.prototype.saveSettings = function saveSettings() { - if (!this.options_.persistTextTrackSettings) { - return; - } - - var values = this.getValues(); - try { - if (Object.getOwnPropertyNames(values).length > 0) { - _globalWindow2['default'].localStorage.setItem('vjs-text-track-settings', JSON.stringify(values)); - } else { - _globalWindow2['default'].localStorage.removeItem('vjs-text-track-settings'); - } - } catch (e) { - _utilsLogJs2['default'].warn(e); - } - }; - - /** - * Update display of texttrack settings - * - * @method updateDisplay - */ - - TextTrackSettings.prototype.updateDisplay = function updateDisplay() { - var ttDisplay = this.player_.getChild('textTrackDisplay'); - if (ttDisplay) { - ttDisplay.updateDisplay(); - } - }; - - return TextTrackSettings; -})(_component2['default']); - -_component2['default'].registerComponent('TextTrackSettings', TextTrackSettings); - -function getSelectedOptionValue(target) { - var selectedOption = undefined; - // not all browsers support selectedOptions, so, fallback to options - if (target.selectedOptions) { - selectedOption = target.selectedOptions[0]; - } else if (target.options) { - selectedOption = target.options[target.options.selectedIndex]; - } - - return selectedOption.value; -} - -function setSelectedOption(target, value) { - if (!value) { - return; - } - - var i = undefined; - for (i = 0; i < target.options.length; i++) { - var option = target.options[i]; - if (option.value === value) { - break; - } - } - - target.selectedIndex = i; -} - -function captionOptionsMenuTemplate() { - var template = '
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    '; - - return template; -} - -exports['default'] = TextTrackSettings; -module.exports = exports['default']; - -},{"../component":67,"../utils/events.js":135,"../utils/fn.js":136,"../utils/log.js":139,"global/window":2,"safe-json-parse/tuple":54}],130:[function(_dereq_,module,exports){ -/** - * @file text-track.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - -function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var _textTrackCueList = _dereq_('./text-track-cue-list'); - -var _textTrackCueList2 = _interopRequireDefault(_textTrackCueList); - -var _utilsFnJs = _dereq_('../utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _utilsGuidJs = _dereq_('../utils/guid.js'); - -var Guid = _interopRequireWildcard(_utilsGuidJs); - -var _utilsBrowserJs = _dereq_('../utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -var _textTrackEnums = _dereq_('./text-track-enums'); - -var TextTrackEnum = _interopRequireWildcard(_textTrackEnums); - -var _utilsLogJs = _dereq_('../utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _eventTarget = _dereq_('../event-target'); - -var _eventTarget2 = _interopRequireDefault(_eventTarget); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _utilsUrlJs = _dereq_('../utils/url.js'); - -var _xhr = _dereq_('xhr'); - -var _xhr2 = _interopRequireDefault(_xhr); - -/** - * takes a webvtt file contents and parses it into cues - * - * @param {String} srcContent webVTT file contents - * @param {Track} track track to addcues to - */ -var parseCues = function parseCues(srcContent, track) { - var parser = new _globalWindow2['default'].WebVTT.Parser(_globalWindow2['default'], _globalWindow2['default'].vttjs, _globalWindow2['default'].WebVTT.StringDecoder()); - - parser.oncue = function (cue) { - track.addCue(cue); - }; - - parser.onparsingerror = function (error) { - _utilsLogJs2['default'].error(error); - }; - - parser.onflush = function () { - track.trigger({ - type: 'loadeddata', - target: track - }); - }; - - parser.parse(srcContent); - parser.flush(); -}; - -/** - * load a track from a specifed url - * - * @param {String} src url to load track from - * @param {Track} track track to addcues to - */ -var loadTrack = function loadTrack(src, track) { - var opts = { - uri: src - }; - var crossOrigin = _utilsUrlJs.isCrossOrigin(src); - - if (crossOrigin) { - opts.cors = crossOrigin; - } - - _xhr2['default'](opts, Fn.bind(this, function (err, response, responseBody) { - if (err) { - return _utilsLogJs2['default'].error(err, response); - } - - track.loaded_ = true; - - // Make sure that vttjs has loaded, otherwise, wait till it finished loading - // NOTE: this is only used for the alt/video.novtt.js build - if (typeof _globalWindow2['default'].WebVTT !== 'function') { - if (track.tech_) { - (function () { - var loadHandler = function loadHandler() { - return parseCues(responseBody, track); - }; - track.tech_.on('vttjsloaded', loadHandler); - track.tech_.on('vttjserror', function () { - _utilsLogJs2['default'].error('vttjs failed to load, stopping trying to process ' + track.src); - track.tech_.off('vttjsloaded', loadHandler); - }); - })(); - } - } else { - parseCues(responseBody, track); - } - })); -}; - -/** - * A single text track as defined in: - * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack - * - * interface TextTrack : EventTarget { - * readonly attribute TextTrackKind kind; - * readonly attribute DOMString label; - * readonly attribute DOMString language; - * - * readonly attribute DOMString id; - * readonly attribute DOMString inBandMetadataTrackDispatchType; - * - * attribute TextTrackMode mode; - * - * readonly attribute TextTrackCueList? cues; - * readonly attribute TextTrackCueList? activeCues; - * - * void addCue(TextTrackCue cue); - * void removeCue(TextTrackCue cue); - * - * attribute EventHandler oncuechange; - * }; - * - * @param {Object=} options Object of option names and values - * @extends EventTarget - * @class TextTrack - */ - -var TextTrack = (function (_EventTarget) { - _inherits(TextTrack, _EventTarget); - - function TextTrack() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - - _classCallCheck(this, TextTrack); - - _EventTarget.call(this); - if (!options.tech) { - throw new Error('A tech was not provided.'); - } - - var tt = this; - - if (browser.IS_IE8) { - tt = _globalDocument2['default'].createElement('custom'); - - for (var prop in TextTrack.prototype) { - if (prop !== 'constructor') { - tt[prop] = TextTrack.prototype[prop]; - } - } - } - - tt.tech_ = options.tech; - - var mode = TextTrackEnum.TextTrackMode[options.mode] || 'disabled'; - var kind = TextTrackEnum.TextTrackKind[options.kind] || 'subtitles'; - var label = options.label || ''; - var language = options.language || options.srclang || ''; - var id = options.id || 'vjs_text_track_' + Guid.newGUID(); - - if (kind === 'metadata' || kind === 'chapters') { - mode = 'hidden'; - } - - tt.cues_ = []; - tt.activeCues_ = []; - - var cues = new _textTrackCueList2['default'](tt.cues_); - var activeCues = new _textTrackCueList2['default'](tt.activeCues_); - var changed = false; - var timeupdateHandler = Fn.bind(tt, function () { - this.activeCues; - if (changed) { - this.trigger('cuechange'); - changed = false; - } - }); - - if (mode !== 'disabled') { - tt.tech_.on('timeupdate', timeupdateHandler); - } - - Object.defineProperty(tt, 'kind', { - get: function get() { - return kind; - }, - set: function set() {} - }); - - Object.defineProperty(tt, 'label', { - get: function get() { - return label; - }, - set: function set() {} - }); - - Object.defineProperty(tt, 'language', { - get: function get() { - return language; - }, - set: function set() {} - }); - - Object.defineProperty(tt, 'id', { - get: function get() { - return id; - }, - set: function set() {} - }); - - Object.defineProperty(tt, 'mode', { - get: function get() { - return mode; - }, - set: function set(newMode) { - if (!TextTrackEnum.TextTrackMode[newMode]) { - return; - } - mode = newMode; - if (mode === 'showing') { - this.tech_.on('timeupdate', timeupdateHandler); - } - this.trigger('modechange'); - } - }); - - Object.defineProperty(tt, 'cues', { - get: function get() { - if (!this.loaded_) { - return null; - } - - return cues; - }, - set: function set() {} - }); - - Object.defineProperty(tt, 'activeCues', { - get: function get() { - if (!this.loaded_) { - return null; - } - - // nothing to do - if (this.cues.length === 0) { - return activeCues; - } - - var ct = this.tech_.currentTime(); - var active = []; - - for (var i = 0, l = this.cues.length; i < l; i++) { - var cue = this.cues[i]; - - if (cue.startTime <= ct && cue.endTime >= ct) { - active.push(cue); - } else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) { - active.push(cue); - } - } - - changed = false; - - if (active.length !== this.activeCues_.length) { - changed = true; - } else { - for (var i = 0; i < active.length; i++) { - if (this.activeCues_.indexOf(active[i]) === -1) { - changed = true; - } - } - } - - this.activeCues_ = active; - activeCues.setCues_(this.activeCues_); - - return activeCues; - }, - set: function set() {} - }); - - if (options.src) { - tt.src = options.src; - loadTrack(options.src, tt); - } else { - tt.loaded_ = true; - } - - if (browser.IS_IE8) { - return tt; - } - } - - /** - * cuechange - One or more cues in the track have become active or stopped being active. - */ - - /** - * add a cue to the internal list of cues - * - * @param {Object} cue the cue to add to our internal list - * @method addCue - */ - - TextTrack.prototype.addCue = function addCue(cue) { - var tracks = this.tech_.textTracks(); - - if (tracks) { - for (var i = 0; i < tracks.length; i++) { - if (tracks[i] !== this) { - tracks[i].removeCue(cue); - } - } - } - - this.cues_.push(cue); - this.cues.setCues_(this.cues_); - }; - - /** - * remvoe a cue from our internal list - * - * @param {Object} removeCue the cue to remove from our internal list - * @method removeCue - */ - - TextTrack.prototype.removeCue = function removeCue(_removeCue) { - var removed = false; - - for (var i = 0, l = this.cues_.length; i < l; i++) { - var cue = this.cues_[i]; - - if (cue === _removeCue) { - this.cues_.splice(i, 1); - removed = true; - } - } - - if (removed) { - this.cues.setCues_(this.cues_); - } - }; - - return TextTrack; -})(_eventTarget2['default']); - -TextTrack.prototype.allowedEvents_ = { - cuechange: 'cuechange' -}; - -exports['default'] = TextTrack; -module.exports = exports['default']; - -},{"../event-target":101,"../utils/browser.js":131,"../utils/fn.js":136,"../utils/guid.js":138,"../utils/log.js":139,"../utils/url.js":144,"./text-track-cue-list":124,"./text-track-enums":126,"global/document":1,"global/window":2,"xhr":56}],131:[function(_dereq_,module,exports){ -/** - * @file browser.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var USER_AGENT = _globalWindow2['default'].navigator.userAgent; -var webkitVersionMap = /AppleWebKit\/([\d.]+)/i.exec(USER_AGENT); -var appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null; - -/* - * Device is an iPhone - * - * @type {Boolean} - * @constant - * @private - */ -var IS_IPAD = /iPad/i.test(USER_AGENT); - -exports.IS_IPAD = IS_IPAD; -// The Facebook app's UIWebView identifies as both an iPhone and iPad, so -// to identify iPhones, we need to exclude iPads. -// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/ -var IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD; -exports.IS_IPHONE = IS_IPHONE; -var IS_IPOD = /iPod/i.test(USER_AGENT); -exports.IS_IPOD = IS_IPOD; -var IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD; - -exports.IS_IOS = IS_IOS; -var IOS_VERSION = (function () { - var match = USER_AGENT.match(/OS (\d+)_/i); - if (match && match[1]) { - return match[1]; - } -})(); - -exports.IOS_VERSION = IOS_VERSION; -var IS_ANDROID = /Android/i.test(USER_AGENT); -exports.IS_ANDROID = IS_ANDROID; -var ANDROID_VERSION = (function () { - // This matches Android Major.Minor.Patch versions - // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned - var match = USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i), - major, - minor; - - if (!match) { - return null; - } - - major = match[1] && parseFloat(match[1]); - minor = match[2] && parseFloat(match[2]); - - if (major && minor) { - return parseFloat(match[1] + '.' + match[2]); - } else if (major) { - return major; - } else { - return null; - } -})(); -exports.ANDROID_VERSION = ANDROID_VERSION; -// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser -var IS_OLD_ANDROID = IS_ANDROID && /webkit/i.test(USER_AGENT) && ANDROID_VERSION < 2.3; -exports.IS_OLD_ANDROID = IS_OLD_ANDROID; -var IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537; - -exports.IS_NATIVE_ANDROID = IS_NATIVE_ANDROID; -var IS_FIREFOX = /Firefox/i.test(USER_AGENT); -exports.IS_FIREFOX = IS_FIREFOX; -var IS_CHROME = /Chrome/i.test(USER_AGENT); -exports.IS_CHROME = IS_CHROME; -var IS_IE8 = /MSIE\s8\.0/.test(USER_AGENT); - -exports.IS_IE8 = IS_IE8; -var TOUCH_ENABLED = !!('ontouchstart' in _globalWindow2['default'] || _globalWindow2['default'].DocumentTouch && _globalDocument2['default'] instanceof _globalWindow2['default'].DocumentTouch); -exports.TOUCH_ENABLED = TOUCH_ENABLED; -var BACKGROUND_SIZE_SUPPORTED = ('backgroundSize' in _globalDocument2['default'].createElement('video').style); -exports.BACKGROUND_SIZE_SUPPORTED = BACKGROUND_SIZE_SUPPORTED; - -},{"global/document":1,"global/window":2}],132:[function(_dereq_,module,exports){ -/** - * @file buffer.js - */ -'use strict'; - -exports.__esModule = true; -exports.bufferedPercent = bufferedPercent; - -var _timeRangesJs = _dereq_('./time-ranges.js'); - -/** - * Compute how much your video has been buffered - * - * @param {Object} Buffered object - * @param {Number} Total duration - * @return {Number} Percent buffered of the total duration - * @private - * @function bufferedPercent - */ - -function bufferedPercent(buffered, duration) { - var bufferedDuration = 0, - start, - end; - - if (!duration) { - return 0; - } - - if (!buffered || !buffered.length) { - buffered = _timeRangesJs.createTimeRange(0, 0); - } - - for (var i = 0; i < buffered.length; i++) { - start = buffered.start(i); - end = buffered.end(i); - - // buffered end can be bigger than duration by a very small fraction - if (end > duration) { - end = duration; - } - - bufferedDuration += end - start; - } - - return bufferedDuration / duration; -} - -},{"./time-ranges.js":142}],133:[function(_dereq_,module,exports){ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _logJs = _dereq_('./log.js'); - -var _logJs2 = _interopRequireDefault(_logJs); - -/** - * Object containing the default behaviors for available handler methods. - * - * @private - * @type {Object} - */ -var defaultBehaviors = { - get: function get(obj, key) { - return obj[key]; - }, - set: function set(obj, key, value) { - obj[key] = value; - return true; - } -}; - -/** - * Expose private objects publicly using a Proxy to log deprecation warnings. - * - * Browsers that do not support Proxy objects will simply return the `target` - * object, so it can be directly exposed. - * - * @param {Object} target The target object. - * @param {Object} messages Messages to display from a Proxy. Only operations - * with an associated message will be proxied. - * @param {String} [messages.get] - * @param {String} [messages.set] - * @return {Object} A Proxy if supported or the `target` argument. - */ - -exports['default'] = function (target) { - var messages = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - if (typeof Proxy === 'function') { - var _ret = (function () { - var handler = {}; - - // Build a handler object based on those keys that have both messages - // and default behaviors. - Object.keys(messages).forEach(function (key) { - if (defaultBehaviors.hasOwnProperty(key)) { - handler[key] = function () { - _logJs2['default'].warn(messages[key]); - return defaultBehaviors[key].apply(this, arguments); - }; - } - }); - - return { - v: new Proxy(target, handler) - }; - })(); - - if (typeof _ret === 'object') return _ret.v; - } - return target; -}; - -module.exports = exports['default']; - -},{"./log.js":139}],134:[function(_dereq_,module,exports){ -/** - * @file dom.js - */ -'use strict'; - -exports.__esModule = true; -exports.getEl = getEl; -exports.createEl = createEl; -exports.textContent = textContent; -exports.insertElFirst = insertElFirst; -exports.getElData = getElData; -exports.hasElData = hasElData; -exports.removeElData = removeElData; -exports.hasElClass = hasElClass; -exports.addElClass = addElClass; -exports.removeElClass = removeElClass; -exports.toggleElClass = toggleElClass; -exports.setElAttributes = setElAttributes; -exports.getElAttributes = getElAttributes; -exports.blockTextSelection = blockTextSelection; -exports.unblockTextSelection = unblockTextSelection; -exports.findElPosition = findElPosition; -exports.getPointerPosition = getPointerPosition; -exports.isEl = isEl; -exports.isTextNode = isTextNode; -exports.emptyEl = emptyEl; -exports.normalizeContent = normalizeContent; -exports.appendContent = appendContent; -exports.insertContent = insertContent; - -var _templateObject = _taggedTemplateLiteralLoose(['Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ', ' to ', '.'], ['Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ', ' to ', '.']); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _taggedTemplateLiteralLoose(strings, raw) { strings.raw = raw; return strings; } - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _guidJs = _dereq_('./guid.js'); - -var Guid = _interopRequireWildcard(_guidJs); - -var _logJs = _dereq_('./log.js'); - -var _logJs2 = _interopRequireDefault(_logJs); - -var _tsml = _dereq_('tsml'); - -var _tsml2 = _interopRequireDefault(_tsml); - -/** - * Detect if a value is a string with any non-whitespace characters. - * - * @param {String} str - * @return {Boolean} - */ -function isNonBlankString(str) { - return typeof str === 'string' && /\S/.test(str); -} - -/** - * Throws an error if the passed string has whitespace. This is used by - * class methods to be relatively consistent with the classList API. - * - * @param {String} str - * @return {Boolean} - */ -function throwIfWhitespace(str) { - if (/\s/.test(str)) { - throw new Error('class has illegal whitespace characters'); - } -} - -/** - * Produce a regular expression for matching a class name. - * - * @param {String} className - * @return {RegExp} - */ -function classRegExp(className) { - return new RegExp('(^|\\s)' + className + '($|\\s)'); -} - -/** - * Creates functions to query the DOM using a given method. - * - * @function createQuerier - * @private - * @param {String} method - * @return {Function} - */ -function createQuerier(method) { - return function (selector, context) { - if (!isNonBlankString(selector)) { - return _globalDocument2['default'][method](null); - } - if (isNonBlankString(context)) { - context = _globalDocument2['default'].querySelector(context); - } - return (isEl(context) ? context : _globalDocument2['default'])[method](selector); - }; -} - -/** - * Shorthand for document.getElementById() - * Also allows for CSS (jQuery) ID syntax. But nothing other than IDs. - * - * @param {String} id Element ID - * @return {Element} Element with supplied ID - * @function getEl - */ - -function getEl(id) { - if (id.indexOf('#') === 0) { - id = id.slice(1); - } - - return _globalDocument2['default'].getElementById(id); -} - -/** - * Creates an element and applies properties. - * - * @param {String} [tagName='div'] Name of tag to be created. - * @param {Object} [properties={}] Element properties to be applied. - * @param {Object} [attributes={}] Element attributes to be applied. - * @return {Element} - * @function createEl - */ - -function createEl() { - var tagName = arguments.length <= 0 || arguments[0] === undefined ? 'div' : arguments[0]; - var properties = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var attributes = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - - var el = _globalDocument2['default'].createElement(tagName); - - Object.getOwnPropertyNames(properties).forEach(function (propName) { - var val = properties[propName]; - - // See #2176 - // We originally were accepting both properties and attributes in the - // same object, but that doesn't work so well. - if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') { - _logJs2['default'].warn(_tsml2['default'](_templateObject, propName, val)); - el.setAttribute(propName, val); - } else { - el[propName] = val; - } - }); - - Object.getOwnPropertyNames(attributes).forEach(function (attrName) { - var val = attributes[attrName]; - el.setAttribute(attrName, attributes[attrName]); - }); - - return el; -} - -/** - * Injects text into an element, replacing any existing contents entirely. - * - * @param {Element} el - * @param {String} text - * @return {Element} - * @function textContent - */ - -function textContent(el, text) { - if (typeof el.textContent === 'undefined') { - el.innerText = text; - } else { - el.textContent = text; - } -} - -/** - * Insert an element as the first child node of another - * - * @param {Element} child Element to insert - * @param {Element} parent Element to insert child into - * @private - * @function insertElFirst - */ - -function insertElFirst(child, parent) { - if (parent.firstChild) { - parent.insertBefore(child, parent.firstChild); - } else { - parent.appendChild(child); - } -} - -/** - * Element Data Store. Allows for binding data to an element without putting it directly on the element. - * Ex. Event listeners are stored here. - * (also from jsninja.com, slightly modified and updated for closure compiler) - * - * @type {Object} - * @private - */ -var elData = {}; - -/* - * Unique attribute name to store an element's guid in - * - * @type {String} - * @constant - * @private - */ -var elIdAttr = 'vdata' + new Date().getTime(); - -/** - * Returns the cache object where data for an element is stored - * - * @param {Element} el Element to store data for. - * @return {Object} - * @function getElData - */ - -function getElData(el) { - var id = el[elIdAttr]; - - if (!id) { - id = el[elIdAttr] = Guid.newGUID(); - } - - if (!elData[id]) { - elData[id] = {}; - } - - return elData[id]; -} - -/** - * Returns whether or not an element has cached data - * - * @param {Element} el A dom element - * @return {Boolean} - * @private - * @function hasElData - */ - -function hasElData(el) { - var id = el[elIdAttr]; - - if (!id) { - return false; - } - - return !!Object.getOwnPropertyNames(elData[id]).length; -} - -/** - * Delete data for the element from the cache and the guid attr from getElementById - * - * @param {Element} el Remove data for an element - * @private - * @function removeElData - */ - -function removeElData(el) { - var id = el[elIdAttr]; - - if (!id) { - return; - } - - // Remove all stored data - delete elData[id]; - - // Remove the elIdAttr property from the DOM node - try { - delete el[elIdAttr]; - } catch (e) { - if (el.removeAttribute) { - el.removeAttribute(elIdAttr); - } else { - // IE doesn't appear to support removeAttribute on the document element - el[elIdAttr] = null; - } - } -} - -/** - * Check if an element has a CSS class - * - * @function hasElClass - * @param {Element} element Element to check - * @param {String} classToCheck Classname to check - */ - -function hasElClass(element, classToCheck) { - if (element.classList) { - return element.classList.contains(classToCheck); - } else { - throwIfWhitespace(classToCheck); - return classRegExp(classToCheck).test(element.className); - } -} - -/** - * Add a CSS class name to an element - * - * @function addElClass - * @param {Element} element Element to add class name to - * @param {String} classToAdd Classname to add - */ - -function addElClass(element, classToAdd) { - if (element.classList) { - element.classList.add(classToAdd); - - // Don't need to `throwIfWhitespace` here because `hasElClass` will do it - // in the case of classList not being supported. - } else if (!hasElClass(element, classToAdd)) { - element.className = (element.className + ' ' + classToAdd).trim(); - } - - return element; -} - -/** - * Remove a CSS class name from an element - * - * @function removeElClass - * @param {Element} element Element to remove from class name - * @param {String} classToRemove Classname to remove - */ - -function removeElClass(element, classToRemove) { - if (element.classList) { - element.classList.remove(classToRemove); - } else { - throwIfWhitespace(classToRemove); - element.className = element.className.split(/\s+/).filter(function (c) { - return c !== classToRemove; - }).join(' '); - } - - return element; -} - -/** - * Adds or removes a CSS class name on an element depending on an optional - * condition or the presence/absence of the class name. - * - * @function toggleElClass - * @param {Element} element - * @param {String} classToToggle - * @param {Boolean|Function} [predicate] - * Can be a function that returns a Boolean. If `true`, the class - * will be added; if `false`, the class will be removed. If not - * given, the class will be added if not present and vice versa. - */ - -function toggleElClass(element, classToToggle, predicate) { - - // This CANNOT use `classList` internally because IE does not support the - // second parameter to the `classList.toggle()` method! Which is fine because - // `classList` will be used by the add/remove functions. - var has = hasElClass(element, classToToggle); - - if (typeof predicate === 'function') { - predicate = predicate(element, classToToggle); - } - - if (typeof predicate !== 'boolean') { - predicate = !has; - } - - // If the necessary class operation matches the current state of the - // element, no action is required. - if (predicate === has) { - return; - } - - if (predicate) { - addElClass(element, classToToggle); - } else { - removeElClass(element, classToToggle); - } - - return element; -} - -/** - * Apply attributes to an HTML element. - * - * @param {Element} el Target element. - * @param {Object=} attributes Element attributes to be applied. - * @private - * @function setElAttributes - */ - -function setElAttributes(el, attributes) { - Object.getOwnPropertyNames(attributes).forEach(function (attrName) { - var attrValue = attributes[attrName]; - - if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) { - el.removeAttribute(attrName); - } else { - el.setAttribute(attrName, attrValue === true ? '' : attrValue); - } - }); -} - -/** - * Get an element's attribute values, as defined on the HTML tag - * Attributes are not the same as properties. They're defined on the tag - * or with setAttribute (which shouldn't be used with HTML) - * This will return true or false for boolean attributes. - * - * @param {Element} tag Element from which to get tag attributes - * @return {Object} - * @private - * @function getElAttributes - */ - -function getElAttributes(tag) { - var obj, knownBooleans, attrs, attrName, attrVal; - - obj = {}; - - // known boolean attributes - // we can check for matching boolean properties, but older browsers - // won't know about HTML5 boolean attributes that we still read from - knownBooleans = ',' + 'autoplay,controls,loop,muted,default' + ','; - - if (tag && tag.attributes && tag.attributes.length > 0) { - attrs = tag.attributes; - - for (var i = attrs.length - 1; i >= 0; i--) { - attrName = attrs[i].name; - attrVal = attrs[i].value; - - // check for known booleans - // the matching element property will return a value for typeof - if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) { - // the value of an included boolean attribute is typically an empty - // string ('') which would equal false if we just check for a false value. - // we also don't want support bad code like autoplay='false' - attrVal = attrVal !== null ? true : false; - } - - obj[attrName] = attrVal; - } - } - - return obj; -} - -/** - * Attempt to block the ability to select text while dragging controls - * - * @return {Boolean} - * @function blockTextSelection - */ - -function blockTextSelection() { - _globalDocument2['default'].body.focus(); - _globalDocument2['default'].onselectstart = function () { - return false; - }; -} - -/** - * Turn off text selection blocking - * - * @return {Boolean} - * @function unblockTextSelection - */ - -function unblockTextSelection() { - _globalDocument2['default'].onselectstart = function () { - return true; - }; -} - -/** - * Offset Left - * getBoundingClientRect technique from - * John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/ - * - * @function findElPosition - * @param {Element} el Element from which to get offset - * @return {Object} - */ - -function findElPosition(el) { - var box = undefined; - - if (el.getBoundingClientRect && el.parentNode) { - box = el.getBoundingClientRect(); - } - - if (!box) { - return { - left: 0, - top: 0 - }; - } - - var docEl = _globalDocument2['default'].documentElement; - var body = _globalDocument2['default'].body; - - var clientLeft = docEl.clientLeft || body.clientLeft || 0; - var scrollLeft = _globalWindow2['default'].pageXOffset || body.scrollLeft; - var left = box.left + scrollLeft - clientLeft; - - var clientTop = docEl.clientTop || body.clientTop || 0; - var scrollTop = _globalWindow2['default'].pageYOffset || body.scrollTop; - var top = box.top + scrollTop - clientTop; - - // Android sometimes returns slightly off decimal values, so need to round - return { - left: Math.round(left), - top: Math.round(top) - }; -} - -/** - * Get pointer position in element - * Returns an object with x and y coordinates. - * The base on the coordinates are the bottom left of the element. - * - * @function getPointerPosition - * @param {Element} el Element on which to get the pointer position on - * @param {Event} event Event object - * @return {Object} This object will have x and y coordinates corresponding to the mouse position - */ - -function getPointerPosition(el, event) { - var position = {}; - var box = findElPosition(el); - var boxW = el.offsetWidth; - var boxH = el.offsetHeight; - - var boxY = box.top; - var boxX = box.left; - var pageY = event.pageY; - var pageX = event.pageX; - - if (event.changedTouches) { - pageX = event.changedTouches[0].pageX; - pageY = event.changedTouches[0].pageY; - } - - position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH)); - position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW)); - - return position; -} - -/** - * Determines, via duck typing, whether or not a value is a DOM element. - * - * @function isEl - * @param {Mixed} value - * @return {Boolean} - */ - -function isEl(value) { - return !!value && typeof value === 'object' && value.nodeType === 1; -} - -/** - * Determines, via duck typing, whether or not a value is a text node. - * - * @param {Mixed} value - * @return {Boolean} - */ - -function isTextNode(value) { - return !!value && typeof value === 'object' && value.nodeType === 3; -} - -/** - * Empties the contents of an element. - * - * @function emptyEl - * @param {Element} el - * @return {Element} - */ - -function emptyEl(el) { - while (el.firstChild) { - el.removeChild(el.firstChild); - } - return el; -} - -/** - * Normalizes content for eventual insertion into the DOM. - * - * This allows a wide range of content definition methods, but protects - * from falling into the trap of simply writing to `innerHTML`, which is - * an XSS concern. - * - * The content for an element can be passed in multiple types and - * combinations, whose behavior is as follows: - * - * - String - * Normalized into a text node. - * - * - Element, TextNode - * Passed through. - * - * - Array - * A one-dimensional array of strings, elements, nodes, or functions (which - * return single strings, elements, or nodes). - * - * - Function - * If the sole argument, is expected to produce a string, element, - * node, or array. - * - * @function normalizeContent - * @param {String|Element|TextNode|Array|Function} content - * @return {Array} - */ - -function normalizeContent(content) { - - // First, invoke content if it is a function. If it produces an array, - // that needs to happen before normalization. - if (typeof content === 'function') { - content = content(); - } - - // Next up, normalize to an array, so one or many items can be normalized, - // filtered, and returned. - return (Array.isArray(content) ? content : [content]).map(function (value) { - - // First, invoke value if it is a function to produce a new value, - // which will be subsequently normalized to a Node of some kind. - if (typeof value === 'function') { - value = value(); - } - - if (isEl(value) || isTextNode(value)) { - return value; - } - - if (typeof value === 'string' && /\S/.test(value)) { - return _globalDocument2['default'].createTextNode(value); - } - }).filter(function (value) { - return value; - }); -} - -/** - * Normalizes and appends content to an element. - * - * @function appendContent - * @param {Element} el - * @param {String|Element|TextNode|Array|Function} content - * See: `normalizeContent` - * @return {Element} - */ - -function appendContent(el, content) { - normalizeContent(content).forEach(function (node) { - return el.appendChild(node); - }); - return el; -} - -/** - * Normalizes and inserts content into an element; this is identical to - * `appendContent()`, except it empties the element first. - * - * @function insertContent - * @param {Element} el - * @param {String|Element|TextNode|Array|Function} content - * See: `normalizeContent` - * @return {Element} - */ - -function insertContent(el, content) { - return appendContent(emptyEl(el), content); -} - -/** - * Finds a single DOM element matching `selector` within the optional - * `context` of another DOM element (defaulting to `document`). - * - * @function $ - * @param {String} selector - * A valid CSS selector, which will be passed to `querySelector`. - * - * @param {Element|String} [context=document] - * A DOM element within which to query. Can also be a selector - * string in which case the first matching element will be used - * as context. If missing (or no element matches selector), falls - * back to `document`. - * - * @return {Element|null} - */ -var $ = createQuerier('querySelector'); - -exports.$ = $; -/** - * Finds a all DOM elements matching `selector` within the optional - * `context` of another DOM element (defaulting to `document`). - * - * @function $$ - * @param {String} selector - * A valid CSS selector, which will be passed to `querySelectorAll`. - * - * @param {Element|String} [context=document] - * A DOM element within which to query. Can also be a selector - * string in which case the first matching element will be used - * as context. If missing (or no element matches selector), falls - * back to `document`. - * - * @return {NodeList} - */ -var $$ = createQuerier('querySelectorAll'); -exports.$$ = $$; - -},{"./guid.js":138,"./log.js":139,"global/document":1,"global/window":2,"tsml":55}],135:[function(_dereq_,module,exports){ -/** - * @file events.js - * - * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/) - * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible) - * This should work very similarly to jQuery's events, however it's based off the book version which isn't as - * robust as jquery's, so there's probably some differences. - */ - -'use strict'; - -exports.__esModule = true; -exports.on = on; -exports.off = off; -exports.trigger = trigger; -exports.one = one; -exports.fixEvent = fixEvent; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -var _domJs = _dereq_('./dom.js'); - -var Dom = _interopRequireWildcard(_domJs); - -var _guidJs = _dereq_('./guid.js'); - -var Guid = _interopRequireWildcard(_guidJs); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -/** - * Add an event listener to element - * It stores the handler function in a separate cache object - * and adds a generic handler to the element's event, - * along with a unique id (guid) to the element. - * - * @param {Element|Object} elem Element or object to bind listeners to - * @param {String|Array} type Type of event to bind to. - * @param {Function} fn Event listener. - * @method on - */ - -function on(elem, type, fn) { - if (Array.isArray(type)) { - return _handleMultipleEvents(on, elem, type, fn); - } - - var data = Dom.getElData(elem); - - // We need a place to store all our handler data - if (!data.handlers) data.handlers = {}; - - if (!data.handlers[type]) data.handlers[type] = []; - - if (!fn.guid) fn.guid = Guid.newGUID(); - - data.handlers[type].push(fn); - - if (!data.dispatcher) { - data.disabled = false; - - data.dispatcher = function (event, hash) { - - if (data.disabled) return; - event = fixEvent(event); - - var handlers = data.handlers[event.type]; - - if (handlers) { - // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off. - var handlersCopy = handlers.slice(0); - - for (var m = 0, n = handlersCopy.length; m < n; m++) { - if (event.isImmediatePropagationStopped()) { - break; - } else { - handlersCopy[m].call(elem, event, hash); - } - } - } - }; - } - - if (data.handlers[type].length === 1) { - if (elem.addEventListener) { - elem.addEventListener(type, data.dispatcher, false); - } else if (elem.attachEvent) { - elem.attachEvent('on' + type, data.dispatcher); - } - } -} - -/** - * Removes event listeners from an element - * - * @param {Element|Object} elem Object to remove listeners from - * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element. - * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type. - * @method off - */ - -function off(elem, type, fn) { - // Don't want to add a cache object through getElData if not needed - if (!Dom.hasElData(elem)) return; - - var data = Dom.getElData(elem); - - // If no events exist, nothing to unbind - if (!data.handlers) { - return; - } - - if (Array.isArray(type)) { - return _handleMultipleEvents(off, elem, type, fn); - } - - // Utility function - var removeType = function removeType(t) { - data.handlers[t] = []; - _cleanUpEvents(elem, t); - }; - - // Are we removing all bound events? - if (!type) { - for (var t in data.handlers) { - removeType(t); - }return; - } - - var handlers = data.handlers[type]; - - // If no handlers exist, nothing to unbind - if (!handlers) return; - - // If no listener was provided, remove all listeners for type - if (!fn) { - removeType(type); - return; - } - - // We're only removing a single handler - if (fn.guid) { - for (var n = 0; n < handlers.length; n++) { - if (handlers[n].guid === fn.guid) { - handlers.splice(n--, 1); - } - } - } - - _cleanUpEvents(elem, type); -} - -/** - * Trigger an event for an element - * - * @param {Element|Object} elem Element to trigger an event on - * @param {Event|Object|String} event A string (the type) or an event object with a type attribute - * @param {Object} [hash] data hash to pass along with the event - * @return {Boolean=} Returned only if default was prevented - * @method trigger - */ - -function trigger(elem, event, hash) { - // Fetches element data and a reference to the parent (for bubbling). - // Don't want to add a data object to cache for every parent, - // so checking hasElData first. - var elemData = Dom.hasElData(elem) ? Dom.getElData(elem) : {}; - var parent = elem.parentNode || elem.ownerDocument; - // type = event.type || event, - // handler; - - // If an event name was passed as a string, creates an event out of it - if (typeof event === 'string') { - event = { type: event, target: elem }; - } - // Normalizes the event properties. - event = fixEvent(event); - - // If the passed element has a dispatcher, executes the established handlers. - if (elemData.dispatcher) { - elemData.dispatcher.call(elem, event, hash); - } - - // Unless explicitly stopped or the event does not bubble (e.g. media events) - // recursively calls this function to bubble the event up the DOM. - if (parent && !event.isPropagationStopped() && event.bubbles === true) { - trigger.call(null, parent, event, hash); - - // If at the top of the DOM, triggers the default action unless disabled. - } else if (!parent && !event.defaultPrevented) { - var targetData = Dom.getElData(event.target); - - // Checks if the target has a default action for this event. - if (event.target[event.type]) { - // Temporarily disables event dispatching on the target as we have already executed the handler. - targetData.disabled = true; - // Executes the default action. - if (typeof event.target[event.type] === 'function') { - event.target[event.type](); - } - // Re-enables event dispatching. - targetData.disabled = false; - } - } - - // Inform the triggerer if the default was prevented by returning false - return !event.defaultPrevented; -} - -/** - * Trigger a listener only once for an event - * - * @param {Element|Object} elem Element or object to - * @param {String|Array} type Name/type of event - * @param {Function} fn Event handler function - * @method one - */ - -function one(elem, type, fn) { - if (Array.isArray(type)) { - return _handleMultipleEvents(one, elem, type, fn); - } - var func = function func() { - off(elem, type, func); - fn.apply(this, arguments); - }; - // copy the guid to the new function so it can removed using the original function's ID - func.guid = fn.guid = fn.guid || Guid.newGUID(); - on(elem, type, func); -} - -/** - * Fix a native event to have standard property values - * - * @param {Object} event Event object to fix - * @return {Object} - * @private - * @method fixEvent - */ - -function fixEvent(event) { - - function returnTrue() { - return true; - } - function returnFalse() { - return false; - } - - // Test if fixing up is needed - // Used to check if !event.stopPropagation instead of isPropagationStopped - // But native events return true for stopPropagation, but don't have - // other expected methods like isPropagationStopped. Seems to be a problem - // with the Javascript Ninja code. So we're just overriding all events now. - if (!event || !event.isPropagationStopped) { - var old = event || _globalWindow2['default'].event; - - event = {}; - // Clone the old object so that we can modify the values event = {}; - // IE8 Doesn't like when you mess with native event properties - // Firefox returns false for event.hasOwnProperty('type') and other props - // which makes copying more difficult. - // TODO: Probably best to create a whitelist of event props - for (var key in old) { - // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y - // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation - // and webkitMovementX/Y - if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' && key !== 'webkitMovementX' && key !== 'webkitMovementY') { - // Chrome 32+ warns if you try to copy deprecated returnValue, but - // we still want to if preventDefault isn't supported (IE8). - if (!(key === 'returnValue' && old.preventDefault)) { - event[key] = old[key]; - } - } - } - - // The event occurred on this element - if (!event.target) { - event.target = event.srcElement || _globalDocument2['default']; - } - - // Handle which other element the event is related to - if (!event.relatedTarget) { - event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; - } - - // Stop the default browser action - event.preventDefault = function () { - if (old.preventDefault) { - old.preventDefault(); - } - event.returnValue = false; - old.returnValue = false; - event.defaultPrevented = true; - }; - - event.defaultPrevented = false; - - // Stop the event from bubbling - event.stopPropagation = function () { - if (old.stopPropagation) { - old.stopPropagation(); - } - event.cancelBubble = true; - old.cancelBubble = true; - event.isPropagationStopped = returnTrue; - }; - - event.isPropagationStopped = returnFalse; - - // Stop the event from bubbling and executing other handlers - event.stopImmediatePropagation = function () { - if (old.stopImmediatePropagation) { - old.stopImmediatePropagation(); - } - event.isImmediatePropagationStopped = returnTrue; - event.stopPropagation(); - }; - - event.isImmediatePropagationStopped = returnFalse; - - // Handle mouse position - if (event.clientX != null) { - var doc = _globalDocument2['default'].documentElement, - body = _globalDocument2['default'].body; - - event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); - event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); - } - - // Handle key presses - event.which = event.charCode || event.keyCode; - - // Fix button for mouse clicks: - // 0 == left; 1 == middle; 2 == right - if (event.button != null) { - event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0; - } - } - - // Returns fixed-up instance - return event; -} - -/** - * Clean up the listener cache and dispatchers -* - * @param {Element|Object} elem Element to clean up - * @param {String} type Type of event to clean up - * @private - * @method _cleanUpEvents - */ -function _cleanUpEvents(elem, type) { - var data = Dom.getElData(elem); - - // Remove the events of a particular type if there are none left - if (data.handlers[type].length === 0) { - delete data.handlers[type]; - // data.handlers[type] = null; - // Setting to null was causing an error with data.handlers - - // Remove the meta-handler from the element - if (elem.removeEventListener) { - elem.removeEventListener(type, data.dispatcher, false); - } else if (elem.detachEvent) { - elem.detachEvent('on' + type, data.dispatcher); - } - } - - // Remove the events object if there are no types left - if (Object.getOwnPropertyNames(data.handlers).length <= 0) { - delete data.handlers; - delete data.dispatcher; - delete data.disabled; - } - - // Finally remove the element data if there is no data left - if (Object.getOwnPropertyNames(data).length === 0) { - Dom.removeElData(elem); - } -} - -/** - * Loops through an array of event types and calls the requested method for each type. - * - * @param {Function} fn The event method we want to use. - * @param {Element|Object} elem Element or object to bind listeners to - * @param {String} type Type of event to bind to. - * @param {Function} callback Event listener. - * @private - * @function _handleMultipleEvents - */ -function _handleMultipleEvents(fn, elem, types, callback) { - types.forEach(function (type) { - //Call the event method for each one of the types - fn(elem, type, callback); - }); -} - -},{"./dom.js":134,"./guid.js":138,"global/document":1,"global/window":2}],136:[function(_dereq_,module,exports){ -/** - * @file fn.js - */ -'use strict'; - -exports.__esModule = true; - -var _guidJs = _dereq_('./guid.js'); - -/** - * Bind (a.k.a proxy or Context). A simple method for changing the context of a function - * It also stores a unique id on the function so it can be easily removed from events - * - * @param {*} context The object to bind as scope - * @param {Function} fn The function to be bound to a scope - * @param {Number=} uid An optional unique ID for the function to be set - * @return {Function} - * @private - * @method bind - */ -var bind = function bind(context, fn, uid) { - // Make sure the function has a unique ID - if (!fn.guid) { - fn.guid = _guidJs.newGUID(); - } - - // Create the new function that changes the context - var ret = function ret() { - return fn.apply(context, arguments); - }; - - // Allow for the ability to individualize this function - // Needed in the case where multiple objects might share the same prototype - // IF both items add an event listener with the same function, then you try to remove just one - // it will remove both because they both have the same guid. - // when using this, you need to use the bind method when you remove the listener as well. - // currently used in text tracks - ret.guid = uid ? uid + '_' + fn.guid : fn.guid; - - return ret; -}; -exports.bind = bind; - -},{"./guid.js":138}],137:[function(_dereq_,module,exports){ -/** - * @file format-time.js - * - * Format seconds as a time string, H:MM:SS or M:SS - * Supplying a guide (in seconds) will force a number of leading zeros - * to cover the length of the guide - * - * @param {Number} seconds Number of seconds to be turned into a string - * @param {Number} guide Number (in seconds) to model the string after - * @return {String} Time formatted as H:MM:SS or M:SS - * @private - * @function formatTime - */ -'use strict'; - -exports.__esModule = true; -function formatTime(seconds) { - var guide = arguments.length <= 1 || arguments[1] === undefined ? seconds : arguments[1]; - return (function () { - seconds = seconds < 0 ? 0 : seconds; - var s = Math.floor(seconds % 60); - var m = Math.floor(seconds / 60 % 60); - var h = Math.floor(seconds / 3600); - var gm = Math.floor(guide / 60 % 60); - var gh = Math.floor(guide / 3600); - - // handle invalid times - if (isNaN(seconds) || seconds === Infinity) { - // '-' is false for all relational operators (e.g. <, >=) so this setting - // will add the minimum number of fields specified by the guide - h = m = s = '-'; - } - - // Check if we need to show hours - h = h > 0 || gh > 0 ? h + ':' : ''; - - // If hours are showing, we may need to add a leading zero. - // Always show at least one digit of minutes. - m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':'; - - // Check if leading zero is need for seconds - s = s < 10 ? '0' + s : s; - - return h + m + s; - })(); -} - -exports['default'] = formatTime; -module.exports = exports['default']; - -},{}],138:[function(_dereq_,module,exports){ -/** - * @file guid.js - * - * Unique ID for an element or function - * @type {Number} - * @private - */ -"use strict"; - -exports.__esModule = true; -exports.newGUID = newGUID; -var _guid = 1; - -/** - * Get the next unique ID - * - * @return {String} - * @function newGUID - */ - -function newGUID() { - return _guid++; -} - -},{}],139:[function(_dereq_,module,exports){ -/** - * @file log.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -/** - * Log plain debug messages - */ -var log = function log() { - _logType(null, arguments); -}; - -/** - * Keep a history of log messages - * @type {Array} - */ -log.history = []; - -/** - * Log error messages - */ -log.error = function () { - _logType('error', arguments); -}; - -/** - * Log warning messages - */ -log.warn = function () { - _logType('warn', arguments); -}; - -/** - * Log messages to the console and history based on the type of message - * - * @param {String} type The type of message, or `null` for `log` - * @param {Object} args The args to be passed to the log - * @private - * @method _logType - */ -function _logType(type, args) { - // convert args to an array to get array functions - var argsArray = Array.prototype.slice.call(args); - // if there's no console then don't try to output messages - // they will still be stored in log.history - // Was setting these once outside of this function, but containing them - // in the function makes it easier to test cases where console doesn't exist - var noop = function noop() {}; - - var console = _globalWindow2['default']['console'] || { - 'log': noop, - 'warn': noop, - 'error': noop - }; - - if (type) { - // add the type to the front of the message - argsArray.unshift(type.toUpperCase() + ':'); - } else { - // default to log with no prefix - type = 'log'; - } - - // add to history - log.history.push(argsArray); - - // add console prefix after adding to history - argsArray.unshift('VIDEOJS:'); - - // call appropriate log function - if (console[type].apply) { - console[type].apply(console, argsArray); - } else { - // ie8 doesn't allow error.apply, but it will just join() the array anyway - console[type](argsArray.join(' ')); - } -} - -exports['default'] = log; -module.exports = exports['default']; - -},{"global/window":2}],140:[function(_dereq_,module,exports){ -/** - * @file merge-options.js - */ -'use strict'; - -exports.__esModule = true; -exports['default'] = mergeOptions; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _lodashCompatObjectMerge = _dereq_('lodash-compat/object/merge'); - -var _lodashCompatObjectMerge2 = _interopRequireDefault(_lodashCompatObjectMerge); - -function isPlain(obj) { - return !!obj && typeof obj === 'object' && obj.toString() === '[object Object]' && obj.constructor === Object; -} - -/** - * Merge customizer. video.js simply overwrites non-simple objects - * (like arrays) instead of attempting to overlay them. - * @see https://lodash.com/docs#merge - */ -var customizer = function customizer(destination, source) { - // If we're not working with a plain object, copy the value as is - // If source is an array, for instance, it will replace destination - if (!isPlain(source)) { - return source; - } - - // If the new value is a plain object but the first object value is not - // we need to create a new object for the first object to merge with. - // This makes it consistent with how merge() works by default - // and also protects from later changes the to first object affecting - // the second object's values. - if (!isPlain(destination)) { - return mergeOptions(source); - } -}; - -/** - * Merge one or more options objects, recursively merging **only** - * plain object properties. Previously `deepMerge`. - * - * @param {...Object} source One or more objects to merge - * @returns {Object} a new object that is the union of all - * provided objects - * @function mergeOptions - */ - -function mergeOptions() { - // contruct the call dynamically to handle the variable number of - // objects to merge - var args = Array.prototype.slice.call(arguments); - - // unshift an empty object into the front of the call as the target - // of the merge - args.unshift({}); - - // customize conflict resolution to match our historical merge behavior - args.push(customizer); - - _lodashCompatObjectMerge2['default'].apply(null, args); - - // return the mutated result object - return args[0]; -} - -module.exports = exports['default']; - -},{"lodash-compat/object/merge":40}],141:[function(_dereq_,module,exports){ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var createStyleElement = function createStyleElement(className) { - var style = _globalDocument2['default'].createElement('style'); - style.className = className; - - return style; -}; - -exports.createStyleElement = createStyleElement; -var setTextContent = function setTextContent(el, content) { - if (el.styleSheet) { - el.styleSheet.cssText = content; - } else { - el.textContent = content; - } -}; -exports.setTextContent = setTextContent; - -},{"global/document":1}],142:[function(_dereq_,module,exports){ -'use strict'; - -exports.__esModule = true; -exports.createTimeRanges = createTimeRanges; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _logJs = _dereq_('./log.js'); - -var _logJs2 = _interopRequireDefault(_logJs); - -/** - * @file time-ranges.js - * - * Should create a fake TimeRange object - * Mimics an HTML5 time range instance, which has functions that - * return the start and end times for a range - * TimeRanges are returned by the buffered() method - * - * @param {(Number|Array)} Start of a single range or an array of ranges - * @param {Number} End of a single range - * @private - * @method createTimeRanges - */ - -function createTimeRanges(start, end) { - if (Array.isArray(start)) { - return createTimeRangesObj(start); - } else if (start === undefined || end === undefined) { - return createTimeRangesObj(); - } - return createTimeRangesObj([[start, end]]); -} - -exports.createTimeRange = createTimeRanges; - -function createTimeRangesObj(ranges) { - if (ranges === undefined || ranges.length === 0) { - return { - length: 0, - start: function start() { - throw new Error('This TimeRanges object is empty'); - }, - end: function end() { - throw new Error('This TimeRanges object is empty'); - } - }; - } - return { - length: ranges.length, - start: getRange.bind(null, 'start', 0, ranges), - end: getRange.bind(null, 'end', 1, ranges) - }; -} - -function getRange(fnName, valueIndex, ranges, rangeIndex) { - if (rangeIndex === undefined) { - _logJs2['default'].warn('DEPRECATED: Function \'' + fnName + '\' on \'TimeRanges\' called without an index argument.'); - rangeIndex = 0; - } - rangeCheck(fnName, rangeIndex, ranges.length - 1); - return ranges[rangeIndex][valueIndex]; -} - -function rangeCheck(fnName, index, maxIndex) { - if (index < 0 || index > maxIndex) { - throw new Error('Failed to execute \'' + fnName + '\' on \'TimeRanges\': The index provided (' + index + ') is greater than or equal to the maximum bound (' + maxIndex + ').'); - } -} - -},{"./log.js":139}],143:[function(_dereq_,module,exports){ -/** - * @file to-title-case.js - * - * Uppercase the first letter of a string - * - * @param {String} string String to be uppercased - * @return {String} - * @private - * @method toTitleCase - */ -"use strict"; - -exports.__esModule = true; -function toTitleCase(string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} - -exports["default"] = toTitleCase; -module.exports = exports["default"]; - -},{}],144:[function(_dereq_,module,exports){ -/** - * @file url.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -/** - * Resolve and parse the elements of a URL - * - * @param {String} url The url to parse - * @return {Object} An object of url details - * @method parseUrl - */ -var parseUrl = function parseUrl(url) { - var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; - - // add the url to an anchor and let the browser parse the URL - var a = _globalDocument2['default'].createElement('a'); - a.href = url; - - // IE8 (and 9?) Fix - // ie8 doesn't parse the URL correctly until the anchor is actually - // added to the body, and an innerHTML is needed to trigger the parsing - var addToBody = a.host === '' && a.protocol !== 'file:'; - var div = undefined; - if (addToBody) { - div = _globalDocument2['default'].createElement('div'); - div.innerHTML = ''; - a = div.firstChild; - // prevent the div from affecting layout - div.setAttribute('style', 'display:none; position:absolute;'); - _globalDocument2['default'].body.appendChild(div); - } - - // Copy the specific URL properties to a new object - // This is also needed for IE8 because the anchor loses its - // properties when it's removed from the dom - var details = {}; - for (var i = 0; i < props.length; i++) { - details[props[i]] = a[props[i]]; - } - - // IE9 adds the port to the host property unlike everyone else. If - // a port identifier is added for standard ports, strip it. - if (details.protocol === 'http:') { - details.host = details.host.replace(/:80$/, ''); - } - if (details.protocol === 'https:') { - details.host = details.host.replace(/:443$/, ''); - } - - if (addToBody) { - _globalDocument2['default'].body.removeChild(div); - } - - return details; -}; - -exports.parseUrl = parseUrl; -/** - * Get absolute version of relative URL. Used to tell flash correct URL. - * http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue - * - * @param {String} url URL to make absolute - * @return {String} Absolute URL - * @private - * @method getAbsoluteURL - */ -var getAbsoluteURL = function getAbsoluteURL(url) { - // Check if absolute URL - if (!url.match(/^https?:\/\//)) { - // Convert to absolute URL. Flash hosted off-site needs an absolute URL. - var div = _globalDocument2['default'].createElement('div'); - div.innerHTML = 'x'; - url = div.firstChild.href; - } - - return url; -}; - -exports.getAbsoluteURL = getAbsoluteURL; -/** - * Returns the extension of the passed file name. It will return an empty string if you pass an invalid path - * - * @param {String} path The fileName path like '/path/to/file.mp4' - * @returns {String} The extension in lower case or an empty string if no extension could be found. - * @method getFileExtension - */ -var getFileExtension = function getFileExtension(path) { - if (typeof path === 'string') { - var splitPathRe = /^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i; - var pathParts = splitPathRe.exec(path); - - if (pathParts) { - return pathParts.pop().toLowerCase(); - } - } - - return ''; -}; - -exports.getFileExtension = getFileExtension; -/** - * Returns whether the url passed is a cross domain request or not. - * - * @param {String} url The url to check - * @return {Boolean} Whether it is a cross domain request or not - * @method isCrossOrigin - */ -var isCrossOrigin = function isCrossOrigin(url) { - var winLoc = _globalWindow2['default'].location; - var urlInfo = parseUrl(url); - - // IE8 protocol relative urls will return ':' for protocol - var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol; - - // Check if url is for another domain/origin - // IE8 doesn't know location.origin, so we won't rely on it here - var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host; - - return crossOrigin; -}; -exports.isCrossOrigin = isCrossOrigin; - -},{"global/document":1,"global/window":2}],145:[function(_dereq_,module,exports){ -/** - * @file video.js - */ -'use strict'; - -exports.__esModule = true; - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _globalWindow = _dereq_('global/window'); - -var _globalWindow2 = _interopRequireDefault(_globalWindow); - -var _globalDocument = _dereq_('global/document'); - -var _globalDocument2 = _interopRequireDefault(_globalDocument); - -var _setup = _dereq_('./setup'); - -var setup = _interopRequireWildcard(_setup); - -var _utilsStylesheetJs = _dereq_('./utils/stylesheet.js'); - -var stylesheet = _interopRequireWildcard(_utilsStylesheetJs); - -var _component = _dereq_('./component'); - -var _component2 = _interopRequireDefault(_component); - -var _eventTarget = _dereq_('./event-target'); - -var _eventTarget2 = _interopRequireDefault(_eventTarget); - -var _utilsEventsJs = _dereq_('./utils/events.js'); - -var Events = _interopRequireWildcard(_utilsEventsJs); - -var _player = _dereq_('./player'); - -var _player2 = _interopRequireDefault(_player); - -var _pluginsJs = _dereq_('./plugins.js'); - -var _pluginsJs2 = _interopRequireDefault(_pluginsJs); - -var _srcJsUtilsMergeOptionsJs = _dereq_('../../src/js/utils/merge-options.js'); - -var _srcJsUtilsMergeOptionsJs2 = _interopRequireDefault(_srcJsUtilsMergeOptionsJs); - -var _utilsFnJs = _dereq_('./utils/fn.js'); - -var Fn = _interopRequireWildcard(_utilsFnJs); - -var _tracksTextTrackJs = _dereq_('./tracks/text-track.js'); - -var _tracksTextTrackJs2 = _interopRequireDefault(_tracksTextTrackJs); - -var _objectAssign = _dereq_('object.assign'); - -var _objectAssign2 = _interopRequireDefault(_objectAssign); - -var _utilsTimeRangesJs = _dereq_('./utils/time-ranges.js'); - -var _utilsFormatTimeJs = _dereq_('./utils/format-time.js'); - -var _utilsFormatTimeJs2 = _interopRequireDefault(_utilsFormatTimeJs); - -var _utilsLogJs = _dereq_('./utils/log.js'); - -var _utilsLogJs2 = _interopRequireDefault(_utilsLogJs); - -var _utilsDomJs = _dereq_('./utils/dom.js'); - -var Dom = _interopRequireWildcard(_utilsDomJs); - -var _utilsBrowserJs = _dereq_('./utils/browser.js'); - -var browser = _interopRequireWildcard(_utilsBrowserJs); - -var _utilsUrlJs = _dereq_('./utils/url.js'); - -var Url = _interopRequireWildcard(_utilsUrlJs); - -var _extendJs = _dereq_('./extend.js'); - -var _extendJs2 = _interopRequireDefault(_extendJs); - -var _lodashCompatObjectMerge = _dereq_('lodash-compat/object/merge'); - -var _lodashCompatObjectMerge2 = _interopRequireDefault(_lodashCompatObjectMerge); - -var _utilsCreateDeprecationProxyJs = _dereq_('./utils/create-deprecation-proxy.js'); - -var _utilsCreateDeprecationProxyJs2 = _interopRequireDefault(_utilsCreateDeprecationProxyJs); - -var _xhr = _dereq_('xhr'); - -var _xhr2 = _interopRequireDefault(_xhr); - -// Include the built-in techs - -var _techTechJs = _dereq_('./tech/tech.js'); - -var _techTechJs2 = _interopRequireDefault(_techTechJs); - -var _techHtml5Js = _dereq_('./tech/html5.js'); - -var _techHtml5Js2 = _interopRequireDefault(_techHtml5Js); - -var _techFlashJs = _dereq_('./tech/flash.js'); - -var _techFlashJs2 = _interopRequireDefault(_techFlashJs); - -// HTML5 Element Shim for IE8 -if (typeof HTMLVideoElement === 'undefined') { - _globalDocument2['default'].createElement('video'); - _globalDocument2['default'].createElement('audio'); - _globalDocument2['default'].createElement('track'); -} - -/** - * Doubles as the main function for users to create a player instance and also - * the main library object. - * The `videojs` function can be used to initialize or retrieve a player. - * ```js - * var myPlayer = videojs('my_video_id'); - * ``` - * - * @param {String|Element} id Video element or video element ID - * @param {Object=} options Optional options object for config/settings - * @param {Function=} ready Optional ready callback - * @return {Player} A player instance - * @mixes videojs - * @method videojs - */ -var videojs = function videojs(id, options, ready) { - var tag = undefined; // Element of ID - - // Allow for element or ID to be passed in - // String ID - if (typeof id === 'string') { - - // Adjust for jQuery ID syntax - if (id.indexOf('#') === 0) { - id = id.slice(1); - } - - // If a player instance has already been created for this ID return it. - if (videojs.getPlayers()[id]) { - - // If options or ready funtion are passed, warn - if (options) { - _utilsLogJs2['default'].warn('Player "' + id + '" is already initialised. Options will not be applied.'); - } - - if (ready) { - videojs.getPlayers()[id].ready(ready); - } - - return videojs.getPlayers()[id]; - - // Otherwise get element for ID - } else { - tag = Dom.getEl(id); - } - - // ID is a media element - } else { - tag = id; - } - - // Check for a useable element - if (!tag || !tag.nodeName) { - // re: nodeName, could be a box div also - throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns - } - - // Element may have a player attr referring to an already created player instance. - // If not, set up a new player and return the instance. - return tag['player'] || _player2['default'].players[tag.playerId] || new _player2['default'](tag, options, ready); -}; - -// Add default styles -if (_globalWindow2['default'].VIDEOJS_NO_DYNAMIC_STYLE !== true) { - var style = Dom.$('.vjs-styles-defaults'); - - if (!style) { - style = stylesheet.createStyleElement('vjs-styles-defaults'); - var head = Dom.$('head'); - head.insertBefore(style, head.firstChild); - stylesheet.setTextContent(style, '\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n '); - } -} - -// Run Auto-load players -// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version) -setup.autoSetupTimeout(1, videojs); - -/* - * Current software version (semver) - * - * @type {String} - */ -videojs.VERSION = '5.9.0'; - -/** - * The global options object. These are the settings that take effect - * if no overrides are specified when the player is created. - * - * ```js - * videojs.options.autoplay = true - * // -> all players will autoplay by default - * ``` - * - * @type {Object} - */ -videojs.options = _player2['default'].prototype.options_; - -/** - * Get an object with the currently created players, keyed by player ID - * - * @return {Object} The created players - * @mixes videojs - * @method getPlayers - */ -videojs.getPlayers = function () { - return _player2['default'].players; -}; - -/** - * For backward compatibility, expose players object. - * - * @deprecated - * @memberOf videojs - * @property {Object|Proxy} players - */ -videojs.players = _utilsCreateDeprecationProxyJs2['default'](_player2['default'].players, { - get: 'Access to videojs.players is deprecated; use videojs.getPlayers instead', - set: 'Modification of videojs.players is deprecated' -}); - -/** - * Get a component class object by name - * ```js - * var VjsButton = videojs.getComponent('Button'); - * // Create a new instance of the component - * var myButton = new VjsButton(myPlayer); - * ``` - * - * @return {Component} Component identified by name - * @mixes videojs - * @method getComponent - */ -videojs.getComponent = _component2['default'].getComponent; - -/** - * Register a component so it can referred to by name - * Used when adding to other - * components, either through addChild - * `component.addChild('myComponent')` - * or through default children options - * `{ children: ['myComponent'] }`. - * ```js - * // Get a component to subclass - * var VjsButton = videojs.getComponent('Button'); - * // Subclass the component (see 'extend' doc for more info) - * var MySpecialButton = videojs.extend(VjsButton, {}); - * // Register the new component - * VjsButton.registerComponent('MySepcialButton', MySepcialButton); - * // (optionally) add the new component as a default player child - * myPlayer.addChild('MySepcialButton'); - * ``` - * NOTE: You could also just initialize the component before adding. - * `component.addChild(new MyComponent());` - * - * @param {String} The class name of the component - * @param {Component} The component class - * @return {Component} The newly registered component - * @mixes videojs - * @method registerComponent - */ -videojs.registerComponent = function (name, comp) { - if (_techTechJs2['default'].isTech(comp)) { - _utilsLogJs2['default'].warn('The ' + name + ' tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)'); - } - - _component2['default'].registerComponent.call(_component2['default'], name, comp); -}; - -/** - * Get a Tech class object by name - * ```js - * var Html5 = videojs.getTech('Html5'); - * // Create a new instance of the component - * var html5 = new Html5(options); - * ``` - * - * @return {Tech} Tech identified by name - * @mixes videojs - * @method getComponent - */ -videojs.getTech = _techTechJs2['default'].getTech; - -/** - * Register a Tech so it can referred to by name. - * This is used in the tech order for the player. - * - * ```js - * // get the Html5 Tech - * var Html5 = videojs.getTech('Html5'); - * var MyTech = videojs.extend(Html5, {}); - * // Register the new Tech - * VjsButton.registerTech('Tech', MyTech); - * var player = videojs('myplayer', { - * techOrder: ['myTech', 'html5'] - * }); - * ``` - * - * @param {String} The class name of the tech - * @param {Tech} The tech class - * @return {Tech} The newly registered Tech - * @mixes videojs - * @method registerTech - */ -videojs.registerTech = _techTechJs2['default'].registerTech; - -/** - * A suite of browser and device tests - * - * @type {Object} - * @private - */ -videojs.browser = browser; - -/** - * Whether or not the browser supports touch events. Included for backward - * compatibility with 4.x, but deprecated. Use `videojs.browser.TOUCH_ENABLED` - * instead going forward. - * - * @deprecated - * @type {Boolean} - */ -videojs.TOUCH_ENABLED = browser.TOUCH_ENABLED; - -/** - * Subclass an existing class - * Mimics ES6 subclassing with the `extend` keyword - * ```js - * // Create a basic javascript 'class' - * function MyClass(name){ - * // Set a property at initialization - * this.myName = name; - * } - * // Create an instance method - * MyClass.prototype.sayMyName = function(){ - * alert(this.myName); - * }; - * // Subclass the exisitng class and change the name - * // when initializing - * var MySubClass = videojs.extend(MyClass, { - * constructor: function(name) { - * // Call the super class constructor for the subclass - * MyClass.call(this, name) - * } - * }); - * // Create an instance of the new sub class - * var myInstance = new MySubClass('John'); - * myInstance.sayMyName(); // -> should alert "John" - * ``` - * - * @param {Function} The Class to subclass - * @param {Object} An object including instace methods for the new class - * Optionally including a `constructor` function - * @return {Function} The newly created subclass - * @mixes videojs - * @method extend - */ -videojs.extend = _extendJs2['default']; - -/** - * Merge two options objects recursively - * Performs a deep merge like lodash.merge but **only merges plain objects** - * (not arrays, elements, anything else) - * Other values will be copied directly from the second object. - * ```js - * var defaultOptions = { - * foo: true, - * bar: { - * a: true, - * b: [1,2,3] - * } - * }; - * var newOptions = { - * foo: false, - * bar: { - * b: [4,5,6] - * } - * }; - * var result = videojs.mergeOptions(defaultOptions, newOptions); - * // result.foo = false; - * // result.bar.a = true; - * // result.bar.b = [4,5,6]; - * ``` - * - * @param {Object} defaults The options object whose values will be overriden - * @param {Object} overrides The options object with values to override the first - * @param {Object} etc Any number of additional options objects - * - * @return {Object} a new object with the merged values - * @mixes videojs - * @method mergeOptions - */ -videojs.mergeOptions = _srcJsUtilsMergeOptionsJs2['default']; - -/** - * Change the context (this) of a function - * - * videojs.bind(newContext, function(){ - * this === newContext - * }); - * - * NOTE: as of v5.0 we require an ES5 shim, so you should use the native - * `function(){}.bind(newContext);` instead of this. - * - * @param {*} context The object to bind as scope - * @param {Function} fn The function to be bound to a scope - * @param {Number=} uid An optional unique ID for the function to be set - * @return {Function} - */ -videojs.bind = Fn.bind; - -/** - * Create a Video.js player plugin - * Plugins are only initialized when options for the plugin are included - * in the player options, or the plugin function on the player instance is - * called. - * **See the plugin guide in the docs for a more detailed example** - * ```js - * // Make a plugin that alerts when the player plays - * videojs.plugin('myPlugin', function(myPluginOptions) { - * myPluginOptions = myPluginOptions || {}; - * - * var player = this; - * var alertText = myPluginOptions.text || 'Player is playing!' - * - * player.on('play', function(){ - * alert(alertText); - * }); - * }); - * // USAGE EXAMPLES - * // EXAMPLE 1: New player with plugin options, call plugin immediately - * var player1 = videojs('idOne', { - * myPlugin: { - * text: 'Custom text!' - * } - * }); - * // Click play - * // --> Should alert 'Custom text!' - * // EXAMPLE 3: New player, initialize plugin later - * var player3 = videojs('idThree'); - * // Click play - * // --> NO ALERT - * // Click pause - * // Initialize plugin using the plugin function on the player instance - * player3.myPlugin({ - * text: 'Plugin added later!' - * }); - * // Click play - * // --> Should alert 'Plugin added later!' - * ``` - * - * @param {String} name The plugin name - * @param {Function} fn The plugin function that will be called with options - * @mixes videojs - * @method plugin - */ -videojs.plugin = _pluginsJs2['default']; - -/** - * Adding languages so that they're available to all players. - * ```js - * videojs.addLanguage('es', { 'Hello': 'Hola' }); - * ``` - * - * @param {String} code The language code or dictionary property - * @param {Object} data The data values to be translated - * @return {Object} The resulting language dictionary object - * @mixes videojs - * @method addLanguage - */ -videojs.addLanguage = function (code, data) { - var _merge; - - code = ('' + code).toLowerCase(); - return _lodashCompatObjectMerge2['default'](videojs.options.languages, (_merge = {}, _merge[code] = data, _merge))[code]; -}; - -/** - * Log debug messages. - * - * @param {...Object} messages One or more messages to log - */ -videojs.log = _utilsLogJs2['default']; - -/** - * Creates an emulated TimeRange object. - * - * @param {Number|Array} start Start time in seconds or an array of ranges - * @param {Number} end End time in seconds - * @return {Object} Fake TimeRange object - * @method createTimeRange - */ -videojs.createTimeRange = videojs.createTimeRanges = _utilsTimeRangesJs.createTimeRanges; - -/** - * Format seconds as a time string, H:MM:SS or M:SS - * Supplying a guide (in seconds) will force a number of leading zeros - * to cover the length of the guide - * - * @param {Number} seconds Number of seconds to be turned into a string - * @param {Number} guide Number (in seconds) to model the string after - * @return {String} Time formatted as H:MM:SS or M:SS - * @method formatTime - */ -videojs.formatTime = _utilsFormatTimeJs2['default']; - -/** - * Resolve and parse the elements of a URL - * - * @param {String} url The url to parse - * @return {Object} An object of url details - * @method parseUrl - */ -videojs.parseUrl = Url.parseUrl; - -/** - * Returns whether the url passed is a cross domain request or not. - * - * @param {String} url The url to check - * @return {Boolean} Whether it is a cross domain request or not - * @method isCrossOrigin - */ -videojs.isCrossOrigin = Url.isCrossOrigin; - -/** - * Event target class. - * - * @type {Function} - */ -videojs.EventTarget = _eventTarget2['default']; - -/** - * Add an event listener to element - * It stores the handler function in a separate cache object - * and adds a generic handler to the element's event, - * along with a unique id (guid) to the element. - * - * @param {Element|Object} elem Element or object to bind listeners to - * @param {String|Array} type Type of event to bind to. - * @param {Function} fn Event listener. - * @method on - */ -videojs.on = Events.on; - -/** - * Trigger a listener only once for an event - * - * @param {Element|Object} elem Element or object to - * @param {String|Array} type Name/type of event - * @param {Function} fn Event handler function - * @method one - */ -videojs.one = Events.one; - -/** - * Removes event listeners from an element - * - * @param {Element|Object} elem Object to remove listeners from - * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element. - * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type. - * @method off - */ -videojs.off = Events.off; - -/** - * Trigger an event for an element - * - * @param {Element|Object} elem Element to trigger an event on - * @param {Event|Object|String} event A string (the type) or an event object with a type attribute - * @param {Object} [hash] data hash to pass along with the event - * @return {Boolean=} Returned only if default was prevented - * @method trigger - */ -videojs.trigger = Events.trigger; - -/** - * A cross-browser XMLHttpRequest wrapper. Here's a simple example: - * - * videojs.xhr({ - * body: someJSONString, - * uri: "/foo", - * headers: { - * "Content-Type": "application/json" - * } - * }, function (err, resp, body) { - * // check resp.statusCode - * }); - * - * Check out the [full - * documentation](https://github.com/Raynos/xhr/blob/v2.1.0/README.md) - * for more options. - * - * @param {Object} options settings for the request. - * @return {XMLHttpRequest|XDomainRequest} the request object. - * @see https://github.com/Raynos/xhr - */ -videojs.xhr = _xhr2['default']; - -/** - * TextTrack class - * - * @type {Function} - */ -videojs.TextTrack = _tracksTextTrackJs2['default']; - -/** - * Determines, via duck typing, whether or not a value is a DOM element. - * - * @method isEl - * @param {Mixed} value - * @return {Boolean} - */ -videojs.isEl = Dom.isEl; - -/** - * Determines, via duck typing, whether or not a value is a text node. - * - * @method isTextNode - * @param {Mixed} value - * @return {Boolean} - */ -videojs.isTextNode = Dom.isTextNode; - -/** - * Creates an element and applies properties. - * - * @method createEl - * @param {String} [tagName='div'] Name of tag to be created. - * @param {Object} [properties={}] Element properties to be applied. - * @param {Object} [attributes={}] Element attributes to be applied. - * @return {Element} - */ -videojs.createEl = Dom.createEl; - -/** - * Check if an element has a CSS class - * - * @method hasClass - * @param {Element} element Element to check - * @param {String} classToCheck Classname to check - */ -videojs.hasClass = Dom.hasElClass; - -/** - * Add a CSS class name to an element - * - * @method addClass - * @param {Element} element Element to add class name to - * @param {String} classToAdd Classname to add - */ -videojs.addClass = Dom.addElClass; - -/** - * Remove a CSS class name from an element - * - * @method removeClass - * @param {Element} element Element to remove from class name - * @param {String} classToRemove Classname to remove - */ -videojs.removeClass = Dom.removeElClass; - -/** - * Adds or removes a CSS class name on an element depending on an optional - * condition or the presence/absence of the class name. - * - * @method toggleElClass - * @param {Element} element - * @param {String} classToToggle - * @param {Boolean|Function} [predicate] - * Can be a function that returns a Boolean. If `true`, the class - * will be added; if `false`, the class will be removed. If not - * given, the class will be added if not present and vice versa. - */ -videojs.toggleClass = Dom.toggleElClass; - -/** - * Apply attributes to an HTML element. - * - * @method setAttributes - * @param {Element} el Target element. - * @param {Object=} attributes Element attributes to be applied. - */ -videojs.setAttributes = Dom.setElAttributes; - -/** - * Get an element's attribute values, as defined on the HTML tag - * Attributes are not the same as properties. They're defined on the tag - * or with setAttribute (which shouldn't be used with HTML) - * This will return true or false for boolean attributes. - * - * @method getAttributes - * @param {Element} tag Element from which to get tag attributes - * @return {Object} - */ -videojs.getAttributes = Dom.getElAttributes; - -/** - * Empties the contents of an element. - * - * @method emptyEl - * @param {Element} el - * @return {Element} - */ -videojs.emptyEl = Dom.emptyEl; - -/** - * Normalizes and appends content to an element. - * - * The content for an element can be passed in multiple types and - * combinations, whose behavior is as follows: - * - * - String - * Normalized into a text node. - * - * - Element, TextNode - * Passed through. - * - * - Array - * A one-dimensional array of strings, elements, nodes, or functions (which - * return single strings, elements, or nodes). - * - * - Function - * If the sole argument, is expected to produce a string, element, - * node, or array. - * - * @method appendContent - * @param {Element} el - * @param {String|Element|TextNode|Array|Function} content - * @return {Element} - */ -videojs.appendContent = Dom.appendContent; - -/** - * Normalizes and inserts content into an element; this is identical to - * `appendContent()`, except it empties the element first. - * - * The content for an element can be passed in multiple types and - * combinations, whose behavior is as follows: - * - * - String - * Normalized into a text node. - * - * - Element, TextNode - * Passed through. - * - * - Array - * A one-dimensional array of strings, elements, nodes, or functions (which - * return single strings, elements, or nodes). - * - * - Function - * If the sole argument, is expected to produce a string, element, - * node, or array. - * - * @method insertContent - * @param {Element} el - * @param {String|Element|TextNode|Array|Function} content - * @return {Element} - */ -videojs.insertContent = Dom.insertContent; - -/* - * Custom Universal Module Definition (UMD) - * - * Video.js will never be a non-browser lib so we can simplify UMD a bunch and - * still support requirejs and browserify. This also needs to be closure - * compiler compatible, so string keys are used. - */ -if (typeof define === 'function' && define['amd']) { - define('videojs', [], function () { - return videojs; - }); - - // checking that module is an object too because of umdjs/umd#35 -} else if (typeof exports === 'object' && typeof module === 'object') { - module['exports'] = videojs; - } - -exports['default'] = videojs; -module.exports = exports['default']; - -},{"../../src/js/utils/merge-options.js":140,"./component":67,"./event-target":101,"./extend.js":102,"./player":110,"./plugins.js":111,"./setup":115,"./tech/flash.js":118,"./tech/html5.js":119,"./tech/tech.js":121,"./tracks/text-track.js":130,"./utils/browser.js":131,"./utils/create-deprecation-proxy.js":133,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/format-time.js":137,"./utils/log.js":139,"./utils/stylesheet.js":141,"./utils/time-ranges.js":142,"./utils/url.js":144,"global/document":1,"global/window":2,"lodash-compat/object/merge":40,"object.assign":45,"xhr":56}]},{},[145])(145) -}); - - -//# sourceMappingURL=video.js.map -/* vtt.js - v0.12.1 (https://github.com/mozilla/vtt.js) built on 08-07-2015 */ - -(function(root) { - var vttjs = root.vttjs = {}; - var cueShim = vttjs.VTTCue; - var regionShim = vttjs.VTTRegion; - var oldVTTCue = root.VTTCue; - var oldVTTRegion = root.VTTRegion; - - vttjs.shim = function() { - vttjs.VTTCue = cueShim; - vttjs.VTTRegion = regionShim; - }; - - vttjs.restore = function() { - vttjs.VTTCue = oldVTTCue; - vttjs.VTTRegion = oldVTTRegion; - }; -}(this)); - -/** - * Copyright 2013 vtt.js Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(root, vttjs) { - - var autoKeyword = "auto"; - var directionSetting = { - "": true, - "lr": true, - "rl": true - }; - var alignSetting = { - "start": true, - "middle": true, - "end": true, - "left": true, - "right": true - }; - - function findDirectionSetting(value) { - if (typeof value !== "string") { - return false; - } - var dir = directionSetting[value.toLowerCase()]; - return dir ? value.toLowerCase() : false; - } - - function findAlignSetting(value) { - if (typeof value !== "string") { - return false; - } - var align = alignSetting[value.toLowerCase()]; - return align ? value.toLowerCase() : false; - } - - function extend(obj) { - var i = 1; - for (; i < arguments.length; i++) { - var cobj = arguments[i]; - for (var p in cobj) { - obj[p] = cobj[p]; - } - } - - return obj; - } - - function VTTCue(startTime, endTime, text) { - var cue = this; - var isIE8 = (/MSIE\s8\.0/).test(navigator.userAgent); - var baseObj = {}; - - if (isIE8) { - cue = document.createElement('custom'); - } else { - baseObj.enumerable = true; - } - - /** - * Shim implementation specific properties. These properties are not in - * the spec. - */ - - // Lets us know when the VTTCue's data has changed in such a way that we need - // to recompute its display state. This lets us compute its display state - // lazily. - cue.hasBeenReset = false; - - /** - * VTTCue and TextTrackCue properties - * http://dev.w3.org/html5/webvtt/#vttcue-interface - */ - - var _id = ""; - var _pauseOnExit = false; - var _startTime = startTime; - var _endTime = endTime; - var _text = text; - var _region = null; - var _vertical = ""; - var _snapToLines = true; - var _line = "auto"; - var _lineAlign = "start"; - var _position = 50; - var _positionAlign = "middle"; - var _size = 50; - var _align = "middle"; - - Object.defineProperty(cue, - "id", extend({}, baseObj, { - get: function() { - return _id; - }, - set: function(value) { - _id = "" + value; - } - })); - - Object.defineProperty(cue, - "pauseOnExit", extend({}, baseObj, { - get: function() { - return _pauseOnExit; - }, - set: function(value) { - _pauseOnExit = !!value; - } - })); - - Object.defineProperty(cue, - "startTime", extend({}, baseObj, { - get: function() { - return _startTime; - }, - set: function(value) { - if (typeof value !== "number") { - throw new TypeError("Start time must be set to a number."); - } - _startTime = value; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "endTime", extend({}, baseObj, { - get: function() { - return _endTime; - }, - set: function(value) { - if (typeof value !== "number") { - throw new TypeError("End time must be set to a number."); - } - _endTime = value; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "text", extend({}, baseObj, { - get: function() { - return _text; - }, - set: function(value) { - _text = "" + value; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "region", extend({}, baseObj, { - get: function() { - return _region; - }, - set: function(value) { - _region = value; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "vertical", extend({}, baseObj, { - get: function() { - return _vertical; - }, - set: function(value) { - var setting = findDirectionSetting(value); - // Have to check for false because the setting an be an empty string. - if (setting === false) { - throw new SyntaxError("An invalid or illegal string was specified."); - } - _vertical = setting; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "snapToLines", extend({}, baseObj, { - get: function() { - return _snapToLines; - }, - set: function(value) { - _snapToLines = !!value; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "line", extend({}, baseObj, { - get: function() { - return _line; - }, - set: function(value) { - if (typeof value !== "number" && value !== autoKeyword) { - throw new SyntaxError("An invalid number or illegal string was specified."); - } - _line = value; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "lineAlign", extend({}, baseObj, { - get: function() { - return _lineAlign; - }, - set: function(value) { - var setting = findAlignSetting(value); - if (!setting) { - throw new SyntaxError("An invalid or illegal string was specified."); - } - _lineAlign = setting; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "position", extend({}, baseObj, { - get: function() { - return _position; - }, - set: function(value) { - if (value < 0 || value > 100) { - throw new Error("Position must be between 0 and 100."); - } - _position = value; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "positionAlign", extend({}, baseObj, { - get: function() { - return _positionAlign; - }, - set: function(value) { - var setting = findAlignSetting(value); - if (!setting) { - throw new SyntaxError("An invalid or illegal string was specified."); - } - _positionAlign = setting; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "size", extend({}, baseObj, { - get: function() { - return _size; - }, - set: function(value) { - if (value < 0 || value > 100) { - throw new Error("Size must be between 0 and 100."); - } - _size = value; - this.hasBeenReset = true; - } - })); - - Object.defineProperty(cue, - "align", extend({}, baseObj, { - get: function() { - return _align; - }, - set: function(value) { - var setting = findAlignSetting(value); - if (!setting) { - throw new SyntaxError("An invalid or illegal string was specified."); - } - _align = setting; - this.hasBeenReset = true; - } - })); - - /** - * Other spec defined properties - */ - - // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state - cue.displayState = undefined; - - if (isIE8) { - return cue; - } - } - - /** - * VTTCue methods - */ - - VTTCue.prototype.getCueAsHTML = function() { - // Assume WebVTT.convertCueToDOMTree is on the global. - return WebVTT.convertCueToDOMTree(window, this.text); - }; - - root.VTTCue = root.VTTCue || VTTCue; - vttjs.VTTCue = VTTCue; -}(this, (this.vttjs || {}))); - -/** - * Copyright 2013 vtt.js Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(root, vttjs) { - - var scrollSetting = { - "": true, - "up": true - }; - - function findScrollSetting(value) { - if (typeof value !== "string") { - return false; - } - var scroll = scrollSetting[value.toLowerCase()]; - return scroll ? value.toLowerCase() : false; - } - - function isValidPercentValue(value) { - return typeof value === "number" && (value >= 0 && value <= 100); - } - - // VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface - function VTTRegion() { - var _width = 100; - var _lines = 3; - var _regionAnchorX = 0; - var _regionAnchorY = 100; - var _viewportAnchorX = 0; - var _viewportAnchorY = 100; - var _scroll = ""; - - Object.defineProperties(this, { - "width": { - enumerable: true, - get: function() { - return _width; - }, - set: function(value) { - if (!isValidPercentValue(value)) { - throw new Error("Width must be between 0 and 100."); - } - _width = value; - } - }, - "lines": { - enumerable: true, - get: function() { - return _lines; - }, - set: function(value) { - if (typeof value !== "number") { - throw new TypeError("Lines must be set to a number."); - } - _lines = value; - } - }, - "regionAnchorY": { - enumerable: true, - get: function() { - return _regionAnchorY; - }, - set: function(value) { - if (!isValidPercentValue(value)) { - throw new Error("RegionAnchorX must be between 0 and 100."); - } - _regionAnchorY = value; - } - }, - "regionAnchorX": { - enumerable: true, - get: function() { - return _regionAnchorX; - }, - set: function(value) { - if(!isValidPercentValue(value)) { - throw new Error("RegionAnchorY must be between 0 and 100."); - } - _regionAnchorX = value; - } - }, - "viewportAnchorY": { - enumerable: true, - get: function() { - return _viewportAnchorY; - }, - set: function(value) { - if (!isValidPercentValue(value)) { - throw new Error("ViewportAnchorY must be between 0 and 100."); - } - _viewportAnchorY = value; - } - }, - "viewportAnchorX": { - enumerable: true, - get: function() { - return _viewportAnchorX; - }, - set: function(value) { - if (!isValidPercentValue(value)) { - throw new Error("ViewportAnchorX must be between 0 and 100."); - } - _viewportAnchorX = value; - } - }, - "scroll": { - enumerable: true, - get: function() { - return _scroll; - }, - set: function(value) { - var setting = findScrollSetting(value); - // Have to check for false as an empty string is a legal value. - if (setting === false) { - throw new SyntaxError("An invalid or illegal string was specified."); - } - _scroll = setting; - } - } - }); - } - - root.VTTRegion = root.VTTRegion || VTTRegion; - vttjs.VTTRegion = VTTRegion; -}(this, (this.vttjs || {}))); - -/** - * Copyright 2013 vtt.js Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ - -(function(global) { - - var _objCreate = Object.create || (function() { - function F() {} - return function(o) { - if (arguments.length !== 1) { - throw new Error('Object.create shim only accepts one parameter.'); - } - F.prototype = o; - return new F(); - }; - })(); - - // Creates a new ParserError object from an errorData object. The errorData - // object should have default code and message properties. The default message - // property can be overriden by passing in a message parameter. - // See ParsingError.Errors below for acceptable errors. - function ParsingError(errorData, message) { - this.name = "ParsingError"; - this.code = errorData.code; - this.message = message || errorData.message; - } - ParsingError.prototype = _objCreate(Error.prototype); - ParsingError.prototype.constructor = ParsingError; - - // ParsingError metadata for acceptable ParsingErrors. - ParsingError.Errors = { - BadSignature: { - code: 0, - message: "Malformed WebVTT signature." - }, - BadTimeStamp: { - code: 1, - message: "Malformed time stamp." - } - }; - - // Try to parse input as a time stamp. - function parseTimeStamp(input) { - - function computeSeconds(h, m, s, f) { - return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000; - } - - var m = input.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/); - if (!m) { - return null; - } - - if (m[3]) { - // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds] - return computeSeconds(m[1], m[2], m[3].replace(":", ""), m[4]); - } else if (m[1] > 59) { - // Timestamp takes the form of [hours]:[minutes].[milliseconds] - // First position is hours as it's over 59. - return computeSeconds(m[1], m[2], 0, m[4]); - } else { - // Timestamp takes the form of [minutes]:[seconds].[milliseconds] - return computeSeconds(0, m[1], m[2], m[4]); - } - } - - // A settings object holds key/value pairs and will ignore anything but the first - // assignment to a specific key. - function Settings() { - this.values = _objCreate(null); - } - - Settings.prototype = { - // Only accept the first assignment to any key. - set: function(k, v) { - if (!this.get(k) && v !== "") { - this.values[k] = v; - } - }, - // Return the value for a key, or a default value. - // If 'defaultKey' is passed then 'dflt' is assumed to be an object with - // a number of possible default values as properties where 'defaultKey' is - // the key of the property that will be chosen; otherwise it's assumed to be - // a single value. - get: function(k, dflt, defaultKey) { - if (defaultKey) { - return this.has(k) ? this.values[k] : dflt[defaultKey]; - } - return this.has(k) ? this.values[k] : dflt; - }, - // Check whether we have a value for a key. - has: function(k) { - return k in this.values; - }, - // Accept a setting if its one of the given alternatives. - alt: function(k, v, a) { - for (var n = 0; n < a.length; ++n) { - if (v === a[n]) { - this.set(k, v); - break; - } - } - }, - // Accept a setting if its a valid (signed) integer. - integer: function(k, v) { - if (/^-?\d+$/.test(v)) { // integer - this.set(k, parseInt(v, 10)); - } - }, - // Accept a setting if its a valid percentage. - percent: function(k, v) { - var m; - if ((m = v.match(/^([\d]{1,3})(\.[\d]*)?%$/))) { - v = parseFloat(v); - if (v >= 0 && v <= 100) { - this.set(k, v); - return true; - } - } - return false; - } - }; - - // Helper function to parse input into groups separated by 'groupDelim', and - // interprete each group as a key/value pair separated by 'keyValueDelim'. - function parseOptions(input, callback, keyValueDelim, groupDelim) { - var groups = groupDelim ? input.split(groupDelim) : [input]; - for (var i in groups) { - if (typeof groups[i] !== "string") { - continue; - } - var kv = groups[i].split(keyValueDelim); - if (kv.length !== 2) { - continue; - } - var k = kv[0]; - var v = kv[1]; - callback(k, v); - } - } - - function parseCue(input, cue, regionList) { - // Remember the original input if we need to throw an error. - var oInput = input; - // 4.1 WebVTT timestamp - function consumeTimeStamp() { - var ts = parseTimeStamp(input); - if (ts === null) { - throw new ParsingError(ParsingError.Errors.BadTimeStamp, - "Malformed timestamp: " + oInput); - } - // Remove time stamp from input. - input = input.replace(/^[^\sa-zA-Z-]+/, ""); - return ts; - } - - // 4.4.2 WebVTT cue settings - function consumeCueSettings(input, cue) { - var settings = new Settings(); - - parseOptions(input, function (k, v) { - switch (k) { - case "region": - // Find the last region we parsed with the same region id. - for (var i = regionList.length - 1; i >= 0; i--) { - if (regionList[i].id === v) { - settings.set(k, regionList[i].region); - break; - } - } - break; - case "vertical": - settings.alt(k, v, ["rl", "lr"]); - break; - case "line": - var vals = v.split(","), - vals0 = vals[0]; - settings.integer(k, vals0); - settings.percent(k, vals0) ? settings.set("snapToLines", false) : null; - settings.alt(k, vals0, ["auto"]); - if (vals.length === 2) { - settings.alt("lineAlign", vals[1], ["start", "middle", "end"]); - } - break; - case "position": - vals = v.split(","); - settings.percent(k, vals[0]); - if (vals.length === 2) { - settings.alt("positionAlign", vals[1], ["start", "middle", "end"]); - } - break; - case "size": - settings.percent(k, v); - break; - case "align": - settings.alt(k, v, ["start", "middle", "end", "left", "right"]); - break; - } - }, /:/, /\s/); - - // Apply default values for any missing fields. - cue.region = settings.get("region", null); - cue.vertical = settings.get("vertical", ""); - cue.line = settings.get("line", "auto"); - cue.lineAlign = settings.get("lineAlign", "start"); - cue.snapToLines = settings.get("snapToLines", true); - cue.size = settings.get("size", 100); - cue.align = settings.get("align", "middle"); - cue.position = settings.get("position", { - start: 0, - left: 0, - middle: 50, - end: 100, - right: 100 - }, cue.align); - cue.positionAlign = settings.get("positionAlign", { - start: "start", - left: "start", - middle: "middle", - end: "end", - right: "end" - }, cue.align); - } - - function skipWhitespace() { - input = input.replace(/^\s+/, ""); - } - - // 4.1 WebVTT cue timings. - skipWhitespace(); - cue.startTime = consumeTimeStamp(); // (1) collect cue start time - skipWhitespace(); - if (input.substr(0, 3) !== "-->") { // (3) next characters must match "-->" - throw new ParsingError(ParsingError.Errors.BadTimeStamp, - "Malformed time stamp (time stamps must be separated by '-->'): " + - oInput); - } - input = input.substr(3); - skipWhitespace(); - cue.endTime = consumeTimeStamp(); // (5) collect cue end time - - // 4.1 WebVTT cue settings list. - skipWhitespace(); - consumeCueSettings(input, cue); - } - - var ESCAPE = { - "&": "&", - "<": "<", - ">": ">", - "‎": "\u200e", - "‏": "\u200f", - " ": "\u00a0" - }; - - var TAG_NAME = { - c: "span", - i: "i", - b: "b", - u: "u", - ruby: "ruby", - rt: "rt", - v: "span", - lang: "span" - }; - - var TAG_ANNOTATION = { - v: "title", - lang: "lang" - }; - - var NEEDS_PARENT = { - rt: "ruby" - }; - - // Parse content into a document fragment. - function parseContent(window, input) { - function nextToken() { - // Check for end-of-string. - if (!input) { - return null; - } - - // Consume 'n' characters from the input. - function consume(result) { - input = input.substr(result.length); - return result; - } - - var m = input.match(/^([^<]*)(<[^>]+>?)?/); - // If there is some text before the next tag, return it, otherwise return - // the tag. - return consume(m[1] ? m[1] : m[2]); - } - - // Unescape a string 's'. - function unescape1(e) { - return ESCAPE[e]; - } - function unescape(s) { - while ((m = s.match(/&(amp|lt|gt|lrm|rlm|nbsp);/))) { - s = s.replace(m[0], unescape1); - } - return s; - } - - function shouldAdd(current, element) { - return !NEEDS_PARENT[element.localName] || - NEEDS_PARENT[element.localName] === current.localName; - } - - // Create an element for this tag. - function createElement(type, annotation) { - var tagName = TAG_NAME[type]; - if (!tagName) { - return null; - } - var element = window.document.createElement(tagName); - element.localName = tagName; - var name = TAG_ANNOTATION[type]; - if (name && annotation) { - element[name] = annotation.trim(); - } - return element; - } - - var rootDiv = window.document.createElement("div"), - current = rootDiv, - t, - tagStack = []; - - while ((t = nextToken()) !== null) { - if (t[0] === '<') { - if (t[1] === "/") { - // If the closing tag matches, move back up to the parent node. - if (tagStack.length && - tagStack[tagStack.length - 1] === t.substr(2).replace(">", "")) { - tagStack.pop(); - current = current.parentNode; - } - // Otherwise just ignore the end tag. - continue; - } - var ts = parseTimeStamp(t.substr(1, t.length - 2)); - var node; - if (ts) { - // Timestamps are lead nodes as well. - node = window.document.createProcessingInstruction("timestamp", ts); - current.appendChild(node); - continue; - } - var m = t.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/); - // If we can't parse the tag, skip to the next tag. - if (!m) { - continue; - } - // Try to construct an element, and ignore the tag if we couldn't. - node = createElement(m[1], m[3]); - if (!node) { - continue; - } - // Determine if the tag should be added based on the context of where it - // is placed in the cuetext. - if (!shouldAdd(current, node)) { - continue; - } - // Set the class list (as a list of classes, separated by space). - if (m[2]) { - node.className = m[2].substr(1).replace('.', ' '); - } - // Append the node to the current node, and enter the scope of the new - // node. - tagStack.push(m[1]); - current.appendChild(node); - current = node; - continue; - } - - // Text nodes are leaf nodes. - current.appendChild(window.document.createTextNode(unescape(t))); - } - - return rootDiv; - } - - // This is a list of all the Unicode characters that have a strong - // right-to-left category. What this means is that these characters are - // written right-to-left for sure. It was generated by pulling all the strong - // right-to-left characters out of the Unicode data table. That table can - // found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt - var strongRTLChars = [0x05BE, 0x05C0, 0x05C3, 0x05C6, 0x05D0, 0x05D1, - 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, - 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, 0x05E0, 0x05E1, 0x05E2, 0x05E3, - 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x05F0, 0x05F1, - 0x05F2, 0x05F3, 0x05F4, 0x0608, 0x060B, 0x060D, 0x061B, 0x061E, 0x061F, - 0x0620, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, - 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, 0x0630, 0x0631, - 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, - 0x063B, 0x063C, 0x063D, 0x063E, 0x063F, 0x0640, 0x0641, 0x0642, 0x0643, - 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A, 0x066D, 0x066E, - 0x066F, 0x0671, 0x0672, 0x0673, 0x0674, 0x0675, 0x0676, 0x0677, 0x0678, - 0x0679, 0x067A, 0x067B, 0x067C, 0x067D, 0x067E, 0x067F, 0x0680, 0x0681, - 0x0682, 0x0683, 0x0684, 0x0685, 0x0686, 0x0687, 0x0688, 0x0689, 0x068A, - 0x068B, 0x068C, 0x068D, 0x068E, 0x068F, 0x0690, 0x0691, 0x0692, 0x0693, - 0x0694, 0x0695, 0x0696, 0x0697, 0x0698, 0x0699, 0x069A, 0x069B, 0x069C, - 0x069D, 0x069E, 0x069F, 0x06A0, 0x06A1, 0x06A2, 0x06A3, 0x06A4, 0x06A5, - 0x06A6, 0x06A7, 0x06A8, 0x06A9, 0x06AA, 0x06AB, 0x06AC, 0x06AD, 0x06AE, - 0x06AF, 0x06B0, 0x06B1, 0x06B2, 0x06B3, 0x06B4, 0x06B5, 0x06B6, 0x06B7, - 0x06B8, 0x06B9, 0x06BA, 0x06BB, 0x06BC, 0x06BD, 0x06BE, 0x06BF, 0x06C0, - 0x06C1, 0x06C2, 0x06C3, 0x06C4, 0x06C5, 0x06C6, 0x06C7, 0x06C8, 0x06C9, - 0x06CA, 0x06CB, 0x06CC, 0x06CD, 0x06CE, 0x06CF, 0x06D0, 0x06D1, 0x06D2, - 0x06D3, 0x06D4, 0x06D5, 0x06E5, 0x06E6, 0x06EE, 0x06EF, 0x06FA, 0x06FB, - 0x06FC, 0x06FD, 0x06FE, 0x06FF, 0x0700, 0x0701, 0x0702, 0x0703, 0x0704, - 0x0705, 0x0706, 0x0707, 0x0708, 0x0709, 0x070A, 0x070B, 0x070C, 0x070D, - 0x070F, 0x0710, 0x0712, 0x0713, 0x0714, 0x0715, 0x0716, 0x0717, 0x0718, - 0x0719, 0x071A, 0x071B, 0x071C, 0x071D, 0x071E, 0x071F, 0x0720, 0x0721, - 0x0722, 0x0723, 0x0724, 0x0725, 0x0726, 0x0727, 0x0728, 0x0729, 0x072A, - 0x072B, 0x072C, 0x072D, 0x072E, 0x072F, 0x074D, 0x074E, 0x074F, 0x0750, - 0x0751, 0x0752, 0x0753, 0x0754, 0x0755, 0x0756, 0x0757, 0x0758, 0x0759, - 0x075A, 0x075B, 0x075C, 0x075D, 0x075E, 0x075F, 0x0760, 0x0761, 0x0762, - 0x0763, 0x0764, 0x0765, 0x0766, 0x0767, 0x0768, 0x0769, 0x076A, 0x076B, - 0x076C, 0x076D, 0x076E, 0x076F, 0x0770, 0x0771, 0x0772, 0x0773, 0x0774, - 0x0775, 0x0776, 0x0777, 0x0778, 0x0779, 0x077A, 0x077B, 0x077C, 0x077D, - 0x077E, 0x077F, 0x0780, 0x0781, 0x0782, 0x0783, 0x0784, 0x0785, 0x0786, - 0x0787, 0x0788, 0x0789, 0x078A, 0x078B, 0x078C, 0x078D, 0x078E, 0x078F, - 0x0790, 0x0791, 0x0792, 0x0793, 0x0794, 0x0795, 0x0796, 0x0797, 0x0798, - 0x0799, 0x079A, 0x079B, 0x079C, 0x079D, 0x079E, 0x079F, 0x07A0, 0x07A1, - 0x07A2, 0x07A3, 0x07A4, 0x07A5, 0x07B1, 0x07C0, 0x07C1, 0x07C2, 0x07C3, - 0x07C4, 0x07C5, 0x07C6, 0x07C7, 0x07C8, 0x07C9, 0x07CA, 0x07CB, 0x07CC, - 0x07CD, 0x07CE, 0x07CF, 0x07D0, 0x07D1, 0x07D2, 0x07D3, 0x07D4, 0x07D5, - 0x07D6, 0x07D7, 0x07D8, 0x07D9, 0x07DA, 0x07DB, 0x07DC, 0x07DD, 0x07DE, - 0x07DF, 0x07E0, 0x07E1, 0x07E2, 0x07E3, 0x07E4, 0x07E5, 0x07E6, 0x07E7, - 0x07E8, 0x07E9, 0x07EA, 0x07F4, 0x07F5, 0x07FA, 0x0800, 0x0801, 0x0802, - 0x0803, 0x0804, 0x0805, 0x0806, 0x0807, 0x0808, 0x0809, 0x080A, 0x080B, - 0x080C, 0x080D, 0x080E, 0x080F, 0x0810, 0x0811, 0x0812, 0x0813, 0x0814, - 0x0815, 0x081A, 0x0824, 0x0828, 0x0830, 0x0831, 0x0832, 0x0833, 0x0834, - 0x0835, 0x0836, 0x0837, 0x0838, 0x0839, 0x083A, 0x083B, 0x083C, 0x083D, - 0x083E, 0x0840, 0x0841, 0x0842, 0x0843, 0x0844, 0x0845, 0x0846, 0x0847, - 0x0848, 0x0849, 0x084A, 0x084B, 0x084C, 0x084D, 0x084E, 0x084F, 0x0850, - 0x0851, 0x0852, 0x0853, 0x0854, 0x0855, 0x0856, 0x0857, 0x0858, 0x085E, - 0x08A0, 0x08A2, 0x08A3, 0x08A4, 0x08A5, 0x08A6, 0x08A7, 0x08A8, 0x08A9, - 0x08AA, 0x08AB, 0x08AC, 0x200F, 0xFB1D, 0xFB1F, 0xFB20, 0xFB21, 0xFB22, - 0xFB23, 0xFB24, 0xFB25, 0xFB26, 0xFB27, 0xFB28, 0xFB2A, 0xFB2B, 0xFB2C, - 0xFB2D, 0xFB2E, 0xFB2F, 0xFB30, 0xFB31, 0xFB32, 0xFB33, 0xFB34, 0xFB35, - 0xFB36, 0xFB38, 0xFB39, 0xFB3A, 0xFB3B, 0xFB3C, 0xFB3E, 0xFB40, 0xFB41, - 0xFB43, 0xFB44, 0xFB46, 0xFB47, 0xFB48, 0xFB49, 0xFB4A, 0xFB4B, 0xFB4C, - 0xFB4D, 0xFB4E, 0xFB4F, 0xFB50, 0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EAA, 0xFEAB, 0xFEAC, 0xFEAD, 0xFEAE, 0xFEAF, 0xFEB0, - 0xFEB1, 0xFEB2, 0xFEB3, 0xFEB4, 0xFEB5, 0xFEB6, 0xFEB7, 0xFEB8, 0xFEB9, - 0xFEBA, 0xFEBB, 0xFEBC, 0xFEBD, 0xFEBE, 0xFEBF, 0xFEC0, 0xFEC1, 0xFEC2, - 0xFEC3, 0xFEC4, 0xFEC5, 0xFEC6, 0xFEC7, 0xFEC8, 0xFEC9, 0xFECA, 0xFECB, - 0xFECC, 0xFECD, 0xFECE, 0xFECF, 0xFED0, 0xFED1, 0xFED2, 0xFED3, 0xFED4, - 0xFED5, 0xFED6, 0xFED7, 0xFED8, 0xFED9, 0xFEDA, 0xFEDB, 0xFEDC, 0xFEDD, - 0xFEDE, 0xFEDF, 0xFEE0, 0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4, 0xFEE5, 0xFEE6, - 0xFEE7, 0xFEE8, 0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC, 0xFEED, 0xFEEE, 0xFEEF, - 0xFEF0, 0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8, - 0xFEF9, 0xFEFA, 0xFEFB, 0xFEFC, 0x10800, 0x10801, 0x10802, 0x10803, - 0x10804, 0x10805, 0x10808, 0x1080A, 0x1080B, 0x1080C, 0x1080D, 0x1080E, - 0x1080F, 0x10810, 0x10811, 0x10812, 0x10813, 0x10814, 0x10815, 0x10816, - 0x10817, 0x10818, 0x10819, 0x1081A, 0x1081B, 0x1081C, 0x1081D, 0x1081E, - 0x1081F, 0x10820, 0x10821, 0x10822, 0x10823, 0x10824, 0x10825, 0x10826, - 0x10827, 0x10828, 0x10829, 0x1082A, 0x1082B, 0x1082C, 0x1082D, 0x1082E, - 0x1082F, 0x10830, 0x10831, 0x10832, 0x10833, 0x10834, 0x10835, 0x10837, - 0x10838, 0x1083C, 0x1083F, 0x10840, 0x10841, 0x10842, 0x10843, 0x10844, - 0x10845, 0x10846, 0x10847, 0x10848, 0x10849, 0x1084A, 0x1084B, 0x1084C, - 0x1084D, 0x1084E, 0x1084F, 0x10850, 0x10851, 0x10852, 0x10853, 0x10854, - 0x10855, 0x10857, 0x10858, 0x10859, 0x1085A, 0x1085B, 0x1085C, 0x1085D, - 0x1085E, 0x1085F, 0x10900, 0x10901, 0x10902, 0x10903, 0x10904, 0x10905, - 0x10906, 0x10907, 0x10908, 0x10909, 0x1090A, 0x1090B, 0x1090C, 0x1090D, - 0x1090E, 0x1090F, 0x10910, 0x10911, 0x10912, 0x10913, 0x10914, 0x10915, - 0x10916, 0x10917, 0x10918, 0x10919, 0x1091A, 0x1091B, 0x10920, 0x10921, - 0x10922, 0x10923, 0x10924, 0x10925, 0x10926, 0x10927, 0x10928, 0x10929, - 0x1092A, 0x1092B, 0x1092C, 0x1092D, 0x1092E, 0x1092F, 0x10930, 0x10931, - 0x10932, 0x10933, 0x10934, 0x10935, 0x10936, 0x10937, 0x10938, 0x10939, - 0x1093F, 0x10980, 0x10981, 0x10982, 0x10983, 0x10984, 0x10985, 0x10986, - 0x10987, 0x10988, 0x10989, 0x1098A, 0x1098B, 0x1098C, 0x1098D, 0x1098E, - 0x1098F, 0x10990, 0x10991, 0x10992, 0x10993, 0x10994, 0x10995, 0x10996, - 0x10997, 0x10998, 0x10999, 0x1099A, 0x1099B, 0x1099C, 0x1099D, 0x1099E, - 0x1099F, 0x109A0, 0x109A1, 0x109A2, 0x109A3, 0x109A4, 0x109A5, 0x109A6, - 0x109A7, 0x109A8, 0x109A9, 0x109AA, 0x109AB, 0x109AC, 0x109AD, 0x109AE, - 0x109AF, 0x109B0, 0x109B1, 0x109B2, 0x109B3, 0x109B4, 0x109B5, 0x109B6, - 0x109B7, 0x109BE, 0x109BF, 0x10A00, 0x10A10, 0x10A11, 0x10A12, 0x10A13, - 0x10A15, 0x10A16, 0x10A17, 0x10A19, 0x10A1A, 0x10A1B, 0x10A1C, 0x10A1D, - 0x10A1E, 0x10A1F, 0x10A20, 0x10A21, 0x10A22, 0x10A23, 0x10A24, 0x10A25, - 0x10A26, 0x10A27, 0x10A28, 0x10A29, 0x10A2A, 0x10A2B, 0x10A2C, 0x10A2D, - 0x10A2E, 0x10A2F, 0x10A30, 0x10A31, 0x10A32, 0x10A33, 0x10A40, 0x10A41, - 0x10A42, 0x10A43, 0x10A44, 0x10A45, 0x10A46, 0x10A47, 0x10A50, 0x10A51, - 0x10A52, 0x10A53, 0x10A54, 0x10A55, 0x10A56, 0x10A57, 0x10A58, 0x10A60, - 0x10A61, 0x10A62, 0x10A63, 0x10A64, 0x10A65, 0x10A66, 0x10A67, 0x10A68, - 0x10A69, 0x10A6A, 0x10A6B, 0x10A6C, 0x10A6D, 0x10A6E, 0x10A6F, 0x10A70, - 0x10A71, 0x10A72, 0x10A73, 0x10A74, 0x10A75, 0x10A76, 0x10A77, 0x10A78, - 0x10A79, 0x10A7A, 0x10A7B, 0x10A7C, 0x10A7D, 0x10A7E, 0x10A7F, 0x10B00, - 0x10B01, 0x10B02, 0x10B03, 0x10B04, 0x10B05, 0x10B06, 0x10B07, 0x10B08, - 0x10B09, 0x10B0A, 0x10B0B, 0x10B0C, 0x10B0D, 0x10B0E, 0x10B0F, 0x10B10, - 0x10B11, 0x10B12, 0x10B13, 0x10B14, 0x10B15, 0x10B16, 0x10B17, 0x10B18, - 0x10B19, 0x10B1A, 0x10B1B, 0x10B1C, 0x10B1D, 0x10B1E, 0x10B1F, 0x10B20, - 0x10B21, 0x10B22, 0x10B23, 0x10B24, 0x10B25, 0x10B26, 0x10B27, 0x10B28, - 0x10B29, 0x10B2A, 0x10B2B, 0x10B2C, 0x10B2D, 0x10B2E, 0x10B2F, 0x10B30, - 0x10B31, 0x10B32, 0x10B33, 0x10B34, 0x10B35, 0x10B40, 0x10B41, 0x10B42, - 0x10B43, 0x10B44, 0x10B45, 0x10B46, 0x10B47, 0x10B48, 0x10B49, 0x10B4A, - 0x10B4B, 0x10B4C, 0x10B4D, 0x10B4E, 0x10B4F, 0x10B50, 0x10B51, 0x10B52, - 0x10B53, 0x10B54, 0x10B55, 0x10B58, 0x10B59, 0x10B5A, 0x10B5B, 0x10B5C, - 0x10B5D, 0x10B5E, 0x10B5F, 0x10B60, 0x10B61, 0x10B62, 0x10B63, 0x10B64, - 0x10B65, 0x10B66, 0x10B67, 0x10B68, 0x10B69, 0x10B6A, 0x10B6B, 0x10B6C, - 0x10B6D, 0x10B6E, 0x10B6F, 0x10B70, 0x10B71, 0x10B72, 0x10B78, 0x10B79, - 0x10B7A, 0x10B7B, 0x10B7C, 0x10B7D, 0x10B7E, 0x10B7F, 0x10C00, 0x10C01, - 0x10C02, 0x10C03, 0x10C04, 0x10C05, 0x10C06, 0x10C07, 0x10C08, 0x10C09, - 0x10C0A, 0x10C0B, 0x10C0C, 0x10C0D, 0x10C0E, 0x10C0F, 0x10C10, 0x10C11, - 0x10C12, 0x10C13, 0x10C14, 0x10C15, 0x10C16, 0x10C17, 0x10C18, 0x10C19, - 0x10C1A, 0x10C1B, 0x10C1C, 0x10C1D, 0x10C1E, 0x10C1F, 0x10C20, 0x10C21, - 0x10C22, 0x10C23, 0x10C24, 0x10C25, 0x10C26, 0x10C27, 0x10C28, 0x10C29, - 0x10C2A, 0x10C2B, 0x10C2C, 0x10C2D, 0x10C2E, 0x10C2F, 0x10C30, 0x10C31, - 0x10C32, 0x10C33, 0x10C34, 0x10C35, 0x10C36, 0x10C37, 0x10C38, 0x10C39, - 0x10C3A, 0x10C3B, 0x10C3C, 0x10C3D, 0x10C3E, 0x10C3F, 0x10C40, 0x10C41, - 0x10C42, 0x10C43, 0x10C44, 0x10C45, 0x10C46, 0x10C47, 0x10C48, 0x1EE00, - 0x1EE01, 0x1EE02, 0x1EE03, 0x1EE05, 0x1EE06, 0x1EE07, 0x1EE08, 0x1EE09, - 0x1EE0A, 0x1EE0B, 0x1EE0C, 0x1EE0D, 0x1EE0E, 0x1EE0F, 0x1EE10, 0x1E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6, 0x1EEB7, - 0x1EEB8, 0x1EEB9, 0x1EEBA, 0x1EEBB, 0x10FFFD]; - - function determineBidi(cueDiv) { - var nodeStack = [], - text = "", - charCode; - - if (!cueDiv || !cueDiv.childNodes) { - return "ltr"; - } - - function pushNodes(nodeStack, node) { - for (var i = node.childNodes.length - 1; i >= 0; i--) { - nodeStack.push(node.childNodes[i]); - } - } - - function nextTextNode(nodeStack) { - if (!nodeStack || !nodeStack.length) { - return null; - } - - var node = nodeStack.pop(), - text = node.textContent || node.innerText; - if (text) { - // TODO: This should match all unicode type B characters (paragraph - // separator characters). See issue #115. - var m = text.match(/^.*(\n|\r)/); - if (m) { - nodeStack.length = 0; - return m[0]; - } - return text; - } - if (node.tagName === "ruby") { - return nextTextNode(nodeStack); - } - if (node.childNodes) { - pushNodes(nodeStack, node); - return nextTextNode(nodeStack); - } - } - - pushNodes(nodeStack, cueDiv); - while ((text = nextTextNode(nodeStack))) { - for (var i = 0; i < text.length; i++) { - charCode = text.charCodeAt(i); - for (var j = 0; j < strongRTLChars.length; j++) { - if (strongRTLChars[j] === charCode) { - return "rtl"; - } - } - } - } - return "ltr"; - } - - function computeLinePos(cue) { - if (typeof cue.line === "number" && - (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) { - return cue.line; - } - if (!cue.track || !cue.track.textTrackList || - !cue.track.textTrackList.mediaElement) { - return -1; - } - var track = cue.track, - trackList = track.textTrackList, - count = 0; - for (var i = 0; i < trackList.length && trackList[i] !== track; i++) { - if (trackList[i].mode === "showing") { - count++; - } - } - return ++count * -1; - } - - function StyleBox() { - } - - // Apply styles to a div. If there is no div passed then it defaults to the - // div on 'this'. - StyleBox.prototype.applyStyles = function(styles, div) { - div = div || this.div; - for (var prop in styles) { - if (styles.hasOwnProperty(prop)) { - div.style[prop] = styles[prop]; - } - } - }; - - StyleBox.prototype.formatStyle = function(val, unit) { - return val === 0 ? 0 : val + unit; - }; - - // Constructs the computed display state of the cue (a div). Places the div - // into the overlay which should be a block level element (usually a div). - function CueStyleBox(window, cue, styleOptions) { - var isIE8 = (/MSIE\s8\.0/).test(navigator.userAgent); - var color = "rgba(255, 255, 255, 1)"; - var backgroundColor = "rgba(0, 0, 0, 0.8)"; - - if (isIE8) { - color = "rgb(255, 255, 255)"; - backgroundColor = "rgb(0, 0, 0)"; - } - - StyleBox.call(this); - this.cue = cue; - - // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will - // have inline positioning and will function as the cue background box. - this.cueDiv = parseContent(window, cue.text); - var styles = { - color: color, - backgroundColor: backgroundColor, - position: "relative", - left: 0, - right: 0, - top: 0, - bottom: 0, - display: "inline" - }; - - if (!isIE8) { - styles.writingMode = cue.vertical === "" ? "horizontal-tb" - : cue.vertical === "lr" ? "vertical-lr" - : "vertical-rl"; - styles.unicodeBidi = "plaintext"; - } - this.applyStyles(styles, this.cueDiv); - - // Create an absolutely positioned div that will be used to position the cue - // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS - // mirrors of them except "middle" which is "center" in CSS. - this.div = window.document.createElement("div"); - styles = { - textAlign: cue.align === "middle" ? "center" : cue.align, - font: styleOptions.font, - whiteSpace: "pre-line", - position: "absolute" - }; - - if (!isIE8) { - styles.direction = determineBidi(this.cueDiv); - styles.writingMode = cue.vertical === "" ? "horizontal-tb" - : cue.vertical === "lr" ? "vertical-lr" - : "vertical-rl". - stylesunicodeBidi = "plaintext"; - } - - this.applyStyles(styles); - - this.div.appendChild(this.cueDiv); - - // Calculate the distance from the reference edge of the viewport to the text - // position of the cue box. The reference edge will be resolved later when - // the box orientation styles are applied. - var textPos = 0; - switch (cue.positionAlign) { - case "start": - textPos = cue.position; - break; - case "middle": - textPos = cue.position - (cue.size / 2); - break; - case "end": - textPos = cue.position - cue.size; - break; - } - - // Horizontal box orientation; textPos is the distance from the left edge of the - // area to the left edge of the box and cue.size is the distance extending to - // the right from there. - if (cue.vertical === "") { - this.applyStyles({ - left: this.formatStyle(textPos, "%"), - width: this.formatStyle(cue.size, "%") - }); - // Vertical box orientation; textPos is the distance from the top edge of the - // area to the top edge of the box and cue.size is the height extending - // downwards from there. - } else { - this.applyStyles({ - top: this.formatStyle(textPos, "%"), - height: this.formatStyle(cue.size, "%") - }); - } - - this.move = function(box) { - this.applyStyles({ - top: this.formatStyle(box.top, "px"), - bottom: this.formatStyle(box.bottom, "px"), - left: this.formatStyle(box.left, "px"), - right: this.formatStyle(box.right, "px"), - height: this.formatStyle(box.height, "px"), - width: this.formatStyle(box.width, "px") - }); - }; - } - CueStyleBox.prototype = _objCreate(StyleBox.prototype); - CueStyleBox.prototype.constructor = CueStyleBox; - - // Represents the co-ordinates of an Element in a way that we can easily - // compute things with such as if it overlaps or intersects with another Element. - // Can initialize it with either a StyleBox or another BoxPosition. - function BoxPosition(obj) { - var isIE8 = (/MSIE\s8\.0/).test(navigator.userAgent); - - // Either a BoxPosition was passed in and we need to copy it, or a StyleBox - // was passed in and we need to copy the results of 'getBoundingClientRect' - // as the object returned is readonly. All co-ordinate values are in reference - // to the viewport origin (top left). - var lh, height, width, top; - if (obj.div) { - height = obj.div.offsetHeight; - width = obj.div.offsetWidth; - top = obj.div.offsetTop; - - var rects = (rects = obj.div.childNodes) && (rects = rects[0]) && - rects.getClientRects && rects.getClientRects(); - obj = obj.div.getBoundingClientRect(); - // In certain cases the outter div will be slightly larger then the sum of - // the inner div's lines. This could be due to bold text, etc, on some platforms. - // In this case we should get the average line height and use that. This will - // result in the desired behaviour. - lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length) - : 0; - - } - this.left = obj.left; - this.right = obj.right; - this.top = obj.top || top; - this.height = obj.height || height; - this.bottom = obj.bottom || (top + (obj.height || height)); - this.width = obj.width || width; - this.lineHeight = lh !== undefined ? lh : obj.lineHeight; - - if (isIE8 && !this.lineHeight) { - this.lineHeight = 13; - } - } - - // Move the box along a particular axis. Optionally pass in an amount to move - // the box. If no amount is passed then the default is the line height of the - // box. - BoxPosition.prototype.move = function(axis, toMove) { - toMove = toMove !== undefined ? toMove : this.lineHeight; - switch (axis) { - case "+x": - this.left += toMove; - this.right += toMove; - break; - case "-x": - this.left -= toMove; - this.right -= toMove; - break; - case "+y": - this.top += toMove; - this.bottom += toMove; - break; - case "-y": - this.top -= toMove; - this.bottom -= toMove; - break; - } - }; - - // Check if this box overlaps another box, b2. - BoxPosition.prototype.overlaps = function(b2) { - return this.left < b2.right && - this.right > b2.left && - this.top < b2.bottom && - this.bottom > b2.top; - }; - - // Check if this box overlaps any other boxes in boxes. - BoxPosition.prototype.overlapsAny = function(boxes) { - for (var i = 0; i < boxes.length; i++) { - if (this.overlaps(boxes[i])) { - return true; - } - } - return false; - }; - - // Check if this box is within another box. - BoxPosition.prototype.within = function(container) { - return this.top >= container.top && - this.bottom <= container.bottom && - this.left >= container.left && - this.right <= container.right; - }; - - // Check if this box is entirely within the container or it is overlapping - // on the edge opposite of the axis direction passed. For example, if "+x" is - // passed and the box is overlapping on the left edge of the container, then - // return true. - BoxPosition.prototype.overlapsOppositeAxis = function(container, axis) { - switch (axis) { - case "+x": - return this.left < container.left; - case "-x": - return this.right > container.right; - case "+y": - return this.top < container.top; - case "-y": - return this.bottom > container.bottom; - } - }; - - // Find the percentage of the area that this box is overlapping with another - // box. - BoxPosition.prototype.intersectPercentage = function(b2) { - var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)), - y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)), - intersectArea = x * y; - return intersectArea / (this.height * this.width); - }; - - // Convert the positions from this box to CSS compatible positions using - // the reference container's positions. This has to be done because this - // box's positions are in reference to the viewport origin, whereas, CSS - // values are in referecne to their respective edges. - BoxPosition.prototype.toCSSCompatValues = function(reference) { - return { - top: this.top - reference.top, - bottom: reference.bottom - this.bottom, - left: this.left - reference.left, - right: reference.right - this.right, - height: this.height, - width: this.width - }; - }; - - // Get an object that represents the box's position without anything extra. - // Can pass a StyleBox, HTMLElement, or another BoxPositon. - BoxPosition.getSimpleBoxPosition = function(obj) { - var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0; - var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0; - var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0; - - obj = obj.div ? obj.div.getBoundingClientRect() : - obj.tagName ? obj.getBoundingClientRect() : obj; - var ret = { - left: obj.left, - right: obj.right, - top: obj.top || top, - height: obj.height || height, - bottom: obj.bottom || (top + (obj.height || height)), - width: obj.width || width - }; - return ret; - }; - - // Move a StyleBox to its specified, or next best, position. The containerBox - // is the box that contains the StyleBox, such as a div. boxPositions are - // a list of other boxes that the styleBox can't overlap with. - function moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) { - - // Find the best position for a cue box, b, on the video. The axis parameter - // is a list of axis, the order of which, it will move the box along. For example: - // Passing ["+x", "-x"] will move the box first along the x axis in the positive - // direction. If it doesn't find a good position for it there it will then move - // it along the x axis in the negative direction. - function findBestPosition(b, axis) { - var bestPosition, - specifiedPosition = new BoxPosition(b), - percentage = 1; // Highest possible so the first thing we get is better. - - for (var i = 0; i < axis.length; i++) { - while (b.overlapsOppositeAxis(containerBox, axis[i]) || - (b.within(containerBox) && b.overlapsAny(boxPositions))) { - b.move(axis[i]); - } - // We found a spot where we aren't overlapping anything. This is our - // best position. - if (b.within(containerBox)) { - return b; - } - var p = b.intersectPercentage(containerBox); - // If we're outside the container box less then we were on our last try - // then remember this position as the best position. - if (percentage > p) { - bestPosition = new BoxPosition(b); - percentage = p; - } - // Reset the box position to the specified position. - b = new BoxPosition(specifiedPosition); - } - return bestPosition || specifiedPosition; - } - - var boxPosition = new BoxPosition(styleBox), - cue = styleBox.cue, - linePos = computeLinePos(cue), - axis = []; - - // If we have a line number to align the cue to. - if (cue.snapToLines) { - var size; - switch (cue.vertical) { - case "": - axis = [ "+y", "-y" ]; - size = "height"; - break; - case "rl": - axis = [ "+x", "-x" ]; - size = "width"; - break; - case "lr": - axis = [ "-x", "+x" ]; - size = "width"; - break; - } - - var step = boxPosition.lineHeight, - position = step * Math.round(linePos), - maxPosition = containerBox[size] + step, - initialAxis = axis[0]; - - // If the specified intial position is greater then the max position then - // clamp the box to the amount of steps it would take for the box to - // reach the max position. - if (Math.abs(position) > maxPosition) { - position = position < 0 ? -1 : 1; - position *= Math.ceil(maxPosition / step) * step; - } - - // If computed line position returns negative then line numbers are - // relative to the bottom of the video instead of the top. Therefore, we - // need to increase our initial position by the length or width of the - // video, depending on the writing direction, and reverse our axis directions. - if (linePos < 0) { - position += cue.vertical === "" ? containerBox.height : containerBox.width; - axis = axis.reverse(); - } - - // Move the box to the specified position. This may not be its best - // position. - boxPosition.move(initialAxis, position); - - } else { - // If we have a percentage line value for the cue. - var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100; - - switch (cue.lineAlign) { - case "middle": - linePos -= (calculatedPercentage / 2); - break; - case "end": - linePos -= calculatedPercentage; - break; - } - - // Apply initial line position to the cue box. - switch (cue.vertical) { - case "": - styleBox.applyStyles({ - top: styleBox.formatStyle(linePos, "%") - }); - break; - case "rl": - styleBox.applyStyles({ - left: styleBox.formatStyle(linePos, "%") - }); - break; - case "lr": - styleBox.applyStyles({ - right: styleBox.formatStyle(linePos, "%") - }); - break; - } - - axis = [ "+y", "-x", "+x", "-y" ]; - - // Get the box position again after we've applied the specified positioning - // to it. - boxPosition = new BoxPosition(styleBox); - } - - var bestPosition = findBestPosition(boxPosition, axis); - styleBox.move(bestPosition.toCSSCompatValues(containerBox)); - } - - function WebVTT() { - // Nothing - } - - // Helper to allow strings to be decoded instead of the default binary utf8 data. - WebVTT.StringDecoder = function() { - return { - decode: function(data) { - if (!data) { - return ""; - } - if (typeof data !== "string") { - throw new Error("Error - expected string data."); - } - return decodeURIComponent(encodeURIComponent(data)); - } - }; - }; - - WebVTT.convertCueToDOMTree = function(window, cuetext) { - if (!window || !cuetext) { - return null; - } - return parseContent(window, cuetext); - }; - - var FONT_SIZE_PERCENT = 0.05; - var FONT_STYLE = "sans-serif"; - var CUE_BACKGROUND_PADDING = "1.5%"; - - // Runs the processing model over the cues and regions passed to it. - // @param overlay A block level element (usually a div) that the computed cues - // and regions will be placed into. - WebVTT.processCues = function(window, cues, overlay) { - if (!window || !cues || !overlay) { - return null; - } - - // Remove all previous children. - while (overlay.firstChild) { - overlay.removeChild(overlay.firstChild); - } - - var paddedOverlay = window.document.createElement("div"); - paddedOverlay.style.position = "absolute"; - paddedOverlay.style.left = "0"; - paddedOverlay.style.right = "0"; - paddedOverlay.style.top = "0"; - paddedOverlay.style.bottom = "0"; - paddedOverlay.style.margin = CUE_BACKGROUND_PADDING; - overlay.appendChild(paddedOverlay); - - // Determine if we need to compute the display states of the cues. This could - // be the case if a cue's state has been changed since the last computation or - // if it has not been computed yet. - function shouldCompute(cues) { - for (var i = 0; i < cues.length; i++) { - if (cues[i].hasBeenReset || !cues[i].displayState) { - return true; - } - } - return false; - } - - // We don't need to recompute the cues' display states. Just reuse them. - if (!shouldCompute(cues)) { - for (var i = 0; i < cues.length; i++) { - paddedOverlay.appendChild(cues[i].displayState); - } - return; - } - - var boxPositions = [], - containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay), - fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100; - var styleOptions = { - font: fontSize + "px " + FONT_STYLE - }; - - (function() { - var styleBox, cue; - - for (var i = 0; i < cues.length; i++) { - cue = cues[i]; - - // Compute the intial position and styles of the cue div. - styleBox = new CueStyleBox(window, cue, styleOptions); - paddedOverlay.appendChild(styleBox.div); - - // Move the cue div to it's correct line position. - moveBoxToLinePosition(window, styleBox, containerBox, boxPositions); - - // Remember the computed div so that we don't have to recompute it later - // if we don't have too. - cue.displayState = styleBox.div; - - boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox)); - } - })(); - }; - - WebVTT.Parser = function(window, vttjs, decoder) { - if (!decoder) { - decoder = vttjs; - vttjs = {}; - } - if (!vttjs) { - vttjs = {}; - } - - this.window = window; - this.vttjs = vttjs; - this.state = "INITIAL"; - this.buffer = ""; - this.decoder = decoder || new TextDecoder("utf8"); - this.regionList = []; - }; - - WebVTT.Parser.prototype = { - // If the error is a ParsingError then report it to the consumer if - // possible. If it's not a ParsingError then throw it like normal. - reportOrThrowError: function(e) { - if (e instanceof ParsingError) { - this.onparsingerror && this.onparsingerror(e); - } else { - throw e; - } - }, - parse: function (data) { - var self = this; - - // If there is no data then we won't decode it, but will just try to parse - // whatever is in buffer already. This may occur in circumstances, for - // example when flush() is called. - if (data) { - // Try to decode the data that we received. - self.buffer += self.decoder.decode(data, {stream: true}); - } - - function collectNextLine() { - var buffer = self.buffer; - var pos = 0; - while (pos < buffer.length && buffer[pos] !== '\r' && buffer[pos] !== '\n') { - ++pos; - } - var line = buffer.substr(0, pos); - // Advance the buffer early in case we fail below. - if (buffer[pos] === '\r') { - ++pos; - } - if (buffer[pos] === '\n') { - ++pos; - } - self.buffer = buffer.substr(pos); - return line; - } - - // 3.4 WebVTT region and WebVTT region settings syntax - function parseRegion(input) { - var settings = new Settings(); - - parseOptions(input, function (k, v) { - switch (k) { - case "id": - settings.set(k, v); - break; - case "width": - settings.percent(k, v); - break; - case "lines": - settings.integer(k, v); - break; - case "regionanchor": - case "viewportanchor": - var xy = v.split(','); - if (xy.length !== 2) { - break; - } - // We have to make sure both x and y parse, so use a temporary - // settings object here. - var anchor = new Settings(); - anchor.percent("x", xy[0]); - anchor.percent("y", xy[1]); - if (!anchor.has("x") || !anchor.has("y")) { - break; - } - settings.set(k + "X", anchor.get("x")); - settings.set(k + "Y", anchor.get("y")); - break; - case "scroll": - settings.alt(k, v, ["up"]); - break; - } - }, /=/, /\s/); - - // Create the region, using default values for any values that were not - // specified. - if (settings.has("id")) { - var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)(); - region.width = settings.get("width", 100); - region.lines = settings.get("lines", 3); - region.regionAnchorX = settings.get("regionanchorX", 0); - region.regionAnchorY = settings.get("regionanchorY", 100); - region.viewportAnchorX = settings.get("viewportanchorX", 0); - region.viewportAnchorY = settings.get("viewportanchorY", 100); - region.scroll = settings.get("scroll", ""); - // Register the region. - self.onregion && self.onregion(region); - // Remember the VTTRegion for later in case we parse any VTTCues that - // reference it. - self.regionList.push({ - id: settings.get("id"), - region: region - }); - } - } - - // 3.2 WebVTT metadata header syntax - function parseHeader(input) { - parseOptions(input, function (k, v) { - switch (k) { - case "Region": - // 3.3 WebVTT region metadata header syntax - parseRegion(v); - break; - } - }, /:/); - } - - // 5.1 WebVTT file parsing. - try { - var line; - if (self.state === "INITIAL") { - // We can't start parsing until we have the first line. - if (!/\r\n|\n/.test(self.buffer)) { - return this; - } - - line = collectNextLine(); - - var m = line.match(/^WEBVTT([ \t].*)?$/); - if (!m || !m[0]) { - throw new ParsingError(ParsingError.Errors.BadSignature); - } - - self.state = "HEADER"; - } - - var alreadyCollectedLine = false; - while (self.buffer) { - // We can't parse a line until we have the full line. - if (!/\r\n|\n/.test(self.buffer)) { - return this; - } - - if (!alreadyCollectedLine) { - line = collectNextLine(); - } else { - alreadyCollectedLine = false; - } - - switch (self.state) { - case "HEADER": - // 13-18 - Allow a header (metadata) under the WEBVTT line. - if (/:/.test(line)) { - parseHeader(line); - } else if (!line) { - // An empty line terminates the header and starts the body (cues). - self.state = "ID"; - } - continue; - case "NOTE": - // Ignore NOTE blocks. - if (!line) { - self.state = "ID"; - } - continue; - case "ID": - // Check for the start of NOTE blocks. - if (/^NOTE($|[ \t])/.test(line)) { - self.state = "NOTE"; - break; - } - // 19-29 - Allow any number of line terminators, then initialize new cue values. - if (!line) { - continue; - } - self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, ""); - self.state = "CUE"; - // 30-39 - Check if self line contains an optional identifier or timing data. - if (line.indexOf("-->") === -1) { - self.cue.id = line; - continue; - } - // Process line as start of a cue. - /*falls through*/ - case "CUE": - // 40 - Collect cue timings and settings. - try { - parseCue(line, self.cue, self.regionList); - } catch (e) { - self.reportOrThrowError(e); - // In case of an error ignore rest of the cue. - self.cue = null; - self.state = "BADCUE"; - continue; - } - self.state = "CUETEXT"; - continue; - case "CUETEXT": - var hasSubstring = line.indexOf("-->") !== -1; - // 34 - If we have an empty line then report the cue. - // 35 - If we have the special substring '-->' then report the cue, - // but do not collect the line as we need to process the current - // one as a new cue. - if (!line || hasSubstring && (alreadyCollectedLine = true)) { - // We are done parsing self cue. - self.oncue && self.oncue(self.cue); - self.cue = null; - self.state = "ID"; - continue; - } - if (self.cue.text) { - self.cue.text += "\n"; - } - self.cue.text += line; - continue; - case "BADCUE": // BADCUE - // 54-62 - Collect and discard the remaining cue. - if (!line) { - self.state = "ID"; - } - continue; - } - } - } catch (e) { - self.reportOrThrowError(e); - - // If we are currently parsing a cue, report what we have. - if (self.state === "CUETEXT" && self.cue && self.oncue) { - self.oncue(self.cue); - } - self.cue = null; - // Enter BADWEBVTT state if header was not parsed correctly otherwise - // another exception occurred so enter BADCUE state. - self.state = self.state === "INITIAL" ? "BADWEBVTT" : "BADCUE"; - } - return this; - }, - flush: function () { - var self = this; - try { - // Finish decoding the stream. - self.buffer += self.decoder.decode(); - // Synthesize the end of the current cue or region. - if (self.cue || self.state === "HEADER") { - self.buffer += "\n\n"; - self.parse(); - } - // If we've flushed, parsed, and we're still on the INITIAL state then - // that means we don't have enough of the stream to parse the first - // line. - if (self.state === "INITIAL") { - throw new ParsingError(ParsingError.Errors.BadSignature); - } - } catch(e) { - self.reportOrThrowError(e); - } - self.onflush && self.onflush(); - return this; - } - }; - - global.WebVTT = WebVTT; - -}(this, (this.vttjs || {}))); diff --git a/vendor/assets/javascripts/videojs/video.js.map b/vendor/assets/javascripts/videojs/video.js.map deleted file mode 100755 index d5e92c6cdd8..00000000000 --- a/vendor/assets/javascripts/videojs/video.js.map +++ /dev/null @@ -1,303 +0,0 @@ -{ - "version": 3, - "sources": [ - "node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-pack/_prelude.js", - "node_modules/global/document.js", - "node_modules/global/window.js", - "node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-resolve/empty.js", - "node_modules/lodash-compat/date/now.js", - "node_modules/lodash-compat/function/debounce.js", - "node_modules/lodash-compat/function/restParam.js", - "node_modules/lodash-compat/function/throttle.js", - "node_modules/lodash-compat/internal/arrayCopy.js", - "node_modules/lodash-compat/internal/arrayEach.js", - "node_modules/lodash-compat/internal/baseCopy.js", - "node_modules/lodash-compat/internal/baseFor.js", - "node_modules/lodash-compat/internal/baseForIn.js", - "node_modules/lodash-compat/internal/baseMerge.js", - "node_modules/lodash-compat/internal/baseMergeDeep.js", - "node_modules/lodash-compat/internal/baseProperty.js", - "node_modules/lodash-compat/internal/bindCallback.js", - "node_modules/lodash-compat/internal/createAssigner.js", - "node_modules/lodash-compat/internal/createBaseFor.js", - "node_modules/lodash-compat/internal/getLength.js", - "node_modules/lodash-compat/internal/getNative.js", - "node_modules/lodash-compat/internal/isArrayLike.js", - "node_modules/lodash-compat/internal/isHostObject.js", - "node_modules/lodash-compat/internal/isIndex.js", - "node_modules/lodash-compat/internal/isIterateeCall.js", - "node_modules/lodash-compat/internal/isLength.js", - "node_modules/lodash-compat/internal/isObjectLike.js", - "node_modules/lodash-compat/internal/shimKeys.js", - "node_modules/lodash-compat/internal/toObject.js", - "node_modules/lodash-compat/lang/isArguments.js", - "node_modules/lodash-compat/lang/isArray.js", - "node_modules/lodash-compat/lang/isFunction.js", - "node_modules/lodash-compat/lang/isNative.js", - "node_modules/lodash-compat/lang/isObject.js", - "node_modules/lodash-compat/lang/isPlainObject.js", - "node_modules/lodash-compat/lang/isString.js", - "node_modules/lodash-compat/lang/isTypedArray.js", - "node_modules/lodash-compat/lang/toPlainObject.js", - "node_modules/lodash-compat/object/keys.js", - "node_modules/lodash-compat/object/keysIn.js", - "node_modules/lodash-compat/object/merge.js", - "node_modules/lodash-compat/support.js", - "node_modules/lodash-compat/utility/identity.js", - "node_modules/object.assign/hasSymbols.js", - "node_modules/object.assign/implementation.js", - "node_modules/object.assign/index.js", - "node_modules/object.assign/node_modules/define-properties/index.js", - "node_modules/object.assign/node_modules/define-properties/node_modules/foreach/index.js", - "node_modules/object.assign/node_modules/function-bind/implementation.js", - "node_modules/object.assign/node_modules/function-bind/index.js", - "node_modules/object.assign/node_modules/object-keys/index.js", - "node_modules/object.assign/node_modules/object-keys/isArguments.js", - "node_modules/object.assign/polyfill.js", - "node_modules/object.assign/shim.js", - "node_modules/safe-json-parse/tuple.js", - "node_modules/tsml/tsml.js", - "node_modules/xhr/index.js", - "node_modules/xhr/node_modules/is-function/index.js", - "node_modules/xhr/node_modules/once/once.js", - "node_modules/xhr/node_modules/parse-headers/node_modules/for-each/index.js", - "node_modules/xhr/node_modules/parse-headers/node_modules/trim/index.js", - "node_modules/xhr/node_modules/parse-headers/parse-headers.js", - "node_modules/xhr/node_modules/xtend/immutable.js", - "src/js/big-play-button.js", - "src/js/button.js", - "src/js/clickable-component.js", - "src/js/close-button.js", - "src/js/component.js", - "src/js/control-bar/control-bar.js", - "src/js/control-bar/fullscreen-toggle.js", - "src/js/control-bar/live-display.js", - "src/js/control-bar/mute-toggle.js", - "src/js/control-bar/play-toggle.js", - "src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js", - "src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js", - "src/js/control-bar/progress-control/load-progress-bar.js", - "src/js/control-bar/progress-control/mouse-time-display.js", - "src/js/control-bar/progress-control/play-progress-bar.js", - "src/js/control-bar/progress-control/progress-control.js", - "src/js/control-bar/progress-control/seek-bar.js", - "src/js/control-bar/progress-control/tooltip-progress-bar.js", - "src/js/control-bar/spacer-controls/custom-control-spacer.js", - "src/js/control-bar/spacer-controls/spacer.js", - "src/js/control-bar/text-track-controls/caption-settings-menu-item.js", - "src/js/control-bar/text-track-controls/captions-button.js", - "src/js/control-bar/text-track-controls/chapters-button.js", - "src/js/control-bar/text-track-controls/chapters-track-menu-item.js", - "src/js/control-bar/text-track-controls/descriptions-button.js", - "src/js/control-bar/text-track-controls/off-text-track-menu-item.js", - "src/js/control-bar/text-track-controls/subtitles-button.js", - "src/js/control-bar/text-track-controls/text-track-button.js", - "src/js/control-bar/text-track-controls/text-track-menu-item.js", - "src/js/control-bar/time-controls/current-time-display.js", - "src/js/control-bar/time-controls/duration-display.js", - "src/js/control-bar/time-controls/remaining-time-display.js", - "src/js/control-bar/time-controls/time-divider.js", - "src/js/control-bar/volume-control/volume-bar.js", - "src/js/control-bar/volume-control/volume-control.js", - "src/js/control-bar/volume-control/volume-level.js", - "src/js/control-bar/volume-menu-button.js", - "src/js/error-display.js", - "src/js/event-target.js", - "src/js/extend.js", - "src/js/fullscreen-api.js", - "src/js/loading-spinner.js", - "src/js/media-error.js", - "src/js/menu/menu-button.js", - "src/js/menu/menu-item.js", - "src/js/menu/menu.js", - "src/js/modal-dialog.js", - "src/js/player.js", - "src/js/plugins.js", - "src/js/popup/popup-button.js", - "src/js/popup/popup.js", - "src/js/poster-image.js", - "src/js/setup.js", - "src/js/slider/slider.js", - "src/js/tech/flash-rtmp.js", - "src/js/tech/flash.js", - "src/js/tech/html5.js", - "src/js/tech/loader.js", - "src/js/tech/tech.js", - "src/js/tracks/html-track-element-list.js", - "src/js/tracks/html-track-element.js", - "src/js/tracks/text-track-cue-list.js", - "src/js/tracks/text-track-display.js", - "src/js/tracks/text-track-enums.js", - "src/js/tracks/text-track-list-converter.js", - "src/js/tracks/text-track-list.js", - "src/js/tracks/text-track-settings.js", - "src/js/tracks/text-track.js", - "src/js/utils/browser.js", - "src/js/utils/buffer.js", - "src/js/utils/create-deprecation-proxy.js", - "src/js/utils/dom.js", - "src/js/utils/events.js", - "src/js/utils/fn.js", - "src/js/utils/format-time.js", - "src/js/utils/guid.js", - "src/js/utils/log.js", - "src/js/utils/merge-options.js", - "src/js/utils/stylesheet.js", - "src/js/utils/time-ranges.js", - "src/js/utils/to-title-case.js", - "src/js/utils/url.js", - "src/js/video.js" - ], - "names": [], - "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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,CAAC;;;;;;;;;AAShC,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC;;;;;;;;;AASlC,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC;;;;;;;;;AASlC,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;;;;;;AAcxC,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;AASxC,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,eAAe,CAAC;;;;;;;;;;;;AAY5C,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,eAAe,CAAC;;;;;;;;;AAS5C,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2B9B,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4B1C,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;AAS1C,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;AACjD,QAAM,CAAC,SAAS,EAAE,EAAE,EAAE,YAAU;AAAE,WAAO,OAAO,CAAC;GAAE,CAAC,CAAC;;;CAGtD,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACpE,UAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;GAC7B;;qBAEc,OAAO", - "file": "generated.js", - "sourceRoot": "", - "sourcesContent": [ - "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o logs the number of milliseconds it took for the deferred function to be invoked\n */\nvar now = nativeNow || function() {\n return new Date().getTime();\n};\n\nmodule.exports = now;\n", - "var isObject = require('../lang/isObject'),\n now = require('../date/now');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed invocations. Provide an options object to indicate that `func`\n * should be invoked on the leading and/or trailing edge of the `wait` timeout.\n * Subsequent calls to the debounced function return the result of the last\n * `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the debounced function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=false] Specify invoking on the leading\n * edge of the timeout.\n * @param {number} [options.maxWait] The maximum time `func` is allowed to be\n * delayed before it's invoked.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // avoid costly calculations while the window size is in flux\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // invoke `sendMail` when the click event is fired, debouncing subsequent calls\n * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // ensure `batchLog` is invoked once after 1 second of debounced calls\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', _.debounce(batchLog, 250, {\n * 'maxWait': 1000\n * }));\n *\n * // cancel a debounced call\n * var todoChanges = _.debounce(batchLog, 1000);\n * Object.observe(models.todo, todoChanges);\n *\n * Object.observe(models, function(changes) {\n * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {\n * todoChanges.cancel();\n * }\n * }, ['delete']);\n *\n * // ...at some point `models.todo` is changed\n * models.todo.completed = true;\n *\n * // ...before 1 second has passed `models.todo` is deleted\n * // which cancels the debounced `todoChanges` call\n * delete models.todo;\n */\nfunction debounce(func, wait, options) {\n var args,\n maxTimeoutId,\n result,\n stamp,\n thisArg,\n timeoutId,\n trailingCall,\n lastCalled = 0,\n maxWait = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = wait < 0 ? 0 : (+wait || 0);\n if (options === true) {\n var leading = true;\n trailing = false;\n } else if (isObject(options)) {\n leading = !!options.leading;\n maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (maxTimeoutId) {\n clearTimeout(maxTimeoutId);\n }\n lastCalled = 0;\n maxTimeoutId = timeoutId = trailingCall = undefined;\n }\n\n function complete(isCalled, id) {\n if (id) {\n clearTimeout(id);\n }\n maxTimeoutId = timeoutId = trailingCall = undefined;\n if (isCalled) {\n lastCalled = now();\n result = func.apply(thisArg, args);\n if (!timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n }\n }\n\n function delayed() {\n var remaining = wait - (now() - stamp);\n if (remaining <= 0 || remaining > wait) {\n complete(trailingCall, maxTimeoutId);\n } else {\n timeoutId = setTimeout(delayed, remaining);\n }\n }\n\n function maxDelayed() {\n complete(trailing, timeoutId);\n }\n\n function debounced() {\n args = arguments;\n stamp = now();\n thisArg = this;\n trailingCall = trailing && (timeoutId || !leading);\n\n if (maxWait === false) {\n var leadingCall = leading && !timeoutId;\n } else {\n if (!maxTimeoutId && !leading) {\n lastCalled = stamp;\n }\n var remaining = maxWait - (stamp - lastCalled),\n isCalled = remaining <= 0 || remaining > maxWait;\n\n if (isCalled) {\n if (maxTimeoutId) {\n maxTimeoutId = clearTimeout(maxTimeoutId);\n }\n lastCalled = stamp;\n result = func.apply(thisArg, args);\n }\n else if (!maxTimeoutId) {\n maxTimeoutId = setTimeout(maxDelayed, remaining);\n }\n }\n if (isCalled && timeoutId) {\n timeoutId = clearTimeout(timeoutId);\n }\n else if (!timeoutId && wait !== maxWait) {\n timeoutId = setTimeout(delayed, wait);\n }\n if (leadingCall) {\n isCalled = true;\n result = func.apply(thisArg, args);\n }\n if (isCalled && !timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n return result;\n }\n debounced.cancel = cancel;\n return debounced;\n}\n\nmodule.exports = debounce;\n", - "/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as an array.\n *\n * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.restParam(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction restParam(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n rest = Array(length);\n\n while (++index < length) {\n rest[index] = args[start + index];\n }\n switch (start) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, args[0], rest);\n case 2: return func.call(this, args[0], args[1], rest);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = rest;\n return func.apply(this, otherArgs);\n };\n}\n\nmodule.exports = restParam;\n", - "var debounce = require('./debounce'),\n isObject = require('../lang/isObject');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed invocations. Provide an options object to indicate\n * that `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. Subsequent calls to the throttled function return the\n * result of the last `func` call.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the throttled function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=true] Specify invoking on the leading\n * edge of the timeout.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // avoid excessively updating the position while scrolling\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes\n * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {\n * 'trailing': false\n * }));\n *\n * // cancel a trailing throttled call\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (options === false) {\n leading = false;\n } else if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });\n}\n\nmodule.exports = throttle;\n", - "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction arrayCopy(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = arrayCopy;\n", - "/**\n * A specialized version of `_.forEach` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n", - "/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\nfunction baseCopy(source, props, object) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n object[key] = source[key];\n }\n return object;\n}\n\nmodule.exports = baseCopy;\n", - "var createBaseFor = require('./createBaseFor');\n\n/**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", - "var baseFor = require('./baseFor'),\n keysIn = require('../object/keysIn');\n\n/**\n * The base implementation of `_.forIn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForIn(object, iteratee) {\n return baseFor(object, iteratee, keysIn);\n}\n\nmodule.exports = baseForIn;\n", - "var arrayEach = require('./arrayEach'),\n baseMergeDeep = require('./baseMergeDeep'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isObject = require('../lang/isObject'),\n isObjectLike = require('./isObjectLike'),\n isTypedArray = require('../lang/isTypedArray'),\n keys = require('../object/keys');\n\n/**\n * The base implementation of `_.merge` without support for argument juggling,\n * multiple sources, and `this` binding `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {Object} Returns `object`.\n */\nfunction baseMerge(object, source, customizer, stackA, stackB) {\n if (!isObject(object)) {\n return object;\n }\n var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),\n props = isSrcArr ? undefined : keys(source);\n\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObjectLike(srcValue)) {\n stackA || (stackA = []);\n stackB || (stackB = []);\n baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);\n }\n else {\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n }\n if ((result !== undefined || (isSrcArr && !(key in object))) &&\n (isCommon || (result === result ? (result !== value) : (value === value)))) {\n object[key] = result;\n }\n }\n });\n return object;\n}\n\nmodule.exports = baseMerge;\n", - "var arrayCopy = require('./arrayCopy'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isPlainObject = require('../lang/isPlainObject'),\n isTypedArray = require('../lang/isTypedArray'),\n toPlainObject = require('../lang/toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {\n var length = stackA.length,\n srcValue = source[key];\n\n while (length--) {\n if (stackA[length] == srcValue) {\n object[key] = stackB[length];\n return;\n }\n }\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {\n result = isArray(value)\n ? value\n : (isArrayLike(value) ? arrayCopy(value) : []);\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n result = isArguments(value)\n ? toPlainObject(value)\n : (isPlainObject(value) ? value : {});\n }\n else {\n isCommon = false;\n }\n }\n // Add the source value to the stack of traversed objects and associate\n // it with its merged value.\n stackA.push(srcValue);\n stackB.push(result);\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);\n } else if (result === result ? (result !== value) : (value === value)) {\n object[key] = result;\n }\n}\n\nmodule.exports = baseMergeDeep;\n", - "var toObject = require('./toObject');\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : toObject(object)[key];\n };\n}\n\nmodule.exports = baseProperty;\n", - "var identity = require('../utility/identity');\n\n/**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction bindCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return identity;\n }\n if (thisArg === undefined) {\n return func;\n }\n switch (argCount) {\n case 1: return function(value) {\n return func.call(thisArg, value);\n };\n case 3: return function(value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n case 5: return function(value, other, key, object, source) {\n return func.call(thisArg, value, other, key, object, source);\n };\n }\n return function() {\n return func.apply(thisArg, arguments);\n };\n}\n\nmodule.exports = bindCallback;\n", - "var bindCallback = require('./bindCallback'),\n isIterateeCall = require('./isIterateeCall'),\n restParam = require('../function/restParam');\n\n/**\n * Creates a `_.assign`, `_.defaults`, or `_.merge` function.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return restParam(function(object, sources) {\n var index = -1,\n length = object == null ? 0 : sources.length,\n customizer = length > 2 ? sources[length - 2] : undefined,\n guard = length > 2 ? sources[2] : undefined,\n thisArg = length > 1 ? sources[length - 1] : undefined;\n\n if (typeof customizer == 'function') {\n customizer = bindCallback(customizer, thisArg, 5);\n length -= 2;\n } else {\n customizer = typeof thisArg == 'function' ? thisArg : undefined;\n length -= (customizer ? 1 : 0);\n }\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n", - "var toObject = require('./toObject');\n\n/**\n * Creates a base function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var iterable = toObject(object),\n props = keysFunc(object),\n length = props.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length)) {\n var key = props[index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", - "var baseProperty = require('./baseProperty');\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\nmodule.exports = getLength;\n", - "var isNative = require('../lang/isNative');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", - "var getLength = require('./getLength'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nfunction isArrayLike(value) {\n return value != null && isLength(getLength(value));\n}\n\nmodule.exports = isArrayLike;\n", - "/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nvar isHostObject = (function() {\n try {\n Object({ 'toString': 0 } + '');\n } catch(e) {\n return function() { return false; };\n }\n return function(value) {\n // IE < 9 presents many host objects as `Object` objects that can coerce\n // to strings despite having improperly defined `toString` methods.\n return typeof value.toString != 'function' && typeof (value + '') == 'string';\n };\n}());\n\nmodule.exports = isHostObject;\n", - "/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;\n", - "var isArrayLike = require('./isArrayLike'),\n isIndex = require('./isIndex'),\n isObject = require('../lang/isObject');\n\n/**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)) {\n var other = object[index];\n return value === value ? (value === other) : (other !== other);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n", - "/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", - "/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", - "var isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isIndex = require('./isIndex'),\n isLength = require('./isLength'),\n isString = require('../lang/isString'),\n keysIn = require('../object/keysIn');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction shimKeys(object) {\n var props = keysIn(object),\n propsLength = props.length,\n length = propsLength && object.length;\n\n var allowIndexes = !!length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object));\n\n var index = -1,\n result = [];\n\n while (++index < propsLength) {\n var key = props[index];\n if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = shimKeys;\n", - "var isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\nfunction toObject(value) {\n if (support.unindexedChars && isString(value)) {\n var index = -1,\n length = value.length,\n result = Object(value);\n\n while (++index < length) {\n result[index] = value.charAt(index);\n }\n return result;\n }\n return isObject(value) ? value : Object(value);\n}\n\nmodule.exports = toObject;\n", - "var isArrayLike = require('../internal/isArrayLike'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is classified as an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n return isObjectLike(value) && isArrayLike(value) &&\n hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n}\n\nmodule.exports = isArguments;\n", - "var getNative = require('../internal/getNative'),\n isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\nmodule.exports = isArray;\n", - "var isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 which returns 'object' for typed array constructors.\n return isObject(value) && objToString.call(value) == funcTag;\n}\n\nmodule.exports = isFunction;\n", - "var isFunction = require('./isFunction'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);\n}\n\nmodule.exports = isNative;\n", - "/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", - "var baseForIn = require('../internal/baseForIn'),\n isArguments = require('./isArguments'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * **Note:** This method assumes objects created by the `Object` constructor\n * have no inherited enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n var Ctor;\n\n // Exit early for non `Object` objects.\n if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) ||\n (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {\n return false;\n }\n // IE < 9 iterates inherited properties before own properties. If the first\n // iterated property is an object's own property then there are no inherited\n // enumerable properties.\n var result;\n if (support.ownLast) {\n baseForIn(value, function(subValue, key, object) {\n result = hasOwnProperty.call(object, key);\n return false;\n });\n return result !== false;\n }\n // In most environments an object's own properties are iterated before\n // its inherited properties. If the last iterated property is an object's\n // own property then there are no inherited enumerable properties.\n baseForIn(value, function(subValue, key) {\n result = key;\n });\n return result === undefined || hasOwnProperty.call(value, result);\n}\n\nmodule.exports = isPlainObject;\n", - "var isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n", - "var isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n", - "var baseCopy = require('../internal/baseCopy'),\n keysIn = require('../object/keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable\n * properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return baseCopy(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n", - "var getNative = require('../internal/getNative'),\n isArrayLike = require('../internal/isArrayLike'),\n isObject = require('../lang/isObject'),\n shimKeys = require('../internal/shimKeys'),\n support = require('../support');\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = getNative(Object, 'keys');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n var Ctor = object == null ? undefined : object.constructor;\n if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {\n return shimKeys(object);\n }\n return isObject(object) ? nativeKeys(object) : [];\n};\n\nmodule.exports = keys;\n", - "var arrayEach = require('../internal/arrayEach'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isFunction = require('../lang/isFunction'),\n isIndex = require('../internal/isIndex'),\n isLength = require('../internal/isLength'),\n isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n/** Used to fix the JScript `[[DontEnum]]` bug. */\nvar shadowProps = [\n 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',\n 'toLocaleString', 'toString', 'valueOf'\n];\n\n/** Used for native method references. */\nvar errorProto = Error.prototype,\n objectProto = Object.prototype,\n stringProto = String.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to avoid iterating over non-enumerable properties in IE < 9. */\nvar nonEnumProps = {};\nnonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };\nnonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };\nnonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };\nnonEnumProps[objectTag] = { 'constructor': true };\n\narrayEach(shadowProps, function(key) {\n for (var tag in nonEnumProps) {\n if (hasOwnProperty.call(nonEnumProps, tag)) {\n var props = nonEnumProps[tag];\n props[key] = hasOwnProperty.call(props, key);\n }\n }\n});\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!isObject(object)) {\n object = Object(object);\n }\n var length = object.length;\n\n length = (length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object)) && length) || 0;\n\n var Ctor = object.constructor,\n index = -1,\n proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,\n isProto = proto === object,\n result = Array(length),\n skipIndexes = length > 0,\n skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),\n skipProto = support.enumPrototypes && isFunction(object);\n\n while (++index < length) {\n result[index] = (index + '');\n }\n // lodash skips the `constructor` property when it infers it's iterating\n // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`\n // attribute of an existing property and the `constructor` property of a\n // prototype defaults to non-enumerable.\n for (var key in object) {\n if (!(skipProto && key == 'prototype') &&\n !(skipErrorProps && (key == 'message' || key == 'name')) &&\n !(skipIndexes && isIndex(key, length)) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n if (support.nonEnumShadows && object !== objectProto) {\n var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),\n nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];\n\n if (tag == objectTag) {\n proto = objectProto;\n }\n length = shadowProps.length;\n while (length--) {\n key = shadowProps[length];\n var nonEnum = nonEnums[key];\n if (!(isProto && nonEnum) &&\n (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {\n result.push(key);\n }\n }\n }\n return result;\n}\n\nmodule.exports = keysIn;\n", - "var baseMerge = require('../internal/baseMerge'),\n createAssigner = require('../internal/createAssigner');\n\n/**\n * Recursively merges own enumerable properties of the source object(s), that\n * don't resolve to `undefined` into the destination object. Subsequent sources\n * overwrite property assignments of previous sources. If `customizer` is\n * provided it's invoked to produce the merged values of the destination and\n * source properties. If `customizer` returns `undefined` merging is handled\n * by the method instead. The `customizer` is bound to `thisArg` and invoked\n * with five arguments: (objectValue, sourceValue, key, object, source).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var users = {\n * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n * };\n *\n * var ages = {\n * 'data': [{ 'age': 36 }, { 'age': 40 }]\n * };\n *\n * _.merge(users, ages);\n * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n *\n * // using a customizer callback\n * var object = {\n * 'fruits': ['apple'],\n * 'vegetables': ['beet']\n * };\n *\n * var other = {\n * 'fruits': ['banana'],\n * 'vegetables': ['carrot']\n * };\n *\n * _.merge(object, other, function(a, b) {\n * if (_.isArray(a)) {\n * return a.concat(b);\n * }\n * });\n * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n */\nvar merge = createAssigner(baseMerge);\n\nmodule.exports = merge;\n", - "/** Used for native method references. */\nvar arrayProto = Array.prototype,\n errorProto = Error.prototype,\n objectProto = Object.prototype;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/**\n * An object environment feature flags.\n *\n * @static\n * @memberOf _\n * @type Object\n */\nvar support = {};\n\n(function(x) {\n var Ctor = function() { this.x = x; },\n object = { '0': x, 'length': x },\n props = [];\n\n Ctor.prototype = { 'valueOf': x, 'y': x };\n for (var key in new Ctor) { props.push(key); }\n\n /**\n * Detect if `name` or `message` properties of `Error.prototype` are\n * enumerable by default (IE < 9, Safari < 5.1).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||\n propertyIsEnumerable.call(errorProto, 'name');\n\n /**\n * Detect if `prototype` properties are enumerable by default.\n *\n * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1\n * (if the prototype or a property on the prototype has been set)\n * incorrectly set the `[[Enumerable]]` value of a function's `prototype`\n * property to `true`.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');\n\n /**\n * Detect if properties shadowing those on `Object.prototype` are non-enumerable.\n *\n * In IE < 9 an object's own properties, shadowing non-enumerable ones,\n * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.nonEnumShadows = !/valueOf/.test(props);\n\n /**\n * Detect if own properties are iterated after inherited properties (IE < 9).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.ownLast = props[0] != 'x';\n\n /**\n * Detect if `Array#shift` and `Array#splice` augment array-like objects\n * correctly.\n *\n * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array\n * `shift()` and `splice()` functions that fail to remove the last element,\n * `value[0]`, of array-like objects even though the \"length\" property is\n * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,\n * while `splice()` is buggy regardless of mode in IE < 9.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.spliceObjects = (splice.call(object, 0, 1), !object[0]);\n\n /**\n * Detect lack of support for accessing string characters by index.\n *\n * IE < 8 can't access characters by index. IE 8 can only access characters\n * by index on string literals, not string objects.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';\n}(1, 0));\n\nmodule.exports = support;\n", - "/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n", - "'use strict';\n\nvar keys = require('object-keys');\n\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tif (typeof sym === 'string') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(Object(sym) instanceof Symbol)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; }\n\tif (keys(obj).length !== 0) { return false; }\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n", - "'use strict';\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = require('object-keys');\nvar bind = require('function-bind');\nvar canBeObject = function (obj) {\n\treturn typeof obj !== 'undefined' && obj !== null;\n};\nvar hasSymbols = require('./hasSymbols')();\nvar toObject = Object;\nvar push = bind.call(Function.call, Array.prototype.push);\nvar propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);\n\nmodule.exports = function assign(target, source1) {\n\tif (!canBeObject(target)) { throw new TypeError('target must be an object'); }\n\tvar objTarget = toObject(target);\n\tvar s, source, i, props, syms, value, key;\n\tfor (s = 1; s < arguments.length; ++s) {\n\t\tsource = toObject(arguments[s]);\n\t\tprops = keys(source);\n\t\tif (hasSymbols && Object.getOwnPropertySymbols) {\n\t\t\tsyms = Object.getOwnPropertySymbols(source);\n\t\t\tfor (i = 0; i < syms.length; ++i) {\n\t\t\t\tkey = syms[i];\n\t\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\t\tpush(props, key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < props.length; ++i) {\n\t\t\tkey = props[i];\n\t\t\tvalue = source[key];\n\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\tobjTarget[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn objTarget;\n};\n", - "'use strict';\n\nvar defineProperties = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\ndefineProperties(implementation, {\n\timplementation: implementation,\n\tgetPolyfill: getPolyfill,\n\tshim: shim\n});\n\nmodule.exports = implementation;\n", - "'use strict';\n\nvar keys = require('object-keys');\nvar foreach = require('foreach');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';\n\nvar toStr = Object.prototype.toString;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\tObject.defineProperty(obj, 'x', { enumerable: false, value: obj });\n /* eslint-disable no-unused-vars, no-restricted-syntax */\n for (var _ in obj) { return false; }\n /* eslint-enable no-unused-vars, no-restricted-syntax */\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\tObject.defineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = props.concat(Object.getOwnPropertySymbols(map));\n\t}\n\tforeach(props, function (name) {\n\t\tdefineProperty(object, name, map[name], predicates[name]);\n\t});\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n", - "\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n", - "var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n", - "var implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n", - "'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\nvar hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');\nvar hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar blacklistedKeys = {\n\t$console: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$parent: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) {\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n", - "'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n", - "'use strict';\n\nvar implementation = require('./implementation');\n\nvar lacksProperEnumerationOrder = function () {\n\tif (!Object.assign) {\n\t\treturn false;\n\t}\n\t// v8, specifically in node 4.x, has a bug with incorrect property enumeration order\n\t// note: this does not detect the bug unless there's 20 characters\n\tvar str = 'abcdefghijklmnopqrst';\n\tvar letters = str.split('');\n\tvar map = {};\n\tfor (var i = 0; i < letters.length; ++i) {\n\t\tmap[letters[i]] = letters[i];\n\t}\n\tvar obj = Object.assign({}, map);\n\tvar actual = '';\n\tfor (var k in obj) {\n\t\tactual += k;\n\t}\n\treturn str !== actual;\n};\n\nvar assignHasPendingExceptions = function () {\n\tif (!Object.assign || !Object.preventExtensions) {\n\t\treturn false;\n\t}\n\t// Firefox 37 still has \"pending exception\" logic in its Object.assign implementation,\n\t// which is 72% slower than our shim, and Firefox 40's native implementation.\n\tvar thrower = Object.preventExtensions({ 1: 2 });\n\ttry {\n\t\tObject.assign(thrower, 'xy');\n\t} catch (e) {\n\t\treturn thrower[1] === 'y';\n\t}\n};\n\nmodule.exports = function getPolyfill() {\n\tif (!Object.assign) {\n\t\treturn implementation;\n\t}\n\tif (lacksProperEnumerationOrder()) {\n\t\treturn implementation;\n\t}\n\tif (assignHasPendingExceptions()) {\n\t\treturn implementation;\n\t}\n\treturn Object.assign;\n};\n", - "'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimAssign() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tObject,\n\t\t{ assign: polyfill },\n\t\t{ assign: function () { return Object.assign !== polyfill; } }\n\t);\n\treturn polyfill;\n};\n", - "module.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n var json\n var error = null\n\n try {\n json = JSON.parse(obj, reviver)\n } catch (err) {\n error = err\n }\n\n return [error, json]\n}\n", - "function clean (s) {\n return s.replace(/\\n\\r?\\s*/g, '')\n}\n\n\nmodule.exports = function tsml (sa) {\n var s = ''\n , i = 0\n\n for (; i < arguments.length; i++)\n s += clean(sa[i]) + (arguments[i + 1] || '')\n\n return s\n}", - "\"use strict\";\nvar window = require(\"global/window\")\nvar once = require(\"once\")\nvar isFunction = require(\"is-function\")\nvar parseHeaders = require(\"parse-headers\")\nvar xtend = require(\"xtend\")\n\nmodule.exports = createXHR\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\n\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\n options = initParams(uri, options, callback)\n options.method = method.toUpperCase()\n return _createXHR(options)\n }\n})\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i])\n }\n}\n\nfunction isEmpty(obj){\n for(var i in obj){\n if(obj.hasOwnProperty(i)) return false\n }\n return true\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri\n\n if (isFunction(options)) {\n callback = options\n if (typeof uri === \"string\") {\n params = {uri:uri}\n }\n } else {\n params = xtend(options, {uri: uri})\n }\n\n params.callback = callback\n return params\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback)\n return _createXHR(options)\n}\n\nfunction _createXHR(options) {\n var callback = options.callback\n if(typeof callback === \"undefined\"){\n throw new Error(\"callback argument missing\")\n }\n callback = once(callback)\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n loadFunc()\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined\n\n if (xhr.response) {\n body = xhr.response\n } else if (xhr.responseType === \"text\" || !xhr.responseType) {\n body = xhr.responseText || xhr.responseXML\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body)\n } catch (e) {}\n }\n\n return body\n }\n\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer)\n if(!(evt instanceof Error)){\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\n }\n evt.statusCode = 0\n callback(evt, failureResponse)\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return\n var status\n clearTimeout(timeoutTimer)\n if(options.useXDR && xhr.status===undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200\n } else {\n status = (xhr.status === 1223 ? 204 : xhr.status)\n }\n var response = failureResponse\n var err = null\n\n if (status !== 0){\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n }\n if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders())\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\")\n }\n callback(err, response, response.body)\n\n }\n\n var xhr = options.xhr || null\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest()\n }else{\n xhr = new createXHR.XMLHttpRequest()\n }\n }\n\n var key\n var aborted\n var uri = xhr.url = options.uri || options.url\n var method = xhr.method = options.method || \"GET\"\n var body = options.body || options.data || null\n var headers = xhr.headers = options.headers || {}\n var sync = !!options.sync\n var isJson = false\n var timeoutTimer\n\n if (\"json\" in options) {\n isJson = true\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don't override existing accept header declared by user\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don't override existing accept header declared by user\n body = JSON.stringify(options.json)\n }\n }\n\n xhr.onreadystatechange = readystatechange\n xhr.onload = loadFunc\n xhr.onerror = errorFunc\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n }\n xhr.ontimeout = errorFunc\n xhr.open(method, uri, !sync, options.username, options.password)\n //has to be after open\n if(!sync) {\n xhr.withCredentials = !!options.withCredentials\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0 ) {\n timeoutTimer = setTimeout(function(){\n aborted=true//IE9 may still call readystatechange\n xhr.abort(\"timeout\")\n var e = new Error(\"XMLHttpRequest timeout\")\n e.code = \"ETIMEDOUT\"\n errorFunc(e)\n }, options.timeout )\n }\n\n if (xhr.setRequestHeader) {\n for(key in headers){\n if(headers.hasOwnProperty(key)){\n xhr.setRequestHeader(key, headers[key])\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\")\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType\n }\n\n if (\"beforeSend\" in options &&\n typeof options.beforeSend === \"function\"\n ) {\n options.beforeSend(xhr)\n }\n\n xhr.send(body)\n\n return xhr\n\n\n}\n\nfunction noop() {}\n", - "module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n", - "module.exports = once\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var called = false\n return function () {\n if (called) return\n called = true\n return fn.apply(this, arguments)\n }\n}\n", - "var isFunction = require('is-function')\n\nmodule.exports = forEach\n\nvar toString = Object.prototype.toString\nvar hasOwnProperty = Object.prototype.hasOwnProperty\n\nfunction forEach(list, iterator, context) {\n if (!isFunction(iterator)) {\n throw new TypeError('iterator must be a function')\n }\n\n if (arguments.length < 3) {\n context = this\n }\n \n if (toString.call(list) === '[object Array]')\n forEachArray(list, iterator, context)\n else if (typeof list === 'string')\n forEachString(list, iterator, context)\n else\n forEachObject(list, iterator, context)\n}\n\nfunction forEachArray(array, iterator, context) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n iterator.call(context, array[i], i, array)\n }\n }\n}\n\nfunction forEachString(string, iterator, context) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n iterator.call(context, string.charAt(i), i, string)\n }\n}\n\nfunction forEachObject(object, iterator, context) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n iterator.call(context, object[k], k, object)\n }\n }\n}\n", - "\nexports = module.exports = trim;\n\nfunction trim(str){\n return str.replace(/^\\s*|\\s*$/g, '');\n}\n\nexports.left = function(str){\n return str.replace(/^\\s*/, '');\n};\n\nexports.right = function(str){\n return str.replace(/\\s*$/, '');\n};\n", - "var trim = require('trim')\n , forEach = require('for-each')\n , isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n }\n\nmodule.exports = function (headers) {\n if (!headers)\n return {}\n\n var result = {}\n\n forEach(\n trim(headers).split('\\n')\n , function (row) {\n var index = row.indexOf(':')\n , key = trim(row.slice(0, index)).toLowerCase()\n , value = trim(row.slice(index + 1))\n\n if (typeof(result[key]) === 'undefined') {\n result[key] = value\n } else if (isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [ result[key], value ]\n }\n }\n )\n\n return result\n}", - "module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n", - "/**\n * @file big-play-button.js\n */\nimport Button from './button.js';\nimport Component from './component.js';\n\n/**\n * Initial play button. Shows before the video has played. The hiding of the\n * big play button is done via CSS and player states.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Button\n * @class BigPlayButton\n */\nclass BigPlayButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return 'vjs-big-play-button';\n }\n\n /**\n * Handles click for play\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.play();\n }\n\n}\n\nBigPlayButton.prototype.controlText_ = 'Play Video';\n\nComponent.registerComponent('BigPlayButton', BigPlayButton);\nexport default BigPlayButton;\n", - "/**\n * @file button.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Base class for all buttons\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends ClickableComponent\n * @class Button\n */\nclass Button extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='button', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass()\n }, props);\n\n if (tag !== 'button') {\n log.warn(`Creating a Button with an HTML element of ${tag} is deprecated; use ClickableComponent instead.`);\n\n // Add properties for clickable element which is not a native HTML button\n props = assign({\n tabIndex: 0\n }, props);\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button'\n }, attributes);\n }\n\n // Add attributes for button element\n attributes = assign({\n type: 'button', // Necessary since the default button type is \"submit\"\n 'aria-live': 'polite' // let the screen reader user know that the text of the button may change\n }, attributes);\n\n let el = Component.prototype.createEl.call(this, tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * Adds a child component inside this button\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @deprecated\n * @method addChild\n */\n addChild(child, options={}) {\n let className = this.constructor.name;\n log.warn(`Adding an actionable (user controllable) child to a Button (${className}) is not supported; use a ClickableComponent instead.`);\n\n // Avoid the error message generated by ClickableComponent's addChild method\n return Component.prototype.addChild.call(this, child, options);\n }\n\n /**\n * Handle KeyPress (document level) - Extend with specific functionality for button\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Ignore Space (32) or Enter (13) key operation, which is handled by the browser for a button.\n if (event.which === 32 || event.which === 13) {\n } else {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n}\n\nComponent.registerComponent('Button', Button);\nexport default Button;\n", - "/**\n * @file button.js\n */\nimport Component from './component';\nimport * as Dom from './utils/dom.js';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Clickable Component which is clickable or keyboard actionable, but is not a native HTML button\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class ClickableComponent\n */\nclass ClickableComponent extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.emitTapEvents();\n\n this.on('tap', this.handleClick);\n this.on('click', this.handleClick);\n this.on('focus', this.handleFocus);\n this.on('blur', this.handleBlur);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='div', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass(),\n tabIndex: 0\n }, props);\n\n if (tag === 'button') {\n log.error(`Creating a ClickableComponent with an HTML element of ${tag} is not supported; use a Button instead.`);\n }\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button',\n 'aria-live': 'polite' // let the screen reader user know that the text of the element may change\n }, attributes);\n\n let el = super.createEl(tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * create control text\n *\n * @param {Element} el Parent element for the control text\n * @return {Element}\n * @method controlText\n */\n createControlTextEl(el) {\n this.controlTextEl_ = Dom.createEl('span', {\n className: 'vjs-control-text'\n });\n\n if (el) {\n el.appendChild(this.controlTextEl_);\n }\n\n this.controlText(this.controlText_);\n\n return this.controlTextEl_;\n }\n\n /**\n * Controls text - both request and localize\n *\n * @param {String} text Text for element\n * @return {String}\n * @method controlText\n */\n controlText(text) {\n if (!text) return this.controlText_ || 'Need Text';\n\n this.controlText_ = text;\n this.controlTextEl_.innerHTML = this.localize(this.controlText_);\n\n return this;\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String}\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-control vjs-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Adds a child component inside this clickable-component\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}) {\n // TODO: Fix adding an actionable child to a ClickableComponent; currently\n // it will cause issues with assistive technology (e.g. screen readers)\n // which support ARIA, since an element with role=\"button\" cannot have\n // actionable child elements.\n\n //let className = this.constructor.name;\n //log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role=\"button\" cannot have actionable child elements.`);\n\n return super.addChild(child, options);\n }\n\n /**\n * Enable the component element\n *\n * @return {Component}\n * @method enable\n */\n enable() {\n this.removeClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'false');\n return this;\n }\n\n /**\n * Disable the component element\n *\n * @return {Component}\n * @method disable\n */\n disable() {\n this.addClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'true');\n return this;\n }\n\n /**\n * Handle Click - Override with specific functionality for component\n *\n * @method handleClick\n */\n handleClick() {}\n\n /**\n * Handle Focus - Add keyboard functionality to element\n *\n * @method handleFocus\n */\n handleFocus() {\n Events.on(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n /**\n * Handle KeyPress (document level) - Trigger click when Space or Enter key is pressed\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Support Space (32) or Enter (13) key operation to fire a click event\n if (event.which === 32 || event.which === 13) {\n event.preventDefault();\n this.handleClick(event);\n } else if (super.handleKeyPress) {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n /**\n * Handle Blur - Remove keyboard triggers\n *\n * @method handleBlur\n */\n handleBlur() {\n Events.off(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n}\n\nComponent.registerComponent('ClickableComponent', ClickableComponent);\nexport default ClickableComponent;\n", - "import Button from './button';\nimport Component from './component';\n\n/**\n * The `CloseButton` component is a button which fires a \"close\" event\n * when it is activated.\n *\n * @extends Button\n * @class CloseButton\n */\nclass CloseButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n this.controlText(options && options.controlText || this.localize('Close'));\n }\n\n buildCSSClass() {\n return `vjs-close-button ${super.buildCSSClass()}`;\n }\n\n handleClick() {\n this.trigger({type: 'close', bubbles: false});\n }\n}\n\nComponent.registerComponent('CloseButton', CloseButton);\nexport default CloseButton;\n", - "/**\n * @file component.js\n *\n * Player Component - Base class for all UI objects\n */\n\nimport window from 'global/window';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as Events from './utils/events.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\n\n\n/**\n * Base UI Component class\n * Components are embeddable UI objects that are represented by both a\n * javascript object and an element in the DOM. They can be children of other\n * components, and can have many children themselves.\n * ```js\n * // adding a button to the player\n * var button = player.addChild('button');\n * button.el(); // -> button element\n * ```\n * ```html\n *
    \n *
    Button
    \n *
    \n * ```\n * Components are also event targets.\n * ```js\n * button.on('click', function(){\n * console.log('Button Clicked!');\n * });\n * button.trigger('customevent');\n * ```\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @class Component\n */\nclass Component {\n\n constructor(player, options, ready) {\n\n // The component might be the player itself and we can't pass `this` to super\n if (!player && this.play) {\n this.player_ = player = this; // eslint-disable-line\n } else {\n this.player_ = player;\n }\n\n // Make a copy of prototype.options_ to protect against overriding defaults\n this.options_ = mergeOptions({}, this.options_);\n\n // Updated options with supplied options\n options = this.options_ = mergeOptions(this.options_, options);\n\n // Get ID from options or options element if one is supplied\n this.id_ = options.id || (options.el && options.el.id);\n\n // If there was no ID from the options, generate one\n if (!this.id_) {\n // Don't require the player ID function in the case of mock players\n let id = player && player.id && player.id() || 'no_player';\n\n this.id_ = `${id}_component_${Guid.newGUID()}`;\n }\n\n this.name_ = options.name || null;\n\n // Create element if one wasn't provided in options\n if (options.el) {\n this.el_ = options.el;\n } else if (options.createEl !== false) {\n this.el_ = this.createEl();\n }\n\n this.children_ = [];\n this.childIndex_ = {};\n this.childNameIndex_ = {};\n\n // Add any child components in options\n if (options.initChildren !== false) {\n this.initChildren();\n }\n\n this.ready(ready);\n // Don't want to trigger ready here or it will before init is actually\n // finished for all children that run this constructor\n\n if (options.reportTouchActivity !== false) {\n this.enableTouchActivity();\n }\n }\n\n /**\n * Dispose of the component and all child components\n *\n * @method dispose\n */\n dispose() {\n this.trigger({ type: 'dispose', bubbles: false });\n\n // Dispose all children.\n if (this.children_) {\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i].dispose) {\n this.children_[i].dispose();\n }\n }\n }\n\n // Delete child references\n this.children_ = null;\n this.childIndex_ = null;\n this.childNameIndex_ = null;\n\n // Remove all event listeners.\n this.off();\n\n // Remove element from DOM\n if (this.el_.parentNode) {\n this.el_.parentNode.removeChild(this.el_);\n }\n\n Dom.removeElData(this.el_);\n this.el_ = null;\n }\n\n /**\n * Return the component's player\n *\n * @return {Player}\n * @method player\n */\n player() {\n return this.player_;\n }\n\n /**\n * Deep merge of options objects\n * Whenever a property is an object on both options objects\n * the two properties will be merged using mergeOptions.\n *\n * ```js\n * Parent.prototype.options_ = {\n * optionSet: {\n * 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' },\n * 'childTwo': {},\n * 'childThree': {}\n * }\n * }\n * newOptions = {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'abc': '123' }\n * 'childTwo': null,\n * 'childFour': {}\n * }\n * }\n *\n * this.options(newOptions);\n * ```\n * RESULT\n * ```js\n * {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' },\n * 'childTwo': null, // Disabled. Won't be initialized.\n * 'childThree': {},\n * 'childFour': {}\n * }\n * }\n * ```\n *\n * @param {Object} obj Object of new option values\n * @return {Object} A NEW object of this.options_ and obj merged\n * @method options\n */\n options(obj) {\n log.warn('this.options() has been deprecated and will be moved to the constructor in 6.0');\n\n if (!obj) {\n return this.options_;\n }\n\n this.options_ = mergeOptions(this.options_, obj);\n return this.options_;\n }\n\n /**\n * Get the component's DOM element\n * ```js\n * var domEl = myComponent.el();\n * ```\n *\n * @return {Element}\n * @method el\n */\n el() {\n return this.el_;\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} tagName Element's node type. e.g. 'div'\n * @param {Object=} properties An object of properties that should be set\n * @param {Object=} attributes An object of attributes that should be set\n * @return {Element}\n * @method createEl\n */\n createEl(tagName, properties, attributes) {\n return Dom.createEl(tagName, properties, attributes);\n }\n\n localize(string) {\n let code = this.player_.language && this.player_.language();\n let languages = this.player_.languages && this.player_.languages();\n\n if (!code || !languages) {\n return string;\n }\n\n let language = languages[code];\n\n if (language && language[string]) {\n return language[string];\n }\n\n let primaryCode = code.split('-')[0];\n let primaryLang = languages[primaryCode];\n\n if (primaryLang && primaryLang[string]) {\n return primaryLang[string];\n }\n\n return string;\n }\n\n /**\n * Return the component's DOM element where children are inserted.\n * Will either be the same as el() or a new element defined in createEl().\n *\n * @return {Element}\n * @method contentEl\n */\n contentEl() {\n return this.contentEl_ || this.el_;\n }\n\n /**\n * Get the component's ID\n * ```js\n * var id = myComponent.id();\n * ```\n *\n * @return {String}\n * @method id\n */\n id() {\n return this.id_;\n }\n\n /**\n * Get the component's name. The name is often used to reference the component.\n * ```js\n * var name = myComponent.name();\n * ```\n *\n * @return {String}\n * @method name\n */\n name() {\n return this.name_;\n }\n\n /**\n * Get an array of all child components\n * ```js\n * var kids = myComponent.children();\n * ```\n *\n * @return {Array} The children\n * @method children\n */\n children() {\n return this.children_;\n }\n\n /**\n * Returns a child component with the provided ID\n *\n * @return {Component}\n * @method getChildById\n */\n getChildById(id) {\n return this.childIndex_[id];\n }\n\n /**\n * Returns a child component with the provided name\n *\n * @return {Component}\n * @method getChild\n */\n getChild(name) {\n return this.childNameIndex_[name];\n }\n\n /**\n * Adds a child component inside this component\n * ```js\n * myComponent.el();\n * // ->
    \n * myComponent.children();\n * // [empty array]\n *\n * var myButton = myComponent.addChild('MyButton');\n * // ->
    myButton
    \n * // -> myButton === myComponent.children()[0];\n * ```\n * Pass in options for child constructors and options for children of the child\n * ```js\n * var myButton = myComponent.addChild('MyButton', {\n * text: 'Press Me',\n * buttonChildExample: {\n * buttonChildOption: true\n * }\n * });\n * ```\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @param {Number} index into our children array to attempt to add the child\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}, index=this.children_.length) {\n let component;\n let componentName;\n\n // If child is a string, create nt with options\n if (typeof child === 'string') {\n componentName = child;\n\n // Options can also be specified as a boolean, so convert to an empty object if false.\n if (!options) {\n options = {};\n }\n\n // Same as above, but true is deprecated so show a warning.\n if (options === true) {\n log.warn('Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`.');\n options = {};\n }\n\n // If no componentClass in options, assume componentClass is the name lowercased\n // (e.g. playButton)\n let componentClassName = options.componentClass || toTitleCase(componentName);\n\n // Set name through options\n options.name = componentName;\n\n // Create a new object & element for this controls set\n // If there's no .player_, this is a player\n let ComponentClass = Component.getComponent(componentClassName);\n\n if (!ComponentClass) {\n throw new Error(`Component ${componentClassName} does not exist`);\n }\n\n // data stored directly on the videojs object may be\n // misidentified as a component to retain\n // backwards-compatibility with 4.x. check to make sure the\n // component class can be instantiated.\n if (typeof ComponentClass !== 'function') {\n return null;\n }\n\n component = new ComponentClass(this.player_ || this, options);\n\n // child is a component instance\n } else {\n component = child;\n }\n\n this.children_.splice(index, 0, component);\n\n if (typeof component.id === 'function') {\n this.childIndex_[component.id()] = component;\n }\n\n // If a name wasn't used to create the component, check if we can use the\n // name function of the component\n componentName = componentName || (component.name && component.name());\n\n if (componentName) {\n this.childNameIndex_[componentName] = component;\n }\n\n // Add the UI object's element to the container div (box)\n // Having an element is not required\n if (typeof component.el === 'function' && component.el()) {\n let childNodes = this.contentEl().children;\n let refNode = childNodes[index] || null;\n this.contentEl().insertBefore(component.el(), refNode);\n }\n\n // Return so it can stored on parent object if desired.\n return component;\n }\n\n /**\n * Remove a child component from this component's list of children, and the\n * child component's element from this component's element\n *\n * @param {Component} component Component to remove\n * @method removeChild\n */\n removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n\n if (!component || !this.children_) {\n return;\n }\n\n let childFound = false;\n\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i] === component) {\n childFound = true;\n this.children_.splice(i, 1);\n break;\n }\n }\n\n if (!childFound) {\n return;\n }\n\n this.childIndex_[component.id()] = null;\n this.childNameIndex_[component.name()] = null;\n\n let compEl = component.el();\n\n if (compEl && compEl.parentNode === this.contentEl()) {\n this.contentEl().removeChild(component.el());\n }\n }\n\n /**\n * Add and initialize default child components from options\n * ```js\n * // when an instance of MyComponent is created, all children in options\n * // will be added to the instance by their name strings and options\n * MyComponent.prototype.options_ = {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * };\n *\n * // Or when creating the component\n * var myComp = new MyComponent(player, {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * });\n * ```\n * The children option can also be an array of\n * child options objects (that also include a 'name' key).\n * This can be used if you have two child components of the\n * same type that need different options.\n * ```js\n * var myComp = new MyComponent(player, {\n * children: [\n * 'button',\n * {\n * name: 'button',\n * someOtherOption: true\n * },\n * {\n * name: 'button',\n * someOtherOption: false\n * }\n * ]\n * });\n * ```\n *\n * @method initChildren\n */\n initChildren() {\n let children = this.options_.children;\n\n if (children) {\n // `this` is `parent`\n let parentOptions = this.options_;\n\n let handleAdd = (child) => {\n let name = child.name;\n let opts = child.opts;\n\n // Allow options for children to be set at the parent options\n // e.g. videojs(id, { controlBar: false });\n // instead of videojs(id, { children: { controlBar: false });\n if (parentOptions[name] !== undefined) {\n opts = parentOptions[name];\n }\n\n // Allow for disabling default components\n // e.g. options['children']['posterImage'] = false\n if (opts === false) {\n return;\n }\n\n // Allow options to be passed as a simple boolean if no configuration\n // is necessary.\n if (opts === true) {\n opts = {};\n }\n\n // We also want to pass the original player options to each component as well so they don't need to\n // reach back into the player for options later.\n opts.playerOptions = this.options_.playerOptions;\n\n // Create and add the child component.\n // Add a direct reference to the child by name on the parent instance.\n // If two of the same component are used, different names should be supplied\n // for each\n let newChild = this.addChild(name, opts);\n if (newChild) {\n this[name] = newChild;\n }\n };\n\n // Allow for an array of children details to passed in the options\n let workingChildren;\n let Tech = Component.getComponent('Tech');\n\n if (Array.isArray(children)) {\n workingChildren = children;\n } else {\n workingChildren = Object.keys(children);\n }\n\n workingChildren\n // children that are in this.options_ but also in workingChildren would\n // give us extra children we do not want. So, we want to filter them out.\n .concat(Object.keys(this.options_)\n .filter(function(child) {\n return !workingChildren.some(function(wchild) {\n if (typeof wchild === 'string') {\n return child === wchild;\n } else {\n return child === wchild.name;\n }\n });\n }))\n .map((child) => {\n let name, opts;\n\n if (typeof child === 'string') {\n name = child;\n opts = children[name] || this.options_[name] || {};\n } else {\n name = child.name;\n opts = child;\n }\n\n return {name, opts};\n })\n .filter((child) => {\n // we have to make sure that child.name isn't in the techOrder since\n // techs are registerd as Components but can't aren't compatible\n // See https://github.com/videojs/video.js/issues/2772\n let c = Component.getComponent(child.opts.componentClass ||\n toTitleCase(child.name));\n return c && !Tech.isTech(c);\n })\n .forEach(handleAdd);\n }\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n // Child classes can include a function that does:\n // return 'CLASS NAME' + this._super();\n return '';\n }\n\n /**\n * Add an event listener to this component's element\n * ```js\n * var myFunc = function(){\n * var myComponent = this;\n * // Do something when the event is fired\n * };\n *\n * myComponent.on('eventType', myFunc);\n * ```\n * The context of myFunc will be myComponent unless previously bound.\n * Alternatively, you can add a listener to another element or component.\n * ```js\n * myComponent.on(otherElement, 'eventName', myFunc);\n * myComponent.on(otherComponent, 'eventName', myFunc);\n * ```\n * The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)`\n * and `otherComponent.on('eventName', myFunc)` is that this way the listeners\n * will be automatically cleaned up when either component is disposed.\n * It will also bind myComponent as the context of myFunc.\n * **NOTE**: When using this on elements in the page other than window\n * and document (both permanent), if you remove the element from the DOM\n * you need to call `myComponent.trigger(el, 'dispose')` on it to clean up\n * references to it and allow the browser to garbage collect it.\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The event handler or event type\n * @param {Function} third The event handler\n * @return {Component}\n * @method on\n */\n on(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.on(this.el_, first, Fn.bind(this, second));\n\n // Targeting another component or element\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n // When this component is disposed, remove the listener from the other component\n const removeOnDispose = () => this.off(target, type, fn);\n\n // Use the same function ID so we can remove it later it using the ID\n // of the original listener\n removeOnDispose.guid = fn.guid;\n this.on('dispose', removeOnDispose);\n\n // If the other component is disposed first we need to clean the reference\n // to the other component in this component's removeOnDispose listener\n // Otherwise we create a memory leak.\n const cleanRemover = () => this.off('dispose', removeOnDispose);\n\n // Add the same function ID so we can easily remove it later\n cleanRemover.guid = fn.guid;\n\n // Check if this is a DOM node\n if (first.nodeName) {\n // Add the listener to the other element\n Events.on(target, type, fn);\n Events.on(target, 'dispose', cleanRemover);\n\n // Should be a component\n // Not using `instanceof Component` because it makes mock players difficult\n } else if (typeof first.on === 'function') {\n // Add the listener to the other component\n target.on(type, fn);\n target.on('dispose', cleanRemover);\n }\n }\n\n return this;\n }\n\n /**\n * Remove an event listener from this component's element\n * ```js\n * myComponent.off('eventType', myFunc);\n * ```\n * If myFunc is excluded, ALL listeners for the event type will be removed.\n * If eventType is excluded, ALL listeners will be removed from the component.\n * Alternatively you can use `off` to remove listeners that were added to other\n * elements or components using `myComponent.on(otherComponent...`.\n * In this case both the event type and listener function are REQUIRED.\n * ```js\n * myComponent.off(otherElement, 'eventType', myFunc);\n * myComponent.off(otherComponent, 'eventType', myFunc);\n * ```\n *\n * @param {String=|Component} first The event type or other component\n * @param {Function=|String} second The listener function or event type\n * @param {Function=} third The listener for other component\n * @return {Component}\n * @method off\n */\n off(first, second, third) {\n if (!first || typeof first === 'string' || Array.isArray(first)) {\n Events.off(this.el_, first, second);\n } else {\n const target = first;\n const type = second;\n // Ensure there's at least a guid, even if the function hasn't been used\n const fn = Fn.bind(this, third);\n\n // Remove the dispose listener on this component,\n // which was given the same guid as the event listener\n this.off('dispose', fn);\n\n if (first.nodeName) {\n // Remove the listener\n Events.off(target, type, fn);\n // Remove the listener for cleaning the dispose listener\n Events.off(target, 'dispose', fn);\n } else {\n target.off(type, fn);\n target.off('dispose', fn);\n }\n }\n\n return this;\n }\n\n /**\n * Add an event listener to be triggered only once and then removed\n * ```js\n * myComponent.one('eventName', myFunc);\n * ```\n * Alternatively you can add a listener to another element or component\n * that will be triggered only once.\n * ```js\n * myComponent.one(otherElement, 'eventName', myFunc);\n * myComponent.one(otherComponent, 'eventName', myFunc);\n * ```\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The listener function or event type\n * @param {Function=} third The listener function for other component\n * @return {Component}\n * @method one\n */\n one(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.one(this.el_, first, Fn.bind(this, second));\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n const newFunc = () => {\n this.off(target, type, newFunc);\n fn.apply(null, arguments);\n };\n\n // Keep the same function ID so we can remove it later\n newFunc.guid = fn.guid;\n\n this.on(target, type, newFunc);\n }\n\n return this;\n }\n\n /**\n * Trigger an event on an element\n * ```js\n * myComponent.trigger('eventName');\n * myComponent.trigger({'type':'eventName'});\n * myComponent.trigger('eventName', {data: 'some data'});\n * myComponent.trigger({'type':'eventName'}, {data: 'some data'});\n * ```\n *\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Component} self\n * @method trigger\n */\n trigger(event, hash) {\n Events.trigger(this.el_, event, hash);\n return this;\n }\n\n /**\n * Bind a listener to the component's ready state.\n * Different from event listeners in that if the ready event has already happened\n * it will trigger the function immediately.\n *\n * @param {Function} fn Ready listener\n * @param {Boolean} sync Exec the listener synchronously if component is ready\n * @return {Component}\n * @method ready\n */\n ready(fn, sync=false) {\n if (fn) {\n if (this.isReady_) {\n if (sync) {\n fn.call(this);\n } else {\n // Call the function asynchronously by default for consistency\n this.setTimeout(fn, 1);\n }\n } else {\n this.readyQueue_ = this.readyQueue_ || [];\n this.readyQueue_.push(fn);\n }\n }\n return this;\n }\n\n /**\n * Trigger the ready listeners\n *\n * @return {Component}\n * @method triggerReady\n */\n triggerReady() {\n this.isReady_ = true;\n\n // Ensure ready is triggerd asynchronously\n this.setTimeout(function(){\n let readyQueue = this.readyQueue_;\n\n // Reset Ready Queue\n this.readyQueue_ = [];\n\n if (readyQueue && readyQueue.length > 0) {\n readyQueue.forEach(function(fn){\n fn.call(this);\n }, this);\n }\n\n // Allow for using event listeners also\n this.trigger('ready');\n }, 1);\n }\n\n /**\n * Finds a single DOM element matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\n $(selector, context) {\n return Dom.$(selector, context || this.contentEl());\n }\n\n /**\n * Finds a all DOM elements matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\n $$(selector, context) {\n return Dom.$$(selector, context || this.contentEl());\n }\n\n /**\n * Check if a component's element has a CSS class name\n *\n * @param {String} classToCheck Classname to check\n * @return {Component}\n * @method hasClass\n */\n hasClass(classToCheck) {\n return Dom.hasElClass(this.el_, classToCheck);\n }\n\n /**\n * Add a CSS class name to the component's element\n *\n * @param {String} classToAdd Classname to add\n * @return {Component}\n * @method addClass\n */\n addClass(classToAdd) {\n Dom.addElClass(this.el_, classToAdd);\n return this;\n }\n\n /**\n * Remove a CSS class name from the component's element\n *\n * @param {String} classToRemove Classname to remove\n * @return {Component}\n * @method removeClass\n */\n removeClass(classToRemove) {\n Dom.removeElClass(this.el_, classToRemove);\n return this;\n }\n\n /**\n * Add or remove a CSS class name from the component's element\n *\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n *\n * @return {Component}\n * @method toggleClass\n */\n toggleClass(classToToggle, predicate) {\n Dom.toggleElClass(this.el_, classToToggle, predicate);\n return this;\n }\n\n /**\n * Show the component element if hidden\n *\n * @return {Component}\n * @method show\n */\n show() {\n this.removeClass('vjs-hidden');\n return this;\n }\n\n /**\n * Hide the component element if currently showing\n *\n * @return {Component}\n * @method hide\n */\n hide() {\n this.addClass('vjs-hidden');\n return this;\n }\n\n /**\n * Lock an item in its visible state\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method lockShowing\n */\n lockShowing() {\n this.addClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Unlock an item to be hidden\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method unlockShowing\n */\n unlockShowing() {\n this.removeClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Set or get the width of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num Optional width number\n * @param {Boolean} skipListeners Skip the 'resize' event trigger\n * @return {Component} This component, when setting the width\n * @return {Number|String} The width, when getting\n * @method width\n */\n width(num, skipListeners) {\n return this.dimension('width', num, skipListeners);\n }\n\n /**\n * Get or set the height of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num New component height\n * @param {Boolean=} skipListeners Skip the resize event trigger\n * @return {Component} This component, when setting the height\n * @return {Number|String} The height, when getting\n * @method height\n */\n height(num, skipListeners) {\n return this.dimension('height', num, skipListeners);\n }\n\n /**\n * Set both width and height at the same time\n *\n * @param {Number|String} width Width of player\n * @param {Number|String} height Height of player\n * @return {Component} The component\n * @method dimensions\n */\n dimensions(width, height) {\n // Skip resize listeners on width for optimization\n return this.width(width, true).height(height);\n }\n\n /**\n * Get or set width or height\n * This is the shared code for the width() and height() methods.\n * All for an integer, integer + 'px' or integer + '%';\n * Known issue: Hidden elements officially have a width of 0. We're defaulting\n * to the style.width value and falling back to computedStyle which has the\n * hidden element issue. Info, but probably not an efficient fix:\n * http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/\n *\n * @param {String} widthOrHeight 'width' or 'height'\n * @param {Number|String=} num New dimension\n * @param {Boolean=} skipListeners Skip resize event trigger\n * @return {Component} The component if a dimension was set\n * @return {Number|String} The dimension if nothing was set\n * @private\n * @method dimension\n */\n dimension(widthOrHeight, num, skipListeners) {\n if (num !== undefined) {\n // Set to zero if null or literally NaN (NaN !== NaN)\n if (num === null || num !== num) {\n num = 0;\n }\n\n // Check if using css width/height (% or px) and adjust\n if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n this.el_.style[widthOrHeight] = num;\n } else if (num === 'auto') {\n this.el_.style[widthOrHeight] = '';\n } else {\n this.el_.style[widthOrHeight] = num + 'px';\n }\n\n // skipListeners allows us to avoid triggering the resize event when setting both width and height\n if (!skipListeners) {\n this.trigger('resize');\n }\n\n // Return component\n return this;\n }\n\n // Not setting a value, so getting it\n // Make sure element exists\n if (!this.el_) {\n return 0;\n }\n\n // Get dimension value from style\n let val = this.el_.style[widthOrHeight];\n let pxIndex = val.indexOf('px');\n\n if (pxIndex !== -1) {\n // Return the pixel value with no 'px'\n return parseInt(val.slice(0, pxIndex), 10);\n }\n\n // No px so using % or no style was set, so falling back to offsetWidth/height\n // If component has display:none, offset will return 0\n // TODO: handle display:none and no dimension style using px\n return parseInt(this.el_['offset' + toTitleCase(widthOrHeight)], 10);\n }\n\n /**\n * Get width or height of computed style\n * @param {String} widthOrHeight 'width' or 'height'\n * @return {Number|Boolean} The bolean false if nothing was set\n * @method currentDimension\n */\n currentDimension(widthOrHeight) {\n let computedWidthOrHeight = 0;\n\n if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n throw new Error('currentDimension only accepts width or height value');\n }\n\n if (typeof window.getComputedStyle === 'function') {\n const computedStyle = window.getComputedStyle(this.el_);\n computedWidthOrHeight = computedStyle.getPropertyValue(widthOrHeight) || computedStyle[widthOrHeight];\n } else if (this.el_.currentStyle) {\n // ie 8 doesn't support computed style, shim it\n // return clientWidth or clientHeight instead for better accuracy\n const rule = `offset${toTitleCase(widthOrHeight)}`;\n computedWidthOrHeight = this.el_[rule];\n }\n\n // remove 'px' from variable and parse as integer\n computedWidthOrHeight = parseFloat(computedWidthOrHeight);\n return computedWidthOrHeight;\n }\n\n /**\n * Get an object which contains width and height values of computed style\n * @return {Object} The dimensions of element\n * @method currentDimensions\n */\n currentDimensions() {\n return {\n width: this.currentDimension('width'),\n height: this.currentDimension('height')\n };\n }\n\n /**\n * Get width of computed style\n * @return {Integer}\n * @method currentWidth\n */\n currentWidth() {\n return this.currentDimension('width');\n }\n\n /**\n * Get height of computed style\n * @return {Integer}\n * @method currentHeight\n */\n currentHeight() {\n return this.currentDimension('height');\n }\n\n /**\n * Emit 'tap' events when touch events are supported\n * This is used to support toggling the controls through a tap on the video.\n * We're requiring them to be enabled because otherwise every component would\n * have this extra overhead unnecessarily, on mobile devices where extra\n * overhead is especially bad.\n *\n * @private\n * @method emitTapEvents\n */\n emitTapEvents() {\n // Track the start time so we can determine how long the touch lasted\n let touchStart = 0;\n let firstTouch = null;\n\n // Maximum movement allowed during a touch event to still be considered a tap\n // Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number.\n const tapMovementThreshold = 10;\n\n // The maximum length a touch can be while still being considered a tap\n const touchTimeThreshold = 200;\n\n let couldBeTap;\n\n this.on('touchstart', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length === 1) {\n // Copy the touches object to prevent modifying the original\n firstTouch = assign({}, event.touches[0]);\n // Record start time so we can detect a tap vs. \"touch and hold\"\n touchStart = new Date().getTime();\n // Reset couldBeTap tracking\n couldBeTap = true;\n }\n });\n\n this.on('touchmove', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length > 1) {\n couldBeTap = false;\n } else if (firstTouch) {\n // Some devices will throw touchmoves for all but the slightest of taps.\n // So, if we moved only a small distance, this could still be a tap\n const xdiff = event.touches[0].pageX - firstTouch.pageX;\n const ydiff = event.touches[0].pageY - firstTouch.pageY;\n const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n\n if (touchDistance > tapMovementThreshold) {\n couldBeTap = false;\n }\n }\n });\n\n const noTap = function() {\n couldBeTap = false;\n };\n\n // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n this.on('touchleave', noTap);\n this.on('touchcancel', noTap);\n\n // When the touch ends, measure how long it took and trigger the appropriate\n // event\n this.on('touchend', function(event) {\n firstTouch = null;\n // Proceed only if the touchmove/leave/cancel event didn't happen\n if (couldBeTap === true) {\n // Measure how long the touch lasted\n const touchTime = new Date().getTime() - touchStart;\n\n // Make sure the touch was less than the threshold to be considered a tap\n if (touchTime < touchTimeThreshold) {\n // Don't let browser turn this into a click\n event.preventDefault();\n this.trigger('tap');\n // It may be good to copy the touchend event object and change the\n // type to tap, if the other event properties aren't exact after\n // Events.fixEvent runs (e.g. event.target)\n }\n }\n });\n }\n\n /**\n * Report user touch activity when touch events occur\n * User activity is used to determine when controls should show/hide. It's\n * relatively simple when it comes to mouse events, because any mouse event\n * should show the controls. So we capture mouse events that bubble up to the\n * player and report activity when that happens.\n * With touch events it isn't as easy. We can't rely on touch events at the\n * player level, because a tap (touchstart + touchend) on the video itself on\n * mobile devices is meant to turn controls off (and on). User activity is\n * checked asynchronously, so what could happen is a tap event on the video\n * turns the controls off, then the touchend event bubbles up to the player,\n * which if it reported user activity, would turn the controls right back on.\n * (We also don't want to completely block touch events from bubbling up)\n * Also a touchmove, touch+hold, and anything other than a tap is not supposed\n * to turn the controls back on on a mobile device.\n * Here we're setting the default component behavior to report user activity\n * whenever touch events happen, and this can be turned off by components that\n * want touch events to act differently.\n *\n * @method enableTouchActivity\n */\n enableTouchActivity() {\n // Don't continue if the root player doesn't support reporting user activity\n if (!this.player() || !this.player().reportUserActivity) {\n return;\n }\n\n // listener for reporting that the user is active\n const report = Fn.bind(this.player(), this.player().reportUserActivity);\n\n let touchHolding;\n\n this.on('touchstart', function() {\n report();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(touchHolding);\n // report at the same interval as activityCheck\n touchHolding = this.setInterval(report, 250);\n });\n\n const touchEnd = function(event) {\n report();\n // stop the interval that maintains activity if the touch is holding\n this.clearInterval(touchHolding);\n };\n\n this.on('touchmove', report);\n this.on('touchend', touchEnd);\n this.on('touchcancel', touchEnd);\n }\n\n /**\n * Creates timeout and sets up disposal automatically.\n *\n * @param {Function} fn The function to run after the timeout.\n * @param {Number} timeout Number of ms to delay before executing specified function.\n * @return {Number} Returns the timeout ID\n * @method setTimeout\n */\n setTimeout(fn, timeout) {\n fn = Fn.bind(this, fn);\n\n // window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't.\n let timeoutId = window.setTimeout(fn, timeout);\n\n const disposeFn = function() {\n this.clearTimeout(timeoutId);\n };\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.on('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Clears a timeout and removes the associated dispose listener\n *\n * @param {Number} timeoutId The id of the timeout to clear\n * @return {Number} Returns the timeout ID\n * @method clearTimeout\n */\n clearTimeout(timeoutId) {\n window.clearTimeout(timeoutId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.off('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Creates an interval and sets up disposal automatically.\n *\n * @param {Function} fn The function to run every N seconds.\n * @param {Number} interval Number of ms to delay before executing specified function.\n * @return {Number} Returns the interval ID\n * @method setInterval\n */\n setInterval(fn, interval) {\n fn = Fn.bind(this, fn);\n\n let intervalId = window.setInterval(fn, interval);\n\n const disposeFn = function() {\n this.clearInterval(intervalId);\n };\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.on('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Clears an interval and removes the associated dispose listener\n *\n * @param {Number} intervalId The id of the interval to clear\n * @return {Number} Returns the interval ID\n * @method clearInterval\n */\n clearInterval(intervalId) {\n window.clearInterval(intervalId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.off('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Registers a component\n *\n * @param {String} name Name of the component to register\n * @param {Object} comp The component to register\n * @static\n * @method registerComponent\n */\n static registerComponent(name, comp) {\n if (!Component.components_) {\n Component.components_ = {};\n }\n\n Component.components_[name] = comp;\n return comp;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getComponent(name) {\n if (Component.components_ && Component.components_[name]) {\n return Component.components_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)`);\n return window.videojs[name];\n }\n }\n\n /**\n * Sets up the constructor using the supplied init method\n * or uses the init of the parent object\n *\n * @param {Object} props An object of properties\n * @static\n * @deprecated\n * @method extend\n */\n static extend(props) {\n props = props || {};\n\n log.warn('Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead');\n\n // Set up the constructor using the supplied init method\n // or using the init of the parent object\n // Make sure to check the unobfuscated version for external libs\n let init = props.init || props.init || this.prototype.init || this.prototype.init || function() {};\n // In Resig's simple class inheritance (previously used) the constructor\n // is a function that calls `this.init.apply(arguments)`\n // However that would prevent us from using `ParentObject.call(this);`\n // in a Child constructor because the `this` in `this.init`\n // would still refer to the Child and cause an infinite loop.\n // We would instead have to do\n // `ParentObject.prototype.init.apply(this, arguments);`\n // Bleh. We're not creating a _super() function, so it's good to keep\n // the parent constructor reference simple.\n let subObj = function() {\n init.apply(this, arguments);\n };\n\n // Inherit from this object's prototype\n subObj.prototype = Object.create(this.prototype);\n // Reset the constructor property for subObj otherwise\n // instances of subObj would have the constructor of the parent Object\n subObj.prototype.constructor = subObj;\n\n // Make the class extendable\n subObj.extend = Component.extend;\n\n // Extend subObj's prototype with functions and other properties from props\n for (let name in props) {\n if (props.hasOwnProperty(name)) {\n subObj.prototype[name] = props[name];\n }\n }\n\n return subObj;\n }\n}\n\nComponent.registerComponent('Component', Component);\nexport default Component;\n", - "/**\n * @file control-bar.js\n */\nimport Component from '../component.js';\n\n// Required children\nimport PlayToggle from './play-toggle.js';\nimport CurrentTimeDisplay from './time-controls/current-time-display.js';\nimport DurationDisplay from './time-controls/duration-display.js';\nimport TimeDivider from './time-controls/time-divider.js';\nimport RemainingTimeDisplay from './time-controls/remaining-time-display.js';\nimport LiveDisplay from './live-display.js';\nimport ProgressControl from './progress-control/progress-control.js';\nimport FullscreenToggle from './fullscreen-toggle.js';\nimport VolumeControl from './volume-control/volume-control.js';\nimport VolumeMenuButton from './volume-menu-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport ChaptersButton from './text-track-controls/chapters-button.js';\nimport DescriptionsButton from './text-track-controls/descriptions-button.js';\nimport SubtitlesButton from './text-track-controls/subtitles-button.js';\nimport CaptionsButton from './text-track-controls/captions-button.js';\nimport PlaybackRateMenuButton from './playback-rate-menu/playback-rate-menu-button.js';\nimport CustomControlSpacer from './spacer-controls/custom-control-spacer.js';\n\n/**\n * Container of main controls\n *\n * @extends Component\n * @class ControlBar\n */\nclass ControlBar extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-control-bar',\n dir: 'ltr'\n }, {\n 'role': 'group' // The control bar is a group, so it can contain menuitems\n });\n }\n}\n\nControlBar.prototype.options_ = {\n loadEvent: 'play',\n children: [\n 'playToggle',\n 'volumeMenuButton',\n 'currentTimeDisplay',\n 'timeDivider',\n 'durationDisplay',\n 'progressControl',\n 'liveDisplay',\n 'remainingTimeDisplay',\n 'customControlSpacer',\n 'playbackRateMenuButton',\n 'chaptersButton',\n 'descriptionsButton',\n 'subtitlesButton',\n 'captionsButton',\n 'fullscreenToggle'\n ]\n};\n\nComponent.registerComponent('ControlBar', ControlBar);\nexport default ControlBar;\n", - "/**\n * @file fullscreen-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n * @class FullscreenToggle\n */\nclass FullscreenToggle extends Button {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-fullscreen-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles click for full screen\n *\n * @method handleClick\n */\n handleClick() {\n if (!this.player_.isFullscreen()) {\n this.player_.requestFullscreen();\n this.controlText('Non-Fullscreen');\n } else {\n this.player_.exitFullscreen();\n this.controlText('Fullscreen');\n }\n }\n\n}\n\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\n\nComponent.registerComponent('FullscreenToggle', FullscreenToggle);\nexport default FullscreenToggle;\n", - "/**\n * @file live-display.js\n */\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * Displays the live indicator\n * TODO - Future make it click to snap to live\n *\n * @extends Component\n * @class LiveDisplay\n */\nclass LiveDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.updateShowing();\n this.on(this.player(), 'durationchange', this.updateShowing);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n var el = super.createEl('div', {\n className: 'vjs-live-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-live-display',\n innerHTML: `${this.localize('Stream Type')}${this.localize('LIVE')}`\n }, {\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n updateShowing() {\n if (this.player().duration() === Infinity) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n}\n\nComponent.registerComponent('LiveDisplay', LiveDisplay);\nexport default LiveDisplay;\n", - "/**\n * @file mute-toggle.js\n */\nimport Button from '../button';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * A button component for muting the audio\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MuteToggle\n */\nclass MuteToggle extends Button {\n\n constructor(player, options) {\n super(player, options);\n\n this.on(player, 'volumechange', this.update);\n\n // hide mute toggle if the current tech doesn't support volume control\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n\n this.on(player, 'loadstart', function() {\n this.update(); // We need to update the button to account for a default muted state.\n\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-mute-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click on mute\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.muted( this.player_.muted() ? false : true );\n }\n\n /**\n * Update volume\n *\n * @method update\n */\n update() {\n var vol = this.player_.volume(),\n level = 3;\n\n if (vol === 0 || this.player_.muted()) {\n level = 0;\n } else if (vol < 0.33) {\n level = 1;\n } else if (vol < 0.67) {\n level = 2;\n }\n\n // Don't rewrite the button text if the actual text doesn't change.\n // This causes unnecessary and confusing information for screen reader users.\n // This check is needed because this function gets called every time the volume level is changed.\n let toMute = this.player_.muted() ? 'Unmute' : 'Mute';\n if (this.controlText() !== toMute) {\n this.controlText(toMute);\n }\n\n /* TODO improve muted icon classes */\n for (var i = 0; i < 4; i++) {\n Dom.removeElClass(this.el_, `vjs-vol-${i}`);\n }\n Dom.addElClass(this.el_, `vjs-vol-${level}`);\n }\n\n}\n\nMuteToggle.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('MuteToggle', MuteToggle);\nexport default MuteToggle;\n", - "/**\n * @file play-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Button to toggle between play and pause\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PlayToggle\n */\nclass PlayToggle extends Button {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'play', this.handlePlay);\n this.on(player, 'pause', this.handlePause);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-play-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click to toggle between play and pause\n *\n * @method handleClick\n */\n handleClick() {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n /**\n * Add the vjs-playing class to the element so it can change appearance\n *\n * @method handlePlay\n */\n handlePlay() {\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n this.controlText('Pause'); // change the button text to \"Pause\"\n }\n\n /**\n * Add the vjs-paused class to the element so it can change appearance\n *\n * @method handlePause\n */\n handlePause() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.controlText('Play'); // change the button text to \"Play\"\n }\n\n}\n\nPlayToggle.prototype.controlText_ = 'Play';\n\nComponent.registerComponent('PlayToggle', PlayToggle);\nexport default PlayToggle;\n", - "/**\n * @file playback-rate-menu-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Menu from '../../menu/menu.js';\nimport PlaybackRateMenuItem from './playback-rate-menu-item.js';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * The component for controlling the playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class PlaybackRateMenuButton\n */\nclass PlaybackRateMenuButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n this.updateVisibility();\n this.updateLabel();\n\n this.on(player, 'loadstart', this.updateVisibility);\n this.on(player, 'ratechange', this.updateLabel);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl();\n\n this.labelEl_ = Dom.createEl('div', {\n className: 'vjs-playback-rate-value',\n innerHTML: 1.0\n });\n\n el.appendChild(this.labelEl_);\n\n return el;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-playback-rate ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the playback rate menu\n *\n * @return {Menu} Menu object populated with items\n * @method createMenu\n */\n createMenu() {\n let menu = new Menu(this.player());\n let rates = this.playbackRates();\n\n if (rates) {\n for (let i = rates.length - 1; i >= 0; i--) {\n menu.addChild(\n new PlaybackRateMenuItem(this.player(), { 'rate': rates[i] + 'x'})\n );\n }\n }\n\n return menu;\n }\n\n /**\n * Updates ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current playback rate\n this.el().setAttribute('aria-valuenow', this.player().playbackRate());\n }\n\n /**\n * Handle menu item click\n *\n * @method handleClick\n */\n handleClick() {\n // select next rate option\n let currentRate = this.player().playbackRate();\n let rates = this.playbackRates();\n\n // this will select first one if the last one currently selected\n let newRate = rates[0];\n for (let i = 0; i < rates.length ; i++) {\n if (rates[i] > currentRate) {\n newRate = rates[i];\n break;\n }\n }\n this.player().playbackRate(newRate);\n }\n\n /**\n * Get possible playback rates\n *\n * @return {Array} Possible playback rates\n * @method playbackRates\n */\n playbackRates() {\n return this.options_['playbackRates'] || (this.options_.playerOptions && this.options_.playerOptions['playbackRates']);\n }\n\n /**\n * Get supported playback rates\n *\n * @return {Array} Supported playback rates\n * @method playbackRateSupported\n */\n playbackRateSupported() {\n return this.player().tech_\n && this.player().tech_['featuresPlaybackRate']\n && this.playbackRates()\n && this.playbackRates().length > 0\n ;\n }\n\n /**\n * Hide playback rate controls when they're no playback rate options to select\n *\n * @method updateVisibility\n */\n updateVisibility() {\n if (this.playbackRateSupported()) {\n this.removeClass('vjs-hidden');\n } else {\n this.addClass('vjs-hidden');\n }\n }\n\n /**\n * Update button label when rate changed\n *\n * @method updateLabel\n */\n updateLabel() {\n if (this.playbackRateSupported()) {\n this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\n }\n }\n\n}\n\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\n\nComponent.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\nexport default PlaybackRateMenuButton;\n", - "/**\n * @file playback-rate-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The specific menu item type for selecting a playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class PlaybackRateMenuItem\n */\nclass PlaybackRateMenuItem extends MenuItem {\n\n constructor(player, options){\n let label = options['rate'];\n let rate = parseFloat(label, 10);\n\n // Modify options for parent MenuItem class's init.\n options['label'] = label;\n options['selected'] = rate === 1;\n super(player, options);\n\n this.label = label;\n this.rate = rate;\n\n this.on(player, 'ratechange', this.update);\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player().playbackRate(this.rate);\n }\n\n /**\n * Update playback rate with selected rate\n *\n * @method update\n */\n update() {\n this.selected(this.player().playbackRate() === this.rate);\n }\n\n}\n\nPlaybackRateMenuItem.prototype.contentElType = 'button';\n\nComponent.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\nexport default PlaybackRateMenuItem;\n", - "/**\n * @file load-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * Shows load progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class LoadProgressBar\n */\nclass LoadProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'progress', this.update);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-load-progress',\n innerHTML: `${this.localize('Loaded')}: 0%`\n });\n }\n\n /**\n * Update progress bar\n *\n * @method update\n */\n update() {\n let buffered = this.player_.buffered();\n let duration = this.player_.duration();\n let bufferedEnd = this.player_.bufferedEnd();\n let children = this.el_.children;\n\n // get the percent width of a time compared to the total end\n let percentify = function (time, end){\n let percent = (time / end) || 0; // no NaN\n return ((percent >= 1 ? 1 : percent) * 100) + '%';\n };\n\n // update the width of the progress bar\n this.el_.style.width = percentify(bufferedEnd, duration);\n\n // add child elements to represent the individual buffered time ranges\n for (let i = 0; i < buffered.length; i++) {\n let start = buffered.start(i);\n let end = buffered.end(i);\n let part = children[i];\n\n if (!part) {\n part = this.el_.appendChild(Dom.createEl());\n }\n\n // set the percent based on the width of the progress bar (bufferedEnd)\n part.style.left = percentify(start, bufferedEnd);\n part.style.width = percentify(end - start, bufferedEnd);\n }\n\n // remove unused buffered range elements\n for (let i = children.length; i > buffered.length; i--) {\n this.el_.removeChild(children[i-1]);\n }\n }\n\n}\n\nComponent.registerComponent('LoadProgressBar', LoadProgressBar);\nexport default LoadProgressBar;\n", - "/**\n * @file mouse-time-display.js\n */\nimport window from 'global/window';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport throttle from 'lodash-compat/function/throttle';\n\n/**\n * The Mouse Time Display component shows the time you will seek to\n * when hovering over the progress bar\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class MouseTimeDisplay\n */\nclass MouseTimeDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.tooltip = Dom.createEl('div', {className: 'vjs-time-tooltip'});\n this.el().appendChild(this.tooltip);\n this.addClass('vjs-keep-tooltips-inside');\n }\n\n this.update(0, 0);\n\n player.on('ready', () => {\n this.on(player.controlBar.progressControl.el(), 'mousemove', throttle(Fn.bind(this, this.handleMouseMove), 25));\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-mouse-display'\n });\n }\n\n handleMouseMove(event) {\n let duration = this.player_.duration();\n let newTime = this.calculateDistance(event) * duration;\n let position = event.pageX - Dom.findElPosition(this.el().parentNode).left;\n\n this.update(newTime, position);\n }\n\n update(newTime, position) {\n let time = formatTime(newTime, this.player_.duration());\n\n this.el().style.left = position + 'px';\n this.el().setAttribute('data-current-time', time);\n\n if (this.keepTooltipsInside) {\n let clampedPosition = this.clampPosition_(position);\n let difference = position - clampedPosition + 1;\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltip).width);\n let tooltipWidthHalf = tooltipWidth / 2;\n\n this.tooltip.innerHTML = time;\n this.tooltip.style.right = `-${tooltipWidthHalf - difference}px`;\n }\n }\n\n calculateDistance(event) {\n return Dom.getPointerPosition(this.el().parentNode, event).x;\n }\n\n /**\n * This takes in a horizontal position for the bar and returns a clamped position.\n * Clamped position means that it will keep the position greater than half the width\n * of the tooltip and smaller than the player width minus half the width o the tooltip.\n * It will only clamp the position if `keepTooltipsInside` option is set.\n *\n * @param {Number} position the position the bar wants to be\n * @return {Number} newPosition the (potentially) clamped position\n * @method clampPosition_\n */\n clampPosition_(position) {\n if (!this.keepTooltipsInside) {\n return position;\n }\n\n let playerWidth = parseFloat(window.getComputedStyle(this.player().el()).width);\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltip).width);\n let tooltipWidthHalf = tooltipWidth / 2;\n let actualPosition = position;\n\n if (position < tooltipWidthHalf) {\n actualPosition = Math.ceil(tooltipWidthHalf);\n } else if (position > (playerWidth - tooltipWidthHalf)) {\n actualPosition = Math.floor(playerWidth - tooltipWidthHalf);\n }\n\n return actualPosition;\n }\n}\n\nComponent.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\nexport default MouseTimeDisplay;\n", - "/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass PlayProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.addClass('vjs-keep-tooltips-inside');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-play-progress vjs-slider-bar',\n innerHTML: `${this.localize('Progress')}: 0%`\n });\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.el_.setAttribute('data-current-time', formatTime(time, this.player_.duration()));\n }\n\n}\n\nComponent.registerComponent('PlayProgressBar', PlayProgressBar);\nexport default PlayProgressBar;\n", - "/**\n * @file progress-control.js\n */\nimport Component from '../../component.js';\nimport SeekBar from './seek-bar.js';\nimport MouseTimeDisplay from './mouse-time-display.js';\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class ProgressControl\n */\nclass ProgressControl extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-control vjs-control'\n });\n }\n}\n\nProgressControl.prototype.options_ = {\n children: [\n 'seekBar'\n ]\n};\n\nComponent.registerComponent('ProgressControl', ProgressControl);\nexport default ProgressControl;\n", - "/**\n * @file seek-bar.js\n */\nimport window from 'global/window';\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport LoadProgressBar from './load-progress-bar.js';\nimport PlayProgressBar from './play-progress-bar.js';\nimport TooltipProgressBar from './tooltip-progress-bar.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport assign from 'object.assign';\n\n/**\n * Seek Bar and holder for the progress bars\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class SeekBar\n */\nclass SeekBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'timeupdate', this.updateProgress);\n this.on(player, 'ended', this.updateProgress);\n player.ready(Fn.bind(this, this.updateProgress));\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.tooltipProgressBar = this.addChild('TooltipProgressBar');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-holder'\n }, {\n 'aria-label': 'progress bar'\n });\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateProgress() {\n this.updateAriaAttributes(this.el_);\n\n if (this.keepTooltipsInside) {\n this.updateAriaAttributes(this.tooltipProgressBar.el_);\n this.tooltipProgressBar.el_.style.width = this.bar.el_.style.width;\n\n let playerWidth = parseFloat(window.getComputedStyle(this.player().el()).width);\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltipProgressBar.tooltip).width);\n let tooltipStyle = this.tooltipProgressBar.el().style;\n tooltipStyle.maxWidth = Math.floor(playerWidth - (tooltipWidth / 2)) + 'px';\n tooltipStyle.minWidth = Math.ceil(tooltipWidth / 2) + 'px';\n tooltipStyle.right = `-${tooltipWidth / 2}px`;\n }\n }\n\n updateAriaAttributes(el) {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n el.setAttribute('aria-valuenow', (this.getPercent() * 100).toFixed(2)); // machine readable value of progress bar (percentage complete)\n el.setAttribute('aria-valuetext', formatTime(time, this.player_.duration())); // human readable value of progress bar (time complete)\n }\n\n /**\n * Get percentage of video played\n *\n * @return {Number} Percentage played\n * @method getPercent\n */\n getPercent() {\n let percent = this.player_.currentTime() / this.player_.duration();\n return percent >= 1 ? 1 : percent;\n }\n\n /**\n * Handle mouse down on seek bar\n *\n * @method handleMouseDown\n */\n handleMouseDown(event) {\n super.handleMouseDown(event);\n\n this.player_.scrubbing(true);\n\n this.videoWasPlaying = !this.player_.paused();\n this.player_.pause();\n }\n\n /**\n * Handle mouse move on seek bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n let newTime = this.calculateDistance(event) * this.player_.duration();\n\n // Don't let video end while scrubbing.\n if (newTime === this.player_.duration()) { newTime = newTime - 0.1; }\n\n // Set new time (tell player to seek to new time)\n this.player_.currentTime(newTime);\n }\n\n /**\n * Handle mouse up on seek bar\n *\n * @method handleMouseUp\n */\n handleMouseUp(event) {\n super.handleMouseUp(event);\n\n this.player_.scrubbing(false);\n if (this.videoWasPlaying) {\n this.player_.play();\n }\n }\n\n /**\n * Move more quickly fast forward for keyboard-only users\n *\n * @method stepForward\n */\n stepForward() {\n this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users\n }\n\n /**\n * Move more quickly rewind for keyboard-only users\n *\n * @method stepBack\n */\n stepBack() {\n this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users\n }\n\n}\n\nSeekBar.prototype.options_ = {\n children: [\n 'loadProgressBar',\n 'mouseTimeDisplay',\n 'playProgressBar'\n ],\n 'barName': 'playProgressBar'\n};\n\nSeekBar.prototype.playerEvent = 'timeupdate';\n\nComponent.registerComponent('SeekBar', SeekBar);\nexport default SeekBar;\n", - "/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass TooltipProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-tooltip-progress-bar vjs-slider-bar',\n innerHTML: `
    \n ${this.localize('Progress')}: 0%`\n });\n\n this.tooltip = el.querySelector('.vjs-time-tooltip');\n\n return el;\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let formattedTime = formatTime(time, this.player_.duration());\n this.el_.setAttribute('data-current-time', formattedTime);\n this.tooltip.innerHTML = formattedTime;\n }\n\n}\n\nComponent.registerComponent('TooltipProgressBar', TooltipProgressBar);\nexport default TooltipProgressBar;\n", - "/**\n * @file custom-control-spacer.js\n */\nimport Spacer from './spacer.js';\nimport Component from '../../component.js';\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n * @class CustomControlSpacer\n */\nclass CustomControlSpacer extends Spacer {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl({\n className: this.buildCSSClass(),\n });\n\n // No-flex/table-cell mode requires there be some content\n // in the cell to fill the remaining space of the table.\n el.innerHTML = ' ';\n return el;\n }\n}\n\nComponent.registerComponent('CustomControlSpacer', CustomControlSpacer);\nexport default CustomControlSpacer;\n", - "/**\n * @file spacer.js\n */\nimport Component from '../../component.js';\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n * @class Spacer\n */\nclass Spacer extends Component {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n}\n\nComponent.registerComponent('Spacer', Spacer);\n\nexport default Spacer;\n", - "/**\n * @file caption-settings-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The menu item for caption track settings menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class CaptionSettingsMenuItem\n */\n class CaptionSettingsMenuItem extends TextTrackMenuItem {\n\n constructor(player, options) {\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' settings',\n 'selectable': false,\n 'default': false,\n mode: 'disabled'\n };\n\n // CaptionSettingsMenuItem has no concept of 'selected'\n options['selectable'] = false;\n\n super(player, options);\n this.addClass('vjs-texttrack-settings');\n this.controlText(', opens ' + options['kind'] + ' settings dialog');\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n this.player().getChild('textTrackSettings').show();\n this.player().getChild('textTrackSettings').el_.focus();\n }\n\n}\n\nComponent.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\nexport default CaptionSettingsMenuItem;\n", - "/**\n * @file captions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport CaptionSettingsMenuItem from './caption-settings-menu-item.js';\n\n/**\n * The button component for toggling and selecting captions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class CaptionsButton\n */\nclass CaptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Captions Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-captions-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Update caption menu items\n *\n * @method update\n */\n update() {\n let threshold = 2;\n super.update();\n\n // if native, then threshold is 1 because no settings button\n if (this.player().tech_ && this.player().tech_['featuresNativeTextTracks']) {\n threshold = 1;\n }\n\n if (this.items && this.items.length > threshold) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Create caption menu items\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n if (!(this.player().tech_ && this.player().tech_['featuresNativeTextTracks'])) {\n items.push(new CaptionSettingsMenuItem(this.player_, { 'kind': this.kind_ }));\n }\n\n return super.createItems(items);\n }\n\n}\n\nCaptionsButton.prototype.kind_ = 'captions';\nCaptionsButton.prototype.controlText_ = 'Captions';\n\nComponent.registerComponent('CaptionsButton', CaptionsButton);\nexport default CaptionsButton;\n", - "/**\n * @file chapters-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport ChaptersTrackMenuItem from './chapters-track-menu-item.js';\nimport Menu from '../../menu/menu.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport toTitleCase from '../../utils/to-title-case.js';\nimport window from 'global/window';\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class ChaptersButton\n */\nclass ChaptersButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Chapters Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-chapters-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Create a menu item for each text track\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n /**\n * Create menu from chapter buttons\n *\n * @return {Menu} Menu of chapter buttons\n * @method createMenu\n */\n createMenu() {\n let tracks = this.player_.textTracks() || [];\n let chaptersTrack;\n let items = this.items = [];\n\n for (let i = 0, length = tracks.length; i < length; i++) {\n let track = tracks[i];\n\n if (track['kind'] === this.kind_) {\n chaptersTrack = track;\n\n break;\n }\n }\n\n let menu = this.menu;\n if (menu === undefined) {\n menu = new Menu(this.player_);\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.kind_),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n if (chaptersTrack && chaptersTrack.cues == null) {\n chaptersTrack['mode'] = 'hidden';\n\n let remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(chaptersTrack);\n\n if (remoteTextTrackEl) {\n remoteTextTrackEl.addEventListener('load', (event) => this.update());\n }\n }\n\n if (chaptersTrack && chaptersTrack.cues && chaptersTrack.cues.length > 0) {\n let cues = chaptersTrack['cues'], cue;\n\n for (let i = 0, l = cues.length; i < l; i++) {\n cue = cues[i];\n\n let mi = new ChaptersTrackMenuItem(this.player_, {\n 'track': chaptersTrack,\n 'cue': cue\n });\n\n items.push(mi);\n\n menu.addChild(mi);\n }\n\n this.addChild(menu);\n }\n\n if (this.items.length > 0) {\n this.show();\n }\n\n return menu;\n }\n\n}\n\nChaptersButton.prototype.kind_ = 'chapters';\nChaptersButton.prototype.controlText_ = 'Chapters';\n\nComponent.registerComponent('ChaptersButton', ChaptersButton);\nexport default ChaptersButton;\n", - "/**\n * @file chapters-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The chapter track menu item\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class ChaptersTrackMenuItem\n */\nclass ChaptersTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let cue = options['cue'];\n let currentTime = player.currentTime();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = cue.text;\n options['selected'] = (cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n super(player, options);\n\n this.track = track;\n this.cue = cue;\n track.addEventListener('cuechange', Fn.bind(this, this.update));\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player_.currentTime(this.cue.startTime);\n this.update(this.cue.startTime);\n }\n\n /**\n * Update chapter menu item\n *\n * @method update\n */\n update() {\n let cue = this.cue;\n let currentTime = this.player_.currentTime();\n\n // vjs.log(currentTime, cue.startTime);\n this.selected(cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n }\n\n}\n\nComponent.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\nexport default ChaptersTrackMenuItem;\n", - "/**\n * @file descriptions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The button component for toggling and selecting descriptions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class DescriptionsButton\n */\nclass DescriptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label', 'Descriptions Menu');\n\n let tracks = player.textTracks();\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let disabled = false;\n\n // Check whether a track of a different kind is showing\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] !== this.kind_ && track['mode'] === 'showing') {\n disabled = true;\n break;\n }\n }\n\n // If another track is showing, disable this menu button\n if (disabled) {\n this.disable();\n } else {\n this.enable();\n }\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-descriptions-button ${super.buildCSSClass()}`;\n }\n\n}\n\nDescriptionsButton.prototype.kind_ = 'descriptions';\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\n\nComponent.registerComponent('DescriptionsButton', DescriptionsButton);\nexport default DescriptionsButton;\n", - "/**\n * @file off-text-track-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * A special menu item for turning of a specific type of text track\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class OffTextTrackMenuItem\n */\nclass OffTextTrackMenuItem extends TextTrackMenuItem {\n\n constructor(player, options){\n // Create pseudo track info\n // Requires options['kind']\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' off',\n 'default': false,\n 'mode': 'disabled'\n };\n\n // MenuItem is selectable\n options['selectable'] = true;\n\n super(player, options);\n this.selected(true);\n }\n\n /**\n * Handle text track change\n *\n * @param {Object} event Event object\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let selected = true;\n\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] === this.track['kind'] && track['mode'] === 'showing') {\n selected = false;\n break;\n }\n }\n\n this.selected(selected);\n }\n\n}\n\nComponent.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\nexport default OffTextTrackMenuItem;\n", - "/**\n * @file subtitles-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class SubtitlesButton\n */\nclass SubtitlesButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Subtitles Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-subtitles-button ${super.buildCSSClass()}`;\n }\n\n}\n\nSubtitlesButton.prototype.kind_ = 'subtitles';\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\n\nComponent.registerComponent('SubtitlesButton', SubtitlesButton);\nexport default SubtitlesButton;\n", - "/**\n * @file text-track-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport OffTextTrackMenuItem from './off-text-track-menu-item.js';\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class TextTrackButton\n */\nclass TextTrackButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n let tracks = this.player_.textTracks();\n\n if (this.items.length <= 1) {\n this.hide();\n }\n\n if (!tracks) {\n return;\n }\n\n let updateHandler = Fn.bind(this, this.update);\n tracks.addEventListener('removetrack', updateHandler);\n tracks.addEventListener('addtrack', updateHandler);\n\n this.player_.on('dispose', function() {\n tracks.removeEventListener('removetrack', updateHandler);\n tracks.removeEventListener('addtrack', updateHandler);\n });\n }\n\n // Create a menu item for each text track\n createItems(items=[]) {\n // Add an OFF menu item to turn all tracks off\n items.push(new OffTextTrackMenuItem(this.player_, { 'kind': this.kind_ }));\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // only add tracks that are of the appropriate kind and have a label\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n // MenuItem is selectable\n 'selectable': true,\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n}\n\nComponent.registerComponent('TextTrackButton', TextTrackButton);\nexport default TextTrackButton;\n", - "/**\n * @file text-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class TextTrackMenuItem\n */\nclass TextTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let tracks = player.textTracks();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = track['label'] || track['language'] || 'Unknown';\n options['selected'] = track['default'] || track['mode'] === 'showing';\n\n super(player, options);\n\n this.track = track;\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n\n // iOS7 doesn't dispatch change events to TextTrackLists when an\n // associated track's mode changes. Without something like\n // Object.observe() (also not present on iOS7), it's not\n // possible to detect changes to the mode attribute and polyfill\n // the change event. As a poor substitute, we manually dispatch\n // change events whenever the controls modify the mode.\n if (tracks && tracks.onchange === undefined) {\n let event;\n\n this.on(['tap', 'click'], function() {\n if (typeof window.Event !== 'object') {\n // Android 2.3 throws an Illegal Constructor error for window.Event\n try {\n event = new window.Event('change');\n } catch(err){}\n }\n\n if (!event) {\n event = document.createEvent('Event');\n event.initEvent('change', true, true);\n }\n\n tracks.dispatchEvent(event);\n });\n }\n }\n\n /**\n * Handle click on text track\n *\n * @method handleClick\n */\n handleClick(event) {\n let kind = this.track['kind'];\n let tracks = this.player_.textTracks();\n\n super.handleClick(event);\n\n if (!tracks) return;\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n if (track['kind'] !== kind) {\n continue;\n }\n\n if (track === this.track) {\n track['mode'] = 'showing';\n } else {\n track['mode'] = 'disabled';\n }\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n this.selected(this.track['mode'] === 'showing');\n }\n\n}\n\nComponent.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\nexport default TextTrackMenuItem;\n", - "/**\n * @file current-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the current time\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class CurrentTimeDisplay\n */\nclass CurrentTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-current-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-current-time-display',\n // label the current time for screen reader users\n innerHTML: 'Current Time ' + '0:00',\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update current time display\n *\n * @method updateContent\n */\n updateContent() {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let localizedText = this.localize('Current Time');\n let formattedTime = formatTime(time, this.player_.duration());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `${localizedText} ${formattedTime}`;\n }\n }\n\n}\n\nComponent.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\nexport default CurrentTimeDisplay;\n", - "/**\n * @file duration-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the duration\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class DurationDisplay\n */\nclass DurationDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // this might need to be changed to 'durationchange' instead of 'timeupdate' eventually,\n // however the durationchange event fires before this.player_.duration() is set,\n // so the value cannot be written out using this method.\n // Once the order of durationchange and this.player_.duration() being set is figured out,\n // this can be updated.\n this.on(player, 'timeupdate', this.updateContent);\n this.on(player, 'loadedmetadata', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-duration vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-duration-display',\n // label the duration time for screen reader users\n innerHTML: `${this.localize('Duration Time')} 0:00`\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update duration time display\n *\n * @method updateContent\n */\n updateContent() {\n let duration = this.player_.duration();\n if (duration && this.duration_ !== duration) {\n this.duration_ = duration;\n let localizedText = this.localize('Duration Time');\n let formattedTime = formatTime(duration);\n this.contentEl_.innerHTML = `${localizedText} ${formattedTime}`; // label the duration time for screen reader users\n }\n }\n\n}\n\nComponent.registerComponent('DurationDisplay', DurationDisplay);\nexport default DurationDisplay;\n", - "/**\n * @file remaining-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the time left in the video\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class RemainingTimeDisplay\n */\nclass RemainingTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-remaining-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-remaining-time-display',\n // label the remaining time for screen reader users\n innerHTML: `${this.localize('Remaining Time')} -0:00`,\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update remaining time display\n *\n * @method updateContent\n */\n updateContent() {\n if (this.player_.duration()) {\n const localizedText = this.localize('Remaining Time');\n const formattedTime = formatTime(this.player_.remainingTime());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `${localizedText} -${formattedTime}`;\n }\n }\n\n // Allows for smooth scrubbing, when player can't keep up.\n // var time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n // this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration());\n }\n\n}\n\nComponent.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\nexport default RemainingTimeDisplay;\n", - "/**\n * @file time-divider.js\n */\nimport Component from '../../component.js';\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class TimeDivider\n */\nclass TimeDivider extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-time-control vjs-time-divider',\n innerHTML: '
    /
    '\n });\n }\n\n}\n\nComponent.registerComponent('TimeDivider', TimeDivider);\nexport default TimeDivider;\n", - "/**\n * @file volume-bar.js\n */\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n// Required children\nimport VolumeLevel from './volume-level.js';\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class VolumeBar\n */\nclass VolumeBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'volumechange', this.updateARIAAttributes);\n player.ready(Fn.bind(this, this.updateARIAAttributes));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-bar vjs-slider-bar'\n }, {\n 'aria-label': 'volume level'\n });\n }\n\n /**\n * Handle mouse move on volume bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n this.checkMuted();\n this.player_.volume(this.calculateDistance(event));\n }\n\n checkMuted() {\n if (this.player_.muted()) {\n this.player_.muted(false);\n }\n }\n\n /**\n * Get percent of volume level\n *\n * @retun {Number} Volume level percent\n * @method getPercent\n */\n getPercent() {\n if (this.player_.muted()) {\n return 0;\n } else {\n return this.player_.volume();\n }\n }\n\n /**\n * Increase volume level for keyboard users\n *\n * @method stepForward\n */\n stepForward() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() + 0.1);\n }\n\n /**\n * Decrease volume level for keyboard users\n *\n * @method stepBack\n */\n stepBack() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() - 0.1);\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current value of volume bar as a percentage\n let volume = (this.player_.volume() * 100).toFixed(2);\n this.el_.setAttribute('aria-valuenow', volume);\n this.el_.setAttribute('aria-valuetext', volume + '%');\n }\n\n}\n\nVolumeBar.prototype.options_ = {\n children: [\n 'volumeLevel'\n ],\n 'barName': 'volumeLevel'\n};\n\nVolumeBar.prototype.playerEvent = 'volumechange';\n\nComponent.registerComponent('VolumeBar', VolumeBar);\nexport default VolumeBar;\n", - "/**\n * @file volume-control.js\n */\nimport Component from '../../component.js';\n\n// Required children\nimport VolumeBar from './volume-bar.js';\n\n/**\n * The component for controlling the volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeControl\n */\nclass VolumeControl extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // hide volume controls when they're not supported by the current tech\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n this.on(player, 'loadstart', function(){\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-control vjs-control'\n });\n }\n\n}\n\nVolumeControl.prototype.options_ = {\n children: [\n 'volumeBar'\n ]\n};\n\nComponent.registerComponent('VolumeControl', VolumeControl);\nexport default VolumeControl;\n", - "/**\n * @file volume-level.js\n */\nimport Component from '../../component.js';\n\n/**\n * Shows volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeLevel\n */\nclass VolumeLevel extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-level',\n innerHTML: ''\n });\n }\n\n}\n\nComponent.registerComponent('VolumeLevel', VolumeLevel);\nexport default VolumeLevel;\n", - "/**\n * @file volume-menu-button.js\n */\nimport * as Fn from '../utils/fn.js';\nimport Component from '../component.js';\nimport Popup from '../popup/popup.js';\nimport PopupButton from '../popup/popup-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport VolumeBar from './volume-control/volume-bar.js';\n\n/**\n * Button for volume popup\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends PopupButton\n * @class VolumeMenuButton\n */\nclass VolumeMenuButton extends PopupButton {\n\n constructor(player, options={}){\n // Default to inline\n if (options.inline === undefined) {\n options.inline = true;\n }\n\n // If the vertical option isn't passed at all, default to true.\n if (options.vertical === undefined) {\n // If an inline volumeMenuButton is used, we should default to using\n // a horizontal slider for obvious reasons.\n if (options.inline) {\n options.vertical = false;\n } else {\n options.vertical = true;\n }\n }\n\n // The vertical option needs to be set on the volumeBar as well,\n // since that will need to be passed along to the VolumeBar constructor\n options.volumeBar = options.volumeBar || {};\n options.volumeBar.vertical = !!options.vertical;\n\n super(player, options);\n\n // Same listeners as MuteToggle\n this.on(player, 'volumechange', this.volumeUpdate);\n this.on(player, 'loadstart', this.volumeUpdate);\n\n // hide mute toggle if the current tech doesn't support volume control\n function updateVisibility() {\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n }\n\n updateVisibility.call(this);\n this.on(player, 'loadstart', updateVisibility);\n\n this.on(this.volumeBar, ['slideractive', 'focus'], function(){\n this.addClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['sliderinactive', 'blur'], function(){\n this.removeClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['focus'], function(){\n this.addClass('vjs-lock-showing');\n });\n\n this.on(this.volumeBar, ['blur'], function(){\n this.removeClass('vjs-lock-showing');\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n let orientationClass = '';\n if (!!this.options_.vertical) {\n orientationClass = 'vjs-volume-menu-button-vertical';\n } else {\n orientationClass = 'vjs-volume-menu-button-horizontal';\n }\n\n return `vjs-volume-menu-button ${super.buildCSSClass()} ${orientationClass}`;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {Popup} The volume popup button\n * @method createPopup\n */\n createPopup() {\n let popup = new Popup(this.player_, {\n contentElType: 'div'\n });\n\n let vb = new VolumeBar(this.player_, this.options_.volumeBar);\n\n popup.addChild(vb);\n\n this.menuContent = popup;\n this.volumeBar = vb;\n\n this.attachVolumeBarEvents();\n\n return popup;\n }\n\n /**\n * Handle click on volume popup and calls super\n *\n * @method handleClick\n */\n handleClick() {\n MuteToggle.prototype.handleClick.call(this);\n super.handleClick();\n }\n\n attachVolumeBarEvents() {\n this.menuContent.on(['mousedown', 'touchdown'], Fn.bind(this, this.handleMouseDown));\n }\n\n handleMouseDown(event) {\n this.on(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n this.on(this.el_.ownerDocument, ['mouseup', 'touchend'], this.handleMouseUp);\n }\n\n handleMouseUp(event) {\n this.off(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n }\n}\n\nVolumeMenuButton.prototype.volumeUpdate = MuteToggle.prototype.update;\nVolumeMenuButton.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('VolumeMenuButton', VolumeMenuButton);\nexport default VolumeMenuButton;\n", - "/**\n * @file error-display.js\n */\nimport Component from './component';\nimport ModalDialog from './modal-dialog';\n\nimport * as Dom from './utils/dom';\nimport mergeOptions from './utils/merge-options';\n\n/**\n * Display that an error has occurred making the video unplayable.\n *\n * @extends ModalDialog\n * @class ErrorDisplay\n */\nclass ErrorDisplay extends ModalDialog {\n\n /**\n * Constructor for error display modal.\n *\n * @param {Player} player\n * @param {Object} [options]\n */\n constructor(player, options) {\n super(player, options);\n this.on(player, 'error', this.open);\n }\n\n /**\n * Include the old class for backward-compatibility.\n *\n * This can be removed in 6.0.\n *\n * @method buildCSSClass\n * @deprecated\n * @return {String}\n */\n buildCSSClass() {\n return `vjs-error-display ${super.buildCSSClass()}`;\n }\n\n /**\n * Generates the modal content based on the player error.\n *\n * @return {String|Null}\n */\n content() {\n let error = this.player().error();\n return error ? this.localize(error.message) : '';\n }\n}\n\nErrorDisplay.prototype.options_ = mergeOptions(ModalDialog.prototype.options_, {\n fillAlways: true,\n temporary: false,\n uncloseable: true\n});\n\nComponent.registerComponent('ErrorDisplay', ErrorDisplay);\nexport default ErrorDisplay;\n", - "/**\n * @file event-target.js\n */\nimport * as Events from './utils/events.js';\n\nvar EventTarget = function() {};\n\nEventTarget.prototype.allowedEvents_ = {};\n\nEventTarget.prototype.on = function(type, fn) {\n // Remove the addEventListener alias before calling Events.on\n // so we don't get into an infinite type loop\n let ael = this.addEventListener;\n this.addEventListener = Function.prototype;\n Events.on(this, type, fn);\n this.addEventListener = ael;\n};\nEventTarget.prototype.addEventListener = EventTarget.prototype.on;\n\nEventTarget.prototype.off = function(type, fn) {\n Events.off(this, type, fn);\n};\nEventTarget.prototype.removeEventListener = EventTarget.prototype.off;\n\nEventTarget.prototype.one = function(type, fn) {\n Events.one(this, type, fn);\n};\n\nEventTarget.prototype.trigger = function(event) {\n let type = event.type || event;\n\n if (typeof event === 'string') {\n event = {\n type: type\n };\n }\n event = Events.fixEvent(event);\n\n if (this.allowedEvents_[type] && this['on' + type]) {\n this['on' + type](event);\n }\n\n Events.trigger(this, event);\n};\n// The standard DOM EventTarget.dispatchEvent() is aliased to trigger()\nEventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;\n\nexport default EventTarget;\n", - "import log from './utils/log';\n\n/*\n * @file extend.js\n *\n * A combination of node inherits and babel's inherits (after transpile).\n * Both work the same but node adds `super_` to the subClass\n * and Bable adds the superClass as __proto__. Both seem useful.\n */\nconst _inherits = function (subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) {\n // node\n subClass.super_ = superClass;\n }\n};\n\n/*\n * Function for subclassing using the same inheritance that\n * videojs uses internally\n * ```js\n * var Button = videojs.getComponent('Button');\n * ```\n * ```js\n * var MyButton = videojs.extend(Button, {\n * constructor: function(player, options) {\n * Button.call(this, player, options);\n * },\n * onClick: function() {\n * // doSomething\n * }\n * });\n * ```\n */\nconst extendFn = function(superClass, subClassMethods={}) {\n let subClass = function() {\n superClass.apply(this, arguments);\n };\n let methods = {};\n\n if (typeof subClassMethods === 'object') {\n if (typeof subClassMethods.init === 'function') {\n log.warn('Constructor logic via init() is deprecated; please use constructor() instead.');\n subClassMethods.constructor = subClassMethods.init;\n }\n if (subClassMethods.constructor !== Object.prototype.constructor) {\n subClass = subClassMethods.constructor;\n }\n methods = subClassMethods;\n } else if (typeof subClassMethods === 'function') {\n subClass = subClassMethods;\n }\n\n _inherits(subClass, superClass);\n\n // Extend subObj's prototype with functions and other properties from props\n for (var name in methods) {\n if (methods.hasOwnProperty(name)) {\n subClass.prototype[name] = methods[name];\n }\n }\n\n return subClass;\n};\n\nexport default extendFn;\n", - "/**\n * @file fullscreen-api.js\n */\nimport document from 'global/document';\n\n/*\n * Store the browser-specific methods for the fullscreen API\n * @type {Object|undefined}\n * @private\n */\nlet FullscreenApi = {};\n\n// browser API methods\n// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js\nconst apiMap = [\n // Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html\n [\n 'requestFullscreen',\n 'exitFullscreen',\n 'fullscreenElement',\n 'fullscreenEnabled',\n 'fullscreenchange',\n 'fullscreenerror'\n ],\n // WebKit\n [\n 'webkitRequestFullscreen',\n 'webkitExitFullscreen',\n 'webkitFullscreenElement',\n 'webkitFullscreenEnabled',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Old WebKit (Safari 5.1)\n [\n 'webkitRequestFullScreen',\n 'webkitCancelFullScreen',\n 'webkitCurrentFullScreenElement',\n 'webkitCancelFullScreen',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Mozilla\n [\n 'mozRequestFullScreen',\n 'mozCancelFullScreen',\n 'mozFullScreenElement',\n 'mozFullScreenEnabled',\n 'mozfullscreenchange',\n 'mozfullscreenerror'\n ],\n // Microsoft\n [\n 'msRequestFullscreen',\n 'msExitFullscreen',\n 'msFullscreenElement',\n 'msFullscreenEnabled',\n 'MSFullscreenChange',\n 'MSFullscreenError'\n ]\n];\n\nlet specApi = apiMap[0];\nlet browserApi;\n\n// determine the supported set of functions\nfor (let i = 0; i < apiMap.length; i++) {\n // check for exitFullscreen function\n if (apiMap[i][1] in document) {\n browserApi = apiMap[i];\n break;\n }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n for (let i=0; i 1) {\n this.show();\n }\n }\n\n /**\n * Create menu\n *\n * @return {Menu} The constructed menu\n * @method createMenu\n */\n createMenu() {\n var menu = new Menu(this.player_);\n\n // Add a title list item to the top\n if (this.options_.title) {\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.options_.title),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n this.items = this['createItems']();\n\n if (this.items) {\n // Add menu items to the menu\n for (var i = 0; i < this.items.length; i++) {\n menu.addItem(this.items[i]);\n }\n }\n\n return menu;\n }\n\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n * @method createItems\n */\n createItems(){}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n /**\n * When you click the button it adds focus, which\n * will show the menu indefinitely.\n * So we'll remove focus when the mouse leaves the button.\n * Focus is needed for tab navigation.\n * Allow sub components to stack CSS class names\n *\n * @method handleClick\n */\n handleClick() {\n this.one('mouseout', Fn.bind(this, function(){\n this.menu.unlockShowing();\n this.el_.blur();\n }));\n if (this.buttonPressed_){\n this.unpressButton();\n } else {\n this.pressButton();\n }\n }\n\n /**\n * Handle key press on menu\n *\n * @param {Object} event Key press event\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9) {\n if (this.buttonPressed_) {\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n // Up (38) key or Down (40) key press the 'button'\n } else if (event.which === 38 || event.which === 40) {\n if (!this.buttonPressed_) {\n this.pressButton();\n event.preventDefault();\n }\n } else {\n super.handleKeyPress(event);\n }\n }\n\n /**\n * Handle key press on submenu\n *\n * @param {Object} event Key press event\n * @method handleSubmenuKeyPress\n */\n handleSubmenuKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9){\n if (this.buttonPressed_){\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n }\n }\n\n /**\n * Makes changes based on button pressed\n *\n * @method pressButton\n */\n pressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = true;\n this.menu.lockShowing();\n this.el_.setAttribute('aria-expanded', 'true');\n this.menu.focus(); // set the focus into the submenu\n }\n }\n\n /**\n * Makes changes based on button unpressed\n *\n * @method unpressButton\n */\n unpressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', 'false');\n this.el_.focus(); // Set focus back to this menu button\n }\n }\n\n /**\n * Disable the menu button\n *\n * @return {Component}\n * @method disable\n */\n disable() {\n // Unpress, but don't force focus on this button\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', 'false');\n\n this.enabled_ = false;\n\n return super.disable();\n }\n\n /**\n * Enable the menu button\n *\n * @return {Component}\n * @method disable\n */\n enable() {\n this.enabled_ = true;\n\n return super.enable();\n }\n}\n\nComponent.registerComponent('MenuButton', MenuButton);\nexport default MenuButton;\n", - "/**\n * @file menu-item.js\n */\nimport ClickableComponent from '../clickable-component.js';\nimport Component from '../component.js';\nimport assign from 'object.assign';\n\n/**\n * The component for a menu item. `
  • `\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MenuItem\n */\nclass MenuItem extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n\n this.selectable = options['selectable'];\n\n this.selected(options['selected']);\n\n if (this.selectable) {\n // TODO: May need to be either menuitemcheckbox or menuitemradio,\n // and may need logical grouping of menu items.\n this.el_.setAttribute('role', 'menuitemcheckbox');\n } else {\n this.el_.setAttribute('role', 'menuitem');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Desc\n * @param {Object=} props Desc\n * @return {Element}\n * @method createEl\n */\n createEl(type, props, attrs) {\n return super.createEl('li', assign({\n className: 'vjs-menu-item',\n innerHTML: this.localize(this.options_['label']),\n tabIndex: -1\n }, props), attrs);\n }\n\n /**\n * Handle a click on the menu item, and set it to selected\n *\n * @method handleClick\n */\n handleClick() {\n this.selected(true);\n }\n\n /**\n * Set this menu item as selected or not\n *\n * @param {Boolean} selected\n * @method selected\n */\n selected(selected) {\n if (this.selectable) {\n if (selected) {\n this.addClass('vjs-selected');\n this.el_.setAttribute('aria-checked','true');\n // aria-checked isn't fully supported by browsers/screen readers,\n // so indicate selected state to screen reader in the control text.\n this.controlText(', selected');\n } else {\n this.removeClass('vjs-selected');\n this.el_.setAttribute('aria-checked','false');\n // Indicate un-selected state to screen reader\n // Note that a space clears out the selected state text\n this.controlText(' ');\n }\n }\n }\n}\n\nComponent.registerComponent('MenuItem', MenuItem);\nexport default MenuItem;\n", - "/**\n * @file menu.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Menu component is used to build pop up menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n * @class Menu\n */\nclass Menu extends Component {\n\n constructor (player, options) {\n super(player, options);\n\n this.focusedChild_ = -1;\n\n this.on('keydown', this.handleKeyPress);\n }\n\n /**\n * Add a menu item to the menu\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n //TODO: Need to set keyboard focus back to the menuButton\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n this.contentEl_.setAttribute('role', 'menu');\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.setAttribute('role', 'presentation');\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Menu Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n\n /**\n * Handle key press for menu\n *\n * @param {Object} event Event object\n * @method handleKeyPress\n */\n handleKeyPress (event) {\n if (event.which === 37 || event.which === 40) { // Left and Down Arrows\n event.preventDefault();\n this.stepForward();\n } else if (event.which === 38 || event.which === 39) { // Up and Right Arrows\n event.preventDefault();\n this.stepBack();\n }\n }\n\n /**\n * Move to next (lower) menu item for keyboard users\n *\n * @method stepForward\n */\n stepForward () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ + 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Move to previous (higher) menu item for keyboard users\n *\n * @method stepBack\n */\n stepBack () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ - 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Set focus on a menu item in the menu\n *\n * @param {Object|String} item Index of child item set focus on\n * @method focus\n */\n focus (item = 0) {\n let children = this.children().slice();\n let haveTitle = children.length && children[0].className &&\n /vjs-menu-title/.test(children[0].className);\n\n if (haveTitle) {\n children.shift();\n }\n\n if (children.length > 0) {\n if (item < 0) {\n item = 0;\n } else if (item >= children.length) {\n item = children.length - 1;\n }\n\n this.focusedChild_ = item;\n\n children[item].el_.focus();\n }\n }\n}\n\nComponent.registerComponent('Menu', Menu);\nexport default Menu;\n", - "/**\n * @file modal-dialog.js\n */\nimport * as Dom from './utils/dom';\nimport * as Fn from './utils/fn';\nimport log from './utils/log';\n\nimport Component from './component';\nimport CloseButton from './close-button';\n\nconst MODAL_CLASS_NAME = 'vjs-modal-dialog';\nconst ESC = 27;\n\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n * @class ModalDialog\n */\nclass ModalDialog extends Component {\n\n /**\n * Constructor for modals.\n *\n * @param {Player} player\n * @param {Object} [options]\n * @param {Mixed} [options.content=undefined]\n * Provide customized content for this modal.\n *\n * @param {String} [options.description]\n * A text description for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.fillAlways=false]\n * Normally, modals are automatically filled only the first time\n * they open. This tells the modal to refresh its content\n * every time it opens.\n *\n * @param {String} [options.label]\n * A text label for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.temporary=true]\n * If `true`, the modal can only be opened once; it will be\n * disposed as soon as it's closed.\n *\n * @param {Boolean} [options.uncloseable=false]\n * If `true`, the user will not be able to close the modal\n * through the UI in the normal ways. Programmatic closing is\n * still possible.\n *\n */\n constructor(player, options) {\n super(player, options);\n this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n\n this.closeable(!this.options_.uncloseable);\n this.content(this.options_.content);\n\n // Make sure the contentEl is defined AFTER any children are initialized\n // because we only want the contents of the modal in the contentEl\n // (not the UI elements like the close button).\n this.contentEl_ = Dom.createEl('div', {\n className: `${MODAL_CLASS_NAME}-content`\n }, {\n role: 'document'\n });\n\n this.descEl_ = Dom.createEl('p', {\n className: `${MODAL_CLASS_NAME}-description vjs-offscreen`,\n id: this.el().getAttribute('aria-describedby')\n });\n\n Dom.textContent(this.descEl_, this.description());\n this.el_.appendChild(this.descEl_);\n this.el_.appendChild(this.contentEl_);\n }\n\n /**\n * Create the modal's DOM element\n *\n * @method createEl\n * @return {Element}\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass(),\n tabIndex: -1\n }, {\n 'aria-describedby': `${this.id()}_description`,\n 'aria-hidden': 'true',\n 'aria-label': this.label(),\n role: 'dialog'\n });\n }\n\n /**\n * Build the modal's CSS class.\n *\n * @method buildCSSClass\n * @return {String}\n */\n buildCSSClass() {\n return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles key presses on the document, looking for ESC, which closes\n * the modal.\n *\n * @method handleKeyPress\n * @param {Event} e\n */\n handleKeyPress(e) {\n if (e.which === ESC && this.closeable()) {\n this.close();\n }\n }\n\n /**\n * Returns the label string for this modal. Primarily used for accessibility.\n *\n * @return {String}\n */\n label() {\n return this.options_.label || this.localize('Modal Window');\n }\n\n /**\n * Returns the description string for this modal. Primarily used for\n * accessibility.\n *\n * @return {String}\n */\n description() {\n let desc = this.options_.description || this.localize('This is a modal window.');\n\n // Append a universal closeability message if the modal is closeable.\n if (this.closeable()) {\n desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n }\n\n return desc;\n }\n\n /**\n * Opens the modal.\n *\n * @method open\n * @return {ModalDialog}\n */\n open() {\n if (!this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalopen');\n this.opened_ = true;\n\n // Fill content if the modal has never opened before and\n // never been filled.\n if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n this.fill();\n }\n\n // If the player was playing, pause it and take note of its previously\n // playing state.\n this.wasPlaying_ = !player.paused();\n\n if (this.wasPlaying_) {\n player.pause();\n }\n\n if (this.closeable()) {\n this.on(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(false);\n this.show();\n this.el().setAttribute('aria-hidden', 'false');\n this.trigger('modalopen');\n this.hasBeenOpened_ = true;\n }\n return this;\n }\n\n /**\n * Whether or not the modal is opened currently.\n *\n * @method opened\n * @param {Boolean} [value]\n * If given, it will open (`true`) or close (`false`) the modal.\n *\n * @return {Boolean}\n */\n opened(value) {\n if (typeof value === 'boolean') {\n this[value ? 'open' : 'close']();\n }\n return this.opened_;\n }\n\n /**\n * Closes the modal.\n *\n * @method close\n * @return {ModalDialog}\n */\n close() {\n if (this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalclose');\n this.opened_ = false;\n\n if (this.wasPlaying_) {\n player.play();\n }\n\n if (this.closeable()) {\n this.off(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(true);\n this.hide();\n this.el().setAttribute('aria-hidden', 'true');\n this.trigger('modalclose');\n\n if (this.options_.temporary) {\n this.dispose();\n }\n }\n return this;\n }\n\n /**\n * Whether or not the modal is closeable via the UI.\n *\n * @method closeable\n * @param {Boolean} [value]\n * If given as a Boolean, it will set the `closeable` option.\n *\n * @return {Boolean}\n */\n closeable(value) {\n if (typeof value === 'boolean') {\n let closeable = this.closeable_ = !!value;\n let close = this.getChild('closeButton');\n\n // If this is being made closeable and has no close button, add one.\n if (closeable && !close) {\n\n // The close button should be a child of the modal - not its\n // content element, so temporarily change the content element.\n let temp = this.contentEl_;\n this.contentEl_ = this.el_;\n close = this.addChild('closeButton');\n this.contentEl_ = temp;\n this.on(close, 'close', this.close);\n }\n\n // If this is being made uncloseable and has a close button, remove it.\n if (!closeable && close) {\n this.off(close, 'close', this.close);\n this.removeChild(close);\n close.dispose();\n }\n }\n return this.closeable_;\n }\n\n /**\n * Fill the modal's content element with the modal's \"content\" option.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fill\n * @return {ModalDialog}\n */\n fill() {\n return this.fillWith(this.content());\n }\n\n /**\n * Fill the modal's content element with arbitrary content.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fillWith\n * @param {Mixed} [content]\n * The same rules apply to this as apply to the `content` option.\n *\n * @return {ModalDialog}\n */\n fillWith(content) {\n let contentEl = this.contentEl();\n let parentEl = contentEl.parentNode;\n let nextSiblingEl = contentEl.nextSibling;\n\n this.trigger('beforemodalfill');\n this.hasBeenFilled_ = true;\n\n // Detach the content element from the DOM before performing\n // manipulation to avoid modifying the live DOM multiple times.\n parentEl.removeChild(contentEl);\n this.empty();\n Dom.insertContent(contentEl, content);\n this.trigger('modalfill');\n\n // Re-inject the re-filled content element.\n if (nextSiblingEl) {\n parentEl.insertBefore(contentEl, nextSiblingEl);\n } else {\n parentEl.appendChild(contentEl);\n }\n\n return this;\n }\n\n /**\n * Empties the content element.\n *\n * This happens automatically anytime the modal is filled.\n *\n * @method empty\n * @return {ModalDialog}\n */\n empty() {\n this.trigger('beforemodalempty');\n Dom.emptyEl(this.contentEl());\n this.trigger('modalempty');\n return this;\n }\n\n /**\n * Gets or sets the modal content, which gets normalized before being\n * rendered into the DOM.\n *\n * This does not update the DOM or fill the modal, but it is called during\n * that process.\n *\n * @method content\n * @param {Mixed} [value]\n * If defined, sets the internal content value to be used on the\n * next call(s) to `fill`. This value is normalized before being\n * inserted. To \"clear\" the internal content value, pass `null`.\n *\n * @return {Mixed}\n */\n content(value) {\n if (typeof value !== 'undefined') {\n this.content_ = value;\n }\n return this.content_;\n }\n}\n\n/*\n * Modal dialog default options.\n *\n * @type {Object}\n * @private\n */\nModalDialog.prototype.options_ = {\n temporary: true\n};\n\nComponent.registerComponent('ModalDialog', ModalDialog);\nexport default ModalDialog;\n", - "/**\n * @file player.js\n */\n // Subclasses Component\nimport Component from './component.js';\n\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Events from './utils/events.js';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as browser from './utils/browser.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport { createTimeRange } from './utils/time-ranges.js';\nimport { bufferedPercent } from './utils/buffer.js';\nimport * as stylesheet from './utils/stylesheet.js';\nimport FullscreenApi from './fullscreen-api.js';\nimport MediaError from './media-error.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\nimport textTrackConverter from './tracks/text-track-list-converter.js';\n\n// Include required child components (importing also registers them)\nimport MediaLoader from './tech/loader.js';\nimport PosterImage from './poster-image.js';\nimport TextTrackDisplay from './tracks/text-track-display.js';\nimport LoadingSpinner from './loading-spinner.js';\nimport BigPlayButton from './big-play-button.js';\nimport ControlBar from './control-bar/control-bar.js';\nimport ErrorDisplay from './error-display.js';\nimport TextTrackSettings from './tracks/text-track-settings.js';\nimport ModalDialog from './modal-dialog';\n\n// Require html5 tech, at least for disposing the original video tag\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\n\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video.\n * ```js\n * var myPlayer = videojs('example_video_1');\n * ```\n * In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.\n * ```html\n * \n * ```\n * After an instance has been created it can be accessed globally using `Video('example_video_1')`.\n *\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class Player\n */\nclass Player extends Component {\n\n /**\n * player's constructor function\n *\n * @constructs\n * @method init\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Player options\n * @param {Function=} ready Ready callback function\n */\n constructor(tag, options, ready){\n // Make sure tag ID exists\n tag.id = tag.id || `vjs_video_${Guid.newGUID()}`;\n\n // Set Options\n // The options argument overrides options set in the video tag\n // which overrides globally set options.\n // This latter part coincides with the load order\n // (tag must exist before Player)\n options = assign(Player.getTagSettings(tag), options);\n\n // Delay the initialization of children because we need to set up\n // player properties first, and can't use `this` before `super()`\n options.initChildren = false;\n\n // Same with creating the element\n options.createEl = false;\n\n // we don't want the player to report touch activity on itself\n // see enableTouchActivity in Component\n options.reportTouchActivity = false;\n\n // Run base component initializing with new options\n super(null, options, ready);\n\n // if the global option object was accidentally blown away by\n // someone, bail early with an informative error\n if (!this.options_ ||\n !this.options_.techOrder ||\n !this.options_.techOrder.length) {\n throw new Error('No techOrder specified. Did you overwrite ' +\n 'videojs.options instead of just changing the ' +\n 'properties you want to override?');\n }\n\n this.tag = tag; // Store the original tag used to set options\n\n // Store the tag attributes used to restore html5 element\n this.tagAttributes = tag && Dom.getElAttributes(tag);\n\n // Update current language\n this.language(this.options_.language);\n\n // Update Supported Languages\n if (options.languages) {\n // Normalise player option languages to lowercase\n let languagesToLower = {};\n\n Object.getOwnPropertyNames(options.languages).forEach(function(name) {\n languagesToLower[name.toLowerCase()] = options.languages[name];\n });\n this.languages_ = languagesToLower;\n } else {\n this.languages_ = Player.prototype.options_.languages;\n }\n\n // Cache for video property values.\n this.cache_ = {};\n\n // Set poster\n this.poster_ = options.poster || '';\n\n // Set controls\n this.controls_ = !!options.controls;\n\n // Original tag settings stored in options\n // now remove immediately so native controls don't flash.\n // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n tag.controls = false;\n\n /*\n * Store the internal state of scrubbing\n *\n * @private\n * @return {Boolean} True if the user is scrubbing\n */\n this.scrubbing_ = false;\n\n this.el_ = this.createEl();\n\n // We also want to pass the original player options to each component and plugin\n // as well so they don't need to reach back into the player for options later.\n // We also need to do another copy of this.options_ so we don't end up with\n // an infinite loop.\n let playerOptionsCopy = mergeOptions(this.options_);\n\n // Load plugins\n if (options.plugins) {\n let plugins = options.plugins;\n\n Object.getOwnPropertyNames(plugins).forEach(function(name){\n if (typeof this[name] === 'function') {\n this[name](plugins[name]);\n } else {\n log.error('Unable to find plugin:', name);\n }\n }, this);\n }\n\n this.options_.playerOptions = playerOptionsCopy;\n\n this.initChildren();\n\n // Set isAudio based on whether or not an audio tag was used\n this.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n // Update controls className. Can't do this when the controls are initially\n // set because the element doesn't exist yet.\n if (this.controls()) {\n this.addClass('vjs-controls-enabled');\n } else {\n this.addClass('vjs-controls-disabled');\n }\n\n // Set ARIA label and region role depending on player type\n this.el_.setAttribute('role', 'region');\n if (this.isAudio()) {\n this.el_.setAttribute('aria-label', 'audio player');\n } else {\n this.el_.setAttribute('aria-label', 'video player');\n }\n\n if (this.isAudio()) {\n this.addClass('vjs-audio');\n }\n\n if (this.flexNotSupported_()) {\n this.addClass('vjs-no-flex');\n }\n\n // TODO: Make this smarter. Toggle user state between touching/mousing\n // using events, since devices can have both touch and mouse events.\n // if (browser.TOUCH_ENABLED) {\n // this.addClass('vjs-touch-enabled');\n // }\n\n // iOS Safari has broken hover handling\n if (!browser.IS_IOS) {\n this.addClass('vjs-workinghover');\n }\n\n // Make player easily findable by ID\n Player.players[this.id_] = this;\n\n // When the player is first initialized, trigger activity so components\n // like the control bar show themselves if needed\n this.userActive(true);\n this.reportUserActivity();\n this.listenForUserActivity_();\n\n this.on('fullscreenchange', this.handleFullscreenChange_);\n this.on('stageclick', this.handleStageClick_);\n }\n\n /**\n * Destroys the video player and does any necessary cleanup\n * ```js\n * myPlayer.dispose();\n * ```\n * This is especially helpful if you are dynamically adding and removing videos\n * to/from the DOM.\n *\n * @method dispose\n */\n dispose() {\n this.trigger('dispose');\n // prevent dispose from being called twice\n this.off('dispose');\n\n if (this.styleEl_ && this.styleEl_.parentNode) {\n this.styleEl_.parentNode.removeChild(this.styleEl_);\n }\n\n // Kill reference to this player\n Player.players[this.id_] = null;\n if (this.tag && this.tag.player) { this.tag.player = null; }\n if (this.el_ && this.el_.player) { this.el_.player = null; }\n\n if (this.tech_) { this.tech_.dispose(); }\n\n super.dispose();\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = this.el_ = super.createEl('div');\n let tag = this.tag;\n\n // Remove width/height attrs from tag so CSS can make it 100% width/height\n tag.removeAttribute('width');\n tag.removeAttribute('height');\n\n // Copy over all the attributes from the tag, including ID and class\n // ID will now reference player box, not the video tag\n const attrs = Dom.getElAttributes(tag);\n\n Object.getOwnPropertyNames(attrs).forEach(function(attr){\n // workaround so we don't totally break IE7\n // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7\n if (attr === 'class') {\n el.className = attrs[attr];\n } else {\n el.setAttribute(attr, attrs[attr]);\n }\n });\n\n // Update tag id/class for use as HTML5 playback tech\n // Might think we should do this after embedding in container so .vjs-tech class\n // doesn't flash 100% width/height, but class only applies with .video-js parent\n tag.playerId = tag.id;\n tag.id += '_html5_api';\n tag.className = 'vjs-tech';\n\n // Make player findable on elements\n tag.player = el.player = this;\n // Default state of video is paused\n this.addClass('vjs-paused');\n\n // Add a style element in the player that we'll use to set the width/height\n // of the player in a way that's still overrideable by CSS, just like the\n // video element\n if (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n this.styleEl_ = stylesheet.createStyleElement('vjs-styles-dimensions');\n let defaultsStyleEl = Dom.$('.vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n }\n\n // Pass in the width/height/aspectRatio options which will update the style el\n this.width(this.options_.width);\n this.height(this.options_.height);\n this.fluid(this.options_.fluid);\n this.aspectRatio(this.options_.aspectRatio);\n\n // Hide any links within the video/audio tag, because IE doesn't hide them completely.\n let links = tag.getElementsByTagName('a');\n for (let i = 0; i < links.length; i++) {\n let linkEl = links.item(i);\n Dom.addElClass(linkEl, 'vjs-hidden');\n linkEl.setAttribute('hidden', 'hidden');\n }\n\n // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n // keep track of the original for later so we can know if the source originally failed\n tag.initNetworkState_ = tag.networkState;\n\n // Wrap video tag in div (el/box) container\n if (tag.parentNode) {\n tag.parentNode.insertBefore(el, tag);\n }\n\n // insert the tag as the first child of the player element\n // then manually add it to the children array so that this.addChild\n // will work properly for other components\n Dom.insertElFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup.\n this.children_.unshift(tag);\n\n this.el_ = el;\n\n return el;\n }\n\n /**\n * Get/set player width\n *\n * @param {Number=} value Value for width\n * @return {Number} Width when getting\n * @method width\n */\n width(value) {\n return this.dimension('width', value);\n }\n\n /**\n * Get/set player height\n *\n * @param {Number=} value Value for height\n * @return {Number} Height when getting\n * @method height\n */\n height(value) {\n return this.dimension('height', value);\n }\n\n /**\n * Get/set dimension for player\n *\n * @param {String} dimension Either width or height\n * @param {Number=} value Value for dimension\n * @return {Component}\n * @method dimension\n */\n dimension(dimension, value) {\n let privDimension = dimension + '_';\n\n if (value === undefined) {\n return this[privDimension] || 0;\n }\n\n if (value === '') {\n // If an empty string is given, reset the dimension to be automatic\n this[privDimension] = undefined;\n } else {\n let parsedVal = parseFloat(value);\n\n if (isNaN(parsedVal)) {\n log.error(`Improper value \"${value}\" supplied for for ${dimension}`);\n return this;\n }\n\n this[privDimension] = parsedVal;\n }\n\n this.updateStyleEl_();\n return this;\n }\n\n /**\n * Add/remove the vjs-fluid class\n *\n * @param {Boolean} bool Value of true adds the class, value of false removes the class\n * @method fluid\n */\n fluid(bool) {\n if (bool === undefined) {\n return !!this.fluid_;\n }\n\n this.fluid_ = !!bool;\n\n if (bool) {\n this.addClass('vjs-fluid');\n } else {\n this.removeClass('vjs-fluid');\n }\n }\n\n /**\n * Get/Set the aspect ratio\n *\n * @param {String=} ratio Aspect ratio for player\n * @return aspectRatio\n * @method aspectRatio\n */\n aspectRatio(ratio) {\n if (ratio === undefined) {\n return this.aspectRatio_;\n }\n\n // Check for width:height format\n if (!/^\\d+\\:\\d+$/.test(ratio)) {\n throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n }\n this.aspectRatio_ = ratio;\n\n // We're assuming if you set an aspect ratio you want fluid mode,\n // because in fixed mode you could calculate width and height yourself.\n this.fluid(true);\n\n this.updateStyleEl_();\n }\n\n /**\n * Update styles of the player element (height, width and aspect ratio)\n *\n * @method updateStyleEl_\n */\n updateStyleEl_() {\n if (window.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n const width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n const height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n let techEl = this.tech_ && this.tech_.el();\n\n if (techEl) {\n if (width >= 0) {\n techEl.width = width;\n }\n if (height >= 0) {\n techEl.height = height;\n }\n }\n\n return;\n }\n\n let width;\n let height;\n let aspectRatio;\n let idClass;\n\n // The aspect ratio is either used directly or to calculate width and height.\n if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n // Use any aspectRatio that's been specifically set\n aspectRatio = this.aspectRatio_;\n } else if (this.videoWidth()) {\n // Otherwise try to get the aspect ratio from the video metadata\n aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n } else {\n // Or use a default. The video element's is 2:1, but 16:9 is more common.\n aspectRatio = '16:9';\n }\n\n // Get the ratio as a decimal we can use to calculate dimensions\n let ratioParts = aspectRatio.split(':');\n let ratioMultiplier = ratioParts[1] / ratioParts[0];\n\n if (this.width_ !== undefined) {\n // Use any width that's been specifically set\n width = this.width_;\n } else if (this.height_ !== undefined) {\n // Or calulate the width from the aspect ratio if a height has been set\n width = this.height_ / ratioMultiplier;\n } else {\n // Or use the video's metadata, or use the video el's default of 300\n width = this.videoWidth() || 300;\n }\n\n if (this.height_ !== undefined) {\n // Use any height that's been specifically set\n height = this.height_;\n } else {\n // Otherwise calculate the height from the ratio and the width\n height = width * ratioMultiplier;\n }\n\n // Ensure the CSS class is valid by starting with an alpha character\n if (/^[^a-zA-Z]/.test(this.id())) {\n idClass = 'dimensions-'+this.id();\n } else {\n idClass = this.id()+'-dimensions';\n }\n\n // Ensure the right class is still on the player for the style element\n this.addClass(idClass);\n\n stylesheet.setTextContent(this.styleEl_, `\n .${idClass} {\n width: ${width}px;\n height: ${height}px;\n }\n\n .${idClass}.vjs-fluid {\n padding-top: ${ratioMultiplier * 100}%;\n }\n `);\n }\n\n /**\n * Load the Media Playback Technology (tech)\n * Load/Create an instance of playback technology including element and API methods\n * And append playback element in player div.\n *\n * @param {String} techName Name of the playback technology\n * @param {String} source Video source\n * @method loadTech_\n * @private\n */\n loadTech_(techName, source) {\n\n // Pause and remove current playback technology\n if (this.tech_) {\n this.unloadTech_();\n }\n\n // get rid of the HTML5 video tag as soon as we are using another tech\n if (techName !== 'Html5' && this.tag) {\n Tech.getTech('Html5').disposeMediaElement(this.tag);\n this.tag.player = null;\n this.tag = null;\n }\n\n this.techName_ = techName;\n\n // Turn off API access because we're loading a new tech that might load asynchronously\n this.isReady_ = false;\n\n // Grab tech-specific options from player options and add source and parent element to use.\n var techOptions = assign({\n 'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n 'source': source,\n 'playerId': this.id(),\n 'techId': `${this.id()}_${techName}_api`,\n 'textTracks': this.textTracks_,\n 'autoplay': this.options_.autoplay,\n 'preload': this.options_.preload,\n 'loop': this.options_.loop,\n 'muted': this.options_.muted,\n 'poster': this.poster(),\n 'language': this.language(),\n 'vtt.js': this.options_['vtt.js']\n }, this.options_[techName.toLowerCase()]);\n\n if (this.tag) {\n techOptions.tag = this.tag;\n }\n\n if (source) {\n this.currentType_ = source.type;\n if (source.src === this.cache_.src && this.cache_.currentTime > 0) {\n techOptions.startTime = this.cache_.currentTime;\n }\n\n this.cache_.src = source.src;\n }\n\n // Initialize tech instance\n let techComponent = Tech.getTech(techName);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!techComponent) {\n techComponent = Component.getComponent(techName);\n }\n this.tech_ = new techComponent(techOptions);\n\n // player.triggerReady is always async, so don't need this to be async\n this.tech_.ready(Fn.bind(this, this.handleTechReady_), true);\n\n textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_);\n\n // Listen to all HTML5-defined events and trigger them on the player\n this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);\n this.on(this.tech_, 'waiting', this.handleTechWaiting_);\n this.on(this.tech_, 'canplay', this.handleTechCanPlay_);\n this.on(this.tech_, 'canplaythrough', this.handleTechCanPlayThrough_);\n this.on(this.tech_, 'playing', this.handleTechPlaying_);\n this.on(this.tech_, 'ended', this.handleTechEnded_);\n this.on(this.tech_, 'seeking', this.handleTechSeeking_);\n this.on(this.tech_, 'seeked', this.handleTechSeeked_);\n this.on(this.tech_, 'play', this.handleTechPlay_);\n this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);\n this.on(this.tech_, 'pause', this.handleTechPause_);\n this.on(this.tech_, 'progress', this.handleTechProgress_);\n this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);\n this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);\n this.on(this.tech_, 'error', this.handleTechError_);\n this.on(this.tech_, 'suspend', this.handleTechSuspend_);\n this.on(this.tech_, 'abort', this.handleTechAbort_);\n this.on(this.tech_, 'emptied', this.handleTechEmptied_);\n this.on(this.tech_, 'stalled', this.handleTechStalled_);\n this.on(this.tech_, 'loadedmetadata', this.handleTechLoadedMetaData_);\n this.on(this.tech_, 'loadeddata', this.handleTechLoadedData_);\n this.on(this.tech_, 'timeupdate', this.handleTechTimeUpdate_);\n this.on(this.tech_, 'ratechange', this.handleTechRateChange_);\n this.on(this.tech_, 'volumechange', this.handleTechVolumeChange_);\n this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_);\n this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);\n this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);\n\n this.usingNativeControls(this.techGet_('controls'));\n\n if (this.controls() && !this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n\n // Add the tech element in the DOM if it was not already there\n // Make sure to not insert the original video element if using Html5\n if (this.tech_.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) {\n Dom.insertElFirst(this.tech_.el(), this.el());\n }\n\n // Get rid of the original video tag reference after the first tech is loaded\n if (this.tag) {\n this.tag.player = null;\n this.tag = null;\n }\n }\n\n /**\n * Unload playback technology\n *\n * @method unloadTech_\n * @private\n */\n unloadTech_() {\n // Save the current text tracks so that we can reuse the same text tracks with the next tech\n this.textTracks_ = this.textTracks();\n this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n\n this.isReady_ = false;\n\n this.tech_.dispose();\n\n this.tech_ = false;\n }\n\n /**\n * Return a reference to the current tech.\n * It will only return a reference to the tech if given an object with the\n * `IWillNotUseThisInPlugins` property on it. This is try and prevent misuse\n * of techs by plugins.\n *\n * @param {Object}\n * @return {Object} The Tech\n * @method tech\n */\n tech(safety) {\n if (safety && safety.IWillNotUseThisInPlugins) {\n return this.tech_;\n }\n let errorText = `\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n \\`IWillNotUseThisInPlugins\\` to the \\`tech\\` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n `;\n window.alert(errorText);\n throw new Error(errorText);\n }\n\n /**\n * Set up click and touch listeners for the playback element\n *\n * On desktops, a click on the video itself will toggle playback,\n * on a mobile device a click on the video toggles controls.\n * (toggling controls is done by toggling the user state between active and\n * inactive)\n * A tap can signal that a user has become active, or has become inactive\n * e.g. a quick tap on an iPhone movie should reveal the controls. Another\n * quick tap should hide them again (signaling the user is in an inactive\n * viewing state)\n * In addition to this, we still want the user to be considered inactive after\n * a few seconds of inactivity.\n * Note: the only part of iOS interaction we can't mimic with this setup\n * is a touch and hold on the video element counting as activity in order to\n * keep the controls showing, but that shouldn't be an issue. A touch and hold\n * on any controls will still keep the user active\n *\n * @private\n * @method addTechControlsListeners_\n */\n addTechControlsListeners_() {\n // Make sure to remove all the previous listeners in case we are called multiple times.\n this.removeTechControlsListeners_();\n\n // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\n // trigger mousedown/up.\n // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\n // Any touch events are set to block the mousedown event from happening\n this.on(this.tech_, 'mousedown', this.handleTechClick_);\n\n // If the controls were hidden we don't want that to change without a tap event\n // so we'll check if the controls were already showing before reporting user\n // activity\n this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.on(this.tech_, 'touchend', this.handleTechTouchEnd_);\n\n // The tap listener needs to come after the touchend listener because the tap\n // listener cancels out any reportedUserActivity when setting userActive(false)\n this.on(this.tech_, 'tap', this.handleTechTap_);\n }\n\n /**\n * Remove the listeners used for click and tap controls. This is needed for\n * toggling to controls disabled, where a tap/touch should do nothing.\n *\n * @method removeTechControlsListeners_\n * @private\n */\n removeTechControlsListeners_() {\n // We don't want to just use `this.off()` because there might be other needed\n // listeners added by techs that extend this.\n this.off(this.tech_, 'tap', this.handleTechTap_);\n this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);\n this.off(this.tech_, 'mousedown', this.handleTechClick_);\n }\n\n /**\n * Player waits for the tech to be ready\n *\n * @method handleTechReady_\n * @private\n */\n handleTechReady_() {\n this.triggerReady();\n\n // Keep the same volume as before\n if (this.cache_.volume) {\n this.techCall_('setVolume', this.cache_.volume);\n }\n\n // Look if the tech found a higher resolution poster while loading\n this.handleTechPosterChange_();\n\n // Update the duration if available\n this.handleTechDurationChange_();\n\n // Chrome and Safari both have issues with autoplay.\n // In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.\n // In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)\n // This fixes both issues. Need to wait for API, so it updates displays correctly\n if (this.src() && this.tag && this.options_.autoplay && this.paused()) {\n delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16.\n this.play();\n }\n }\n\n /**\n * Fired when the user agent begins looking for media data\n *\n * @private\n * @method handleTechLoadStart_\n */\n handleTechLoadStart_() {\n // TODO: Update to use `emptied` event instead. See #1277.\n\n this.removeClass('vjs-ended');\n\n // reset the error state\n this.error(null);\n\n // If it's already playing we want to trigger a firstplay event now.\n // The firstplay event relies on both the play and loadstart events\n // which can happen in any order for a new source\n if (!this.paused()) {\n this.trigger('loadstart');\n this.trigger('firstplay');\n } else {\n // reset the hasStarted state\n this.hasStarted(false);\n this.trigger('loadstart');\n }\n }\n\n /**\n * Add/remove the vjs-has-started class\n *\n * @param {Boolean} hasStarted The value of true adds the class the value of false remove the class\n * @return {Boolean} Boolean value if has started\n * @private\n * @method hasStarted\n */\n hasStarted(hasStarted) {\n if (hasStarted !== undefined) {\n // only update if this is a new value\n if (this.hasStarted_ !== hasStarted) {\n this.hasStarted_ = hasStarted;\n if (hasStarted) {\n this.addClass('vjs-has-started');\n // trigger the firstplay event if this newly has played\n this.trigger('firstplay');\n } else {\n this.removeClass('vjs-has-started');\n }\n }\n return this;\n }\n return !!this.hasStarted_;\n }\n\n /**\n * Fired whenever the media begins or resumes playback\n *\n * @private\n * @method handleTechPlay_\n */\n handleTechPlay_() {\n this.removeClass('vjs-ended');\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n\n // hide the poster when the user hits play\n // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play\n this.hasStarted(true);\n\n this.trigger('play');\n }\n\n /**\n * Fired whenever the media begins waiting\n *\n * @private\n * @method handleTechWaiting_\n */\n handleTechWaiting_() {\n this.addClass('vjs-waiting');\n this.trigger('waiting');\n this.one('timeupdate', () => this.removeClass('vjs-waiting'));\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlay_\n */\n handleTechCanPlay_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplay');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlayThrough_\n */\n handleTechCanPlayThrough_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplaythrough');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechPlaying_\n */\n handleTechPlaying_() {\n this.removeClass('vjs-waiting');\n this.trigger('playing');\n }\n\n /**\n * Fired whenever the player is jumping to a new time\n *\n * @private\n * @method handleTechSeeking_\n */\n handleTechSeeking_() {\n this.addClass('vjs-seeking');\n this.trigger('seeking');\n }\n\n /**\n * Fired when the player has finished jumping to a new time\n *\n * @private\n * @method handleTechSeeked_\n */\n handleTechSeeked_() {\n this.removeClass('vjs-seeking');\n this.trigger('seeked');\n }\n\n /**\n * Fired the first time a video is played\n * Not part of the HLS spec, and we're not sure if this is the best\n * implementation yet, so use sparingly. If you don't have a reason to\n * prevent playback, use `myPlayer.one('play');` instead.\n *\n * @private\n * @method handleTechFirstPlay_\n */\n handleTechFirstPlay_() {\n //If the first starttime attribute is specified\n //then we will start at the given offset in seconds\n if(this.options_.starttime){\n this.currentTime(this.options_.starttime);\n }\n\n this.addClass('vjs-has-started');\n this.trigger('firstplay');\n }\n\n /**\n * Fired whenever the media has been paused\n *\n * @private\n * @method handleTechPause_\n */\n handleTechPause_() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.trigger('pause');\n }\n\n /**\n * Fired while the user agent is downloading media data\n *\n * @private\n * @method handleTechProgress_\n */\n handleTechProgress_() {\n this.trigger('progress');\n }\n\n /**\n * Fired when the end of the media resource is reached (currentTime == duration)\n *\n * @private\n * @method handleTechEnded_\n */\n handleTechEnded_() {\n this.addClass('vjs-ended');\n if (this.options_.loop) {\n this.currentTime(0);\n this.play();\n } else if (!this.paused()) {\n this.pause();\n }\n\n this.trigger('ended');\n }\n\n /**\n * Fired when the duration of the media resource is first known or changed\n *\n * @private\n * @method handleTechDurationChange_\n */\n handleTechDurationChange_() {\n this.duration(this.techGet_('duration'));\n }\n\n /**\n * Handle a click on the media element to play/pause\n *\n * @param {Object=} event Event object\n * @private\n * @method handleTechClick_\n */\n handleTechClick_(event) {\n // We're using mousedown to detect clicks thanks to Flash, but mousedown\n // will also be triggered with right-clicks, so we need to prevent that\n if (event.button !== 0) return;\n\n // When controls are disabled a click should not toggle playback because\n // the click is considered a control\n if (this.controls()) {\n if (this.paused()) {\n this.play();\n } else {\n this.pause();\n }\n }\n }\n\n /**\n * Handle a tap on the media element. It will toggle the user\n * activity state, which hides and shows the controls.\n *\n * @private\n * @method handleTechTap_\n */\n handleTechTap_() {\n this.userActive(!this.userActive());\n }\n\n /**\n * Handle touch to start\n *\n * @private\n * @method handleTechTouchStart_\n */\n handleTechTouchStart_() {\n this.userWasActive = this.userActive();\n }\n\n /**\n * Handle touch to move\n *\n * @private\n * @method handleTechTouchMove_\n */\n handleTechTouchMove_() {\n if (this.userWasActive){\n this.reportUserActivity();\n }\n }\n\n /**\n * Handle touch to end\n *\n * @private\n * @method handleTechTouchEnd_\n */\n handleTechTouchEnd_(event) {\n // Stop the mouse events from also happening\n event.preventDefault();\n }\n\n /**\n * Fired when the player switches in or out of fullscreen mode\n *\n * @private\n * @method handleFullscreenChange_\n */\n handleFullscreenChange_() {\n if (this.isFullscreen()) {\n this.addClass('vjs-fullscreen');\n } else {\n this.removeClass('vjs-fullscreen');\n }\n }\n\n /**\n * native click events on the SWF aren't triggered on IE11, Win8.1RT\n * use stageclick events triggered from inside the SWF instead\n *\n * @private\n * @method handleStageClick_\n */\n handleStageClick_() {\n this.reportUserActivity();\n }\n\n /**\n * Handle Tech Fullscreen Change\n *\n * @private\n * @method handleTechFullscreenChange_\n */\n handleTechFullscreenChange_(event, data) {\n if (data) {\n this.isFullscreen(data.isFullscreen);\n }\n this.trigger('fullscreenchange');\n }\n\n /**\n * Fires when an error occurred during the loading of an audio/video\n *\n * @private\n * @method handleTechError_\n */\n handleTechError_() {\n let error = this.tech_.error();\n this.error(error && error.code);\n }\n\n /**\n * Fires when the browser is intentionally not getting media data\n *\n * @private\n * @method handleTechSuspend_\n */\n handleTechSuspend_() {\n this.trigger('suspend');\n }\n\n /**\n * Fires when the loading of an audio/video is aborted\n *\n * @private\n * @method handleTechAbort_\n */\n handleTechAbort_() {\n this.trigger('abort');\n }\n\n /**\n * Fires when the current playlist is empty\n *\n * @private\n * @method handleTechEmptied_\n */\n handleTechEmptied_() {\n this.trigger('emptied');\n }\n\n /**\n * Fires when the browser is trying to get media data, but data is not available\n *\n * @private\n * @method handleTechStalled_\n */\n handleTechStalled_() {\n this.trigger('stalled');\n }\n\n /**\n * Fires when the browser has loaded meta data for the audio/video\n *\n * @private\n * @method handleTechLoadedMetaData_\n */\n handleTechLoadedMetaData_() {\n this.trigger('loadedmetadata');\n }\n\n /**\n * Fires when the browser has loaded the current frame of the audio/video\n *\n * @private\n * @method handleTechLoadedData_\n */\n handleTechLoadedData_() {\n this.trigger('loadeddata');\n }\n\n /**\n * Fires when the current playback position has changed\n *\n * @private\n * @method handleTechTimeUpdate_\n */\n handleTechTimeUpdate_() {\n this.trigger('timeupdate');\n }\n\n /**\n * Fires when the playing speed of the audio/video is changed\n *\n * @private\n * @method handleTechRateChange_\n */\n handleTechRateChange_() {\n this.trigger('ratechange');\n }\n\n /**\n * Fires when the volume has been changed\n *\n * @private\n * @method handleTechVolumeChange_\n */\n handleTechVolumeChange_() {\n this.trigger('volumechange');\n }\n\n /**\n * Fires when the text track has been changed\n *\n * @private\n * @method handleTechTextTrackChange_\n */\n handleTechTextTrackChange_() {\n this.trigger('texttrackchange');\n }\n\n /**\n * Get object for cached values.\n *\n * @return {Object}\n * @method getCache\n */\n getCache() {\n return this.cache_;\n }\n\n /**\n * Pass values to the playback tech\n *\n * @param {String=} method Method\n * @param {Object=} arg Argument\n * @private\n * @method techCall_\n */\n techCall_(method, arg) {\n // If it's not ready yet, call method when it is\n if (this.tech_ && !this.tech_.isReady_) {\n this.tech_.ready(function(){\n this[method](arg);\n }, true);\n\n // Otherwise call method now\n } else {\n try {\n this.tech_[method](arg);\n } catch(e) {\n log(e);\n throw e;\n }\n }\n }\n\n /**\n * Get calls can't wait for the tech, and sometimes don't need to.\n *\n * @param {String} method Tech method\n * @return {Method}\n * @private\n * @method techGet_\n */\n techGet_(method) {\n if (this.tech_ && this.tech_.isReady_) {\n\n // Flash likes to die and reload when you hide or reposition it.\n // In these cases the object methods go away and we get errors.\n // When that happens we'll catch the errors and inform tech that it's not ready any more.\n try {\n return this.tech_[method]();\n } catch(e) {\n // When building additional tech libs, an expected method may not be defined yet\n if (this.tech_[method] === undefined) {\n log(`Video.js: ${method} method not defined for ${this.techName_} playback technology.`, e);\n } else {\n // When a method isn't available on the object it throws a TypeError\n if (e.name === 'TypeError') {\n log(`Video.js: ${method} unavailable on ${this.techName_} playback technology element.`, e);\n this.tech_.isReady_ = false;\n } else {\n log(e);\n }\n }\n throw e;\n }\n }\n\n return;\n }\n\n /**\n * start media playback\n * ```js\n * myPlayer.play();\n * ```\n *\n * @return {Player} self\n * @method play\n */\n play() {\n this.techCall_('play');\n return this;\n }\n\n /**\n * Pause the video playback\n * ```js\n * myPlayer.pause();\n * ```\n *\n * @return {Player} self\n * @method pause\n */\n pause() {\n this.techCall_('pause');\n return this;\n }\n\n /**\n * Check if the player is paused\n * ```js\n * var isPaused = myPlayer.paused();\n * var isPlaying = !myPlayer.paused();\n * ```\n *\n * @return {Boolean} false if the media is currently playing, or true otherwise\n * @method paused\n */\n paused() {\n // The initial state of paused should be true (in Safari it's actually false)\n return (this.techGet_('paused') === false) ? false : true;\n }\n\n /**\n * Returns whether or not the user is \"scrubbing\". Scrubbing is when the user\n * has clicked the progress bar handle and is dragging it along the progress bar.\n *\n * @param {Boolean} isScrubbing True/false the user is scrubbing\n * @return {Boolean} The scrubbing status when getting\n * @return {Object} The player when setting\n * @method scrubbing\n */\n scrubbing(isScrubbing) {\n if (isScrubbing !== undefined) {\n this.scrubbing_ = !!isScrubbing;\n\n if (isScrubbing) {\n this.addClass('vjs-scrubbing');\n } else {\n this.removeClass('vjs-scrubbing');\n }\n\n return this;\n }\n\n return this.scrubbing_;\n }\n\n /**\n * Get or set the current time (in seconds)\n * ```js\n * // get\n * var whereYouAt = myPlayer.currentTime();\n * // set\n * myPlayer.currentTime(120); // 2 minutes into the video\n * ```\n *\n * @param {Number|String=} seconds The time to seek to\n * @return {Number} The time in seconds, when not setting\n * @return {Player} self, when the current time is set\n * @method currentTime\n */\n currentTime(seconds) {\n if (seconds !== undefined) {\n\n this.techCall_('setCurrentTime', seconds);\n\n return this;\n }\n\n // cache last currentTime and return. default to 0 seconds\n //\n // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n // currentTime when scrubbing, but may not provide much performance benefit afterall.\n // Should be tested. Also something has to read the actual current time or the cache will\n // never get updated.\n return this.cache_.currentTime = (this.techGet_('currentTime') || 0);\n }\n\n /**\n * Get the length in time of the video in seconds\n * ```js\n * var lengthOfVideo = myPlayer.duration();\n * ```\n * **NOTE**: The video must have started loading before the duration can be\n * known, and in the case of Flash, may not be known until the video starts\n * playing.\n *\n * @param {Number} seconds Duration when setting\n * @return {Number} The duration of the video in seconds when getting\n * @method duration\n */\n duration(seconds) {\n if (seconds === undefined) {\n return this.cache_.duration || 0;\n }\n\n seconds = parseFloat(seconds) || 0;\n\n // Standardize on Inifity for signaling video is live\n if (seconds < 0) {\n seconds = Infinity;\n }\n\n if (seconds !== this.cache_.duration) {\n // Cache the last set value for optimized scrubbing (esp. Flash)\n this.cache_.duration = seconds;\n\n if (seconds === Infinity) {\n this.addClass('vjs-live');\n } else {\n this.removeClass('vjs-live');\n }\n\n this.trigger('durationchange');\n }\n\n return this;\n }\n\n /**\n * Calculates how much time is left.\n * ```js\n * var timeLeft = myPlayer.remainingTime();\n * ```\n * Not a native video element function, but useful\n *\n * @return {Number} The time remaining in seconds\n * @method remainingTime\n */\n remainingTime() {\n return this.duration() - this.currentTime();\n }\n\n // http://dev.w3.org/html5/spec/video.html#dom-media-buffered\n // Buffered returns a timerange object.\n // Kind of like an array of portions of the video that have been downloaded.\n\n /**\n * Get a TimeRange object with the times of the video that have been downloaded\n * If you just want the percent of the video that's been downloaded,\n * use bufferedPercent.\n * ```js\n * // Number of different ranges of time have been buffered. Usually 1.\n * numberOfRanges = bufferedTimeRange.length,\n * // Time in seconds when the first range starts. Usually 0.\n * firstRangeStart = bufferedTimeRange.start(0),\n * // Time in seconds when the first range ends\n * firstRangeEnd = bufferedTimeRange.end(0),\n * // Length in seconds of the first time range\n * firstRangeLength = firstRangeEnd - firstRangeStart;\n * ```\n *\n * @return {Object} A mock TimeRange object (following HTML spec)\n * @method buffered\n */\n buffered() {\n var buffered = this.techGet_('buffered');\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0,0);\n }\n\n return buffered;\n }\n\n /**\n * Get the percent (as a decimal) of the video that's been downloaded\n * ```js\n * var howMuchIsDownloaded = myPlayer.bufferedPercent();\n * ```\n * 0 means none, 1 means all.\n * (This method isn't in the HTML5 spec, but it's very convenient)\n *\n * @return {Number} A decimal between 0 and 1 representing the percent\n * @method bufferedPercent\n */\n bufferedPercent() {\n return bufferedPercent(this.buffered(), this.duration());\n }\n\n /**\n * Get the ending time of the last buffered time range\n * This is used in the progress bar to encapsulate all time ranges.\n *\n * @return {Number} The end of the last buffered time range\n * @method bufferedEnd\n */\n bufferedEnd() {\n var buffered = this.buffered(),\n duration = this.duration(),\n end = buffered.end(buffered.length-1);\n\n if (end > duration) {\n end = duration;\n }\n\n return end;\n }\n\n /**\n * Get or set the current volume of the media\n * ```js\n * // get\n * var howLoudIsIt = myPlayer.volume();\n * // set\n * myPlayer.volume(0.5); // Set volume to half\n * ```\n * 0 is off (muted), 1.0 is all the way up, 0.5 is half way.\n *\n * @param {Number} percentAsDecimal The new volume as a decimal percent\n * @return {Number} The current volume when getting\n * @return {Player} self when setting\n * @method volume\n */\n volume(percentAsDecimal) {\n let vol;\n\n if (percentAsDecimal !== undefined) {\n vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1\n this.cache_.volume = vol;\n this.techCall_('setVolume', vol);\n\n return this;\n }\n\n // Default to 1 when returning current volume.\n vol = parseFloat(this.techGet_('volume'));\n return (isNaN(vol)) ? 1 : vol;\n }\n\n\n /**\n * Get the current muted state, or turn mute on or off\n * ```js\n * // get\n * var isVolumeMuted = myPlayer.muted();\n * // set\n * myPlayer.muted(true); // mute the volume\n * ```\n *\n * @param {Boolean=} muted True to mute, false to unmute\n * @return {Boolean} True if mute is on, false if not when getting\n * @return {Player} self when setting mute\n * @method muted\n */\n muted(muted) {\n if (muted !== undefined) {\n this.techCall_('setMuted', muted);\n return this;\n }\n return this.techGet_('muted') || false; // Default to false\n }\n\n // Check if current tech can support native fullscreen\n // (e.g. with built in controls like iOS, so not our flash swf)\n /**\n * Check to see if fullscreen is supported\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return this.techGet_('supportsFullScreen') || false;\n }\n\n /**\n * Check if the player is in fullscreen mode\n * ```js\n * // get\n * var fullscreenOrNot = myPlayer.isFullscreen();\n * // set\n * myPlayer.isFullscreen(true); // tell the player it's in fullscreen\n * ```\n * NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n * property and instead document.fullscreenElement is used. But isFullscreen is\n * still a valuable property for internal player workings.\n *\n * @param {Boolean=} isFS Update the player's fullscreen state\n * @return {Boolean} true if fullscreen false if not when getting\n * @return {Player} self when setting\n * @method isFullscreen\n */\n isFullscreen(isFS) {\n if (isFS !== undefined) {\n this.isFullscreen_ = !!isFS;\n return this;\n }\n return !!this.isFullscreen_;\n }\n\n /**\n * Increase the size of the video to full screen\n * ```js\n * myPlayer.requestFullscreen();\n * ```\n * In some browsers, full screen is not supported natively, so it enters\n * \"full window mode\", where the video fills the browser window.\n * In browsers and devices that support native full screen, sometimes the\n * browser's default controls will be shown, and not the Video.js custom skin.\n * This includes most mobile devices (iOS, Android) and older versions of\n * Safari.\n *\n * @return {Player} self\n * @method requestFullscreen\n */\n requestFullscreen() {\n var fsApi = FullscreenApi;\n\n this.isFullscreen(true);\n\n if (fsApi.requestFullscreen) {\n // the browser supports going fullscreen at the element level so we can\n // take the controls fullscreen as well as the video\n\n // Trigger fullscreenchange event after change\n // We have to specifically add this each time, and remove\n // when canceling fullscreen. Otherwise if there's multiple\n // players on a page, they would all be reacting to the same fullscreen\n // events\n Events.on(document, fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e){\n this.isFullscreen(document[fsApi.fullscreenElement]);\n\n // If cancelling fullscreen, remove event listener.\n if (this.isFullscreen() === false) {\n Events.off(document, fsApi.fullscreenchange, documentFullscreenChange);\n }\n\n this.trigger('fullscreenchange');\n }));\n\n this.el_[fsApi.requestFullscreen]();\n\n } else if (this.tech_.supportsFullScreen()) {\n // we can't take the video.js controls fullscreen but we can go fullscreen\n // with native controls\n this.techCall_('enterFullScreen');\n } else {\n // fullscreen isn't supported so we'll just stretch the video element to\n // fill the viewport\n this.enterFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * Return the video to its normal size after having been in full screen mode\n * ```js\n * myPlayer.exitFullscreen();\n * ```\n *\n * @return {Player} self\n * @method exitFullscreen\n */\n exitFullscreen() {\n var fsApi = FullscreenApi;\n this.isFullscreen(false);\n\n // Check for browser element fullscreen support\n if (fsApi.requestFullscreen) {\n document[fsApi.exitFullscreen]();\n } else if (this.tech_.supportsFullScreen()) {\n this.techCall_('exitFullScreen');\n } else {\n this.exitFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.\n *\n * @method enterFullWindow\n */\n enterFullWindow() {\n this.isFullWindow = true;\n\n // Storing original doc overflow value to return to when fullscreen is off\n this.docOrigOverflow = document.documentElement.style.overflow;\n\n // Add listener for esc key to exit fullscreen\n Events.on(document, 'keydown', Fn.bind(this, this.fullWindowOnEscKey));\n\n // Hide any scroll bars\n document.documentElement.style.overflow = 'hidden';\n\n // Apply fullscreen styles\n Dom.addElClass(document.body, 'vjs-full-window');\n\n this.trigger('enterFullWindow');\n }\n\n /**\n * Check for call to either exit full window or full screen on ESC key\n *\n * @param {String} event Event to check for key press\n * @method fullWindowOnEscKey\n */\n fullWindowOnEscKey(event) {\n if (event.keyCode === 27) {\n if (this.isFullscreen() === true) {\n this.exitFullscreen();\n } else {\n this.exitFullWindow();\n }\n }\n }\n\n /**\n * Exit full window\n *\n * @method exitFullWindow\n */\n exitFullWindow() {\n this.isFullWindow = false;\n Events.off(document, 'keydown', this.fullWindowOnEscKey);\n\n // Unhide scroll bars.\n document.documentElement.style.overflow = this.docOrigOverflow;\n\n // Remove fullscreen styles\n Dom.removeElClass(document.body, 'vjs-full-window');\n\n // Resize the box, controller, and poster to original sizes\n // this.positionAll();\n this.trigger('exitFullWindow');\n }\n\n /**\n * Check whether the player can play a given mimetype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n * @method canPlayType\n */\n canPlayType(type) {\n let can;\n\n // Loop through each playback technology in the options order\n for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n let techName = toTitleCase(j[i]);\n let tech = Tech.getTech(techName);\n\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!tech) {\n tech = Component.getComponent(techName);\n }\n\n // Check if the current tech is defined before continuing\n if (!tech) {\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n continue;\n }\n\n // Check if the browser supports this technology\n if (tech.isSupported()) {\n can = tech.canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n }\n\n return '';\n }\n\n /**\n * Select source based on tech-order or source-order\n * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n * defaults to tech-order selection\n *\n * @param {Array} sources The sources for a media asset\n * @return {Object|Boolean} Object of source and tech order, otherwise false\n * @method selectSource\n */\n selectSource(sources) {\n // Get only the techs specified in `techOrder` that exist and are supported by the\n // current platform\n let techs =\n this.options_.techOrder\n .map(toTitleCase)\n .map((techName) => {\n // `Component.getComponent(...)` is for support of old behavior of techs\n // being registered as components.\n // Remove once that deprecated behavior is removed.\n return [techName, Tech.getTech(techName) || Component.getComponent(techName)];\n })\n .filter(([techName, tech]) => {\n // Check if the current tech is defined before continuing\n if (tech) {\n // Check if the browser supports this technology\n return tech.isSupported();\n }\n\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n return false;\n });\n\n // Iterate over each `innerArray` element once per `outerArray` element and execute\n // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n // that value.\n let findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n let found;\n\n outerArray.some((outerChoice) => {\n return innerArray.some((innerChoice) => {\n found = tester(outerChoice, innerChoice);\n\n if (found) {\n return true;\n }\n });\n });\n\n return found;\n };\n\n let foundSourceAndTech;\n let flip = (fn) => (a, b) => fn(b, a);\n let finder = ([techName, tech], source) => {\n if (tech.canPlaySource(source)) {\n return {source: source, tech: techName};\n }\n };\n\n // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n // to select from them based on their priority.\n if (this.options_.sourceOrder) {\n // Source-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n } else {\n // Tech-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n }\n\n return foundSourceAndTech || false;\n }\n\n /**\n * The source function updates the video source\n * There are three types of variables you can pass as the argument.\n * **URL String**: A URL to the the video file. Use this method if you are sure\n * the current playback technology (HTML5/Flash) can support the source you\n * provide. Currently only MP4 files can be used in both HTML5 and Flash.\n * ```js\n * myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n * ```\n * **Source Object (or element):* * A javascript object containing information\n * about the source file. Use this method if you want the player to determine if\n * it can support the file using the type information.\n * ```js\n * myPlayer.src({ type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" });\n * ```\n * **Array of Source Objects:* * To provide multiple versions of the source so\n * that it can be played using HTML5 across browsers you can use an array of\n * source objects. Video.js will detect which version is supported and load that\n * file.\n * ```js\n * myPlayer.src([\n * { type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" },\n * { type: \"video/webm\", src: \"http://www.example.com/path/to/video.webm\" },\n * { type: \"video/ogg\", src: \"http://www.example.com/path/to/video.ogv\" }\n * ]);\n * ```\n *\n * @param {String|Object|Array=} source The source URL, object, or array of sources\n * @return {String} The current video source when getting\n * @return {String} The player when setting\n * @method src\n */\n src(source) {\n if (source === undefined) {\n return this.techGet_('src');\n }\n\n let currentTech = Tech.getTech(this.techName_);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!currentTech) {\n currentTech = Component.getComponent(this.techName_);\n }\n\n // case: Array of source objects to choose from and pick the best to play\n if (Array.isArray(source)) {\n this.sourceList_(source);\n\n // case: URL String (http://myvideo...)\n } else if (typeof source === 'string') {\n // create a source object from the string\n this.src({ src: source });\n\n // case: Source object { src: '', type: '' ... }\n } else if (source instanceof Object) {\n // check if the source has a type and the loaded tech cannot play the source\n // if there's no type we'll just try the current tech\n if (source.type && !currentTech.canPlaySource(source)) {\n // create a source list with the current source and send through\n // the tech loop to check for a compatible technology\n this.sourceList_([source]);\n } else {\n this.cache_.src = source.src;\n this.currentType_ = source.type || '';\n\n // wait until the tech is ready to set the source\n this.ready(function(){\n\n // The setSource tech method was added with source handlers\n // so older techs won't support it\n // We need to check the direct prototype for the case where subclasses\n // of the tech do not support source handlers\n if (currentTech.prototype.hasOwnProperty('setSource')) {\n this.techCall_('setSource', source);\n } else {\n this.techCall_('src', source.src);\n }\n\n if (this.options_.preload === 'auto') {\n this.load();\n }\n\n if (this.options_.autoplay) {\n this.play();\n }\n\n // Set the source synchronously if possible (#2326)\n }, true);\n }\n }\n\n return this;\n }\n\n /**\n * Handle an array of source objects\n *\n * @param {Array} sources Array of source objects\n * @private\n * @method sourceList_\n */\n sourceList_(sources) {\n var sourceTech = this.selectSource(sources);\n\n if (sourceTech) {\n if (sourceTech.tech === this.techName_) {\n // if this technology is already loaded, set the source\n this.src(sourceTech.source);\n } else {\n // load this technology with the chosen source\n this.loadTech_(sourceTech.tech, sourceTech.source);\n }\n } else {\n // We need to wrap this in a timeout to give folks a chance to add error event handlers\n this.setTimeout( function() {\n this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) });\n }, 0);\n\n // we could not find an appropriate tech, but let's still notify the delegate that this is it\n // this needs a better comment about why this is needed\n this.triggerReady();\n }\n }\n\n /**\n * Begin loading the src data.\n *\n * @return {Player} Returns the player\n * @method load\n */\n load() {\n this.techCall_('load');\n return this;\n }\n\n /**\n * Reset the player. Loads the first tech in the techOrder,\n * and calls `reset` on the tech`.\n *\n * @return {Player} Returns the player\n * @method reset\n */\n reset() {\n this.loadTech_(toTitleCase(this.options_.techOrder[0]), null);\n this.techCall_('reset');\n return this;\n }\n\n /**\n * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n * Can be used in conjuction with `currentType` to assist in rebuilding the current source object.\n *\n * @return {String} The current source\n * @method currentSrc\n */\n currentSrc() {\n return this.techGet_('currentSrc') || this.cache_.src || '';\n }\n\n /**\n * Get the current source type e.g. video/mp4\n * This can allow you rebuild the current source object so that you could load the same\n * source and tech later\n *\n * @return {String} The source MIME type\n * @method currentType\n */\n currentType() {\n return this.currentType_ || '';\n }\n\n /**\n * Get or set the preload attribute\n *\n * @param {Boolean} value Boolean to determine if preload should be used\n * @return {String} The preload attribute value when getting\n * @return {Player} Returns the player when setting\n * @method preload\n */\n preload(value) {\n if (value !== undefined) {\n this.techCall_('setPreload', value);\n this.options_.preload = value;\n return this;\n }\n return this.techGet_('preload');\n }\n\n /**\n * Get or set the autoplay attribute.\n *\n * @param {Boolean} value Boolean to determine if video should autoplay\n * @return {String} The autoplay attribute value when getting\n * @return {Player} Returns the player when setting\n * @method autoplay\n */\n autoplay(value) {\n if (value !== undefined) {\n this.techCall_('setAutoplay', value);\n this.options_.autoplay = value;\n return this;\n }\n return this.techGet_('autoplay', value);\n }\n\n /**\n * Get or set the loop attribute on the video element.\n *\n * @param {Boolean} value Boolean to determine if video should loop\n * @return {String} The loop attribute value when getting\n * @return {Player} Returns the player when setting\n * @method loop\n */\n loop(value) {\n if (value !== undefined) {\n this.techCall_('setLoop', value);\n this.options_['loop'] = value;\n return this;\n }\n return this.techGet_('loop');\n }\n\n /**\n * Get or set the poster image source url\n *\n * ##### EXAMPLE:\n * ```js\n * // get\n * var currentPoster = myPlayer.poster();\n * // set\n * myPlayer.poster('http://example.com/myImage.jpg');\n * ```\n *\n * @param {String=} src Poster image source URL\n * @return {String} poster URL when getting\n * @return {Player} self when setting\n * @method poster\n */\n poster(src) {\n if (src === undefined) {\n return this.poster_;\n }\n\n // The correct way to remove a poster is to set as an empty string\n // other falsey values will throw errors\n if (!src) {\n src = '';\n }\n\n // update the internal poster variable\n this.poster_ = src;\n\n // update the tech's poster\n this.techCall_('setPoster', src);\n\n // alert components that the poster has been set\n this.trigger('posterchange');\n\n return this;\n }\n\n /**\n * Some techs (e.g. YouTube) can provide a poster source in an\n * asynchronous way. We want the poster component to use this\n * poster source so that it covers up the tech's controls.\n * (YouTube's play button). However we only want to use this\n * soruce if the player user hasn't set a poster through\n * the normal APIs.\n *\n * @private\n * @method handleTechPosterChange_\n */\n handleTechPosterChange_() {\n if (!this.poster_ && this.tech_ && this.tech_.poster) {\n this.poster_ = this.tech_.poster() || '';\n\n // Let components know the poster has changed\n this.trigger('posterchange');\n }\n }\n\n /**\n * Get or set whether or not the controls are showing.\n *\n * @param {Boolean} bool Set controls to showing or not\n * @return {Boolean} Controls are showing\n * @method controls\n */\n controls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.controls_ !== bool) {\n this.controls_ = bool;\n\n if (this.usingNativeControls()) {\n this.techCall_('setControls', bool);\n }\n\n if (bool) {\n this.removeClass('vjs-controls-disabled');\n this.addClass('vjs-controls-enabled');\n this.trigger('controlsenabled');\n\n if (!this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n } else {\n this.removeClass('vjs-controls-enabled');\n this.addClass('vjs-controls-disabled');\n this.trigger('controlsdisabled');\n\n if (!this.usingNativeControls()) {\n this.removeTechControlsListeners_();\n }\n }\n }\n return this;\n }\n return !!this.controls_;\n }\n\n /**\n * Toggle native controls on/off. Native controls are the controls built into\n * devices (e.g. default iPhone controls), Flash, or other techs\n * (e.g. Vimeo Controls)\n * **This should only be set by the current tech, because only the tech knows\n * if it can support native controls**\n *\n * @param {Boolean} bool True signals that native controls are on\n * @return {Player} Returns the player\n * @private\n * @method usingNativeControls\n */\n usingNativeControls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.usingNativeControls_ !== bool) {\n this.usingNativeControls_ = bool;\n if (bool) {\n this.addClass('vjs-using-native-controls');\n\n /**\n * player is using the native device controls\n *\n * @event usingnativecontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingnativecontrols');\n } else {\n this.removeClass('vjs-using-native-controls');\n\n /**\n * player is using the custom HTML controls\n *\n * @event usingcustomcontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingcustomcontrols');\n }\n }\n return this;\n }\n return !!this.usingNativeControls_;\n }\n\n /**\n * Set or get the current MediaError\n *\n * @param {*} err A MediaError or a String/Number to be turned into a MediaError\n * @return {MediaError|null} when getting\n * @return {Player} when setting\n * @method error\n */\n error(err) {\n if (err === undefined) {\n return this.error_ || null;\n }\n\n // restoring to default\n if (err === null) {\n this.error_ = err;\n this.removeClass('vjs-error');\n this.errorDisplay.close();\n return this;\n }\n\n // error instance\n if (err instanceof MediaError) {\n this.error_ = err;\n } else {\n this.error_ = new MediaError(err);\n }\n\n // add the vjs-error classname to the player\n this.addClass('vjs-error');\n\n // log the name of the error type and any message\n // ie8 just logs \"[object object]\" if you just log the error object\n log.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`, this.error_.message, this.error_);\n\n // fire an error event on the player\n this.trigger('error');\n\n return this;\n }\n\n /**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method ended\n */\n ended() { return this.techGet_('ended'); }\n\n /**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method seeking\n */\n seeking() { return this.techGet_('seeking'); }\n\n /**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method seekable\n */\n seekable() { return this.techGet_('seekable'); }\n\n /**\n * Report user activity\n *\n * @param {Object} event Event object\n * @method reportUserActivity\n */\n reportUserActivity(event) {\n this.userActivity_ = true;\n }\n\n /**\n * Get/set if user is active\n *\n * @param {Boolean} bool Value when setting\n * @return {Boolean} Value if user is active user when getting\n * @method userActive\n */\n userActive(bool) {\n if (bool !== undefined) {\n bool = !!bool;\n if (bool !== this.userActive_) {\n this.userActive_ = bool;\n if (bool) {\n // If the user was inactive and is now active we want to reset the\n // inactivity timer\n this.userActivity_ = true;\n this.removeClass('vjs-user-inactive');\n this.addClass('vjs-user-active');\n this.trigger('useractive');\n } else {\n // We're switching the state to inactive manually, so erase any other\n // activity\n this.userActivity_ = false;\n\n // Chrome/Safari/IE have bugs where when you change the cursor it can\n // trigger a mousemove event. This causes an issue when you're hiding\n // the cursor when the user is inactive, and a mousemove signals user\n // activity. Making it impossible to go into inactive mode. Specifically\n // this happens in fullscreen when we really need to hide the cursor.\n //\n // When this gets resolved in ALL browsers it can be removed\n // https://code.google.com/p/chromium/issues/detail?id=103041\n if(this.tech_) {\n this.tech_.one('mousemove', function(e){\n e.stopPropagation();\n e.preventDefault();\n });\n }\n\n this.removeClass('vjs-user-active');\n this.addClass('vjs-user-inactive');\n this.trigger('userinactive');\n }\n }\n return this;\n }\n return this.userActive_;\n }\n\n /**\n * Listen for user activity based on timeout value\n *\n * @private\n * @method listenForUserActivity_\n */\n listenForUserActivity_() {\n let mouseInProgress, lastMoveX, lastMoveY;\n\n let handleActivity = Fn.bind(this, this.reportUserActivity);\n\n let handleMouseMove = function(e) {\n // #1068 - Prevent mousemove spamming\n // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n if(e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n lastMoveX = e.screenX;\n lastMoveY = e.screenY;\n handleActivity();\n }\n };\n\n let handleMouseDown = function() {\n handleActivity();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(mouseInProgress);\n // Setting userActivity=true now and setting the interval to the same time\n // as the activityCheck interval (250) should ensure we never miss the\n // next activityCheck\n mouseInProgress = this.setInterval(handleActivity, 250);\n };\n\n let handleMouseUp = function(event) {\n handleActivity();\n // Stop the interval that maintains activity if the mouse/touch is down\n this.clearInterval(mouseInProgress);\n };\n\n // Any mouse movement will be considered user activity\n this.on('mousedown', handleMouseDown);\n this.on('mousemove', handleMouseMove);\n this.on('mouseup', handleMouseUp);\n\n // Listen for keyboard navigation\n // Shouldn't need to use inProgress interval because of key repeat\n this.on('keydown', handleActivity);\n this.on('keyup', handleActivity);\n\n // Run an interval every 250 milliseconds instead of stuffing everything into\n // the mousemove/touchmove function itself, to prevent performance degradation.\n // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n // then gets picked up by this loop\n // http://ejohn.org/blog/learning-from-twitter/\n let inactivityTimeout;\n let activityCheck = this.setInterval(function() {\n // Check to see if mouse/touch activity has happened\n if (this.userActivity_) {\n // Reset the activity tracker\n this.userActivity_ = false;\n\n // If the user state was inactive, set the state to active\n this.userActive(true);\n\n // Clear any existing inactivity timeout to start the timer over\n this.clearTimeout(inactivityTimeout);\n\n var timeout = this.options_['inactivityTimeout'];\n if (timeout > 0) {\n // In milliseconds, if no more activity has occurred the\n // user will be considered inactive\n inactivityTimeout = this.setTimeout(function () {\n // Protect against the case where the inactivityTimeout can trigger just\n // before the next user activity is picked up by the activityCheck loop\n // causing a flicker\n if (!this.userActivity_) {\n this.userActive(false);\n }\n }, timeout);\n }\n }\n }, 250);\n }\n\n /**\n * Gets or sets the current playback rate. A playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed\n * playback, for instance.\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n *\n * @param {Number} rate New playback rate to set.\n * @return {Number} Returns the new playback rate when setting\n * @return {Number} Returns the current playback rate when getting\n * @method playbackRate\n */\n playbackRate(rate) {\n if (rate !== undefined) {\n this.techCall_('setPlaybackRate', rate);\n return this;\n }\n\n if (this.tech_ && this.tech_['featuresPlaybackRate']) {\n return this.techGet_('playbackRate');\n } else {\n return 1.0;\n }\n }\n\n /**\n * Gets or sets the audio flag\n *\n * @param {Boolean} bool True signals that this is an audio player.\n * @return {Boolean} Returns true if player is audio, false if not when getting\n * @return {Player} Returns the player if setting\n * @private\n * @method isAudio\n */\n isAudio(bool) {\n if (bool !== undefined) {\n this.isAudio_ = !!bool;\n return this;\n }\n\n return !!this.isAudio_;\n }\n\n /**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n * The element has not yet been initialised. All attributes are in\n * their initial states.\n * - NETWORK_IDLE (numeric value 1)\n * The element's resource selection algorithm is active and has\n * selected a resource, but it is not actually using the network at\n * this time.\n * - NETWORK_LOADING (numeric value 2)\n * The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n * The element's resource selection algorithm is active, but it has\n * not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {Number} the current network activity state\n * @method networkState\n */\n networkState() {\n return this.techGet_('networkState');\n }\n\n /**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n * No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n * Enough of the resource has been obtained that the duration of the\n * resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n * Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n * Data for the immediate current playback position is available, as\n * well as enough data for the user agent to advance the current\n * playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n * The user agent estimates that enough data is available for\n * playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {Number} the current playback rendering state\n * @method readyState\n */\n readyState() {\n return this.techGet_('readyState');\n }\n\n /**\n * Text tracks are tracks of timed text events.\n * Captions - text displayed over the video for the hearing impaired\n * Subtitles - text displayed over the video for those who don't understand language in the video\n * Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video\n * Descriptions - audio descriptions that are read back to the user by a screen reading device\n */\n\n /**\n * Get an array of associated text tracks. captions, subtitles, chapters, descriptions\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {Array} Array of track objects\n * @method textTracks\n */\n textTracks() {\n // cannot use techGet_ directly because it checks to see whether the tech is ready.\n // Flash is unlikely to be ready in time but textTracks should still work.\n return this.tech_ && this.tech_['textTracks']();\n }\n\n /**\n * Get an array of remote text tracks\n *\n * @return {Array}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n return this.tech_ && this.tech_['remoteTextTracks']();\n }\n\n /**\n * Get an array of remote html track elements\n *\n * @return {HTMLTrackElement[]}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n return this.tech_ && this.tech_['remoteTextTrackEls']();\n }\n\n /**\n * Add a text track\n * In addition to the W3C settings we allow adding additional info through options.\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n *\n * @param {String} kind Captions, subtitles, chapters, descriptions, or metadata\n * @param {String=} label Optional label\n * @param {String=} language Optional language\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n return this.tech_ && this.tech_['addTextTrack'](kind, label, language);\n }\n\n /**\n * Add a remote text track\n *\n * @param {Object} options Options for remote text track\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n return this.tech_ && this.tech_['addRemoteTextTrack'](options);\n }\n\n /**\n * Remove a remote text track\n *\n * @param {Object} track Remote text track to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.tech_ && this.tech_['removeRemoteTextTrack'](track);\n }\n\n /**\n * Get video width\n *\n * @return {Number} Video width\n * @method videoWidth\n */\n videoWidth() {\n return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n }\n\n /**\n * Get video height\n *\n * @return {Number} Video height\n * @method videoHeight\n */\n videoHeight() {\n return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n }\n\n // Methods to add support for\n // initialTime: function(){ return this.techCall_('initialTime'); },\n // startOffsetTime: function(){ return this.techCall_('startOffsetTime'); },\n // played: function(){ return this.techCall_('played'); },\n // videoTracks: function(){ return this.techCall_('videoTracks'); },\n // audioTracks: function(){ return this.techCall_('audioTracks'); },\n // defaultPlaybackRate: function(){ return this.techCall_('defaultPlaybackRate'); },\n // defaultMuted: function(){ return this.techCall_('defaultMuted'); }\n\n /**\n * The player's language code\n * NOTE: The language should be set in the player options if you want the\n * the controls to be built with a specific language. Changing the lanugage\n * later will not update controls text.\n *\n * @param {String} code The locale string\n * @return {String} The locale string when getting\n * @return {Player} self when setting\n * @method language\n */\n language(code) {\n if (code === undefined) {\n return this.language_;\n }\n\n this.language_ = (''+code).toLowerCase();\n return this;\n }\n\n /**\n * Get the player's language dictionary\n * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n * Languages specified directly in the player options have precedence\n *\n * @return {Array} Array of languages\n * @method languages\n */\n languages() {\n return mergeOptions(Player.prototype.options_.languages, this.languages_);\n }\n\n /**\n * Converts track info to JSON\n *\n * @return {Object} JSON object of options\n * @method toJSON\n */\n toJSON() {\n let options = mergeOptions(this.options_);\n let tracks = options.tracks;\n\n options.tracks = [];\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // deep merge tracks and null out player so no circular references\n track = mergeOptions(track);\n track.player = undefined;\n options.tracks[i] = track;\n }\n\n return options;\n }\n\n /**\n * Creates a simple modal dialog (an instance of the `ModalDialog`\n * component) that immediately overlays the player with arbitrary\n * content and removes itself when closed.\n *\n * @param {String|Function|Element|Array|Null} content\n * Same as `ModalDialog#content`'s param of the same name.\n *\n * The most straight-forward usage is to provide a string or DOM\n * element.\n *\n * @param {Object} [options]\n * Extra options which will be passed on to the `ModalDialog`.\n *\n * @return {ModalDialog}\n */\n createModal(content, options) {\n let player = this;\n\n options = options || {};\n options.content = content || '';\n\n let modal = new ModalDialog(player, options);\n\n player.addChild(modal);\n modal.on('dispose', function() {\n player.removeChild(modal);\n });\n\n return modal.open();\n }\n\n /**\n * Gets tag settings\n *\n * @param {Element} tag The player tag\n * @return {Array} An array of sources and track objects\n * @static\n * @method getTagSettings\n */\n static getTagSettings(tag) {\n let baseOptions = {\n 'sources': [],\n 'tracks': []\n };\n\n const tagOptions = Dom.getElAttributes(tag);\n const dataSetup = tagOptions['data-setup'];\n\n // Check if data-setup attr exists.\n if (dataSetup !== null){\n // Parse options JSON\n // If empty string, make it a parsable json object.\n const [err, data] = safeParseTuple(dataSetup || '{}');\n if (err) {\n log.error(err);\n }\n assign(tagOptions, data);\n }\n\n assign(baseOptions, tagOptions);\n\n // Get tag children settings\n if (tag.hasChildNodes()) {\n const children = tag.childNodes;\n\n for (let i=0, j=children.length; i 1) {\n this.show();\n }\n }\n\n /**\n * Create popup - Override with specific functionality for component\n *\n * @return {Popup} The constructed popup\n * @method createPopup\n */\n createPopup() {}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n}\n\nComponent.registerComponent('PopupButton', PopupButton);\nexport default PopupButton;\n", - "/**\n * @file popup.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Popup component is used to build pop up controls.\n *\n * @extends Component\n * @class Popup\n */\nclass Popup extends Component {\n\n /**\n * Add a popup item to the popup\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Popup Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n}\n\nComponent.registerComponent('Popup', Popup);\nexport default Popup;\n", - "/**\n * @file poster-image.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component.js';\nimport * as Fn from './utils/fn.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\n\n/**\n * The component that handles showing the poster image.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PosterImage\n */\nclass PosterImage extends ClickableComponent {\n\n constructor(player, options){\n super(player, options);\n\n this.update();\n player.on('posterchange', Fn.bind(this, this.update));\n }\n\n /**\n * Clean up the poster image\n *\n * @method dispose\n */\n dispose() {\n this.player().off('posterchange', this.update);\n super.dispose();\n }\n\n /**\n * Create the poster's image element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = Dom.createEl('div', {\n className: 'vjs-poster',\n\n // Don't want poster to be tabbable.\n tabIndex: -1\n });\n\n // To ensure the poster image resizes while maintaining its original aspect\n // ratio, use a div with `background-size` when available. For browsers that\n // do not support `background-size` (e.g. IE8), fall back on using a regular\n // img element.\n if (!browser.BACKGROUND_SIZE_SUPPORTED) {\n this.fallbackImg_ = Dom.createEl('img');\n el.appendChild(this.fallbackImg_);\n }\n\n return el;\n }\n\n /**\n * Event handler for updates to the player's poster source\n *\n * @method update\n */\n update() {\n let url = this.player().poster();\n\n this.setSrc(url);\n\n // If there's no poster source we should display:none on this component\n // so it's not still clickable or right-clickable\n if (url) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Set the poster source depending on the display method\n *\n * @param {String} url The URL to the poster source\n * @method setSrc\n */\n setSrc(url) {\n if (this.fallbackImg_) {\n this.fallbackImg_.src = url;\n } else {\n let backgroundImage = '';\n // Any falsey values should stay as an empty string, otherwise\n // this will throw an extra error\n if (url) {\n backgroundImage = `url(\"${url}\")`;\n }\n\n this.el_.style.backgroundImage = backgroundImage;\n }\n }\n\n /**\n * Event handler for clicks on the poster image\n *\n * @method handleClick\n */\n handleClick() {\n // We don't want a click to trigger playback when controls are disabled\n // but CSS should be hiding the poster to prevent that from happening\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n}\n\nComponent.registerComponent('PosterImage', PosterImage);\nexport default PosterImage;\n", - "/**\n * @file setup.js\n *\n * Functions for automatically setting up a player\n * based on the data-setup attribute of the video tag\n */\nimport * as Events from './utils/events.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nlet _windowLoaded = false;\nlet videojs;\n\n\n// Automatically set up any tags that have a data-setup attribute\nvar autoSetup = function(){\n // One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack*\n // var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n // var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n // var mediaEls = vids.concat(audios);\n\n // Because IE8 doesn't support calling slice on a node list, we need to loop through each list of elements\n // to build up a new, combined list of elements.\n var vids = document.getElementsByTagName('video');\n var audios = document.getElementsByTagName('audio');\n var mediaEls = [];\n if (vids && vids.length > 0) {\n for(let i=0, e=vids.length; i 0) {\n for(let i=0, e=audios.length; i 0) {\n\n for (let i=0, e=mediaEls.length; i seekable.start(0) ? time : seekable.start(0);\n time = time < seekable.end(seekable.length - 1) ? time : seekable.end(seekable.length - 1);\n\n this.lastSeekTarget_ = time;\n this.trigger('seeking');\n this.el_.vjs_setProperty('currentTime', time);\n super.setCurrentTime();\n }\n }\n\n /**\n * Get current time\n *\n * @param {Number=} time Current time of video\n * @return {Number} Current time\n * @method currentTime\n */\n currentTime(time) {\n // when seeking make the reported time keep up with the requested time\n // by reading the time we're seeking to\n if (this.seeking()) {\n return this.lastSeekTarget_ || 0;\n }\n return this.el_.vjs_getProperty('currentTime');\n }\n\n /**\n * Get current source\n *\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.vjs_getProperty('currentSrc');\n }\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load() {\n this.el_.vjs_load();\n }\n\n /**\n * Get poster\n *\n * @method poster\n */\n poster() {\n this.el_.vjs_getProperty('poster');\n }\n\n /**\n * Poster images are not handled by the Flash tech so make this a no-op\n *\n * @method setPoster\n */\n setPoster() {}\n\n /**\n * Determine if can seek in media\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() {\n const duration = this.duration();\n if (duration === 0) {\n return createTimeRange();\n }\n return createTimeRange(0, duration);\n }\n\n /**\n * Get buffered time range\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() {\n let ranges = this.el_.vjs_getProperty('buffered');\n if (ranges.length === 0) {\n return createTimeRange();\n }\n return createTimeRange(ranges[0][0], ranges[0][1]);\n }\n\n /**\n * Get fullscreen support -\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return false; // Flash does not allow fullscreen through javascript\n }\n\n /**\n * Request to enter fullscreen\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method enterFullScreen\n */\n enterFullScreen() {\n return false;\n }\n\n}\n\n\n// Create setters and getters for attributes\nconst _api = Flash.prototype;\nconst _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(',');\nconst _readOnly = 'networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(',');\n\nfunction _createSetter(attr){\n var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);\n _api['set'+attrUpper] = function(val){ return this.el_.vjs_setProperty(attr, val); };\n}\nfunction _createGetter(attr) {\n _api[attr] = function(){ return this.el_.vjs_getProperty(attr); };\n}\n\n// Create getter and setters for all read/write attributes\nfor (let i = 0; i < _readWrite.length; i++) {\n _createGetter(_readWrite[i]);\n _createSetter(_readWrite[i]);\n}\n\n// Create getters for read-only attributes\nfor (let i = 0; i < _readOnly.length; i++) {\n _createGetter(_readOnly[i]);\n}\n\n/* Flash Support Testing -------------------------------------------------------- */\n\nFlash.isSupported = function(){\n return Flash.version()[0] >= 10;\n // return swfobject.hasFlashPlayerVersion('10');\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Flash);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler = {};\n\n/**\n * Check if Flash can play the given videotype\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canPlayType = function(type){\n if (type in Flash.formats) {\n return 'maybe';\n }\n\n return '';\n};\n\n/*\n * Check Flash can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canHandleSource = function(source){\n var type;\n\n function guessMimeType(src) {\n var ext = Url.getFileExtension(src);\n if (ext) {\n return `video/${ext}`;\n }\n return '';\n }\n\n if (!source.type) {\n type = guessMimeType(source.src);\n } else {\n // Strip code information from the type because we don't get that specific\n type = source.type.replace(/;.*/, '').toLowerCase();\n }\n\n return Flash.nativeSourceHandler.canPlayType(type);\n};\n\n/*\n * Pass the source to the flash object\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n * Clean up the source handler when disposing the player or switching sources..\n * (no cleanup is needed when supporting the format natively)\n */\nFlash.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nFlash.registerSourceHandler(Flash.nativeSourceHandler);\n\nFlash.formats = {\n 'video/flv': 'FLV',\n 'video/x-flv': 'FLV',\n 'video/mp4': 'MP4',\n 'video/m4v': 'MP4'\n};\n\nFlash.onReady = function(currSwf){\n let el = Dom.getEl(currSwf);\n let tech = el && el.tech;\n\n // if there is no el then the tech has been disposed\n // and the tech element was removed from the player div\n if (tech && tech.el()) {\n // check that the flash object is really ready\n Flash.checkReady(tech);\n }\n};\n\n// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object.\n// If it's not ready, we set a timeout to check again shortly.\nFlash.checkReady = function(tech){\n // stop worrying if the tech has been disposed\n if (!tech.el()) {\n return;\n }\n\n // check if API property exists\n if (tech.el().vjs_getProperty) {\n // tell tech it's ready\n tech.triggerReady();\n } else {\n // wait longer\n this.setTimeout(function(){\n Flash['checkReady'](tech);\n }, 50);\n }\n};\n\n// Trigger events from the swf on the player\nFlash.onEvent = function(swfID, eventName){\n let tech = Dom.getEl(swfID).tech;\n tech.trigger(eventName);\n};\n\n// Log errors from the swf\nFlash.onError = function(swfID, err){\n const tech = Dom.getEl(swfID).tech;\n\n // trigger MEDIA_ERR_SRC_NOT_SUPPORTED\n if (err === 'srcnotfound') {\n return tech.error(4);\n }\n\n // trigger a custom error\n tech.error('FLASH: ' + err);\n};\n\n// Flash Version Check\nFlash.version = function(){\n let version = '0,0,0';\n\n // IE\n try {\n version = new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n\n // other browsers\n } catch(e) {\n try {\n if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin){\n version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n }\n } catch(err) {}\n }\n return version.split(',');\n};\n\n// Flash embedding method. Only used in non-iframe mode\nFlash.embed = function(swf, flashVars, params, attributes){\n const code = Flash.getEmbedCode(swf, flashVars, params, attributes);\n\n // Get element by embedding code and retrieving created element\n const obj = Dom.createEl('div', { innerHTML: code }).childNodes[0];\n\n return obj;\n};\n\nFlash.getEmbedCode = function(swf, flashVars, params, attributes){\n const objTag = '`;\n });\n\n attributes = assign({\n // Add swf to attributes (need both for IE and Others to work)\n 'data': swf,\n\n // Default to 100% width/height\n 'width': '100%',\n 'height': '100%'\n\n }, attributes);\n\n // Create Attributes string\n Object.getOwnPropertyNames(attributes).forEach(function(key){\n attrsString += `${key}=\"${attributes[key]}\" `;\n });\n\n return `${objTag}${attrsString}>${paramsString}`;\n};\n\n// Run Flash through the RTMP decorator\nFlashRtmpDecorator(Flash);\n\nComponent.registerComponent('Flash', Flash);\nTech.registerTech('Flash', Flash);\nexport default Flash;\n", - "/**\n * @file html5.js\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n */\n\nimport Tech from './tech.js';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\nimport * as Url from '../utils/url.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport window from 'global/window';\nimport assign from 'object.assign';\nimport mergeOptions from '../utils/merge-options.js';\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Tech\n * @class Html5\n */\nclass Html5 extends Tech {\n\n constructor(options, ready){\n super(options, ready);\n\n const source = options.source;\n\n // Set the source if one is provided\n // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n // anyway so the error gets fired.\n if (source && (this.el_.currentSrc !== source.src || (options.tag && options.tag.initNetworkState_ === 3))) {\n this.setSource(source);\n } else {\n this.handleLateInit_(this.el_);\n }\n\n if (this.el_.hasChildNodes()) {\n\n let nodes = this.el_.childNodes;\n let nodesLength = nodes.length;\n let removeNodes = [];\n\n while (nodesLength--) {\n let node = nodes[nodesLength];\n let nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'track') {\n if (!this.featuresNativeTextTracks) {\n // Empty video tag tracks so the built-in player doesn't use them also.\n // This may not be fast enough to stop HTML5 browsers from reading the tags\n // so we'll need to turn off any default tracks if we're manually doing\n // captions and subtitles. videoElement.textTracks\n removeNodes.push(node);\n } else {\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(node);\n this.remoteTextTracks().addTrack_(node.track);\n }\n }\n }\n\n for (let i=0; i= 0; i--) {\n const attr = settingsAttrs[i];\n let overwriteAttrs = {};\n if (typeof this.options_[attr] !== 'undefined') {\n overwriteAttrs[attr] = this.options_[attr];\n }\n Dom.setElAttributes(el, overwriteAttrs);\n }\n\n return el;\n // jenniisawesome = true;\n }\n\n // If we're loading the playback object after it has started loading\n // or playing the video (often with autoplay on) then the loadstart event\n // has already fired and we need to fire it manually because many things\n // rely on it.\n handleLateInit_(el) {\n if (el.networkState === 0 || el.networkState === 3) {\n // The video element hasn't started loading the source yet\n // or didn't find a source\n return;\n }\n\n if (el.readyState === 0) {\n // NetworkState is set synchronously BUT loadstart is fired at the\n // end of the current stack, usually before setInterval(fn, 0).\n // So at this point we know loadstart may have already fired or is\n // about to fire, and either way the player hasn't seen it yet.\n // We don't want to fire loadstart prematurely here and cause a\n // double loadstart so we'll wait and see if it happens between now\n // and the next loop, and fire it if not.\n // HOWEVER, we also want to make sure it fires before loadedmetadata\n // which could also happen between now and the next loop, so we'll\n // watch for that also.\n let loadstartFired = false;\n let setLoadstartFired = function() {\n loadstartFired = true;\n };\n this.on('loadstart', setLoadstartFired);\n\n let triggerLoadstart = function() {\n // We did miss the original loadstart. Make sure the player\n // sees loadstart before loadedmetadata\n if (!loadstartFired) {\n this.trigger('loadstart');\n }\n };\n this.on('loadedmetadata', triggerLoadstart);\n\n this.ready(function(){\n this.off('loadstart', setLoadstartFired);\n this.off('loadedmetadata', triggerLoadstart);\n\n if (!loadstartFired) {\n // We did miss the original native loadstart. Fire it now.\n this.trigger('loadstart');\n }\n });\n\n return;\n }\n\n // From here on we know that loadstart already fired and we missed it.\n // The other readyState events aren't as much of a problem if we double\n // them, so not going to go to as much trouble as loadstart to prevent\n // that unless we find reason to.\n let eventsToTrigger = ['loadstart'];\n\n // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n eventsToTrigger.push('loadedmetadata');\n\n // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n if (el.readyState >= 2) {\n eventsToTrigger.push('loadeddata');\n }\n\n // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n if (el.readyState >= 3) {\n eventsToTrigger.push('canplay');\n }\n\n // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n if (el.readyState >= 4) {\n eventsToTrigger.push('canplaythrough');\n }\n\n // We still need to give the player time to add event listeners\n this.ready(function(){\n eventsToTrigger.forEach(function(type){\n this.trigger(type);\n }, this);\n });\n }\n\n proxyNativeTextTracks_() {\n let tt = this.el().textTracks;\n\n if (tt) {\n // Add tracks - if player is initialised after DOM loaded, textTracks\n // will not trigger addtrack\n for (let i = 0; i < tt.length; i++) {\n this.textTracks().addTrack_(tt[i]);\n }\n\n if (tt.addEventListener) {\n tt.addEventListener('change', this.handleTextTrackChange_);\n tt.addEventListener('addtrack', this.handleTextTrackAdd_);\n tt.addEventListener('removetrack', this.handleTextTrackRemove_);\n }\n }\n }\n\n handleTextTrackChange(e) {\n let tt = this.textTracks();\n this.textTracks().trigger({\n type: 'change',\n target: tt,\n currentTarget: tt,\n srcElement: tt\n });\n }\n\n handleTextTrackAdd(e) {\n this.textTracks().addTrack_(e.track);\n }\n\n handleTextTrackRemove(e) {\n this.textTracks().removeTrack_(e.track);\n }\n\n /**\n * Play for html5 tech\n *\n * @method play\n */\n play() { this.el_.play(); }\n\n /**\n * Pause for html5 tech\n *\n * @method pause\n */\n pause() { this.el_.pause(); }\n\n /**\n * Paused for html5 tech\n *\n * @return {Boolean}\n * @method paused\n */\n paused() { return this.el_.paused; }\n\n /**\n * Get current time\n *\n * @return {Number}\n * @method currentTime\n */\n currentTime() { return this.el_.currentTime; }\n\n /**\n * Set current time\n *\n * @param {Number} seconds Current time of video\n * @method setCurrentTime\n */\n setCurrentTime(seconds) {\n try {\n this.el_.currentTime = seconds;\n } catch(e) {\n log(e, 'Video is not ready. (Video.js)');\n // this.warning(VideoJS.warnings.videoNotReady);\n }\n }\n\n /**\n * Get duration\n *\n * @return {Number}\n * @method duration\n */\n duration() { return this.el_.duration || 0; }\n\n /**\n * Get a TimeRange object that represents the intersection\n * of the time ranges for which the user agent has all\n * relevant media\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() { return this.el_.buffered; }\n\n /**\n * Get volume level\n *\n * @return {Number}\n * @method volume\n */\n volume() { return this.el_.volume; }\n\n /**\n * Set volume level\n *\n * @param {Number} percentAsDecimal Volume percent as a decimal\n * @method setVolume\n */\n setVolume(percentAsDecimal) { this.el_.volume = percentAsDecimal; }\n\n /**\n * Get if muted\n *\n * @return {Boolean}\n * @method muted\n */\n muted() { return this.el_.muted; }\n\n /**\n * Set muted\n *\n * @param {Boolean} If player is to be muted or note\n * @method setMuted\n */\n setMuted(muted) { this.el_.muted = muted; }\n\n /**\n * Get player width\n *\n * @return {Number}\n * @method width\n */\n width() { return this.el_.offsetWidth; }\n\n /**\n * Get player height\n *\n * @return {Number}\n * @method height\n */\n height() { return this.el_.offsetHeight; }\n\n /**\n * Get if there is fullscreen support\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n if (typeof this.el_.webkitEnterFullScreen === 'function') {\n let userAgent = window.navigator.userAgent;\n // Seems to be broken in Chromium/Chrome && Safari in Leopard\n if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Request to enter fullscreen\n *\n * @method enterFullScreen\n */\n enterFullScreen() {\n var video = this.el_;\n\n if ('webkitDisplayingFullscreen' in video) {\n this.one('webkitbeginfullscreen', function() {\n this.one('webkitendfullscreen', function() {\n this.trigger('fullscreenchange', { isFullscreen: false });\n });\n\n this.trigger('fullscreenchange', { isFullscreen: true });\n });\n }\n\n if (video.paused && video.networkState <= video.HAVE_METADATA) {\n // attempt to prime the video element for programmatic access\n // this isn't necessary on the desktop but shouldn't hurt\n this.el_.play();\n\n // playing and pausing synchronously during the transition to fullscreen\n // can get iOS ~6.1 devices into a play/pause loop\n this.setTimeout(function(){\n video.pause();\n video.webkitEnterFullScreen();\n }, 0);\n } else {\n video.webkitEnterFullScreen();\n }\n }\n\n /**\n * Request to exit fullscreen\n *\n * @method exitFullScreen\n */\n exitFullScreen() {\n this.el_.webkitExitFullScreen();\n }\n\n /**\n * Get/set video\n *\n * @param {Object=} src Source object\n * @return {Object}\n * @method src\n */\n src(src) {\n if (src === undefined) {\n return this.el_.src;\n } else {\n // Setting src through `src` instead of `setSrc` will be deprecated\n this.setSrc(src);\n }\n }\n\n /**\n * Set video\n *\n * @param {Object} src Source object\n * @deprecated\n * @method setSrc\n */\n setSrc(src) {\n this.el_.src = src;\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load(){\n this.el_.load();\n }\n\n /**\n * Reset the tech. Removes all sources and calls `load`.\n *\n * @method reset\n */\n reset() {\n Html5.resetMediaElement(this.el_);\n }\n\n /**\n * Get current source\n *\n * @return {Object}\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.currentSrc;\n }\n }\n\n /**\n * Get poster\n *\n * @return {String}\n * @method poster\n */\n poster() { return this.el_.poster; }\n\n /**\n * Set poster\n *\n * @param {String} val URL to poster image\n * @method\n */\n setPoster(val) { this.el_.poster = val; }\n\n /**\n * Get preload attribute\n *\n * @return {String}\n * @method preload\n */\n preload() { return this.el_.preload; }\n\n /**\n * Set preload attribute\n *\n * @param {String} val Value for preload attribute\n * @method setPreload\n */\n setPreload(val) { this.el_.preload = val; }\n\n /**\n * Get autoplay attribute\n *\n * @return {String}\n * @method autoplay\n */\n autoplay() { return this.el_.autoplay; }\n\n /**\n * Set autoplay attribute\n *\n * @param {String} val Value for preload attribute\n * @method setAutoplay\n */\n setAutoplay(val) { this.el_.autoplay = val; }\n\n /**\n * Get controls attribute\n *\n * @return {String}\n * @method controls\n */\n controls() { return this.el_.controls; }\n\n /**\n * Set controls attribute\n *\n * @param {String} val Value for controls attribute\n * @method setControls\n */\n setControls(val) { this.el_.controls = !!val; }\n\n /**\n * Get loop attribute\n *\n * @return {String}\n * @method loop\n */\n loop() { return this.el_.loop; }\n\n /**\n * Set loop attribute\n *\n * @param {String} val Value for loop attribute\n * @method setLoop\n */\n setLoop(val) { this.el_.loop = val; }\n\n /**\n * Get error value\n *\n * @return {String}\n * @method error\n */\n error() { return this.el_.error; }\n\n /**\n * Get whether or not the player is in the \"seeking\" state\n *\n * @return {Boolean}\n * @method seeking\n */\n seeking() { return this.el_.seeking; }\n\n /**\n * Get a TimeRanges object that represents the\n * ranges of the media resource to which it is possible\n * for the user agent to seek.\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() { return this.el_.seekable; }\n\n /**\n * Get if video ended\n *\n * @return {Boolean}\n * @method ended\n */\n ended() { return this.el_.ended; }\n\n /**\n * Get the value of the muted content attribute\n * This attribute has no dynamic effect, it only\n * controls the default state of the element\n *\n * @return {Boolean}\n * @method defaultMuted\n */\n defaultMuted() { return this.el_.defaultMuted; }\n\n /**\n * Get desired speed at which the media resource is to play\n *\n * @return {Number}\n * @method playbackRate\n */\n playbackRate() { return this.el_.playbackRate; }\n\n /**\n * Returns a TimeRanges object that represents the ranges of the\n * media resource that the user agent has played.\n * @return {TimeRangeObject} the range of points on the media\n * timeline that has been reached through normal playback\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-played\n */\n played() { return this.el_.played; }\n\n /**\n * Set desired speed at which the media resource is to play\n *\n * @param {Number} val Speed at which the media resource is to play\n * @method setPlaybackRate\n */\n setPlaybackRate(val) { this.el_.playbackRate = val; }\n\n /**\n * Get the current state of network activity for the element, from\n * the list below\n * NETWORK_EMPTY (numeric value 0)\n * NETWORK_IDLE (numeric value 1)\n * NETWORK_LOADING (numeric value 2)\n * NETWORK_NO_SOURCE (numeric value 3)\n *\n * @return {Number}\n * @method networkState\n */\n networkState() { return this.el_.networkState; }\n\n /**\n * Get a value that expresses the current state of the element\n * with respect to rendering the current playback position, from\n * the codes in the list below\n * HAVE_NOTHING (numeric value 0)\n * HAVE_METADATA (numeric value 1)\n * HAVE_CURRENT_DATA (numeric value 2)\n * HAVE_FUTURE_DATA (numeric value 3)\n * HAVE_ENOUGH_DATA (numeric value 4)\n *\n * @return {Number}\n * @method readyState\n */\n readyState() { return this.el_.readyState; }\n\n /**\n * Get width of video\n *\n * @return {Number}\n * @method videoWidth\n */\n videoWidth() { return this.el_.videoWidth; }\n\n /**\n * Get height of video\n *\n * @return {Number}\n * @method videoHeight\n */\n videoHeight() { return this.el_.videoHeight; }\n\n /**\n * Get text tracks\n *\n * @return {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n return super.textTracks();\n }\n\n /**\n * Creates and returns a text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!this['featuresNativeTextTracks']) {\n return super.addTextTrack(kind, label, language);\n }\n\n return this.el_.addTextTrack(kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options={}) {\n if (!this['featuresNativeTextTracks']) {\n return super.addRemoteTextTrack(options);\n }\n\n let htmlTrackElement = document.createElement('track');\n\n if (options.kind) {\n htmlTrackElement.kind = options.kind;\n }\n if (options.label) {\n htmlTrackElement.label = options.label;\n }\n if (options.language || options.srclang) {\n htmlTrackElement.srclang = options.language || options.srclang;\n }\n if (options.default) {\n htmlTrackElement.default = options.default;\n }\n if (options.id) {\n htmlTrackElement.id = options.id;\n }\n if (options.src) {\n htmlTrackElement.src = options.src;\n }\n\n this.el().appendChild(htmlTrackElement);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote text track from TextTrackList object\n *\n * @param {TextTrackObject} track Texttrack object to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n if (!this['featuresNativeTextTracks']) {\n return super.removeRemoteTextTrack(track);\n }\n\n let tracks, i;\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n\n tracks = this.$$('track');\n\n i = tracks.length;\n while (i--) {\n if (track === tracks[i] || track === tracks[i].track) {\n this.el().removeChild(tracks[i]);\n }\n }\n }\n\n}\n\n\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n/*\n* Element for testing browser HTML5 video capabilities\n*\n* @type {Element}\n* @constant\n* @private\n*/\nHtml5.TEST_VID = document.createElement('video');\nlet track = document.createElement('track');\ntrack.kind = 'captions';\ntrack.srclang = 'en';\ntrack.label = 'English';\nHtml5.TEST_VID.appendChild(track);\n\n/*\n * Check if HTML5 video is supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.isSupported = function(){\n // IE9 with no Media Player is a LIAR! (#984)\n try {\n Html5.TEST_VID['volume'] = 0.5;\n } catch (e) {\n return false;\n }\n\n return !!Html5.TEST_VID.canPlayType;\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Html5);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the HTML5 tech\n */\nHtml5.nativeSourceHandler = {};\n\n/*\n * Check if the video element can play the given videotype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canPlayType = function(type){\n // IE9 on Windows 7 without MediaPlayer throws an error here\n // https://github.com/videojs/video.js/issues/519\n try {\n return Html5.TEST_VID.canPlayType(type);\n } catch(e) {\n return '';\n }\n};\n\n/*\n * Check if the video element can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canHandleSource = function(source){\n var match, ext;\n\n // If a type was provided we should rely on that\n if (source.type) {\n return Html5.nativeSourceHandler.canPlayType(source.type);\n } else if (source.src) {\n // If no type, fall back to checking 'video/[EXTENSION]'\n ext = Url.getFileExtension(source.src);\n\n return Html5.nativeSourceHandler.canPlayType(`video/${ext}`);\n }\n\n return '';\n};\n\n/*\n * Pass the source to the video element\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the Html5 tech\n */\nHtml5.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n* Clean up the source handler when disposing the player or switching sources..\n* (no cleanup is needed when supporting the format natively)\n*/\nHtml5.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\n\n/*\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {Boolean}\n */\nHtml5.canControlVolume = function(){\n var volume = Html5.TEST_VID.volume;\n Html5.TEST_VID.volume = (volume / 2) + 0.1;\n return volume !== Html5.TEST_VID.volume;\n};\n\n/*\n * Check if playbackRate is supported in this browser/device.\n *\n * @return {Number} [description]\n */\nHtml5.canControlPlaybackRate = function(){\n var playbackRate = Html5.TEST_VID.playbackRate;\n Html5.TEST_VID.playbackRate = (playbackRate / 2) + 0.1;\n return playbackRate !== Html5.TEST_VID.playbackRate;\n};\n\n/*\n * Check to see if native text tracks are supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.supportsNativeTextTracks = function() {\n var supportsTextTracks;\n\n // Figure out native text track support\n // If mode is a number, we cannot change it because it'll disappear from view.\n // Browsers with numeric modes include IE10 and older (<=2013) samsung android models.\n // Firefox isn't playing nice either with modifying the mode\n // TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862\n supportsTextTracks = !!Html5.TEST_VID.textTracks;\n if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) {\n supportsTextTracks = typeof Html5.TEST_VID.textTracks[0]['mode'] !== 'number';\n }\n if (supportsTextTracks && browser.IS_FIREFOX) {\n supportsTextTracks = false;\n }\n if (supportsTextTracks && !('onremovetrack' in Html5.TEST_VID.textTracks)) {\n supportsTextTracks = false;\n }\n\n return supportsTextTracks;\n};\n\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\nHtml5.Events = [\n 'loadstart',\n 'suspend',\n 'abort',\n 'error',\n 'emptied',\n 'stalled',\n 'loadedmetadata',\n 'loadeddata',\n 'canplay',\n 'canplaythrough',\n 'playing',\n 'waiting',\n 'seeking',\n 'seeked',\n 'ended',\n 'durationchange',\n 'timeupdate',\n 'progress',\n 'play',\n 'pause',\n 'ratechange',\n 'volumechange'\n];\n\n/*\n * Set the tech's volume control support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresVolumeControl'] = Html5.canControlVolume();\n\n/*\n * Set the tech's playbackRate support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresPlaybackRate'] = Html5.canControlPlaybackRate();\n\n/*\n * Set the tech's status on moving the video element.\n * In iOS, if you move a video element in the DOM, it breaks video playback.\n *\n * @type {Boolean}\n */\nHtml5.prototype['movingMediaElementInDOM'] = !browser.IS_IOS;\n\n/*\n * Set the the tech's fullscreen resize support status.\n * HTML video is able to automatically resize when going to fullscreen.\n * (No longer appears to be used. Can probably be removed.)\n */\nHtml5.prototype['featuresFullscreenResize'] = true;\n\n/*\n * Set the tech's progress event support status\n * (this disables the manual progress events of the Tech)\n */\nHtml5.prototype['featuresProgressEvents'] = true;\n\n/*\n * Sets the tech's status on native text track support\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresNativeTextTracks'] = Html5.supportsNativeTextTracks();\n\n// HTML5 Feature detection and Device Fixes --------------------------------- //\nlet canPlayType;\nconst mpegurlRE = /^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i;\nconst mp4RE = /^video\\/mp4/i;\n\nHtml5.patchCanPlayType = function() {\n // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\n if (browser.ANDROID_VERSION >= 4.0) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type) {\n if (type && mpegurlRE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n\n // Override Android 2.2 and less canPlayType method which is broken\n if (browser.IS_OLD_ANDROID) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type){\n if (type && mp4RE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n};\n\nHtml5.unpatchCanPlayType = function() {\n var r = Html5.TEST_VID.constructor.prototype.canPlayType;\n Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\n canPlayType = null;\n return r;\n};\n\n// by default, patch the video element\nHtml5.patchCanPlayType();\n\nHtml5.disposeMediaElement = function(el){\n if (!el) { return; }\n\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n\n // remove any child track or source nodes to prevent their loading\n while(el.hasChildNodes()) {\n el.removeChild(el.firstChild);\n }\n\n // remove any src reference. not setting `src=''` because that causes a warning\n // in firefox\n el.removeAttribute('src');\n\n // force the media element to update its loading state by calling load()\n // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {\n // not supported\n }\n })();\n }\n};\n\nHtml5.resetMediaElement = function(el){\n if (!el) { return; }\n\n let sources = el.querySelectorAll('source');\n let i = sources.length;\n while (i--) {\n el.removeChild(sources[i]);\n }\n\n // remove any src reference.\n // not setting `src=''` because that throws an error\n el.removeAttribute('src');\n\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {}\n })();\n }\n};\n\nComponent.registerComponent('Html5', Html5);\nTech.registerTech('Html5', Html5);\nexport default Html5;\n", - "/**\n * @file loader.js\n */\nimport Component from '../component.js';\nimport Tech from './tech.js';\nimport window from 'global/window';\nimport toTitleCase from '../utils/to-title-case.js';\n\n/**\n * The Media Loader is the component that decides which playback technology to load\n * when the player is initialized.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class MediaLoader\n */\nclass MediaLoader extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n // If there are no sources when the player is initialized,\n // load the first supported playback technology.\n\n if (!options.playerOptions['sources'] || options.playerOptions['sources'].length === 0) {\n for (let i=0, j=options.playerOptions['techOrder']; i {\n this.trigger('vttjsloaded');\n };\n script.onerror = () => {\n this.trigger('vttjserror');\n };\n this.on('dispose', () => {\n script.onload = null;\n script.onerror = null;\n });\n this.el().parentNode.appendChild(script);\n window['WebVTT'] = true;\n }\n\n let updateDisplay = () => this.trigger('texttrackchange');\n let textTracksChanges = () => {\n updateDisplay();\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n track.removeEventListener('cuechange', updateDisplay);\n if (track.mode === 'showing') {\n track.addEventListener('cuechange', updateDisplay);\n }\n }\n };\n\n textTracksChanges();\n tracks.addEventListener('change', textTracksChanges);\n\n this.on('dispose', function() {\n tracks.removeEventListener('change', textTracksChanges);\n });\n }\n\n /*\n * Provide default methods for text tracks.\n *\n * Html5 tech overrides these.\n */\n\n /**\n * Get texttracks\n *\n * @returns {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n this.textTracks_ = this.textTracks_ || new TextTrackList();\n return this.textTracks_;\n }\n\n /**\n * Get remote texttracks\n *\n * @returns {TextTrackList}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n this.remoteTextTracks_ = this.remoteTextTracks_ || new TextTrackList();\n return this.remoteTextTracks_;\n }\n\n /**\n * Get remote htmltrackelements\n *\n * @returns {HTMLTrackElementList}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new HTMLTrackElementList();\n return this.remoteTextTrackEls_;\n }\n\n /**\n * Creates and returns a remote text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!kind) {\n throw new Error('TextTrack kind is required but was not provided');\n }\n\n return createTrackHelper(this, kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a emulated html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n let track = mergeOptions(options, {\n tech: this\n });\n\n let htmlTrackElement = new HTMLTrackElement(track);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n // must come after remoteTextTracks()\n this.textTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote texttrack\n *\n * @param {TextTrackObject} track Texttrack to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.textTracks().removeTrack_(track);\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n }\n\n /**\n * Provide a default setPoster method for techs\n * Poster support for techs should be optional, so we don't want techs to\n * break if they don't have a way to set a poster.\n *\n * @method setPoster\n */\n setPoster() {}\n\n /*\n * Check if the tech can support the given type\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n canPlayType() {\n return '';\n }\n\n /*\n * Return whether the argument is a Tech or not.\n * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n *\n * @param {Object} component An item to check\n * @return {Boolean} Whether it is a tech or not\n */\n static isTech(component) {\n return component.prototype instanceof Tech ||\n component instanceof Tech ||\n component === Tech;\n }\n\n /**\n * Registers a Tech\n *\n * @param {String} name Name of the Tech to register\n * @param {Object} tech The tech to register\n * @static\n * @method registerComponent\n */\n static registerTech(name, tech) {\n if (!Tech.techs_) {\n Tech.techs_ = {};\n }\n\n if (!Tech.isTech(tech)) {\n throw new Error(`Tech ${name} must be a Tech`);\n }\n\n Tech.techs_[name] = tech;\n return tech;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getTech(name) {\n if (Tech.techs_ && Tech.techs_[name]) {\n return Tech.techs_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`);\n return window.videojs[name];\n }\n }\n}\n\n/*\n * List of associated text tracks\n *\n * @type {Array}\n * @private\n */\nTech.prototype.textTracks_;\n\nvar createTrackHelper = function(self, kind, label, language, options={}) {\n let tracks = self.textTracks();\n\n options.kind = kind;\n\n if (label) {\n options.label = label;\n }\n if (language) {\n options.language = language;\n }\n options.tech = self;\n\n let track = new TextTrack(options);\n tracks.addTrack_(track);\n\n return track;\n};\n\nTech.prototype.featuresVolumeControl = true;\n\n// Resizing plugins using request fullscreen reloads the plugin\nTech.prototype.featuresFullscreenResize = false;\nTech.prototype.featuresPlaybackRate = false;\n\n// Optional events that we can manually mimic with timers\n// currently not triggered by video-js-swf\nTech.prototype.featuresProgressEvents = false;\nTech.prototype.featuresTimeupdateEvents = false;\n\nTech.prototype.featuresNativeTextTracks = false;\n\n/*\n * A functional mixin for techs that want to use the Source Handler pattern.\n *\n * ##### EXAMPLE:\n *\n * Tech.withSourceHandlers.call(MyTech);\n *\n */\nTech.withSourceHandlers = function(_Tech){\n /*\n * Register a source handler\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * @param {Function} handler The source handler\n * @param {Boolean} first Register it before any existing handlers\n */\n _Tech.registerSourceHandler = function(handler, index){\n let handlers = _Tech.sourceHandlers;\n\n if (!handlers) {\n handlers = _Tech.sourceHandlers = [];\n }\n\n if (index === undefined) {\n // add to the end of the list\n index = handlers.length;\n }\n\n handlers.splice(index, 0, handler);\n };\n\n /*\n * Check if the tech can support the given type\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlayType = function(type){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n\n return '';\n };\n\n /*\n * Return the first source handler that supports the source\n * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n * @param {Object} source The source object\n * @returns {Object} The first source handler that supports the source\n * @returns {null} Null if no source handler is found\n */\n _Tech.selectSourceHandler = function(source){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canHandleSource(source);\n\n if (can) {\n return handlers[i];\n }\n }\n\n return null;\n };\n\n /*\n * Check if the tech can support the given source\n * @param {Object} srcObj The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlaySource = function(srcObj){\n let sh = _Tech.selectSourceHandler(srcObj);\n\n if (sh) {\n return sh.canHandleSource(srcObj);\n }\n\n return '';\n };\n\n /*\n * When using a source handler, prefer its implementation of\n * any function normally provided by the tech.\n */\n let deferrable = [\n 'seekable',\n 'duration'\n ];\n\n deferrable.forEach(function (fnName) {\n let originalFn = this[fnName];\n\n if (typeof originalFn !== 'function') {\n return;\n }\n\n this[fnName] = function() {\n if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n }\n return originalFn.apply(this, arguments);\n };\n }, _Tech.prototype);\n\n /*\n * Create a function for setting the source using a source object\n * and source handlers.\n * Should never be called unless a source handler was found.\n * @param {Object} source A source object with src and type keys\n * @return {Tech} self\n */\n _Tech.prototype.setSource = function(source){\n let sh = _Tech.selectSourceHandler(source);\n\n if (!sh) {\n // Fall back to a native source hander when unsupported sources are\n // deliberately set\n if (_Tech.nativeSourceHandler) {\n sh = _Tech.nativeSourceHandler;\n } else {\n log.error('No source hander found for the current source.');\n }\n }\n\n // Dispose any existing source handler\n this.disposeSourceHandler();\n this.off('dispose', this.disposeSourceHandler);\n\n this.currentSource_ = source;\n this.sourceHandler_ = sh.handleSource(source, this);\n this.on('dispose', this.disposeSourceHandler);\n\n return this;\n };\n\n /*\n * Clean up any existing source handler\n */\n _Tech.prototype.disposeSourceHandler = function(){\n if (this.sourceHandler_ && this.sourceHandler_.dispose) {\n this.sourceHandler_.dispose();\n }\n };\n\n};\n\nComponent.registerComponent('Tech', Tech);\n// Old name for Tech\nComponent.registerComponent('MediaTechController', Tech);\nTech.registerTech('Tech', Tech);\nexport default Tech;\n", - "/**\n * @file html-track-element-list.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\nclass HtmlTrackElementList {\n constructor(trackElements = []) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in HtmlTrackElementList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = HtmlTrackElementList.prototype[prop];\n }\n }\n }\n\n list.trackElements_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.trackElements_.length;\n }\n });\n\n for (let i = 0, length = trackElements.length; i < length; i++) {\n list.addTrackElement_(trackElements[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n addTrackElement_(trackElement) {\n this.trackElements_.push(trackElement);\n }\n\n getTrackElementByTrack_(track) {\n let trackElement_;\n\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (track === this.trackElements_[i].track) {\n trackElement_ = this.trackElements_[i];\n\n break;\n }\n }\n\n return trackElement_;\n }\n\n removeTrackElement_(trackElement) {\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (trackElement === this.trackElements_[i]) {\n this.trackElements_.splice(i, 1);\n\n break;\n }\n }\n }\n}\n\nexport default HtmlTrackElementList;\n", - "/**\n * @file html-track-element.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport EventTarget from '../event-target';\nimport TextTrack from '../tracks/text-track';\n\nconst NONE = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst ERROR = 3;\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement\n *\n * interface HTMLTrackElement : HTMLElement {\n * attribute DOMString kind;\n * attribute DOMString src;\n * attribute DOMString srclang;\n * attribute DOMString label;\n * attribute boolean default;\n *\n * const unsigned short NONE = 0;\n * const unsigned short LOADING = 1;\n * const unsigned short LOADED = 2;\n * const unsigned short ERROR = 3;\n * readonly attribute unsigned short readyState;\n *\n * readonly attribute TextTrack track;\n * };\n *\n * @param {Object} options TextTrack configuration\n * @class HTMLTrackElement\n */\n\nclass HTMLTrackElement extends EventTarget {\n constructor(options = {}) {\n super();\n\n let readyState,\n trackElement = this;\n\n if (browser.IS_IE8) {\n trackElement = document.createElement('custom');\n\n for (let prop in HTMLTrackElement.prototype) {\n if (prop !== 'constructor') {\n trackElement[prop] = HTMLTrackElement.prototype[prop];\n }\n }\n }\n\n let track = new TextTrack(options);\n\n trackElement.kind = track.kind;\n trackElement.src = track.src;\n trackElement.srclang = track.language;\n trackElement.label = track.label;\n trackElement.default = track.default;\n\n Object.defineProperty(trackElement, 'readyState', {\n get() {\n return readyState;\n }\n });\n\n Object.defineProperty(trackElement, 'track', {\n get() {\n return track;\n }\n });\n\n readyState = NONE;\n\n track.addEventListener('loadeddata', function() {\n readyState = LOADED;\n\n trackElement.trigger({\n type: 'load',\n target: trackElement\n });\n });\n\n if (browser.IS_IE8) {\n return trackElement;\n }\n }\n}\n\nHTMLTrackElement.prototype.allowedEvents_ = {\n load: 'load'\n};\n\nHTMLTrackElement.NONE = NONE;\nHTMLTrackElement.LOADING = LOADING;\nHTMLTrackElement.LOADED = LOADED;\nHTMLTrackElement.ERROR = ERROR;\n\nexport default HTMLTrackElement;\n", - "/**\n * @file text-track-cue-list.js\n */\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A List of text track cues as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist\n *\n * interface TextTrackCueList {\n * readonly attribute unsigned long length;\n * getter TextTrackCue (unsigned long index);\n * TextTrackCue? getCueById(DOMString id);\n * };\n *\n * @param {Array} cues A list of cues to be initialized with\n * @class TextTrackCueList\n */\n\nclass TextTrackCueList {\n constructor(cues) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackCueList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackCueList.prototype[prop];\n }\n }\n }\n\n TextTrackCueList.prototype.setCues_.call(list, cues);\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.length_;\n }\n });\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * A setter for cues in this list\n *\n * @param {Array} cues an array of cues\n * @method setCues_\n * @private\n */\n setCues_(cues) {\n let oldLength = this.length || 0;\n let i = 0;\n let l = cues.length;\n\n this.cues_ = cues;\n this.length_ = cues.length;\n\n let defineProp = function(index) {\n if (!('' + index in this)) {\n Object.defineProperty(this, '' + index, {\n get() {\n return this.cues_[index];\n }\n });\n }\n };\n\n if (oldLength < l) {\n i = oldLength;\n\n for (; i < l; i++) {\n defineProp.call(this, i);\n }\n }\n }\n\n /**\n * Get a cue that is currently in the Cue list by id\n *\n * @param {String} id\n * @method getCueById\n * @return {Object} a single cue\n */\n getCueById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let cue = this[i];\n\n if (cue.id === id) {\n result = cue;\n break;\n }\n }\n\n return result;\n }\n}\n\nexport default TextTrackCueList;\n", - "/**\n * @file text-track-display.js\n */\nimport Component from '../component';\nimport Menu from '../menu/menu.js';\nimport MenuItem from '../menu/menu-item.js';\nimport MenuButton from '../menu/menu-button.js';\nimport * as Fn from '../utils/fn.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst darkGray = '#222';\nconst lightGray = '#ccc';\nconst fontMap = {\n monospace: 'monospace',\n sansSerif: 'sans-serif',\n serif: 'serif',\n monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n monospaceSerif: '\"Courier New\", monospace',\n proportionalSansSerif: 'sans-serif',\n proportionalSerif: 'serif',\n casual: '\"Comic Sans MS\", Impact, fantasy',\n script: '\"Monotype Corsiva\", cursive',\n smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n\n/**\n * The component for displaying text track cues\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class TextTrackDisplay\n */\nclass TextTrackDisplay extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n player.on('loadstart', Fn.bind(this, this.toggleDisplay));\n player.on('texttrackchange', Fn.bind(this, this.updateDisplay));\n\n // This used to be called during player init, but was causing an error\n // if a track should show by default and the display hadn't loaded yet.\n // Should probably be moved to an external track loader when we support\n // tracks that don't need a display.\n player.ready(Fn.bind(this, function() {\n if (player.tech_ && player.tech_['featuresNativeTextTracks']) {\n this.hide();\n return;\n }\n\n player.on('fullscreenchange', Fn.bind(this, this.updateDisplay));\n\n let tracks = this.options_.playerOptions['tracks'] || [];\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n this.player_.addRemoteTextTrack(track);\n }\n }));\n }\n\n /**\n * Toggle display texttracks\n *\n * @method toggleDisplay\n */\n toggleDisplay() {\n if (this.player_.tech_ && this.player_.tech_['featuresNativeTextTracks']) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-text-track-display'\n }, {\n 'aria-live': 'assertive',\n 'aria-atomic': 'true'\n });\n }\n\n /**\n * Clear display texttracks\n *\n * @method clearDisplay\n */\n clearDisplay() {\n if (typeof window['WebVTT'] === 'function') {\n window['WebVTT']['processCues'](window, [], this.el_);\n }\n }\n\n /**\n * Update display texttracks\n *\n * @method updateDisplay\n */\n updateDisplay() {\n var tracks = this.player_.textTracks();\n\n this.clearDisplay();\n\n if (!tracks) {\n return;\n }\n\n // Track display prioritization model: if multiple tracks are 'showing',\n // display the first 'subtitles' or 'captions' track which is 'showing',\n // otherwise display the first 'descriptions' track which is 'showing'\n\n let descriptionsTrack = null;\n let captionsSubtitlesTrack = null;\n\n let i = tracks.length;\n while (i--) {\n let track = tracks[i];\n if (track['mode'] === 'showing') {\n if (track['kind'] === 'descriptions') {\n descriptionsTrack = track;\n } else {\n captionsSubtitlesTrack = track;\n }\n }\n }\n\n if (captionsSubtitlesTrack) {\n this.updateForTrack(captionsSubtitlesTrack);\n } else if (descriptionsTrack) {\n this.updateForTrack(descriptionsTrack);\n }\n }\n\n /**\n * Add texttrack to texttrack list\n *\n * @param {TextTrackObject} track Texttrack object to be added to list\n * @method updateForTrack\n */\n updateForTrack(track) {\n if (typeof window['WebVTT'] !== 'function' || !track['activeCues']) {\n return;\n }\n\n let overrides = this.player_['textTrackSettings'].getValues();\n\n let cues = [];\n for (let i = 0; i < track['activeCues'].length; i++) {\n cues.push(track['activeCues'][i]);\n }\n\n window['WebVTT']['processCues'](window, cues, this.el_);\n\n let i = cues.length;\n while (i--) {\n let cue = cues[i];\n if (!cue) {\n continue;\n }\n\n let cueDiv = cue.displayState;\n if (overrides.color) {\n cueDiv.firstChild.style.color = overrides.color;\n }\n if (overrides.textOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'color',\n constructColor(overrides.color || '#fff',\n overrides.textOpacity));\n }\n if (overrides.backgroundColor) {\n cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n }\n if (overrides.backgroundOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'backgroundColor',\n constructColor(overrides.backgroundColor || '#000',\n overrides.backgroundOpacity));\n }\n if (overrides.windowColor) {\n if (overrides.windowOpacity) {\n tryUpdateStyle(cueDiv,\n 'backgroundColor',\n constructColor(overrides.windowColor, overrides.windowOpacity));\n } else {\n cueDiv.style.backgroundColor = overrides.windowColor;\n }\n }\n if (overrides.edgeStyle) {\n if (overrides.edgeStyle === 'dropshadow') {\n cueDiv.firstChild.style.textShadow = `2px 2px 3px ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n } else if (overrides.edgeStyle === 'raised') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n } else if (overrides.edgeStyle === 'depressed') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n } else if (overrides.edgeStyle === 'uniform') {\n cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n }\n }\n if (overrides.fontPercent && overrides.fontPercent !== 1) {\n const fontSize = window.parseFloat(cueDiv.style.fontSize);\n cueDiv.style.fontSize = (fontSize * overrides.fontPercent) + 'px';\n cueDiv.style.height = 'auto';\n cueDiv.style.top = 'auto';\n cueDiv.style.bottom = '2px';\n }\n if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n if (overrides.fontFamily === 'small-caps') {\n cueDiv.firstChild.style.fontVariant = 'small-caps';\n } else {\n cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n }\n }\n }\n }\n\n}\n\n/**\n* Add cue HTML to display\n*\n* @param {Number} color Hex number for color, like #f0e\n* @param {Number} opacity Value for opacity,0.0 - 1.0\n* @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)'\n* @method constructColor\n*/\nfunction constructColor(color, opacity) {\n return 'rgba(' +\n // color looks like \"#f0e\"\n parseInt(color[1] + color[1], 16) + ',' +\n parseInt(color[2] + color[2], 16) + ',' +\n parseInt(color[3] + color[3], 16) + ',' +\n opacity + ')';\n}\n\n/**\n * Try to update style\n * Some style changes will throw an error, particularly in IE8. Those should be noops.\n *\n * @param {Element} el The element to be styles\n * @param {CSSProperty} style The CSS property to be styled\n * @param {CSSStyle} rule The actual style to be applied to the property\n * @method tryUpdateStyle\n */\nfunction tryUpdateStyle(el, style, rule) {\n //\n try {\n el.style[style] = rule;\n } catch (e) {}\n}\n\nComponent.registerComponent('TextTrackDisplay', TextTrackDisplay);\nexport default TextTrackDisplay;\n", - "/**\n * @file text-track-enums.js\n */\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n *\n * enum TextTrackMode { \"disabled\", \"hidden\", \"showing\" };\n */\nconst TextTrackMode = {\n disabled: 'disabled',\n hidden: 'hidden',\n showing: 'showing'\n};\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind\n *\n * enum TextTrackKind {\n * \"subtitles\",\n * \"captions\",\n * \"descriptions\",\n * \"chapters\",\n * \"metadata\"\n * };\n */\nconst TextTrackKind = {\n subtitles: 'subtitles',\n captions: 'captions',\n descriptions: 'descriptions',\n chapters: 'chapters',\n metadata: 'metadata'\n};\n\n/* jshint ignore:start */\n// we ignore jshint here because it does not see\n// TextTrackMode or TextTrackKind as defined here somehow...\nexport { TextTrackMode, TextTrackKind };\n/* jshint ignore:end */\n", - "/**\n * Utilities for capturing text track state and re-creating tracks\n * based on a capture.\n *\n * @file text-track-list-converter.js\n */\n\n/**\n * Examine a single text track and return a JSON-compatible javascript\n * object that represents the text track's state.\n * @param track {TextTrackObject} the text track to query\n * @return {Object} a serializable javascript representation of the\n * @private\n */\nlet trackToJson_ = function(track) {\n let ret = ['kind', 'label', 'language', 'id',\n 'inBandMetadataTrackDispatchType',\n 'mode', 'src'].reduce((acc, prop, i) => {\n if (track[prop]) {\n acc[prop] = track[prop];\n }\n \n return acc;\n }, {\n cues: track.cues && Array.prototype.map.call(track.cues, function(cue) {\n return {\n startTime: cue.startTime,\n endTime: cue.endTime,\n text: cue.text,\n id: cue.id\n };\n })\n });\n\n return ret;\n};\n\n/**\n * Examine a tech and return a JSON-compatible javascript array that\n * represents the state of all text tracks currently configured. The\n * return array is compatible with `jsonToTextTracks`.\n * @param tech {tech} the tech object to query\n * @return {Array} a serializable javascript representation of the\n * @function textTracksToJson\n */\nlet textTracksToJson = function(tech) {\n\n let trackEls = tech.$$('track');\n\n let trackObjs = Array.prototype.map.call(trackEls, (t) => t.track);\n let tracks = Array.prototype.map.call(trackEls, function(trackEl) {\n let json = trackToJson_(trackEl.track);\n if (trackEl.src) {\n json.src = trackEl.src;\n }\n return json;\n });\n\n return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function(track) {\n return trackObjs.indexOf(track) === -1;\n }).map(trackToJson_));\n};\n\n/**\n * Creates a set of remote text tracks on a tech based on an array of\n * javascript text track representations.\n * @param json {Array} an array of text track representation objects,\n * like those that would be produced by `textTracksToJson`\n * @param tech {tech} the tech to create text tracks on\n * @function jsonToTextTracks\n */\nlet jsonToTextTracks = function(json, tech) {\n json.forEach(function(track) {\n let addedTrack = tech.addRemoteTextTrack(track).track;\n if (!track.src && track.cues) {\n track.cues.forEach((cue) => addedTrack.addCue(cue));\n }\n });\n\n return tech.textTracks();\n};\n\nexport default {textTracksToJson, jsonToTextTracks, trackToJson_};\n", - "/**\n * @file text-track-list.js\n */\nimport EventTarget from '../event-target';\nimport * as Fn from '../utils/fn.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A text track list as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist\n *\n * interface TextTrackList : EventTarget {\n * readonly attribute unsigned long length;\n * getter TextTrack (unsigned long index);\n * TextTrack? getTrackById(DOMString id);\n *\n * attribute EventHandler onchange;\n * attribute EventHandler onaddtrack;\n * attribute EventHandler onremovetrack;\n * };\n *\n * @param {Track[]} tracks A list of tracks to initialize the list with\n * @extends EventTarget\n * @class TextTrackList\n */\n\nclass TextTrackList extends EventTarget {\n constructor(tracks = []) {\n super();\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackList.prototype[prop];\n }\n }\n }\n\n list.tracks_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.tracks_.length;\n }\n });\n\n for (let i = 0; i < tracks.length; i++) {\n list.addTrack_(tracks[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * Add TextTrack from TextTrackList\n *\n * @param {TextTrack} track\n * @method addTrack_\n * @private\n */\n addTrack_(track) {\n let index = this.tracks_.length;\n\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get() {\n return this.tracks_[index];\n }\n });\n }\n\n track.addEventListener('modechange', Fn.bind(this, function() {\n this.trigger('change');\n }));\n\n // Do not add duplicate tracks\n if (this.tracks_.indexOf(track) === -1) {\n this.tracks_.push(track);\n this.trigger({\n track,\n type: 'addtrack'\n });\n }\n\n }\n\n /**\n * Remove TextTrack from TextTrackList\n * NOTE: Be mindful of what is passed in as it may be a HTMLTrackElement\n *\n * @param {TextTrack} rtrack\n * @method removeTrack_\n * @private\n */\n removeTrack_(rtrack) {\n let track;\n\n for (let i = 0, l = this.length; i < l; i++) {\n if (this[i] === rtrack) {\n track = this[i];\n if (track.off) {\n track.off();\n }\n\n this.tracks_.splice(i, 1);\n\n break;\n }\n }\n\n if (!track) {\n return;\n }\n\n this.trigger({\n track,\n type: 'removetrack'\n });\n }\n\n /**\n * Get a TextTrack from TextTrackList by a tracks id\n *\n * @param {String} id - the id of the track to get\n * @method getTrackById\n * @return {TextTrack}\n * @private\n */\n getTrackById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let track = this[i];\n\n if (track.id === id) {\n result = track;\n break;\n }\n }\n\n return result;\n }\n}\n\n/**\n * change - One or more tracks in the track list have been enabled or disabled.\n * addtrack - A track has been added to the track list.\n * removetrack - A track has been removed from the track list.\n */\nTextTrackList.prototype.allowedEvents_ = {\n change: 'change',\n addtrack: 'addtrack',\n removetrack: 'removetrack'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (let event in TextTrackList.prototype.allowedEvents_) {\n TextTrackList.prototype['on' + event] = null;\n}\n\nexport default TextTrackList;\n", - "/**\n * @file text-track-settings.js\n */\nimport Component from '../component';\nimport * as Events from '../utils/events.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport window from 'global/window';\n\n/**\n * Manipulate settings of texttracks\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class TextTrackSettings\n */\nclass TextTrackSettings extends Component {\n\n constructor(player, options) {\n super(player, options);\n this.hide();\n\n // Grab `persistTextTrackSettings` from the player options if not passed in child options\n if (options.persistTextTrackSettings === undefined) {\n this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n }\n\n Events.on(this.$('.vjs-done-button'), 'click', Fn.bind(this, function() {\n this.saveSettings();\n this.hide();\n }));\n\n Events.on(this.$('.vjs-default-button'), 'click', Fn.bind(this, function() {\n this.$('.vjs-fg-color > select').selectedIndex = 0;\n this.$('.vjs-bg-color > select').selectedIndex = 0;\n this.$('.window-color > select').selectedIndex = 0;\n this.$('.vjs-text-opacity > select').selectedIndex = 0;\n this.$('.vjs-bg-opacity > select').selectedIndex = 0;\n this.$('.vjs-window-opacity > select').selectedIndex = 0;\n this.$('.vjs-edge-style select').selectedIndex = 0;\n this.$('.vjs-font-family select').selectedIndex = 0;\n this.$('.vjs-font-percent select').selectedIndex = 2;\n this.updateDisplay();\n }));\n\n Events.on(this.$('.vjs-fg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.window-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-text-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-window-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-percent select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-edge-style select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-family select'), 'change', Fn.bind(this, this.updateDisplay));\n\n if (this.options_.persistTextTrackSettings) {\n this.restoreSettings();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-caption-settings vjs-modal-overlay',\n innerHTML: captionOptionsMenuTemplate()\n });\n }\n\n /**\n * Get texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @return {Object}\n * @method getValues\n */\n getValues() {\n const textEdge = getSelectedOptionValue(this.$('.vjs-edge-style select'));\n const fontFamily = getSelectedOptionValue(this.$('.vjs-font-family select'));\n const fgColor = getSelectedOptionValue(this.$('.vjs-fg-color > select'));\n const textOpacity = getSelectedOptionValue(this.$('.vjs-text-opacity > select'));\n const bgColor = getSelectedOptionValue(this.$('.vjs-bg-color > select'));\n const bgOpacity = getSelectedOptionValue(this.$('.vjs-bg-opacity > select'));\n const windowColor = getSelectedOptionValue(this.$('.window-color > select'));\n const windowOpacity = getSelectedOptionValue(this.$('.vjs-window-opacity > select'));\n const fontPercent = window['parseFloat'](getSelectedOptionValue(this.$('.vjs-font-percent > select')));\n\n let result = {\n 'backgroundOpacity': bgOpacity,\n 'textOpacity': textOpacity,\n 'windowOpacity': windowOpacity,\n 'edgeStyle': textEdge,\n 'fontFamily': fontFamily,\n 'color': fgColor,\n 'backgroundColor': bgColor,\n 'windowColor': windowColor,\n 'fontPercent': fontPercent\n };\n for (let name in result) {\n if (result[name] === '' || result[name] === 'none' || (name === 'fontPercent' && result[name] === 1.00)) {\n delete result[name];\n }\n }\n return result;\n }\n\n /**\n * Set texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @param {Object} values Object with texttrack setting values\n * @method setValues\n */\n setValues(values) {\n setSelectedOption(this.$('.vjs-edge-style select'), values.edgeStyle);\n setSelectedOption(this.$('.vjs-font-family select'), values.fontFamily);\n setSelectedOption(this.$('.vjs-fg-color > select'), values.color);\n setSelectedOption(this.$('.vjs-text-opacity > select'), values.textOpacity);\n setSelectedOption(this.$('.vjs-bg-color > select'), values.backgroundColor);\n setSelectedOption(this.$('.vjs-bg-opacity > select'), values.backgroundOpacity);\n setSelectedOption(this.$('.window-color > select'), values.windowColor);\n setSelectedOption(this.$('.vjs-window-opacity > select'), values.windowOpacity);\n\n let fontPercent = values.fontPercent;\n\n if (fontPercent) {\n fontPercent = fontPercent.toFixed(2);\n }\n\n setSelectedOption(this.$('.vjs-font-percent > select'), fontPercent);\n }\n\n /**\n * Restore texttrack settings\n *\n * @method restoreSettings\n */\n restoreSettings() {\n let err, values;\n\n try {\n [err, values] = safeParseTuple(window.localStorage.getItem('vjs-text-track-settings'));\n\n if (err) {\n log.error(err);\n }\n } catch (e) {\n log.warn(e);\n }\n\n if (values) {\n this.setValues(values);\n }\n }\n\n /**\n * Save texttrack settings to local storage\n *\n * @method saveSettings\n */\n saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n\n let values = this.getValues();\n try {\n if (Object.getOwnPropertyNames(values).length > 0) {\n window.localStorage.setItem('vjs-text-track-settings', JSON.stringify(values));\n } else {\n window.localStorage.removeItem('vjs-text-track-settings');\n }\n } catch (e) {\n log.warn(e);\n }\n }\n\n /**\n * Update display of texttrack settings\n *\n * @method updateDisplay\n */\n updateDisplay() {\n let ttDisplay = this.player_.getChild('textTrackDisplay');\n if (ttDisplay) {\n ttDisplay.updateDisplay();\n }\n }\n\n}\n\nComponent.registerComponent('TextTrackSettings', TextTrackSettings);\n\nfunction getSelectedOptionValue(target) {\n let selectedOption;\n // not all browsers support selectedOptions, so, fallback to options\n if (target.selectedOptions) {\n selectedOption = target.selectedOptions[0];\n } else if (target.options) {\n selectedOption = target.options[target.options.selectedIndex];\n }\n\n return selectedOption.value;\n}\n\nfunction setSelectedOption(target, value) {\n if (!value) {\n return;\n }\n\n let i;\n for (i = 0; i < target.options.length; i++) {\n const option = target.options[i];\n if (option.value === value) {\n break;\n }\n }\n\n target.selectedIndex = i;\n}\n\nfunction captionOptionsMenuTemplate() {\n let template = `
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    `;\n\n return template;\n}\n\nexport default TextTrackSettings;\n", - "/**\n * @file text-track.js\n */\nimport TextTrackCueList from './text-track-cue-list';\nimport * as Fn from '../utils/fn.js';\nimport * as Guid from '../utils/guid.js';\nimport * as browser from '../utils/browser.js';\nimport * as TextTrackEnum from './text-track-enums';\nimport log from '../utils/log.js';\nimport EventTarget from '../event-target';\nimport document from 'global/document';\nimport window from 'global/window';\nimport { isCrossOrigin } from '../utils/url.js';\nimport XHR from 'xhr';\n\n/**\n * takes a webvtt file contents and parses it into cues\n *\n * @param {String} srcContent webVTT file contents\n * @param {Track} track track to addcues to\n */\nconst parseCues = function(srcContent, track) {\n let parser = new window.WebVTT.Parser(window,\n window.vttjs,\n window.WebVTT.StringDecoder());\n\n parser.oncue = function(cue) {\n track.addCue(cue);\n };\n\n parser.onparsingerror = function(error) {\n log.error(error);\n };\n\n parser.onflush = function() {\n track.trigger({\n type: 'loadeddata',\n target: track\n });\n };\n\n parser.parse(srcContent);\n parser.flush();\n};\n\n\n/**\n * load a track from a specifed url\n *\n * @param {String} src url to load track from\n * @param {Track} track track to addcues to\n */\nconst loadTrack = function(src, track) {\n let opts = {\n uri: src\n };\n let crossOrigin = isCrossOrigin(src);\n\n if (crossOrigin) {\n opts.cors = crossOrigin;\n }\n\n XHR(opts, Fn.bind(this, function(err, response, responseBody) {\n if (err) {\n return log.error(err, response);\n }\n\n track.loaded_ = true;\n\n // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n // NOTE: this is only used for the alt/video.novtt.js build\n if (typeof window.WebVTT !== 'function') {\n if (track.tech_) {\n let loadHandler = () => parseCues(responseBody, track);\n track.tech_.on('vttjsloaded', loadHandler);\n track.tech_.on('vttjserror', () => {\n log.error(`vttjs failed to load, stopping trying to process ${track.src}`);\n track.tech_.off('vttjsloaded', loadHandler);\n });\n\n }\n } else {\n parseCues(responseBody, track);\n }\n\n }));\n};\n\n/**\n * A single text track as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack\n *\n * interface TextTrack : EventTarget {\n * readonly attribute TextTrackKind kind;\n * readonly attribute DOMString label;\n * readonly attribute DOMString language;\n *\n * readonly attribute DOMString id;\n * readonly attribute DOMString inBandMetadataTrackDispatchType;\n *\n * attribute TextTrackMode mode;\n *\n * readonly attribute TextTrackCueList? cues;\n * readonly attribute TextTrackCueList? activeCues;\n *\n * void addCue(TextTrackCue cue);\n * void removeCue(TextTrackCue cue);\n *\n * attribute EventHandler oncuechange;\n * };\n *\n * @param {Object=} options Object of option names and values\n * @extends EventTarget\n * @class TextTrack\n */\nclass TextTrack extends EventTarget {\n constructor(options = {}) {\n super();\n if (!options.tech) {\n throw new Error('A tech was not provided.');\n }\n\n let tt = this;\n\n if (browser.IS_IE8) {\n tt = document.createElement('custom');\n\n for (let prop in TextTrack.prototype) {\n if (prop !== 'constructor') {\n tt[prop] = TextTrack.prototype[prop];\n }\n }\n }\n\n tt.tech_ = options.tech;\n\n let mode = TextTrackEnum.TextTrackMode[options.mode] || 'disabled';\n let kind = TextTrackEnum.TextTrackKind[options.kind] || 'subtitles';\n let label = options.label || '';\n let language = options.language || options.srclang || '';\n let id = options.id || 'vjs_text_track_' + Guid.newGUID();\n\n if (kind === 'metadata' || kind === 'chapters') {\n mode = 'hidden';\n }\n\n tt.cues_ = [];\n tt.activeCues_ = [];\n\n let cues = new TextTrackCueList(tt.cues_);\n let activeCues = new TextTrackCueList(tt.activeCues_);\n let changed = false;\n let timeupdateHandler = Fn.bind(tt, function() {\n this.activeCues;\n if (changed) {\n this.trigger('cuechange');\n changed = false;\n }\n });\n\n if (mode !== 'disabled') {\n tt.tech_.on('timeupdate', timeupdateHandler);\n }\n\n Object.defineProperty(tt, 'kind', {\n get() {\n return kind;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'label', {\n get() {\n return label;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'language', {\n get() {\n return language;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'id', {\n get() {\n return id;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'mode', {\n get() {\n return mode;\n },\n set(newMode) {\n if (!TextTrackEnum.TextTrackMode[newMode]) {\n return;\n }\n mode = newMode;\n if (mode === 'showing') {\n this.tech_.on('timeupdate', timeupdateHandler);\n }\n this.trigger('modechange');\n }\n });\n\n Object.defineProperty(tt, 'cues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n return cues;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'activeCues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n // nothing to do\n if (this.cues.length === 0) {\n return activeCues;\n }\n\n let ct = this.tech_.currentTime();\n let active = [];\n\n for (let i = 0, l = this.cues.length; i < l; i++) {\n let cue = this.cues[i];\n\n if (cue.startTime <= ct && cue.endTime >= ct) {\n active.push(cue);\n } else if (cue.startTime === cue.endTime &&\n cue.startTime <= ct &&\n cue.startTime + 0.5 >= ct) {\n active.push(cue);\n }\n }\n\n changed = false;\n\n if (active.length !== this.activeCues_.length) {\n changed = true;\n } else {\n for (let i = 0; i < active.length; i++) {\n if (this.activeCues_.indexOf(active[i]) === -1) {\n changed = true;\n }\n }\n }\n\n this.activeCues_ = active;\n activeCues.setCues_(this.activeCues_);\n\n return activeCues;\n },\n set() {}\n });\n\n if (options.src) {\n tt.src = options.src;\n loadTrack(options.src, tt);\n } else {\n tt.loaded_ = true;\n }\n\n if (browser.IS_IE8) {\n return tt;\n }\n }\n\n /**\n * add a cue to the internal list of cues\n *\n * @param {Object} cue the cue to add to our internal list\n * @method addCue\n */\n addCue(cue) {\n let tracks = this.tech_.textTracks();\n\n if (tracks) {\n for (let i = 0; i < tracks.length; i++) {\n if (tracks[i] !== this) {\n tracks[i].removeCue(cue);\n }\n }\n }\n\n this.cues_.push(cue);\n this.cues.setCues_(this.cues_);\n }\n\n /**\n * remvoe a cue from our internal list\n *\n * @param {Object} removeCue the cue to remove from our internal list\n * @method removeCue\n */\n removeCue(removeCue) {\n let removed = false;\n\n for (let i = 0, l = this.cues_.length; i < l; i++) {\n let cue = this.cues_[i];\n\n if (cue === removeCue) {\n this.cues_.splice(i, 1);\n removed = true;\n }\n }\n\n if (removed) {\n this.cues.setCues_(this.cues_);\n }\n }\n}\n\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n */\nTextTrack.prototype.allowedEvents_ = {\n cuechange: 'cuechange'\n};\n\nexport default TextTrack;\n", - "/**\n * @file browser.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst USER_AGENT = window.navigator.userAgent;\nconst webkitVersionMap = (/AppleWebKit\\/([\\d.]+)/i).exec(USER_AGENT);\nconst appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\n\n/*\n * Device is an iPhone\n *\n * @type {Boolean}\n * @constant\n * @private\n */\nexport const IS_IPAD = (/iPad/i).test(USER_AGENT);\n\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\nexport const IS_IPHONE = (/iPhone/i).test(USER_AGENT) && !IS_IPAD;\nexport const IS_IPOD = (/iPod/i).test(USER_AGENT);\nexport const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\nexport const IOS_VERSION = (function(){\n var match = USER_AGENT.match(/OS (\\d+)_/i);\n if (match && match[1]) { return match[1]; }\n})();\n\nexport const IS_ANDROID = (/Android/i).test(USER_AGENT);\nexport const ANDROID_VERSION = (function() {\n // This matches Android Major.Minor.Patch versions\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i),\n major,\n minor;\n\n if (!match) {\n return null;\n }\n\n major = match[1] && parseFloat(match[1]);\n minor = match[2] && parseFloat(match[2]);\n\n if (major && minor) {\n return parseFloat(match[1] + '.' + match[2]);\n } else if (major) {\n return major;\n } else {\n return null;\n }\n})();\n// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser\nexport const IS_OLD_ANDROID = IS_ANDROID && (/webkit/i).test(USER_AGENT) && ANDROID_VERSION < 2.3;\nexport const IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\n\nexport const IS_FIREFOX = (/Firefox/i).test(USER_AGENT);\nexport const IS_CHROME = (/Chrome/i).test(USER_AGENT);\nexport const IS_IE8 = (/MSIE\\s8\\.0/).test(USER_AGENT);\n\nexport const TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);\nexport const BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in document.createElement('video').style;\n", - "/**\n * @file buffer.js\n */\nimport { createTimeRange } from './time-ranges.js';\n\n/**\n * Compute how much your video has been buffered\n *\n * @param {Object} Buffered object\n * @param {Number} Total duration\n * @return {Number} Percent buffered of the total duration\n * @private\n * @function bufferedPercent\n */\nexport function bufferedPercent(buffered, duration) {\n var bufferedDuration = 0,\n start, end;\n\n if (!duration) {\n return 0;\n }\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0, 0);\n }\n\n for (let i = 0; i < buffered.length; i++){\n start = buffered.start(i);\n end = buffered.end(i);\n\n // buffered end can be bigger than duration by a very small fraction\n if (end > duration) {\n end = duration;\n }\n\n bufferedDuration += end - start;\n }\n\n return bufferedDuration / duration;\n}\n", - "import log from './log.js';\n\n/**\n * Object containing the default behaviors for available handler methods.\n *\n * @private\n * @type {Object}\n */\nconst defaultBehaviors = {\n get(obj, key) {\n return obj[key];\n },\n set(obj, key, value) {\n obj[key] = value;\n return true;\n }\n};\n\n/**\n * Expose private objects publicly using a Proxy to log deprecation warnings.\n *\n * Browsers that do not support Proxy objects will simply return the `target`\n * object, so it can be directly exposed.\n *\n * @param {Object} target The target object.\n * @param {Object} messages Messages to display from a Proxy. Only operations\n * with an associated message will be proxied.\n * @param {String} [messages.get]\n * @param {String} [messages.set]\n * @return {Object} A Proxy if supported or the `target` argument.\n */\nexport default (target, messages={}) => {\n if (typeof Proxy === 'function') {\n let handler = {};\n\n // Build a handler object based on those keys that have both messages\n // and default behaviors.\n Object.keys(messages).forEach(key => {\n if (defaultBehaviors.hasOwnProperty(key)) {\n handler[key] = function() {\n log.warn(messages[key]);\n return defaultBehaviors[key].apply(this, arguments);\n };\n }\n });\n\n return new Proxy(target, handler);\n }\n return target;\n};\n", - "/**\n * @file dom.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Guid from './guid.js';\nimport log from './log.js';\nimport tsml from 'tsml';\n\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction isNonBlankString(str) {\n return typeof str === 'string' && /\\S/.test(str);\n}\n\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction throwIfWhitespace(str) {\n if (/\\s/.test(str)) {\n throw new Error('class has illegal whitespace characters');\n }\n}\n\n/**\n * Produce a regular expression for matching a class name.\n *\n * @param {String} className\n * @return {RegExp}\n */\nfunction classRegExp(className) {\n return new RegExp('(^|\\\\s)' + className + '($|\\\\s)');\n}\n\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @function createQuerier\n * @private\n * @param {String} method\n * @return {Function}\n */\nfunction createQuerier(method) {\n return function (selector, context) {\n if (!isNonBlankString(selector)) {\n return document[method](null);\n }\n if (isNonBlankString(context)) {\n context = document.querySelector(context);\n }\n return (isEl(context) ? context : document)[method](selector);\n };\n}\n\n/**\n * Shorthand for document.getElementById()\n * Also allows for CSS (jQuery) ID syntax. But nothing other than IDs.\n *\n * @param {String} id Element ID\n * @return {Element} Element with supplied ID\n * @function getEl\n */\nexport function getEl(id){\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n return document.getElementById(id);\n}\n\n/**\n * Creates an element and applies properties.\n *\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n * @function createEl\n */\nexport function createEl(tagName='div', properties={}, attributes={}){\n let el = document.createElement(tagName);\n\n Object.getOwnPropertyNames(properties).forEach(function(propName){\n let val = properties[propName];\n\n // See #2176\n // We originally were accepting both properties and attributes in the\n // same object, but that doesn't work so well.\n if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\n log.warn(tsml`Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ${propName} to ${val}.`);\n el.setAttribute(propName, val);\n } else {\n el[propName] = val;\n }\n });\n\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let val = attributes[attrName];\n el.setAttribute(attrName, attributes[attrName]);\n });\n\n return el;\n}\n\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param {Element} el\n * @param {String} text\n * @return {Element}\n * @function textContent\n */\nexport function textContent(el, text) {\n if (typeof el.textContent === 'undefined') {\n el.innerText = text;\n } else {\n el.textContent = text;\n }\n}\n\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child Element to insert\n * @param {Element} parent Element to insert child into\n * @private\n * @function insertElFirst\n */\nexport function insertElFirst(child, parent){\n if (parent.firstChild) {\n parent.insertBefore(child, parent.firstChild);\n } else {\n parent.appendChild(child);\n }\n}\n\n/**\n * Element Data Store. Allows for binding data to an element without putting it directly on the element.\n * Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\nconst elData = {};\n\n/*\n * Unique attribute name to store an element's guid in\n *\n * @type {String}\n * @constant\n * @private\n */\nconst elIdAttr = 'vdata' + (new Date()).getTime();\n\n/**\n * Returns the cache object where data for an element is stored\n *\n * @param {Element} el Element to store data for.\n * @return {Object}\n * @function getElData\n */\nexport function getElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n id = el[elIdAttr] = Guid.newGUID();\n }\n\n if (!elData[id]) {\n elData[id] = {};\n }\n\n return elData[id];\n}\n\n/**\n * Returns whether or not an element has cached data\n *\n * @param {Element} el A dom element\n * @return {Boolean}\n * @private\n * @function hasElData\n */\nexport function hasElData(el) {\n const id = el[elIdAttr];\n\n if (!id) {\n return false;\n }\n\n return !!Object.getOwnPropertyNames(elData[id]).length;\n}\n\n/**\n * Delete data for the element from the cache and the guid attr from getElementById\n *\n * @param {Element} el Remove data for an element\n * @private\n * @function removeElData\n */\nexport function removeElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n return;\n }\n\n // Remove all stored data\n delete elData[id];\n\n // Remove the elIdAttr property from the DOM node\n try {\n delete el[elIdAttr];\n } catch(e) {\n if (el.removeAttribute) {\n el.removeAttribute(elIdAttr);\n } else {\n // IE doesn't appear to support removeAttribute on the document element\n el[elIdAttr] = null;\n }\n }\n}\n\n/**\n * Check if an element has a CSS class\n *\n * @function hasElClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nexport function hasElClass(element, classToCheck) {\n if (element.classList) {\n return element.classList.contains(classToCheck);\n } else {\n throwIfWhitespace(classToCheck);\n return classRegExp(classToCheck).test(element.className);\n }\n}\n\n/**\n * Add a CSS class name to an element\n *\n * @function addElClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nexport function addElClass(element, classToAdd) {\n if (element.classList) {\n element.classList.add(classToAdd);\n\n // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\n // in the case of classList not being supported.\n } else if (!hasElClass(element, classToAdd)) {\n element.className = (element.className + ' ' + classToAdd).trim();\n }\n\n return element;\n}\n\n/**\n * Remove a CSS class name from an element\n *\n * @function removeElClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nexport function removeElClass(element, classToRemove) {\n if (element.classList) {\n element.classList.remove(classToRemove);\n } else {\n throwIfWhitespace(classToRemove);\n element.className = element.className.split(/\\s+/).filter(function(c) {\n return c !== classToRemove;\n }).join(' ');\n }\n\n return element;\n}\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @function toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nexport function toggleElClass(element, classToToggle, predicate) {\n\n // This CANNOT use `classList` internally because IE does not support the\n // second parameter to the `classList.toggle()` method! Which is fine because\n // `classList` will be used by the add/remove functions.\n let has = hasElClass(element, classToToggle);\n\n if (typeof predicate === 'function') {\n predicate = predicate(element, classToToggle);\n }\n\n if (typeof predicate !== 'boolean') {\n predicate = !has;\n }\n\n // If the necessary class operation matches the current state of the\n // element, no action is required.\n if (predicate === has) {\n return;\n }\n\n if (predicate) {\n addElClass(element, classToToggle);\n } else {\n removeElClass(element, classToToggle);\n }\n\n return element;\n}\n\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n * @private\n * @function setElAttributes\n */\nexport function setElAttributes(el, attributes) {\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let attrValue = attributes[attrName];\n\n if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n el.removeAttribute(attrName);\n } else {\n el.setAttribute(attrName, (attrValue === true ? '' : attrValue));\n }\n });\n}\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n * @private\n * @function getElAttributes\n */\nexport function getElAttributes(tag) {\n var obj, knownBooleans, attrs, attrName, attrVal;\n\n obj = {};\n\n // known boolean attributes\n // we can check for matching boolean properties, but older browsers\n // won't know about HTML5 boolean attributes that we still read from\n knownBooleans = ','+'autoplay,controls,loop,muted,default'+',';\n\n if (tag && tag.attributes && tag.attributes.length > 0) {\n attrs = tag.attributes;\n\n for (var i = attrs.length - 1; i >= 0; i--) {\n attrName = attrs[i].name;\n attrVal = attrs[i].value;\n\n // check for known booleans\n // the matching element property will return a value for typeof\n if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(','+attrName+',') !== -1) {\n // the value of an included boolean attribute is typically an empty\n // string ('') which would equal false if we just check for a false value.\n // we also don't want support bad code like autoplay='false'\n attrVal = (attrVal !== null) ? true : false;\n }\n\n obj[attrName] = attrVal;\n }\n }\n\n return obj;\n}\n\n/**\n * Attempt to block the ability to select text while dragging controls\n *\n * @return {Boolean}\n * @function blockTextSelection\n */\nexport function blockTextSelection() {\n document.body.focus();\n document.onselectstart = function() {\n return false;\n };\n}\n\n/**\n * Turn off text selection blocking\n *\n * @return {Boolean}\n * @function unblockTextSelection\n */\nexport function unblockTextSelection() {\n document.onselectstart = function() {\n return true;\n };\n}\n\n/**\n * Offset Left\n * getBoundingClientRect technique from\n * John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @function findElPosition\n * @param {Element} el Element from which to get offset\n * @return {Object}\n */\nexport function findElPosition(el) {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = box.left + scrollLeft - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = box.top + scrollTop - clientTop;\n\n // Android sometimes returns slightly off decimal values, so need to round\n return {\n left: Math.round(left),\n top: Math.round(top)\n };\n}\n\n/**\n * Get pointer position in element\n * Returns an object with x and y coordinates.\n * The base on the coordinates are the bottom left of the element.\n *\n * @function getPointerPosition\n * @param {Element} el Element on which to get the pointer position on\n * @param {Event} event Event object\n * @return {Object} This object will have x and y coordinates corresponding to the mouse position\n */\nexport function getPointerPosition(el, event) {\n let position = {};\n let box = findElPosition(el);\n let boxW = el.offsetWidth;\n let boxH = el.offsetHeight;\n\n let boxY = box.top;\n let boxX = box.left;\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, ((boxY - pageY) + boxH) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @function isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isEl(value) {\n return !!value && typeof value === 'object' && value.nodeType === 1;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isTextNode(value) {\n return !!value && typeof value === 'object' && value.nodeType === 3;\n}\n\n/**\n * Empties the contents of an element.\n *\n * @function emptyEl\n * @param {Element} el\n * @return {Element}\n */\nexport function emptyEl(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n return el;\n}\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but protects\n * from falling into the trap of simply writing to `innerHTML`, which is\n * an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @function normalizeContent\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Array}\n */\nexport function normalizeContent(content) {\n\n // First, invoke content if it is a function. If it produces an array,\n // that needs to happen before normalization.\n if (typeof content === 'function') {\n content = content();\n }\n\n // Next up, normalize to an array, so one or many items can be normalized,\n // filtered, and returned.\n return (Array.isArray(content) ? content : [content]).map(value => {\n\n // First, invoke value if it is a function to produce a new value,\n // which will be subsequently normalized to a Node of some kind.\n if (typeof value === 'function') {\n value = value();\n }\n\n if (isEl(value) || isTextNode(value)) {\n return value;\n }\n\n if (typeof value === 'string' && /\\S/.test(value)) {\n return document.createTextNode(value);\n }\n }).filter(value => value);\n}\n\n/**\n * Normalizes and appends content to an element.\n *\n * @function appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function appendContent(el, content) {\n normalizeContent(content).forEach(node => el.appendChild(node));\n return el;\n}\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @function insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function insertContent(el, content) {\n return appendContent(emptyEl(el), content);\n}\n\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\nexport const $ = createQuerier('querySelector');\n\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\nexport const $$ = createQuerier('querySelectorAll');\n", - "/**\n * @file events.js\n *\n * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n */\n\nimport * as Dom from './dom.js';\nimport * as Guid from './guid.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nexport function on(elem, type, fn){\n if (Array.isArray(type)) {\n return _handleMultipleEvents(on, elem, type, fn);\n }\n\n let data = Dom.getElData(elem);\n\n // We need a place to store all our handler data\n if (!data.handlers) data.handlers = {};\n\n if (!data.handlers[type]) data.handlers[type] = [];\n\n if (!fn.guid) fn.guid = Guid.newGUID();\n\n data.handlers[type].push(fn);\n\n if (!data.dispatcher) {\n data.disabled = false;\n\n data.dispatcher = function (event, hash){\n\n if (data.disabled) return;\n event = fixEvent(event);\n\n var handlers = data.handlers[event.type];\n\n if (handlers) {\n // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n var handlersCopy = handlers.slice(0);\n\n for (var m = 0, n = handlersCopy.length; m < n; m++) {\n if (event.isImmediatePropagationStopped()) {\n break;\n } else {\n handlersCopy[m].call(elem, event, hash);\n }\n }\n }\n };\n }\n\n if (data.handlers[type].length === 1) {\n if (elem.addEventListener) {\n elem.addEventListener(type, data.dispatcher, false);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + type, data.dispatcher);\n }\n }\n}\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nexport function off(elem, type, fn) {\n // Don't want to add a cache object through getElData if not needed\n if (!Dom.hasElData(elem)) return;\n\n let data = Dom.getElData(elem);\n\n // If no events exist, nothing to unbind\n if (!data.handlers) { return; }\n\n if (Array.isArray(type)) {\n return _handleMultipleEvents(off, elem, type, fn);\n }\n\n // Utility function\n var removeType = function(t){\n data.handlers[t] = [];\n _cleanUpEvents(elem,t);\n };\n\n // Are we removing all bound events?\n if (!type) {\n for (let t in data.handlers) removeType(t);\n return;\n }\n\n var handlers = data.handlers[type];\n\n // If no handlers exist, nothing to unbind\n if (!handlers) return;\n\n // If no listener was provided, remove all listeners for type\n if (!fn) {\n removeType(type);\n return;\n }\n\n // We're only removing a single handler\n if (fn.guid) {\n for (let n = 0; n < handlers.length; n++) {\n if (handlers[n].guid === fn.guid) {\n handlers.splice(n--, 1);\n }\n }\n }\n\n _cleanUpEvents(elem, type);\n}\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nexport function trigger(elem, event, hash) {\n // Fetches element data and a reference to the parent (for bubbling).\n // Don't want to add a data object to cache for every parent,\n // so checking hasElData first.\n var elemData = (Dom.hasElData(elem)) ? Dom.getElData(elem) : {};\n var parent = elem.parentNode || elem.ownerDocument;\n // type = event.type || event,\n // handler;\n\n // If an event name was passed as a string, creates an event out of it\n if (typeof event === 'string') {\n event = { type:event, target:elem };\n }\n // Normalizes the event properties.\n event = fixEvent(event);\n\n // If the passed element has a dispatcher, executes the established handlers.\n if (elemData.dispatcher) {\n elemData.dispatcher.call(elem, event, hash);\n }\n\n // Unless explicitly stopped or the event does not bubble (e.g. media events)\n // recursively calls this function to bubble the event up the DOM.\n if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n trigger.call(null, parent, event, hash);\n\n // If at the top of the DOM, triggers the default action unless disabled.\n } else if (!parent && !event.defaultPrevented) {\n var targetData = Dom.getElData(event.target);\n\n // Checks if the target has a default action for this event.\n if (event.target[event.type]) {\n // Temporarily disables event dispatching on the target as we have already executed the handler.\n targetData.disabled = true;\n // Executes the default action.\n if (typeof event.target[event.type] === 'function') {\n event.target[event.type]();\n }\n // Re-enables event dispatching.\n targetData.disabled = false;\n }\n }\n\n // Inform the triggerer if the default was prevented by returning false\n return !event.defaultPrevented;\n}\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nexport function one(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(one, elem, type, fn);\n }\n var func = function(){\n off(elem, type, func);\n fn.apply(this, arguments);\n };\n // copy the guid to the new function so it can removed using the original function's ID\n func.guid = fn.guid = fn.guid || Guid.newGUID();\n on(elem, type, func);\n}\n\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event Event object to fix\n * @return {Object}\n * @private\n * @method fixEvent\n */\nexport function fixEvent(event) {\n\n function returnTrue() { return true; }\n function returnFalse() { return false; }\n\n // Test if fixing up is needed\n // Used to check if !event.stopPropagation instead of isPropagationStopped\n // But native events return true for stopPropagation, but don't have\n // other expected methods like isPropagationStopped. Seems to be a problem\n // with the Javascript Ninja code. So we're just overriding all events now.\n if (!event || !event.isPropagationStopped) {\n var old = event || window.event;\n\n event = {};\n // Clone the old object so that we can modify the values event = {};\n // IE8 Doesn't like when you mess with native event properties\n // Firefox returns false for event.hasOwnProperty('type') and other props\n // which makes copying more difficult.\n // TODO: Probably best to create a whitelist of event props\n for (var key in old) {\n // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n // and webkitMovementX/Y\n if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' &&\n key !== 'webkitMovementX' && key !== 'webkitMovementY') {\n // Chrome 32+ warns if you try to copy deprecated returnValue, but\n // we still want to if preventDefault isn't supported (IE8).\n if (!(key === 'returnValue' && old.preventDefault)) {\n event[key] = old[key];\n }\n }\n }\n\n // The event occurred on this element\n if (!event.target) {\n event.target = event.srcElement || document;\n }\n\n // Handle which other element the event is related to\n if (!event.relatedTarget) {\n event.relatedTarget = event.fromElement === event.target ?\n event.toElement :\n event.fromElement;\n }\n\n // Stop the default browser action\n event.preventDefault = function () {\n if (old.preventDefault) {\n old.preventDefault();\n }\n event.returnValue = false;\n old.returnValue = false;\n event.defaultPrevented = true;\n };\n\n event.defaultPrevented = false;\n\n // Stop the event from bubbling\n event.stopPropagation = function () {\n if (old.stopPropagation) {\n old.stopPropagation();\n }\n event.cancelBubble = true;\n old.cancelBubble = true;\n event.isPropagationStopped = returnTrue;\n };\n\n event.isPropagationStopped = returnFalse;\n\n // Stop the event from bubbling and executing other handlers\n event.stopImmediatePropagation = function () {\n if (old.stopImmediatePropagation) {\n old.stopImmediatePropagation();\n }\n event.isImmediatePropagationStopped = returnTrue;\n event.stopPropagation();\n };\n\n event.isImmediatePropagationStopped = returnFalse;\n\n // Handle mouse position\n if (event.clientX != null) {\n var doc = document.documentElement, body = document.body;\n\n event.pageX = event.clientX +\n (doc && doc.scrollLeft || body && body.scrollLeft || 0) -\n (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = event.clientY +\n (doc && doc.scrollTop || body && body.scrollTop || 0) -\n (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // Handle key presses\n event.which = event.charCode || event.keyCode;\n\n // Fix button for mouse clicks:\n // 0 == left; 1 == middle; 2 == right\n if (event.button != null) {\n event.button = (event.button & 1 ? 0 :\n (event.button & 4 ? 1 :\n (event.button & 2 ? 2 : 0)));\n }\n }\n\n // Returns fixed-up instance\n return event;\n}\n\n/**\n * Clean up the listener cache and dispatchers\n*\n * @param {Element|Object} elem Element to clean up\n * @param {String} type Type of event to clean up\n * @private\n * @method _cleanUpEvents\n */\nfunction _cleanUpEvents(elem, type) {\n var data = Dom.getElData(elem);\n\n // Remove the events of a particular type if there are none left\n if (data.handlers[type].length === 0) {\n delete data.handlers[type];\n // data.handlers[type] = null;\n // Setting to null was causing an error with data.handlers\n\n // Remove the meta-handler from the element\n if (elem.removeEventListener) {\n elem.removeEventListener(type, data.dispatcher, false);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + type, data.dispatcher);\n }\n }\n\n // Remove the events object if there are no types left\n if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n delete data.handlers;\n delete data.dispatcher;\n delete data.disabled;\n }\n\n // Finally remove the element data if there is no data left\n if (Object.getOwnPropertyNames(data).length === 0) {\n Dom.removeElData(elem);\n }\n}\n\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn The event method we want to use.\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String} type Type of event to bind to.\n * @param {Function} callback Event listener.\n * @private\n * @function _handleMultipleEvents\n */\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n types.forEach(function(type) {\n //Call the event method for each one of the types\n fn(elem, type, callback);\n });\n}\n", - "/**\n * @file fn.js\n */\nimport { newGUID } from './guid.js';\n\n/**\n * Bind (a.k.a proxy or Context). A simple method for changing the context of a function\n * It also stores a unique id on the function so it can be easily removed from events\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n * @private\n * @method bind\n */\nexport const bind = function(context, fn, uid) {\n // Make sure the function has a unique ID\n if (!fn.guid) { fn.guid = newGUID(); }\n\n // Create the new function that changes the context\n let ret = function() {\n return fn.apply(context, arguments);\n };\n\n // Allow for the ability to individualize this function\n // Needed in the case where multiple objects might share the same prototype\n // IF both items add an event listener with the same function, then you try to remove just one\n // it will remove both because they both have the same guid.\n // when using this, you need to use the bind method when you remove the listener as well.\n // currently used in text tracks\n ret.guid = (uid) ? uid + '_' + fn.guid : fn.guid;\n\n return ret;\n};\n", - "/**\n * @file format-time.js\n *\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @private\n * @function formatTime\n */\nfunction formatTime(seconds, guide=seconds) {\n seconds = seconds < 0 ? 0 : seconds;\n let s = Math.floor(seconds % 60);\n let m = Math.floor(seconds / 60 % 60);\n let h = Math.floor(seconds / 3600);\n const gm = Math.floor(guide / 60 % 60);\n const gh = Math.floor(guide / 3600);\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-';\n }\n\n // Check if we need to show hours\n h = (h > 0 || gh > 0) ? h + ':' : '';\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = (((h || gm >= 10) && m < 10) ? '0' + m : m) + ':';\n\n // Check if leading zero is need for seconds\n s = (s < 10) ? '0' + s : s;\n\n return h + m + s;\n}\n\nexport default formatTime;\n", - "/**\n * @file guid.js\n *\n * Unique ID for an element or function\n * @type {Number}\n * @private\n */\nlet _guid = 1;\n\n/**\n * Get the next unique ID\n *\n * @return {String} \n * @function newGUID\n */\nexport function newGUID() {\n return _guid++;\n}\n", - "/**\n * @file log.js\n */\nimport window from 'global/window';\n\n/**\n * Log plain debug messages\n */\nconst log = function(){\n _logType(null, arguments);\n};\n\n/**\n * Keep a history of log messages\n * @type {Array}\n */\nlog.history = [];\n\n/**\n * Log error messages\n */\nlog.error = function(){\n _logType('error', arguments);\n};\n\n/**\n * Log warning messages\n */\nlog.warn = function(){\n _logType('warn', arguments);\n};\n\n/**\n * Log messages to the console and history based on the type of message\n *\n * @param {String} type The type of message, or `null` for `log`\n * @param {Object} args The args to be passed to the log\n * @private\n * @method _logType\n */\nfunction _logType(type, args){\n // convert args to an array to get array functions\n let argsArray = Array.prototype.slice.call(args);\n // if there's no console then don't try to output messages\n // they will still be stored in log.history\n // Was setting these once outside of this function, but containing them\n // in the function makes it easier to test cases where console doesn't exist\n let noop = function(){};\n\n let console = window['console'] || {\n 'log': noop,\n 'warn': noop,\n 'error': noop\n };\n\n if (type) {\n // add the type to the front of the message\n argsArray.unshift(type.toUpperCase()+':');\n } else {\n // default to log with no prefix\n type = 'log';\n }\n\n // add to history\n log.history.push(argsArray);\n\n // add console prefix after adding to history\n argsArray.unshift('VIDEOJS:');\n\n // call appropriate log function\n if (console[type].apply) {\n console[type].apply(console, argsArray);\n } else {\n // ie8 doesn't allow error.apply, but it will just join() the array anyway\n console[type](argsArray.join(' '));\n }\n}\n\nexport default log;\n", - "/**\n * @file merge-options.js\n */\nimport merge from 'lodash-compat/object/merge';\n\nfunction isPlain(obj) {\n return !!obj\n && typeof obj === 'object'\n && obj.toString() === '[object Object]'\n && obj.constructor === Object;\n}\n\n/**\n * Merge customizer. video.js simply overwrites non-simple objects\n * (like arrays) instead of attempting to overlay them.\n * @see https://lodash.com/docs#merge\n */\nconst customizer = function(destination, source) {\n // If we're not working with a plain object, copy the value as is\n // If source is an array, for instance, it will replace destination\n if (!isPlain(source)) {\n return source;\n }\n\n // If the new value is a plain object but the first object value is not\n // we need to create a new object for the first object to merge with.\n // This makes it consistent with how merge() works by default\n // and also protects from later changes the to first object affecting\n // the second object's values.\n if (!isPlain(destination)) {\n return mergeOptions(source);\n }\n};\n\n/**\n * Merge one or more options objects, recursively merging **only**\n * plain object properties. Previously `deepMerge`.\n *\n * @param {...Object} source One or more objects to merge\n * @returns {Object} a new object that is the union of all\n * provided objects\n * @function mergeOptions\n */\nexport default function mergeOptions() {\n // contruct the call dynamically to handle the variable number of\n // objects to merge\n let args = Array.prototype.slice.call(arguments);\n\n // unshift an empty object into the front of the call as the target\n // of the merge\n args.unshift({});\n\n // customize conflict resolution to match our historical merge behavior\n args.push(customizer);\n\n merge.apply(null, args);\n\n // return the mutated result object\n return args[0];\n}\n", - "import document from 'global/document';\n\nexport let createStyleElement = function(className) {\n let style = document.createElement('style');\n style.className = className;\n\n return style;\n};\n\nexport let setTextContent = function(el, content) {\n if (el.styleSheet) {\n el.styleSheet.cssText = content;\n } else {\n el.textContent = content;\n }\n};\n", - "import log from './log.js';\n\n/**\n * @file time-ranges.js\n *\n * Should create a fake TimeRange object\n * Mimics an HTML5 time range instance, which has functions that\n * return the start and end times for a range\n * TimeRanges are returned by the buffered() method\n *\n * @param {(Number|Array)} Start of a single range or an array of ranges\n * @param {Number} End of a single range\n * @private\n * @method createTimeRanges\n */\nexport function createTimeRanges(start, end){\n if (Array.isArray(start)) {\n return createTimeRangesObj(start);\n } else if (start === undefined || end === undefined) {\n return createTimeRangesObj();\n }\n return createTimeRangesObj([[start, end]]);\n}\n\nexport { createTimeRanges as createTimeRange };\n\nfunction createTimeRangesObj(ranges){\n if (ranges === undefined || ranges.length === 0) {\n return {\n length: 0,\n start: function() {\n throw new Error('This TimeRanges object is empty');\n },\n end: function() {\n throw new Error('This TimeRanges object is empty');\n }\n };\n }\n return {\n length: ranges.length,\n start: getRange.bind(null, 'start', 0, ranges),\n end: getRange.bind(null, 'end', 1, ranges)\n };\n}\n\nfunction getRange(fnName, valueIndex, ranges, rangeIndex){\n if (rangeIndex === undefined) {\n log.warn(`DEPRECATED: Function '${fnName}' on 'TimeRanges' called without an index argument.`);\n rangeIndex = 0;\n }\n rangeCheck(fnName, rangeIndex, ranges.length - 1);\n return ranges[rangeIndex][valueIndex];\n}\n\nfunction rangeCheck(fnName, index, maxIndex){\n if (index < 0 || index > maxIndex) {\n throw new Error(`Failed to execute '${fnName}' on 'TimeRanges': The index provided (${index}) is greater than or equal to the maximum bound (${maxIndex}).`);\n }\n}\n", - "/**\n * @file to-title-case.js\n *\n * Uppercase the first letter of a string\n *\n * @param {String} string String to be uppercased\n * @return {String}\n * @private\n * @method toTitleCase\n */\nfunction toTitleCase(string){\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport default toTitleCase;\n", - "/**\n * @file url.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nexport const parseUrl = function(url) {\n const props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];\n\n // add the url to an anchor and let the browser parse the URL\n let a = document.createElement('a');\n a.href = url;\n\n // IE8 (and 9?) Fix\n // ie8 doesn't parse the URL correctly until the anchor is actually\n // added to the body, and an innerHTML is needed to trigger the parsing\n let addToBody = (a.host === '' && a.protocol !== 'file:');\n let div;\n if (addToBody) {\n div = document.createElement('div');\n div.innerHTML = ``;\n a = div.firstChild;\n // prevent the div from affecting layout\n div.setAttribute('style', 'display:none; position:absolute;');\n document.body.appendChild(div);\n }\n\n // Copy the specific URL properties to a new object\n // This is also needed for IE8 because the anchor loses its\n // properties when it's removed from the dom\n let details = {};\n for (var i = 0; i < props.length; i++) {\n details[props[i]] = a[props[i]];\n }\n\n // IE9 adds the port to the host property unlike everyone else. If\n // a port identifier is added for standard ports, strip it.\n if (details.protocol === 'http:') {\n details.host = details.host.replace(/:80$/, '');\n }\n if (details.protocol === 'https:') {\n details.host = details.host.replace(/:443$/, '');\n }\n\n if (addToBody) {\n document.body.removeChild(div);\n }\n\n return details;\n};\n\n/**\n * Get absolute version of relative URL. Used to tell flash correct URL.\n * http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n *\n * @param {String} url URL to make absolute\n * @return {String} Absolute URL\n * @private\n * @method getAbsoluteURL\n */\nexport const getAbsoluteURL = function(url){\n // Check if absolute URL\n if (!url.match(/^https?:\\/\\//)) {\n // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\n let div = document.createElement('div');\n div.innerHTML = `x`;\n url = div.firstChild.href;\n }\n\n return url;\n};\n\n/**\n * Returns the extension of the passed file name. It will return an empty string if you pass an invalid path\n *\n * @param {String} path The fileName path like '/path/to/file.mp4'\n * @returns {String} The extension in lower case or an empty string if no extension could be found.\n * @method getFileExtension\n */\nexport const getFileExtension = function(path) {\n if(typeof path === 'string'){\n let splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/i;\n let pathParts = splitPathRe.exec(path);\n\n if (pathParts) {\n return pathParts.pop().toLowerCase();\n }\n }\n\n return '';\n};\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nexport const isCrossOrigin = function(url) {\n let winLoc = window.location;\n let urlInfo = parseUrl(url);\n\n // IE8 protocol relative urls will return ':' for protocol\n let srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;\n\n // Check if url is for another domain/origin\n // IE8 doesn't know location.origin, so we won't rely on it here\n let crossOrigin = (srcProtocol + urlInfo.host) !== (winLoc.protocol + winLoc.host);\n\n return crossOrigin;\n};\n", - "/**\n * @file video.js\n */\nimport window from 'global/window';\nimport document from 'global/document';\nimport * as setup from './setup';\nimport * as stylesheet from './utils/stylesheet.js';\nimport Component from './component';\nimport EventTarget from './event-target';\nimport * as Events from './utils/events.js';\nimport Player from './player';\nimport plugin from './plugins.js';\nimport mergeOptions from '../../src/js/utils/merge-options.js';\nimport * as Fn from './utils/fn.js';\nimport TextTrack from './tracks/text-track.js';\n\nimport assign from 'object.assign';\nimport { createTimeRanges } from './utils/time-ranges.js';\nimport formatTime from './utils/format-time.js';\nimport log from './utils/log.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\nimport * as Url from './utils/url.js';\nimport extendFn from './extend.js';\nimport merge from 'lodash-compat/object/merge';\nimport createDeprecationProxy from './utils/create-deprecation-proxy.js';\nimport xhr from 'xhr';\n\n// Include the built-in techs\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\nimport Flash from './tech/flash.js';\n\n// HTML5 Element Shim for IE8\nif (typeof HTMLVideoElement === 'undefined') {\n document.createElement('video');\n document.createElement('audio');\n document.createElement('track');\n}\n\n/**\n * Doubles as the main function for users to create a player instance and also\n * the main library object.\n * The `videojs` function can be used to initialize or retrieve a player.\n * ```js\n * var myPlayer = videojs('my_video_id');\n * ```\n *\n * @param {String|Element} id Video element or video element ID\n * @param {Object=} options Optional options object for config/settings\n * @param {Function=} ready Optional ready callback\n * @return {Player} A player instance\n * @mixes videojs\n * @method videojs\n */\nlet videojs = function(id, options, ready){\n let tag; // Element of ID\n\n // Allow for element or ID to be passed in\n // String ID\n if (typeof id === 'string') {\n\n // Adjust for jQuery ID syntax\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n // If a player instance has already been created for this ID return it.\n if (videojs.getPlayers()[id]) {\n\n // If options or ready funtion are passed, warn\n if (options) {\n log.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n }\n\n if (ready) {\n videojs.getPlayers()[id].ready(ready);\n }\n\n return videojs.getPlayers()[id];\n\n // Otherwise get element for ID\n } else {\n tag = Dom.getEl(id);\n }\n\n // ID is a media element\n } else {\n tag = id;\n }\n\n // Check for a useable element\n if (!tag || !tag.nodeName) { // re: nodeName, could be a box div also\n throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns\n }\n\n // Element may have a player attr referring to an already created player instance.\n // If not, set up a new player and return the instance.\n return tag['player'] || Player.players[tag.playerId] || new Player(tag, options, ready);\n};\n\n// Add default styles\nif (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n let style = Dom.$('.vjs-styles-defaults');\n\n if (!style) {\n style = stylesheet.createStyleElement('vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(style, head.firstChild);\n stylesheet.setTextContent(style, `\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n `);\n }\n}\n\n// Run Auto-load players\n// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version)\nsetup.autoSetupTimeout(1, videojs);\n\n/*\n * Current software version (semver)\n *\n * @type {String}\n */\nvideojs.VERSION = '__VERSION__';\n\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * ```js\n * videojs.options.autoplay = true\n * // -> all players will autoplay by default\n * ```\n *\n * @type {Object}\n */\nvideojs.options = Player.prototype.options_;\n\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object} The created players\n * @mixes videojs\n * @method getPlayers\n */\nvideojs.getPlayers = function() {\n return Player.players;\n};\n\n/**\n * For backward compatibility, expose players object.\n *\n * @deprecated\n * @memberOf videojs\n * @property {Object|Proxy} players\n */\nvideojs.players = createDeprecationProxy(Player.players, {\n get: 'Access to videojs.players is deprecated; use videojs.getPlayers instead',\n set: 'Modification of videojs.players is deprecated'\n});\n\n/**\n * Get a component class object by name\n * ```js\n * var VjsButton = videojs.getComponent('Button');\n * // Create a new instance of the component\n * var myButton = new VjsButton(myPlayer);\n * ```\n *\n * @return {Component} Component identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getComponent = Component.getComponent;\n\n/**\n * Register a component so it can referred to by name\n * Used when adding to other\n * components, either through addChild\n * `component.addChild('myComponent')`\n * or through default children options\n * `{ children: ['myComponent'] }`.\n * ```js\n * // Get a component to subclass\n * var VjsButton = videojs.getComponent('Button');\n * // Subclass the component (see 'extend' doc for more info)\n * var MySpecialButton = videojs.extend(VjsButton, {});\n * // Register the new component\n * VjsButton.registerComponent('MySepcialButton', MySepcialButton);\n * // (optionally) add the new component as a default player child\n * myPlayer.addChild('MySepcialButton');\n * ```\n * NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {String} The class name of the component\n * @param {Component} The component class\n * @return {Component} The newly registered component\n * @mixes videojs\n * @method registerComponent\n */\nvideojs.registerComponent = (name, comp) => {\n if (Tech.isTech(comp)) {\n log.warn(`The ${name} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`);\n }\n\n Component.registerComponent.call(Component, name, comp);\n};\n\n/**\n * Get a Tech class object by name\n * ```js\n * var Html5 = videojs.getTech('Html5');\n * // Create a new instance of the component\n * var html5 = new Html5(options);\n * ```\n *\n * @return {Tech} Tech identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getTech = Tech.getTech;\n\n/**\n * Register a Tech so it can referred to by name.\n * This is used in the tech order for the player.\n *\n * ```js\n * // get the Html5 Tech\n * var Html5 = videojs.getTech('Html5');\n * var MyTech = videojs.extend(Html5, {});\n * // Register the new Tech\n * VjsButton.registerTech('Tech', MyTech);\n * var player = videojs('myplayer', {\n * techOrder: ['myTech', 'html5']\n * });\n * ```\n *\n * @param {String} The class name of the tech\n * @param {Tech} The tech class\n * @return {Tech} The newly registered Tech\n * @mixes videojs\n * @method registerTech\n */\nvideojs.registerTech = Tech.registerTech;\n\n/**\n * A suite of browser and device tests\n *\n * @type {Object}\n * @private\n */\nvideojs.browser = browser;\n\n/**\n * Whether or not the browser supports touch events. Included for backward\n * compatibility with 4.x, but deprecated. Use `videojs.browser.TOUCH_ENABLED`\n * instead going forward.\n *\n * @deprecated\n * @type {Boolean}\n */\nvideojs.TOUCH_ENABLED = browser.TOUCH_ENABLED;\n\n/**\n * Subclass an existing class\n * Mimics ES6 subclassing with the `extend` keyword\n * ```js\n * // Create a basic javascript 'class'\n * function MyClass(name){\n * // Set a property at initialization\n * this.myName = name;\n * }\n * // Create an instance method\n * MyClass.prototype.sayMyName = function(){\n * alert(this.myName);\n * };\n * // Subclass the exisitng class and change the name\n * // when initializing\n * var MySubClass = videojs.extend(MyClass, {\n * constructor: function(name) {\n * // Call the super class constructor for the subclass\n * MyClass.call(this, name)\n * }\n * });\n * // Create an instance of the new sub class\n * var myInstance = new MySubClass('John');\n * myInstance.sayMyName(); // -> should alert \"John\"\n * ```\n *\n * @param {Function} The Class to subclass\n * @param {Object} An object including instace methods for the new class\n * Optionally including a `constructor` function\n * @return {Function} The newly created subclass\n * @mixes videojs\n * @method extend\n */\nvideojs.extend = extendFn;\n\n/**\n * Merge two options objects recursively\n * Performs a deep merge like lodash.merge but **only merges plain objects**\n * (not arrays, elements, anything else)\n * Other values will be copied directly from the second object.\n * ```js\n * var defaultOptions = {\n * foo: true,\n * bar: {\n * a: true,\n * b: [1,2,3]\n * }\n * };\n * var newOptions = {\n * foo: false,\n * bar: {\n * b: [4,5,6]\n * }\n * };\n * var result = videojs.mergeOptions(defaultOptions, newOptions);\n * // result.foo = false;\n * // result.bar.a = true;\n * // result.bar.b = [4,5,6];\n * ```\n *\n * @param {Object} defaults The options object whose values will be overriden\n * @param {Object} overrides The options object with values to override the first\n * @param {Object} etc Any number of additional options objects\n *\n * @return {Object} a new object with the merged values\n * @mixes videojs\n * @method mergeOptions\n */\nvideojs.mergeOptions = mergeOptions;\n\n/**\n * Change the context (this) of a function\n *\n * videojs.bind(newContext, function(){\n * this === newContext\n * });\n *\n * NOTE: as of v5.0 we require an ES5 shim, so you should use the native\n * `function(){}.bind(newContext);` instead of this.\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n */\nvideojs.bind = Fn.bind;\n\n/**\n * Create a Video.js player plugin\n * Plugins are only initialized when options for the plugin are included\n * in the player options, or the plugin function on the player instance is\n * called.\n * **See the plugin guide in the docs for a more detailed example**\n * ```js\n * // Make a plugin that alerts when the player plays\n * videojs.plugin('myPlugin', function(myPluginOptions) {\n * myPluginOptions = myPluginOptions || {};\n *\n * var player = this;\n * var alertText = myPluginOptions.text || 'Player is playing!'\n *\n * player.on('play', function(){\n * alert(alertText);\n * });\n * });\n * // USAGE EXAMPLES\n * // EXAMPLE 1: New player with plugin options, call plugin immediately\n * var player1 = videojs('idOne', {\n * myPlugin: {\n * text: 'Custom text!'\n * }\n * });\n * // Click play\n * // --> Should alert 'Custom text!'\n * // EXAMPLE 3: New player, initialize plugin later\n * var player3 = videojs('idThree');\n * // Click play\n * // --> NO ALERT\n * // Click pause\n * // Initialize plugin using the plugin function on the player instance\n * player3.myPlugin({\n * text: 'Plugin added later!'\n * });\n * // Click play\n * // --> Should alert 'Plugin added later!'\n * ```\n *\n * @param {String} name The plugin name\n * @param {Function} fn The plugin function that will be called with options\n * @mixes videojs\n * @method plugin\n */\nvideojs.plugin = plugin;\n\n/**\n * Adding languages so that they're available to all players.\n * ```js\n * videojs.addLanguage('es', { 'Hello': 'Hola' });\n * ```\n *\n * @param {String} code The language code or dictionary property\n * @param {Object} data The data values to be translated\n * @return {Object} The resulting language dictionary object\n * @mixes videojs\n * @method addLanguage\n */\nvideojs.addLanguage = function(code, data){\n code = ('' + code).toLowerCase();\n return merge(videojs.options.languages, { [code]: data })[code];\n};\n\n/**\n * Log debug messages.\n *\n * @param {...Object} messages One or more messages to log\n */\nvideojs.log = log;\n\n/**\n * Creates an emulated TimeRange object.\n *\n * @param {Number|Array} start Start time in seconds or an array of ranges\n * @param {Number} end End time in seconds\n * @return {Object} Fake TimeRange object\n * @method createTimeRange\n */\nvideojs.createTimeRange = videojs.createTimeRanges = createTimeRanges;\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @method formatTime\n */\nvideojs.formatTime = formatTime;\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nvideojs.parseUrl = Url.parseUrl;\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nvideojs.isCrossOrigin = Url.isCrossOrigin;\n\n/**\n * Event target class.\n *\n * @type {Function}\n */\nvideojs.EventTarget = EventTarget;\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nvideojs.on = Events.on;\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nvideojs.one = Events.one;\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nvideojs.off = Events.off;\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nvideojs.trigger = Events.trigger;\n\n/**\n * A cross-browser XMLHttpRequest wrapper. Here's a simple example:\n *\n * videojs.xhr({\n * body: someJSONString,\n * uri: \"/foo\",\n * headers: {\n * \"Content-Type\": \"application/json\"\n * }\n * }, function (err, resp, body) {\n * // check resp.statusCode\n * });\n *\n * Check out the [full\n * documentation](https://github.com/Raynos/xhr/blob/v2.1.0/README.md)\n * for more options.\n *\n * @param {Object} options settings for the request.\n * @return {XMLHttpRequest|XDomainRequest} the request object.\n * @see https://github.com/Raynos/xhr\n */\nvideojs.xhr = xhr;\n\n/**\n * TextTrack class\n *\n * @type {Function}\n */\nvideojs.TextTrack = TextTrack;\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @method isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isEl = Dom.isEl;\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @method isTextNode\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isTextNode = Dom.isTextNode;\n\n/**\n * Creates an element and applies properties.\n *\n * @method createEl\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n */\nvideojs.createEl = Dom.createEl;\n\n/**\n * Check if an element has a CSS class\n *\n * @method hasClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nvideojs.hasClass = Dom.hasElClass;\n\n/**\n * Add a CSS class name to an element\n *\n * @method addClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nvideojs.addClass = Dom.addElClass;\n\n/**\n * Remove a CSS class name from an element\n *\n * @method removeClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nvideojs.removeClass = Dom.removeElClass;\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @method toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nvideojs.toggleClass = Dom.toggleElClass;\n\n/**\n * Apply attributes to an HTML element.\n *\n * @method setAttributes\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n */\nvideojs.setAttributes = Dom.setElAttributes;\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @method getAttributes\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n */\nvideojs.getAttributes = Dom.getElAttributes;\n\n/**\n * Empties the contents of an element.\n *\n * @method emptyEl\n * @param {Element} el\n * @return {Element}\n */\nvideojs.emptyEl = Dom.emptyEl;\n\n/**\n * Normalizes and appends content to an element.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.appendContent = Dom.appendContent;\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.insertContent = Dom.insertContent;\n\n/*\n * Custom Universal Module Definition (UMD)\n *\n * Video.js will never be a non-browser lib so we can simplify UMD a bunch and\n * still support requirejs and browserify. This also needs to be closure\n * compiler compatible, so string keys are used.\n */\nif (typeof define === 'function' && define['amd']) {\n define('videojs', [], function(){ return videojs; });\n\n// checking that module is an object too because of umdjs/umd#35\n} else if (typeof exports === 'object' && typeof module === 'object') {\n module['exports'] = videojs;\n}\n\nexport default videojs;\n" - ] -} \ No newline at end of file diff --git a/vendor/assets/javascripts/videojs/video.min.js b/vendor/assets/javascripts/videojs/video.min.js deleted file mode 100755 index adc33b3168b..00000000000 --- a/vendor/assets/javascripts/videojs/video.min.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Video.js 5.9.0 - * Copyright Brightcove, Inc. - * Available under Apache License Version 2.0 - * - * - * Includes vtt.js - * Available under Apache License Version 2.0 - * - */ -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.videojs=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=a||a>b?i(s,n):r=setTimeout(j,a)}function k(){i(v,r)}function l(){if(m=arguments,p=e(),q=this,s=v&&(r||!w),u===!1)var c=w&&!r;else{n||w||(t=p);var d=u-(p-t),f=0>=d||d>u;f?(n&&(n=clearTimeout(n)),t=p,o=a.apply(q,m)):n||(n=setTimeout(k,d))}return f&&r?r=clearTimeout(r):r||b===u||(r=setTimeout(j,b)),c&&(f=!0,o=a.apply(q,m)),!f||r||n||(m=q=void 0),o}var m,n,o,p,q,r,s,t=0,u=!1,v=!0;if("function"!=typeof a)throw new TypeError(f);if(b=0>b?0:+b||0,c===!0){var w=!0;v=!1}else d(c)&&(w=!!c.leading,u="maxWait"in c&&g(+c.maxWait||0,b),v="trailing"in c?!!c.trailing:v);return l.cancel=h,l}var d=a("../lang/isObject"),e=a("../date/now"),f="Expected a function",g=Math.max;b.exports=c},{"../date/now":4,"../lang/isObject":33}],6:[function(a,b){function c(a,b){if("function"!=typeof a)throw new TypeError(d);return b=e(void 0===b?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,f=e(c.length-b,0),g=Array(f);++d2?c[g-2]:void 0,i=g>2?c[2]:void 0,j=g>1?c[g-1]:void 0;for("function"==typeof h?(h=d(h,j,5),g-=2):(h="function"==typeof j?j:void 0,g-=h?1:0),i&&e(c[0],c[1],i)&&(h=3>g?void 0:h,g=1);++f-1&&a%1==0&&b>a}var d=/^\d+$/,e=9007199254740991;b.exports=c},{}],24:[function(a,b){function c(a,b,c){if(!f(c))return!1;var g=typeof b;if("number"==g?d(c)&&e(b,c.length):"string"==g&&b in c){var h=c[b];return a===a?a===h:h!==h}return!1}var d=a("./isArrayLike"),e=a("./isIndex"),f=a("../lang/isObject");b.exports=c},{"../lang/isObject":33,"./isArrayLike":21,"./isIndex":23}],25:[function(a,b){function c(a){return"number"==typeof a&&a>-1&&a%1==0&&d>=a}var d=9007199254740991;b.exports=c},{}],26:[function(a,b){function c(a){return!!a&&"object"==typeof a}b.exports=c},{}],27:[function(a,b){function c(a){for(var b=i(a),c=b.length,j=c&&a.length,l=!!j&&g(j)&&(e(a)||d(a)||h(a)),m=-1,n=[];++m0,r=l.enumErrorProps&&(a===w||a instanceof Error),t=l.enumPrototypes&&g(a);++d2?arguments[2]:{},g=c(b);e&&(g=g.concat(Object.getOwnPropertySymbols(b))),d(g,function(c){j(a,c,b[c],f[c])})};k.supportsDescriptors=!!i,b.exports=k},{foreach:47,"object-keys":50}],47:[function(a,b){var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString;b.exports=function(a,b,e){if("[object Function]"!==d.call(b))throw new TypeError("iterator must be a function");var f=a.length;if(f===+f)for(var g=0;f>g;g++)b.call(e,a[g],g,a);else for(var h in a)c.call(a,h)&&b.call(e,a[h],h,a)}},{}],48:[function(a,b){var c="Function.prototype.bind called on incompatible ",d=Array.prototype.slice,e=Object.prototype.toString,f="[object Function]";b.exports=function(a){var b=this;if("function"!=typeof b||e.call(b)!==f)throw new TypeError(c+b);for(var g,h=d.call(arguments,1),i=function(){if(this instanceof g){var c=b.apply(this,h.concat(d.call(arguments)));return Object(c)===c?c:this}return b.apply(a,h.concat(d.call(arguments)))},j=Math.max(0,b.length-h.length),k=[],l=0;j>l;l++)k.push("$"+l);if(g=Function("binder","return function ("+k.join(",")+"){ return binder.apply(this,arguments); }")(i),b.prototype){var m=function(){};m.prototype=b.prototype,g.prototype=new m,m.prototype=null}return g}},{}],49:[function(a,b){var c=a("./implementation");b.exports=Function.prototype.bind||c},{"./implementation":48}],50:[function(a,b){"use strict";var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString,e=Array.prototype.slice,f=a("./isArguments"),g=!{toString:null}.propertyIsEnumerable("toString"),h=function(){}.propertyIsEnumerable("prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],j=function(a){var b=a.constructor;return b&&b.prototype===a},k={$console:!0,$frame:!0,$frameElement:!0,$frames:!0,$parent:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},l=function(){if("undefined"==typeof window)return!1;for(var a in window)try{if(!k["$"+a]&&c.call(window,a)&&null!==window[a]&&"object"==typeof window[a])try{j(window[a])}catch(b){return!0}}catch(b){return!0}return!1}(),m=function(a){if("undefined"==typeof window||!l)return j(a);try{return j(a)}catch(b){return!1}},n=function(a){var b=null!==a&&"object"==typeof a,e="[object Function]"===d.call(a),j=f(a),k=b&&"[object String]"===d.call(a),l=[];if(!b&&!e&&!j)throw new TypeError("Object.keys called on a non-object");var n=h&&e;if(k&&a.length>0&&!c.call(a,0))for(var o=0;o0)for(var p=0;p=0&&"[object Function]"===c.call(a.callee)),d}},{}],52:[function(a,b){"use strict";var c=a("./implementation"),d=function(){if(!Object.assign)return!1;for(var a="abcdefghijklmnopqrst",b=a.split(""),c={},d=0;d0&&(o=setTimeout(function(){n=!0,k.abort("timeout");var a=new Error("XMLHttpRequest timeout");a.code="ETIMEDOUT",e(a)},a.timeout)),k.setRequestHeader)for(m in s)s.hasOwnProperty(m)&&k.setRequestHeader(m,s[m]);else if(a.headers&&!d(a.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(k.responseType=a.responseType),"beforeSend"in a&&"function"==typeof a.beforeSend&&a.beforeSend(k),k.send(r),k}function h(){}var i=a("global/window"),j=a("once"),k=a("is-function"),l=a("parse-headers"),m=a("xtend");b.exports=f,f.XMLHttpRequest=i.XMLHttpRequest||h,f.XDomainRequest="withCredentials"in new f.XMLHttpRequest?f.XMLHttpRequest:i.XDomainRequest,c(["get","put","post","patch","head","delete"],function(a){f["delete"===a?"del":a]=function(b,c,d){return c=e(b,c,d),c.method=a.toUpperCase(),g(c)}})},{"global/window":2,"is-function":57,once:58,"parse-headers":61,xtend:62}],57:[function(a,b){function c(a){var b=d.call(a);return"[object Function]"===b||"function"==typeof a&&"[object RegExp]"!==b||"undefined"!=typeof window&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}b.exports=c;var d=Object.prototype.toString},{}],58:[function(a,b){function c(a){var b=!1;return function(){return b?void 0:(b=!0,a.apply(this,arguments))}}b.exports=c,c.proto=c(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return c(this)},configurable:!0})})},{}],59:[function(a,b){function c(a,b,c){if(!g(b))throw new TypeError("iterator must be a function");arguments.length<3&&(c=this),"[object Array]"===h.call(a)?d(a,b,c):"string"==typeof a?e(a,b,c):f(a,b,c)}function d(a,b,c){for(var d=0,e=a.length;e>d;d++)i.call(a,d)&&b.call(c,a[d],d,a)}function e(a,b,c){for(var d=0,e=a.length;e>d;d++)b.call(c,a.charAt(d),d,a)}function f(a,b,c){for(var d in a)i.call(a,d)&&b.call(c,a[d],d,a)}var g=a("is-function");b.exports=c;var h=Object.prototype.toString,i=Object.prototype.hasOwnProperty},{"is-function":57}],60:[function(a,b,c){function d(a){return a.replace(/^\s*|\s*$/g,"")}c=b.exports=d,c.left=function(a){return a.replace(/^\s*/,"")},c.right=function(a){return a.replace(/\s*$/,"")}},{}],61:[function(a,b){var c=a("trim"),d=a("for-each"),e=function(a){return"[object Array]"===Object.prototype.toString.call(a)};b.exports=function(a){if(!a)return{};var b={};return d(c(a).split("\n"),function(a){var d=a.indexOf(":"),f=c(a.slice(0,d)).toLowerCase(),g=c(a.slice(d+1));"undefined"==typeof b[f]?b[f]=g:e(b[f])?b[f].push(g):b[f]=[b[f],g]}),b}},{"for-each":59,trim:60}],62:[function(a,b){function c(){for(var a={},b=0;b=0;a--)this.children_[a].dispose&&this.children_[a].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),j.removeElData(this.el_),this.el_=null},a.prototype.player=function(){return this.player_},a.prototype.options=function(a){return r["default"].warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),a?(this.options_=x["default"](this.options_,a),this.options_):this.options_},a.prototype.el=function(){return this.el_},a.prototype.createEl=function(a,b,c){return j.createEl(a,b,c)},a.prototype.localize=function(a){var b=this.player_.language&&this.player_.language(),c=this.player_.languages&&this.player_.languages();if(!b||!c)return a;var d=c[b];if(d&&d[a])return d[a];var e=b.split("-")[0],f=c[e];return f&&f[a]?f[a]:a},a.prototype.contentEl=function(){return this.contentEl_||this.el_},a.prototype.id=function(){return this.id_},a.prototype.name=function(){return this.name_},a.prototype.children=function(){return this.children_},a.prototype.getChildById=function(a){return this.childIndex_[a]},a.prototype.getChild=function(a){return this.childNameIndex_[a]},a.prototype.addChild=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?this.children_.length:arguments[2],e=void 0,f=void 0;if("string"==typeof b){f=b,c||(c={}),c===!0&&(r["default"].warn("Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`."),c={});var g=c.componentClass||t["default"](f);c.name=f;var h=a.getComponent(g);if(!h)throw new Error("Component "+g+" does not exist");if("function"!=typeof h)return null;e=new h(this.player_||this,c)}else e=b;if(this.children_.splice(d,0,e),"function"==typeof e.id&&(this.childIndex_[e.id()]=e),f=f||e.name&&e.name(),f&&(this.childNameIndex_[f]=e),"function"==typeof e.el&&e.el()){var i=this.contentEl().children,j=i[d]||null;this.contentEl().insertBefore(e.el(),j)}return e},a.prototype.removeChild=function(a){if("string"==typeof a&&(a=this.getChild(a)),a&&this.children_){for(var b=!1,c=this.children_.length-1;c>=0;c--)if(this.children_[c]===a){b=!0,this.children_.splice(c,1);break}if(b){this.childIndex_[a.id()]=null,this.childNameIndex_[a.name()]=null;var d=a.el();d&&d.parentNode===this.contentEl()&&this.contentEl().removeChild(a.el())}}},a.prototype.initChildren=function(){var b=this,c=this.options_.children;c&&!function(){var d=b.options_,e=function(a){var c=a.name,e=a.opts;if(void 0!==d[c]&&(e=d[c]),e!==!1){e===!0&&(e={}),e.playerOptions=b.options_.playerOptions;var f=b.addChild(c,e);f&&(b[c]=f)}},f=void 0,g=a.getComponent("Tech");f=Array.isArray(c)?c:Object.keys(c),f.concat(Object.keys(b.options_).filter(function(a){return!f.some(function(b){return"string"==typeof b?a===b:a===b.name})})).map(function(a){var d=void 0,e=void 0;return"string"==typeof a?(d=a,e=c[d]||b.options_[d]||{}):(d=a.name,e=a),{name:d,opts:e}}).filter(function(b){var c=a.getComponent(b.opts.componentClass||t["default"](b.name));return c&&!g.isTech(c)}).forEach(e)}()},a.prototype.buildCSSClass=function(){return""},a.prototype.on=function(a,b,c){var d=this;return"string"==typeof a||Array.isArray(a)?p.on(this.el_,a,l.bind(this,b)):!function(){var e=a,f=b,g=l.bind(d,c),h=function(){return d.off(e,f,g)};h.guid=g.guid,d.on("dispose",h);var i=function(){return d.off("dispose",h)};i.guid=g.guid,a.nodeName?(p.on(e,f,g),p.on(e,"dispose",i)):"function"==typeof a.on&&(e.on(f,g),e.on("dispose",i))}(),this},a.prototype.off=function(a,b,c){if(!a||"string"==typeof a||Array.isArray(a))p.off(this.el_,a,b);else{var d=a,e=b,f=l.bind(this,c);this.off("dispose",f),a.nodeName?(p.off(d,e,f),p.off(d,"dispose",f)):(d.off(e,f),d.off("dispose",f))}return this},a.prototype.one=function(a,b,c){var d=this,e=arguments;return"string"==typeof a||Array.isArray(a)?p.one(this.el_,a,l.bind(this,b)):!function(){var f=a,g=b,h=l.bind(d,c),i=function j(){d.off(f,g,j),h.apply(null,e)};i.guid=h.guid,d.on(f,g,i)}(),this},a.prototype.trigger=function(a,b){return p.trigger(this.el_,a,b),this},a.prototype.ready=function(a){var b=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];return a&&(this.isReady_?b?a.call(this):this.setTimeout(a,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(a))),this},a.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var a=this.readyQueue_;this.readyQueue_=[],a&&a.length>0&&a.forEach(function(a){a.call(this)},this),this.trigger("ready")},1)},a.prototype.$=function(a,b){return j.$(a,b||this.contentEl())},a.prototype.$$=function(a,b){return j.$$(a,b||this.contentEl())},a.prototype.hasClass=function(a){return j.hasElClass(this.el_,a)},a.prototype.addClass=function(a){return j.addElClass(this.el_,a),this},a.prototype.removeClass=function(a){return j.removeElClass(this.el_,a),this},a.prototype.toggleClass=function(a,b){return j.toggleElClass(this.el_,a,b),this},a.prototype.show=function(){return this.removeClass("vjs-hidden"),this},a.prototype.hide=function(){return this.addClass("vjs-hidden"),this},a.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},a.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},a.prototype.width=function(a,b){return this.dimension("width",a,b)},a.prototype.height=function(a,b){return this.dimension("height",a,b)},a.prototype.dimensions=function(a,b){return this.width(a,!0).height(b)},a.prototype.dimension=function(a,b,c){if(void 0!==b)return(null===b||b!==b)&&(b=0),this.el_.style[a]=-1!==(""+b).indexOf("%")||-1!==(""+b).indexOf("px")?b:"auto"===b?"":b+"px",c||this.trigger("resize"),this;if(!this.el_)return 0;var d=this.el_.style[a],e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(this.el_["offset"+t["default"](a)],10)},a.prototype.currentDimension=function(a){var b=0;if("width"!==a&&"height"!==a)throw new Error("currentDimension only accepts width or height value");if("function"==typeof h["default"].getComputedStyle){var c=h["default"].getComputedStyle(this.el_);b=c.getPropertyValue(a)||c[a]}else if(this.el_.currentStyle){var d="offset"+t["default"](a);b=this.el_[d]}return b=parseFloat(b)},a.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},a.prototype.currentWidth=function(){return this.currentDimension("width")},a.prototype.currentHeight=function(){return this.currentDimension("height")},a.prototype.emitTapEvents=function(){var a=0,b=null,c=10,d=200,e=void 0;this.on("touchstart",function(c){1===c.touches.length&&(b=v["default"]({},c.touches[0]),a=(new Date).getTime(),e=!0)}),this.on("touchmove",function(a){if(a.touches.length>1)e=!1;else if(b){var d=a.touches[0].pageX-b.pageX,f=a.touches[0].pageY-b.pageY,g=Math.sqrt(d*d+f*f);g>c&&(e=!1)}});var f=function(){e=!1};this.on("touchleave",f),this.on("touchcancel",f),this.on("touchend",function(c){if(b=null,e===!0){var f=(new Date).getTime()-a;d>f&&(c.preventDefault(),this.trigger("tap"))}})},a.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var a=l.bind(this.player(),this.player().reportUserActivity),b=void 0;this.on("touchstart",function(){a(),this.clearInterval(b),b=this.setInterval(a,250)});var c=function(){a(),this.clearInterval(b)};this.on("touchmove",a),this.on("touchend",c),this.on("touchcancel",c)}},a.prototype.setTimeout=function(a,b){a=l.bind(this,a);var c=h["default"].setTimeout(a,b),d=function(){this.clearTimeout(c)};return d.guid="vjs-timeout-"+c,this.on("dispose",d),c},a.prototype.clearTimeout=function(a){h["default"].clearTimeout(a);var b=function(){};return b.guid="vjs-timeout-"+a,this.off("dispose",b),a},a.prototype.setInterval=function(a,b){a=l.bind(this,a);var c=h["default"].setInterval(a,b),d=function(){this.clearInterval(c)};return d.guid="vjs-interval-"+c,this.on("dispose",d),c},a.prototype.clearInterval=function(a){h["default"].clearInterval(a);var b=function(){};return b.guid="vjs-interval-"+a,this.off("dispose",b),a},a.registerComponent=function(b,c){return a.components_||(a.components_={}),a.components_[b]=c,c},a.getComponent=function(b){return a.components_&&a.components_[b]?a.components_[b]:h["default"]&&h["default"].videojs&&h["default"].videojs[b]?(r["default"].warn("The "+b+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),h["default"].videojs[b]):void 0},a.extend=function(b){b=b||{},r["default"].warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var c=b.init||b.init||this.prototype.init||this.prototype.init||function(){},d=function(){c.apply(this,arguments)};d.prototype=Object.create(this.prototype),d.prototype.constructor=d,d.extend=a.extend;for(var e in b)b.hasOwnProperty(e)&&(d.prototype[e]=b[e]);return d},a}();y.registerComponent("Component",y),c["default"]=y,b.exports=c["default"]},{"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/guid.js":138,"./utils/log.js":139,"./utils/merge-options.js":140,"./utils/to-title-case.js":143,"global/window":2,"object.assign":45}],68:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../component.js"),h=d(g),i=a("./play-toggle.js"),j=(d(i),a("./time-controls/current-time-display.js")),k=(d(j),a("./time-controls/duration-display.js")),l=(d(k),a("./time-controls/time-divider.js")),m=(d(l),a("./time-controls/remaining-time-display.js")),n=(d(m),a("./live-display.js")),o=(d(n),a("./progress-control/progress-control.js")),p=(d(o),a("./fullscreen-toggle.js")),q=(d(p),a("./volume-control/volume-control.js")),r=(d(q),a("./volume-menu-button.js")),s=(d(r),a("./mute-toggle.js")),t=(d(s),a("./text-track-controls/chapters-button.js")),u=(d(t),a("./text-track-controls/descriptions-button.js")),v=(d(u),a("./text-track-controls/subtitles-button.js")),w=(d(v),a("./text-track-controls/captions-button.js")),x=(d(w),a("./playback-rate-menu/playback-rate-menu-button.js")),y=(d(x),a("./spacer-controls/custom-control-spacer.js")),z=(d(y),function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},b}(h["default"]));z.prototype.options_={loadEvent:"play",children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","fullscreenToggle"]},h["default"].registerComponent("ControlBar",z),c["default"]=z,b.exports=c["default"]},{"../component.js":67,"./fullscreen-toggle.js":69,"./live-display.js":70,"./mute-toggle.js":71,"./play-toggle.js":72,"./playback-rate-menu/playback-rate-menu-button.js":73,"./progress-control/progress-control.js":78,"./spacer-controls/custom-control-spacer.js":81,"./text-track-controls/captions-button.js":84,"./text-track-controls/chapters-button.js":85,"./text-track-controls/descriptions-button.js":87,"./text-track-controls/subtitles-button.js":89,"./time-controls/current-time-display.js":92,"./time-controls/duration-display.js":93,"./time-controls/remaining-time-display.js":94,"./time-controls/time-divider.js":95,"./volume-control/volume-control.js":97,"./volume-menu-button.js":99}],69:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../button.js"),h=d(g),i=a("../component.js"),j=d(i),k=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.player_.isFullscreen()?(this.player_.exitFullscreen(),this.controlText("Fullscreen")):(this.player_.requestFullscreen(),this.controlText("Non-Fullscreen"))},b}(h["default"]);k.prototype.controlText_="Fullscreen",j["default"].registerComponent("FullscreenToggle",k),c["default"]=k,b.exports=c["default"]},{"../button.js":64,"../component.js":67}],70:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateShowing(),this.on(this.player(),"durationchange",this.updateShowing)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+""+this.localize("LIVE")},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateShowing=function(){this.player().duration()===1/0?this.show():this.hide()},b}(i["default"]);i["default"].registerComponent("LiveDisplay",l),c["default"]=l,b.exports=c["default"]},{"../component":67,"../utils/dom.js":134}],71:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../button"),i=e(h),j=a("../component"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"volumechange",this.update),c.tech_&&c.tech_.featuresVolumeControl===!1&&this.addClass("vjs-hidden"),this.on(c,"loadstart",function(){this.update(),c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.player_.muted(this.player_.muted()?!1:!0)},b.prototype.update=function(){var a=this.player_.volume(),b=3;0===a||this.player_.muted()?b=0:.33>a?b=1:.67>a&&(b=2);var c=this.player_.muted()?"Unmute":"Mute";this.controlText()!==c&&this.controlText(c);for(var d=0;4>d;d++)m.removeElClass(this.el_,"vjs-vol-"+d);m.addElClass(this.el_,"vjs-vol-"+b)},b}(i["default"]);n.prototype.controlText_="Mute",k["default"].registerComponent("MuteToggle",n),c["default"]=n,b.exports=c["default"]},{"../button":64,"../component":67,"../utils/dom.js":134}],72:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../button.js"),h=d(g),i=a("../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b),a.call(this,c,d),this.on(c,"play",this.handlePlay),this.on(c,"pause",this.handlePause)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-play-control "+a.prototype.buildCSSClass.call(this)},b.prototype.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},b.prototype.handlePlay=function(){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},b.prototype.handlePause=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},b}(h["default"]);k.prototype.controlText_="Play",j["default"].registerComponent("PlayToggle",k),c["default"]=k,b.exports=c["default"]},{"../button.js":64,"../component.js":67}],73:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-button.js"),i=e(h),j=a("../../menu/menu.js"),k=e(j),l=a("./playback-rate-menu-item.js"),m=e(l),n=a("../../component.js"),o=e(n),p=a("../../utils/dom.js"),q=d(p),r=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateVisibility(),this.updateLabel(),this.on(c,"loadstart",this.updateVisibility),this.on(c,"ratechange",this.updateLabel)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this);return this.labelEl_=q.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),b.appendChild(this.labelEl_),b},b.prototype.buildCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildCSSClass.call(this)},b.prototype.createMenu=function(){var a=new k["default"](this.player()),b=this.playbackRates();if(b)for(var c=b.length-1;c>=0;c--)a.addChild(new m["default"](this.player(),{rate:b[c]+"x"}));return a},b.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},b.prototype.handleClick=function(){for(var a=this.player().playbackRate(),b=this.playbackRates(),c=b[0],d=0;da){c=b[d];break}this.player().playbackRate(c)},b.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},b.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},b.prototype.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},b.prototype.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},b}(i["default"]);r.prototype.controlText_="Playback Rate",o["default"].registerComponent("PlaybackRateMenuButton",r),c["default"]=r,b.exports=c["default"]},{"../../component.js":67,"../../menu/menu-button.js":106,"../../menu/menu.js":108,"../../utils/dom.js":134,"./playback-rate-menu-item.js":74}],74:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../menu/menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b);var f=d.rate,g=parseFloat(f,10);d.label=f,d.selected=1===g,a.call(this,c,d),this.label=f,this.rate=g,this.on(c,"ratechange",this.update)}return f(b,a),b.prototype.handleClick=function(){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},b.prototype.update=function(){this.selected(this.player().playbackRate()===this.rate)},b}(h["default"]);k.prototype.contentElType="button",j["default"].registerComponent("PlaybackRateMenuItem",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"../../menu/menu-item.js":107}],75:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"progress",this.update)}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},b.prototype.update=function(){var a=this.player_.buffered(),b=this.player_.duration(),c=this.player_.bufferedEnd(),d=this.el_.children,e=function(a,b){var c=a/b||0;return 100*(c>=1?1:c)+"%"};this.el_.style.width=e(c,b);for(var f=0;fa.length;f--)this.el_.removeChild(d[f-1])},b}(i["default"]);i["default"].registerComponent("LoadProgressBar",l),c["default"]=l,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134}],76:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/dom.js"),m=d(l),n=a("../../utils/fn.js"),o=d(n),p=a("../../utils/format-time.js"),q=e(p),r=a("lodash-compat/function/throttle"),s=e(r),t=function(a){function b(c,d){var e=this;f(this,b),a.call(this,c,d),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&(this.tooltip=m.createEl("div",{className:"vjs-time-tooltip"}),this.el().appendChild(this.tooltip),this.addClass("vjs-keep-tooltips-inside")),this.update(0,0),c.on("ready",function(){e.on(c.controlBar.progressControl.el(),"mousemove",s["default"](o.bind(e,e.handleMouseMove),25))})}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},b.prototype.handleMouseMove=function(a){var b=this.player_.duration(),c=this.calculateDistance(a)*b,d=a.pageX-m.findElPosition(this.el().parentNode).left;this.update(c,d)},b.prototype.update=function(a,b){var c=q["default"](a,this.player_.duration());if(this.el().style.left=b+"px",this.el().setAttribute("data-current-time",c),this.keepTooltipsInside){var d=this.clampPosition_(b),e=b-d+1,f=parseFloat(i["default"].getComputedStyle(this.tooltip).width),g=f/2;this.tooltip.innerHTML=c,this.tooltip.style.right="-"+(g-e)+"px"}},b.prototype.calculateDistance=function(a){return m.getPointerPosition(this.el().parentNode,a).x},b.prototype.clampPosition_=function(a){if(!this.keepTooltipsInside)return a;var b=parseFloat(i["default"].getComputedStyle(this.player().el()).width),c=parseFloat(i["default"].getComputedStyle(this.tooltip).width),d=c/2,e=a;return d>a?e=Math.ceil(d):a>b-d&&(e=Math.floor(b-d)),e},b}(k["default"]);k["default"].registerComponent("MouseTimeDisplay",t),c["default"]=t,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137,"global/window":2,"lodash-compat/function/throttle":7}],77:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/fn.js"),k=d(j),l=a("../../utils/dom.js"),m=(d(l),a("../../utils/format-time.js")),n=e(m),o=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateDataAttr(),this.on(c,"timeupdate",this.updateDataAttr),c.ready(k.bind(this,this.updateDataAttr)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&this.addClass("vjs-keep-tooltips-inside")}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},b.prototype.updateDataAttr=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("data-current-time",n["default"](a,this.player_.duration()))},b}(i["default"]);i["default"].registerComponent("PlayProgressBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137}],78:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=a("./seek-bar.js"),j=(d(i),a("./mouse-time-display.js")),k=(d(j),function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},b}(h["default"]));k.prototype.options_={children:["seekBar"]},h["default"].registerComponent("ProgressControl",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./mouse-time-display.js":76,"./seek-bar.js":79}],79:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0, -configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("global/window"),i=e(h),j=a("../../slider/slider.js"),k=e(j),l=a("../../component.js"),m=e(l),n=a("./load-progress-bar.js"),o=(e(n),a("./play-progress-bar.js")),p=(e(o),a("./tooltip-progress-bar.js")),q=(e(p),a("../../utils/fn.js")),r=d(q),s=a("../../utils/format-time.js"),t=e(s),u=a("object.assign"),v=(e(u),function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.updateProgress),this.on(c,"ended",this.updateProgress),c.ready(r.bind(this,this.updateProgress)),d.playerOptions&&d.playerOptions.controlBar&&d.playerOptions.controlBar.progressControl&&d.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=d.playerOptions.controlBar.progressControl.keepTooltipsInside),this.keepTooltipsInside&&(this.tooltipProgressBar=this.addChild("TooltipProgressBar"))}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},b.prototype.updateProgress=function(){if(this.updateAriaAttributes(this.el_),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.el_),this.tooltipProgressBar.el_.style.width=this.bar.el_.style.width;var a=parseFloat(i["default"].getComputedStyle(this.player().el()).width),b=parseFloat(i["default"].getComputedStyle(this.tooltipProgressBar.tooltip).width),c=this.tooltipProgressBar.el().style;c.maxWidth=Math.floor(a-b/2)+"px",c.minWidth=Math.ceil(b/2)+"px",c.right="-"+b/2+"px"}},b.prototype.updateAriaAttributes=function(a){var b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),a.setAttribute("aria-valuetext",t["default"](b,this.player_.duration()))},b.prototype.getPercent=function(){var a=this.player_.currentTime()/this.player_.duration();return a>=1?1:a},b.prototype.handleMouseDown=function(b){a.prototype.handleMouseDown.call(this,b),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause()},b.prototype.handleMouseMove=function(a){var b=this.calculateDistance(a)*this.player_.duration();b===this.player_.duration()&&(b-=.1),this.player_.currentTime(b)},b.prototype.handleMouseUp=function(b){a.prototype.handleMouseUp.call(this,b),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()},b.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},b.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},b}(k["default"]));v.prototype.options_={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},v.prototype.playerEvent="timeupdate",m["default"].registerComponent("SeekBar",v),c["default"]=v,b.exports=c["default"]},{"../../component.js":67,"../../slider/slider.js":116,"../../utils/fn.js":136,"../../utils/format-time.js":137,"./load-progress-bar.js":75,"./play-progress-bar.js":77,"./tooltip-progress-bar.js":80,"global/window":2,"object.assign":45}],80:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/fn.js"),k=d(j),l=a("../../utils/dom.js"),m=(d(l),a("../../utils/format-time.js")),n=e(m),o=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.updateDataAttr(),this.on(c,"timeupdate",this.updateDataAttr),c.ready(k.bind(this,this.updateDataAttr))}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar",innerHTML:'
    \n '+this.localize("Progress")+": 0%"});return this.tooltip=b.querySelector(".vjs-time-tooltip"),b},b.prototype.updateDataAttr=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),b=n["default"](a,this.player_.duration());this.el_.setAttribute("data-current-time",b),this.tooltip.innerHTML=b},b}(i["default"]);i["default"].registerComponent("TooltipProgressBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/format-time.js":137}],81:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./spacer.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,{className:this.buildCSSClass()});return b.innerHTML=" ",b},b}(h["default"]);j["default"].registerComponent("CustomControlSpacer",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./spacer.js":82}],82:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-spacer "+a.prototype.buildCSSClass.call(this)},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b}(h["default"]);h["default"].registerComponent("Spacer",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":67}],83:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b),d.track={kind:d.kind,player:c,label:d.kind+" settings",selectable:!1,"default":!1,mode:"disabled"},d.selectable=!1,a.call(this,c,d),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+d.kind+" settings dialog")}return f(b,a),b.prototype.handleClick=function(){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").el_.focus()},b}(h["default"]);j["default"].registerComponent("CaptionSettingsMenuItem",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./text-track-menu-item.js":91}],84:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-button.js"),h=d(g),i=a("../../component.js"),j=d(i),k=a("./caption-settings-menu-item.js"),l=d(k),m=function(a){function b(c,d,f){e(this,b),a.call(this,c,d,f),this.el_.setAttribute("aria-label","Captions Menu")}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-captions-button "+a.prototype.buildCSSClass.call(this)},b.prototype.update=function(){var b=2;a.prototype.update.call(this),this.player().tech_&&this.player().tech_.featuresNativeTextTracks&&(b=1),this.items&&this.items.length>b?this.show():this.hide()},b.prototype.createItems=function(){var b=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||b.push(new l["default"](this.player_,{kind:this.kind_})),a.prototype.createItems.call(this,b)},b}(h["default"]);m.prototype.kind_="captions",m.prototype.controlText_="Captions",j["default"].registerComponent("CaptionsButton",m),c["default"]=m,b.exports=c["default"]},{"../../component.js":67,"./caption-settings-menu-item.js":83,"./text-track-button.js":90}],85:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./text-track-button.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("./text-track-menu-item.js"),m=e(l),n=a("./chapters-track-menu-item.js"),o=e(n),p=a("../../menu/menu.js"),q=e(p),r=a("../../utils/dom.js"),s=d(r),t=a("../../utils/fn.js"),u=(d(t),a("../../utils/to-title-case.js")),v=e(u),w=a("global/window"),x=(e(w),function(a){function b(c,d,e){f(this,b),a.call(this,c,d,e),this.el_.setAttribute("aria-label","Chapters Menu")}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-chapters-button "+a.prototype.buildCSSClass.call(this)},b.prototype.createItems=function(){var a=[],b=this.player_.textTracks();if(!b)return a;for(var c=0;ce;e++){var g=b[e];if(g.kind===this.kind_){c=g;break}}var h=this.menu;if(void 0===h){h=new q["default"](this.player_);var i=s.createEl("li",{className:"vjs-menu-title",innerHTML:v["default"](this.kind_),tabIndex:-1});h.children_.unshift(i),s.insertElFirst(i,h.contentEl())}if(c&&null==c.cues){c.mode="hidden";var j=this.player_.remoteTextTrackEls().getTrackElementByTrack_(c);j&&j.addEventListener("load",function(){return a.update()})}if(c&&c.cues&&c.cues.length>0){for(var k=c.cues,l=void 0,e=0,m=k.length;m>e;e++){l=k[e];var n=new o["default"](this.player_,{track:c,cue:l});d.push(n),h.addChild(n)}this.addChild(h)}return this.items.length>0&&this.show(),h},b}(i["default"]));x.prototype.kind_="chapters",x.prototype.controlText_="Chapters",k["default"].registerComponent("ChaptersButton",x),c["default"]=x,b.exports=c["default"]},{"../../component.js":67,"../../menu/menu.js":108,"../../utils/dom.js":134,"../../utils/fn.js":136,"../../utils/to-title-case.js":143,"./chapters-track-menu-item.js":86,"./text-track-button.js":90,"./text-track-menu-item.js":91,"global/window":2}],86:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-item.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=function(a){function b(c,d){f(this,b);var e=d.track,g=d.cue,h=c.currentTime();d.label=g.text,d.selected=g.startTime<=h&&hc;c++){var e=a[c];if(e.kind!==this.kind_&&"showing"===e.mode){b=!0;break}}b?this.disable():this.enable()},b.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildCSSClass.call(this)},b}(i["default"]);n.prototype.kind_="descriptions",n.prototype.controlText_="Descriptions",k["default"].registerComponent("DescriptionsButton",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":67,"../../utils/fn.js":136,"./text-track-button.js":90}],88:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-menu-item.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d){e(this,b),d.track={kind:d.kind,player:c,label:d.kind+" off","default":!1,mode:"disabled"},d.selectable=!0,a.call(this,c,d),this.selected(!0)}return f(b,a),b.prototype.handleTracksChange=function(){for(var a=this.player().textTracks(),b=!0,c=0,d=a.length;d>c;c++){var e=a[c];if(e.kind===this.track.kind&&"showing"===e.mode){b=!1;break}}this.selected(b)},b}(h["default"]);j["default"].registerComponent("OffTextTrackMenuItem",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./text-track-menu-item.js":91}],89:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("./text-track-button.js"),h=d(g),i=a("../../component.js"),j=d(i),k=function(a){function b(c,d,f){e(this,b),a.call(this,c,d,f),this.el_.setAttribute("aria-label","Subtitles Menu")}return f(b,a),b.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+a.prototype.buildCSSClass.call(this)},b}(h["default"]);k.prototype.kind_="subtitles",k.prototype.controlText_="Subtitles",j["default"].registerComponent("SubtitlesButton",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":67,"./text-track-button.js":90}],90:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../menu/menu-button.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=a("./text-track-menu-item.js"),o=e(n),p=a("./off-text-track-menu-item.js"),q=e(p),r=function(a){function b(c,d){f(this,b),a.call(this,c,d);var e=this.player_.textTracks();if(this.items.length<=1&&this.hide(),e){var g=m.bind(this,this.update);e.addEventListener("removetrack",g),e.addEventListener("addtrack",g),this.player_.on("dispose",function(){e.removeEventListener("removetrack",g),e.removeEventListener("addtrack",g)})}}return g(b,a),b.prototype.createItems=function(){var a=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];a.push(new q["default"](this.player_,{kind:this.kind_}));var b=this.player_.textTracks();if(!b)return a;for(var c=0;cCurrent Time 0:00'},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){var a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),b=this.localize("Current Time"),c=m["default"](a,this.player_.duration());c!==this.formattedTime_&&(this.formattedTime_=c,this.contentEl_.innerHTML=''+b+" "+c)},b}(i["default"]);i["default"].registerComponent("CurrentTimeDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],93:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=a("../../utils/format-time.js"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.updateContent),this.on(c,"loadedmetadata",this.updateContent)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-duration-display",innerHTML:''+this.localize("Duration Time")+" 0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){var a=this.player_.duration();if(a&&this.duration_!==a){this.duration_=a;var b=this.localize("Duration Time"),c=m["default"](a);this.contentEl_.innerHTML=''+b+" "+c}},b}(i["default"]);i["default"].registerComponent("DurationDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],94:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../component.js"),i=e(h),j=a("../../utils/dom.js"),k=d(j),l=a("../../utils/format-time.js"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"timeupdate",this.updateContent)}return g(b,a),b.prototype.createEl=function(){var b=a.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.contentEl_=k.createEl("div",{className:"vjs-remaining-time-display",innerHTML:''+this.localize("Remaining Time")+" -0:00"},{"aria-live":"off"}),b.appendChild(this.contentEl_),b},b.prototype.updateContent=function(){if(this.player_.duration()){var a=this.localize("Remaining Time"),b=m["default"](this.player_.remainingTime());b!==this.formattedTime_&&(this.formattedTime_=b,this.contentEl_.innerHTML=''+a+" -"+b)}},b}(i["default"]);i["default"].registerComponent("RemainingTimeDisplay",n),c["default"]=n,b.exports=c["default"]},{"../../component.js":67,"../../utils/dom.js":134,"../../utils/format-time.js":137}],95:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
    /
    "})},b}(h["default"]);h["default"].registerComponent("TimeDivider",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":67}],96:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../../slider/slider.js"),i=e(h),j=a("../../component.js"),k=e(j),l=a("../../utils/fn.js"),m=d(l),n=a("./volume-level.js"),o=(e(n),function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"volumechange",this.updateARIAAttributes),c.ready(m.bind(this,this.updateARIAAttributes))}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},b.prototype.handleMouseMove=function(a){this.checkMuted(),this.player_.volume(this.calculateDistance(a))},b.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},b.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},b.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},b.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},b.prototype.updateARIAAttributes=function(){var a=(100*this.player_.volume()).toFixed(2);this.el_.setAttribute("aria-valuenow",a),this.el_.setAttribute("aria-valuetext",a+"%")},b}(i["default"]));o.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},o.prototype.playerEvent="volumechange",k["default"].registerComponent("VolumeBar",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":67,"../../slider/slider.js":116,"../../utils/fn.js":136,"./volume-level.js":98}],97:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=a("./volume-bar.js"),j=(d(i),function(a){function b(c,d){e(this,b),a.call(this,c,d),c.tech_&&c.tech_.featuresVolumeControl===!1&&this.addClass("vjs-hidden"),this.on(c,"loadstart",function(){c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},b}(h["default"]));j.prototype.options_={children:["volumeBar"]},h["default"].registerComponent("VolumeControl",j),c["default"]=j,b.exports=c["default"]},{"../../component.js":67,"./volume-bar.js":96}],98:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../../component.js"),h=d(g),i=function(a){function b(){e(this,b),a.apply(this,arguments)}return f(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},b}(h["default"]);h["default"].registerComponent("VolumeLevel",i),c["default"]=i,b.exports=c["default"]},{"../../component.js":67}],99:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function"); - -}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../utils/fn.js"),i=e(h),j=a("../component.js"),k=d(j),l=a("../popup/popup.js"),m=d(l),n=a("../popup/popup-button.js"),o=d(n),p=a("./mute-toggle.js"),q=d(p),r=a("./volume-control/volume-bar.js"),s=d(r),t=function(a){function b(c){function d(){c.tech_&&c.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),void 0===e.inline&&(e.inline=!0),void 0===e.vertical&&(e.vertical=e.inline?!1:!0),e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=!!e.vertical,a.call(this,c,e),this.on(c,"volumechange",this.volumeUpdate),this.on(c,"loadstart",this.volumeUpdate),d.call(this),this.on(c,"loadstart",d),this.on(this.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")}),this.on(this.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")}),this.on(this.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")}),this.on(this.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")})}return g(b,a),b.prototype.buildCSSClass=function(){var b="";return b=this.options_.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+a.prototype.buildCSSClass.call(this)+" "+b},b.prototype.createPopup=function(){var a=new m["default"](this.player_,{contentElType:"div"}),b=new s["default"](this.player_,this.options_.volumeBar);return a.addChild(b),this.menuContent=a,this.volumeBar=b,this.attachVolumeBarEvents(),a},b.prototype.handleClick=function(){q["default"].prototype.handleClick.call(this),a.prototype.handleClick.call(this)},b.prototype.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],i.bind(this,this.handleMouseDown))},b.prototype.handleMouseDown=function(){this.on(["mousemove","touchmove"],i.bind(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.el_.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},b.prototype.handleMouseUp=function(){this.off(["mousemove","touchmove"],i.bind(this.volumeBar,this.volumeBar.handleMouseMove))},b}(o["default"]);t.prototype.volumeUpdate=q["default"].prototype.update,t.prototype.controlText_="Mute",k["default"].registerComponent("VolumeMenuButton",t),c["default"]=t,b.exports=c["default"]},{"../component.js":67,"../popup/popup-button.js":112,"../popup/popup.js":113,"../utils/fn.js":136,"./mute-toggle.js":71,"./volume-control/volume-bar.js":96}],100:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component"),i=e(h),j=a("./modal-dialog"),k=e(j),l=a("./utils/dom"),m=(d(l),a("./utils/merge-options")),n=e(m),o=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.on(c,"error",this.open)}return g(b,a),b.prototype.buildCSSClass=function(){return"vjs-error-display "+a.prototype.buildCSSClass.call(this)},b.prototype.content=function(){var a=this.player().error();return a?this.localize(a.message):""},b}(k["default"]);o.prototype.options_=n["default"](k["default"].prototype.options_,{fillAlways:!0,temporary:!1,uncloseable:!0}),i["default"].registerComponent("ErrorDisplay",o),c["default"]=o,b.exports=c["default"]},{"./component":67,"./modal-dialog":109,"./utils/dom":134,"./utils/merge-options":140}],101:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}c.__esModule=!0;var e=a("./utils/events.js"),f=d(e),g=function(){};g.prototype.allowedEvents_={},g.prototype.on=function(a,b){var c=this.addEventListener;this.addEventListener=Function.prototype,f.on(this,a,b),this.addEventListener=c},g.prototype.addEventListener=g.prototype.on,g.prototype.off=function(a,b){f.off(this,a,b)},g.prototype.removeEventListener=g.prototype.off,g.prototype.one=function(a,b){f.one(this,a,b)},g.prototype.trigger=function(a){var b=a.type||a;"string"==typeof a&&(a={type:b}),a=f.fixEvent(a),this.allowedEvents_[b]&&this["on"+b]&&this["on"+b](a),f.trigger(this,a)},g.prototype.dispatchEvent=g.prototype.trigger,c["default"]=g,b.exports=c["default"]},{"./utils/events.js":135}],102:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("./utils/log"),f=d(e),g=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.super_=b)},h=function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=function(){a.apply(this,arguments)},d={};"object"==typeof b?("function"==typeof b.init&&(f["default"].warn("Constructor logic via init() is deprecated; please use constructor() instead."),b.constructor=b.init),b.constructor!==Object.prototype.constructor&&(c=b.constructor),d=b):"function"==typeof b&&(c=b),g(c,a);for(var e in d)d.hasOwnProperty(e)&&(c.prototype[e]=d[e]);return c};c["default"]=h,b.exports=c["default"]},{"./utils/log":139}],103:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;for(var e=a("global/document"),f=d(e),g={},h=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=h[0],j=void 0,k=0;k1&&this.show()},b.prototype.createMenu=function(){var a=new m["default"](this.player_);if(this.options_.title){var b=o.createEl("li",{className:"vjs-menu-title",innerHTML:s["default"](this.options_.title),tabIndex:-1});a.children_.unshift(b),o.insertElFirst(b,a.contentEl())}if(this.items=this.createItems(),this.items)for(var c=0;c0&&(0>a?a=0:a>=b.length&&(a=b.length-1),this.focusedChild_=a,b[a].el_.focus())},b}(i["default"]);i["default"].registerComponent("Menu",p),c["default"]=p,b.exports=c["default"]},{"../component.js":67,"../utils/dom.js":134,"../utils/events.js":135,"../utils/fn.js":136}],109:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./utils/dom"),i=e(h),j=a("./utils/fn"),k=e(j),l=a("./utils/log"),m=(d(l),a("./component")),n=d(m),o=a("./close-button"),p=(d(o),"vjs-modal-dialog"),q=27,r=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=i.createEl("div",{className:p+"-content"},{role:"document"}),this.descEl_=i.createEl("p",{className:p+"-description vjs-offscreen",id:this.el().getAttribute("aria-describedby")}),i.textContent(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},b.prototype.buildCSSClass=function(){return p+" vjs-hidden "+a.prototype.buildCSSClass.call(this)},b.prototype.handleKeyPress=function(a){a.which===q&&this.closeable()&&this.close()},b.prototype.label=function(){return this.options_.label||this.localize("Modal Window")},b.prototype.description=function(){var a=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(a+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),a},b.prototype.open=function(){if(!this.opened_){var a=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!a.paused(),this.wasPlaying_&&a.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",k.bind(this,this.handleKeyPress)),a.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}return this},b.prototype.opened=function(a){return"boolean"==typeof a&&this[a?"open":"close"](),this.opened_},b.prototype.close=function(){if(this.opened_){var a=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&a.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",k.bind(this,this.handleKeyPress)),a.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.options_.temporary&&this.dispose()}return this},b.prototype.closeable=function c(a){if("boolean"==typeof a){var c=this.closeable_=!!a,b=this.getChild("closeButton");if(c&&!b){var d=this.contentEl_;this.contentEl_=this.el_,b=this.addChild("closeButton"),this.contentEl_=d,this.on(b,"close",this.close)}!c&&b&&(this.off(b,"close",this.close),this.removeChild(b),b.dispose())}return this.closeable_},b.prototype.fill=function(){return this.fillWith(this.content())},b.prototype.fillWith=function(a){var b=this.contentEl(),c=b.parentNode,d=b.nextSibling;return this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,c.removeChild(b),this.empty(),i.insertContent(b,a),this.trigger("modalfill"),d?c.insertBefore(b,d):c.appendChild(b),this},b.prototype.empty=function(){return this.trigger("beforemodalempty"),i.emptyEl(this.contentEl()),this.trigger("modalempty"),this},b.prototype.content=function(a){return"undefined"!=typeof a&&(this.content_=a),this.content_},b}(n["default"]);r.prototype.options_={temporary:!0},n["default"].registerComponent("ModalDialog",r),c["default"]=r,b.exports=c["default"]},{"./close-button":66,"./component":67,"./utils/dom":134,"./utils/fn":136,"./utils/log":139}],110:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./component.js"),i=e(h),j=a("global/document"),k=e(j),l=a("global/window"),m=e(l),n=a("./utils/events.js"),o=d(n),p=a("./utils/dom.js"),q=d(p),r=a("./utils/fn.js"),s=d(r),t=a("./utils/guid.js"),u=d(t),v=a("./utils/browser.js"),w=d(v),x=a("./utils/log.js"),y=e(x),z=a("./utils/to-title-case.js"),A=e(z),B=a("./utils/time-ranges.js"),C=a("./utils/buffer.js"),D=a("./utils/stylesheet.js"),E=d(D),F=a("./fullscreen-api.js"),G=e(F),H=a("./media-error.js"),I=e(H),J=a("safe-json-parse/tuple"),K=e(J),L=a("object.assign"),M=e(L),N=a("./utils/merge-options.js"),O=e(N),P=a("./tracks/text-track-list-converter.js"),Q=e(P),R=a("./tech/loader.js"),S=(e(R),a("./poster-image.js")),T=(e(S),a("./tracks/text-track-display.js")),U=(e(T),a("./loading-spinner.js")),V=(e(U),a("./big-play-button.js")),W=(e(V),a("./control-bar/control-bar.js")),X=(e(W),a("./error-display.js")),Y=(e(X),a("./tracks/text-track-settings.js")),Z=(e(Y),a("./modal-dialog")),$=e(Z),_=a("./tech/tech.js"),aa=e(_),ba=a("./tech/html5.js"),ca=(e(ba),function(a){function b(c,d,e){var g=this;if(f(this,b),c.id=c.id||"vjs_video_"+u.newGUID(),d=M["default"](b.getTagSettings(c),d),d.initChildren=!1,d.createEl=!1,d.reportTouchActivity=!1,a.call(this,null,d,e),!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");this.tag=c,this.tagAttributes=c&&q.getElAttributes(c),this.language(this.options_.language),d.languages?!function(){var a={};Object.getOwnPropertyNames(d.languages).forEach(function(b){a[b.toLowerCase()]=d.languages[b]}),g.languages_=a}():this.languages_=b.prototype.options_.languages,this.cache_={},this.poster_=d.poster||"",this.controls_=!!d.controls,c.controls=!1,this.scrubbing_=!1,this.el_=this.createEl();var h=O["default"](this.options_);d.plugins&&!function(){var a=d.plugins;Object.getOwnPropertyNames(a).forEach(function(b){"function"==typeof this[b]?this[b](a[b]):y["default"].error("Unable to find plugin:",b)},g)}(),this.options_.playerOptions=h,this.initChildren(),this.isAudio("audio"===c.nodeName.toLowerCase()),this.addClass(this.controls()?"vjs-controls-enabled":"vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label","audio player"):this.el_.setAttribute("aria-label","video player"),this.isAudio()&&this.addClass("vjs-audio"),this.flexNotSupported_()&&this.addClass("vjs-no-flex"),w.IS_IOS||this.addClass("vjs-workinghover"),b.players[this.id_]=this,this.userActive(!0),this.reportUserActivity(),this.listenForUserActivity_(),this.on("fullscreenchange",this.handleFullscreenChange_),this.on("stageclick",this.handleStageClick_)}return g(b,a),b.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_),b.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&this.tech_.dispose(),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var b=this.el_=a.prototype.createEl.call(this,"div"),c=this.tag;c.removeAttribute("width"),c.removeAttribute("height");var d=q.getElAttributes(c);if(Object.getOwnPropertyNames(d).forEach(function(a){"class"===a?b.className=d[a]:b.setAttribute(a,d[a])}),c.playerId=c.id,c.id+="_html5_api",c.className="vjs-tech",c.player=b.player=this,this.addClass("vjs-paused"),m["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=E.createStyleElement("vjs-styles-dimensions");var e=q.$(".vjs-styles-defaults"),f=q.$("head");f.insertBefore(this.styleEl_,e?e.nextSibling:f.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var g=c.getElementsByTagName("a"),h=0;h=0&&(c.width=a),b>=0&&(c.height=b)))}var d=void 0,e=void 0,f=void 0,g=void 0;f=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9";var h=f.split(":"),i=h[1]/h[0];d=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,e=void 0!==this.height_?this.height_:d*i,g=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(g),E.setTextContent(this.styleEl_,"\n ."+g+" {\n width: "+d+"px;\n height: "+e+"px;\n }\n\n ."+g+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")},b.prototype.loadTech_=function(a,b){this.tech_&&this.unloadTech_(),"Html5"!==a&&this.tag&&(aa["default"].getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=a,this.isReady_=!1;var c=M["default"]({nativeControlsForTouch:this.options_.nativeControlsForTouch,source:b,playerId:this.id(),techId:this.id()+"_"+a+"_api",textTracks:this.textTracks_,autoplay:this.options_.autoplay,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),"vtt.js":this.options_["vtt.js"]},this.options_[a.toLowerCase()]);this.tag&&(c.tag=this.tag),b&&(this.currentType_=b.type,b.src===this.cache_.src&&this.cache_.currentTime>0&&(c.startTime=this.cache_.currentTime),this.cache_.src=b.src);var d=aa["default"].getTech(a);d||(d=i["default"].getComponent(a)),this.tech_=new d(c),this.tech_.ready(s.bind(this,this.handleTechReady_),!0),Q["default"].jsonToTextTracks(this.textTracksJson_||[],this.tech_),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"progress",this.handleTechProgress_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"suspend",this.handleTechSuspend_),this.on(this.tech_,"abort",this.handleTechAbort_),this.on(this.tech_,"emptied",this.handleTechEmptied_),this.on(this.tech_,"stalled",this.handleTechStalled_),this.on(this.tech_,"loadedmetadata",this.handleTechLoadedMetaData_),this.on(this.tech_,"loadeddata",this.handleTechLoadedData_),this.on(this.tech_,"timeupdate",this.handleTechTimeUpdate_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.on(this.tech_,"volumechange",this.handleTechVolumeChange_),this.on(this.tech_,"texttrackchange",this.handleTechTextTrackChange_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===a&&this.tag||q.insertElFirst(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},b.prototype.unloadTech_=function(){this.textTracks_=this.textTracks(),this.textTracksJson_=Q["default"].textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},b.prototype.tech=function(a){if(a&&a.IWillNotUseThisInPlugins)return this.tech_;var b="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw m["default"].alert(b),new Error(b)},b.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},b.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},b.prototype.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),this.src()&&this.tag&&this.options_.autoplay&&this.paused()&&(delete this.tag.poster,this.play())},b.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},b.prototype.hasStarted=function(a){return void 0!==a?(this.hasStarted_!==a&&(this.hasStarted_=a,a?(this.addClass("vjs-has-started"), -this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_},b.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},b.prototype.handleTechWaiting_=function(){var a=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return a.removeClass("vjs-waiting")})},b.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},b.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},b.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},b.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},b.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},b.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&this.currentTime(this.options_.starttime),this.addClass("vjs-has-started"),this.trigger("firstplay")},b.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},b.prototype.handleTechProgress_=function(){this.trigger("progress")},b.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},b.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},b.prototype.handleTechClick_=function(a){0===a.button&&this.controls()&&(this.paused()?this.play():this.pause())},b.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},b.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},b.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},b.prototype.handleTechTouchEnd_=function(a){a.preventDefault()},b.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},b.prototype.handleStageClick_=function(){this.reportUserActivity()},b.prototype.handleTechFullscreenChange_=function(a,b){b&&this.isFullscreen(b.isFullscreen),this.trigger("fullscreenchange")},b.prototype.handleTechError_=function(){var a=this.tech_.error();this.error(a&&a.code)},b.prototype.handleTechSuspend_=function(){this.trigger("suspend")},b.prototype.handleTechAbort_=function(){this.trigger("abort")},b.prototype.handleTechEmptied_=function(){this.trigger("emptied")},b.prototype.handleTechStalled_=function(){this.trigger("stalled")},b.prototype.handleTechLoadedMetaData_=function(){this.trigger("loadedmetadata")},b.prototype.handleTechLoadedData_=function(){this.trigger("loadeddata")},b.prototype.handleTechTimeUpdate_=function(){this.trigger("timeupdate")},b.prototype.handleTechRateChange_=function(){this.trigger("ratechange")},b.prototype.handleTechVolumeChange_=function(){this.trigger("volumechange")},b.prototype.handleTechTextTrackChange_=function(){this.trigger("texttrackchange")},b.prototype.getCache=function(){return this.cache_},b.prototype.techCall_=function(a,b){if(this.tech_&&!this.tech_.isReady_)this.tech_.ready(function(){this[a](b)},!0);else try{this.tech_[a](b)}catch(c){throw y["default"](c),c}},b.prototype.techGet_=function(a){if(this.tech_&&this.tech_.isReady_)try{return this.tech_[a]()}catch(b){throw void 0===this.tech_[a]?y["default"]("Video.js: "+a+" method not defined for "+this.techName_+" playback technology.",b):"TypeError"===b.name?(y["default"]("Video.js: "+a+" unavailable on "+this.techName_+" playback technology element.",b),this.tech_.isReady_=!1):y["default"](b),b}},b.prototype.play=function(){return this.techCall_("play"),this},b.prototype.pause=function(){return this.techCall_("pause"),this},b.prototype.paused=function(){return this.techGet_("paused")===!1?!1:!0},b.prototype.scrubbing=function(a){return void 0!==a?(this.scrubbing_=!!a,a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_},b.prototype.currentTime=function(a){return void 0!==a?(this.techCall_("setCurrentTime",a),this):this.cache_.currentTime=this.techGet_("currentTime")||0},b.prototype.duration=function(a){return void 0===a?this.cache_.duration||0:(a=parseFloat(a)||0,0>a&&(a=1/0),a!==this.cache_.duration&&(this.cache_.duration=a,a===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},b.prototype.remainingTime=function(){return this.duration()-this.currentTime()},b.prototype.buffered=function c(){var c=this.techGet_("buffered");return c&&c.length||(c=B.createTimeRange(0,0)),c},b.prototype.bufferedPercent=function(){return C.bufferedPercent(this.buffered(),this.duration())},b.prototype.bufferedEnd=function(){var a=this.buffered(),b=this.duration(),c=a.end(a.length-1);return c>b&&(c=b),c},b.prototype.volume=function(a){var b=void 0;return void 0!==a?(b=Math.max(0,Math.min(1,parseFloat(a))),this.cache_.volume=b,this.techCall_("setVolume",b),this):(b=parseFloat(this.techGet_("volume")),isNaN(b)?1:b)},b.prototype.muted=function(a){return void 0!==a?(this.techCall_("setMuted",a),this):this.techGet_("muted")||!1},b.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},b.prototype.isFullscreen=function(a){return void 0!==a?(this.isFullscreen_=!!a,this):!!this.isFullscreen_},b.prototype.requestFullscreen=function(){var a=G["default"];return this.isFullscreen(!0),a.requestFullscreen?(o.on(k["default"],a.fullscreenchange,s.bind(this,function b(){this.isFullscreen(k["default"][a.fullscreenElement]),this.isFullscreen()===!1&&o.off(k["default"],a.fullscreenchange,b),this.trigger("fullscreenchange")})),this.el_[a.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},b.prototype.exitFullscreen=function(){var a=G["default"];return this.isFullscreen(!1),a.requestFullscreen?k["default"][a.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},b.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=k["default"].documentElement.style.overflow,o.on(k["default"],"keydown",s.bind(this,this.fullWindowOnEscKey)),k["default"].documentElement.style.overflow="hidden",q.addElClass(k["default"].body,"vjs-full-window"),this.trigger("enterFullWindow")},b.prototype.fullWindowOnEscKey=function(a){27===a.keyCode&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},b.prototype.exitFullWindow=function(){this.isFullWindow=!1,o.off(k["default"],"keydown",this.fullWindowOnEscKey),k["default"].documentElement.style.overflow=this.docOrigOverflow,q.removeElClass(k["default"].body,"vjs-full-window"),this.trigger("exitFullWindow")},b.prototype.canPlayType=function(a){for(var b=void 0,c=0,d=this.options_.techOrder;c0&&(h=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},a))}},250)}},b.prototype.playbackRate=function(a){return void 0!==a?(this.techCall_("setPlaybackRate",a),this):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},b.prototype.isAudio=function(a){return void 0!==a?(this.isAudio_=!!a,this):!!this.isAudio_},b.prototype.networkState=function(){return this.techGet_("networkState")},b.prototype.readyState=function(){return this.techGet_("readyState")},b.prototype.textTracks=function(){return this.tech_&&this.tech_.textTracks()},b.prototype.remoteTextTracks=function(){return this.tech_&&this.tech_.remoteTextTracks()},b.prototype.remoteTextTrackEls=function(){return this.tech_&&this.tech_.remoteTextTrackEls()},b.prototype.addTextTrack=function(a,b,c){return this.tech_&&this.tech_.addTextTrack(a,b,c)},b.prototype.addRemoteTextTrack=function(a){return this.tech_&&this.tech_.addRemoteTextTrack(a)},b.prototype.removeRemoteTextTrack=function(a){this.tech_&&this.tech_.removeRemoteTextTrack(a)},b.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},b.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},b.prototype.language=function(a){return void 0===a?this.language_:(this.language_=(""+a).toLowerCase(),this)},b.prototype.languages=function(){return O["default"](b.prototype.options_.languages,this.languages_)},b.prototype.toJSON=function(){var a=O["default"](this.options_),b=a.tracks;a.tracks=[];for(var c=0;ci;i++){var k=h[i],l=k.nodeName.toLowerCase();"source"===l?b.sources.push(q.getElAttributes(k)):"track"===l&&b.tracks.push(q.getElAttributes(k))}return b},b}(i["default"]));ca.players={};var da=m["default"].navigator;ca.prototype.options_={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:k["default"].getElementsByTagName("html")[0].getAttribute("lang")||da.languages&&da.languages[0]||da.userLanguage||da.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},ca.prototype.handleLoadedMetaData_,ca.prototype.handleLoadedData_,ca.prototype.handleUserActive_,ca.prototype.handleUserInactive_,ca.prototype.handleTimeUpdate_,ca.prototype.handleTechEnded_,ca.prototype.handleVolumeChange_,ca.prototype.handleError_,ca.prototype.flexNotSupported_=function(){var a=k["default"].createElement("i");return!("flexBasis"in a.style||"webkitFlexBasis"in a.style||"mozFlexBasis"in a.style||"msFlexBasis"in a.style||"msFlexOrder"in a.style)},i["default"].registerComponent("Player",ca),c["default"]=ca,b.exports=c["default"]},{"./big-play-button.js":63,"./component.js":67,"./control-bar/control-bar.js":68,"./error-display.js":100,"./fullscreen-api.js":103,"./loading-spinner.js":104,"./media-error.js":105,"./modal-dialog":109,"./poster-image.js":114,"./tech/html5.js":119,"./tech/loader.js":120,"./tech/tech.js":121,"./tracks/text-track-display.js":125,"./tracks/text-track-list-converter.js":127,"./tracks/text-track-settings.js":129,"./utils/browser.js":131,"./utils/buffer.js":132,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/guid.js":138,"./utils/log.js":139,"./utils/merge-options.js":140,"./utils/stylesheet.js":141,"./utils/time-ranges.js":142,"./utils/to-title-case.js":143,"global/document":1,"global/window":2,"object.assign":45,"safe-json-parse/tuple":54}],111:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("./player.js"),f=d(e),g=function(a,b){f["default"].prototype[a]=b};c["default"]=g,b.exports=c["default"]},{"./player.js":110}],112:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../clickable-component.js"),i=e(h),j=a("../component.js"),k=e(j),l=a("./popup.js"),m=(e(l),a("../utils/dom.js")),n=(d(m),a("../utils/fn.js")),o=(d(n),a("../utils/to-title-case.js")),p=(e(o),function(a){function b(c){var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];f(this,b),a.call(this,c,d),this.update()}return g(b,a),b.prototype.update=function(){var a=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=a,this.addChild(a),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},b.prototype.createPopup=function(){},b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},b.prototype.buildCSSClass=function(){var b="vjs-menu-button";return b+=this.options_.inline===!0?"-inline":"-popup","vjs-menu-button "+b+" "+a.prototype.buildCSSClass.call(this)},b}(i["default"]));k["default"].registerComponent("PopupButton",p),c["default"]=p,b.exports=c["default"]},{"../clickable-component.js":65,"../component.js":67,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/to-title-case.js":143,"./popup.js":113}],113:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component.js"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=a("../utils/fn.js"),m=d(l),n=a("../utils/events.js"),o=d(n),p=function(a){function b(){f(this,b),a.apply(this,arguments)}return g(b,a),b.prototype.addItem=function(a){this.addChild(a),a.on("click",m.bind(this,function(){this.unlockShowing()}))},b.prototype.createEl=function(){var b=this.options_.contentElType||"ul";this.contentEl_=k.createEl(b,{className:"vjs-menu-content"});var c=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return c.appendChild(this.contentEl_),o.on(c,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),c},b}(i["default"]);i["default"].registerComponent("Popup",p),c["default"]=p,b.exports=c["default"]},{"../component.js":67,"../utils/dom.js":134,"../utils/events.js":135,"../utils/fn.js":136}],114:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./clickable-component.js"),i=e(h),j=a("./component.js"),k=e(j),l=a("./utils/fn.js"),m=d(l),n=a("./utils/dom.js"),o=d(n),p=a("./utils/browser.js"),q=d(p),r=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.update(),c.on("posterchange",m.bind(this,this.update))}return g(b,a),b.prototype.dispose=function(){this.player().off("posterchange",this.update),a.prototype.dispose.call(this)},b.prototype.createEl=function(){var a=o.createEl("div",{className:"vjs-poster",tabIndex:-1});return q.BACKGROUND_SIZE_SUPPORTED||(this.fallbackImg_=o.createEl("img"),a.appendChild(this.fallbackImg_)),a},b.prototype.update=function(){var a=this.player().poster();this.setSrc(a),a?this.show():this.hide()},b.prototype.setSrc=function(a){if(this.fallbackImg_)this.fallbackImg_.src=a;else{var b="";a&&(b='url("'+a+'")'),this.el_.style.backgroundImage=b}},b.prototype.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},b}(i["default"]);k["default"].registerComponent("PosterImage",r),c["default"]=r,b.exports=c["default"]},{"./clickable-component.js":65,"./component.js":67,"./utils/browser.js":131,"./utils/dom.js":134,"./utils/fn.js":136}],115:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}c.__esModule=!0;var f=a("./utils/events.js"),g=e(f),h=a("global/document"),i=d(h),j=a("global/window"),k=d(j),l=!1,m=void 0,n=function(){var a=i["default"].getElementsByTagName("video"),b=i["default"].getElementsByTagName("audio"),c=[];if(a&&a.length>0)for(var d=0,e=a.length;e>d;d++)c.push(a[d]);if(b&&b.length>0)for(var d=0,e=b.length;e>d;d++)c.push(b[d]);if(c&&c.length>0)for(var d=0,e=c.length;e>d;d++){var f=c[d];if(!f||!f.getAttribute){o(1);break}if(void 0===f.player){var g=f.getAttribute("data-setup");if(null!==g){m(f)}}}else l||o(1)},o=function(a,b){b&&(m=b),setTimeout(n,a)};"complete"===i["default"].readyState?l=!0:g.one(k["default"],"load",function(){l=!0});var p=function(){return l};c.autoSetup=n,c.autoSetupTimeout=o,c.hasLoaded=p},{"./utils/events.js":135,"global/document":1,"global/window":2}],116:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../component.js"),i=e(h),j=a("../utils/dom.js"),k=d(j),l=a("object.assign"),m=e(l),n=function(a){function b(c,d){f(this,b),a.call(this,c,d),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(c,"controlsvisible",this.update),this.on(c,this.playerEvent,this.update)}return g(b,a),b.prototype.createEl=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return c.className=c.className+" vjs-slider",c=m["default"]({tabIndex:0},c),d=m["default"]({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},d),a.prototype.createEl.call(this,b,c,d)},b.prototype.handleMouseDown=function(a){var b=this.bar.el_.ownerDocument;a.preventDefault(),k.blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(b,"mousemove",this.handleMouseMove),this.on(b,"mouseup",this.handleMouseUp),this.on(b,"touchmove",this.handleMouseMove),this.on(b,"touchend",this.handleMouseUp),this.handleMouseMove(a)},b.prototype.handleMouseMove=function(){},b.prototype.handleMouseUp=function(){var a=this.bar.el_.ownerDocument;k.unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(a,"mousemove",this.handleMouseMove),this.off(a,"mouseup",this.handleMouseUp),this.off(a,"touchmove",this.handleMouseMove),this.off(a,"touchend",this.handleMouseUp),this.update()},b.prototype.update=function(){if(this.el_){var a=this.getPercent(),b=this.bar;if(b){("number"!=typeof a||a!==a||0>a||a===1/0)&&(a=0);var c=(100*a).toFixed(2)+"%";this.vertical()?b.el().style.height=c:b.el().style.width=c}}},b.prototype.calculateDistance=function(a){var b=k.getPointerPosition(this.el_,a);return this.vertical()?b.y:b.x},b.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleKeyPress=function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepBack()):(38===a.which||39===a.which)&&(a.preventDefault(),this.stepForward())},b.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},b.prototype.handleClick=function(a){a.stopImmediatePropagation(),a.preventDefault()},b.prototype.vertical=function(a){return void 0===a?this.vertical_||!1:(this.vertical_=!!a,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal"),this)},b}(i["default"]);i["default"].registerComponent("Slider",n),c["default"]=n,b.exports=c["default"]},{"../component.js":67,"../utils/dom.js":134,"object.assign":45}],117:[function(a,b,c){"use strict";function d(a){return a.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},a.streamFromParts=function(a,b){return a+"&"+b},a.streamToParts=function(a){var b={connection:"",stream:""};if(!a)return b;var c=a.search(/&(?!\w+=)/),d=void 0;return-1!==c?d=c+1:(c=d=a.lastIndexOf("/")+1,0===c&&(c=d=a.length)),b.connection=a.substring(0,c),b.stream=a.substring(d,a.length),b},a.isStreamingType=function(b){return b in a.streamingFormats},a.RTMP_RE=/^rtmp[set]?:\/\//i,a.isStreamingSrc=function(b){return a.RTMP_RE.test(b)},a.rtmpSourceHandler={},a.rtmpSourceHandler.canPlayType=function(b){return a.isStreamingType(b)?"maybe":""},a.rtmpSourceHandler.canHandleSource=function(b){var c=a.rtmpSourceHandler.canPlayType(b.type);return c?c:a.isStreamingSrc(b.src)?"maybe":""},a.rtmpSourceHandler.handleSource=function(b,c){var d=a.streamToParts(b.src);c.setRtmpConnection(d.connection),c.setRtmpStream(d.stream)},a.registerSourceHandler(a.rtmpSourceHandler),a}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],118:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a){var b=a.charAt(0).toUpperCase()+a.slice(1);A["set"+b]=function(b){return this.el_.vjs_setProperty(a,b)}}function i(a){A[a]=function(){return this.el_.vjs_getProperty(a)}}c.__esModule=!0;for(var j=a("./tech"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=a("../utils/url.js"),o=d(n),p=a("../utils/time-ranges.js"),q=a("./flash-rtmp"),r=e(q),s=a("../component"),t=e(s),u=a("global/window"),v=e(u),w=a("object.assign"),x=e(w),y=v["default"].navigator,z=function(a){function b(c,d){f(this,b),a.call(this,c,d),c.source&&this.ready(function(){this.setSource(c.source)},!0),c.startTime&&this.ready(function(){this.load(),this.play(),this.currentTime(c.startTime)},!0),v["default"].videojs=v["default"].videojs||{},v["default"].videojs.Flash=v["default"].videojs.Flash||{},v["default"].videojs.Flash.onReady=b.onReady,v["default"].videojs.Flash.onEvent=b.onEvent,v["default"].videojs.Flash.onError=b.onError,this.on("seeked",function(){this.lastSeekTarget_=void 0})}return g(b,a),b.prototype.createEl=function(){var a=this.options_;a.swf||(a.swf="//vjs.zencdn.net/swf/5.0.1/video-js.swf");var c=a.techId,d=x["default"]({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.preload,loop:a.loop,muted:a.muted},a.flashVars),e=x["default"]({wmode:"opaque",bgcolor:"#000000"},a.params),f=x["default"]({id:c,name:c,"class":"vjs-tech"},a.attributes);return this.el_=b.embed(a.swf,d,e,f),this.el_.tech=this,this.el_},b.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},b.prototype.pause=function(){this.el_.vjs_pause()},b.prototype.src=function(a){return void 0===a?this.currentSrc():this.setSrc(a)},b.prototype.setSrc=function(a){if(a=o.getAbsoluteURL(a),this.el_.vjs_src(a),this.autoplay()){var b=this;this.setTimeout(function(){b.play()},0)}},b.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},b.prototype.setCurrentTime=function(b){var c=this.seekable();c.length&&(b=b>c.start(0)?b:c.start(0),b=b=10},k["default"].withSourceHandlers(z),z.nativeSourceHandler={},z.nativeSourceHandler.canPlayType=function(a){return a in z.formats?"maybe":""},z.nativeSourceHandler.canHandleSource=function(a){function b(a){var b=o.getFileExtension(a);return b?"video/"+b:""}var c;return c=a.type?a.type.replace(/;.*/,"").toLowerCase():b(a.src),z.nativeSourceHandler.canPlayType(c)},z.nativeSourceHandler.handleSource=function(a,b){ -b.setSrc(a.src)},z.nativeSourceHandler.dispose=function(){},z.registerSourceHandler(z.nativeSourceHandler),z.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},z.onReady=function(a){var b=m.getEl(a),c=b&&b.tech;c&&c.el()&&z.checkReady(c)},z.checkReady=function(a){a.el()&&(a.el().vjs_getProperty?a.triggerReady():this.setTimeout(function(){z.checkReady(a)},50))},z.onEvent=function(a,b){var c=m.getEl(a).tech;c.trigger(b)},z.onError=function(a,b){var c=m.getEl(a).tech;return"srcnotfound"===b?c.error(4):void c.error("FLASH: "+b)},z.version=function(){var a="0,0,0";try{a=new v["default"].ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{y.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(y.plugins["Shockwave Flash 2.0"]||y.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(c){}}return a.split(",")},z.embed=function(a,b,c,d){var e=z.getEmbedCode(a,b,c,d),f=m.createEl("div",{innerHTML:e}).childNodes[0];return f},z.getEmbedCode=function(a,b,c,d){var e=''}),d=x["default"]({data:a,width:"100%",height:"100%"},d),Object.getOwnPropertyNames(d).forEach(function(a){h+=a+'="'+d[a]+'" '}),""+e+h+">"+g+""},r["default"](z),t["default"].registerComponent("Flash",z),k["default"].registerTech("Flash",z),c["default"]=z,b.exports=c["default"]},{"../component":67,"../utils/dom.js":134,"../utils/time-ranges.js":142,"../utils/url.js":144,"./flash-rtmp":117,"./tech":121,"global/window":2,"object.assign":45}],119:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./tech.js"),i=e(h),j=a("../component"),k=e(j),l=a("../utils/dom.js"),m=d(l),n=a("../utils/url.js"),o=d(n),p=a("../utils/fn.js"),q=d(p),r=a("../utils/log.js"),s=e(r),t=a("../utils/browser.js"),u=d(t),v=a("global/document"),w=e(v),x=a("global/window"),y=e(x),z=a("object.assign"),A=e(z),B=a("../utils/merge-options.js"),C=e(B),D=function(a){function b(c,d){f(this,b),a.call(this,c,d);var e=c.source;if(e&&(this.el_.currentSrc!==e.src||c.tag&&3===c.tag.initNetworkState_)?this.setSource(e):this.handleLateInit_(this.el_),this.el_.hasChildNodes()){for(var g=this.el_.childNodes,h=g.length,i=[];h--;){var j=g[h],k=j.nodeName.toLowerCase();"track"===k&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(j),this.remoteTextTracks().addTrack_(j.track)):i.push(j))}for(var l=0;l=0;g--){var h=f[g],i={};"undefined"!=typeof this.options_[h]&&(i[h]=this.options_[h]),m.setElAttributes(a,i)}return a},b.prototype.handleLateInit_=function(a){var b=this;if(0!==a.networkState&&3!==a.networkState){if(0===a.readyState){var c=function(){var a=!1,c=function(){a=!0};b.on("loadstart",c);var d=function(){a||this.trigger("loadstart")};return b.on("loadedmetadata",d),b.ready(function(){this.off("loadstart",c),this.off("loadedmetadata",d),a||this.trigger("loadstart")}),{v:void 0}}();if("object"==typeof c)return c.v}var d=["loadstart"];d.push("loadedmetadata"),a.readyState>=2&&d.push("loadeddata"),a.readyState>=3&&d.push("canplay"),a.readyState>=4&&d.push("canplaythrough"),this.ready(function(){d.forEach(function(a){this.trigger(a)},this)})}},b.prototype.proxyNativeTextTracks_=function(){var a=this.el().textTracks;if(a){for(var b=0;b0&&(a="number"!=typeof D.TEST_VID.textTracks[0].mode),a&&u.IS_FIREFOX&&(a=!1),!a||"onremovetrack"in D.TEST_VID.textTracks||(a=!1),a},D.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],D.prototype.featuresVolumeControl=D.canControlVolume(),D.prototype.featuresPlaybackRate=D.canControlPlaybackRate(),D.prototype.movingMediaElementInDOM=!u.IS_IOS,D.prototype.featuresFullscreenResize=!0,D.prototype.featuresProgressEvents=!0,D.prototype.featuresNativeTextTracks=D.supportsNativeTextTracks();var F=void 0,G=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,H=/^video\/mp4/i;D.patchCanPlayType=function(){u.ANDROID_VERSION>=4&&(F||(F=D.TEST_VID.constructor.prototype.canPlayType),D.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&G.test(a)?"maybe":F.call(this,a)}),u.IS_OLD_ANDROID&&(F||(F=D.TEST_VID.constructor.prototype.canPlayType),D.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&H.test(a)?"maybe":F.call(this,a)})},D.unpatchCanPlayType=function(){var a=D.TEST_VID.constructor.prototype.canPlayType;return D.TEST_VID.constructor.prototype.canPlayType=F,F=null,a},D.patchCanPlayType(),D.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},D.resetMediaElement=function(a){if(a){for(var b=a.querySelectorAll("source"),c=b.length;c--;)a.removeChild(b[c]);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},k["default"].registerComponent("Html5",D),i["default"].registerTech("Html5",D),c["default"]=D,b.exports=c["default"]},{"../component":67,"../utils/browser.js":131,"../utils/dom.js":134,"../utils/fn.js":136,"../utils/log.js":139,"../utils/merge-options.js":140,"../utils/url.js":144,"./tech.js":121,"global/document":1,"global/window":2,"object.assign":45}],120:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var g=a("../component.js"),h=d(g),i=a("./tech.js"),j=d(i),k=a("global/window"),l=(d(k),a("../utils/to-title-case.js")),m=d(l),n=function(a){function b(c,d,f){if(e(this,b),a.call(this,c,d,f),d.playerOptions.sources&&0!==d.playerOptions.sources.length)c.src(d.playerOptions.sources);else for(var g=0,i=d.playerOptions.techOrder;ge;e++)c.addTrackElement_(b[e]);return h.IS_IE8?c:void 0}return a.prototype.addTrackElement_=function(a){this.trackElements_.push(a)},a.prototype.getTrackElementByTrack_=function(a){for(var b=void 0,c=0,d=this.trackElements_.length;d>c;c++)if(a===this.trackElements_[c].track){b=this.trackElements_[c];break}return b},a.prototype.removeTrackElement_=function(a){for(var b=0,c=this.trackElements_.length;c>b;b++)if(a===this.trackElements_[b]){this.trackElements_.splice(b,1);break}},a}();c["default"]=k,b.exports=c["default"]},{"../utils/browser.js":131,"global/document":1}],123:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("../utils/browser.js"),i=e(h),j=a("global/document"),k=d(j),l=a("../event-target"),m=d(l),n=a("../tracks/text-track"),o=d(n),p=0,q=1,r=2,s=3,t=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f(this,b),a.call(this);var d=void 0,e=this;if(i.IS_IE8){e=k["default"].createElement("custom");for(var g in b.prototype)"constructor"!==g&&(e[g]=b.prototype[g])}var h=new o["default"](c);return e.kind=h.kind,e.src=h.src,e.srclang=h.language,e.label=h.label,e["default"]=h["default"],Object.defineProperty(e,"readyState",{get:function(){return d}}),Object.defineProperty(e,"track",{get:function(){return h}}),d=p,h.addEventListener("loadeddata",function(){d=r,e.trigger({type:"load",target:e})}),i.IS_IE8?e:void 0}return g(b,a),b}(m["default"]);t.prototype.allowedEvents_={load:"load"},t.NONE=p,t.LOADING=q,t.LOADED=r,t.ERROR=s,c["default"]=t,b.exports=c["default"]},{"../event-target":101,"../tracks/text-track":130,"../utils/browser.js":131,"global/document":1}],124:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var g=a("../utils/browser.js"),h=e(g),i=a("global/document"),j=d(i),k=function(){function a(b){f(this,a);var c=this;if(h.IS_IE8){c=j["default"].createElement("custom");for(var d in a.prototype)"constructor"!==d&&(c[d]=a.prototype[d])}return a.prototype.setCues_.call(c,b),Object.defineProperty(c,"length",{get:function(){return this.length_}}),h.IS_IE8?c:void 0}return a.prototype.setCues_=function(a){var b=this.length||0,c=0,d=a.length;this.cues_=a,this.length_=a.length;var e=function(a){""+a in this||Object.defineProperty(this,""+a,{get:function(){return this.cues_[a]}})};if(d>b)for(c=b;d>c;c++)e.call(this,c)},a.prototype.getCueById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},a}();c["default"]=k,b.exports=c["default"]},{"../utils/browser.js":131,"global/document":1}],125:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a,b){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+b+")"}function i(a,b,c){try{a.style[b]=c}catch(d){}}c.__esModule=!0;var j=a("../component"),k=e(j),l=a("../menu/menu.js"),m=(e(l),a("../menu/menu-item.js")),n=(e(m),a("../menu/menu-button.js")),o=(e(n),a("../utils/fn.js")),p=d(o),q=a("global/document"),r=(e(q),a("global/window")),s=e(r),t="#222",u="#ccc",v={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},w=function(a){function b(c,d,e){f(this,b),a.call(this,c,d,e),c.on("loadstart",p.bind(this,this.toggleDisplay)),c.on("texttrackchange",p.bind(this,this.updateDisplay)),c.ready(p.bind(this,function(){if(c.tech_&&c.tech_.featuresNativeTextTracks)return void this.hide();c.on("fullscreenchange",p.bind(this,this.updateDisplay));for(var a=this.options_.playerOptions.tracks||[],b=0;bc;c++)if(this[c]===a){b=this[c],b.off&&b.off(),this.tracks_.splice(c,1);break}b&&this.trigger({track:b,type:"removetrack"})},b.prototype.getTrackById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},b}(i["default"]);p.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var q in p.prototype.allowedEvents_)p.prototype["on"+q]=null;c["default"]=p,b.exports=c["default"]},{"../event-target":101,"../utils/browser.js":131,"../utils/fn.js":136,"global/document":1}],129:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function h(a){var b=void 0;return a.selectedOptions?b=a.selectedOptions[0]:a.options&&(b=a.options[a.options.selectedIndex]),b.value}function i(a,b){if(b){var c=void 0;for(c=0;c select").selectedIndex=0,this.$(".vjs-bg-color > select").selectedIndex=0,this.$(".window-color > select").selectedIndex=0,this.$(".vjs-text-opacity > select").selectedIndex=0,this.$(".vjs-bg-opacity > select").selectedIndex=0,this.$(".vjs-window-opacity > select").selectedIndex=0,this.$(".vjs-edge-style select").selectedIndex=0,this.$(".vjs-font-family select").selectedIndex=0,this.$(".vjs-font-percent select").selectedIndex=2,this.updateDisplay()})),n.on(this.$(".vjs-fg-color > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-bg-color > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".window-color > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-text-opacity > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-bg-opacity > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-window-opacity > select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-font-percent select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-edge-style select"),"change",p.bind(this,this.updateDisplay)),n.on(this.$(".vjs-font-family select"),"change",p.bind(this,this.updateDisplay)),this.options_.persistTextTrackSettings&&this.restoreSettings()}return g(b,a),b.prototype.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:j()})},b.prototype.getValues=function(){var a=h(this.$(".vjs-edge-style select")),b=h(this.$(".vjs-font-family select")),c=h(this.$(".vjs-fg-color > select")),d=h(this.$(".vjs-text-opacity > select")),e=h(this.$(".vjs-bg-color > select")),f=h(this.$(".vjs-bg-opacity > select")),g=h(this.$(".window-color > select")),i=h(this.$(".vjs-window-opacity > select")),j=v["default"].parseFloat(h(this.$(".vjs-font-percent > select"))),k={backgroundOpacity:f,textOpacity:d,windowOpacity:i,edgeStyle:a,fontFamily:b,color:c,backgroundColor:e,windowColor:g,fontPercent:j};for(var l in k)(""===k[l]||"none"===k[l]||"fontPercent"===l&&1===k[l])&&delete k[l];return k},b.prototype.setValues=function(a){i(this.$(".vjs-edge-style select"),a.edgeStyle),i(this.$(".vjs-font-family select"),a.fontFamily),i(this.$(".vjs-fg-color > select"),a.color),i(this.$(".vjs-text-opacity > select"),a.textOpacity),i(this.$(".vjs-bg-color > select"),a.backgroundColor),i(this.$(".vjs-bg-opacity > select"),a.backgroundOpacity),i(this.$(".window-color > select"),a.windowColor),i(this.$(".vjs-window-opacity > select"),a.windowOpacity);var b=a.fontPercent;b&&(b=b.toFixed(2)),i(this.$(".vjs-font-percent > select"),b)},b.prototype.restoreSettings=function(){var a=void 0,b=void 0;try{var c=t["default"](v["default"].localStorage.getItem("vjs-text-track-settings"));a=c[0],b=c[1],a&&r["default"].error(a)}catch(d){r["default"].warn(d)}b&&this.setValues(b)},b.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var a=this.getValues();try{Object.getOwnPropertyNames(a).length>0?v["default"].localStorage.setItem("vjs-text-track-settings",JSON.stringify(a)):v["default"].localStorage.removeItem("vjs-text-track-settings")}catch(b){r["default"].warn(b)}}},b.prototype.updateDisplay=function(){var a=this.player_.getChild("textTrackDisplay");a&&a.updateDisplay()},b}(l["default"]);l["default"].registerComponent("TextTrackSettings",w),c["default"]=w,b.exports=c["default"]},{"../component":67,"../utils/events.js":135,"../utils/fn.js":136,"../utils/log.js":139,"global/window":2,"safe-json-parse/tuple":54}],130:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}c.__esModule=!0;var h=a("./text-track-cue-list"),i=e(h),j=a("../utils/fn.js"),k=d(j),l=a("../utils/guid.js"),m=d(l),n=a("../utils/browser.js"),o=d(n),p=a("./text-track-enums"),q=d(p),r=a("../utils/log.js"),s=e(r),t=a("../event-target"),u=e(t),v=a("global/document"),w=e(v),x=a("global/window"),y=e(x),z=a("../utils/url.js"),A=a("xhr"),B=e(A),C=function(a,b){var c=new y["default"].WebVTT.Parser(y["default"],y["default"].vttjs,y["default"].WebVTT.StringDecoder());c.oncue=function(a){b.addCue(a)},c.onparsingerror=function(a){s["default"].error(a)},c.onflush=function(){b.trigger({type:"loadeddata",target:b})},c.parse(a),c.flush()},D=function(a,b){var c={uri:a},d=z.isCrossOrigin(a);d&&(c.cors=d),B["default"](c,k.bind(this,function(a,c,d){return a?s["default"].error(a,c):(b.loaded_=!0,void("function"!=typeof y["default"].WebVTT?b.tech_&&!function(){var a=function(){return C(d,b)};b.tech_.on("vttjsloaded",a),b.tech_.on("vttjserror",function(){s["default"].error("vttjs failed to load, stopping trying to process "+b.src),b.tech_.off("vttjsloaded",a)})}():C(d,b)))}))},E=function(a){function b(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(f(this,b),a.call(this),!c.tech)throw new Error("A tech was not provided.");var d=this;if(o.IS_IE8){d=w["default"].createElement("custom");for(var e in b.prototype)"constructor"!==e&&(d[e]=b.prototype[e])}d.tech_=c.tech;var g=q.TextTrackMode[c.mode]||"disabled",h=q.TextTrackKind[c.kind]||"subtitles",j=c.label||"",l=c.language||c.srclang||"",n=c.id||"vjs_text_track_"+m.newGUID();("metadata"===h||"chapters"===h)&&(g="hidden"),d.cues_=[],d.activeCues_=[];var p=new i["default"](d.cues_),r=new i["default"](d.activeCues_),s=!1,t=k.bind(d,function(){this.activeCues,s&&(this.trigger("cuechange"),s=!1)});return"disabled"!==g&&d.tech_.on("timeupdate",t),Object.defineProperty(d,"kind",{get:function(){return h},set:function(){}}),Object.defineProperty(d,"label",{get:function(){return j},set:function(){}}),Object.defineProperty(d,"language",{get:function(){return l; - -},set:function(){}}),Object.defineProperty(d,"id",{get:function(){return n},set:function(){}}),Object.defineProperty(d,"mode",{get:function(){return g},set:function(a){q.TextTrackMode[a]&&(g=a,"showing"===g&&this.tech_.on("timeupdate",t),this.trigger("modechange"))}}),Object.defineProperty(d,"cues",{get:function(){return this.loaded_?p:null},set:function(){}}),Object.defineProperty(d,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return r;for(var a=this.tech_.currentTime(),b=[],c=0,d=this.cues.length;d>c;c++){var e=this.cues[c];e.startTime<=a&&e.endTime>=a?b.push(e):e.startTime===e.endTime&&e.startTime<=a&&e.startTime+.5>=a&&b.push(e)}if(s=!1,b.length!==this.activeCues_.length)s=!0;else for(var c=0;cc;c++){var e=this.cues_[c];e===a&&(this.cues_.splice(c,1),b=!0)}b&&this.cues.setCues_(this.cues_)},b}(u["default"]);E.prototype.allowedEvents_={cuechange:"cuechange"},c["default"]=E,b.exports=c["default"]},{"../event-target":101,"../utils/browser.js":131,"../utils/fn.js":136,"../utils/guid.js":138,"../utils/log.js":139,"../utils/url.js":144,"./text-track-cue-list":124,"./text-track-enums":126,"global/document":1,"global/window":2,xhr:56}],131:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=a("global/window"),h=d(g),i=h["default"].navigator.userAgent,j=/AppleWebKit\/([\d.]+)/i.exec(i),k=j?parseFloat(j.pop()):null,l=/iPad/i.test(i);c.IS_IPAD=l;var m=/iPhone/i.test(i)&&!l;c.IS_IPHONE=m;var n=/iPod/i.test(i);c.IS_IPOD=n;var o=m||l||n;c.IS_IOS=o;var p=function(){var a=i.match(/OS (\d+)_/i);return a&&a[1]?a[1]:void 0}();c.IOS_VERSION=p;var q=/Android/i.test(i);c.IS_ANDROID=q;var r=function(){var a,b,c=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return c?(a=c[1]&&parseFloat(c[1]),b=c[2]&&parseFloat(c[2]),a&&b?parseFloat(c[1]+"."+c[2]):a?a:null):null}();c.ANDROID_VERSION=r;var s=q&&/webkit/i.test(i)&&2.3>r;c.IS_OLD_ANDROID=s;var t=q&&5>r&&537>k;c.IS_NATIVE_ANDROID=t;var u=/Firefox/i.test(i);c.IS_FIREFOX=u;var v=/Chrome/i.test(i);c.IS_CHROME=v;var w=/MSIE\s8\.0/.test(i);c.IS_IE8=w;var x=!!("ontouchstart"in h["default"]||h["default"].DocumentTouch&&f["default"]instanceof h["default"].DocumentTouch);c.TOUCH_ENABLED=x;var y="backgroundSize"in f["default"].createElement("video").style;c.BACKGROUND_SIZE_SUPPORTED=y},{"global/document":1,"global/window":2}],132:[function(a,b,c){"use strict";function d(a,b){var c,d,f=0;if(!b)return 0;a&&a.length||(a=e.createTimeRange(0,0));for(var g=0;gb&&(d=b),f+=d-c;return f/b}c.__esModule=!0,c.bufferedPercent=d;var e=a("./time-ranges.js")},{"./time-ranges.js":142}],133:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("./log.js"),f=d(e),g={get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c,!0}};c["default"]=function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if("function"==typeof Proxy){var c=function(){var c={};return Object.keys(b).forEach(function(a){g.hasOwnProperty(a)&&(c[a]=function(){return f["default"].warn(b[a]),g[a].apply(this,arguments)})}),{v:new Proxy(a,c)}}();if("object"==typeof c)return c.v}return a},b.exports=c["default"]},{"./log.js":139}],134:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function e(a){return a&&a.__esModule?a:{"default":a}}function f(a,b){return a.raw=b,a}function g(a){return"string"==typeof a&&/\S/.test(a)}function h(a){if(/\s/.test(a))throw new Error("class has illegal whitespace characters")}function i(a){return new RegExp("(^|\\s)"+a+"($|\\s)")}function j(a){return function(b,c){return g(b)?(g(c)&&(c=J["default"].querySelector(c)),(B(c)?c:J["default"])[a](b)):J["default"][a](null)}}function k(a){return 0===a.indexOf("#")&&(a=a.slice(1)),J["default"].getElementById(a)}function l(){var a=arguments.length<=0||void 0===arguments[0]?"div":arguments[0],b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=J["default"].createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var c=b[a];-1!==a.indexOf("aria-")||"role"===a||"type"===a?(P["default"].warn(R["default"](H,a,c)),d.setAttribute(a,c)):d[a]=c}),Object.getOwnPropertyNames(c).forEach(function(a){c[a];d.setAttribute(a,c[a])}),d}function m(a,b){"undefined"==typeof a.textContent?a.innerText=b:a.textContent=b}function n(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)}function o(a){var b=a[T];return b||(b=a[T]=N.newGUID()),S[b]||(S[b]={}),S[b]}function p(a){var b=a[T];return b?!!Object.getOwnPropertyNames(S[b]).length:!1}function q(a){var b=a[T];if(b){delete S[b];try{delete a[T]}catch(c){a.removeAttribute?a.removeAttribute(T):a[T]=null}}}function r(a,b){return a.classList?a.classList.contains(b):(h(b),i(b).test(a.className))}function s(a,b){return a.classList?a.classList.add(b):r(a,b)||(a.className=(a.className+" "+b).trim()),a}function t(a,b){return a.classList?a.classList.remove(b):(h(b),a.className=a.className.split(/\s+/).filter(function(a){return a!==b}).join(" ")),a}function u(a,b,c){var d=r(a,b);return"function"==typeof c&&(c=c(a,b)),"boolean"!=typeof c&&(c=!d),c!==d?(c?s(a,b):t(a,b),a):void 0}function v(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||"undefined"==typeof d||d===!1?a.removeAttribute(c):a.setAttribute(c,d===!0?"":d)})}function w(a){var b,c,d,e,f;if(b={},c=",autoplay,controls,loop,muted,default,",a&&a.attributes&&a.attributes.length>0){d=a.attributes;for(var g=d.length-1;g>=0;g--)e=d[g].name,f=d[g].value,("boolean"==typeof a[e]||-1!==c.indexOf(","+e+","))&&(f=null!==f?!0:!1),b[e]=f}return b}function x(){J["default"].body.focus(),J["default"].onselectstart=function(){return!1}}function y(){J["default"].onselectstart=function(){return!0}}function z(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=J["default"].documentElement,d=J["default"].body,e=c.clientLeft||d.clientLeft||0,f=L["default"].pageXOffset||d.scrollLeft,g=b.left+f-e,h=c.clientTop||d.clientTop||0,i=L["default"].pageYOffset||d.scrollTop,j=b.top+i-h;return{left:Math.round(g),top:Math.round(j)}}function A(a,b){var c={},d=z(a),e=a.offsetWidth,f=a.offsetHeight,g=d.top,h=d.left,i=b.pageY,j=b.pageX;return b.changedTouches&&(j=b.changedTouches[0].pageX,i=b.changedTouches[0].pageY),c.y=Math.max(0,Math.min(1,(g-i+f)/f)),c.x=Math.max(0,Math.min(1,(j-h)/e)),c}function B(a){return!!a&&"object"==typeof a&&1===a.nodeType}function C(a){return!!a&&"object"==typeof a&&3===a.nodeType}function D(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function E(a){return"function"==typeof a&&(a=a()),(Array.isArray(a)?a:[a]).map(function(a){return"function"==typeof a&&(a=a()),B(a)||C(a)?a:"string"==typeof a&&/\S/.test(a)?J["default"].createTextNode(a):void 0}).filter(function(a){return a})}function F(a,b){return E(b).forEach(function(b){return a.appendChild(b)}),a}function G(a,b){return F(D(a),b)}c.__esModule=!0,c.getEl=k,c.createEl=l,c.textContent=m,c.insertElFirst=n,c.getElData=o,c.hasElData=p,c.removeElData=q,c.hasElClass=r,c.addElClass=s,c.removeElClass=t,c.toggleElClass=u,c.setElAttributes=v,c.getElAttributes=w,c.blockTextSelection=x,c.unblockTextSelection=y,c.findElPosition=z,c.getPointerPosition=A,c.isEl=B,c.isTextNode=C,c.emptyEl=D,c.normalizeContent=E,c.appendContent=F,c.insertContent=G;var H=f(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),I=a("global/document"),J=e(I),K=a("global/window"),L=e(K),M=a("./guid.js"),N=d(M),O=a("./log.js"),P=e(O),Q=a("tsml"),R=e(Q),S={},T="vdata"+(new Date).getTime(),U=j("querySelector");c.$=U;var V=j("querySelectorAll");c.$$=V},{"./guid.js":138,"./log.js":139,"global/document":1,"global/window":2,tsml:55}],135:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a,b,c){if(Array.isArray(b))return l(f,a,b,c);var d=n.getElData(a);d.handlers||(d.handlers={}),d.handlers[b]||(d.handlers[b]=[]),c.guid||(c.guid=p.newGUID()),d.handlers[b].push(c),d.dispatcher||(d.disabled=!1,d.dispatcher=function(b,c){if(!d.disabled){b=j(b);var e=d.handlers[b.type];if(e)for(var f=e.slice(0),g=0,h=f.length;h>g&&!b.isImmediatePropagationStopped();g++)f[g].call(a,b,c)}}),1===d.handlers[b].length&&(a.addEventListener?a.addEventListener(b,d.dispatcher,!1):a.attachEvent&&a.attachEvent("on"+b,d.dispatcher))}function g(a,b,c){if(n.hasElData(a)){var d=n.getElData(a);if(d.handlers){if(Array.isArray(b))return l(g,a,b,c);var e=function(b){d.handlers[b]=[],k(a,b)};if(b){var f=d.handlers[b];if(f){if(!c)return void e(b);if(c.guid)for(var h=0;ha?0:a;var c=Math.floor(a%60),d=Math.floor(a/60%60),e=Math.floor(a/3600),f=Math.floor(b/60%60),g=Math.floor(b/3600);return(isNaN(a)||a===1/0)&&(e=d=c="-"),e=e>0||g>0?e+":":"",d=((e||f>=10)&&10>d?"0"+d:d)+":",c=10>c?"0"+c:c,e+d+c}()}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],138:[function(a,b,c){"use strict";function d(){return e++}c.__esModule=!0,c.newGUID=d;var e=1},{}],139:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){var c=Array.prototype.slice.call(b),d=function(){},e=g["default"].console||{log:d,warn:d,error:d};a?c.unshift(a.toUpperCase()+":"):a="log",h.history.push(c),c.unshift("VIDEOJS:"),e[a].apply?e[a].apply(e,c):e[a](c.join(" "))}c.__esModule=!0;var f=a("global/window"),g=d(f),h=function(){e(null,arguments)};h.history=[],h.error=function(){e("error",arguments)},h.warn=function(){e("warn",arguments)},c["default"]=h,b.exports=c["default"]},{"global/window":2}],140:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){return!!a&&"object"==typeof a&&"[object Object]"===a.toString()&&a.constructor===Object}function f(){var a=Array.prototype.slice.call(arguments);return a.unshift({}),a.push(i),h["default"].apply(null,a),a[0]}c.__esModule=!0,c["default"]=f;var g=a("lodash-compat/object/merge"),h=d(g),i=function(a,b){return e(b)?e(a)?void 0:f(b):b};b.exports=c["default"]},{"lodash-compat/object/merge":40}],141:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=function(a){var b=f["default"].createElement("style");return b.className=a,b};c.createStyleElement=g;var h=function(a,b){a.styleSheet?a.styleSheet.cssText=b:a.textContent=b};c.setTextContent=h},{"global/document":1}],142:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){return Array.isArray(a)?f(a):void 0===a||void 0===b?f():f([[a,b]])}function f(a){return void 0===a||0===a.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:a.length,start:g.bind(null,"start",0,a),end:g.bind(null,"end",1,a)}}function g(a,b,c,d){return void 0===d&&(j["default"].warn("DEPRECATED: Function '"+a+"' on 'TimeRanges' called without an index argument."),d=0),h(a,d,c.length-1),c[d][b]}function h(a,b,c){if(0>b||b>c)throw new Error("Failed to execute '"+a+"' on 'TimeRanges': The index provided ("+b+") is greater than or equal to the maximum bound ("+c+").")}c.__esModule=!0,c.createTimeRanges=e;var i=a("./log.js"),j=d(i);c.createTimeRange=e},{"./log.js":139}],143:[function(a,b,c){"use strict";function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}c.__esModule=!0,c["default"]=d,b.exports=c["default"]},{}],144:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;var e=a("global/document"),f=d(e),g=a("global/window"),h=d(g),i=function(a){var b=["protocol","hostname","port","pathname","search","hash","host"],c=f["default"].createElement("a");c.href=a;var d=""===c.host&&"file:"!==c.protocol,e=void 0;d&&(e=f["default"].createElement("div"),e.innerHTML='',c=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),f["default"].body.appendChild(e));for(var g={},h=0;hx',a=b.firstChild.href}return a};c.getAbsoluteURL=j;var k=function(a){if("string"==typeof a){var b=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,c=b.exec(a);if(c)return c.pop().toLowerCase()}return""};c.getFileExtension=k;var l=function(a){var b=h["default"].location,c=i(a),d=":"===c.protocol?b.protocol:c.protocol,e=d+c.host!==b.protocol+b.host;return e};c.isCrossOrigin=l},{"global/document":1,"global/window":2}],145:[function(b,c,d){"use strict";function e(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b}function f(a){return a&&a.__esModule?a:{"default":a}}d.__esModule=!0;{var g=b("global/window"),h=f(g),i=b("global/document"),j=f(i),k=b("./setup"),l=e(k),m=b("./utils/stylesheet.js"),n=e(m),o=b("./component"),p=f(o),q=b("./event-target"),r=f(q),s=b("./utils/events.js"),t=e(s),u=b("./player"),v=f(u),w=b("./plugins.js"),x=f(w),y=b("../../src/js/utils/merge-options.js"),z=f(y),A=b("./utils/fn.js"),B=e(A),C=b("./tracks/text-track.js"),D=f(C),E=b("object.assign"),F=(f(E),b("./utils/time-ranges.js")),G=b("./utils/format-time.js"),H=f(G),I=b("./utils/log.js"),J=f(I),K=b("./utils/dom.js"),L=e(K),M=b("./utils/browser.js"),N=e(M),O=b("./utils/url.js"),P=e(O),Q=b("./extend.js"),R=f(Q),S=b("lodash-compat/object/merge"),T=f(S),U=b("./utils/create-deprecation-proxy.js"),V=f(U),W=b("xhr"),X=f(W),Y=b("./tech/tech.js"),Z=f(Y),$=b("./tech/html5.js"),_=(f($),b("./tech/flash.js"));f(_)}"undefined"==typeof HTMLVideoElement&&(j["default"].createElement("video"),j["default"].createElement("audio"),j["default"].createElement("track"));var aa=function da(a,b,c){var d=void 0;if("string"==typeof a){if(0===a.indexOf("#")&&(a=a.slice(1)),da.getPlayers()[a])return b&&J["default"].warn('Player "'+a+'" is already initialised. Options will not be applied.'),c&&da.getPlayers()[a].ready(c),da.getPlayers()[a];d=L.getEl(a)}else d=a;if(!d||!d.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return d.player||v["default"].players[d.playerId]||new v["default"](d,b,c)};if(h["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0){var ba=L.$(".vjs-styles-defaults");if(!ba){ba=n.createStyleElement("vjs-styles-defaults");var ca=L.$("head");ca.insertBefore(ba,ca.firstChild),n.setTextContent(ba,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}l.autoSetupTimeout(1,aa),aa.VERSION="5.9.0",aa.options=v["default"].prototype.options_,aa.getPlayers=function(){return v["default"].players},aa.players=V["default"](v["default"].players,{get:"Access to videojs.players is deprecated; use videojs.getPlayers instead",set:"Modification of videojs.players is deprecated"}),aa.getComponent=p["default"].getComponent,aa.registerComponent=function(a,b){Z["default"].isTech(b)&&J["default"].warn("The "+a+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),p["default"].registerComponent.call(p["default"],a,b)},aa.getTech=Z["default"].getTech,aa.registerTech=Z["default"].registerTech,aa.browser=N,aa.TOUCH_ENABLED=N.TOUCH_ENABLED,aa.extend=R["default"],aa.mergeOptions=z["default"],aa.bind=B.bind,aa.plugin=x["default"],aa.addLanguage=function(a,b){var c;return a=(""+a).toLowerCase(),T["default"](aa.options.languages,(c={},c[a]=b,c))[a]},aa.log=J["default"],aa.createTimeRange=aa.createTimeRanges=F.createTimeRanges,aa.formatTime=H["default"],aa.parseUrl=P.parseUrl,aa.isCrossOrigin=P.isCrossOrigin,aa.EventTarget=r["default"],aa.on=t.on,aa.one=t.one,aa.off=t.off,aa.trigger=t.trigger,aa.xhr=X["default"],aa.TextTrack=D["default"],aa.isEl=L.isEl,aa.isTextNode=L.isTextNode,aa.createEl=L.createEl,aa.hasClass=L.hasElClass,aa.addClass=L.addElClass,aa.removeClass=L.removeElClass,aa.toggleClass=L.toggleElClass,aa.setAttributes=L.setElAttributes,aa.getAttributes=L.getElAttributes,aa.emptyEl=L.emptyEl,aa.appendContent=L.appendContent,aa.insertContent=L.insertContent,"function"==typeof a&&a.amd?a("videojs",[],function(){return aa}):"object"==typeof d&&"object"==typeof c&&(c.exports=aa),d["default"]=aa,c.exports=d["default"]},{"../../src/js/utils/merge-options.js":140,"./component":67,"./event-target":101,"./extend.js":102,"./player":110,"./plugins.js":111,"./setup":115,"./tech/flash.js":118,"./tech/html5.js":119,"./tech/tech.js":121,"./tracks/text-track.js":130,"./utils/browser.js":131,"./utils/create-deprecation-proxy.js":133,"./utils/dom.js":134,"./utils/events.js":135,"./utils/fn.js":136,"./utils/format-time.js":137,"./utils/log.js":139,"./utils/stylesheet.js":141,"./utils/time-ranges.js":142,"./utils/url.js":144,"global/document":1,"global/window":2,"lodash-compat/object/merge":40,"object.assign":45,xhr:56}]},{},[145])(145)}),function(a){var b=a.vttjs={},c=b.VTTCue,d=b.VTTRegion,e=a.VTTCue,f=a.VTTRegion;b.shim=function(){b.VTTCue=c,b.VTTRegion=d},b.restore=function(){b.VTTCue=e,b.VTTRegion=f}}(this),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=h[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){if("string"!=typeof a)return!1;var b=i[a.toLowerCase()];return b?a.toLowerCase():!1}function e(a){for(var b=1;ba||a>100)throw new Error("Position must be between 0 and 100.");u=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",e({},j,{get:function(){return v},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",e({},j,{get:function(){return w},set:function(a){if(0>a||a>100)throw new Error("Size must be between 0 and 100.");w=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",e({},j,{get:function(){return x},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),h.displayState=void 0,i?h:void 0}var g="auto",h={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};f.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},a.VTTCue=a.VTTCue||f,b.VTTCue=f}(this,this.vttjs||{}),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=f[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){return"number"==typeof a&&a>=0&&100>=a}function e(){var a=100,b=3,e=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!d(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!d(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!d(a))throw new Error("RegionAnchorY must be between 0 and 100.");e=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!d(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!d(a))throw new Error("ViewportAnchorX must be between 0 and 100.");g=a}},scroll:{enumerable:!0,get:function(){return i},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var f={"":!0,up:!0};a.VTTRegion=a.VTTRegion||e,b.VTTRegion=e}(this,this.vttjs||{}),function(a){function b(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function c(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function d(){this.values=o(null)}function e(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function f(a,f,g){function h(){var d=c(a);if(null===d)throw new b(b.Errors.BadTimeStamp,"Malformed timestamp: "+k);return a=a.replace(/^[^\sa-zA-Z-]+/,""),d}function i(a,b){var c=new d;e(a,function(a,b){switch(a){case"region":for(var d=g.length-1;d>=0;d--)if(g[d].id===b){c.set(a,g[d].region);break}break;case"vertical":c.alt(a,b,["rl","lr"]);break;case"line":var e=b.split(","),f=e[0];c.integer(a,f),c.percent(a,f)?c.set("snapToLines",!1):null,c.alt(a,f,["auto"]),2===e.length&&c.alt("lineAlign",e[1],["start","middle","end"]);break;case"position":e=b.split(","),c.percent(a,e[0]),2===e.length&&c.alt("positionAlign",e[1],["start","middle","end"]);break;case"size":c.percent(a,b);break;case"align":c.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=c.get("region",null),b.vertical=c.get("vertical",""),b.line=c.get("line","auto"),b.lineAlign=c.get("lineAlign","start"),b.snapToLines=c.get("snapToLines",!0),b.size=c.get("size",100),b.align=c.get("align","middle"),b.position=c.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=c.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function j(){a=a.replace(/^\s+/,"")}var k=a;if(j(),f.startTime=h(),j(),"-->"!==a.substr(0,3))throw new b(b.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+k);a=a.substr(3),j(),f.endTime=h(),j(),i(a,f)}function g(a,b){function d(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function e(a){return p[a]}function f(a){for(;o=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(o[0],e);return a}function g(a,b){return!s[b.localName]||s[b.localName]===a.localName}function h(b,c){var d=q[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=r[b];return f&&c&&(e[f]=c.trim()),e}for(var i,j=a.document.createElement("div"),k=j,l=[];null!==(i=d());)if("<"!==i[0])k.appendChild(a.document.createTextNode(f(i)));else{if("/"===i[1]){l.length&&l[l.length-1]===i.substr(2).replace(">","")&&(l.pop(),k=k.parentNode);continue}var m,n=c(i.substr(1,i.length-2));if(n){m=a.document.createProcessingInstruction("timestamp",n),k.appendChild(m);continue}var o=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!o)continue;if(m=h(o[1],o[3]),!m)continue;if(!g(k,m))continue;o[2]&&(m.className=o[2].substr(1).replace("."," ")),l.push(o[1]),k.appendChild(m),k=m}return j}function h(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;ei&&(e=new l(a),g=i),a=new l(f)}return e||f}var f=new l(b),g=b.cue,h=i(g),j=[];if(g.snapToLines){var k;switch(g.vertical){case"":j=["+y","-y"],k="height";break;case"rl": -j=["+x","-x"],k="width";break;case"lr":j=["-x","+x"],k="width"}var m=f.lineHeight,n=m*Math.round(h),o=c[k]+m,p=j[0];Math.abs(n)>o&&(n=0>n?-1:1,n*=Math.ceil(o/m)*m),0>h&&(n+=""===g.vertical?c.height:c.width,j=j.reverse()),f.move(p,n)}else{var q=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=q/2;break;case"end":h-=q}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}j=["+y","-x","+x","-y"],f=new l(b)}var r=e(f,j);b.move(r.toCSSCompatValues(c))}function n(){}var o=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();b.prototype=o(Error.prototype),b.prototype.constructor=b,b.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d=0&&100>=b)?(this.set(a,b),!0):!1}};var p={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},r={v:"title",lang:"lang"},s={rt:"ruby"},t=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];j.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},j.prototype.formatStyle=function(a,b){return 0===a?0:a+b},k.prototype=o(j.prototype),k.prototype.constructor=k,l.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},l.prototype.overlaps=function(a){return this.lefta.left&&this.topa.top},l.prototype.overlapsAny=function(a){for(var b=0;b=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},l.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.lefta.right;case"+y":return this.topa.bottom}},l.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},l.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},l.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},n.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},n.convertCueToDOMTree=function(a,b){return a&&b?g(a,b):null};var u=.05,v="sans-serif",w="1.5%";n.processCues=function(a,b,c){function d(a){for(var b=0;b")){i.cue.id=j;continue}case"CUE":try{f(j,i.cue,i.regionList)}catch(m){i.reportOrThrowError(m),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var n=-1!==j.indexOf("-->");if(!j||n&&(l=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=j;continue;case"BADCUE":j||(i.state="ID");continue}}}catch(m){i.reportOrThrowError(m),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new b(b.Errors.BadSignature)}catch(c){a.reportOrThrowError(c)}return a.onflush&&a.onflush(),this}},a.WebVTT=n}(this,this.vttjs||{}); -//# sourceMappingURL=video.min.js.map \ No newline at end of file diff --git a/vendor/assets/javascripts/videojs/video.min.js.map b/vendor/assets/javascripts/videojs/video.min.js.map deleted file mode 100755 index cb7b86eb45d..00000000000 --- a/vendor/assets/javascripts/videojs/video.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"video.min.js","sources":["node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-pack/_prelude.js","node_modules/global/document.js","node_modules/global/window.js","node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-resolve/empty.js","node_modules/lodash-compat/date/now.js","node_modules/lodash-compat/function/debounce.js","node_modules/lodash-compat/function/restParam.js","node_modules/lodash-compat/function/throttle.js","node_modules/lodash-compat/internal/arrayCopy.js","node_modules/lodash-compat/internal/arrayEach.js","node_modules/lodash-compat/internal/baseCopy.js","node_modules/lodash-compat/internal/baseFor.js","node_modules/lodash-compat/internal/baseForIn.js","node_modules/lodash-compat/internal/baseMerge.js","node_modules/lodash-compat/internal/baseMergeDeep.js","node_modules/lodash-compat/internal/baseProperty.js","node_modules/lodash-compat/internal/bindCallback.js","node_modules/lodash-compat/internal/createAssigner.js","node_modules/lodash-compat/internal/createBaseFor.js","node_modules/lodash-compat/internal/getLength.js","node_modules/lodash-compat/internal/getNative.js","node_modules/lodash-compat/internal/isArrayLike.js","node_modules/lodash-compat/internal/isHostObject.js","node_modules/lodash-compat/internal/isIndex.js","node_modules/lodash-compat/internal/isIterateeCall.js","node_modules/lodash-compat/internal/isLength.js","node_modules/lodash-compat/internal/isObjectLike.js","node_modules/lodash-compat/internal/shimKeys.js","node_modules/lodash-compat/internal/toObject.js","node_modules/lodash-compat/lang/isArguments.js","node_modules/lodash-compat/lang/isArray.js","node_modules/lodash-compat/lang/isFunction.js","node_modules/lodash-compat/lang/isNative.js","node_modules/lodash-compat/lang/isObject.js","node_modules/lodash-compat/lang/isPlainObject.js","node_modules/lodash-compat/lang/isString.js","node_modules/lodash-compat/lang/isTypedArray.js","node_modules/lodash-compat/lang/toPlainObject.js","node_modules/lodash-compat/object/keys.js","node_modules/lodash-compat/object/keysIn.js","node_modules/lodash-compat/object/merge.js","node_modules/lodash-compat/support.js","node_modules/lodash-compat/utility/identity.js","node_modules/object.assign/hasSymbols.js","node_modules/object.assign/implementation.js","node_modules/object.assign/index.js","node_modules/object.assign/node_modules/define-properties/index.js","node_modules/object.assign/node_modules/define-properties/node_modules/foreach/index.js","node_modules/object.assign/node_modules/function-bind/implementation.js","node_modules/object.assign/node_modules/function-bind/index.js","node_modules/object.assign/node_modules/object-keys/index.js","node_modules/object.assign/node_modules/object-keys/isArguments.js","node_modules/object.assign/polyfill.js","node_modules/object.assign/shim.js","node_modules/safe-json-parse/tuple.js","node_modules/tsml/tsml.js","node_modules/xhr/index.js","node_modules/xhr/node_modules/is-function/index.js","node_modules/xhr/node_modules/once/once.js","node_modules/xhr/node_modules/parse-headers/node_modules/for-each/index.js","node_modules/xhr/node_modules/parse-headers/node_modules/trim/index.js","node_modules/xhr/node_modules/parse-headers/parse-headers.js","node_modules/xhr/node_modules/xtend/immutable.js","src/js/big-play-button.js","src/js/button.js","src/js/clickable-component.js","src/js/close-button.js","src/js/component.js","src/js/control-bar/control-bar.js","src/js/control-bar/fullscreen-toggle.js","src/js/control-bar/live-display.js","src/js/control-bar/mute-toggle.js","src/js/control-bar/play-toggle.js","src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js","src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js","src/js/control-bar/progress-control/load-progress-bar.js","src/js/control-bar/progress-control/mouse-time-display.js","src/js/control-bar/progress-control/play-progress-bar.js","src/js/control-bar/progress-control/progress-control.js","src/js/control-bar/progress-control/seek-bar.js","src/js/control-bar/progress-control/tooltip-progress-bar.js","src/js/control-bar/spacer-controls/custom-control-spacer.js","src/js/control-bar/spacer-controls/spacer.js","src/js/control-bar/text-track-controls/caption-settings-menu-item.js","src/js/control-bar/text-track-controls/captions-button.js","src/js/control-bar/text-track-controls/chapters-button.js","src/js/control-bar/text-track-controls/chapters-track-menu-item.js","src/js/control-bar/text-track-controls/descriptions-button.js","src/js/control-bar/text-track-controls/off-text-track-menu-item.js","src/js/control-bar/text-track-controls/subtitles-button.js","src/js/control-bar/text-track-controls/text-track-button.js","src/js/control-bar/text-track-controls/text-track-menu-item.js","src/js/control-bar/time-controls/current-time-display.js","src/js/control-bar/time-controls/duration-display.js","src/js/control-bar/time-controls/remaining-time-display.js","src/js/control-bar/time-controls/time-divider.js","src/js/control-bar/volume-control/volume-bar.js","src/js/control-bar/volume-control/volume-control.js","src/js/control-bar/volume-control/volume-level.js","src/js/control-bar/volume-menu-button.js","src/js/error-display.js","src/js/event-target.js","src/js/extend.js","src/js/fullscreen-api.js","src/js/loading-spinner.js","src/js/media-error.js","src/js/menu/menu-button.js","src/js/menu/menu-item.js","src/js/menu/menu.js","src/js/modal-dialog.js","src/js/player.js","src/js/plugins.js","src/js/popup/popup-button.js","src/js/popup/popup.js","src/js/poster-image.js","src/js/setup.js","src/js/slider/slider.js","src/js/tech/flash-rtmp.js","src/js/tech/flash.js","src/js/tech/html5.js","src/js/tech/loader.js","src/js/tech/tech.js","src/js/tracks/html-track-element-list.js","src/js/tracks/html-track-element.js","src/js/tracks/text-track-cue-list.js","src/js/tracks/text-track-display.js","src/js/tracks/text-track-enums.js","src/js/tracks/text-track-list-converter.js","src/js/tracks/text-track-list.js","src/js/tracks/text-track-settings.js","src/js/tracks/text-track.js","src/js/utils/browser.js","src/js/utils/buffer.js","src/js/utils/create-deprecation-proxy.js","src/js/utils/dom.js","src/js/utils/events.js","src/js/utils/fn.js","src/js/utils/format-time.js","src/js/utils/guid.js","src/js/utils/log.js","src/js/utils/merge-options.js","src/js/utils/stylesheet.js","src/js/utils/time-ranges.js","src/js/utils/to-title-case.js","src/js/utils/url.js","src/js/video.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","videojs","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length",1,"_dereq_","topLevel","minDoc","document","doccy","min-document",2,3,4,"getNative","nativeNow","Date","now","getTime","../internal/getNative",5,"debounce","func","wait","options","cancel","timeoutId","clearTimeout","maxTimeoutId","lastCalled","trailingCall","undefined","complete","isCalled","id","result","apply","thisArg","args","delayed","remaining","stamp","setTimeout","maxDelayed","trailing","debounced","arguments","leading","maxWait","leadingCall","TypeError","FUNC_ERROR_TEXT","isObject","nativeMax","Math","max","../date/now","../lang/isObject",6,"restParam","start","index","rest","Array","otherArgs",7,"throttle","./debounce",8,"arrayCopy","source","array",9,"arrayEach","iteratee",10,"baseCopy","props","object","key",11,"createBaseFor","baseFor","./createBaseFor",12,"baseForIn","keysIn","../object/keysIn","./baseFor",13,"baseMerge","customizer","stackA","stackB","isSrcArr","isArrayLike","isArray","isTypedArray","keys","srcValue","isObjectLike","baseMergeDeep","value","isCommon","../lang/isArray","../lang/isTypedArray","../object/keys","./arrayEach","./baseMergeDeep","./isArrayLike","./isObjectLike",14,"mergeFunc","isPlainObject","isArguments","toPlainObject","push","../lang/isArguments","../lang/isPlainObject","../lang/toPlainObject","./arrayCopy",15,"baseProperty","toObject","./toObject",16,"bindCallback","argCount","identity","collection","accumulator","other","../utility/identity",17,"createAssigner","assigner","sources","guard","isIterateeCall","../function/restParam","./bindCallback","./isIterateeCall",18,"fromRight","keysFunc","iterable",19,"getLength","./baseProperty",20,"isNative","../lang/isNative",21,"isLength","./getLength","./isLength",22,"isHostObject","Object","toString",23,"isIndex","reIsUint","test","MAX_SAFE_INTEGER",24,"type","./isIndex",25,26,27,"shimKeys","propsLength","allowIndexes","isString","hasOwnProperty","objectProto","prototype","../lang/isString",28,"support","unindexedChars","charAt","../support",29,"propertyIsEnumerable","../internal/isArrayLike","../internal/isObjectLike",30,"arrayTag","objToString","nativeIsArray","../internal/isLength",31,"isFunction","funcTag","./isObject",32,"reIsNative","fnToString","reIsHostCtor","Function","RegExp","replace","../internal/isHostObject","./isFunction",33,34,"Ctor","objectTag","constructor","ownLast","subValue","../internal/baseForIn","./isArguments",35,"stringTag",36,"typedArrayTags","argsTag","boolTag","dateTag","errorTag","mapTag","numberTag","regexpTag","setTag","weakMapTag","arrayBufferTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag",37,"../internal/baseCopy",38,"nativeKeys","enumPrototypes","../internal/shimKeys",39,"proto","isProto","skipIndexes","skipErrorProps","enumErrorProps","errorProto","skipProto","nonEnumShadows","tag","stringProto","nonEnums","nonEnumProps","shadowProps","nonEnum","String","toLocaleString","valueOf","../internal/arrayEach","../internal/isIndex","../lang/isFunction",40,"merge","../internal/baseMerge","../internal/createAssigner",41,"arrayProto","splice","x","0","y","spliceObjects",42,43,"Symbol","getOwnPropertySymbols","iterator","obj","sym","symVal","getOwnPropertyNames","syms","getOwnPropertyDescriptor","descriptor","enumerable","object-keys",44,"bind","canBeObject","hasSymbols","propIsEnumerable","target","objTarget","./hasSymbols","function-bind",45,"defineProperties","getPolyfill","shim","implementation","./implementation","./polyfill","./shim","define-properties",46,"foreach","toStr","fn","arePropertyDescriptorsSupported","defineProperty","_","supportsDescriptors","name","predicate","configurable","writable","map","predicates","concat",47,"hasOwn","ctx","k",48,"ERROR_MESSAGE","slice","funcType","that","bound","binder","boundLength","boundArgs","Empty",49,50,"has","isArgs","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","ctor","blacklistedKeys","$console","$frame","$frameElement","$frames","$parent","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","equalsConstructorPrototypeIfNotBuggy","keysShim","theKeys","j","skipConstructor","keysWorksWithArguments","originalKeys",51,"str","callee",52,"lacksProperEnumerationOrder","assign","letters","split","actual","assignHasPendingExceptions","preventExtensions","thrower",53,"polyfill",54,"SafeParseTuple","reviver","error","json","JSON","parse","err",55,"clean","sa",56,"forEachArray","isEmpty","initParams","uri","callback","params","xtend","createXHR","_createXHR","readystatechange","xhr","readyState","loadFunc","getBody","body","response","responseType","responseText","responseXML","isJson","errorFunc","evt","timeoutTimer","statusCode","failureResponse","aborted","status","useXDR","method","headers","url","rawRequest","getAllResponseHeaders","parseHeaders","once","cors","XDomainRequest","XMLHttpRequest","data","sync","stringify","onreadystatechange","onload","onerror","onprogress","ontimeout","open","username","password","withCredentials","timeout","abort","setRequestHeader","beforeSend","send","noop","toUpperCase","global/window","is-function","parse-headers",57,"string","alert","confirm","prompt",58,"called",59,"forEach","list","context","forEachString","forEachObject","len",60,"trim","left","right",61,"arg","row","indexOf","toLowerCase","for-each",62,"extend","_componentJs2","_interopRequireDefault","_componentJs","_classCallCheck","BigPlayButton","_Button","player","buildCSSClass","__esModule","newObj","Constructor","instance","_inherits","subClass","superClass","create","setPrototypeOf","__proto__","_clickableComponentJs2","_clickableComponentJs","_objectAssign","attributes","className","_objectAssign2","tabIndex","role","_utilsLogJs2","warn","_component2","addChild","child","default","_component","ClickableComponent","_Component","createEl","el","createControlTextEl","controlTextEl_","innerHTML","localize","controlText_","removeClass","el_","setAttribute","disable","handleFocus","Events","on","_globalDocument2","Fn","handleKeyPress","handleClick","event","CloseButton","_interopRequireWildcard","_globalWindow2","_globalWindow","Dom","_utilsDomJs","Component","player_","id_","Guid","newGUID","childIndex_","childNameIndex_","reportTouchActivity","trigger","bubbles","children_","dispose","removeElData","tagName","properties","languages","language","children","getChildById","componentName","ComponentClass","getComponent","componentClassName","component","removeChild","getChild","childFound","initChildren","opts","parentOptions","newChild","_this","workingChildren","Tech","options_","filter","some","wchild","handleAdd","first","second","removeOnDispose","_this2","off","cleanRemover","guid","third","nodeName","one","_this3","_arguments","newFunc","ready","isReady_","triggerReady","readyQueue","readyQueue_","$$","selector","contentEl","hasClass","classToCheck","hasElClass","addElClass","classToAdd","toggleClass","classToToggle","toggleElClass","show","dimension","num","skipListeners","widthOrHeight","val","style","computedWidthOrHeight","getComputedStyle","computedStyle","parseFloat","width","currentDimension","height","currentWidth","emitTapEvents","touchStart","touchTimeThreshold","couldBeTap","touches","firstTouch","xdiff","pageX","touchDistance","tapMovementThreshold","noTap","touchTime","enableTouchActivity","report","reportUserActivity","touchHolding","clearInterval","setInterval","touchEnd","intervalId","comp","init","subObj","_name","_spacerControlsCustomControlSpacerJs","ControlBar","dir","FullscreenToggle","isFullscreen","controlText","updateShowing","LiveDisplay","contentEl_","aria-live","MuteToggle","update","tech_","addClass","vol","muted","level","handlePlay","handlePause","PlayToggle","play","pause","_menuMenuJs2","_menuMenuJs","PlaybackRateMenuButton","_MenuButton","updateVisibility","appendChild","labelEl_","menu","playbackRate","currentRate","newRate","playbackRates","playerOptions","playbackRateSupported","updateLabel","PlaybackRateMenuItem","_MenuItem","label","rate","buffered","percentify","time","end","percent","part","bufferedEnd","_lodashCompatFunctionThrottle2","_lodashCompatFunctionThrottle","MouseTimeDisplay","controlBar","progressControl","keepTooltipsInside","handleMouseMove","newTime","calculateDistance","duration","position","findElPosition","parentNode","_utilsFormatTimeJs2","clampedPosition","clampPosition_","playerWidth","tooltipWidth","tooltipWidthHalf","ceil","_utilsFormatTimeJs","PlayProgressBar","_mouseTimeDisplayJs","ProgressControl","_loadProgressBarJs","SeekBar","_Slider","tooltipProgressBar","updateProgress","updateAriaAttributes","tooltip","tooltipStyle","scrubbing","getCache","currentTime","getPercent","toFixed","videoWasPlaying","stepForward","stepBack","updateDataAttr","TooltipProgressBar","querySelector","CustomControlSpacer","_Spacer","Spacer","CaptionSettingsMenuItem","_TextTrackMenuItem","kind","_captionSettingsMenuItemJs2","_captionSettingsMenuItemJs","_TextTrackButton","CaptionsButton","threshold","hide","items","kind_","_textTrackMenuItemJs2","_textTrackMenuItemJs","_chaptersTrackMenuItemJs2","_chaptersTrackMenuItemJs","ChaptersButton","createItems","tracks","textTracks","_length","track","chaptersTrack","title","_utilsToTitleCaseJs2","unshift","insertElFirst","cues","remoteTextTrackEl","cue","mi","_utilsFnJs","ChaptersTrackMenuItem","addEventListener","startTime","DescriptionsButton","removeEventListener","changeHandler","disabled","enable","OffTextTrackMenuItem","selected","handleTracksChange","_offTextTrackMenuItemJs","TextTrackButton","updateHandler","_offTextTrackMenuItemJs2","selectable","_globalDocument","TextTrackMenuItem","onchange","Event","dispatchEvent","updateContent","DurationDisplay","duration_","formattedTime","remainingTime","localizedText","TimeDivider","_sliderSliderJs","_volumeLevelJs","updateARIAAttributes","aria-label","volume","VolumeBar","checkMuted","VolumeControl","_volumeBarJs","VolumeLevel","_volumeControlVolumeBarJs","VolumeMenuButton","inline","vertical","volumeBar","volumeUpdate","_PopupButton","orientationClass","createPopup","contentElType","attachVolumeBarEvents","popup","menuContent","handleMouseDown","ErrorDisplay","_ModalDialog","content","message","./modal-dialog","./utils/dom","./utils/merge-options",101,"_utilsEventsJs","EventTarget","allowedEvents_","ael","_utilsLog","_utilsLog2","subClassMethods","methods","FullscreenApi","apiMap","browserApi","LoadingSpinner","MediaError","errorTypes","_utilsToTitleCaseJs","MenuButton","_ClickableComponent","handleSubmenuKeyPress","createMenu","which","buttonPressed_","unpressButton","preventDefault","lockShowing","focus","enabled_","MenuItem","_selected","focusedChild_","unlockShowing","stepChild","Menu","item","shift","ModalDialog","opened_","hasBeenOpened_","hasBeenFilled_","closeable","uncloseable","MODAL_CLASS_NAME","ESC","close","desc","fillAlways","fill","wasPlaying_","paused","ownerDocument","closeable_","_close","temp","fillWith","parentEl","empty","content_","_utilsBrowserJs","_utilsLogJs","_utilsMergeOptionsJs","_tracksTextTrackListConverterJs","_errorDisplayJs","_tracksTextTrackSettingsJs","tagAttributes","getElAttributes","languagesToLower","_utilsMergeOptionsJs2","plugins","playerOptionsCopy","isAudio","controls","flexNotSupported_","Player","styleEl_","players","removeAttribute","attr","attrs","playerId","defaultsStyleEl","$","head","insertBefore","nextSibling","firstChild","aspectRatio","links","getElementsByTagName","linkEl","privDimension","_dimension","parsedVal","updateStyleEl_","fluid","bool","ratio","VIDEOJS_NO_DYNAMIC_STYLE","_height","height_","techEl","_width","idClass","aspectRatio_","videoWidth","videoHeight","ratioParts","width_","ratioMultiplier","loadTech_","techName","_techTechJs2","getTech","disposeMediaElement","techName_","techOptions","nativeControlsForTouch","techId","textTracks_","preload","loop","poster","currentType_","src","cache_","techComponent","handleTechReady_","_tracksTextTrackListConverterJs2","jsonToTextTracks","textTracksJson_","handleTechLoadStart_","handleTechWaiting_","handleTechCanPlay_","handleTechCanPlayThrough_","handleTechPlaying_","handleTechEnded_","handleTechSeeking_","handleTechSeeked_","handleTechPlay_","handleTechFirstPlay_","handleTechPause_","handleTechProgress_","handleTechDurationChange_","handleTechFullscreenChange_","handleTechError_","handleTechAbort_","handleTechStalled_","handleTechLoadedMetaData_","handleTechLoadedData_","handleTechTextTrackChange_","handleTechPosterChange_","usingNativeControls","addTechControlsListeners_","removeTechControlsListeners_","handleTechClick_","handleTechTouchMove_","handleTechTouchEnd_","hasStarted","_hasStarted","hasStarted_","handleTechTap_","userActive","handleTechTouchStart_","userWasActive","handleStageClick_","handleTechSuspend_","handleTechEmptied_","handleTechTimeUpdate_","handleTechRateChange_","handleTechVolumeChange_","techCall_","techGet_","isScrubbing","scrubbing_","seconds","bufferedPercent","_utilsBufferJs","percentAsDecimal","fsApi","fullscreenchange","documentFullscreenChange","requestFullscreen","supportsFullScreen","exitFullscreen","isFullWindow","docOrigOverflow","documentElement","overflow","exitFullWindow","canPlayType","techOrder","tech","techs","_ref","found","innerArray","innerChoice","tester","outerChoice","foundSourceAndTech","flip","_ref2","canPlaySource","currentTech","sourceList_","load","sourceTech","selectSource","controls_","usingNativeControls_","error_","errorDisplay","ended","seeking","seekable","userActivity_","userActive_","stopPropagation","listenForUserActivity_","mouseInProgress","lastMoveX","lastMoveY","handleActivity","screenX","screenY","handleMouseUp","inactivityTimeout","remoteTextTracks","addTextTrack","addRemoteTextTrack","removeRemoteTextTrack","languages_","toJSON","modal","tagOptions","dataSetup","_safeParseTuple","baseOptions","hasChildNodes","childNodes","childName","_playerJs","Popup","append","PosterImage","fallbackImg_","setSrc","_windowLoaded","autoSetup","vids","mediaEls","audios","mediaEl","getAttribute","autoSetupTimeout","vjs","Slider","bar","barName","playerEvent","doc","progress","percentage","handleBlur","stopImmediatePropagation","vertical_","registerComponent","FlashRtmpDecorator","Flash","streamingFormats","streamToParts","parts","connection","stream","connEnd","search","streamBegin","lastIndexOf","substring","rtmpSourceHandler","isStreamingType","canHandleSource","attrUpper","_api","vjs_setProperty","vjs_getProperty","_tech","_utilsUrlJs","_Tech","setSource","swf","objId","eventProxyFunction","errorEventProxyFunction","flashVars","wmode","embed","setCurrentTime","vjs_pause","lastSeekTarget_","currentSource_","setPoster","_utilsTimeRangesJs","createTimeRange","ranges","enterFullScreen","_tech2","_readWrite","_readOnly","_createGetter","nativeSourceHandler","guessMimeType","ext","Url","getFileExtension","video/flv","video/mp4","checkReady","onEvent","swfID","eventName","getEl","version","navigator","description","match","getEmbedCode","flashVarsString","paramsString","attrsString","flashvars","_techJs2","_techJs","Html5","currentSrc","initNetworkState_","removeNodes","node","nodes","nodesLength","featuresNativeTextTracks","remoteTextTrackEls","addTrackElement_","addTrack_","handleTextTrackChange_","handleTextTrackChange","handleTextTrackRemove_","handleTextTrackRemove","proxyNativeTextTracks_","emulatedTt","tt","handleTextTrackAdd_","clone","cloneNode","createElement","browser","TOUCH_ENABLED","setElAttributes","class","settingsAttrs","overwriteAttrs","_ret","loadstartFired","setLoadstartFired","triggerLoadstart","eventsToTrigger","setVolume","setMuted","offsetWidth","offsetHeight","video","networkState","HAVE_METADATA","webkitEnterFullScreen","exitFullScreen","webkitExitFullScreen","_src","reset","resetMediaElement","setPreload","autoplay","setAutoplay","setControls","setLoop","defaultMuted","played","htmlTrackElement","srclang","trackElement","getTrackElementByTrack_","removeTrack_","TEST_VID","isSupported","registerSourceHandler","canControlVolume","canControlPlaybackRate","supportsNativeTextTracks","supportsTextTracks","mpegurlRE","patchCanPlayType","IS_OLD_ANDROID","mp4RE","unpatchCanPlayType","querySelectorAll","MediaLoader","_tracksTextTrackList","manualProgressOn","featuresTimeupdateEvents","nativeCaptions","nativeTextTracks","manualProgress","stopTrackingProgress","progressInterval","numBufferedPercent","onDurationChange","manualTimeUpdates","trackCurrentTime","stopTrackingCurrentTime","currentTimeInterval","manualTimeUpdatesOff","manuallyTriggered","initTextTrackListeners","textTrackListChanges","emulateTextTracks","script","updateDisplay","textTracksChanges","mode","_tracksTextTrackList2","remoteTextTracks_","createTrackHelper","removeTrackElement_","techs_","withSourceHandlers","handler","handlers","sourceHandlers","selectSourceHandler","sh","srcObj","fnName","originalFn","disposeSourceHandler","sourceHandler_","handleSource","HtmlTrackElementList","IS_IE8","prop","trackElements_","get","trackElements","_length2","trackElement_","_length3","HTMLTrackElement","_tracksTextTrack2","NONE","_EventTarget","TextTrackCueList","setCues_","length_","cues_","getCueById","parseInt","color","opacity","darkGray","lightGray","TextTrackDisplay","aria-atomic","clearDisplay","descriptionsTrack","captionsSubtitlesTrack","updateForTrack","overrides","getValues","_i","cueDiv","displayState","textOpacity","tryUpdateStyle","constructColor","backgroundColor","backgroundOpacity","windowColor","windowOpacity","edgeStyle","textShadow","fontPercent","fontSize","bottom","fontFamily","fontVariant","fontMap","trackToJson_","ret","reduce","acc","textTracksToJson","trackObjs","trackEls","TextTrackList","tracks_","rtrack","getTrackById","getSelectedOptionValue","selectedOption","selectedOptions","selectedIndex","option","TextTrackSettings","persistTextTrackSettings","saveSettings","restoreSettings","textEdge","fgColor","bgColor","bgOpacity","setValues","values","setSelectedOption","_safeJsonParseTuple2","localStorage","getItem","ttDisplay","_textTrackCueList2","_textTrackCueList","_eventTarget","_xhr2","_xhr","parseCues","srcContent","parser","WebVTT","Parser","vttjs","StringDecoder","oncue","addCue","onparsingerror","flush","loadTrack","crossOrigin","responseBody","loaded_","loadHandler","TextTrack","TextTrackEnum","TextTrackKind","activeCues","activeCues_","timeupdateHandler","changed","set","newMode","TextTrackMode","active","ct","endTime","removeCue","_removeCue","removed","IS_IPAD","IS_IPHONE","USER_AGENT","IS_IPOD","IOS_VERSION","IS_ANDROID","ANDROID_VERSION","major","minor","IS_NATIVE_ANDROID","appleWebkitVersion","bufferedDuration","_timeRangesJs","_logJs","_logJs2","messages","Proxy","defaultBehaviors","_taggedTemplateLiteralLoose","strings","raw","isNonBlankString","throwIfWhitespace","classRegExp","propName","_tsml2","_templateObject","parent","getElData","elData","elIdAttr","element","knownBooleans","attrName","attrVal","onselectstart","getBoundingClientRect","box","top","docEl","clientLeft","scrollLeft","pageXOffset","getPointerPosition","boxH","boxX","pageY","isEl","nodeType","isTextNode","_tsml","elem","_handleMultipleEvents","dispatcher","hash","fixEvent","m","handlersCopy","isImmediatePropagationStopped","removeType","isPropagationStopped","defaultPrevented","targetData","returnTrue","returnFalse","old","srcElement","relatedTarget","returnValue","cancelBubble","clientX","_cleanUpEvents","detachEvent","h","floor",138,"_logType","console","log","history","argsArray","isPlain","mergeOptions","destination","lodash-compat/object/merge",141,"createStyleElement","createTimeRanges","createTimeRangesObj","getRange","valueIndex","rangeIndex","parseUrl","href","addToBody","div","details","protocol","isCrossOrigin",145,"stylesheet","_utilsStylesheetJs","_player2","_player","_tracksTextTrackJs","_lodashCompatObjectMerge","_utilsCreateDeprecationProxyJs","_techTechJs","_techHtml5Js","getPlayers","addLanguage","setAttributes","insertContent"],"mappings":"AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CACA,SAAAA,GAAA,GAAA,gBAAAC,UAAA,mBAAAC,QAAAA,OAAAD,QAAAD,QAAA,IAAA,kBAAAG,SAAAA,OAAAC,IAAAD,UAAAH,OAAA,CAAA,GAAAK,EAAAA,GAAA,mBAAAC,QAAAA,OAAA,mBAAAC,QAAAA,OAAA,mBAAAC,MAAAA,KAAAC,KAAAJ,EAAAK,QAAAV,MAAA,WAAA,GAAAG,EAAA,OAAA,SAAAQ,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAhB,GAAA,GAAAqB,OAAA,uBAAAL,EAAA,IAAA,MAAAhB,GAAAsB,KAAA,mBAAA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;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GAAG,CAAC,UAAU,CAAC;;;;;;;;;AASlC,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC;;;;;;;;;AASlC,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;;;;;;AAcxC,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;AASxC,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,eAAe,CAAC;;;;;;;;;;;;AAY5C,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,eAAe,CAAC;;;;;;;;;AAS5C,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2B9B,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4B1C,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;;;;;;;;;AAS1C,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;AACjD,QAAM,CAAC,SAAS,EAAE,EAAE,EAAE,YAAU;AAAE,WAAO,OAAO,CAAC;GAAE,CAAC,CAAC;;;CAGtD,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACpE,UAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;GAC7B;;qBAEc,OAAO","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o logs the number of milliseconds it took for the deferred function to be invoked\n */\nvar now = nativeNow || function() {\n return new Date().getTime();\n};\n\nmodule.exports = now;\n","var isObject = require('../lang/isObject'),\n now = require('../date/now');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed invocations. Provide an options object to indicate that `func`\n * should be invoked on the leading and/or trailing edge of the `wait` timeout.\n * Subsequent calls to the debounced function return the result of the last\n * `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the debounced function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=false] Specify invoking on the leading\n * edge of the timeout.\n * @param {number} [options.maxWait] The maximum time `func` is allowed to be\n * delayed before it's invoked.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // avoid costly calculations while the window size is in flux\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // invoke `sendMail` when the click event is fired, debouncing subsequent calls\n * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // ensure `batchLog` is invoked once after 1 second of debounced calls\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', _.debounce(batchLog, 250, {\n * 'maxWait': 1000\n * }));\n *\n * // cancel a debounced call\n * var todoChanges = _.debounce(batchLog, 1000);\n * Object.observe(models.todo, todoChanges);\n *\n * Object.observe(models, function(changes) {\n * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {\n * todoChanges.cancel();\n * }\n * }, ['delete']);\n *\n * // ...at some point `models.todo` is changed\n * models.todo.completed = true;\n *\n * // ...before 1 second has passed `models.todo` is deleted\n * // which cancels the debounced `todoChanges` call\n * delete models.todo;\n */\nfunction debounce(func, wait, options) {\n var args,\n maxTimeoutId,\n result,\n stamp,\n thisArg,\n timeoutId,\n trailingCall,\n lastCalled = 0,\n maxWait = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = wait < 0 ? 0 : (+wait || 0);\n if (options === true) {\n var leading = true;\n trailing = false;\n } else if (isObject(options)) {\n leading = !!options.leading;\n maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (maxTimeoutId) {\n clearTimeout(maxTimeoutId);\n }\n lastCalled = 0;\n maxTimeoutId = timeoutId = trailingCall = undefined;\n }\n\n function complete(isCalled, id) {\n if (id) {\n clearTimeout(id);\n }\n maxTimeoutId = timeoutId = trailingCall = undefined;\n if (isCalled) {\n lastCalled = now();\n result = func.apply(thisArg, args);\n if (!timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n }\n }\n\n function delayed() {\n var remaining = wait - (now() - stamp);\n if (remaining <= 0 || remaining > wait) {\n complete(trailingCall, maxTimeoutId);\n } else {\n timeoutId = setTimeout(delayed, remaining);\n }\n }\n\n function maxDelayed() {\n complete(trailing, timeoutId);\n }\n\n function debounced() {\n args = arguments;\n stamp = now();\n thisArg = this;\n trailingCall = trailing && (timeoutId || !leading);\n\n if (maxWait === false) {\n var leadingCall = leading && !timeoutId;\n } else {\n if (!maxTimeoutId && !leading) {\n lastCalled = stamp;\n }\n var remaining = maxWait - (stamp - lastCalled),\n isCalled = remaining <= 0 || remaining > maxWait;\n\n if (isCalled) {\n if (maxTimeoutId) {\n maxTimeoutId = clearTimeout(maxTimeoutId);\n }\n lastCalled = stamp;\n result = func.apply(thisArg, args);\n }\n else if (!maxTimeoutId) {\n maxTimeoutId = setTimeout(maxDelayed, remaining);\n }\n }\n if (isCalled && timeoutId) {\n timeoutId = clearTimeout(timeoutId);\n }\n else if (!timeoutId && wait !== maxWait) {\n timeoutId = setTimeout(delayed, wait);\n }\n if (leadingCall) {\n isCalled = true;\n result = func.apply(thisArg, args);\n }\n if (isCalled && !timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n return result;\n }\n debounced.cancel = cancel;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as an array.\n *\n * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.restParam(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction restParam(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n rest = Array(length);\n\n while (++index < length) {\n rest[index] = args[start + index];\n }\n switch (start) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, args[0], rest);\n case 2: return func.call(this, args[0], args[1], rest);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = rest;\n return func.apply(this, otherArgs);\n };\n}\n\nmodule.exports = restParam;\n","var debounce = require('./debounce'),\n isObject = require('../lang/isObject');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed invocations. Provide an options object to indicate\n * that `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. Subsequent calls to the throttled function return the\n * result of the last `func` call.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the throttled function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=true] Specify invoking on the leading\n * edge of the timeout.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // avoid excessively updating the position while scrolling\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes\n * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {\n * 'trailing': false\n * }));\n *\n * // cancel a trailing throttled call\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (options === false) {\n leading = false;\n } else if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });\n}\n\nmodule.exports = throttle;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction arrayCopy(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = arrayCopy;\n","/**\n * A specialized version of `_.forEach` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\nfunction baseCopy(source, props, object) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n object[key] = source[key];\n }\n return object;\n}\n\nmodule.exports = baseCopy;\n","var createBaseFor = require('./createBaseFor');\n\n/**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseFor = require('./baseFor'),\n keysIn = require('../object/keysIn');\n\n/**\n * The base implementation of `_.forIn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForIn(object, iteratee) {\n return baseFor(object, iteratee, keysIn);\n}\n\nmodule.exports = baseForIn;\n","var arrayEach = require('./arrayEach'),\n baseMergeDeep = require('./baseMergeDeep'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isObject = require('../lang/isObject'),\n isObjectLike = require('./isObjectLike'),\n isTypedArray = require('../lang/isTypedArray'),\n keys = require('../object/keys');\n\n/**\n * The base implementation of `_.merge` without support for argument juggling,\n * multiple sources, and `this` binding `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {Object} Returns `object`.\n */\nfunction baseMerge(object, source, customizer, stackA, stackB) {\n if (!isObject(object)) {\n return object;\n }\n var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),\n props = isSrcArr ? undefined : keys(source);\n\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObjectLike(srcValue)) {\n stackA || (stackA = []);\n stackB || (stackB = []);\n baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);\n }\n else {\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n }\n if ((result !== undefined || (isSrcArr && !(key in object))) &&\n (isCommon || (result === result ? (result !== value) : (value === value)))) {\n object[key] = result;\n }\n }\n });\n return object;\n}\n\nmodule.exports = baseMerge;\n","var arrayCopy = require('./arrayCopy'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isPlainObject = require('../lang/isPlainObject'),\n isTypedArray = require('../lang/isTypedArray'),\n toPlainObject = require('../lang/toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {\n var length = stackA.length,\n srcValue = source[key];\n\n while (length--) {\n if (stackA[length] == srcValue) {\n object[key] = stackB[length];\n return;\n }\n }\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {\n result = isArray(value)\n ? value\n : (isArrayLike(value) ? arrayCopy(value) : []);\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n result = isArguments(value)\n ? toPlainObject(value)\n : (isPlainObject(value) ? value : {});\n }\n else {\n isCommon = false;\n }\n }\n // Add the source value to the stack of traversed objects and associate\n // it with its merged value.\n stackA.push(srcValue);\n stackB.push(result);\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);\n } else if (result === result ? (result !== value) : (value === value)) {\n object[key] = result;\n }\n}\n\nmodule.exports = baseMergeDeep;\n","var toObject = require('./toObject');\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : toObject(object)[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var identity = require('../utility/identity');\n\n/**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction bindCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return identity;\n }\n if (thisArg === undefined) {\n return func;\n }\n switch (argCount) {\n case 1: return function(value) {\n return func.call(thisArg, value);\n };\n case 3: return function(value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n case 5: return function(value, other, key, object, source) {\n return func.call(thisArg, value, other, key, object, source);\n };\n }\n return function() {\n return func.apply(thisArg, arguments);\n };\n}\n\nmodule.exports = bindCallback;\n","var bindCallback = require('./bindCallback'),\n isIterateeCall = require('./isIterateeCall'),\n restParam = require('../function/restParam');\n\n/**\n * Creates a `_.assign`, `_.defaults`, or `_.merge` function.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return restParam(function(object, sources) {\n var index = -1,\n length = object == null ? 0 : sources.length,\n customizer = length > 2 ? sources[length - 2] : undefined,\n guard = length > 2 ? sources[2] : undefined,\n thisArg = length > 1 ? sources[length - 1] : undefined;\n\n if (typeof customizer == 'function') {\n customizer = bindCallback(customizer, thisArg, 5);\n length -= 2;\n } else {\n customizer = typeof thisArg == 'function' ? thisArg : undefined;\n length -= (customizer ? 1 : 0);\n }\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var toObject = require('./toObject');\n\n/**\n * Creates a base function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var iterable = toObject(object),\n props = keysFunc(object),\n length = props.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length)) {\n var key = props[index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var baseProperty = require('./baseProperty');\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\nmodule.exports = getLength;\n","var isNative = require('../lang/isNative');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getLength = require('./getLength'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nfunction isArrayLike(value) {\n return value != null && isLength(getLength(value));\n}\n\nmodule.exports = isArrayLike;\n","/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nvar isHostObject = (function() {\n try {\n Object({ 'toString': 0 } + '');\n } catch(e) {\n return function() { return false; };\n }\n return function(value) {\n // IE < 9 presents many host objects as `Object` objects that can coerce\n // to strings despite having improperly defined `toString` methods.\n return typeof value.toString != 'function' && typeof (value + '') == 'string';\n };\n}());\n\nmodule.exports = isHostObject;\n","/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;\n","var isArrayLike = require('./isArrayLike'),\n isIndex = require('./isIndex'),\n isObject = require('../lang/isObject');\n\n/**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)) {\n var other = object[index];\n return value === value ? (value === other) : (other !== other);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isIndex = require('./isIndex'),\n isLength = require('./isLength'),\n isString = require('../lang/isString'),\n keysIn = require('../object/keysIn');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction shimKeys(object) {\n var props = keysIn(object),\n propsLength = props.length,\n length = propsLength && object.length;\n\n var allowIndexes = !!length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object));\n\n var index = -1,\n result = [];\n\n while (++index < propsLength) {\n var key = props[index];\n if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = shimKeys;\n","var isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\nfunction toObject(value) {\n if (support.unindexedChars && isString(value)) {\n var index = -1,\n length = value.length,\n result = Object(value);\n\n while (++index < length) {\n result[index] = value.charAt(index);\n }\n return result;\n }\n return isObject(value) ? value : Object(value);\n}\n\nmodule.exports = toObject;\n","var isArrayLike = require('../internal/isArrayLike'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is classified as an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n return isObjectLike(value) && isArrayLike(value) &&\n hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n}\n\nmodule.exports = isArguments;\n","var getNative = require('../internal/getNative'),\n isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\nmodule.exports = isArray;\n","var isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 which returns 'object' for typed array constructors.\n return isObject(value) && objToString.call(value) == funcTag;\n}\n\nmodule.exports = isFunction;\n","var isFunction = require('./isFunction'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);\n}\n\nmodule.exports = isNative;\n","/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseForIn = require('../internal/baseForIn'),\n isArguments = require('./isArguments'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * **Note:** This method assumes objects created by the `Object` constructor\n * have no inherited enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n var Ctor;\n\n // Exit early for non `Object` objects.\n if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) ||\n (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {\n return false;\n }\n // IE < 9 iterates inherited properties before own properties. If the first\n // iterated property is an object's own property then there are no inherited\n // enumerable properties.\n var result;\n if (support.ownLast) {\n baseForIn(value, function(subValue, key, object) {\n result = hasOwnProperty.call(object, key);\n return false;\n });\n return result !== false;\n }\n // In most environments an object's own properties are iterated before\n // its inherited properties. If the last iterated property is an object's\n // own property then there are no inherited enumerable properties.\n baseForIn(value, function(subValue, key) {\n result = key;\n });\n return result === undefined || hasOwnProperty.call(value, result);\n}\n\nmodule.exports = isPlainObject;\n","var isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n","var baseCopy = require('../internal/baseCopy'),\n keysIn = require('../object/keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable\n * properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return baseCopy(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var getNative = require('../internal/getNative'),\n isArrayLike = require('../internal/isArrayLike'),\n isObject = require('../lang/isObject'),\n shimKeys = require('../internal/shimKeys'),\n support = require('../support');\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = getNative(Object, 'keys');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n var Ctor = object == null ? undefined : object.constructor;\n if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {\n return shimKeys(object);\n }\n return isObject(object) ? nativeKeys(object) : [];\n};\n\nmodule.exports = keys;\n","var arrayEach = require('../internal/arrayEach'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isFunction = require('../lang/isFunction'),\n isIndex = require('../internal/isIndex'),\n isLength = require('../internal/isLength'),\n isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n/** Used to fix the JScript `[[DontEnum]]` bug. */\nvar shadowProps = [\n 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',\n 'toLocaleString', 'toString', 'valueOf'\n];\n\n/** Used for native method references. */\nvar errorProto = Error.prototype,\n objectProto = Object.prototype,\n stringProto = String.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to avoid iterating over non-enumerable properties in IE < 9. */\nvar nonEnumProps = {};\nnonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };\nnonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };\nnonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };\nnonEnumProps[objectTag] = { 'constructor': true };\n\narrayEach(shadowProps, function(key) {\n for (var tag in nonEnumProps) {\n if (hasOwnProperty.call(nonEnumProps, tag)) {\n var props = nonEnumProps[tag];\n props[key] = hasOwnProperty.call(props, key);\n }\n }\n});\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!isObject(object)) {\n object = Object(object);\n }\n var length = object.length;\n\n length = (length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object)) && length) || 0;\n\n var Ctor = object.constructor,\n index = -1,\n proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,\n isProto = proto === object,\n result = Array(length),\n skipIndexes = length > 0,\n skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),\n skipProto = support.enumPrototypes && isFunction(object);\n\n while (++index < length) {\n result[index] = (index + '');\n }\n // lodash skips the `constructor` property when it infers it's iterating\n // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`\n // attribute of an existing property and the `constructor` property of a\n // prototype defaults to non-enumerable.\n for (var key in object) {\n if (!(skipProto && key == 'prototype') &&\n !(skipErrorProps && (key == 'message' || key == 'name')) &&\n !(skipIndexes && isIndex(key, length)) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n if (support.nonEnumShadows && object !== objectProto) {\n var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),\n nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];\n\n if (tag == objectTag) {\n proto = objectProto;\n }\n length = shadowProps.length;\n while (length--) {\n key = shadowProps[length];\n var nonEnum = nonEnums[key];\n if (!(isProto && nonEnum) &&\n (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {\n result.push(key);\n }\n }\n }\n return result;\n}\n\nmodule.exports = keysIn;\n","var baseMerge = require('../internal/baseMerge'),\n createAssigner = require('../internal/createAssigner');\n\n/**\n * Recursively merges own enumerable properties of the source object(s), that\n * don't resolve to `undefined` into the destination object. Subsequent sources\n * overwrite property assignments of previous sources. If `customizer` is\n * provided it's invoked to produce the merged values of the destination and\n * source properties. If `customizer` returns `undefined` merging is handled\n * by the method instead. The `customizer` is bound to `thisArg` and invoked\n * with five arguments: (objectValue, sourceValue, key, object, source).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var users = {\n * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n * };\n *\n * var ages = {\n * 'data': [{ 'age': 36 }, { 'age': 40 }]\n * };\n *\n * _.merge(users, ages);\n * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n *\n * // using a customizer callback\n * var object = {\n * 'fruits': ['apple'],\n * 'vegetables': ['beet']\n * };\n *\n * var other = {\n * 'fruits': ['banana'],\n * 'vegetables': ['carrot']\n * };\n *\n * _.merge(object, other, function(a, b) {\n * if (_.isArray(a)) {\n * return a.concat(b);\n * }\n * });\n * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n */\nvar merge = createAssigner(baseMerge);\n\nmodule.exports = merge;\n","/** Used for native method references. */\nvar arrayProto = Array.prototype,\n errorProto = Error.prototype,\n objectProto = Object.prototype;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/**\n * An object environment feature flags.\n *\n * @static\n * @memberOf _\n * @type Object\n */\nvar support = {};\n\n(function(x) {\n var Ctor = function() { this.x = x; },\n object = { '0': x, 'length': x },\n props = [];\n\n Ctor.prototype = { 'valueOf': x, 'y': x };\n for (var key in new Ctor) { props.push(key); }\n\n /**\n * Detect if `name` or `message` properties of `Error.prototype` are\n * enumerable by default (IE < 9, Safari < 5.1).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||\n propertyIsEnumerable.call(errorProto, 'name');\n\n /**\n * Detect if `prototype` properties are enumerable by default.\n *\n * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1\n * (if the prototype or a property on the prototype has been set)\n * incorrectly set the `[[Enumerable]]` value of a function's `prototype`\n * property to `true`.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');\n\n /**\n * Detect if properties shadowing those on `Object.prototype` are non-enumerable.\n *\n * In IE < 9 an object's own properties, shadowing non-enumerable ones,\n * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.nonEnumShadows = !/valueOf/.test(props);\n\n /**\n * Detect if own properties are iterated after inherited properties (IE < 9).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.ownLast = props[0] != 'x';\n\n /**\n * Detect if `Array#shift` and `Array#splice` augment array-like objects\n * correctly.\n *\n * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array\n * `shift()` and `splice()` functions that fail to remove the last element,\n * `value[0]`, of array-like objects even though the \"length\" property is\n * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,\n * while `splice()` is buggy regardless of mode in IE < 9.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.spliceObjects = (splice.call(object, 0, 1), !object[0]);\n\n /**\n * Detect lack of support for accessing string characters by index.\n *\n * IE < 8 can't access characters by index. IE 8 can only access characters\n * by index on string literals, not string objects.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';\n}(1, 0));\n\nmodule.exports = support;\n","/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","'use strict';\n\nvar keys = require('object-keys');\n\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tif (typeof sym === 'string') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(Object(sym) instanceof Symbol)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; }\n\tif (keys(obj).length !== 0) { return false; }\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = require('object-keys');\nvar bind = require('function-bind');\nvar canBeObject = function (obj) {\n\treturn typeof obj !== 'undefined' && obj !== null;\n};\nvar hasSymbols = require('./hasSymbols')();\nvar toObject = Object;\nvar push = bind.call(Function.call, Array.prototype.push);\nvar propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);\n\nmodule.exports = function assign(target, source1) {\n\tif (!canBeObject(target)) { throw new TypeError('target must be an object'); }\n\tvar objTarget = toObject(target);\n\tvar s, source, i, props, syms, value, key;\n\tfor (s = 1; s < arguments.length; ++s) {\n\t\tsource = toObject(arguments[s]);\n\t\tprops = keys(source);\n\t\tif (hasSymbols && Object.getOwnPropertySymbols) {\n\t\t\tsyms = Object.getOwnPropertySymbols(source);\n\t\t\tfor (i = 0; i < syms.length; ++i) {\n\t\t\t\tkey = syms[i];\n\t\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\t\tpush(props, key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < props.length; ++i) {\n\t\t\tkey = props[i];\n\t\t\tvalue = source[key];\n\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\tobjTarget[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn objTarget;\n};\n","'use strict';\n\nvar defineProperties = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\ndefineProperties(implementation, {\n\timplementation: implementation,\n\tgetPolyfill: getPolyfill,\n\tshim: shim\n});\n\nmodule.exports = implementation;\n","'use strict';\n\nvar keys = require('object-keys');\nvar foreach = require('foreach');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';\n\nvar toStr = Object.prototype.toString;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\tObject.defineProperty(obj, 'x', { enumerable: false, value: obj });\n /* eslint-disable no-unused-vars, no-restricted-syntax */\n for (var _ in obj) { return false; }\n /* eslint-enable no-unused-vars, no-restricted-syntax */\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\tObject.defineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = props.concat(Object.getOwnPropertySymbols(map));\n\t}\n\tforeach(props, function (name) {\n\t\tdefineProperty(object, name, map[name], predicates[name]);\n\t});\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n","var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","var implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\nvar hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');\nvar hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar blacklistedKeys = {\n\t$console: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$parent: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) {\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar lacksProperEnumerationOrder = function () {\n\tif (!Object.assign) {\n\t\treturn false;\n\t}\n\t// v8, specifically in node 4.x, has a bug with incorrect property enumeration order\n\t// note: this does not detect the bug unless there's 20 characters\n\tvar str = 'abcdefghijklmnopqrst';\n\tvar letters = str.split('');\n\tvar map = {};\n\tfor (var i = 0; i < letters.length; ++i) {\n\t\tmap[letters[i]] = letters[i];\n\t}\n\tvar obj = Object.assign({}, map);\n\tvar actual = '';\n\tfor (var k in obj) {\n\t\tactual += k;\n\t}\n\treturn str !== actual;\n};\n\nvar assignHasPendingExceptions = function () {\n\tif (!Object.assign || !Object.preventExtensions) {\n\t\treturn false;\n\t}\n\t// Firefox 37 still has \"pending exception\" logic in its Object.assign implementation,\n\t// which is 72% slower than our shim, and Firefox 40's native implementation.\n\tvar thrower = Object.preventExtensions({ 1: 2 });\n\ttry {\n\t\tObject.assign(thrower, 'xy');\n\t} catch (e) {\n\t\treturn thrower[1] === 'y';\n\t}\n};\n\nmodule.exports = function getPolyfill() {\n\tif (!Object.assign) {\n\t\treturn implementation;\n\t}\n\tif (lacksProperEnumerationOrder()) {\n\t\treturn implementation;\n\t}\n\tif (assignHasPendingExceptions()) {\n\t\treturn implementation;\n\t}\n\treturn Object.assign;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimAssign() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tObject,\n\t\t{ assign: polyfill },\n\t\t{ assign: function () { return Object.assign !== polyfill; } }\n\t);\n\treturn polyfill;\n};\n","module.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n var json\n var error = null\n\n try {\n json = JSON.parse(obj, reviver)\n } catch (err) {\n error = err\n }\n\n return [error, json]\n}\n","function clean (s) {\n return s.replace(/\\n\\r?\\s*/g, '')\n}\n\n\nmodule.exports = function tsml (sa) {\n var s = ''\n , i = 0\n\n for (; i < arguments.length; i++)\n s += clean(sa[i]) + (arguments[i + 1] || '')\n\n return s\n}","\"use strict\";\nvar window = require(\"global/window\")\nvar once = require(\"once\")\nvar isFunction = require(\"is-function\")\nvar parseHeaders = require(\"parse-headers\")\nvar xtend = require(\"xtend\")\n\nmodule.exports = createXHR\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\n\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\n options = initParams(uri, options, callback)\n options.method = method.toUpperCase()\n return _createXHR(options)\n }\n})\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i])\n }\n}\n\nfunction isEmpty(obj){\n for(var i in obj){\n if(obj.hasOwnProperty(i)) return false\n }\n return true\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri\n\n if (isFunction(options)) {\n callback = options\n if (typeof uri === \"string\") {\n params = {uri:uri}\n }\n } else {\n params = xtend(options, {uri: uri})\n }\n\n params.callback = callback\n return params\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback)\n return _createXHR(options)\n}\n\nfunction _createXHR(options) {\n var callback = options.callback\n if(typeof callback === \"undefined\"){\n throw new Error(\"callback argument missing\")\n }\n callback = once(callback)\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n loadFunc()\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined\n\n if (xhr.response) {\n body = xhr.response\n } else if (xhr.responseType === \"text\" || !xhr.responseType) {\n body = xhr.responseText || xhr.responseXML\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body)\n } catch (e) {}\n }\n\n return body\n }\n\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer)\n if(!(evt instanceof Error)){\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\n }\n evt.statusCode = 0\n callback(evt, failureResponse)\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return\n var status\n clearTimeout(timeoutTimer)\n if(options.useXDR && xhr.status===undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200\n } else {\n status = (xhr.status === 1223 ? 204 : xhr.status)\n }\n var response = failureResponse\n var err = null\n\n if (status !== 0){\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n }\n if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders())\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\")\n }\n callback(err, response, response.body)\n\n }\n\n var xhr = options.xhr || null\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest()\n }else{\n xhr = new createXHR.XMLHttpRequest()\n }\n }\n\n var key\n var aborted\n var uri = xhr.url = options.uri || options.url\n var method = xhr.method = options.method || \"GET\"\n var body = options.body || options.data || null\n var headers = xhr.headers = options.headers || {}\n var sync = !!options.sync\n var isJson = false\n var timeoutTimer\n\n if (\"json\" in options) {\n isJson = true\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don't override existing accept header declared by user\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don't override existing accept header declared by user\n body = JSON.stringify(options.json)\n }\n }\n\n xhr.onreadystatechange = readystatechange\n xhr.onload = loadFunc\n xhr.onerror = errorFunc\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n }\n xhr.ontimeout = errorFunc\n xhr.open(method, uri, !sync, options.username, options.password)\n //has to be after open\n if(!sync) {\n xhr.withCredentials = !!options.withCredentials\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0 ) {\n timeoutTimer = setTimeout(function(){\n aborted=true//IE9 may still call readystatechange\n xhr.abort(\"timeout\")\n var e = new Error(\"XMLHttpRequest timeout\")\n e.code = \"ETIMEDOUT\"\n errorFunc(e)\n }, options.timeout )\n }\n\n if (xhr.setRequestHeader) {\n for(key in headers){\n if(headers.hasOwnProperty(key)){\n xhr.setRequestHeader(key, headers[key])\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\")\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType\n }\n\n if (\"beforeSend\" in options &&\n typeof options.beforeSend === \"function\"\n ) {\n options.beforeSend(xhr)\n }\n\n xhr.send(body)\n\n return xhr\n\n\n}\n\nfunction noop() {}\n","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n","module.exports = once\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var called = false\n return function () {\n if (called) return\n called = true\n return fn.apply(this, arguments)\n }\n}\n","var isFunction = require('is-function')\n\nmodule.exports = forEach\n\nvar toString = Object.prototype.toString\nvar hasOwnProperty = Object.prototype.hasOwnProperty\n\nfunction forEach(list, iterator, context) {\n if (!isFunction(iterator)) {\n throw new TypeError('iterator must be a function')\n }\n\n if (arguments.length < 3) {\n context = this\n }\n \n if (toString.call(list) === '[object Array]')\n forEachArray(list, iterator, context)\n else if (typeof list === 'string')\n forEachString(list, iterator, context)\n else\n forEachObject(list, iterator, context)\n}\n\nfunction forEachArray(array, iterator, context) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n iterator.call(context, array[i], i, array)\n }\n }\n}\n\nfunction forEachString(string, iterator, context) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n iterator.call(context, string.charAt(i), i, string)\n }\n}\n\nfunction forEachObject(object, iterator, context) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n iterator.call(context, object[k], k, object)\n }\n }\n}\n","\nexports = module.exports = trim;\n\nfunction trim(str){\n return str.replace(/^\\s*|\\s*$/g, '');\n}\n\nexports.left = function(str){\n return str.replace(/^\\s*/, '');\n};\n\nexports.right = function(str){\n return str.replace(/\\s*$/, '');\n};\n","var trim = require('trim')\n , forEach = require('for-each')\n , isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n }\n\nmodule.exports = function (headers) {\n if (!headers)\n return {}\n\n var result = {}\n\n forEach(\n trim(headers).split('\\n')\n , function (row) {\n var index = row.indexOf(':')\n , key = trim(row.slice(0, index)).toLowerCase()\n , value = trim(row.slice(index + 1))\n\n if (typeof(result[key]) === 'undefined') {\n result[key] = value\n } else if (isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [ result[key], value ]\n }\n }\n )\n\n return result\n}","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","/**\n * @file big-play-button.js\n */\nimport Button from './button.js';\nimport Component from './component.js';\n\n/**\n * Initial play button. Shows before the video has played. The hiding of the\n * big play button is done via CSS and player states.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Button\n * @class BigPlayButton\n */\nclass BigPlayButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return 'vjs-big-play-button';\n }\n\n /**\n * Handles click for play\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.play();\n }\n\n}\n\nBigPlayButton.prototype.controlText_ = 'Play Video';\n\nComponent.registerComponent('BigPlayButton', BigPlayButton);\nexport default BigPlayButton;\n","/**\n * @file button.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Base class for all buttons\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends ClickableComponent\n * @class Button\n */\nclass Button extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='button', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass()\n }, props);\n\n if (tag !== 'button') {\n log.warn(`Creating a Button with an HTML element of ${tag} is deprecated; use ClickableComponent instead.`);\n\n // Add properties for clickable element which is not a native HTML button\n props = assign({\n tabIndex: 0\n }, props);\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button'\n }, attributes);\n }\n\n // Add attributes for button element\n attributes = assign({\n type: 'button', // Necessary since the default button type is \"submit\"\n 'aria-live': 'polite' // let the screen reader user know that the text of the button may change\n }, attributes);\n\n let el = Component.prototype.createEl.call(this, tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * Adds a child component inside this button\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @deprecated\n * @method addChild\n */\n addChild(child, options={}) {\n let className = this.constructor.name;\n log.warn(`Adding an actionable (user controllable) child to a Button (${className}) is not supported; use a ClickableComponent instead.`);\n\n // Avoid the error message generated by ClickableComponent's addChild method\n return Component.prototype.addChild.call(this, child, options);\n }\n\n /**\n * Handle KeyPress (document level) - Extend with specific functionality for button\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Ignore Space (32) or Enter (13) key operation, which is handled by the browser for a button.\n if (event.which === 32 || event.which === 13) {\n } else {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n}\n\nComponent.registerComponent('Button', Button);\nexport default Button;\n","/**\n * @file button.js\n */\nimport Component from './component';\nimport * as Dom from './utils/dom.js';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Clickable Component which is clickable or keyboard actionable, but is not a native HTML button\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class ClickableComponent\n */\nclass ClickableComponent extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.emitTapEvents();\n\n this.on('tap', this.handleClick);\n this.on('click', this.handleClick);\n this.on('focus', this.handleFocus);\n this.on('blur', this.handleBlur);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='div', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass(),\n tabIndex: 0\n }, props);\n\n if (tag === 'button') {\n log.error(`Creating a ClickableComponent with an HTML element of ${tag} is not supported; use a Button instead.`);\n }\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button',\n 'aria-live': 'polite' // let the screen reader user know that the text of the element may change\n }, attributes);\n\n let el = super.createEl(tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * create control text\n *\n * @param {Element} el Parent element for the control text\n * @return {Element}\n * @method controlText\n */\n createControlTextEl(el) {\n this.controlTextEl_ = Dom.createEl('span', {\n className: 'vjs-control-text'\n });\n\n if (el) {\n el.appendChild(this.controlTextEl_);\n }\n\n this.controlText(this.controlText_);\n\n return this.controlTextEl_;\n }\n\n /**\n * Controls text - both request and localize\n *\n * @param {String} text Text for element\n * @return {String}\n * @method controlText\n */\n controlText(text) {\n if (!text) return this.controlText_ || 'Need Text';\n\n this.controlText_ = text;\n this.controlTextEl_.innerHTML = this.localize(this.controlText_);\n\n return this;\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String}\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-control vjs-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Adds a child component inside this clickable-component\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}) {\n // TODO: Fix adding an actionable child to a ClickableComponent; currently\n // it will cause issues with assistive technology (e.g. screen readers)\n // which support ARIA, since an element with role=\"button\" cannot have\n // actionable child elements.\n\n //let className = this.constructor.name;\n //log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role=\"button\" cannot have actionable child elements.`);\n\n return super.addChild(child, options);\n }\n\n /**\n * Enable the component element\n *\n * @return {Component}\n * @method enable\n */\n enable() {\n this.removeClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'false');\n return this;\n }\n\n /**\n * Disable the component element\n *\n * @return {Component}\n * @method disable\n */\n disable() {\n this.addClass('vjs-disabled');\n this.el_.setAttribute('aria-disabled', 'true');\n return this;\n }\n\n /**\n * Handle Click - Override with specific functionality for component\n *\n * @method handleClick\n */\n handleClick() {}\n\n /**\n * Handle Focus - Add keyboard functionality to element\n *\n * @method handleFocus\n */\n handleFocus() {\n Events.on(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n /**\n * Handle KeyPress (document level) - Trigger click when Space or Enter key is pressed\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Support Space (32) or Enter (13) key operation to fire a click event\n if (event.which === 32 || event.which === 13) {\n event.preventDefault();\n this.handleClick(event);\n } else if (super.handleKeyPress) {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n /**\n * Handle Blur - Remove keyboard triggers\n *\n * @method handleBlur\n */\n handleBlur() {\n Events.off(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n}\n\nComponent.registerComponent('ClickableComponent', ClickableComponent);\nexport default ClickableComponent;\n","import Button from './button';\nimport Component from './component';\n\n/**\n * The `CloseButton` component is a button which fires a \"close\" event\n * when it is activated.\n *\n * @extends Button\n * @class CloseButton\n */\nclass CloseButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n this.controlText(options && options.controlText || this.localize('Close'));\n }\n\n buildCSSClass() {\n return `vjs-close-button ${super.buildCSSClass()}`;\n }\n\n handleClick() {\n this.trigger({type: 'close', bubbles: false});\n }\n}\n\nComponent.registerComponent('CloseButton', CloseButton);\nexport default CloseButton;\n","/**\n * @file component.js\n *\n * Player Component - Base class for all UI objects\n */\n\nimport window from 'global/window';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as Events from './utils/events.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\n\n\n/**\n * Base UI Component class\n * Components are embeddable UI objects that are represented by both a\n * javascript object and an element in the DOM. They can be children of other\n * components, and can have many children themselves.\n * ```js\n * // adding a button to the player\n * var button = player.addChild('button');\n * button.el(); // -> button element\n * ```\n * ```html\n *
    \n *
    Button
    \n *
    \n * ```\n * Components are also event targets.\n * ```js\n * button.on('click', function(){\n * console.log('Button Clicked!');\n * });\n * button.trigger('customevent');\n * ```\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @class Component\n */\nclass Component {\n\n constructor(player, options, ready) {\n\n // The component might be the player itself and we can't pass `this` to super\n if (!player && this.play) {\n this.player_ = player = this; // eslint-disable-line\n } else {\n this.player_ = player;\n }\n\n // Make a copy of prototype.options_ to protect against overriding defaults\n this.options_ = mergeOptions({}, this.options_);\n\n // Updated options with supplied options\n options = this.options_ = mergeOptions(this.options_, options);\n\n // Get ID from options or options element if one is supplied\n this.id_ = options.id || (options.el && options.el.id);\n\n // If there was no ID from the options, generate one\n if (!this.id_) {\n // Don't require the player ID function in the case of mock players\n let id = player && player.id && player.id() || 'no_player';\n\n this.id_ = `${id}_component_${Guid.newGUID()}`;\n }\n\n this.name_ = options.name || null;\n\n // Create element if one wasn't provided in options\n if (options.el) {\n this.el_ = options.el;\n } else if (options.createEl !== false) {\n this.el_ = this.createEl();\n }\n\n this.children_ = [];\n this.childIndex_ = {};\n this.childNameIndex_ = {};\n\n // Add any child components in options\n if (options.initChildren !== false) {\n this.initChildren();\n }\n\n this.ready(ready);\n // Don't want to trigger ready here or it will before init is actually\n // finished for all children that run this constructor\n\n if (options.reportTouchActivity !== false) {\n this.enableTouchActivity();\n }\n }\n\n /**\n * Dispose of the component and all child components\n *\n * @method dispose\n */\n dispose() {\n this.trigger({ type: 'dispose', bubbles: false });\n\n // Dispose all children.\n if (this.children_) {\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i].dispose) {\n this.children_[i].dispose();\n }\n }\n }\n\n // Delete child references\n this.children_ = null;\n this.childIndex_ = null;\n this.childNameIndex_ = null;\n\n // Remove all event listeners.\n this.off();\n\n // Remove element from DOM\n if (this.el_.parentNode) {\n this.el_.parentNode.removeChild(this.el_);\n }\n\n Dom.removeElData(this.el_);\n this.el_ = null;\n }\n\n /**\n * Return the component's player\n *\n * @return {Player}\n * @method player\n */\n player() {\n return this.player_;\n }\n\n /**\n * Deep merge of options objects\n * Whenever a property is an object on both options objects\n * the two properties will be merged using mergeOptions.\n *\n * ```js\n * Parent.prototype.options_ = {\n * optionSet: {\n * 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' },\n * 'childTwo': {},\n * 'childThree': {}\n * }\n * }\n * newOptions = {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'abc': '123' }\n * 'childTwo': null,\n * 'childFour': {}\n * }\n * }\n *\n * this.options(newOptions);\n * ```\n * RESULT\n * ```js\n * {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' },\n * 'childTwo': null, // Disabled. Won't be initialized.\n * 'childThree': {},\n * 'childFour': {}\n * }\n * }\n * ```\n *\n * @param {Object} obj Object of new option values\n * @return {Object} A NEW object of this.options_ and obj merged\n * @method options\n */\n options(obj) {\n log.warn('this.options() has been deprecated and will be moved to the constructor in 6.0');\n\n if (!obj) {\n return this.options_;\n }\n\n this.options_ = mergeOptions(this.options_, obj);\n return this.options_;\n }\n\n /**\n * Get the component's DOM element\n * ```js\n * var domEl = myComponent.el();\n * ```\n *\n * @return {Element}\n * @method el\n */\n el() {\n return this.el_;\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} tagName Element's node type. e.g. 'div'\n * @param {Object=} properties An object of properties that should be set\n * @param {Object=} attributes An object of attributes that should be set\n * @return {Element}\n * @method createEl\n */\n createEl(tagName, properties, attributes) {\n return Dom.createEl(tagName, properties, attributes);\n }\n\n localize(string) {\n let code = this.player_.language && this.player_.language();\n let languages = this.player_.languages && this.player_.languages();\n\n if (!code || !languages) {\n return string;\n }\n\n let language = languages[code];\n\n if (language && language[string]) {\n return language[string];\n }\n\n let primaryCode = code.split('-')[0];\n let primaryLang = languages[primaryCode];\n\n if (primaryLang && primaryLang[string]) {\n return primaryLang[string];\n }\n\n return string;\n }\n\n /**\n * Return the component's DOM element where children are inserted.\n * Will either be the same as el() or a new element defined in createEl().\n *\n * @return {Element}\n * @method contentEl\n */\n contentEl() {\n return this.contentEl_ || this.el_;\n }\n\n /**\n * Get the component's ID\n * ```js\n * var id = myComponent.id();\n * ```\n *\n * @return {String}\n * @method id\n */\n id() {\n return this.id_;\n }\n\n /**\n * Get the component's name. The name is often used to reference the component.\n * ```js\n * var name = myComponent.name();\n * ```\n *\n * @return {String}\n * @method name\n */\n name() {\n return this.name_;\n }\n\n /**\n * Get an array of all child components\n * ```js\n * var kids = myComponent.children();\n * ```\n *\n * @return {Array} The children\n * @method children\n */\n children() {\n return this.children_;\n }\n\n /**\n * Returns a child component with the provided ID\n *\n * @return {Component}\n * @method getChildById\n */\n getChildById(id) {\n return this.childIndex_[id];\n }\n\n /**\n * Returns a child component with the provided name\n *\n * @return {Component}\n * @method getChild\n */\n getChild(name) {\n return this.childNameIndex_[name];\n }\n\n /**\n * Adds a child component inside this component\n * ```js\n * myComponent.el();\n * // ->
    \n * myComponent.children();\n * // [empty array]\n *\n * var myButton = myComponent.addChild('MyButton');\n * // ->
    myButton
    \n * // -> myButton === myComponent.children()[0];\n * ```\n * Pass in options for child constructors and options for children of the child\n * ```js\n * var myButton = myComponent.addChild('MyButton', {\n * text: 'Press Me',\n * buttonChildExample: {\n * buttonChildOption: true\n * }\n * });\n * ```\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @param {Number} index into our children array to attempt to add the child\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}, index=this.children_.length) {\n let component;\n let componentName;\n\n // If child is a string, create nt with options\n if (typeof child === 'string') {\n componentName = child;\n\n // Options can also be specified as a boolean, so convert to an empty object if false.\n if (!options) {\n options = {};\n }\n\n // Same as above, but true is deprecated so show a warning.\n if (options === true) {\n log.warn('Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`.');\n options = {};\n }\n\n // If no componentClass in options, assume componentClass is the name lowercased\n // (e.g. playButton)\n let componentClassName = options.componentClass || toTitleCase(componentName);\n\n // Set name through options\n options.name = componentName;\n\n // Create a new object & element for this controls set\n // If there's no .player_, this is a player\n let ComponentClass = Component.getComponent(componentClassName);\n\n if (!ComponentClass) {\n throw new Error(`Component ${componentClassName} does not exist`);\n }\n\n // data stored directly on the videojs object may be\n // misidentified as a component to retain\n // backwards-compatibility with 4.x. check to make sure the\n // component class can be instantiated.\n if (typeof ComponentClass !== 'function') {\n return null;\n }\n\n component = new ComponentClass(this.player_ || this, options);\n\n // child is a component instance\n } else {\n component = child;\n }\n\n this.children_.splice(index, 0, component);\n\n if (typeof component.id === 'function') {\n this.childIndex_[component.id()] = component;\n }\n\n // If a name wasn't used to create the component, check if we can use the\n // name function of the component\n componentName = componentName || (component.name && component.name());\n\n if (componentName) {\n this.childNameIndex_[componentName] = component;\n }\n\n // Add the UI object's element to the container div (box)\n // Having an element is not required\n if (typeof component.el === 'function' && component.el()) {\n let childNodes = this.contentEl().children;\n let refNode = childNodes[index] || null;\n this.contentEl().insertBefore(component.el(), refNode);\n }\n\n // Return so it can stored on parent object if desired.\n return component;\n }\n\n /**\n * Remove a child component from this component's list of children, and the\n * child component's element from this component's element\n *\n * @param {Component} component Component to remove\n * @method removeChild\n */\n removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n\n if (!component || !this.children_) {\n return;\n }\n\n let childFound = false;\n\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i] === component) {\n childFound = true;\n this.children_.splice(i, 1);\n break;\n }\n }\n\n if (!childFound) {\n return;\n }\n\n this.childIndex_[component.id()] = null;\n this.childNameIndex_[component.name()] = null;\n\n let compEl = component.el();\n\n if (compEl && compEl.parentNode === this.contentEl()) {\n this.contentEl().removeChild(component.el());\n }\n }\n\n /**\n * Add and initialize default child components from options\n * ```js\n * // when an instance of MyComponent is created, all children in options\n * // will be added to the instance by their name strings and options\n * MyComponent.prototype.options_ = {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * };\n *\n * // Or when creating the component\n * var myComp = new MyComponent(player, {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * });\n * ```\n * The children option can also be an array of\n * child options objects (that also include a 'name' key).\n * This can be used if you have two child components of the\n * same type that need different options.\n * ```js\n * var myComp = new MyComponent(player, {\n * children: [\n * 'button',\n * {\n * name: 'button',\n * someOtherOption: true\n * },\n * {\n * name: 'button',\n * someOtherOption: false\n * }\n * ]\n * });\n * ```\n *\n * @method initChildren\n */\n initChildren() {\n let children = this.options_.children;\n\n if (children) {\n // `this` is `parent`\n let parentOptions = this.options_;\n\n let handleAdd = (child) => {\n let name = child.name;\n let opts = child.opts;\n\n // Allow options for children to be set at the parent options\n // e.g. videojs(id, { controlBar: false });\n // instead of videojs(id, { children: { controlBar: false });\n if (parentOptions[name] !== undefined) {\n opts = parentOptions[name];\n }\n\n // Allow for disabling default components\n // e.g. options['children']['posterImage'] = false\n if (opts === false) {\n return;\n }\n\n // Allow options to be passed as a simple boolean if no configuration\n // is necessary.\n if (opts === true) {\n opts = {};\n }\n\n // We also want to pass the original player options to each component as well so they don't need to\n // reach back into the player for options later.\n opts.playerOptions = this.options_.playerOptions;\n\n // Create and add the child component.\n // Add a direct reference to the child by name on the parent instance.\n // If two of the same component are used, different names should be supplied\n // for each\n let newChild = this.addChild(name, opts);\n if (newChild) {\n this[name] = newChild;\n }\n };\n\n // Allow for an array of children details to passed in the options\n let workingChildren;\n let Tech = Component.getComponent('Tech');\n\n if (Array.isArray(children)) {\n workingChildren = children;\n } else {\n workingChildren = Object.keys(children);\n }\n\n workingChildren\n // children that are in this.options_ but also in workingChildren would\n // give us extra children we do not want. So, we want to filter them out.\n .concat(Object.keys(this.options_)\n .filter(function(child) {\n return !workingChildren.some(function(wchild) {\n if (typeof wchild === 'string') {\n return child === wchild;\n } else {\n return child === wchild.name;\n }\n });\n }))\n .map((child) => {\n let name, opts;\n\n if (typeof child === 'string') {\n name = child;\n opts = children[name] || this.options_[name] || {};\n } else {\n name = child.name;\n opts = child;\n }\n\n return {name, opts};\n })\n .filter((child) => {\n // we have to make sure that child.name isn't in the techOrder since\n // techs are registerd as Components but can't aren't compatible\n // See https://github.com/videojs/video.js/issues/2772\n let c = Component.getComponent(child.opts.componentClass ||\n toTitleCase(child.name));\n return c && !Tech.isTech(c);\n })\n .forEach(handleAdd);\n }\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n // Child classes can include a function that does:\n // return 'CLASS NAME' + this._super();\n return '';\n }\n\n /**\n * Add an event listener to this component's element\n * ```js\n * var myFunc = function(){\n * var myComponent = this;\n * // Do something when the event is fired\n * };\n *\n * myComponent.on('eventType', myFunc);\n * ```\n * The context of myFunc will be myComponent unless previously bound.\n * Alternatively, you can add a listener to another element or component.\n * ```js\n * myComponent.on(otherElement, 'eventName', myFunc);\n * myComponent.on(otherComponent, 'eventName', myFunc);\n * ```\n * The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)`\n * and `otherComponent.on('eventName', myFunc)` is that this way the listeners\n * will be automatically cleaned up when either component is disposed.\n * It will also bind myComponent as the context of myFunc.\n * **NOTE**: When using this on elements in the page other than window\n * and document (both permanent), if you remove the element from the DOM\n * you need to call `myComponent.trigger(el, 'dispose')` on it to clean up\n * references to it and allow the browser to garbage collect it.\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The event handler or event type\n * @param {Function} third The event handler\n * @return {Component}\n * @method on\n */\n on(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.on(this.el_, first, Fn.bind(this, second));\n\n // Targeting another component or element\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n // When this component is disposed, remove the listener from the other component\n const removeOnDispose = () => this.off(target, type, fn);\n\n // Use the same function ID so we can remove it later it using the ID\n // of the original listener\n removeOnDispose.guid = fn.guid;\n this.on('dispose', removeOnDispose);\n\n // If the other component is disposed first we need to clean the reference\n // to the other component in this component's removeOnDispose listener\n // Otherwise we create a memory leak.\n const cleanRemover = () => this.off('dispose', removeOnDispose);\n\n // Add the same function ID so we can easily remove it later\n cleanRemover.guid = fn.guid;\n\n // Check if this is a DOM node\n if (first.nodeName) {\n // Add the listener to the other element\n Events.on(target, type, fn);\n Events.on(target, 'dispose', cleanRemover);\n\n // Should be a component\n // Not using `instanceof Component` because it makes mock players difficult\n } else if (typeof first.on === 'function') {\n // Add the listener to the other component\n target.on(type, fn);\n target.on('dispose', cleanRemover);\n }\n }\n\n return this;\n }\n\n /**\n * Remove an event listener from this component's element\n * ```js\n * myComponent.off('eventType', myFunc);\n * ```\n * If myFunc is excluded, ALL listeners for the event type will be removed.\n * If eventType is excluded, ALL listeners will be removed from the component.\n * Alternatively you can use `off` to remove listeners that were added to other\n * elements or components using `myComponent.on(otherComponent...`.\n * In this case both the event type and listener function are REQUIRED.\n * ```js\n * myComponent.off(otherElement, 'eventType', myFunc);\n * myComponent.off(otherComponent, 'eventType', myFunc);\n * ```\n *\n * @param {String=|Component} first The event type or other component\n * @param {Function=|String} second The listener function or event type\n * @param {Function=} third The listener for other component\n * @return {Component}\n * @method off\n */\n off(first, second, third) {\n if (!first || typeof first === 'string' || Array.isArray(first)) {\n Events.off(this.el_, first, second);\n } else {\n const target = first;\n const type = second;\n // Ensure there's at least a guid, even if the function hasn't been used\n const fn = Fn.bind(this, third);\n\n // Remove the dispose listener on this component,\n // which was given the same guid as the event listener\n this.off('dispose', fn);\n\n if (first.nodeName) {\n // Remove the listener\n Events.off(target, type, fn);\n // Remove the listener for cleaning the dispose listener\n Events.off(target, 'dispose', fn);\n } else {\n target.off(type, fn);\n target.off('dispose', fn);\n }\n }\n\n return this;\n }\n\n /**\n * Add an event listener to be triggered only once and then removed\n * ```js\n * myComponent.one('eventName', myFunc);\n * ```\n * Alternatively you can add a listener to another element or component\n * that will be triggered only once.\n * ```js\n * myComponent.one(otherElement, 'eventName', myFunc);\n * myComponent.one(otherComponent, 'eventName', myFunc);\n * ```\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The listener function or event type\n * @param {Function=} third The listener function for other component\n * @return {Component}\n * @method one\n */\n one(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.one(this.el_, first, Fn.bind(this, second));\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n const newFunc = () => {\n this.off(target, type, newFunc);\n fn.apply(null, arguments);\n };\n\n // Keep the same function ID so we can remove it later\n newFunc.guid = fn.guid;\n\n this.on(target, type, newFunc);\n }\n\n return this;\n }\n\n /**\n * Trigger an event on an element\n * ```js\n * myComponent.trigger('eventName');\n * myComponent.trigger({'type':'eventName'});\n * myComponent.trigger('eventName', {data: 'some data'});\n * myComponent.trigger({'type':'eventName'}, {data: 'some data'});\n * ```\n *\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Component} self\n * @method trigger\n */\n trigger(event, hash) {\n Events.trigger(this.el_, event, hash);\n return this;\n }\n\n /**\n * Bind a listener to the component's ready state.\n * Different from event listeners in that if the ready event has already happened\n * it will trigger the function immediately.\n *\n * @param {Function} fn Ready listener\n * @param {Boolean} sync Exec the listener synchronously if component is ready\n * @return {Component}\n * @method ready\n */\n ready(fn, sync=false) {\n if (fn) {\n if (this.isReady_) {\n if (sync) {\n fn.call(this);\n } else {\n // Call the function asynchronously by default for consistency\n this.setTimeout(fn, 1);\n }\n } else {\n this.readyQueue_ = this.readyQueue_ || [];\n this.readyQueue_.push(fn);\n }\n }\n return this;\n }\n\n /**\n * Trigger the ready listeners\n *\n * @return {Component}\n * @method triggerReady\n */\n triggerReady() {\n this.isReady_ = true;\n\n // Ensure ready is triggerd asynchronously\n this.setTimeout(function(){\n let readyQueue = this.readyQueue_;\n\n // Reset Ready Queue\n this.readyQueue_ = [];\n\n if (readyQueue && readyQueue.length > 0) {\n readyQueue.forEach(function(fn){\n fn.call(this);\n }, this);\n }\n\n // Allow for using event listeners also\n this.trigger('ready');\n }, 1);\n }\n\n /**\n * Finds a single DOM element matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\n $(selector, context) {\n return Dom.$(selector, context || this.contentEl());\n }\n\n /**\n * Finds a all DOM elements matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\n $$(selector, context) {\n return Dom.$$(selector, context || this.contentEl());\n }\n\n /**\n * Check if a component's element has a CSS class name\n *\n * @param {String} classToCheck Classname to check\n * @return {Component}\n * @method hasClass\n */\n hasClass(classToCheck) {\n return Dom.hasElClass(this.el_, classToCheck);\n }\n\n /**\n * Add a CSS class name to the component's element\n *\n * @param {String} classToAdd Classname to add\n * @return {Component}\n * @method addClass\n */\n addClass(classToAdd) {\n Dom.addElClass(this.el_, classToAdd);\n return this;\n }\n\n /**\n * Remove a CSS class name from the component's element\n *\n * @param {String} classToRemove Classname to remove\n * @return {Component}\n * @method removeClass\n */\n removeClass(classToRemove) {\n Dom.removeElClass(this.el_, classToRemove);\n return this;\n }\n\n /**\n * Add or remove a CSS class name from the component's element\n *\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n *\n * @return {Component}\n * @method toggleClass\n */\n toggleClass(classToToggle, predicate) {\n Dom.toggleElClass(this.el_, classToToggle, predicate);\n return this;\n }\n\n /**\n * Show the component element if hidden\n *\n * @return {Component}\n * @method show\n */\n show() {\n this.removeClass('vjs-hidden');\n return this;\n }\n\n /**\n * Hide the component element if currently showing\n *\n * @return {Component}\n * @method hide\n */\n hide() {\n this.addClass('vjs-hidden');\n return this;\n }\n\n /**\n * Lock an item in its visible state\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method lockShowing\n */\n lockShowing() {\n this.addClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Unlock an item to be hidden\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method unlockShowing\n */\n unlockShowing() {\n this.removeClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Set or get the width of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num Optional width number\n * @param {Boolean} skipListeners Skip the 'resize' event trigger\n * @return {Component} This component, when setting the width\n * @return {Number|String} The width, when getting\n * @method width\n */\n width(num, skipListeners) {\n return this.dimension('width', num, skipListeners);\n }\n\n /**\n * Get or set the height of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num New component height\n * @param {Boolean=} skipListeners Skip the resize event trigger\n * @return {Component} This component, when setting the height\n * @return {Number|String} The height, when getting\n * @method height\n */\n height(num, skipListeners) {\n return this.dimension('height', num, skipListeners);\n }\n\n /**\n * Set both width and height at the same time\n *\n * @param {Number|String} width Width of player\n * @param {Number|String} height Height of player\n * @return {Component} The component\n * @method dimensions\n */\n dimensions(width, height) {\n // Skip resize listeners on width for optimization\n return this.width(width, true).height(height);\n }\n\n /**\n * Get or set width or height\n * This is the shared code for the width() and height() methods.\n * All for an integer, integer + 'px' or integer + '%';\n * Known issue: Hidden elements officially have a width of 0. We're defaulting\n * to the style.width value and falling back to computedStyle which has the\n * hidden element issue. Info, but probably not an efficient fix:\n * http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/\n *\n * @param {String} widthOrHeight 'width' or 'height'\n * @param {Number|String=} num New dimension\n * @param {Boolean=} skipListeners Skip resize event trigger\n * @return {Component} The component if a dimension was set\n * @return {Number|String} The dimension if nothing was set\n * @private\n * @method dimension\n */\n dimension(widthOrHeight, num, skipListeners) {\n if (num !== undefined) {\n // Set to zero if null or literally NaN (NaN !== NaN)\n if (num === null || num !== num) {\n num = 0;\n }\n\n // Check if using css width/height (% or px) and adjust\n if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n this.el_.style[widthOrHeight] = num;\n } else if (num === 'auto') {\n this.el_.style[widthOrHeight] = '';\n } else {\n this.el_.style[widthOrHeight] = num + 'px';\n }\n\n // skipListeners allows us to avoid triggering the resize event when setting both width and height\n if (!skipListeners) {\n this.trigger('resize');\n }\n\n // Return component\n return this;\n }\n\n // Not setting a value, so getting it\n // Make sure element exists\n if (!this.el_) {\n return 0;\n }\n\n // Get dimension value from style\n let val = this.el_.style[widthOrHeight];\n let pxIndex = val.indexOf('px');\n\n if (pxIndex !== -1) {\n // Return the pixel value with no 'px'\n return parseInt(val.slice(0, pxIndex), 10);\n }\n\n // No px so using % or no style was set, so falling back to offsetWidth/height\n // If component has display:none, offset will return 0\n // TODO: handle display:none and no dimension style using px\n return parseInt(this.el_['offset' + toTitleCase(widthOrHeight)], 10);\n }\n\n /**\n * Get width or height of computed style\n * @param {String} widthOrHeight 'width' or 'height'\n * @return {Number|Boolean} The bolean false if nothing was set\n * @method currentDimension\n */\n currentDimension(widthOrHeight) {\n let computedWidthOrHeight = 0;\n\n if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\n throw new Error('currentDimension only accepts width or height value');\n }\n\n if (typeof window.getComputedStyle === 'function') {\n const computedStyle = window.getComputedStyle(this.el_);\n computedWidthOrHeight = computedStyle.getPropertyValue(widthOrHeight) || computedStyle[widthOrHeight];\n } else if (this.el_.currentStyle) {\n // ie 8 doesn't support computed style, shim it\n // return clientWidth or clientHeight instead for better accuracy\n const rule = `offset${toTitleCase(widthOrHeight)}`;\n computedWidthOrHeight = this.el_[rule];\n }\n\n // remove 'px' from variable and parse as integer\n computedWidthOrHeight = parseFloat(computedWidthOrHeight);\n return computedWidthOrHeight;\n }\n\n /**\n * Get an object which contains width and height values of computed style\n * @return {Object} The dimensions of element\n * @method currentDimensions\n */\n currentDimensions() {\n return {\n width: this.currentDimension('width'),\n height: this.currentDimension('height')\n };\n }\n\n /**\n * Get width of computed style\n * @return {Integer}\n * @method currentWidth\n */\n currentWidth() {\n return this.currentDimension('width');\n }\n\n /**\n * Get height of computed style\n * @return {Integer}\n * @method currentHeight\n */\n currentHeight() {\n return this.currentDimension('height');\n }\n\n /**\n * Emit 'tap' events when touch events are supported\n * This is used to support toggling the controls through a tap on the video.\n * We're requiring them to be enabled because otherwise every component would\n * have this extra overhead unnecessarily, on mobile devices where extra\n * overhead is especially bad.\n *\n * @private\n * @method emitTapEvents\n */\n emitTapEvents() {\n // Track the start time so we can determine how long the touch lasted\n let touchStart = 0;\n let firstTouch = null;\n\n // Maximum movement allowed during a touch event to still be considered a tap\n // Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number.\n const tapMovementThreshold = 10;\n\n // The maximum length a touch can be while still being considered a tap\n const touchTimeThreshold = 200;\n\n let couldBeTap;\n\n this.on('touchstart', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length === 1) {\n // Copy the touches object to prevent modifying the original\n firstTouch = assign({}, event.touches[0]);\n // Record start time so we can detect a tap vs. \"touch and hold\"\n touchStart = new Date().getTime();\n // Reset couldBeTap tracking\n couldBeTap = true;\n }\n });\n\n this.on('touchmove', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length > 1) {\n couldBeTap = false;\n } else if (firstTouch) {\n // Some devices will throw touchmoves for all but the slightest of taps.\n // So, if we moved only a small distance, this could still be a tap\n const xdiff = event.touches[0].pageX - firstTouch.pageX;\n const ydiff = event.touches[0].pageY - firstTouch.pageY;\n const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n\n if (touchDistance > tapMovementThreshold) {\n couldBeTap = false;\n }\n }\n });\n\n const noTap = function() {\n couldBeTap = false;\n };\n\n // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n this.on('touchleave', noTap);\n this.on('touchcancel', noTap);\n\n // When the touch ends, measure how long it took and trigger the appropriate\n // event\n this.on('touchend', function(event) {\n firstTouch = null;\n // Proceed only if the touchmove/leave/cancel event didn't happen\n if (couldBeTap === true) {\n // Measure how long the touch lasted\n const touchTime = new Date().getTime() - touchStart;\n\n // Make sure the touch was less than the threshold to be considered a tap\n if (touchTime < touchTimeThreshold) {\n // Don't let browser turn this into a click\n event.preventDefault();\n this.trigger('tap');\n // It may be good to copy the touchend event object and change the\n // type to tap, if the other event properties aren't exact after\n // Events.fixEvent runs (e.g. event.target)\n }\n }\n });\n }\n\n /**\n * Report user touch activity when touch events occur\n * User activity is used to determine when controls should show/hide. It's\n * relatively simple when it comes to mouse events, because any mouse event\n * should show the controls. So we capture mouse events that bubble up to the\n * player and report activity when that happens.\n * With touch events it isn't as easy. We can't rely on touch events at the\n * player level, because a tap (touchstart + touchend) on the video itself on\n * mobile devices is meant to turn controls off (and on). User activity is\n * checked asynchronously, so what could happen is a tap event on the video\n * turns the controls off, then the touchend event bubbles up to the player,\n * which if it reported user activity, would turn the controls right back on.\n * (We also don't want to completely block touch events from bubbling up)\n * Also a touchmove, touch+hold, and anything other than a tap is not supposed\n * to turn the controls back on on a mobile device.\n * Here we're setting the default component behavior to report user activity\n * whenever touch events happen, and this can be turned off by components that\n * want touch events to act differently.\n *\n * @method enableTouchActivity\n */\n enableTouchActivity() {\n // Don't continue if the root player doesn't support reporting user activity\n if (!this.player() || !this.player().reportUserActivity) {\n return;\n }\n\n // listener for reporting that the user is active\n const report = Fn.bind(this.player(), this.player().reportUserActivity);\n\n let touchHolding;\n\n this.on('touchstart', function() {\n report();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(touchHolding);\n // report at the same interval as activityCheck\n touchHolding = this.setInterval(report, 250);\n });\n\n const touchEnd = function(event) {\n report();\n // stop the interval that maintains activity if the touch is holding\n this.clearInterval(touchHolding);\n };\n\n this.on('touchmove', report);\n this.on('touchend', touchEnd);\n this.on('touchcancel', touchEnd);\n }\n\n /**\n * Creates timeout and sets up disposal automatically.\n *\n * @param {Function} fn The function to run after the timeout.\n * @param {Number} timeout Number of ms to delay before executing specified function.\n * @return {Number} Returns the timeout ID\n * @method setTimeout\n */\n setTimeout(fn, timeout) {\n fn = Fn.bind(this, fn);\n\n // window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't.\n let timeoutId = window.setTimeout(fn, timeout);\n\n const disposeFn = function() {\n this.clearTimeout(timeoutId);\n };\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.on('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Clears a timeout and removes the associated dispose listener\n *\n * @param {Number} timeoutId The id of the timeout to clear\n * @return {Number} Returns the timeout ID\n * @method clearTimeout\n */\n clearTimeout(timeoutId) {\n window.clearTimeout(timeoutId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.off('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Creates an interval and sets up disposal automatically.\n *\n * @param {Function} fn The function to run every N seconds.\n * @param {Number} interval Number of ms to delay before executing specified function.\n * @return {Number} Returns the interval ID\n * @method setInterval\n */\n setInterval(fn, interval) {\n fn = Fn.bind(this, fn);\n\n let intervalId = window.setInterval(fn, interval);\n\n const disposeFn = function() {\n this.clearInterval(intervalId);\n };\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.on('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Clears an interval and removes the associated dispose listener\n *\n * @param {Number} intervalId The id of the interval to clear\n * @return {Number} Returns the interval ID\n * @method clearInterval\n */\n clearInterval(intervalId) {\n window.clearInterval(intervalId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.off('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Registers a component\n *\n * @param {String} name Name of the component to register\n * @param {Object} comp The component to register\n * @static\n * @method registerComponent\n */\n static registerComponent(name, comp) {\n if (!Component.components_) {\n Component.components_ = {};\n }\n\n Component.components_[name] = comp;\n return comp;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getComponent(name) {\n if (Component.components_ && Component.components_[name]) {\n return Component.components_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)`);\n return window.videojs[name];\n }\n }\n\n /**\n * Sets up the constructor using the supplied init method\n * or uses the init of the parent object\n *\n * @param {Object} props An object of properties\n * @static\n * @deprecated\n * @method extend\n */\n static extend(props) {\n props = props || {};\n\n log.warn('Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead');\n\n // Set up the constructor using the supplied init method\n // or using the init of the parent object\n // Make sure to check the unobfuscated version for external libs\n let init = props.init || props.init || this.prototype.init || this.prototype.init || function() {};\n // In Resig's simple class inheritance (previously used) the constructor\n // is a function that calls `this.init.apply(arguments)`\n // However that would prevent us from using `ParentObject.call(this);`\n // in a Child constructor because the `this` in `this.init`\n // would still refer to the Child and cause an infinite loop.\n // We would instead have to do\n // `ParentObject.prototype.init.apply(this, arguments);`\n // Bleh. We're not creating a _super() function, so it's good to keep\n // the parent constructor reference simple.\n let subObj = function() {\n init.apply(this, arguments);\n };\n\n // Inherit from this object's prototype\n subObj.prototype = Object.create(this.prototype);\n // Reset the constructor property for subObj otherwise\n // instances of subObj would have the constructor of the parent Object\n subObj.prototype.constructor = subObj;\n\n // Make the class extendable\n subObj.extend = Component.extend;\n\n // Extend subObj's prototype with functions and other properties from props\n for (let name in props) {\n if (props.hasOwnProperty(name)) {\n subObj.prototype[name] = props[name];\n }\n }\n\n return subObj;\n }\n}\n\nComponent.registerComponent('Component', Component);\nexport default Component;\n","/**\n * @file control-bar.js\n */\nimport Component from '../component.js';\n\n// Required children\nimport PlayToggle from './play-toggle.js';\nimport CurrentTimeDisplay from './time-controls/current-time-display.js';\nimport DurationDisplay from './time-controls/duration-display.js';\nimport TimeDivider from './time-controls/time-divider.js';\nimport RemainingTimeDisplay from './time-controls/remaining-time-display.js';\nimport LiveDisplay from './live-display.js';\nimport ProgressControl from './progress-control/progress-control.js';\nimport FullscreenToggle from './fullscreen-toggle.js';\nimport VolumeControl from './volume-control/volume-control.js';\nimport VolumeMenuButton from './volume-menu-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport ChaptersButton from './text-track-controls/chapters-button.js';\nimport DescriptionsButton from './text-track-controls/descriptions-button.js';\nimport SubtitlesButton from './text-track-controls/subtitles-button.js';\nimport CaptionsButton from './text-track-controls/captions-button.js';\nimport PlaybackRateMenuButton from './playback-rate-menu/playback-rate-menu-button.js';\nimport CustomControlSpacer from './spacer-controls/custom-control-spacer.js';\n\n/**\n * Container of main controls\n *\n * @extends Component\n * @class ControlBar\n */\nclass ControlBar extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-control-bar',\n dir: 'ltr'\n }, {\n 'role': 'group' // The control bar is a group, so it can contain menuitems\n });\n }\n}\n\nControlBar.prototype.options_ = {\n loadEvent: 'play',\n children: [\n 'playToggle',\n 'volumeMenuButton',\n 'currentTimeDisplay',\n 'timeDivider',\n 'durationDisplay',\n 'progressControl',\n 'liveDisplay',\n 'remainingTimeDisplay',\n 'customControlSpacer',\n 'playbackRateMenuButton',\n 'chaptersButton',\n 'descriptionsButton',\n 'subtitlesButton',\n 'captionsButton',\n 'fullscreenToggle'\n ]\n};\n\nComponent.registerComponent('ControlBar', ControlBar);\nexport default ControlBar;\n","/**\n * @file fullscreen-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n * @class FullscreenToggle\n */\nclass FullscreenToggle extends Button {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-fullscreen-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles click for full screen\n *\n * @method handleClick\n */\n handleClick() {\n if (!this.player_.isFullscreen()) {\n this.player_.requestFullscreen();\n this.controlText('Non-Fullscreen');\n } else {\n this.player_.exitFullscreen();\n this.controlText('Fullscreen');\n }\n }\n\n}\n\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\n\nComponent.registerComponent('FullscreenToggle', FullscreenToggle);\nexport default FullscreenToggle;\n","/**\n * @file live-display.js\n */\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * Displays the live indicator\n * TODO - Future make it click to snap to live\n *\n * @extends Component\n * @class LiveDisplay\n */\nclass LiveDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.updateShowing();\n this.on(this.player(), 'durationchange', this.updateShowing);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n var el = super.createEl('div', {\n className: 'vjs-live-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-live-display',\n innerHTML: `${this.localize('Stream Type')}${this.localize('LIVE')}`\n }, {\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n updateShowing() {\n if (this.player().duration() === Infinity) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n}\n\nComponent.registerComponent('LiveDisplay', LiveDisplay);\nexport default LiveDisplay;\n","/**\n * @file mute-toggle.js\n */\nimport Button from '../button';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * A button component for muting the audio\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MuteToggle\n */\nclass MuteToggle extends Button {\n\n constructor(player, options) {\n super(player, options);\n\n this.on(player, 'volumechange', this.update);\n\n // hide mute toggle if the current tech doesn't support volume control\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n\n this.on(player, 'loadstart', function() {\n this.update(); // We need to update the button to account for a default muted state.\n\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-mute-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click on mute\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.muted( this.player_.muted() ? false : true );\n }\n\n /**\n * Update volume\n *\n * @method update\n */\n update() {\n var vol = this.player_.volume(),\n level = 3;\n\n if (vol === 0 || this.player_.muted()) {\n level = 0;\n } else if (vol < 0.33) {\n level = 1;\n } else if (vol < 0.67) {\n level = 2;\n }\n\n // Don't rewrite the button text if the actual text doesn't change.\n // This causes unnecessary and confusing information for screen reader users.\n // This check is needed because this function gets called every time the volume level is changed.\n let toMute = this.player_.muted() ? 'Unmute' : 'Mute';\n if (this.controlText() !== toMute) {\n this.controlText(toMute);\n }\n\n /* TODO improve muted icon classes */\n for (var i = 0; i < 4; i++) {\n Dom.removeElClass(this.el_, `vjs-vol-${i}`);\n }\n Dom.addElClass(this.el_, `vjs-vol-${level}`);\n }\n\n}\n\nMuteToggle.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('MuteToggle', MuteToggle);\nexport default MuteToggle;\n","/**\n * @file play-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Button to toggle between play and pause\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PlayToggle\n */\nclass PlayToggle extends Button {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'play', this.handlePlay);\n this.on(player, 'pause', this.handlePause);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-play-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click to toggle between play and pause\n *\n * @method handleClick\n */\n handleClick() {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n /**\n * Add the vjs-playing class to the element so it can change appearance\n *\n * @method handlePlay\n */\n handlePlay() {\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n this.controlText('Pause'); // change the button text to \"Pause\"\n }\n\n /**\n * Add the vjs-paused class to the element so it can change appearance\n *\n * @method handlePause\n */\n handlePause() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.controlText('Play'); // change the button text to \"Play\"\n }\n\n}\n\nPlayToggle.prototype.controlText_ = 'Play';\n\nComponent.registerComponent('PlayToggle', PlayToggle);\nexport default PlayToggle;\n","/**\n * @file playback-rate-menu-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Menu from '../../menu/menu.js';\nimport PlaybackRateMenuItem from './playback-rate-menu-item.js';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * The component for controlling the playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class PlaybackRateMenuButton\n */\nclass PlaybackRateMenuButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n this.updateVisibility();\n this.updateLabel();\n\n this.on(player, 'loadstart', this.updateVisibility);\n this.on(player, 'ratechange', this.updateLabel);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl();\n\n this.labelEl_ = Dom.createEl('div', {\n className: 'vjs-playback-rate-value',\n innerHTML: 1.0\n });\n\n el.appendChild(this.labelEl_);\n\n return el;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-playback-rate ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the playback rate menu\n *\n * @return {Menu} Menu object populated with items\n * @method createMenu\n */\n createMenu() {\n let menu = new Menu(this.player());\n let rates = this.playbackRates();\n\n if (rates) {\n for (let i = rates.length - 1; i >= 0; i--) {\n menu.addChild(\n new PlaybackRateMenuItem(this.player(), { 'rate': rates[i] + 'x'})\n );\n }\n }\n\n return menu;\n }\n\n /**\n * Updates ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current playback rate\n this.el().setAttribute('aria-valuenow', this.player().playbackRate());\n }\n\n /**\n * Handle menu item click\n *\n * @method handleClick\n */\n handleClick() {\n // select next rate option\n let currentRate = this.player().playbackRate();\n let rates = this.playbackRates();\n\n // this will select first one if the last one currently selected\n let newRate = rates[0];\n for (let i = 0; i < rates.length ; i++) {\n if (rates[i] > currentRate) {\n newRate = rates[i];\n break;\n }\n }\n this.player().playbackRate(newRate);\n }\n\n /**\n * Get possible playback rates\n *\n * @return {Array} Possible playback rates\n * @method playbackRates\n */\n playbackRates() {\n return this.options_['playbackRates'] || (this.options_.playerOptions && this.options_.playerOptions['playbackRates']);\n }\n\n /**\n * Get supported playback rates\n *\n * @return {Array} Supported playback rates\n * @method playbackRateSupported\n */\n playbackRateSupported() {\n return this.player().tech_\n && this.player().tech_['featuresPlaybackRate']\n && this.playbackRates()\n && this.playbackRates().length > 0\n ;\n }\n\n /**\n * Hide playback rate controls when they're no playback rate options to select\n *\n * @method updateVisibility\n */\n updateVisibility() {\n if (this.playbackRateSupported()) {\n this.removeClass('vjs-hidden');\n } else {\n this.addClass('vjs-hidden');\n }\n }\n\n /**\n * Update button label when rate changed\n *\n * @method updateLabel\n */\n updateLabel() {\n if (this.playbackRateSupported()) {\n this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\n }\n }\n\n}\n\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\n\nComponent.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\nexport default PlaybackRateMenuButton;\n","/**\n * @file playback-rate-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The specific menu item type for selecting a playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class PlaybackRateMenuItem\n */\nclass PlaybackRateMenuItem extends MenuItem {\n\n constructor(player, options){\n let label = options['rate'];\n let rate = parseFloat(label, 10);\n\n // Modify options for parent MenuItem class's init.\n options['label'] = label;\n options['selected'] = rate === 1;\n super(player, options);\n\n this.label = label;\n this.rate = rate;\n\n this.on(player, 'ratechange', this.update);\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player().playbackRate(this.rate);\n }\n\n /**\n * Update playback rate with selected rate\n *\n * @method update\n */\n update() {\n this.selected(this.player().playbackRate() === this.rate);\n }\n\n}\n\nPlaybackRateMenuItem.prototype.contentElType = 'button';\n\nComponent.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\nexport default PlaybackRateMenuItem;\n","/**\n * @file load-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * Shows load progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class LoadProgressBar\n */\nclass LoadProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'progress', this.update);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-load-progress',\n innerHTML: `${this.localize('Loaded')}: 0%`\n });\n }\n\n /**\n * Update progress bar\n *\n * @method update\n */\n update() {\n let buffered = this.player_.buffered();\n let duration = this.player_.duration();\n let bufferedEnd = this.player_.bufferedEnd();\n let children = this.el_.children;\n\n // get the percent width of a time compared to the total end\n let percentify = function (time, end){\n let percent = (time / end) || 0; // no NaN\n return ((percent >= 1 ? 1 : percent) * 100) + '%';\n };\n\n // update the width of the progress bar\n this.el_.style.width = percentify(bufferedEnd, duration);\n\n // add child elements to represent the individual buffered time ranges\n for (let i = 0; i < buffered.length; i++) {\n let start = buffered.start(i);\n let end = buffered.end(i);\n let part = children[i];\n\n if (!part) {\n part = this.el_.appendChild(Dom.createEl());\n }\n\n // set the percent based on the width of the progress bar (bufferedEnd)\n part.style.left = percentify(start, bufferedEnd);\n part.style.width = percentify(end - start, bufferedEnd);\n }\n\n // remove unused buffered range elements\n for (let i = children.length; i > buffered.length; i--) {\n this.el_.removeChild(children[i-1]);\n }\n }\n\n}\n\nComponent.registerComponent('LoadProgressBar', LoadProgressBar);\nexport default LoadProgressBar;\n","/**\n * @file mouse-time-display.js\n */\nimport window from 'global/window';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport throttle from 'lodash-compat/function/throttle';\n\n/**\n * The Mouse Time Display component shows the time you will seek to\n * when hovering over the progress bar\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class MouseTimeDisplay\n */\nclass MouseTimeDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.tooltip = Dom.createEl('div', {className: 'vjs-time-tooltip'});\n this.el().appendChild(this.tooltip);\n this.addClass('vjs-keep-tooltips-inside');\n }\n\n this.update(0, 0);\n\n player.on('ready', () => {\n this.on(player.controlBar.progressControl.el(), 'mousemove', throttle(Fn.bind(this, this.handleMouseMove), 25));\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-mouse-display'\n });\n }\n\n handleMouseMove(event) {\n let duration = this.player_.duration();\n let newTime = this.calculateDistance(event) * duration;\n let position = event.pageX - Dom.findElPosition(this.el().parentNode).left;\n\n this.update(newTime, position);\n }\n\n update(newTime, position) {\n let time = formatTime(newTime, this.player_.duration());\n\n this.el().style.left = position + 'px';\n this.el().setAttribute('data-current-time', time);\n\n if (this.keepTooltipsInside) {\n let clampedPosition = this.clampPosition_(position);\n let difference = position - clampedPosition + 1;\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltip).width);\n let tooltipWidthHalf = tooltipWidth / 2;\n\n this.tooltip.innerHTML = time;\n this.tooltip.style.right = `-${tooltipWidthHalf - difference}px`;\n }\n }\n\n calculateDistance(event) {\n return Dom.getPointerPosition(this.el().parentNode, event).x;\n }\n\n /**\n * This takes in a horizontal position for the bar and returns a clamped position.\n * Clamped position means that it will keep the position greater than half the width\n * of the tooltip and smaller than the player width minus half the width o the tooltip.\n * It will only clamp the position if `keepTooltipsInside` option is set.\n *\n * @param {Number} position the position the bar wants to be\n * @return {Number} newPosition the (potentially) clamped position\n * @method clampPosition_\n */\n clampPosition_(position) {\n if (!this.keepTooltipsInside) {\n return position;\n }\n\n let playerWidth = parseFloat(window.getComputedStyle(this.player().el()).width);\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltip).width);\n let tooltipWidthHalf = tooltipWidth / 2;\n let actualPosition = position;\n\n if (position < tooltipWidthHalf) {\n actualPosition = Math.ceil(tooltipWidthHalf);\n } else if (position > (playerWidth - tooltipWidthHalf)) {\n actualPosition = Math.floor(playerWidth - tooltipWidthHalf);\n }\n\n return actualPosition;\n }\n}\n\nComponent.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\nexport default MouseTimeDisplay;\n","/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass PlayProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.addClass('vjs-keep-tooltips-inside');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-play-progress vjs-slider-bar',\n innerHTML: `${this.localize('Progress')}: 0%`\n });\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.el_.setAttribute('data-current-time', formatTime(time, this.player_.duration()));\n }\n\n}\n\nComponent.registerComponent('PlayProgressBar', PlayProgressBar);\nexport default PlayProgressBar;\n","/**\n * @file progress-control.js\n */\nimport Component from '../../component.js';\nimport SeekBar from './seek-bar.js';\nimport MouseTimeDisplay from './mouse-time-display.js';\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class ProgressControl\n */\nclass ProgressControl extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-control vjs-control'\n });\n }\n}\n\nProgressControl.prototype.options_ = {\n children: [\n 'seekBar'\n ]\n};\n\nComponent.registerComponent('ProgressControl', ProgressControl);\nexport default ProgressControl;\n","/**\n * @file seek-bar.js\n */\nimport window from 'global/window';\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport LoadProgressBar from './load-progress-bar.js';\nimport PlayProgressBar from './play-progress-bar.js';\nimport TooltipProgressBar from './tooltip-progress-bar.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport assign from 'object.assign';\n\n/**\n * Seek Bar and holder for the progress bars\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class SeekBar\n */\nclass SeekBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'timeupdate', this.updateProgress);\n this.on(player, 'ended', this.updateProgress);\n player.ready(Fn.bind(this, this.updateProgress));\n\n if (options.playerOptions &&\n options.playerOptions.controlBar &&\n options.playerOptions.controlBar.progressControl &&\n options.playerOptions.controlBar.progressControl.keepTooltipsInside) {\n this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;\n }\n\n if (this.keepTooltipsInside) {\n this.tooltipProgressBar = this.addChild('TooltipProgressBar');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-holder'\n }, {\n 'aria-label': 'progress bar'\n });\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateProgress() {\n this.updateAriaAttributes(this.el_);\n\n if (this.keepTooltipsInside) {\n this.updateAriaAttributes(this.tooltipProgressBar.el_);\n this.tooltipProgressBar.el_.style.width = this.bar.el_.style.width;\n\n let playerWidth = parseFloat(window.getComputedStyle(this.player().el()).width);\n let tooltipWidth = parseFloat(window.getComputedStyle(this.tooltipProgressBar.tooltip).width);\n let tooltipStyle = this.tooltipProgressBar.el().style;\n tooltipStyle.maxWidth = Math.floor(playerWidth - (tooltipWidth / 2)) + 'px';\n tooltipStyle.minWidth = Math.ceil(tooltipWidth / 2) + 'px';\n tooltipStyle.right = `-${tooltipWidth / 2}px`;\n }\n }\n\n updateAriaAttributes(el) {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n el.setAttribute('aria-valuenow', (this.getPercent() * 100).toFixed(2)); // machine readable value of progress bar (percentage complete)\n el.setAttribute('aria-valuetext', formatTime(time, this.player_.duration())); // human readable value of progress bar (time complete)\n }\n\n /**\n * Get percentage of video played\n *\n * @return {Number} Percentage played\n * @method getPercent\n */\n getPercent() {\n let percent = this.player_.currentTime() / this.player_.duration();\n return percent >= 1 ? 1 : percent;\n }\n\n /**\n * Handle mouse down on seek bar\n *\n * @method handleMouseDown\n */\n handleMouseDown(event) {\n super.handleMouseDown(event);\n\n this.player_.scrubbing(true);\n\n this.videoWasPlaying = !this.player_.paused();\n this.player_.pause();\n }\n\n /**\n * Handle mouse move on seek bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n let newTime = this.calculateDistance(event) * this.player_.duration();\n\n // Don't let video end while scrubbing.\n if (newTime === this.player_.duration()) { newTime = newTime - 0.1; }\n\n // Set new time (tell player to seek to new time)\n this.player_.currentTime(newTime);\n }\n\n /**\n * Handle mouse up on seek bar\n *\n * @method handleMouseUp\n */\n handleMouseUp(event) {\n super.handleMouseUp(event);\n\n this.player_.scrubbing(false);\n if (this.videoWasPlaying) {\n this.player_.play();\n }\n }\n\n /**\n * Move more quickly fast forward for keyboard-only users\n *\n * @method stepForward\n */\n stepForward() {\n this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users\n }\n\n /**\n * Move more quickly rewind for keyboard-only users\n *\n * @method stepBack\n */\n stepBack() {\n this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users\n }\n\n}\n\nSeekBar.prototype.options_ = {\n children: [\n 'loadProgressBar',\n 'mouseTimeDisplay',\n 'playProgressBar'\n ],\n 'barName': 'playProgressBar'\n};\n\nSeekBar.prototype.playerEvent = 'timeupdate';\n\nComponent.registerComponent('SeekBar', SeekBar);\nexport default SeekBar;\n","/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass TooltipProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-tooltip-progress-bar vjs-slider-bar',\n innerHTML: `
    \n ${this.localize('Progress')}: 0%`\n });\n\n this.tooltip = el.querySelector('.vjs-time-tooltip');\n\n return el;\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let formattedTime = formatTime(time, this.player_.duration());\n this.el_.setAttribute('data-current-time', formattedTime);\n this.tooltip.innerHTML = formattedTime;\n }\n\n}\n\nComponent.registerComponent('TooltipProgressBar', TooltipProgressBar);\nexport default TooltipProgressBar;\n","/**\n * @file custom-control-spacer.js\n */\nimport Spacer from './spacer.js';\nimport Component from '../../component.js';\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n * @class CustomControlSpacer\n */\nclass CustomControlSpacer extends Spacer {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl({\n className: this.buildCSSClass(),\n });\n\n // No-flex/table-cell mode requires there be some content\n // in the cell to fill the remaining space of the table.\n el.innerHTML = ' ';\n return el;\n }\n}\n\nComponent.registerComponent('CustomControlSpacer', CustomControlSpacer);\nexport default CustomControlSpacer;\n","/**\n * @file spacer.js\n */\nimport Component from '../../component.js';\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n * @class Spacer\n */\nclass Spacer extends Component {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n}\n\nComponent.registerComponent('Spacer', Spacer);\n\nexport default Spacer;\n","/**\n * @file caption-settings-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The menu item for caption track settings menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class CaptionSettingsMenuItem\n */\n class CaptionSettingsMenuItem extends TextTrackMenuItem {\n\n constructor(player, options) {\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' settings',\n 'selectable': false,\n 'default': false,\n mode: 'disabled'\n };\n\n // CaptionSettingsMenuItem has no concept of 'selected'\n options['selectable'] = false;\n\n super(player, options);\n this.addClass('vjs-texttrack-settings');\n this.controlText(', opens ' + options['kind'] + ' settings dialog');\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n this.player().getChild('textTrackSettings').show();\n this.player().getChild('textTrackSettings').el_.focus();\n }\n\n}\n\nComponent.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\nexport default CaptionSettingsMenuItem;\n","/**\n * @file captions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport CaptionSettingsMenuItem from './caption-settings-menu-item.js';\n\n/**\n * The button component for toggling and selecting captions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class CaptionsButton\n */\nclass CaptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Captions Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-captions-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Update caption menu items\n *\n * @method update\n */\n update() {\n let threshold = 2;\n super.update();\n\n // if native, then threshold is 1 because no settings button\n if (this.player().tech_ && this.player().tech_['featuresNativeTextTracks']) {\n threshold = 1;\n }\n\n if (this.items && this.items.length > threshold) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Create caption menu items\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n if (!(this.player().tech_ && this.player().tech_['featuresNativeTextTracks'])) {\n items.push(new CaptionSettingsMenuItem(this.player_, { 'kind': this.kind_ }));\n }\n\n return super.createItems(items);\n }\n\n}\n\nCaptionsButton.prototype.kind_ = 'captions';\nCaptionsButton.prototype.controlText_ = 'Captions';\n\nComponent.registerComponent('CaptionsButton', CaptionsButton);\nexport default CaptionsButton;\n","/**\n * @file chapters-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport ChaptersTrackMenuItem from './chapters-track-menu-item.js';\nimport Menu from '../../menu/menu.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport toTitleCase from '../../utils/to-title-case.js';\nimport window from 'global/window';\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class ChaptersButton\n */\nclass ChaptersButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Chapters Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-chapters-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Create a menu item for each text track\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n /**\n * Create menu from chapter buttons\n *\n * @return {Menu} Menu of chapter buttons\n * @method createMenu\n */\n createMenu() {\n let tracks = this.player_.textTracks() || [];\n let chaptersTrack;\n let items = this.items = [];\n\n for (let i = 0, length = tracks.length; i < length; i++) {\n let track = tracks[i];\n\n if (track['kind'] === this.kind_) {\n chaptersTrack = track;\n\n break;\n }\n }\n\n let menu = this.menu;\n if (menu === undefined) {\n menu = new Menu(this.player_);\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.kind_),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n if (chaptersTrack && chaptersTrack.cues == null) {\n chaptersTrack['mode'] = 'hidden';\n\n let remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(chaptersTrack);\n\n if (remoteTextTrackEl) {\n remoteTextTrackEl.addEventListener('load', (event) => this.update());\n }\n }\n\n if (chaptersTrack && chaptersTrack.cues && chaptersTrack.cues.length > 0) {\n let cues = chaptersTrack['cues'], cue;\n\n for (let i = 0, l = cues.length; i < l; i++) {\n cue = cues[i];\n\n let mi = new ChaptersTrackMenuItem(this.player_, {\n 'track': chaptersTrack,\n 'cue': cue\n });\n\n items.push(mi);\n\n menu.addChild(mi);\n }\n\n this.addChild(menu);\n }\n\n if (this.items.length > 0) {\n this.show();\n }\n\n return menu;\n }\n\n}\n\nChaptersButton.prototype.kind_ = 'chapters';\nChaptersButton.prototype.controlText_ = 'Chapters';\n\nComponent.registerComponent('ChaptersButton', ChaptersButton);\nexport default ChaptersButton;\n","/**\n * @file chapters-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The chapter track menu item\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class ChaptersTrackMenuItem\n */\nclass ChaptersTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let cue = options['cue'];\n let currentTime = player.currentTime();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = cue.text;\n options['selected'] = (cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n super(player, options);\n\n this.track = track;\n this.cue = cue;\n track.addEventListener('cuechange', Fn.bind(this, this.update));\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player_.currentTime(this.cue.startTime);\n this.update(this.cue.startTime);\n }\n\n /**\n * Update chapter menu item\n *\n * @method update\n */\n update() {\n let cue = this.cue;\n let currentTime = this.player_.currentTime();\n\n // vjs.log(currentTime, cue.startTime);\n this.selected(cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n }\n\n}\n\nComponent.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\nexport default ChaptersTrackMenuItem;\n","/**\n * @file descriptions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The button component for toggling and selecting descriptions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class DescriptionsButton\n */\nclass DescriptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label', 'Descriptions Menu');\n\n let tracks = player.textTracks();\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let disabled = false;\n\n // Check whether a track of a different kind is showing\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] !== this.kind_ && track['mode'] === 'showing') {\n disabled = true;\n break;\n }\n }\n\n // If another track is showing, disable this menu button\n if (disabled) {\n this.disable();\n } else {\n this.enable();\n }\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-descriptions-button ${super.buildCSSClass()}`;\n }\n\n}\n\nDescriptionsButton.prototype.kind_ = 'descriptions';\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\n\nComponent.registerComponent('DescriptionsButton', DescriptionsButton);\nexport default DescriptionsButton;\n","/**\n * @file off-text-track-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * A special menu item for turning of a specific type of text track\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class OffTextTrackMenuItem\n */\nclass OffTextTrackMenuItem extends TextTrackMenuItem {\n\n constructor(player, options){\n // Create pseudo track info\n // Requires options['kind']\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' off',\n 'default': false,\n 'mode': 'disabled'\n };\n\n // MenuItem is selectable\n options['selectable'] = true;\n\n super(player, options);\n this.selected(true);\n }\n\n /**\n * Handle text track change\n *\n * @param {Object} event Event object\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let selected = true;\n\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] === this.track['kind'] && track['mode'] === 'showing') {\n selected = false;\n break;\n }\n }\n\n this.selected(selected);\n }\n\n}\n\nComponent.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\nexport default OffTextTrackMenuItem;\n","/**\n * @file subtitles-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class SubtitlesButton\n */\nclass SubtitlesButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Subtitles Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-subtitles-button ${super.buildCSSClass()}`;\n }\n\n}\n\nSubtitlesButton.prototype.kind_ = 'subtitles';\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\n\nComponent.registerComponent('SubtitlesButton', SubtitlesButton);\nexport default SubtitlesButton;\n","/**\n * @file text-track-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport OffTextTrackMenuItem from './off-text-track-menu-item.js';\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class TextTrackButton\n */\nclass TextTrackButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n let tracks = this.player_.textTracks();\n\n if (this.items.length <= 1) {\n this.hide();\n }\n\n if (!tracks) {\n return;\n }\n\n let updateHandler = Fn.bind(this, this.update);\n tracks.addEventListener('removetrack', updateHandler);\n tracks.addEventListener('addtrack', updateHandler);\n\n this.player_.on('dispose', function() {\n tracks.removeEventListener('removetrack', updateHandler);\n tracks.removeEventListener('addtrack', updateHandler);\n });\n }\n\n // Create a menu item for each text track\n createItems(items=[]) {\n // Add an OFF menu item to turn all tracks off\n items.push(new OffTextTrackMenuItem(this.player_, { 'kind': this.kind_ }));\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // only add tracks that are of the appropriate kind and have a label\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n // MenuItem is selectable\n 'selectable': true,\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n}\n\nComponent.registerComponent('TextTrackButton', TextTrackButton);\nexport default TextTrackButton;\n","/**\n * @file text-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class TextTrackMenuItem\n */\nclass TextTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let tracks = player.textTracks();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = track['label'] || track['language'] || 'Unknown';\n options['selected'] = track['default'] || track['mode'] === 'showing';\n\n super(player, options);\n\n this.track = track;\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n\n // iOS7 doesn't dispatch change events to TextTrackLists when an\n // associated track's mode changes. Without something like\n // Object.observe() (also not present on iOS7), it's not\n // possible to detect changes to the mode attribute and polyfill\n // the change event. As a poor substitute, we manually dispatch\n // change events whenever the controls modify the mode.\n if (tracks && tracks.onchange === undefined) {\n let event;\n\n this.on(['tap', 'click'], function() {\n if (typeof window.Event !== 'object') {\n // Android 2.3 throws an Illegal Constructor error for window.Event\n try {\n event = new window.Event('change');\n } catch(err){}\n }\n\n if (!event) {\n event = document.createEvent('Event');\n event.initEvent('change', true, true);\n }\n\n tracks.dispatchEvent(event);\n });\n }\n }\n\n /**\n * Handle click on text track\n *\n * @method handleClick\n */\n handleClick(event) {\n let kind = this.track['kind'];\n let tracks = this.player_.textTracks();\n\n super.handleClick(event);\n\n if (!tracks) return;\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n if (track['kind'] !== kind) {\n continue;\n }\n\n if (track === this.track) {\n track['mode'] = 'showing';\n } else {\n track['mode'] = 'disabled';\n }\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n this.selected(this.track['mode'] === 'showing');\n }\n\n}\n\nComponent.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\nexport default TextTrackMenuItem;\n","/**\n * @file current-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the current time\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class CurrentTimeDisplay\n */\nclass CurrentTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-current-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-current-time-display',\n // label the current time for screen reader users\n innerHTML: 'Current Time ' + '0:00',\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update current time display\n *\n * @method updateContent\n */\n updateContent() {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let localizedText = this.localize('Current Time');\n let formattedTime = formatTime(time, this.player_.duration());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `${localizedText} ${formattedTime}`;\n }\n }\n\n}\n\nComponent.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\nexport default CurrentTimeDisplay;\n","/**\n * @file duration-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the duration\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class DurationDisplay\n */\nclass DurationDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // this might need to be changed to 'durationchange' instead of 'timeupdate' eventually,\n // however the durationchange event fires before this.player_.duration() is set,\n // so the value cannot be written out using this method.\n // Once the order of durationchange and this.player_.duration() being set is figured out,\n // this can be updated.\n this.on(player, 'timeupdate', this.updateContent);\n this.on(player, 'loadedmetadata', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-duration vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-duration-display',\n // label the duration time for screen reader users\n innerHTML: `${this.localize('Duration Time')} 0:00`\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update duration time display\n *\n * @method updateContent\n */\n updateContent() {\n let duration = this.player_.duration();\n if (duration && this.duration_ !== duration) {\n this.duration_ = duration;\n let localizedText = this.localize('Duration Time');\n let formattedTime = formatTime(duration);\n this.contentEl_.innerHTML = `${localizedText} ${formattedTime}`; // label the duration time for screen reader users\n }\n }\n\n}\n\nComponent.registerComponent('DurationDisplay', DurationDisplay);\nexport default DurationDisplay;\n","/**\n * @file remaining-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the time left in the video\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class RemainingTimeDisplay\n */\nclass RemainingTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-remaining-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-remaining-time-display',\n // label the remaining time for screen reader users\n innerHTML: `${this.localize('Remaining Time')} -0:00`,\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update remaining time display\n *\n * @method updateContent\n */\n updateContent() {\n if (this.player_.duration()) {\n const localizedText = this.localize('Remaining Time');\n const formattedTime = formatTime(this.player_.remainingTime());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `${localizedText} -${formattedTime}`;\n }\n }\n\n // Allows for smooth scrubbing, when player can't keep up.\n // var time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n // this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration());\n }\n\n}\n\nComponent.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\nexport default RemainingTimeDisplay;\n","/**\n * @file time-divider.js\n */\nimport Component from '../../component.js';\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class TimeDivider\n */\nclass TimeDivider extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-time-control vjs-time-divider',\n innerHTML: '
    /
    '\n });\n }\n\n}\n\nComponent.registerComponent('TimeDivider', TimeDivider);\nexport default TimeDivider;\n","/**\n * @file volume-bar.js\n */\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n// Required children\nimport VolumeLevel from './volume-level.js';\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class VolumeBar\n */\nclass VolumeBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'volumechange', this.updateARIAAttributes);\n player.ready(Fn.bind(this, this.updateARIAAttributes));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-bar vjs-slider-bar'\n }, {\n 'aria-label': 'volume level'\n });\n }\n\n /**\n * Handle mouse move on volume bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n this.checkMuted();\n this.player_.volume(this.calculateDistance(event));\n }\n\n checkMuted() {\n if (this.player_.muted()) {\n this.player_.muted(false);\n }\n }\n\n /**\n * Get percent of volume level\n *\n * @retun {Number} Volume level percent\n * @method getPercent\n */\n getPercent() {\n if (this.player_.muted()) {\n return 0;\n } else {\n return this.player_.volume();\n }\n }\n\n /**\n * Increase volume level for keyboard users\n *\n * @method stepForward\n */\n stepForward() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() + 0.1);\n }\n\n /**\n * Decrease volume level for keyboard users\n *\n * @method stepBack\n */\n stepBack() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() - 0.1);\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current value of volume bar as a percentage\n let volume = (this.player_.volume() * 100).toFixed(2);\n this.el_.setAttribute('aria-valuenow', volume);\n this.el_.setAttribute('aria-valuetext', volume + '%');\n }\n\n}\n\nVolumeBar.prototype.options_ = {\n children: [\n 'volumeLevel'\n ],\n 'barName': 'volumeLevel'\n};\n\nVolumeBar.prototype.playerEvent = 'volumechange';\n\nComponent.registerComponent('VolumeBar', VolumeBar);\nexport default VolumeBar;\n","/**\n * @file volume-control.js\n */\nimport Component from '../../component.js';\n\n// Required children\nimport VolumeBar from './volume-bar.js';\n\n/**\n * The component for controlling the volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeControl\n */\nclass VolumeControl extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // hide volume controls when they're not supported by the current tech\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n this.on(player, 'loadstart', function(){\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-control vjs-control'\n });\n }\n\n}\n\nVolumeControl.prototype.options_ = {\n children: [\n 'volumeBar'\n ]\n};\n\nComponent.registerComponent('VolumeControl', VolumeControl);\nexport default VolumeControl;\n","/**\n * @file volume-level.js\n */\nimport Component from '../../component.js';\n\n/**\n * Shows volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeLevel\n */\nclass VolumeLevel extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-level',\n innerHTML: ''\n });\n }\n\n}\n\nComponent.registerComponent('VolumeLevel', VolumeLevel);\nexport default VolumeLevel;\n","/**\n * @file volume-menu-button.js\n */\nimport * as Fn from '../utils/fn.js';\nimport Component from '../component.js';\nimport Popup from '../popup/popup.js';\nimport PopupButton from '../popup/popup-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport VolumeBar from './volume-control/volume-bar.js';\n\n/**\n * Button for volume popup\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends PopupButton\n * @class VolumeMenuButton\n */\nclass VolumeMenuButton extends PopupButton {\n\n constructor(player, options={}){\n // Default to inline\n if (options.inline === undefined) {\n options.inline = true;\n }\n\n // If the vertical option isn't passed at all, default to true.\n if (options.vertical === undefined) {\n // If an inline volumeMenuButton is used, we should default to using\n // a horizontal slider for obvious reasons.\n if (options.inline) {\n options.vertical = false;\n } else {\n options.vertical = true;\n }\n }\n\n // The vertical option needs to be set on the volumeBar as well,\n // since that will need to be passed along to the VolumeBar constructor\n options.volumeBar = options.volumeBar || {};\n options.volumeBar.vertical = !!options.vertical;\n\n super(player, options);\n\n // Same listeners as MuteToggle\n this.on(player, 'volumechange', this.volumeUpdate);\n this.on(player, 'loadstart', this.volumeUpdate);\n\n // hide mute toggle if the current tech doesn't support volume control\n function updateVisibility() {\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n }\n\n updateVisibility.call(this);\n this.on(player, 'loadstart', updateVisibility);\n\n this.on(this.volumeBar, ['slideractive', 'focus'], function(){\n this.addClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['sliderinactive', 'blur'], function(){\n this.removeClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['focus'], function(){\n this.addClass('vjs-lock-showing');\n });\n\n this.on(this.volumeBar, ['blur'], function(){\n this.removeClass('vjs-lock-showing');\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n let orientationClass = '';\n if (!!this.options_.vertical) {\n orientationClass = 'vjs-volume-menu-button-vertical';\n } else {\n orientationClass = 'vjs-volume-menu-button-horizontal';\n }\n\n return `vjs-volume-menu-button ${super.buildCSSClass()} ${orientationClass}`;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {Popup} The volume popup button\n * @method createPopup\n */\n createPopup() {\n let popup = new Popup(this.player_, {\n contentElType: 'div'\n });\n\n let vb = new VolumeBar(this.player_, this.options_.volumeBar);\n\n popup.addChild(vb);\n\n this.menuContent = popup;\n this.volumeBar = vb;\n\n this.attachVolumeBarEvents();\n\n return popup;\n }\n\n /**\n * Handle click on volume popup and calls super\n *\n * @method handleClick\n */\n handleClick() {\n MuteToggle.prototype.handleClick.call(this);\n super.handleClick();\n }\n\n attachVolumeBarEvents() {\n this.menuContent.on(['mousedown', 'touchdown'], Fn.bind(this, this.handleMouseDown));\n }\n\n handleMouseDown(event) {\n this.on(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n this.on(this.el_.ownerDocument, ['mouseup', 'touchend'], this.handleMouseUp);\n }\n\n handleMouseUp(event) {\n this.off(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n }\n}\n\nVolumeMenuButton.prototype.volumeUpdate = MuteToggle.prototype.update;\nVolumeMenuButton.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('VolumeMenuButton', VolumeMenuButton);\nexport default VolumeMenuButton;\n","/**\n * @file error-display.js\n */\nimport Component from './component';\nimport ModalDialog from './modal-dialog';\n\nimport * as Dom from './utils/dom';\nimport mergeOptions from './utils/merge-options';\n\n/**\n * Display that an error has occurred making the video unplayable.\n *\n * @extends ModalDialog\n * @class ErrorDisplay\n */\nclass ErrorDisplay extends ModalDialog {\n\n /**\n * Constructor for error display modal.\n *\n * @param {Player} player\n * @param {Object} [options]\n */\n constructor(player, options) {\n super(player, options);\n this.on(player, 'error', this.open);\n }\n\n /**\n * Include the old class for backward-compatibility.\n *\n * This can be removed in 6.0.\n *\n * @method buildCSSClass\n * @deprecated\n * @return {String}\n */\n buildCSSClass() {\n return `vjs-error-display ${super.buildCSSClass()}`;\n }\n\n /**\n * Generates the modal content based on the player error.\n *\n * @return {String|Null}\n */\n content() {\n let error = this.player().error();\n return error ? this.localize(error.message) : '';\n }\n}\n\nErrorDisplay.prototype.options_ = mergeOptions(ModalDialog.prototype.options_, {\n fillAlways: true,\n temporary: false,\n uncloseable: true\n});\n\nComponent.registerComponent('ErrorDisplay', ErrorDisplay);\nexport default ErrorDisplay;\n","/**\n * @file event-target.js\n */\nimport * as Events from './utils/events.js';\n\nvar EventTarget = function() {};\n\nEventTarget.prototype.allowedEvents_ = {};\n\nEventTarget.prototype.on = function(type, fn) {\n // Remove the addEventListener alias before calling Events.on\n // so we don't get into an infinite type loop\n let ael = this.addEventListener;\n this.addEventListener = Function.prototype;\n Events.on(this, type, fn);\n this.addEventListener = ael;\n};\nEventTarget.prototype.addEventListener = EventTarget.prototype.on;\n\nEventTarget.prototype.off = function(type, fn) {\n Events.off(this, type, fn);\n};\nEventTarget.prototype.removeEventListener = EventTarget.prototype.off;\n\nEventTarget.prototype.one = function(type, fn) {\n Events.one(this, type, fn);\n};\n\nEventTarget.prototype.trigger = function(event) {\n let type = event.type || event;\n\n if (typeof event === 'string') {\n event = {\n type: type\n };\n }\n event = Events.fixEvent(event);\n\n if (this.allowedEvents_[type] && this['on' + type]) {\n this['on' + type](event);\n }\n\n Events.trigger(this, event);\n};\n// The standard DOM EventTarget.dispatchEvent() is aliased to trigger()\nEventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;\n\nexport default EventTarget;\n","import log from './utils/log';\n\n/*\n * @file extend.js\n *\n * A combination of node inherits and babel's inherits (after transpile).\n * Both work the same but node adds `super_` to the subClass\n * and Bable adds the superClass as __proto__. Both seem useful.\n */\nconst _inherits = function (subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) {\n // node\n subClass.super_ = superClass;\n }\n};\n\n/*\n * Function for subclassing using the same inheritance that\n * videojs uses internally\n * ```js\n * var Button = videojs.getComponent('Button');\n * ```\n * ```js\n * var MyButton = videojs.extend(Button, {\n * constructor: function(player, options) {\n * Button.call(this, player, options);\n * },\n * onClick: function() {\n * // doSomething\n * }\n * });\n * ```\n */\nconst extendFn = function(superClass, subClassMethods={}) {\n let subClass = function() {\n superClass.apply(this, arguments);\n };\n let methods = {};\n\n if (typeof subClassMethods === 'object') {\n if (typeof subClassMethods.init === 'function') {\n log.warn('Constructor logic via init() is deprecated; please use constructor() instead.');\n subClassMethods.constructor = subClassMethods.init;\n }\n if (subClassMethods.constructor !== Object.prototype.constructor) {\n subClass = subClassMethods.constructor;\n }\n methods = subClassMethods;\n } else if (typeof subClassMethods === 'function') {\n subClass = subClassMethods;\n }\n\n _inherits(subClass, superClass);\n\n // Extend subObj's prototype with functions and other properties from props\n for (var name in methods) {\n if (methods.hasOwnProperty(name)) {\n subClass.prototype[name] = methods[name];\n }\n }\n\n return subClass;\n};\n\nexport default extendFn;\n","/**\n * @file fullscreen-api.js\n */\nimport document from 'global/document';\n\n/*\n * Store the browser-specific methods for the fullscreen API\n * @type {Object|undefined}\n * @private\n */\nlet FullscreenApi = {};\n\n// browser API methods\n// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js\nconst apiMap = [\n // Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html\n [\n 'requestFullscreen',\n 'exitFullscreen',\n 'fullscreenElement',\n 'fullscreenEnabled',\n 'fullscreenchange',\n 'fullscreenerror'\n ],\n // WebKit\n [\n 'webkitRequestFullscreen',\n 'webkitExitFullscreen',\n 'webkitFullscreenElement',\n 'webkitFullscreenEnabled',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Old WebKit (Safari 5.1)\n [\n 'webkitRequestFullScreen',\n 'webkitCancelFullScreen',\n 'webkitCurrentFullScreenElement',\n 'webkitCancelFullScreen',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Mozilla\n [\n 'mozRequestFullScreen',\n 'mozCancelFullScreen',\n 'mozFullScreenElement',\n 'mozFullScreenEnabled',\n 'mozfullscreenchange',\n 'mozfullscreenerror'\n ],\n // Microsoft\n [\n 'msRequestFullscreen',\n 'msExitFullscreen',\n 'msFullscreenElement',\n 'msFullscreenEnabled',\n 'MSFullscreenChange',\n 'MSFullscreenError'\n ]\n];\n\nlet specApi = apiMap[0];\nlet browserApi;\n\n// determine the supported set of functions\nfor (let i = 0; i < apiMap.length; i++) {\n // check for exitFullscreen function\n if (apiMap[i][1] in document) {\n browserApi = apiMap[i];\n break;\n }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n for (let i=0; i 1) {\n this.show();\n }\n }\n\n /**\n * Create menu\n *\n * @return {Menu} The constructed menu\n * @method createMenu\n */\n createMenu() {\n var menu = new Menu(this.player_);\n\n // Add a title list item to the top\n if (this.options_.title) {\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.options_.title),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n this.items = this['createItems']();\n\n if (this.items) {\n // Add menu items to the menu\n for (var i = 0; i < this.items.length; i++) {\n menu.addItem(this.items[i]);\n }\n }\n\n return menu;\n }\n\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n * @method createItems\n */\n createItems(){}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n /**\n * When you click the button it adds focus, which\n * will show the menu indefinitely.\n * So we'll remove focus when the mouse leaves the button.\n * Focus is needed for tab navigation.\n * Allow sub components to stack CSS class names\n *\n * @method handleClick\n */\n handleClick() {\n this.one('mouseout', Fn.bind(this, function(){\n this.menu.unlockShowing();\n this.el_.blur();\n }));\n if (this.buttonPressed_){\n this.unpressButton();\n } else {\n this.pressButton();\n }\n }\n\n /**\n * Handle key press on menu\n *\n * @param {Object} event Key press event\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9) {\n if (this.buttonPressed_) {\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n // Up (38) key or Down (40) key press the 'button'\n } else if (event.which === 38 || event.which === 40) {\n if (!this.buttonPressed_) {\n this.pressButton();\n event.preventDefault();\n }\n } else {\n super.handleKeyPress(event);\n }\n }\n\n /**\n * Handle key press on submenu\n *\n * @param {Object} event Key press event\n * @method handleSubmenuKeyPress\n */\n handleSubmenuKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9){\n if (this.buttonPressed_){\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n }\n }\n\n /**\n * Makes changes based on button pressed\n *\n * @method pressButton\n */\n pressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = true;\n this.menu.lockShowing();\n this.el_.setAttribute('aria-expanded', 'true');\n this.menu.focus(); // set the focus into the submenu\n }\n }\n\n /**\n * Makes changes based on button unpressed\n *\n * @method unpressButton\n */\n unpressButton() {\n if (this.enabled_) {\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', 'false');\n this.el_.focus(); // Set focus back to this menu button\n }\n }\n\n /**\n * Disable the menu button\n *\n * @return {Component}\n * @method disable\n */\n disable() {\n // Unpress, but don't force focus on this button\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', 'false');\n\n this.enabled_ = false;\n\n return super.disable();\n }\n\n /**\n * Enable the menu button\n *\n * @return {Component}\n * @method disable\n */\n enable() {\n this.enabled_ = true;\n\n return super.enable();\n }\n}\n\nComponent.registerComponent('MenuButton', MenuButton);\nexport default MenuButton;\n","/**\n * @file menu-item.js\n */\nimport ClickableComponent from '../clickable-component.js';\nimport Component from '../component.js';\nimport assign from 'object.assign';\n\n/**\n * The component for a menu item. `
  • `\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MenuItem\n */\nclass MenuItem extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n\n this.selectable = options['selectable'];\n\n this.selected(options['selected']);\n\n if (this.selectable) {\n // TODO: May need to be either menuitemcheckbox or menuitemradio,\n // and may need logical grouping of menu items.\n this.el_.setAttribute('role', 'menuitemcheckbox');\n } else {\n this.el_.setAttribute('role', 'menuitem');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Desc\n * @param {Object=} props Desc\n * @return {Element}\n * @method createEl\n */\n createEl(type, props, attrs) {\n return super.createEl('li', assign({\n className: 'vjs-menu-item',\n innerHTML: this.localize(this.options_['label']),\n tabIndex: -1\n }, props), attrs);\n }\n\n /**\n * Handle a click on the menu item, and set it to selected\n *\n * @method handleClick\n */\n handleClick() {\n this.selected(true);\n }\n\n /**\n * Set this menu item as selected or not\n *\n * @param {Boolean} selected\n * @method selected\n */\n selected(selected) {\n if (this.selectable) {\n if (selected) {\n this.addClass('vjs-selected');\n this.el_.setAttribute('aria-checked','true');\n // aria-checked isn't fully supported by browsers/screen readers,\n // so indicate selected state to screen reader in the control text.\n this.controlText(', selected');\n } else {\n this.removeClass('vjs-selected');\n this.el_.setAttribute('aria-checked','false');\n // Indicate un-selected state to screen reader\n // Note that a space clears out the selected state text\n this.controlText(' ');\n }\n }\n }\n}\n\nComponent.registerComponent('MenuItem', MenuItem);\nexport default MenuItem;\n","/**\n * @file menu.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Menu component is used to build pop up menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n * @class Menu\n */\nclass Menu extends Component {\n\n constructor (player, options) {\n super(player, options);\n\n this.focusedChild_ = -1;\n\n this.on('keydown', this.handleKeyPress);\n }\n\n /**\n * Add a menu item to the menu\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n //TODO: Need to set keyboard focus back to the menuButton\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n this.contentEl_.setAttribute('role', 'menu');\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.setAttribute('role', 'presentation');\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Menu Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n\n /**\n * Handle key press for menu\n *\n * @param {Object} event Event object\n * @method handleKeyPress\n */\n handleKeyPress (event) {\n if (event.which === 37 || event.which === 40) { // Left and Down Arrows\n event.preventDefault();\n this.stepForward();\n } else if (event.which === 38 || event.which === 39) { // Up and Right Arrows\n event.preventDefault();\n this.stepBack();\n }\n }\n\n /**\n * Move to next (lower) menu item for keyboard users\n *\n * @method stepForward\n */\n stepForward () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ + 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Move to previous (higher) menu item for keyboard users\n *\n * @method stepBack\n */\n stepBack () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ - 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Set focus on a menu item in the menu\n *\n * @param {Object|String} item Index of child item set focus on\n * @method focus\n */\n focus (item = 0) {\n let children = this.children().slice();\n let haveTitle = children.length && children[0].className &&\n /vjs-menu-title/.test(children[0].className);\n\n if (haveTitle) {\n children.shift();\n }\n\n if (children.length > 0) {\n if (item < 0) {\n item = 0;\n } else if (item >= children.length) {\n item = children.length - 1;\n }\n\n this.focusedChild_ = item;\n\n children[item].el_.focus();\n }\n }\n}\n\nComponent.registerComponent('Menu', Menu);\nexport default Menu;\n","/**\n * @file modal-dialog.js\n */\nimport * as Dom from './utils/dom';\nimport * as Fn from './utils/fn';\nimport log from './utils/log';\n\nimport Component from './component';\nimport CloseButton from './close-button';\n\nconst MODAL_CLASS_NAME = 'vjs-modal-dialog';\nconst ESC = 27;\n\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n * @class ModalDialog\n */\nclass ModalDialog extends Component {\n\n /**\n * Constructor for modals.\n *\n * @param {Player} player\n * @param {Object} [options]\n * @param {Mixed} [options.content=undefined]\n * Provide customized content for this modal.\n *\n * @param {String} [options.description]\n * A text description for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.fillAlways=false]\n * Normally, modals are automatically filled only the first time\n * they open. This tells the modal to refresh its content\n * every time it opens.\n *\n * @param {String} [options.label]\n * A text label for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.temporary=true]\n * If `true`, the modal can only be opened once; it will be\n * disposed as soon as it's closed.\n *\n * @param {Boolean} [options.uncloseable=false]\n * If `true`, the user will not be able to close the modal\n * through the UI in the normal ways. Programmatic closing is\n * still possible.\n *\n */\n constructor(player, options) {\n super(player, options);\n this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n\n this.closeable(!this.options_.uncloseable);\n this.content(this.options_.content);\n\n // Make sure the contentEl is defined AFTER any children are initialized\n // because we only want the contents of the modal in the contentEl\n // (not the UI elements like the close button).\n this.contentEl_ = Dom.createEl('div', {\n className: `${MODAL_CLASS_NAME}-content`\n }, {\n role: 'document'\n });\n\n this.descEl_ = Dom.createEl('p', {\n className: `${MODAL_CLASS_NAME}-description vjs-offscreen`,\n id: this.el().getAttribute('aria-describedby')\n });\n\n Dom.textContent(this.descEl_, this.description());\n this.el_.appendChild(this.descEl_);\n this.el_.appendChild(this.contentEl_);\n }\n\n /**\n * Create the modal's DOM element\n *\n * @method createEl\n * @return {Element}\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass(),\n tabIndex: -1\n }, {\n 'aria-describedby': `${this.id()}_description`,\n 'aria-hidden': 'true',\n 'aria-label': this.label(),\n role: 'dialog'\n });\n }\n\n /**\n * Build the modal's CSS class.\n *\n * @method buildCSSClass\n * @return {String}\n */\n buildCSSClass() {\n return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles key presses on the document, looking for ESC, which closes\n * the modal.\n *\n * @method handleKeyPress\n * @param {Event} e\n */\n handleKeyPress(e) {\n if (e.which === ESC && this.closeable()) {\n this.close();\n }\n }\n\n /**\n * Returns the label string for this modal. Primarily used for accessibility.\n *\n * @return {String}\n */\n label() {\n return this.options_.label || this.localize('Modal Window');\n }\n\n /**\n * Returns the description string for this modal. Primarily used for\n * accessibility.\n *\n * @return {String}\n */\n description() {\n let desc = this.options_.description || this.localize('This is a modal window.');\n\n // Append a universal closeability message if the modal is closeable.\n if (this.closeable()) {\n desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n }\n\n return desc;\n }\n\n /**\n * Opens the modal.\n *\n * @method open\n * @return {ModalDialog}\n */\n open() {\n if (!this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalopen');\n this.opened_ = true;\n\n // Fill content if the modal has never opened before and\n // never been filled.\n if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n this.fill();\n }\n\n // If the player was playing, pause it and take note of its previously\n // playing state.\n this.wasPlaying_ = !player.paused();\n\n if (this.wasPlaying_) {\n player.pause();\n }\n\n if (this.closeable()) {\n this.on(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(false);\n this.show();\n this.el().setAttribute('aria-hidden', 'false');\n this.trigger('modalopen');\n this.hasBeenOpened_ = true;\n }\n return this;\n }\n\n /**\n * Whether or not the modal is opened currently.\n *\n * @method opened\n * @param {Boolean} [value]\n * If given, it will open (`true`) or close (`false`) the modal.\n *\n * @return {Boolean}\n */\n opened(value) {\n if (typeof value === 'boolean') {\n this[value ? 'open' : 'close']();\n }\n return this.opened_;\n }\n\n /**\n * Closes the modal.\n *\n * @method close\n * @return {ModalDialog}\n */\n close() {\n if (this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalclose');\n this.opened_ = false;\n\n if (this.wasPlaying_) {\n player.play();\n }\n\n if (this.closeable()) {\n this.off(this.el_.ownerDocument, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(true);\n this.hide();\n this.el().setAttribute('aria-hidden', 'true');\n this.trigger('modalclose');\n\n if (this.options_.temporary) {\n this.dispose();\n }\n }\n return this;\n }\n\n /**\n * Whether or not the modal is closeable via the UI.\n *\n * @method closeable\n * @param {Boolean} [value]\n * If given as a Boolean, it will set the `closeable` option.\n *\n * @return {Boolean}\n */\n closeable(value) {\n if (typeof value === 'boolean') {\n let closeable = this.closeable_ = !!value;\n let close = this.getChild('closeButton');\n\n // If this is being made closeable and has no close button, add one.\n if (closeable && !close) {\n\n // The close button should be a child of the modal - not its\n // content element, so temporarily change the content element.\n let temp = this.contentEl_;\n this.contentEl_ = this.el_;\n close = this.addChild('closeButton');\n this.contentEl_ = temp;\n this.on(close, 'close', this.close);\n }\n\n // If this is being made uncloseable and has a close button, remove it.\n if (!closeable && close) {\n this.off(close, 'close', this.close);\n this.removeChild(close);\n close.dispose();\n }\n }\n return this.closeable_;\n }\n\n /**\n * Fill the modal's content element with the modal's \"content\" option.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fill\n * @return {ModalDialog}\n */\n fill() {\n return this.fillWith(this.content());\n }\n\n /**\n * Fill the modal's content element with arbitrary content.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fillWith\n * @param {Mixed} [content]\n * The same rules apply to this as apply to the `content` option.\n *\n * @return {ModalDialog}\n */\n fillWith(content) {\n let contentEl = this.contentEl();\n let parentEl = contentEl.parentNode;\n let nextSiblingEl = contentEl.nextSibling;\n\n this.trigger('beforemodalfill');\n this.hasBeenFilled_ = true;\n\n // Detach the content element from the DOM before performing\n // manipulation to avoid modifying the live DOM multiple times.\n parentEl.removeChild(contentEl);\n this.empty();\n Dom.insertContent(contentEl, content);\n this.trigger('modalfill');\n\n // Re-inject the re-filled content element.\n if (nextSiblingEl) {\n parentEl.insertBefore(contentEl, nextSiblingEl);\n } else {\n parentEl.appendChild(contentEl);\n }\n\n return this;\n }\n\n /**\n * Empties the content element.\n *\n * This happens automatically anytime the modal is filled.\n *\n * @method empty\n * @return {ModalDialog}\n */\n empty() {\n this.trigger('beforemodalempty');\n Dom.emptyEl(this.contentEl());\n this.trigger('modalempty');\n return this;\n }\n\n /**\n * Gets or sets the modal content, which gets normalized before being\n * rendered into the DOM.\n *\n * This does not update the DOM or fill the modal, but it is called during\n * that process.\n *\n * @method content\n * @param {Mixed} [value]\n * If defined, sets the internal content value to be used on the\n * next call(s) to `fill`. This value is normalized before being\n * inserted. To \"clear\" the internal content value, pass `null`.\n *\n * @return {Mixed}\n */\n content(value) {\n if (typeof value !== 'undefined') {\n this.content_ = value;\n }\n return this.content_;\n }\n}\n\n/*\n * Modal dialog default options.\n *\n * @type {Object}\n * @private\n */\nModalDialog.prototype.options_ = {\n temporary: true\n};\n\nComponent.registerComponent('ModalDialog', ModalDialog);\nexport default ModalDialog;\n","/**\n * @file player.js\n */\n // Subclasses Component\nimport Component from './component.js';\n\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Events from './utils/events.js';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as browser from './utils/browser.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport { createTimeRange } from './utils/time-ranges.js';\nimport { bufferedPercent } from './utils/buffer.js';\nimport * as stylesheet from './utils/stylesheet.js';\nimport FullscreenApi from './fullscreen-api.js';\nimport MediaError from './media-error.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\nimport textTrackConverter from './tracks/text-track-list-converter.js';\n\n// Include required child components (importing also registers them)\nimport MediaLoader from './tech/loader.js';\nimport PosterImage from './poster-image.js';\nimport TextTrackDisplay from './tracks/text-track-display.js';\nimport LoadingSpinner from './loading-spinner.js';\nimport BigPlayButton from './big-play-button.js';\nimport ControlBar from './control-bar/control-bar.js';\nimport ErrorDisplay from './error-display.js';\nimport TextTrackSettings from './tracks/text-track-settings.js';\nimport ModalDialog from './modal-dialog';\n\n// Require html5 tech, at least for disposing the original video tag\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\n\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video.\n * ```js\n * var myPlayer = videojs('example_video_1');\n * ```\n * In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.\n * ```html\n * \n * ```\n * After an instance has been created it can be accessed globally using `Video('example_video_1')`.\n *\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class Player\n */\nclass Player extends Component {\n\n /**\n * player's constructor function\n *\n * @constructs\n * @method init\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Player options\n * @param {Function=} ready Ready callback function\n */\n constructor(tag, options, ready){\n // Make sure tag ID exists\n tag.id = tag.id || `vjs_video_${Guid.newGUID()}`;\n\n // Set Options\n // The options argument overrides options set in the video tag\n // which overrides globally set options.\n // This latter part coincides with the load order\n // (tag must exist before Player)\n options = assign(Player.getTagSettings(tag), options);\n\n // Delay the initialization of children because we need to set up\n // player properties first, and can't use `this` before `super()`\n options.initChildren = false;\n\n // Same with creating the element\n options.createEl = false;\n\n // we don't want the player to report touch activity on itself\n // see enableTouchActivity in Component\n options.reportTouchActivity = false;\n\n // Run base component initializing with new options\n super(null, options, ready);\n\n // if the global option object was accidentally blown away by\n // someone, bail early with an informative error\n if (!this.options_ ||\n !this.options_.techOrder ||\n !this.options_.techOrder.length) {\n throw new Error('No techOrder specified. Did you overwrite ' +\n 'videojs.options instead of just changing the ' +\n 'properties you want to override?');\n }\n\n this.tag = tag; // Store the original tag used to set options\n\n // Store the tag attributes used to restore html5 element\n this.tagAttributes = tag && Dom.getElAttributes(tag);\n\n // Update current language\n this.language(this.options_.language);\n\n // Update Supported Languages\n if (options.languages) {\n // Normalise player option languages to lowercase\n let languagesToLower = {};\n\n Object.getOwnPropertyNames(options.languages).forEach(function(name) {\n languagesToLower[name.toLowerCase()] = options.languages[name];\n });\n this.languages_ = languagesToLower;\n } else {\n this.languages_ = Player.prototype.options_.languages;\n }\n\n // Cache for video property values.\n this.cache_ = {};\n\n // Set poster\n this.poster_ = options.poster || '';\n\n // Set controls\n this.controls_ = !!options.controls;\n\n // Original tag settings stored in options\n // now remove immediately so native controls don't flash.\n // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n tag.controls = false;\n\n /*\n * Store the internal state of scrubbing\n *\n * @private\n * @return {Boolean} True if the user is scrubbing\n */\n this.scrubbing_ = false;\n\n this.el_ = this.createEl();\n\n // We also want to pass the original player options to each component and plugin\n // as well so they don't need to reach back into the player for options later.\n // We also need to do another copy of this.options_ so we don't end up with\n // an infinite loop.\n let playerOptionsCopy = mergeOptions(this.options_);\n\n // Load plugins\n if (options.plugins) {\n let plugins = options.plugins;\n\n Object.getOwnPropertyNames(plugins).forEach(function(name){\n if (typeof this[name] === 'function') {\n this[name](plugins[name]);\n } else {\n log.error('Unable to find plugin:', name);\n }\n }, this);\n }\n\n this.options_.playerOptions = playerOptionsCopy;\n\n this.initChildren();\n\n // Set isAudio based on whether or not an audio tag was used\n this.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n // Update controls className. Can't do this when the controls are initially\n // set because the element doesn't exist yet.\n if (this.controls()) {\n this.addClass('vjs-controls-enabled');\n } else {\n this.addClass('vjs-controls-disabled');\n }\n\n // Set ARIA label and region role depending on player type\n this.el_.setAttribute('role', 'region');\n if (this.isAudio()) {\n this.el_.setAttribute('aria-label', 'audio player');\n } else {\n this.el_.setAttribute('aria-label', 'video player');\n }\n\n if (this.isAudio()) {\n this.addClass('vjs-audio');\n }\n\n if (this.flexNotSupported_()) {\n this.addClass('vjs-no-flex');\n }\n\n // TODO: Make this smarter. Toggle user state between touching/mousing\n // using events, since devices can have both touch and mouse events.\n // if (browser.TOUCH_ENABLED) {\n // this.addClass('vjs-touch-enabled');\n // }\n\n // iOS Safari has broken hover handling\n if (!browser.IS_IOS) {\n this.addClass('vjs-workinghover');\n }\n\n // Make player easily findable by ID\n Player.players[this.id_] = this;\n\n // When the player is first initialized, trigger activity so components\n // like the control bar show themselves if needed\n this.userActive(true);\n this.reportUserActivity();\n this.listenForUserActivity_();\n\n this.on('fullscreenchange', this.handleFullscreenChange_);\n this.on('stageclick', this.handleStageClick_);\n }\n\n /**\n * Destroys the video player and does any necessary cleanup\n * ```js\n * myPlayer.dispose();\n * ```\n * This is especially helpful if you are dynamically adding and removing videos\n * to/from the DOM.\n *\n * @method dispose\n */\n dispose() {\n this.trigger('dispose');\n // prevent dispose from being called twice\n this.off('dispose');\n\n if (this.styleEl_ && this.styleEl_.parentNode) {\n this.styleEl_.parentNode.removeChild(this.styleEl_);\n }\n\n // Kill reference to this player\n Player.players[this.id_] = null;\n if (this.tag && this.tag.player) { this.tag.player = null; }\n if (this.el_ && this.el_.player) { this.el_.player = null; }\n\n if (this.tech_) { this.tech_.dispose(); }\n\n super.dispose();\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = this.el_ = super.createEl('div');\n let tag = this.tag;\n\n // Remove width/height attrs from tag so CSS can make it 100% width/height\n tag.removeAttribute('width');\n tag.removeAttribute('height');\n\n // Copy over all the attributes from the tag, including ID and class\n // ID will now reference player box, not the video tag\n const attrs = Dom.getElAttributes(tag);\n\n Object.getOwnPropertyNames(attrs).forEach(function(attr){\n // workaround so we don't totally break IE7\n // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7\n if (attr === 'class') {\n el.className = attrs[attr];\n } else {\n el.setAttribute(attr, attrs[attr]);\n }\n });\n\n // Update tag id/class for use as HTML5 playback tech\n // Might think we should do this after embedding in container so .vjs-tech class\n // doesn't flash 100% width/height, but class only applies with .video-js parent\n tag.playerId = tag.id;\n tag.id += '_html5_api';\n tag.className = 'vjs-tech';\n\n // Make player findable on elements\n tag.player = el.player = this;\n // Default state of video is paused\n this.addClass('vjs-paused');\n\n // Add a style element in the player that we'll use to set the width/height\n // of the player in a way that's still overrideable by CSS, just like the\n // video element\n if (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n this.styleEl_ = stylesheet.createStyleElement('vjs-styles-dimensions');\n let defaultsStyleEl = Dom.$('.vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n }\n\n // Pass in the width/height/aspectRatio options which will update the style el\n this.width(this.options_.width);\n this.height(this.options_.height);\n this.fluid(this.options_.fluid);\n this.aspectRatio(this.options_.aspectRatio);\n\n // Hide any links within the video/audio tag, because IE doesn't hide them completely.\n let links = tag.getElementsByTagName('a');\n for (let i = 0; i < links.length; i++) {\n let linkEl = links.item(i);\n Dom.addElClass(linkEl, 'vjs-hidden');\n linkEl.setAttribute('hidden', 'hidden');\n }\n\n // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n // keep track of the original for later so we can know if the source originally failed\n tag.initNetworkState_ = tag.networkState;\n\n // Wrap video tag in div (el/box) container\n if (tag.parentNode) {\n tag.parentNode.insertBefore(el, tag);\n }\n\n // insert the tag as the first child of the player element\n // then manually add it to the children array so that this.addChild\n // will work properly for other components\n Dom.insertElFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup.\n this.children_.unshift(tag);\n\n this.el_ = el;\n\n return el;\n }\n\n /**\n * Get/set player width\n *\n * @param {Number=} value Value for width\n * @return {Number} Width when getting\n * @method width\n */\n width(value) {\n return this.dimension('width', value);\n }\n\n /**\n * Get/set player height\n *\n * @param {Number=} value Value for height\n * @return {Number} Height when getting\n * @method height\n */\n height(value) {\n return this.dimension('height', value);\n }\n\n /**\n * Get/set dimension for player\n *\n * @param {String} dimension Either width or height\n * @param {Number=} value Value for dimension\n * @return {Component}\n * @method dimension\n */\n dimension(dimension, value) {\n let privDimension = dimension + '_';\n\n if (value === undefined) {\n return this[privDimension] || 0;\n }\n\n if (value === '') {\n // If an empty string is given, reset the dimension to be automatic\n this[privDimension] = undefined;\n } else {\n let parsedVal = parseFloat(value);\n\n if (isNaN(parsedVal)) {\n log.error(`Improper value \"${value}\" supplied for for ${dimension}`);\n return this;\n }\n\n this[privDimension] = parsedVal;\n }\n\n this.updateStyleEl_();\n return this;\n }\n\n /**\n * Add/remove the vjs-fluid class\n *\n * @param {Boolean} bool Value of true adds the class, value of false removes the class\n * @method fluid\n */\n fluid(bool) {\n if (bool === undefined) {\n return !!this.fluid_;\n }\n\n this.fluid_ = !!bool;\n\n if (bool) {\n this.addClass('vjs-fluid');\n } else {\n this.removeClass('vjs-fluid');\n }\n }\n\n /**\n * Get/Set the aspect ratio\n *\n * @param {String=} ratio Aspect ratio for player\n * @return aspectRatio\n * @method aspectRatio\n */\n aspectRatio(ratio) {\n if (ratio === undefined) {\n return this.aspectRatio_;\n }\n\n // Check for width:height format\n if (!/^\\d+\\:\\d+$/.test(ratio)) {\n throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n }\n this.aspectRatio_ = ratio;\n\n // We're assuming if you set an aspect ratio you want fluid mode,\n // because in fixed mode you could calculate width and height yourself.\n this.fluid(true);\n\n this.updateStyleEl_();\n }\n\n /**\n * Update styles of the player element (height, width and aspect ratio)\n *\n * @method updateStyleEl_\n */\n updateStyleEl_() {\n if (window.VIDEOJS_NO_DYNAMIC_STYLE === true) {\n const width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\n const height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\n let techEl = this.tech_ && this.tech_.el();\n\n if (techEl) {\n if (width >= 0) {\n techEl.width = width;\n }\n if (height >= 0) {\n techEl.height = height;\n }\n }\n\n return;\n }\n\n let width;\n let height;\n let aspectRatio;\n let idClass;\n\n // The aspect ratio is either used directly or to calculate width and height.\n if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n // Use any aspectRatio that's been specifically set\n aspectRatio = this.aspectRatio_;\n } else if (this.videoWidth()) {\n // Otherwise try to get the aspect ratio from the video metadata\n aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n } else {\n // Or use a default. The video element's is 2:1, but 16:9 is more common.\n aspectRatio = '16:9';\n }\n\n // Get the ratio as a decimal we can use to calculate dimensions\n let ratioParts = aspectRatio.split(':');\n let ratioMultiplier = ratioParts[1] / ratioParts[0];\n\n if (this.width_ !== undefined) {\n // Use any width that's been specifically set\n width = this.width_;\n } else if (this.height_ !== undefined) {\n // Or calulate the width from the aspect ratio if a height has been set\n width = this.height_ / ratioMultiplier;\n } else {\n // Or use the video's metadata, or use the video el's default of 300\n width = this.videoWidth() || 300;\n }\n\n if (this.height_ !== undefined) {\n // Use any height that's been specifically set\n height = this.height_;\n } else {\n // Otherwise calculate the height from the ratio and the width\n height = width * ratioMultiplier;\n }\n\n // Ensure the CSS class is valid by starting with an alpha character\n if (/^[^a-zA-Z]/.test(this.id())) {\n idClass = 'dimensions-'+this.id();\n } else {\n idClass = this.id()+'-dimensions';\n }\n\n // Ensure the right class is still on the player for the style element\n this.addClass(idClass);\n\n stylesheet.setTextContent(this.styleEl_, `\n .${idClass} {\n width: ${width}px;\n height: ${height}px;\n }\n\n .${idClass}.vjs-fluid {\n padding-top: ${ratioMultiplier * 100}%;\n }\n `);\n }\n\n /**\n * Load the Media Playback Technology (tech)\n * Load/Create an instance of playback technology including element and API methods\n * And append playback element in player div.\n *\n * @param {String} techName Name of the playback technology\n * @param {String} source Video source\n * @method loadTech_\n * @private\n */\n loadTech_(techName, source) {\n\n // Pause and remove current playback technology\n if (this.tech_) {\n this.unloadTech_();\n }\n\n // get rid of the HTML5 video tag as soon as we are using another tech\n if (techName !== 'Html5' && this.tag) {\n Tech.getTech('Html5').disposeMediaElement(this.tag);\n this.tag.player = null;\n this.tag = null;\n }\n\n this.techName_ = techName;\n\n // Turn off API access because we're loading a new tech that might load asynchronously\n this.isReady_ = false;\n\n // Grab tech-specific options from player options and add source and parent element to use.\n var techOptions = assign({\n 'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n 'source': source,\n 'playerId': this.id(),\n 'techId': `${this.id()}_${techName}_api`,\n 'textTracks': this.textTracks_,\n 'autoplay': this.options_.autoplay,\n 'preload': this.options_.preload,\n 'loop': this.options_.loop,\n 'muted': this.options_.muted,\n 'poster': this.poster(),\n 'language': this.language(),\n 'vtt.js': this.options_['vtt.js']\n }, this.options_[techName.toLowerCase()]);\n\n if (this.tag) {\n techOptions.tag = this.tag;\n }\n\n if (source) {\n this.currentType_ = source.type;\n if (source.src === this.cache_.src && this.cache_.currentTime > 0) {\n techOptions.startTime = this.cache_.currentTime;\n }\n\n this.cache_.src = source.src;\n }\n\n // Initialize tech instance\n let techComponent = Tech.getTech(techName);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!techComponent) {\n techComponent = Component.getComponent(techName);\n }\n this.tech_ = new techComponent(techOptions);\n\n // player.triggerReady is always async, so don't need this to be async\n this.tech_.ready(Fn.bind(this, this.handleTechReady_), true);\n\n textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_);\n\n // Listen to all HTML5-defined events and trigger them on the player\n this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);\n this.on(this.tech_, 'waiting', this.handleTechWaiting_);\n this.on(this.tech_, 'canplay', this.handleTechCanPlay_);\n this.on(this.tech_, 'canplaythrough', this.handleTechCanPlayThrough_);\n this.on(this.tech_, 'playing', this.handleTechPlaying_);\n this.on(this.tech_, 'ended', this.handleTechEnded_);\n this.on(this.tech_, 'seeking', this.handleTechSeeking_);\n this.on(this.tech_, 'seeked', this.handleTechSeeked_);\n this.on(this.tech_, 'play', this.handleTechPlay_);\n this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);\n this.on(this.tech_, 'pause', this.handleTechPause_);\n this.on(this.tech_, 'progress', this.handleTechProgress_);\n this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);\n this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);\n this.on(this.tech_, 'error', this.handleTechError_);\n this.on(this.tech_, 'suspend', this.handleTechSuspend_);\n this.on(this.tech_, 'abort', this.handleTechAbort_);\n this.on(this.tech_, 'emptied', this.handleTechEmptied_);\n this.on(this.tech_, 'stalled', this.handleTechStalled_);\n this.on(this.tech_, 'loadedmetadata', this.handleTechLoadedMetaData_);\n this.on(this.tech_, 'loadeddata', this.handleTechLoadedData_);\n this.on(this.tech_, 'timeupdate', this.handleTechTimeUpdate_);\n this.on(this.tech_, 'ratechange', this.handleTechRateChange_);\n this.on(this.tech_, 'volumechange', this.handleTechVolumeChange_);\n this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_);\n this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);\n this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);\n\n this.usingNativeControls(this.techGet_('controls'));\n\n if (this.controls() && !this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n\n // Add the tech element in the DOM if it was not already there\n // Make sure to not insert the original video element if using Html5\n if (this.tech_.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) {\n Dom.insertElFirst(this.tech_.el(), this.el());\n }\n\n // Get rid of the original video tag reference after the first tech is loaded\n if (this.tag) {\n this.tag.player = null;\n this.tag = null;\n }\n }\n\n /**\n * Unload playback technology\n *\n * @method unloadTech_\n * @private\n */\n unloadTech_() {\n // Save the current text tracks so that we can reuse the same text tracks with the next tech\n this.textTracks_ = this.textTracks();\n this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n\n this.isReady_ = false;\n\n this.tech_.dispose();\n\n this.tech_ = false;\n }\n\n /**\n * Return a reference to the current tech.\n * It will only return a reference to the tech if given an object with the\n * `IWillNotUseThisInPlugins` property on it. This is try and prevent misuse\n * of techs by plugins.\n *\n * @param {Object}\n * @return {Object} The Tech\n * @method tech\n */\n tech(safety) {\n if (safety && safety.IWillNotUseThisInPlugins) {\n return this.tech_;\n }\n let errorText = `\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n \\`IWillNotUseThisInPlugins\\` to the \\`tech\\` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n `;\n window.alert(errorText);\n throw new Error(errorText);\n }\n\n /**\n * Set up click and touch listeners for the playback element\n *\n * On desktops, a click on the video itself will toggle playback,\n * on a mobile device a click on the video toggles controls.\n * (toggling controls is done by toggling the user state between active and\n * inactive)\n * A tap can signal that a user has become active, or has become inactive\n * e.g. a quick tap on an iPhone movie should reveal the controls. Another\n * quick tap should hide them again (signaling the user is in an inactive\n * viewing state)\n * In addition to this, we still want the user to be considered inactive after\n * a few seconds of inactivity.\n * Note: the only part of iOS interaction we can't mimic with this setup\n * is a touch and hold on the video element counting as activity in order to\n * keep the controls showing, but that shouldn't be an issue. A touch and hold\n * on any controls will still keep the user active\n *\n * @private\n * @method addTechControlsListeners_\n */\n addTechControlsListeners_() {\n // Make sure to remove all the previous listeners in case we are called multiple times.\n this.removeTechControlsListeners_();\n\n // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\n // trigger mousedown/up.\n // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\n // Any touch events are set to block the mousedown event from happening\n this.on(this.tech_, 'mousedown', this.handleTechClick_);\n\n // If the controls were hidden we don't want that to change without a tap event\n // so we'll check if the controls were already showing before reporting user\n // activity\n this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.on(this.tech_, 'touchend', this.handleTechTouchEnd_);\n\n // The tap listener needs to come after the touchend listener because the tap\n // listener cancels out any reportedUserActivity when setting userActive(false)\n this.on(this.tech_, 'tap', this.handleTechTap_);\n }\n\n /**\n * Remove the listeners used for click and tap controls. This is needed for\n * toggling to controls disabled, where a tap/touch should do nothing.\n *\n * @method removeTechControlsListeners_\n * @private\n */\n removeTechControlsListeners_() {\n // We don't want to just use `this.off()` because there might be other needed\n // listeners added by techs that extend this.\n this.off(this.tech_, 'tap', this.handleTechTap_);\n this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);\n this.off(this.tech_, 'mousedown', this.handleTechClick_);\n }\n\n /**\n * Player waits for the tech to be ready\n *\n * @method handleTechReady_\n * @private\n */\n handleTechReady_() {\n this.triggerReady();\n\n // Keep the same volume as before\n if (this.cache_.volume) {\n this.techCall_('setVolume', this.cache_.volume);\n }\n\n // Look if the tech found a higher resolution poster while loading\n this.handleTechPosterChange_();\n\n // Update the duration if available\n this.handleTechDurationChange_();\n\n // Chrome and Safari both have issues with autoplay.\n // In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.\n // In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)\n // This fixes both issues. Need to wait for API, so it updates displays correctly\n if (this.src() && this.tag && this.options_.autoplay && this.paused()) {\n delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16.\n this.play();\n }\n }\n\n /**\n * Fired when the user agent begins looking for media data\n *\n * @private\n * @method handleTechLoadStart_\n */\n handleTechLoadStart_() {\n // TODO: Update to use `emptied` event instead. See #1277.\n\n this.removeClass('vjs-ended');\n\n // reset the error state\n this.error(null);\n\n // If it's already playing we want to trigger a firstplay event now.\n // The firstplay event relies on both the play and loadstart events\n // which can happen in any order for a new source\n if (!this.paused()) {\n this.trigger('loadstart');\n this.trigger('firstplay');\n } else {\n // reset the hasStarted state\n this.hasStarted(false);\n this.trigger('loadstart');\n }\n }\n\n /**\n * Add/remove the vjs-has-started class\n *\n * @param {Boolean} hasStarted The value of true adds the class the value of false remove the class\n * @return {Boolean} Boolean value if has started\n * @private\n * @method hasStarted\n */\n hasStarted(hasStarted) {\n if (hasStarted !== undefined) {\n // only update if this is a new value\n if (this.hasStarted_ !== hasStarted) {\n this.hasStarted_ = hasStarted;\n if (hasStarted) {\n this.addClass('vjs-has-started');\n // trigger the firstplay event if this newly has played\n this.trigger('firstplay');\n } else {\n this.removeClass('vjs-has-started');\n }\n }\n return this;\n }\n return !!this.hasStarted_;\n }\n\n /**\n * Fired whenever the media begins or resumes playback\n *\n * @private\n * @method handleTechPlay_\n */\n handleTechPlay_() {\n this.removeClass('vjs-ended');\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n\n // hide the poster when the user hits play\n // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play\n this.hasStarted(true);\n\n this.trigger('play');\n }\n\n /**\n * Fired whenever the media begins waiting\n *\n * @private\n * @method handleTechWaiting_\n */\n handleTechWaiting_() {\n this.addClass('vjs-waiting');\n this.trigger('waiting');\n this.one('timeupdate', () => this.removeClass('vjs-waiting'));\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlay_\n */\n handleTechCanPlay_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplay');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlayThrough_\n */\n handleTechCanPlayThrough_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplaythrough');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechPlaying_\n */\n handleTechPlaying_() {\n this.removeClass('vjs-waiting');\n this.trigger('playing');\n }\n\n /**\n * Fired whenever the player is jumping to a new time\n *\n * @private\n * @method handleTechSeeking_\n */\n handleTechSeeking_() {\n this.addClass('vjs-seeking');\n this.trigger('seeking');\n }\n\n /**\n * Fired when the player has finished jumping to a new time\n *\n * @private\n * @method handleTechSeeked_\n */\n handleTechSeeked_() {\n this.removeClass('vjs-seeking');\n this.trigger('seeked');\n }\n\n /**\n * Fired the first time a video is played\n * Not part of the HLS spec, and we're not sure if this is the best\n * implementation yet, so use sparingly. If you don't have a reason to\n * prevent playback, use `myPlayer.one('play');` instead.\n *\n * @private\n * @method handleTechFirstPlay_\n */\n handleTechFirstPlay_() {\n //If the first starttime attribute is specified\n //then we will start at the given offset in seconds\n if(this.options_.starttime){\n this.currentTime(this.options_.starttime);\n }\n\n this.addClass('vjs-has-started');\n this.trigger('firstplay');\n }\n\n /**\n * Fired whenever the media has been paused\n *\n * @private\n * @method handleTechPause_\n */\n handleTechPause_() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.trigger('pause');\n }\n\n /**\n * Fired while the user agent is downloading media data\n *\n * @private\n * @method handleTechProgress_\n */\n handleTechProgress_() {\n this.trigger('progress');\n }\n\n /**\n * Fired when the end of the media resource is reached (currentTime == duration)\n *\n * @private\n * @method handleTechEnded_\n */\n handleTechEnded_() {\n this.addClass('vjs-ended');\n if (this.options_.loop) {\n this.currentTime(0);\n this.play();\n } else if (!this.paused()) {\n this.pause();\n }\n\n this.trigger('ended');\n }\n\n /**\n * Fired when the duration of the media resource is first known or changed\n *\n * @private\n * @method handleTechDurationChange_\n */\n handleTechDurationChange_() {\n this.duration(this.techGet_('duration'));\n }\n\n /**\n * Handle a click on the media element to play/pause\n *\n * @param {Object=} event Event object\n * @private\n * @method handleTechClick_\n */\n handleTechClick_(event) {\n // We're using mousedown to detect clicks thanks to Flash, but mousedown\n // will also be triggered with right-clicks, so we need to prevent that\n if (event.button !== 0) return;\n\n // When controls are disabled a click should not toggle playback because\n // the click is considered a control\n if (this.controls()) {\n if (this.paused()) {\n this.play();\n } else {\n this.pause();\n }\n }\n }\n\n /**\n * Handle a tap on the media element. It will toggle the user\n * activity state, which hides and shows the controls.\n *\n * @private\n * @method handleTechTap_\n */\n handleTechTap_() {\n this.userActive(!this.userActive());\n }\n\n /**\n * Handle touch to start\n *\n * @private\n * @method handleTechTouchStart_\n */\n handleTechTouchStart_() {\n this.userWasActive = this.userActive();\n }\n\n /**\n * Handle touch to move\n *\n * @private\n * @method handleTechTouchMove_\n */\n handleTechTouchMove_() {\n if (this.userWasActive){\n this.reportUserActivity();\n }\n }\n\n /**\n * Handle touch to end\n *\n * @private\n * @method handleTechTouchEnd_\n */\n handleTechTouchEnd_(event) {\n // Stop the mouse events from also happening\n event.preventDefault();\n }\n\n /**\n * Fired when the player switches in or out of fullscreen mode\n *\n * @private\n * @method handleFullscreenChange_\n */\n handleFullscreenChange_() {\n if (this.isFullscreen()) {\n this.addClass('vjs-fullscreen');\n } else {\n this.removeClass('vjs-fullscreen');\n }\n }\n\n /**\n * native click events on the SWF aren't triggered on IE11, Win8.1RT\n * use stageclick events triggered from inside the SWF instead\n *\n * @private\n * @method handleStageClick_\n */\n handleStageClick_() {\n this.reportUserActivity();\n }\n\n /**\n * Handle Tech Fullscreen Change\n *\n * @private\n * @method handleTechFullscreenChange_\n */\n handleTechFullscreenChange_(event, data) {\n if (data) {\n this.isFullscreen(data.isFullscreen);\n }\n this.trigger('fullscreenchange');\n }\n\n /**\n * Fires when an error occurred during the loading of an audio/video\n *\n * @private\n * @method handleTechError_\n */\n handleTechError_() {\n let error = this.tech_.error();\n this.error(error && error.code);\n }\n\n /**\n * Fires when the browser is intentionally not getting media data\n *\n * @private\n * @method handleTechSuspend_\n */\n handleTechSuspend_() {\n this.trigger('suspend');\n }\n\n /**\n * Fires when the loading of an audio/video is aborted\n *\n * @private\n * @method handleTechAbort_\n */\n handleTechAbort_() {\n this.trigger('abort');\n }\n\n /**\n * Fires when the current playlist is empty\n *\n * @private\n * @method handleTechEmptied_\n */\n handleTechEmptied_() {\n this.trigger('emptied');\n }\n\n /**\n * Fires when the browser is trying to get media data, but data is not available\n *\n * @private\n * @method handleTechStalled_\n */\n handleTechStalled_() {\n this.trigger('stalled');\n }\n\n /**\n * Fires when the browser has loaded meta data for the audio/video\n *\n * @private\n * @method handleTechLoadedMetaData_\n */\n handleTechLoadedMetaData_() {\n this.trigger('loadedmetadata');\n }\n\n /**\n * Fires when the browser has loaded the current frame of the audio/video\n *\n * @private\n * @method handleTechLoadedData_\n */\n handleTechLoadedData_() {\n this.trigger('loadeddata');\n }\n\n /**\n * Fires when the current playback position has changed\n *\n * @private\n * @method handleTechTimeUpdate_\n */\n handleTechTimeUpdate_() {\n this.trigger('timeupdate');\n }\n\n /**\n * Fires when the playing speed of the audio/video is changed\n *\n * @private\n * @method handleTechRateChange_\n */\n handleTechRateChange_() {\n this.trigger('ratechange');\n }\n\n /**\n * Fires when the volume has been changed\n *\n * @private\n * @method handleTechVolumeChange_\n */\n handleTechVolumeChange_() {\n this.trigger('volumechange');\n }\n\n /**\n * Fires when the text track has been changed\n *\n * @private\n * @method handleTechTextTrackChange_\n */\n handleTechTextTrackChange_() {\n this.trigger('texttrackchange');\n }\n\n /**\n * Get object for cached values.\n *\n * @return {Object}\n * @method getCache\n */\n getCache() {\n return this.cache_;\n }\n\n /**\n * Pass values to the playback tech\n *\n * @param {String=} method Method\n * @param {Object=} arg Argument\n * @private\n * @method techCall_\n */\n techCall_(method, arg) {\n // If it's not ready yet, call method when it is\n if (this.tech_ && !this.tech_.isReady_) {\n this.tech_.ready(function(){\n this[method](arg);\n }, true);\n\n // Otherwise call method now\n } else {\n try {\n this.tech_[method](arg);\n } catch(e) {\n log(e);\n throw e;\n }\n }\n }\n\n /**\n * Get calls can't wait for the tech, and sometimes don't need to.\n *\n * @param {String} method Tech method\n * @return {Method}\n * @private\n * @method techGet_\n */\n techGet_(method) {\n if (this.tech_ && this.tech_.isReady_) {\n\n // Flash likes to die and reload when you hide or reposition it.\n // In these cases the object methods go away and we get errors.\n // When that happens we'll catch the errors and inform tech that it's not ready any more.\n try {\n return this.tech_[method]();\n } catch(e) {\n // When building additional tech libs, an expected method may not be defined yet\n if (this.tech_[method] === undefined) {\n log(`Video.js: ${method} method not defined for ${this.techName_} playback technology.`, e);\n } else {\n // When a method isn't available on the object it throws a TypeError\n if (e.name === 'TypeError') {\n log(`Video.js: ${method} unavailable on ${this.techName_} playback technology element.`, e);\n this.tech_.isReady_ = false;\n } else {\n log(e);\n }\n }\n throw e;\n }\n }\n\n return;\n }\n\n /**\n * start media playback\n * ```js\n * myPlayer.play();\n * ```\n *\n * @return {Player} self\n * @method play\n */\n play() {\n this.techCall_('play');\n return this;\n }\n\n /**\n * Pause the video playback\n * ```js\n * myPlayer.pause();\n * ```\n *\n * @return {Player} self\n * @method pause\n */\n pause() {\n this.techCall_('pause');\n return this;\n }\n\n /**\n * Check if the player is paused\n * ```js\n * var isPaused = myPlayer.paused();\n * var isPlaying = !myPlayer.paused();\n * ```\n *\n * @return {Boolean} false if the media is currently playing, or true otherwise\n * @method paused\n */\n paused() {\n // The initial state of paused should be true (in Safari it's actually false)\n return (this.techGet_('paused') === false) ? false : true;\n }\n\n /**\n * Returns whether or not the user is \"scrubbing\". Scrubbing is when the user\n * has clicked the progress bar handle and is dragging it along the progress bar.\n *\n * @param {Boolean} isScrubbing True/false the user is scrubbing\n * @return {Boolean} The scrubbing status when getting\n * @return {Object} The player when setting\n * @method scrubbing\n */\n scrubbing(isScrubbing) {\n if (isScrubbing !== undefined) {\n this.scrubbing_ = !!isScrubbing;\n\n if (isScrubbing) {\n this.addClass('vjs-scrubbing');\n } else {\n this.removeClass('vjs-scrubbing');\n }\n\n return this;\n }\n\n return this.scrubbing_;\n }\n\n /**\n * Get or set the current time (in seconds)\n * ```js\n * // get\n * var whereYouAt = myPlayer.currentTime();\n * // set\n * myPlayer.currentTime(120); // 2 minutes into the video\n * ```\n *\n * @param {Number|String=} seconds The time to seek to\n * @return {Number} The time in seconds, when not setting\n * @return {Player} self, when the current time is set\n * @method currentTime\n */\n currentTime(seconds) {\n if (seconds !== undefined) {\n\n this.techCall_('setCurrentTime', seconds);\n\n return this;\n }\n\n // cache last currentTime and return. default to 0 seconds\n //\n // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n // currentTime when scrubbing, but may not provide much performance benefit afterall.\n // Should be tested. Also something has to read the actual current time or the cache will\n // never get updated.\n return this.cache_.currentTime = (this.techGet_('currentTime') || 0);\n }\n\n /**\n * Get the length in time of the video in seconds\n * ```js\n * var lengthOfVideo = myPlayer.duration();\n * ```\n * **NOTE**: The video must have started loading before the duration can be\n * known, and in the case of Flash, may not be known until the video starts\n * playing.\n *\n * @param {Number} seconds Duration when setting\n * @return {Number} The duration of the video in seconds when getting\n * @method duration\n */\n duration(seconds) {\n if (seconds === undefined) {\n return this.cache_.duration || 0;\n }\n\n seconds = parseFloat(seconds) || 0;\n\n // Standardize on Inifity for signaling video is live\n if (seconds < 0) {\n seconds = Infinity;\n }\n\n if (seconds !== this.cache_.duration) {\n // Cache the last set value for optimized scrubbing (esp. Flash)\n this.cache_.duration = seconds;\n\n if (seconds === Infinity) {\n this.addClass('vjs-live');\n } else {\n this.removeClass('vjs-live');\n }\n\n this.trigger('durationchange');\n }\n\n return this;\n }\n\n /**\n * Calculates how much time is left.\n * ```js\n * var timeLeft = myPlayer.remainingTime();\n * ```\n * Not a native video element function, but useful\n *\n * @return {Number} The time remaining in seconds\n * @method remainingTime\n */\n remainingTime() {\n return this.duration() - this.currentTime();\n }\n\n // http://dev.w3.org/html5/spec/video.html#dom-media-buffered\n // Buffered returns a timerange object.\n // Kind of like an array of portions of the video that have been downloaded.\n\n /**\n * Get a TimeRange object with the times of the video that have been downloaded\n * If you just want the percent of the video that's been downloaded,\n * use bufferedPercent.\n * ```js\n * // Number of different ranges of time have been buffered. Usually 1.\n * numberOfRanges = bufferedTimeRange.length,\n * // Time in seconds when the first range starts. Usually 0.\n * firstRangeStart = bufferedTimeRange.start(0),\n * // Time in seconds when the first range ends\n * firstRangeEnd = bufferedTimeRange.end(0),\n * // Length in seconds of the first time range\n * firstRangeLength = firstRangeEnd - firstRangeStart;\n * ```\n *\n * @return {Object} A mock TimeRange object (following HTML spec)\n * @method buffered\n */\n buffered() {\n var buffered = this.techGet_('buffered');\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0,0);\n }\n\n return buffered;\n }\n\n /**\n * Get the percent (as a decimal) of the video that's been downloaded\n * ```js\n * var howMuchIsDownloaded = myPlayer.bufferedPercent();\n * ```\n * 0 means none, 1 means all.\n * (This method isn't in the HTML5 spec, but it's very convenient)\n *\n * @return {Number} A decimal between 0 and 1 representing the percent\n * @method bufferedPercent\n */\n bufferedPercent() {\n return bufferedPercent(this.buffered(), this.duration());\n }\n\n /**\n * Get the ending time of the last buffered time range\n * This is used in the progress bar to encapsulate all time ranges.\n *\n * @return {Number} The end of the last buffered time range\n * @method bufferedEnd\n */\n bufferedEnd() {\n var buffered = this.buffered(),\n duration = this.duration(),\n end = buffered.end(buffered.length-1);\n\n if (end > duration) {\n end = duration;\n }\n\n return end;\n }\n\n /**\n * Get or set the current volume of the media\n * ```js\n * // get\n * var howLoudIsIt = myPlayer.volume();\n * // set\n * myPlayer.volume(0.5); // Set volume to half\n * ```\n * 0 is off (muted), 1.0 is all the way up, 0.5 is half way.\n *\n * @param {Number} percentAsDecimal The new volume as a decimal percent\n * @return {Number} The current volume when getting\n * @return {Player} self when setting\n * @method volume\n */\n volume(percentAsDecimal) {\n let vol;\n\n if (percentAsDecimal !== undefined) {\n vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1\n this.cache_.volume = vol;\n this.techCall_('setVolume', vol);\n\n return this;\n }\n\n // Default to 1 when returning current volume.\n vol = parseFloat(this.techGet_('volume'));\n return (isNaN(vol)) ? 1 : vol;\n }\n\n\n /**\n * Get the current muted state, or turn mute on or off\n * ```js\n * // get\n * var isVolumeMuted = myPlayer.muted();\n * // set\n * myPlayer.muted(true); // mute the volume\n * ```\n *\n * @param {Boolean=} muted True to mute, false to unmute\n * @return {Boolean} True if mute is on, false if not when getting\n * @return {Player} self when setting mute\n * @method muted\n */\n muted(muted) {\n if (muted !== undefined) {\n this.techCall_('setMuted', muted);\n return this;\n }\n return this.techGet_('muted') || false; // Default to false\n }\n\n // Check if current tech can support native fullscreen\n // (e.g. with built in controls like iOS, so not our flash swf)\n /**\n * Check to see if fullscreen is supported\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return this.techGet_('supportsFullScreen') || false;\n }\n\n /**\n * Check if the player is in fullscreen mode\n * ```js\n * // get\n * var fullscreenOrNot = myPlayer.isFullscreen();\n * // set\n * myPlayer.isFullscreen(true); // tell the player it's in fullscreen\n * ```\n * NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n * property and instead document.fullscreenElement is used. But isFullscreen is\n * still a valuable property for internal player workings.\n *\n * @param {Boolean=} isFS Update the player's fullscreen state\n * @return {Boolean} true if fullscreen false if not when getting\n * @return {Player} self when setting\n * @method isFullscreen\n */\n isFullscreen(isFS) {\n if (isFS !== undefined) {\n this.isFullscreen_ = !!isFS;\n return this;\n }\n return !!this.isFullscreen_;\n }\n\n /**\n * Increase the size of the video to full screen\n * ```js\n * myPlayer.requestFullscreen();\n * ```\n * In some browsers, full screen is not supported natively, so it enters\n * \"full window mode\", where the video fills the browser window.\n * In browsers and devices that support native full screen, sometimes the\n * browser's default controls will be shown, and not the Video.js custom skin.\n * This includes most mobile devices (iOS, Android) and older versions of\n * Safari.\n *\n * @return {Player} self\n * @method requestFullscreen\n */\n requestFullscreen() {\n var fsApi = FullscreenApi;\n\n this.isFullscreen(true);\n\n if (fsApi.requestFullscreen) {\n // the browser supports going fullscreen at the element level so we can\n // take the controls fullscreen as well as the video\n\n // Trigger fullscreenchange event after change\n // We have to specifically add this each time, and remove\n // when canceling fullscreen. Otherwise if there's multiple\n // players on a page, they would all be reacting to the same fullscreen\n // events\n Events.on(document, fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e){\n this.isFullscreen(document[fsApi.fullscreenElement]);\n\n // If cancelling fullscreen, remove event listener.\n if (this.isFullscreen() === false) {\n Events.off(document, fsApi.fullscreenchange, documentFullscreenChange);\n }\n\n this.trigger('fullscreenchange');\n }));\n\n this.el_[fsApi.requestFullscreen]();\n\n } else if (this.tech_.supportsFullScreen()) {\n // we can't take the video.js controls fullscreen but we can go fullscreen\n // with native controls\n this.techCall_('enterFullScreen');\n } else {\n // fullscreen isn't supported so we'll just stretch the video element to\n // fill the viewport\n this.enterFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * Return the video to its normal size after having been in full screen mode\n * ```js\n * myPlayer.exitFullscreen();\n * ```\n *\n * @return {Player} self\n * @method exitFullscreen\n */\n exitFullscreen() {\n var fsApi = FullscreenApi;\n this.isFullscreen(false);\n\n // Check for browser element fullscreen support\n if (fsApi.requestFullscreen) {\n document[fsApi.exitFullscreen]();\n } else if (this.tech_.supportsFullScreen()) {\n this.techCall_('exitFullScreen');\n } else {\n this.exitFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.\n *\n * @method enterFullWindow\n */\n enterFullWindow() {\n this.isFullWindow = true;\n\n // Storing original doc overflow value to return to when fullscreen is off\n this.docOrigOverflow = document.documentElement.style.overflow;\n\n // Add listener for esc key to exit fullscreen\n Events.on(document, 'keydown', Fn.bind(this, this.fullWindowOnEscKey));\n\n // Hide any scroll bars\n document.documentElement.style.overflow = 'hidden';\n\n // Apply fullscreen styles\n Dom.addElClass(document.body, 'vjs-full-window');\n\n this.trigger('enterFullWindow');\n }\n\n /**\n * Check for call to either exit full window or full screen on ESC key\n *\n * @param {String} event Event to check for key press\n * @method fullWindowOnEscKey\n */\n fullWindowOnEscKey(event) {\n if (event.keyCode === 27) {\n if (this.isFullscreen() === true) {\n this.exitFullscreen();\n } else {\n this.exitFullWindow();\n }\n }\n }\n\n /**\n * Exit full window\n *\n * @method exitFullWindow\n */\n exitFullWindow() {\n this.isFullWindow = false;\n Events.off(document, 'keydown', this.fullWindowOnEscKey);\n\n // Unhide scroll bars.\n document.documentElement.style.overflow = this.docOrigOverflow;\n\n // Remove fullscreen styles\n Dom.removeElClass(document.body, 'vjs-full-window');\n\n // Resize the box, controller, and poster to original sizes\n // this.positionAll();\n this.trigger('exitFullWindow');\n }\n\n /**\n * Check whether the player can play a given mimetype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n * @method canPlayType\n */\n canPlayType(type) {\n let can;\n\n // Loop through each playback technology in the options order\n for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n let techName = toTitleCase(j[i]);\n let tech = Tech.getTech(techName);\n\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!tech) {\n tech = Component.getComponent(techName);\n }\n\n // Check if the current tech is defined before continuing\n if (!tech) {\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n continue;\n }\n\n // Check if the browser supports this technology\n if (tech.isSupported()) {\n can = tech.canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n }\n\n return '';\n }\n\n /**\n * Select source based on tech-order or source-order\n * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n * defaults to tech-order selection\n *\n * @param {Array} sources The sources for a media asset\n * @return {Object|Boolean} Object of source and tech order, otherwise false\n * @method selectSource\n */\n selectSource(sources) {\n // Get only the techs specified in `techOrder` that exist and are supported by the\n // current platform\n let techs =\n this.options_.techOrder\n .map(toTitleCase)\n .map((techName) => {\n // `Component.getComponent(...)` is for support of old behavior of techs\n // being registered as components.\n // Remove once that deprecated behavior is removed.\n return [techName, Tech.getTech(techName) || Component.getComponent(techName)];\n })\n .filter(([techName, tech]) => {\n // Check if the current tech is defined before continuing\n if (tech) {\n // Check if the browser supports this technology\n return tech.isSupported();\n }\n\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n return false;\n });\n\n // Iterate over each `innerArray` element once per `outerArray` element and execute\n // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n // that value.\n let findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n let found;\n\n outerArray.some((outerChoice) => {\n return innerArray.some((innerChoice) => {\n found = tester(outerChoice, innerChoice);\n\n if (found) {\n return true;\n }\n });\n });\n\n return found;\n };\n\n let foundSourceAndTech;\n let flip = (fn) => (a, b) => fn(b, a);\n let finder = ([techName, tech], source) => {\n if (tech.canPlaySource(source)) {\n return {source: source, tech: techName};\n }\n };\n\n // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n // to select from them based on their priority.\n if (this.options_.sourceOrder) {\n // Source-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n } else {\n // Tech-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n }\n\n return foundSourceAndTech || false;\n }\n\n /**\n * The source function updates the video source\n * There are three types of variables you can pass as the argument.\n * **URL String**: A URL to the the video file. Use this method if you are sure\n * the current playback technology (HTML5/Flash) can support the source you\n * provide. Currently only MP4 files can be used in both HTML5 and Flash.\n * ```js\n * myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n * ```\n * **Source Object (or element):* * A javascript object containing information\n * about the source file. Use this method if you want the player to determine if\n * it can support the file using the type information.\n * ```js\n * myPlayer.src({ type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" });\n * ```\n * **Array of Source Objects:* * To provide multiple versions of the source so\n * that it can be played using HTML5 across browsers you can use an array of\n * source objects. Video.js will detect which version is supported and load that\n * file.\n * ```js\n * myPlayer.src([\n * { type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" },\n * { type: \"video/webm\", src: \"http://www.example.com/path/to/video.webm\" },\n * { type: \"video/ogg\", src: \"http://www.example.com/path/to/video.ogv\" }\n * ]);\n * ```\n *\n * @param {String|Object|Array=} source The source URL, object, or array of sources\n * @return {String} The current video source when getting\n * @return {String} The player when setting\n * @method src\n */\n src(source) {\n if (source === undefined) {\n return this.techGet_('src');\n }\n\n let currentTech = Tech.getTech(this.techName_);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!currentTech) {\n currentTech = Component.getComponent(this.techName_);\n }\n\n // case: Array of source objects to choose from and pick the best to play\n if (Array.isArray(source)) {\n this.sourceList_(source);\n\n // case: URL String (http://myvideo...)\n } else if (typeof source === 'string') {\n // create a source object from the string\n this.src({ src: source });\n\n // case: Source object { src: '', type: '' ... }\n } else if (source instanceof Object) {\n // check if the source has a type and the loaded tech cannot play the source\n // if there's no type we'll just try the current tech\n if (source.type && !currentTech.canPlaySource(source)) {\n // create a source list with the current source and send through\n // the tech loop to check for a compatible technology\n this.sourceList_([source]);\n } else {\n this.cache_.src = source.src;\n this.currentType_ = source.type || '';\n\n // wait until the tech is ready to set the source\n this.ready(function(){\n\n // The setSource tech method was added with source handlers\n // so older techs won't support it\n // We need to check the direct prototype for the case where subclasses\n // of the tech do not support source handlers\n if (currentTech.prototype.hasOwnProperty('setSource')) {\n this.techCall_('setSource', source);\n } else {\n this.techCall_('src', source.src);\n }\n\n if (this.options_.preload === 'auto') {\n this.load();\n }\n\n if (this.options_.autoplay) {\n this.play();\n }\n\n // Set the source synchronously if possible (#2326)\n }, true);\n }\n }\n\n return this;\n }\n\n /**\n * Handle an array of source objects\n *\n * @param {Array} sources Array of source objects\n * @private\n * @method sourceList_\n */\n sourceList_(sources) {\n var sourceTech = this.selectSource(sources);\n\n if (sourceTech) {\n if (sourceTech.tech === this.techName_) {\n // if this technology is already loaded, set the source\n this.src(sourceTech.source);\n } else {\n // load this technology with the chosen source\n this.loadTech_(sourceTech.tech, sourceTech.source);\n }\n } else {\n // We need to wrap this in a timeout to give folks a chance to add error event handlers\n this.setTimeout( function() {\n this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) });\n }, 0);\n\n // we could not find an appropriate tech, but let's still notify the delegate that this is it\n // this needs a better comment about why this is needed\n this.triggerReady();\n }\n }\n\n /**\n * Begin loading the src data.\n *\n * @return {Player} Returns the player\n * @method load\n */\n load() {\n this.techCall_('load');\n return this;\n }\n\n /**\n * Reset the player. Loads the first tech in the techOrder,\n * and calls `reset` on the tech`.\n *\n * @return {Player} Returns the player\n * @method reset\n */\n reset() {\n this.loadTech_(toTitleCase(this.options_.techOrder[0]), null);\n this.techCall_('reset');\n return this;\n }\n\n /**\n * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n * Can be used in conjuction with `currentType` to assist in rebuilding the current source object.\n *\n * @return {String} The current source\n * @method currentSrc\n */\n currentSrc() {\n return this.techGet_('currentSrc') || this.cache_.src || '';\n }\n\n /**\n * Get the current source type e.g. video/mp4\n * This can allow you rebuild the current source object so that you could load the same\n * source and tech later\n *\n * @return {String} The source MIME type\n * @method currentType\n */\n currentType() {\n return this.currentType_ || '';\n }\n\n /**\n * Get or set the preload attribute\n *\n * @param {Boolean} value Boolean to determine if preload should be used\n * @return {String} The preload attribute value when getting\n * @return {Player} Returns the player when setting\n * @method preload\n */\n preload(value) {\n if (value !== undefined) {\n this.techCall_('setPreload', value);\n this.options_.preload = value;\n return this;\n }\n return this.techGet_('preload');\n }\n\n /**\n * Get or set the autoplay attribute.\n *\n * @param {Boolean} value Boolean to determine if video should autoplay\n * @return {String} The autoplay attribute value when getting\n * @return {Player} Returns the player when setting\n * @method autoplay\n */\n autoplay(value) {\n if (value !== undefined) {\n this.techCall_('setAutoplay', value);\n this.options_.autoplay = value;\n return this;\n }\n return this.techGet_('autoplay', value);\n }\n\n /**\n * Get or set the loop attribute on the video element.\n *\n * @param {Boolean} value Boolean to determine if video should loop\n * @return {String} The loop attribute value when getting\n * @return {Player} Returns the player when setting\n * @method loop\n */\n loop(value) {\n if (value !== undefined) {\n this.techCall_('setLoop', value);\n this.options_['loop'] = value;\n return this;\n }\n return this.techGet_('loop');\n }\n\n /**\n * Get or set the poster image source url\n *\n * ##### EXAMPLE:\n * ```js\n * // get\n * var currentPoster = myPlayer.poster();\n * // set\n * myPlayer.poster('http://example.com/myImage.jpg');\n * ```\n *\n * @param {String=} src Poster image source URL\n * @return {String} poster URL when getting\n * @return {Player} self when setting\n * @method poster\n */\n poster(src) {\n if (src === undefined) {\n return this.poster_;\n }\n\n // The correct way to remove a poster is to set as an empty string\n // other falsey values will throw errors\n if (!src) {\n src = '';\n }\n\n // update the internal poster variable\n this.poster_ = src;\n\n // update the tech's poster\n this.techCall_('setPoster', src);\n\n // alert components that the poster has been set\n this.trigger('posterchange');\n\n return this;\n }\n\n /**\n * Some techs (e.g. YouTube) can provide a poster source in an\n * asynchronous way. We want the poster component to use this\n * poster source so that it covers up the tech's controls.\n * (YouTube's play button). However we only want to use this\n * soruce if the player user hasn't set a poster through\n * the normal APIs.\n *\n * @private\n * @method handleTechPosterChange_\n */\n handleTechPosterChange_() {\n if (!this.poster_ && this.tech_ && this.tech_.poster) {\n this.poster_ = this.tech_.poster() || '';\n\n // Let components know the poster has changed\n this.trigger('posterchange');\n }\n }\n\n /**\n * Get or set whether or not the controls are showing.\n *\n * @param {Boolean} bool Set controls to showing or not\n * @return {Boolean} Controls are showing\n * @method controls\n */\n controls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.controls_ !== bool) {\n this.controls_ = bool;\n\n if (this.usingNativeControls()) {\n this.techCall_('setControls', bool);\n }\n\n if (bool) {\n this.removeClass('vjs-controls-disabled');\n this.addClass('vjs-controls-enabled');\n this.trigger('controlsenabled');\n\n if (!this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n } else {\n this.removeClass('vjs-controls-enabled');\n this.addClass('vjs-controls-disabled');\n this.trigger('controlsdisabled');\n\n if (!this.usingNativeControls()) {\n this.removeTechControlsListeners_();\n }\n }\n }\n return this;\n }\n return !!this.controls_;\n }\n\n /**\n * Toggle native controls on/off. Native controls are the controls built into\n * devices (e.g. default iPhone controls), Flash, or other techs\n * (e.g. Vimeo Controls)\n * **This should only be set by the current tech, because only the tech knows\n * if it can support native controls**\n *\n * @param {Boolean} bool True signals that native controls are on\n * @return {Player} Returns the player\n * @private\n * @method usingNativeControls\n */\n usingNativeControls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.usingNativeControls_ !== bool) {\n this.usingNativeControls_ = bool;\n if (bool) {\n this.addClass('vjs-using-native-controls');\n\n /**\n * player is using the native device controls\n *\n * @event usingnativecontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingnativecontrols');\n } else {\n this.removeClass('vjs-using-native-controls');\n\n /**\n * player is using the custom HTML controls\n *\n * @event usingcustomcontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingcustomcontrols');\n }\n }\n return this;\n }\n return !!this.usingNativeControls_;\n }\n\n /**\n * Set or get the current MediaError\n *\n * @param {*} err A MediaError or a String/Number to be turned into a MediaError\n * @return {MediaError|null} when getting\n * @return {Player} when setting\n * @method error\n */\n error(err) {\n if (err === undefined) {\n return this.error_ || null;\n }\n\n // restoring to default\n if (err === null) {\n this.error_ = err;\n this.removeClass('vjs-error');\n this.errorDisplay.close();\n return this;\n }\n\n // error instance\n if (err instanceof MediaError) {\n this.error_ = err;\n } else {\n this.error_ = new MediaError(err);\n }\n\n // add the vjs-error classname to the player\n this.addClass('vjs-error');\n\n // log the name of the error type and any message\n // ie8 just logs \"[object object]\" if you just log the error object\n log.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`, this.error_.message, this.error_);\n\n // fire an error event on the player\n this.trigger('error');\n\n return this;\n }\n\n /**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method ended\n */\n ended() { return this.techGet_('ended'); }\n\n /**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method seeking\n */\n seeking() { return this.techGet_('seeking'); }\n\n /**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method seekable\n */\n seekable() { return this.techGet_('seekable'); }\n\n /**\n * Report user activity\n *\n * @param {Object} event Event object\n * @method reportUserActivity\n */\n reportUserActivity(event) {\n this.userActivity_ = true;\n }\n\n /**\n * Get/set if user is active\n *\n * @param {Boolean} bool Value when setting\n * @return {Boolean} Value if user is active user when getting\n * @method userActive\n */\n userActive(bool) {\n if (bool !== undefined) {\n bool = !!bool;\n if (bool !== this.userActive_) {\n this.userActive_ = bool;\n if (bool) {\n // If the user was inactive and is now active we want to reset the\n // inactivity timer\n this.userActivity_ = true;\n this.removeClass('vjs-user-inactive');\n this.addClass('vjs-user-active');\n this.trigger('useractive');\n } else {\n // We're switching the state to inactive manually, so erase any other\n // activity\n this.userActivity_ = false;\n\n // Chrome/Safari/IE have bugs where when you change the cursor it can\n // trigger a mousemove event. This causes an issue when you're hiding\n // the cursor when the user is inactive, and a mousemove signals user\n // activity. Making it impossible to go into inactive mode. Specifically\n // this happens in fullscreen when we really need to hide the cursor.\n //\n // When this gets resolved in ALL browsers it can be removed\n // https://code.google.com/p/chromium/issues/detail?id=103041\n if(this.tech_) {\n this.tech_.one('mousemove', function(e){\n e.stopPropagation();\n e.preventDefault();\n });\n }\n\n this.removeClass('vjs-user-active');\n this.addClass('vjs-user-inactive');\n this.trigger('userinactive');\n }\n }\n return this;\n }\n return this.userActive_;\n }\n\n /**\n * Listen for user activity based on timeout value\n *\n * @private\n * @method listenForUserActivity_\n */\n listenForUserActivity_() {\n let mouseInProgress, lastMoveX, lastMoveY;\n\n let handleActivity = Fn.bind(this, this.reportUserActivity);\n\n let handleMouseMove = function(e) {\n // #1068 - Prevent mousemove spamming\n // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n if(e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n lastMoveX = e.screenX;\n lastMoveY = e.screenY;\n handleActivity();\n }\n };\n\n let handleMouseDown = function() {\n handleActivity();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(mouseInProgress);\n // Setting userActivity=true now and setting the interval to the same time\n // as the activityCheck interval (250) should ensure we never miss the\n // next activityCheck\n mouseInProgress = this.setInterval(handleActivity, 250);\n };\n\n let handleMouseUp = function(event) {\n handleActivity();\n // Stop the interval that maintains activity if the mouse/touch is down\n this.clearInterval(mouseInProgress);\n };\n\n // Any mouse movement will be considered user activity\n this.on('mousedown', handleMouseDown);\n this.on('mousemove', handleMouseMove);\n this.on('mouseup', handleMouseUp);\n\n // Listen for keyboard navigation\n // Shouldn't need to use inProgress interval because of key repeat\n this.on('keydown', handleActivity);\n this.on('keyup', handleActivity);\n\n // Run an interval every 250 milliseconds instead of stuffing everything into\n // the mousemove/touchmove function itself, to prevent performance degradation.\n // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n // then gets picked up by this loop\n // http://ejohn.org/blog/learning-from-twitter/\n let inactivityTimeout;\n let activityCheck = this.setInterval(function() {\n // Check to see if mouse/touch activity has happened\n if (this.userActivity_) {\n // Reset the activity tracker\n this.userActivity_ = false;\n\n // If the user state was inactive, set the state to active\n this.userActive(true);\n\n // Clear any existing inactivity timeout to start the timer over\n this.clearTimeout(inactivityTimeout);\n\n var timeout = this.options_['inactivityTimeout'];\n if (timeout > 0) {\n // In milliseconds, if no more activity has occurred the\n // user will be considered inactive\n inactivityTimeout = this.setTimeout(function () {\n // Protect against the case where the inactivityTimeout can trigger just\n // before the next user activity is picked up by the activityCheck loop\n // causing a flicker\n if (!this.userActivity_) {\n this.userActive(false);\n }\n }, timeout);\n }\n }\n }, 250);\n }\n\n /**\n * Gets or sets the current playback rate. A playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed\n * playback, for instance.\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n *\n * @param {Number} rate New playback rate to set.\n * @return {Number} Returns the new playback rate when setting\n * @return {Number} Returns the current playback rate when getting\n * @method playbackRate\n */\n playbackRate(rate) {\n if (rate !== undefined) {\n this.techCall_('setPlaybackRate', rate);\n return this;\n }\n\n if (this.tech_ && this.tech_['featuresPlaybackRate']) {\n return this.techGet_('playbackRate');\n } else {\n return 1.0;\n }\n }\n\n /**\n * Gets or sets the audio flag\n *\n * @param {Boolean} bool True signals that this is an audio player.\n * @return {Boolean} Returns true if player is audio, false if not when getting\n * @return {Player} Returns the player if setting\n * @private\n * @method isAudio\n */\n isAudio(bool) {\n if (bool !== undefined) {\n this.isAudio_ = !!bool;\n return this;\n }\n\n return !!this.isAudio_;\n }\n\n /**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n * The element has not yet been initialised. All attributes are in\n * their initial states.\n * - NETWORK_IDLE (numeric value 1)\n * The element's resource selection algorithm is active and has\n * selected a resource, but it is not actually using the network at\n * this time.\n * - NETWORK_LOADING (numeric value 2)\n * The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n * The element's resource selection algorithm is active, but it has\n * not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {Number} the current network activity state\n * @method networkState\n */\n networkState() {\n return this.techGet_('networkState');\n }\n\n /**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n * No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n * Enough of the resource has been obtained that the duration of the\n * resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n * Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n * Data for the immediate current playback position is available, as\n * well as enough data for the user agent to advance the current\n * playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n * The user agent estimates that enough data is available for\n * playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {Number} the current playback rendering state\n * @method readyState\n */\n readyState() {\n return this.techGet_('readyState');\n }\n\n /**\n * Text tracks are tracks of timed text events.\n * Captions - text displayed over the video for the hearing impaired\n * Subtitles - text displayed over the video for those who don't understand language in the video\n * Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video\n * Descriptions - audio descriptions that are read back to the user by a screen reading device\n */\n\n /**\n * Get an array of associated text tracks. captions, subtitles, chapters, descriptions\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {Array} Array of track objects\n * @method textTracks\n */\n textTracks() {\n // cannot use techGet_ directly because it checks to see whether the tech is ready.\n // Flash is unlikely to be ready in time but textTracks should still work.\n return this.tech_ && this.tech_['textTracks']();\n }\n\n /**\n * Get an array of remote text tracks\n *\n * @return {Array}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n return this.tech_ && this.tech_['remoteTextTracks']();\n }\n\n /**\n * Get an array of remote html track elements\n *\n * @return {HTMLTrackElement[]}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n return this.tech_ && this.tech_['remoteTextTrackEls']();\n }\n\n /**\n * Add a text track\n * In addition to the W3C settings we allow adding additional info through options.\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n *\n * @param {String} kind Captions, subtitles, chapters, descriptions, or metadata\n * @param {String=} label Optional label\n * @param {String=} language Optional language\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n return this.tech_ && this.tech_['addTextTrack'](kind, label, language);\n }\n\n /**\n * Add a remote text track\n *\n * @param {Object} options Options for remote text track\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n return this.tech_ && this.tech_['addRemoteTextTrack'](options);\n }\n\n /**\n * Remove a remote text track\n *\n * @param {Object} track Remote text track to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.tech_ && this.tech_['removeRemoteTextTrack'](track);\n }\n\n /**\n * Get video width\n *\n * @return {Number} Video width\n * @method videoWidth\n */\n videoWidth() {\n return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n }\n\n /**\n * Get video height\n *\n * @return {Number} Video height\n * @method videoHeight\n */\n videoHeight() {\n return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n }\n\n // Methods to add support for\n // initialTime: function(){ return this.techCall_('initialTime'); },\n // startOffsetTime: function(){ return this.techCall_('startOffsetTime'); },\n // played: function(){ return this.techCall_('played'); },\n // videoTracks: function(){ return this.techCall_('videoTracks'); },\n // audioTracks: function(){ return this.techCall_('audioTracks'); },\n // defaultPlaybackRate: function(){ return this.techCall_('defaultPlaybackRate'); },\n // defaultMuted: function(){ return this.techCall_('defaultMuted'); }\n\n /**\n * The player's language code\n * NOTE: The language should be set in the player options if you want the\n * the controls to be built with a specific language. Changing the lanugage\n * later will not update controls text.\n *\n * @param {String} code The locale string\n * @return {String} The locale string when getting\n * @return {Player} self when setting\n * @method language\n */\n language(code) {\n if (code === undefined) {\n return this.language_;\n }\n\n this.language_ = (''+code).toLowerCase();\n return this;\n }\n\n /**\n * Get the player's language dictionary\n * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n * Languages specified directly in the player options have precedence\n *\n * @return {Array} Array of languages\n * @method languages\n */\n languages() {\n return mergeOptions(Player.prototype.options_.languages, this.languages_);\n }\n\n /**\n * Converts track info to JSON\n *\n * @return {Object} JSON object of options\n * @method toJSON\n */\n toJSON() {\n let options = mergeOptions(this.options_);\n let tracks = options.tracks;\n\n options.tracks = [];\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // deep merge tracks and null out player so no circular references\n track = mergeOptions(track);\n track.player = undefined;\n options.tracks[i] = track;\n }\n\n return options;\n }\n\n /**\n * Creates a simple modal dialog (an instance of the `ModalDialog`\n * component) that immediately overlays the player with arbitrary\n * content and removes itself when closed.\n *\n * @param {String|Function|Element|Array|Null} content\n * Same as `ModalDialog#content`'s param of the same name.\n *\n * The most straight-forward usage is to provide a string or DOM\n * element.\n *\n * @param {Object} [options]\n * Extra options which will be passed on to the `ModalDialog`.\n *\n * @return {ModalDialog}\n */\n createModal(content, options) {\n let player = this;\n\n options = options || {};\n options.content = content || '';\n\n let modal = new ModalDialog(player, options);\n\n player.addChild(modal);\n modal.on('dispose', function() {\n player.removeChild(modal);\n });\n\n return modal.open();\n }\n\n /**\n * Gets tag settings\n *\n * @param {Element} tag The player tag\n * @return {Array} An array of sources and track objects\n * @static\n * @method getTagSettings\n */\n static getTagSettings(tag) {\n let baseOptions = {\n 'sources': [],\n 'tracks': []\n };\n\n const tagOptions = Dom.getElAttributes(tag);\n const dataSetup = tagOptions['data-setup'];\n\n // Check if data-setup attr exists.\n if (dataSetup !== null){\n // Parse options JSON\n // If empty string, make it a parsable json object.\n const [err, data] = safeParseTuple(dataSetup || '{}');\n if (err) {\n log.error(err);\n }\n assign(tagOptions, data);\n }\n\n assign(baseOptions, tagOptions);\n\n // Get tag children settings\n if (tag.hasChildNodes()) {\n const children = tag.childNodes;\n\n for (let i=0, j=children.length; i 1) {\n this.show();\n }\n }\n\n /**\n * Create popup - Override with specific functionality for component\n *\n * @return {Popup} The constructed popup\n * @method createPopup\n */\n createPopup() {}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n}\n\nComponent.registerComponent('PopupButton', PopupButton);\nexport default PopupButton;\n","/**\n * @file popup.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Popup component is used to build pop up controls.\n *\n * @extends Component\n * @class Popup\n */\nclass Popup extends Component {\n\n /**\n * Add a popup item to the popup\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Popup Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n}\n\nComponent.registerComponent('Popup', Popup);\nexport default Popup;\n","/**\n * @file poster-image.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component.js';\nimport * as Fn from './utils/fn.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\n\n/**\n * The component that handles showing the poster image.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PosterImage\n */\nclass PosterImage extends ClickableComponent {\n\n constructor(player, options){\n super(player, options);\n\n this.update();\n player.on('posterchange', Fn.bind(this, this.update));\n }\n\n /**\n * Clean up the poster image\n *\n * @method dispose\n */\n dispose() {\n this.player().off('posterchange', this.update);\n super.dispose();\n }\n\n /**\n * Create the poster's image element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = Dom.createEl('div', {\n className: 'vjs-poster',\n\n // Don't want poster to be tabbable.\n tabIndex: -1\n });\n\n // To ensure the poster image resizes while maintaining its original aspect\n // ratio, use a div with `background-size` when available. For browsers that\n // do not support `background-size` (e.g. IE8), fall back on using a regular\n // img element.\n if (!browser.BACKGROUND_SIZE_SUPPORTED) {\n this.fallbackImg_ = Dom.createEl('img');\n el.appendChild(this.fallbackImg_);\n }\n\n return el;\n }\n\n /**\n * Event handler for updates to the player's poster source\n *\n * @method update\n */\n update() {\n let url = this.player().poster();\n\n this.setSrc(url);\n\n // If there's no poster source we should display:none on this component\n // so it's not still clickable or right-clickable\n if (url) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Set the poster source depending on the display method\n *\n * @param {String} url The URL to the poster source\n * @method setSrc\n */\n setSrc(url) {\n if (this.fallbackImg_) {\n this.fallbackImg_.src = url;\n } else {\n let backgroundImage = '';\n // Any falsey values should stay as an empty string, otherwise\n // this will throw an extra error\n if (url) {\n backgroundImage = `url(\"${url}\")`;\n }\n\n this.el_.style.backgroundImage = backgroundImage;\n }\n }\n\n /**\n * Event handler for clicks on the poster image\n *\n * @method handleClick\n */\n handleClick() {\n // We don't want a click to trigger playback when controls are disabled\n // but CSS should be hiding the poster to prevent that from happening\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n}\n\nComponent.registerComponent('PosterImage', PosterImage);\nexport default PosterImage;\n","/**\n * @file setup.js\n *\n * Functions for automatically setting up a player\n * based on the data-setup attribute of the video tag\n */\nimport * as Events from './utils/events.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nlet _windowLoaded = false;\nlet videojs;\n\n\n// Automatically set up any tags that have a data-setup attribute\nvar autoSetup = function(){\n // One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack*\n // var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n // var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n // var mediaEls = vids.concat(audios);\n\n // Because IE8 doesn't support calling slice on a node list, we need to loop through each list of elements\n // to build up a new, combined list of elements.\n var vids = document.getElementsByTagName('video');\n var audios = document.getElementsByTagName('audio');\n var mediaEls = [];\n if (vids && vids.length > 0) {\n for(let i=0, e=vids.length; i 0) {\n for(let i=0, e=audios.length; i 0) {\n\n for (let i=0, e=mediaEls.length; i seekable.start(0) ? time : seekable.start(0);\n time = time < seekable.end(seekable.length - 1) ? time : seekable.end(seekable.length - 1);\n\n this.lastSeekTarget_ = time;\n this.trigger('seeking');\n this.el_.vjs_setProperty('currentTime', time);\n super.setCurrentTime();\n }\n }\n\n /**\n * Get current time\n *\n * @param {Number=} time Current time of video\n * @return {Number} Current time\n * @method currentTime\n */\n currentTime(time) {\n // when seeking make the reported time keep up with the requested time\n // by reading the time we're seeking to\n if (this.seeking()) {\n return this.lastSeekTarget_ || 0;\n }\n return this.el_.vjs_getProperty('currentTime');\n }\n\n /**\n * Get current source\n *\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.vjs_getProperty('currentSrc');\n }\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load() {\n this.el_.vjs_load();\n }\n\n /**\n * Get poster\n *\n * @method poster\n */\n poster() {\n this.el_.vjs_getProperty('poster');\n }\n\n /**\n * Poster images are not handled by the Flash tech so make this a no-op\n *\n * @method setPoster\n */\n setPoster() {}\n\n /**\n * Determine if can seek in media\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() {\n const duration = this.duration();\n if (duration === 0) {\n return createTimeRange();\n }\n return createTimeRange(0, duration);\n }\n\n /**\n * Get buffered time range\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() {\n let ranges = this.el_.vjs_getProperty('buffered');\n if (ranges.length === 0) {\n return createTimeRange();\n }\n return createTimeRange(ranges[0][0], ranges[0][1]);\n }\n\n /**\n * Get fullscreen support -\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return false; // Flash does not allow fullscreen through javascript\n }\n\n /**\n * Request to enter fullscreen\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method enterFullScreen\n */\n enterFullScreen() {\n return false;\n }\n\n}\n\n\n// Create setters and getters for attributes\nconst _api = Flash.prototype;\nconst _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(',');\nconst _readOnly = 'networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(',');\n\nfunction _createSetter(attr){\n var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);\n _api['set'+attrUpper] = function(val){ return this.el_.vjs_setProperty(attr, val); };\n}\nfunction _createGetter(attr) {\n _api[attr] = function(){ return this.el_.vjs_getProperty(attr); };\n}\n\n// Create getter and setters for all read/write attributes\nfor (let i = 0; i < _readWrite.length; i++) {\n _createGetter(_readWrite[i]);\n _createSetter(_readWrite[i]);\n}\n\n// Create getters for read-only attributes\nfor (let i = 0; i < _readOnly.length; i++) {\n _createGetter(_readOnly[i]);\n}\n\n/* Flash Support Testing -------------------------------------------------------- */\n\nFlash.isSupported = function(){\n return Flash.version()[0] >= 10;\n // return swfobject.hasFlashPlayerVersion('10');\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Flash);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler = {};\n\n/**\n * Check if Flash can play the given videotype\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canPlayType = function(type){\n if (type in Flash.formats) {\n return 'maybe';\n }\n\n return '';\n};\n\n/*\n * Check Flash can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canHandleSource = function(source){\n var type;\n\n function guessMimeType(src) {\n var ext = Url.getFileExtension(src);\n if (ext) {\n return `video/${ext}`;\n }\n return '';\n }\n\n if (!source.type) {\n type = guessMimeType(source.src);\n } else {\n // Strip code information from the type because we don't get that specific\n type = source.type.replace(/;.*/, '').toLowerCase();\n }\n\n return Flash.nativeSourceHandler.canPlayType(type);\n};\n\n/*\n * Pass the source to the flash object\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n * Clean up the source handler when disposing the player or switching sources..\n * (no cleanup is needed when supporting the format natively)\n */\nFlash.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nFlash.registerSourceHandler(Flash.nativeSourceHandler);\n\nFlash.formats = {\n 'video/flv': 'FLV',\n 'video/x-flv': 'FLV',\n 'video/mp4': 'MP4',\n 'video/m4v': 'MP4'\n};\n\nFlash.onReady = function(currSwf){\n let el = Dom.getEl(currSwf);\n let tech = el && el.tech;\n\n // if there is no el then the tech has been disposed\n // and the tech element was removed from the player div\n if (tech && tech.el()) {\n // check that the flash object is really ready\n Flash.checkReady(tech);\n }\n};\n\n// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object.\n// If it's not ready, we set a timeout to check again shortly.\nFlash.checkReady = function(tech){\n // stop worrying if the tech has been disposed\n if (!tech.el()) {\n return;\n }\n\n // check if API property exists\n if (tech.el().vjs_getProperty) {\n // tell tech it's ready\n tech.triggerReady();\n } else {\n // wait longer\n this.setTimeout(function(){\n Flash['checkReady'](tech);\n }, 50);\n }\n};\n\n// Trigger events from the swf on the player\nFlash.onEvent = function(swfID, eventName){\n let tech = Dom.getEl(swfID).tech;\n tech.trigger(eventName);\n};\n\n// Log errors from the swf\nFlash.onError = function(swfID, err){\n const tech = Dom.getEl(swfID).tech;\n\n // trigger MEDIA_ERR_SRC_NOT_SUPPORTED\n if (err === 'srcnotfound') {\n return tech.error(4);\n }\n\n // trigger a custom error\n tech.error('FLASH: ' + err);\n};\n\n// Flash Version Check\nFlash.version = function(){\n let version = '0,0,0';\n\n // IE\n try {\n version = new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n\n // other browsers\n } catch(e) {\n try {\n if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin){\n version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n }\n } catch(err) {}\n }\n return version.split(',');\n};\n\n// Flash embedding method. Only used in non-iframe mode\nFlash.embed = function(swf, flashVars, params, attributes){\n const code = Flash.getEmbedCode(swf, flashVars, params, attributes);\n\n // Get element by embedding code and retrieving created element\n const obj = Dom.createEl('div', { innerHTML: code }).childNodes[0];\n\n return obj;\n};\n\nFlash.getEmbedCode = function(swf, flashVars, params, attributes){\n const objTag = '`;\n });\n\n attributes = assign({\n // Add swf to attributes (need both for IE and Others to work)\n 'data': swf,\n\n // Default to 100% width/height\n 'width': '100%',\n 'height': '100%'\n\n }, attributes);\n\n // Create Attributes string\n Object.getOwnPropertyNames(attributes).forEach(function(key){\n attrsString += `${key}=\"${attributes[key]}\" `;\n });\n\n return `${objTag}${attrsString}>${paramsString}`;\n};\n\n// Run Flash through the RTMP decorator\nFlashRtmpDecorator(Flash);\n\nComponent.registerComponent('Flash', Flash);\nTech.registerTech('Flash', Flash);\nexport default Flash;\n","/**\n * @file html5.js\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n */\n\nimport Tech from './tech.js';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\nimport * as Url from '../utils/url.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport window from 'global/window';\nimport assign from 'object.assign';\nimport mergeOptions from '../utils/merge-options.js';\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Tech\n * @class Html5\n */\nclass Html5 extends Tech {\n\n constructor(options, ready){\n super(options, ready);\n\n const source = options.source;\n\n // Set the source if one is provided\n // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n // anyway so the error gets fired.\n if (source && (this.el_.currentSrc !== source.src || (options.tag && options.tag.initNetworkState_ === 3))) {\n this.setSource(source);\n } else {\n this.handleLateInit_(this.el_);\n }\n\n if (this.el_.hasChildNodes()) {\n\n let nodes = this.el_.childNodes;\n let nodesLength = nodes.length;\n let removeNodes = [];\n\n while (nodesLength--) {\n let node = nodes[nodesLength];\n let nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'track') {\n if (!this.featuresNativeTextTracks) {\n // Empty video tag tracks so the built-in player doesn't use them also.\n // This may not be fast enough to stop HTML5 browsers from reading the tags\n // so we'll need to turn off any default tracks if we're manually doing\n // captions and subtitles. videoElement.textTracks\n removeNodes.push(node);\n } else {\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(node);\n this.remoteTextTracks().addTrack_(node.track);\n }\n }\n }\n\n for (let i=0; i= 0; i--) {\n const attr = settingsAttrs[i];\n let overwriteAttrs = {};\n if (typeof this.options_[attr] !== 'undefined') {\n overwriteAttrs[attr] = this.options_[attr];\n }\n Dom.setElAttributes(el, overwriteAttrs);\n }\n\n return el;\n // jenniisawesome = true;\n }\n\n // If we're loading the playback object after it has started loading\n // or playing the video (often with autoplay on) then the loadstart event\n // has already fired and we need to fire it manually because many things\n // rely on it.\n handleLateInit_(el) {\n if (el.networkState === 0 || el.networkState === 3) {\n // The video element hasn't started loading the source yet\n // or didn't find a source\n return;\n }\n\n if (el.readyState === 0) {\n // NetworkState is set synchronously BUT loadstart is fired at the\n // end of the current stack, usually before setInterval(fn, 0).\n // So at this point we know loadstart may have already fired or is\n // about to fire, and either way the player hasn't seen it yet.\n // We don't want to fire loadstart prematurely here and cause a\n // double loadstart so we'll wait and see if it happens between now\n // and the next loop, and fire it if not.\n // HOWEVER, we also want to make sure it fires before loadedmetadata\n // which could also happen between now and the next loop, so we'll\n // watch for that also.\n let loadstartFired = false;\n let setLoadstartFired = function() {\n loadstartFired = true;\n };\n this.on('loadstart', setLoadstartFired);\n\n let triggerLoadstart = function() {\n // We did miss the original loadstart. Make sure the player\n // sees loadstart before loadedmetadata\n if (!loadstartFired) {\n this.trigger('loadstart');\n }\n };\n this.on('loadedmetadata', triggerLoadstart);\n\n this.ready(function(){\n this.off('loadstart', setLoadstartFired);\n this.off('loadedmetadata', triggerLoadstart);\n\n if (!loadstartFired) {\n // We did miss the original native loadstart. Fire it now.\n this.trigger('loadstart');\n }\n });\n\n return;\n }\n\n // From here on we know that loadstart already fired and we missed it.\n // The other readyState events aren't as much of a problem if we double\n // them, so not going to go to as much trouble as loadstart to prevent\n // that unless we find reason to.\n let eventsToTrigger = ['loadstart'];\n\n // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n eventsToTrigger.push('loadedmetadata');\n\n // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n if (el.readyState >= 2) {\n eventsToTrigger.push('loadeddata');\n }\n\n // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n if (el.readyState >= 3) {\n eventsToTrigger.push('canplay');\n }\n\n // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n if (el.readyState >= 4) {\n eventsToTrigger.push('canplaythrough');\n }\n\n // We still need to give the player time to add event listeners\n this.ready(function(){\n eventsToTrigger.forEach(function(type){\n this.trigger(type);\n }, this);\n });\n }\n\n proxyNativeTextTracks_() {\n let tt = this.el().textTracks;\n\n if (tt) {\n // Add tracks - if player is initialised after DOM loaded, textTracks\n // will not trigger addtrack\n for (let i = 0; i < tt.length; i++) {\n this.textTracks().addTrack_(tt[i]);\n }\n\n if (tt.addEventListener) {\n tt.addEventListener('change', this.handleTextTrackChange_);\n tt.addEventListener('addtrack', this.handleTextTrackAdd_);\n tt.addEventListener('removetrack', this.handleTextTrackRemove_);\n }\n }\n }\n\n handleTextTrackChange(e) {\n let tt = this.textTracks();\n this.textTracks().trigger({\n type: 'change',\n target: tt,\n currentTarget: tt,\n srcElement: tt\n });\n }\n\n handleTextTrackAdd(e) {\n this.textTracks().addTrack_(e.track);\n }\n\n handleTextTrackRemove(e) {\n this.textTracks().removeTrack_(e.track);\n }\n\n /**\n * Play for html5 tech\n *\n * @method play\n */\n play() { this.el_.play(); }\n\n /**\n * Pause for html5 tech\n *\n * @method pause\n */\n pause() { this.el_.pause(); }\n\n /**\n * Paused for html5 tech\n *\n * @return {Boolean}\n * @method paused\n */\n paused() { return this.el_.paused; }\n\n /**\n * Get current time\n *\n * @return {Number}\n * @method currentTime\n */\n currentTime() { return this.el_.currentTime; }\n\n /**\n * Set current time\n *\n * @param {Number} seconds Current time of video\n * @method setCurrentTime\n */\n setCurrentTime(seconds) {\n try {\n this.el_.currentTime = seconds;\n } catch(e) {\n log(e, 'Video is not ready. (Video.js)');\n // this.warning(VideoJS.warnings.videoNotReady);\n }\n }\n\n /**\n * Get duration\n *\n * @return {Number}\n * @method duration\n */\n duration() { return this.el_.duration || 0; }\n\n /**\n * Get a TimeRange object that represents the intersection\n * of the time ranges for which the user agent has all\n * relevant media\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() { return this.el_.buffered; }\n\n /**\n * Get volume level\n *\n * @return {Number}\n * @method volume\n */\n volume() { return this.el_.volume; }\n\n /**\n * Set volume level\n *\n * @param {Number} percentAsDecimal Volume percent as a decimal\n * @method setVolume\n */\n setVolume(percentAsDecimal) { this.el_.volume = percentAsDecimal; }\n\n /**\n * Get if muted\n *\n * @return {Boolean}\n * @method muted\n */\n muted() { return this.el_.muted; }\n\n /**\n * Set muted\n *\n * @param {Boolean} If player is to be muted or note\n * @method setMuted\n */\n setMuted(muted) { this.el_.muted = muted; }\n\n /**\n * Get player width\n *\n * @return {Number}\n * @method width\n */\n width() { return this.el_.offsetWidth; }\n\n /**\n * Get player height\n *\n * @return {Number}\n * @method height\n */\n height() { return this.el_.offsetHeight; }\n\n /**\n * Get if there is fullscreen support\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n if (typeof this.el_.webkitEnterFullScreen === 'function') {\n let userAgent = window.navigator.userAgent;\n // Seems to be broken in Chromium/Chrome && Safari in Leopard\n if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Request to enter fullscreen\n *\n * @method enterFullScreen\n */\n enterFullScreen() {\n var video = this.el_;\n\n if ('webkitDisplayingFullscreen' in video) {\n this.one('webkitbeginfullscreen', function() {\n this.one('webkitendfullscreen', function() {\n this.trigger('fullscreenchange', { isFullscreen: false });\n });\n\n this.trigger('fullscreenchange', { isFullscreen: true });\n });\n }\n\n if (video.paused && video.networkState <= video.HAVE_METADATA) {\n // attempt to prime the video element for programmatic access\n // this isn't necessary on the desktop but shouldn't hurt\n this.el_.play();\n\n // playing and pausing synchronously during the transition to fullscreen\n // can get iOS ~6.1 devices into a play/pause loop\n this.setTimeout(function(){\n video.pause();\n video.webkitEnterFullScreen();\n }, 0);\n } else {\n video.webkitEnterFullScreen();\n }\n }\n\n /**\n * Request to exit fullscreen\n *\n * @method exitFullScreen\n */\n exitFullScreen() {\n this.el_.webkitExitFullScreen();\n }\n\n /**\n * Get/set video\n *\n * @param {Object=} src Source object\n * @return {Object}\n * @method src\n */\n src(src) {\n if (src === undefined) {\n return this.el_.src;\n } else {\n // Setting src through `src` instead of `setSrc` will be deprecated\n this.setSrc(src);\n }\n }\n\n /**\n * Set video\n *\n * @param {Object} src Source object\n * @deprecated\n * @method setSrc\n */\n setSrc(src) {\n this.el_.src = src;\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load(){\n this.el_.load();\n }\n\n /**\n * Reset the tech. Removes all sources and calls `load`.\n *\n * @method reset\n */\n reset() {\n Html5.resetMediaElement(this.el_);\n }\n\n /**\n * Get current source\n *\n * @return {Object}\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.currentSrc;\n }\n }\n\n /**\n * Get poster\n *\n * @return {String}\n * @method poster\n */\n poster() { return this.el_.poster; }\n\n /**\n * Set poster\n *\n * @param {String} val URL to poster image\n * @method\n */\n setPoster(val) { this.el_.poster = val; }\n\n /**\n * Get preload attribute\n *\n * @return {String}\n * @method preload\n */\n preload() { return this.el_.preload; }\n\n /**\n * Set preload attribute\n *\n * @param {String} val Value for preload attribute\n * @method setPreload\n */\n setPreload(val) { this.el_.preload = val; }\n\n /**\n * Get autoplay attribute\n *\n * @return {String}\n * @method autoplay\n */\n autoplay() { return this.el_.autoplay; }\n\n /**\n * Set autoplay attribute\n *\n * @param {String} val Value for preload attribute\n * @method setAutoplay\n */\n setAutoplay(val) { this.el_.autoplay = val; }\n\n /**\n * Get controls attribute\n *\n * @return {String}\n * @method controls\n */\n controls() { return this.el_.controls; }\n\n /**\n * Set controls attribute\n *\n * @param {String} val Value for controls attribute\n * @method setControls\n */\n setControls(val) { this.el_.controls = !!val; }\n\n /**\n * Get loop attribute\n *\n * @return {String}\n * @method loop\n */\n loop() { return this.el_.loop; }\n\n /**\n * Set loop attribute\n *\n * @param {String} val Value for loop attribute\n * @method setLoop\n */\n setLoop(val) { this.el_.loop = val; }\n\n /**\n * Get error value\n *\n * @return {String}\n * @method error\n */\n error() { return this.el_.error; }\n\n /**\n * Get whether or not the player is in the \"seeking\" state\n *\n * @return {Boolean}\n * @method seeking\n */\n seeking() { return this.el_.seeking; }\n\n /**\n * Get a TimeRanges object that represents the\n * ranges of the media resource to which it is possible\n * for the user agent to seek.\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() { return this.el_.seekable; }\n\n /**\n * Get if video ended\n *\n * @return {Boolean}\n * @method ended\n */\n ended() { return this.el_.ended; }\n\n /**\n * Get the value of the muted content attribute\n * This attribute has no dynamic effect, it only\n * controls the default state of the element\n *\n * @return {Boolean}\n * @method defaultMuted\n */\n defaultMuted() { return this.el_.defaultMuted; }\n\n /**\n * Get desired speed at which the media resource is to play\n *\n * @return {Number}\n * @method playbackRate\n */\n playbackRate() { return this.el_.playbackRate; }\n\n /**\n * Returns a TimeRanges object that represents the ranges of the\n * media resource that the user agent has played.\n * @return {TimeRangeObject} the range of points on the media\n * timeline that has been reached through normal playback\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-played\n */\n played() { return this.el_.played; }\n\n /**\n * Set desired speed at which the media resource is to play\n *\n * @param {Number} val Speed at which the media resource is to play\n * @method setPlaybackRate\n */\n setPlaybackRate(val) { this.el_.playbackRate = val; }\n\n /**\n * Get the current state of network activity for the element, from\n * the list below\n * NETWORK_EMPTY (numeric value 0)\n * NETWORK_IDLE (numeric value 1)\n * NETWORK_LOADING (numeric value 2)\n * NETWORK_NO_SOURCE (numeric value 3)\n *\n * @return {Number}\n * @method networkState\n */\n networkState() { return this.el_.networkState; }\n\n /**\n * Get a value that expresses the current state of the element\n * with respect to rendering the current playback position, from\n * the codes in the list below\n * HAVE_NOTHING (numeric value 0)\n * HAVE_METADATA (numeric value 1)\n * HAVE_CURRENT_DATA (numeric value 2)\n * HAVE_FUTURE_DATA (numeric value 3)\n * HAVE_ENOUGH_DATA (numeric value 4)\n *\n * @return {Number}\n * @method readyState\n */\n readyState() { return this.el_.readyState; }\n\n /**\n * Get width of video\n *\n * @return {Number}\n * @method videoWidth\n */\n videoWidth() { return this.el_.videoWidth; }\n\n /**\n * Get height of video\n *\n * @return {Number}\n * @method videoHeight\n */\n videoHeight() { return this.el_.videoHeight; }\n\n /**\n * Get text tracks\n *\n * @return {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n return super.textTracks();\n }\n\n /**\n * Creates and returns a text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!this['featuresNativeTextTracks']) {\n return super.addTextTrack(kind, label, language);\n }\n\n return this.el_.addTextTrack(kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options={}) {\n if (!this['featuresNativeTextTracks']) {\n return super.addRemoteTextTrack(options);\n }\n\n let htmlTrackElement = document.createElement('track');\n\n if (options.kind) {\n htmlTrackElement.kind = options.kind;\n }\n if (options.label) {\n htmlTrackElement.label = options.label;\n }\n if (options.language || options.srclang) {\n htmlTrackElement.srclang = options.language || options.srclang;\n }\n if (options.default) {\n htmlTrackElement.default = options.default;\n }\n if (options.id) {\n htmlTrackElement.id = options.id;\n }\n if (options.src) {\n htmlTrackElement.src = options.src;\n }\n\n this.el().appendChild(htmlTrackElement);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote text track from TextTrackList object\n *\n * @param {TextTrackObject} track Texttrack object to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n if (!this['featuresNativeTextTracks']) {\n return super.removeRemoteTextTrack(track);\n }\n\n let tracks, i;\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n\n tracks = this.$$('track');\n\n i = tracks.length;\n while (i--) {\n if (track === tracks[i] || track === tracks[i].track) {\n this.el().removeChild(tracks[i]);\n }\n }\n }\n\n}\n\n\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n/*\n* Element for testing browser HTML5 video capabilities\n*\n* @type {Element}\n* @constant\n* @private\n*/\nHtml5.TEST_VID = document.createElement('video');\nlet track = document.createElement('track');\ntrack.kind = 'captions';\ntrack.srclang = 'en';\ntrack.label = 'English';\nHtml5.TEST_VID.appendChild(track);\n\n/*\n * Check if HTML5 video is supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.isSupported = function(){\n // IE9 with no Media Player is a LIAR! (#984)\n try {\n Html5.TEST_VID['volume'] = 0.5;\n } catch (e) {\n return false;\n }\n\n return !!Html5.TEST_VID.canPlayType;\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Html5);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the HTML5 tech\n */\nHtml5.nativeSourceHandler = {};\n\n/*\n * Check if the video element can play the given videotype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canPlayType = function(type){\n // IE9 on Windows 7 without MediaPlayer throws an error here\n // https://github.com/videojs/video.js/issues/519\n try {\n return Html5.TEST_VID.canPlayType(type);\n } catch(e) {\n return '';\n }\n};\n\n/*\n * Check if the video element can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canHandleSource = function(source){\n var match, ext;\n\n // If a type was provided we should rely on that\n if (source.type) {\n return Html5.nativeSourceHandler.canPlayType(source.type);\n } else if (source.src) {\n // If no type, fall back to checking 'video/[EXTENSION]'\n ext = Url.getFileExtension(source.src);\n\n return Html5.nativeSourceHandler.canPlayType(`video/${ext}`);\n }\n\n return '';\n};\n\n/*\n * Pass the source to the video element\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the Html5 tech\n */\nHtml5.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n* Clean up the source handler when disposing the player or switching sources..\n* (no cleanup is needed when supporting the format natively)\n*/\nHtml5.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\n\n/*\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {Boolean}\n */\nHtml5.canControlVolume = function(){\n var volume = Html5.TEST_VID.volume;\n Html5.TEST_VID.volume = (volume / 2) + 0.1;\n return volume !== Html5.TEST_VID.volume;\n};\n\n/*\n * Check if playbackRate is supported in this browser/device.\n *\n * @return {Number} [description]\n */\nHtml5.canControlPlaybackRate = function(){\n var playbackRate = Html5.TEST_VID.playbackRate;\n Html5.TEST_VID.playbackRate = (playbackRate / 2) + 0.1;\n return playbackRate !== Html5.TEST_VID.playbackRate;\n};\n\n/*\n * Check to see if native text tracks are supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.supportsNativeTextTracks = function() {\n var supportsTextTracks;\n\n // Figure out native text track support\n // If mode is a number, we cannot change it because it'll disappear from view.\n // Browsers with numeric modes include IE10 and older (<=2013) samsung android models.\n // Firefox isn't playing nice either with modifying the mode\n // TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862\n supportsTextTracks = !!Html5.TEST_VID.textTracks;\n if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) {\n supportsTextTracks = typeof Html5.TEST_VID.textTracks[0]['mode'] !== 'number';\n }\n if (supportsTextTracks && browser.IS_FIREFOX) {\n supportsTextTracks = false;\n }\n if (supportsTextTracks && !('onremovetrack' in Html5.TEST_VID.textTracks)) {\n supportsTextTracks = false;\n }\n\n return supportsTextTracks;\n};\n\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\nHtml5.Events = [\n 'loadstart',\n 'suspend',\n 'abort',\n 'error',\n 'emptied',\n 'stalled',\n 'loadedmetadata',\n 'loadeddata',\n 'canplay',\n 'canplaythrough',\n 'playing',\n 'waiting',\n 'seeking',\n 'seeked',\n 'ended',\n 'durationchange',\n 'timeupdate',\n 'progress',\n 'play',\n 'pause',\n 'ratechange',\n 'volumechange'\n];\n\n/*\n * Set the tech's volume control support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresVolumeControl'] = Html5.canControlVolume();\n\n/*\n * Set the tech's playbackRate support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresPlaybackRate'] = Html5.canControlPlaybackRate();\n\n/*\n * Set the tech's status on moving the video element.\n * In iOS, if you move a video element in the DOM, it breaks video playback.\n *\n * @type {Boolean}\n */\nHtml5.prototype['movingMediaElementInDOM'] = !browser.IS_IOS;\n\n/*\n * Set the the tech's fullscreen resize support status.\n * HTML video is able to automatically resize when going to fullscreen.\n * (No longer appears to be used. Can probably be removed.)\n */\nHtml5.prototype['featuresFullscreenResize'] = true;\n\n/*\n * Set the tech's progress event support status\n * (this disables the manual progress events of the Tech)\n */\nHtml5.prototype['featuresProgressEvents'] = true;\n\n/*\n * Sets the tech's status on native text track support\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresNativeTextTracks'] = Html5.supportsNativeTextTracks();\n\n// HTML5 Feature detection and Device Fixes --------------------------------- //\nlet canPlayType;\nconst mpegurlRE = /^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i;\nconst mp4RE = /^video\\/mp4/i;\n\nHtml5.patchCanPlayType = function() {\n // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\n if (browser.ANDROID_VERSION >= 4.0) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type) {\n if (type && mpegurlRE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n\n // Override Android 2.2 and less canPlayType method which is broken\n if (browser.IS_OLD_ANDROID) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type){\n if (type && mp4RE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n};\n\nHtml5.unpatchCanPlayType = function() {\n var r = Html5.TEST_VID.constructor.prototype.canPlayType;\n Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\n canPlayType = null;\n return r;\n};\n\n// by default, patch the video element\nHtml5.patchCanPlayType();\n\nHtml5.disposeMediaElement = function(el){\n if (!el) { return; }\n\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n\n // remove any child track or source nodes to prevent their loading\n while(el.hasChildNodes()) {\n el.removeChild(el.firstChild);\n }\n\n // remove any src reference. not setting `src=''` because that causes a warning\n // in firefox\n el.removeAttribute('src');\n\n // force the media element to update its loading state by calling load()\n // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {\n // not supported\n }\n })();\n }\n};\n\nHtml5.resetMediaElement = function(el){\n if (!el) { return; }\n\n let sources = el.querySelectorAll('source');\n let i = sources.length;\n while (i--) {\n el.removeChild(sources[i]);\n }\n\n // remove any src reference.\n // not setting `src=''` because that throws an error\n el.removeAttribute('src');\n\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {}\n })();\n }\n};\n\nComponent.registerComponent('Html5', Html5);\nTech.registerTech('Html5', Html5);\nexport default Html5;\n","/**\n * @file loader.js\n */\nimport Component from '../component.js';\nimport Tech from './tech.js';\nimport window from 'global/window';\nimport toTitleCase from '../utils/to-title-case.js';\n\n/**\n * The Media Loader is the component that decides which playback technology to load\n * when the player is initialized.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class MediaLoader\n */\nclass MediaLoader extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n // If there are no sources when the player is initialized,\n // load the first supported playback technology.\n\n if (!options.playerOptions['sources'] || options.playerOptions['sources'].length === 0) {\n for (let i=0, j=options.playerOptions['techOrder']; i {\n this.trigger('vttjsloaded');\n };\n script.onerror = () => {\n this.trigger('vttjserror');\n };\n this.on('dispose', () => {\n script.onload = null;\n script.onerror = null;\n });\n this.el().parentNode.appendChild(script);\n window['WebVTT'] = true;\n }\n\n let updateDisplay = () => this.trigger('texttrackchange');\n let textTracksChanges = () => {\n updateDisplay();\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n track.removeEventListener('cuechange', updateDisplay);\n if (track.mode === 'showing') {\n track.addEventListener('cuechange', updateDisplay);\n }\n }\n };\n\n textTracksChanges();\n tracks.addEventListener('change', textTracksChanges);\n\n this.on('dispose', function() {\n tracks.removeEventListener('change', textTracksChanges);\n });\n }\n\n /*\n * Provide default methods for text tracks.\n *\n * Html5 tech overrides these.\n */\n\n /**\n * Get texttracks\n *\n * @returns {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n this.textTracks_ = this.textTracks_ || new TextTrackList();\n return this.textTracks_;\n }\n\n /**\n * Get remote texttracks\n *\n * @returns {TextTrackList}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n this.remoteTextTracks_ = this.remoteTextTracks_ || new TextTrackList();\n return this.remoteTextTracks_;\n }\n\n /**\n * Get remote htmltrackelements\n *\n * @returns {HTMLTrackElementList}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new HTMLTrackElementList();\n return this.remoteTextTrackEls_;\n }\n\n /**\n * Creates and returns a remote text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!kind) {\n throw new Error('TextTrack kind is required but was not provided');\n }\n\n return createTrackHelper(this, kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a emulated html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n let track = mergeOptions(options, {\n tech: this\n });\n\n let htmlTrackElement = new HTMLTrackElement(track);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n // must come after remoteTextTracks()\n this.textTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote texttrack\n *\n * @param {TextTrackObject} track Texttrack to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.textTracks().removeTrack_(track);\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n }\n\n /**\n * Provide a default setPoster method for techs\n * Poster support for techs should be optional, so we don't want techs to\n * break if they don't have a way to set a poster.\n *\n * @method setPoster\n */\n setPoster() {}\n\n /*\n * Check if the tech can support the given type\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n canPlayType() {\n return '';\n }\n\n /*\n * Return whether the argument is a Tech or not.\n * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n *\n * @param {Object} component An item to check\n * @return {Boolean} Whether it is a tech or not\n */\n static isTech(component) {\n return component.prototype instanceof Tech ||\n component instanceof Tech ||\n component === Tech;\n }\n\n /**\n * Registers a Tech\n *\n * @param {String} name Name of the Tech to register\n * @param {Object} tech The tech to register\n * @static\n * @method registerComponent\n */\n static registerTech(name, tech) {\n if (!Tech.techs_) {\n Tech.techs_ = {};\n }\n\n if (!Tech.isTech(tech)) {\n throw new Error(`Tech ${name} must be a Tech`);\n }\n\n Tech.techs_[name] = tech;\n return tech;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getTech(name) {\n if (Tech.techs_ && Tech.techs_[name]) {\n return Tech.techs_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`);\n return window.videojs[name];\n }\n }\n}\n\n/*\n * List of associated text tracks\n *\n * @type {Array}\n * @private\n */\nTech.prototype.textTracks_;\n\nvar createTrackHelper = function(self, kind, label, language, options={}) {\n let tracks = self.textTracks();\n\n options.kind = kind;\n\n if (label) {\n options.label = label;\n }\n if (language) {\n options.language = language;\n }\n options.tech = self;\n\n let track = new TextTrack(options);\n tracks.addTrack_(track);\n\n return track;\n};\n\nTech.prototype.featuresVolumeControl = true;\n\n// Resizing plugins using request fullscreen reloads the plugin\nTech.prototype.featuresFullscreenResize = false;\nTech.prototype.featuresPlaybackRate = false;\n\n// Optional events that we can manually mimic with timers\n// currently not triggered by video-js-swf\nTech.prototype.featuresProgressEvents = false;\nTech.prototype.featuresTimeupdateEvents = false;\n\nTech.prototype.featuresNativeTextTracks = false;\n\n/*\n * A functional mixin for techs that want to use the Source Handler pattern.\n *\n * ##### EXAMPLE:\n *\n * Tech.withSourceHandlers.call(MyTech);\n *\n */\nTech.withSourceHandlers = function(_Tech){\n /*\n * Register a source handler\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * @param {Function} handler The source handler\n * @param {Boolean} first Register it before any existing handlers\n */\n _Tech.registerSourceHandler = function(handler, index){\n let handlers = _Tech.sourceHandlers;\n\n if (!handlers) {\n handlers = _Tech.sourceHandlers = [];\n }\n\n if (index === undefined) {\n // add to the end of the list\n index = handlers.length;\n }\n\n handlers.splice(index, 0, handler);\n };\n\n /*\n * Check if the tech can support the given type\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlayType = function(type){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n\n return '';\n };\n\n /*\n * Return the first source handler that supports the source\n * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n * @param {Object} source The source object\n * @returns {Object} The first source handler that supports the source\n * @returns {null} Null if no source handler is found\n */\n _Tech.selectSourceHandler = function(source){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canHandleSource(source);\n\n if (can) {\n return handlers[i];\n }\n }\n\n return null;\n };\n\n /*\n * Check if the tech can support the given source\n * @param {Object} srcObj The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlaySource = function(srcObj){\n let sh = _Tech.selectSourceHandler(srcObj);\n\n if (sh) {\n return sh.canHandleSource(srcObj);\n }\n\n return '';\n };\n\n /*\n * When using a source handler, prefer its implementation of\n * any function normally provided by the tech.\n */\n let deferrable = [\n 'seekable',\n 'duration'\n ];\n\n deferrable.forEach(function (fnName) {\n let originalFn = this[fnName];\n\n if (typeof originalFn !== 'function') {\n return;\n }\n\n this[fnName] = function() {\n if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n }\n return originalFn.apply(this, arguments);\n };\n }, _Tech.prototype);\n\n /*\n * Create a function for setting the source using a source object\n * and source handlers.\n * Should never be called unless a source handler was found.\n * @param {Object} source A source object with src and type keys\n * @return {Tech} self\n */\n _Tech.prototype.setSource = function(source){\n let sh = _Tech.selectSourceHandler(source);\n\n if (!sh) {\n // Fall back to a native source hander when unsupported sources are\n // deliberately set\n if (_Tech.nativeSourceHandler) {\n sh = _Tech.nativeSourceHandler;\n } else {\n log.error('No source hander found for the current source.');\n }\n }\n\n // Dispose any existing source handler\n this.disposeSourceHandler();\n this.off('dispose', this.disposeSourceHandler);\n\n this.currentSource_ = source;\n this.sourceHandler_ = sh.handleSource(source, this);\n this.on('dispose', this.disposeSourceHandler);\n\n return this;\n };\n\n /*\n * Clean up any existing source handler\n */\n _Tech.prototype.disposeSourceHandler = function(){\n if (this.sourceHandler_ && this.sourceHandler_.dispose) {\n this.sourceHandler_.dispose();\n }\n };\n\n};\n\nComponent.registerComponent('Tech', Tech);\n// Old name for Tech\nComponent.registerComponent('MediaTechController', Tech);\nTech.registerTech('Tech', Tech);\nexport default Tech;\n","/**\n * @file html-track-element-list.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\nclass HtmlTrackElementList {\n constructor(trackElements = []) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in HtmlTrackElementList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = HtmlTrackElementList.prototype[prop];\n }\n }\n }\n\n list.trackElements_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.trackElements_.length;\n }\n });\n\n for (let i = 0, length = trackElements.length; i < length; i++) {\n list.addTrackElement_(trackElements[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n addTrackElement_(trackElement) {\n this.trackElements_.push(trackElement);\n }\n\n getTrackElementByTrack_(track) {\n let trackElement_;\n\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (track === this.trackElements_[i].track) {\n trackElement_ = this.trackElements_[i];\n\n break;\n }\n }\n\n return trackElement_;\n }\n\n removeTrackElement_(trackElement) {\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (trackElement === this.trackElements_[i]) {\n this.trackElements_.splice(i, 1);\n\n break;\n }\n }\n }\n}\n\nexport default HtmlTrackElementList;\n","/**\n * @file html-track-element.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport EventTarget from '../event-target';\nimport TextTrack from '../tracks/text-track';\n\nconst NONE = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst ERROR = 3;\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement\n *\n * interface HTMLTrackElement : HTMLElement {\n * attribute DOMString kind;\n * attribute DOMString src;\n * attribute DOMString srclang;\n * attribute DOMString label;\n * attribute boolean default;\n *\n * const unsigned short NONE = 0;\n * const unsigned short LOADING = 1;\n * const unsigned short LOADED = 2;\n * const unsigned short ERROR = 3;\n * readonly attribute unsigned short readyState;\n *\n * readonly attribute TextTrack track;\n * };\n *\n * @param {Object} options TextTrack configuration\n * @class HTMLTrackElement\n */\n\nclass HTMLTrackElement extends EventTarget {\n constructor(options = {}) {\n super();\n\n let readyState,\n trackElement = this;\n\n if (browser.IS_IE8) {\n trackElement = document.createElement('custom');\n\n for (let prop in HTMLTrackElement.prototype) {\n if (prop !== 'constructor') {\n trackElement[prop] = HTMLTrackElement.prototype[prop];\n }\n }\n }\n\n let track = new TextTrack(options);\n\n trackElement.kind = track.kind;\n trackElement.src = track.src;\n trackElement.srclang = track.language;\n trackElement.label = track.label;\n trackElement.default = track.default;\n\n Object.defineProperty(trackElement, 'readyState', {\n get() {\n return readyState;\n }\n });\n\n Object.defineProperty(trackElement, 'track', {\n get() {\n return track;\n }\n });\n\n readyState = NONE;\n\n track.addEventListener('loadeddata', function() {\n readyState = LOADED;\n\n trackElement.trigger({\n type: 'load',\n target: trackElement\n });\n });\n\n if (browser.IS_IE8) {\n return trackElement;\n }\n }\n}\n\nHTMLTrackElement.prototype.allowedEvents_ = {\n load: 'load'\n};\n\nHTMLTrackElement.NONE = NONE;\nHTMLTrackElement.LOADING = LOADING;\nHTMLTrackElement.LOADED = LOADED;\nHTMLTrackElement.ERROR = ERROR;\n\nexport default HTMLTrackElement;\n","/**\n * @file text-track-cue-list.js\n */\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A List of text track cues as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist\n *\n * interface TextTrackCueList {\n * readonly attribute unsigned long length;\n * getter TextTrackCue (unsigned long index);\n * TextTrackCue? getCueById(DOMString id);\n * };\n *\n * @param {Array} cues A list of cues to be initialized with\n * @class TextTrackCueList\n */\n\nclass TextTrackCueList {\n constructor(cues) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackCueList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackCueList.prototype[prop];\n }\n }\n }\n\n TextTrackCueList.prototype.setCues_.call(list, cues);\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.length_;\n }\n });\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * A setter for cues in this list\n *\n * @param {Array} cues an array of cues\n * @method setCues_\n * @private\n */\n setCues_(cues) {\n let oldLength = this.length || 0;\n let i = 0;\n let l = cues.length;\n\n this.cues_ = cues;\n this.length_ = cues.length;\n\n let defineProp = function(index) {\n if (!('' + index in this)) {\n Object.defineProperty(this, '' + index, {\n get() {\n return this.cues_[index];\n }\n });\n }\n };\n\n if (oldLength < l) {\n i = oldLength;\n\n for (; i < l; i++) {\n defineProp.call(this, i);\n }\n }\n }\n\n /**\n * Get a cue that is currently in the Cue list by id\n *\n * @param {String} id\n * @method getCueById\n * @return {Object} a single cue\n */\n getCueById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let cue = this[i];\n\n if (cue.id === id) {\n result = cue;\n break;\n }\n }\n\n return result;\n }\n}\n\nexport default TextTrackCueList;\n","/**\n * @file text-track-display.js\n */\nimport Component from '../component';\nimport Menu from '../menu/menu.js';\nimport MenuItem from '../menu/menu-item.js';\nimport MenuButton from '../menu/menu-button.js';\nimport * as Fn from '../utils/fn.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst darkGray = '#222';\nconst lightGray = '#ccc';\nconst fontMap = {\n monospace: 'monospace',\n sansSerif: 'sans-serif',\n serif: 'serif',\n monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n monospaceSerif: '\"Courier New\", monospace',\n proportionalSansSerif: 'sans-serif',\n proportionalSerif: 'serif',\n casual: '\"Comic Sans MS\", Impact, fantasy',\n script: '\"Monotype Corsiva\", cursive',\n smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n\n/**\n * The component for displaying text track cues\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class TextTrackDisplay\n */\nclass TextTrackDisplay extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n player.on('loadstart', Fn.bind(this, this.toggleDisplay));\n player.on('texttrackchange', Fn.bind(this, this.updateDisplay));\n\n // This used to be called during player init, but was causing an error\n // if a track should show by default and the display hadn't loaded yet.\n // Should probably be moved to an external track loader when we support\n // tracks that don't need a display.\n player.ready(Fn.bind(this, function() {\n if (player.tech_ && player.tech_['featuresNativeTextTracks']) {\n this.hide();\n return;\n }\n\n player.on('fullscreenchange', Fn.bind(this, this.updateDisplay));\n\n let tracks = this.options_.playerOptions['tracks'] || [];\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n this.player_.addRemoteTextTrack(track);\n }\n }));\n }\n\n /**\n * Toggle display texttracks\n *\n * @method toggleDisplay\n */\n toggleDisplay() {\n if (this.player_.tech_ && this.player_.tech_['featuresNativeTextTracks']) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-text-track-display'\n }, {\n 'aria-live': 'assertive',\n 'aria-atomic': 'true'\n });\n }\n\n /**\n * Clear display texttracks\n *\n * @method clearDisplay\n */\n clearDisplay() {\n if (typeof window['WebVTT'] === 'function') {\n window['WebVTT']['processCues'](window, [], this.el_);\n }\n }\n\n /**\n * Update display texttracks\n *\n * @method updateDisplay\n */\n updateDisplay() {\n var tracks = this.player_.textTracks();\n\n this.clearDisplay();\n\n if (!tracks) {\n return;\n }\n\n // Track display prioritization model: if multiple tracks are 'showing',\n // display the first 'subtitles' or 'captions' track which is 'showing',\n // otherwise display the first 'descriptions' track which is 'showing'\n\n let descriptionsTrack = null;\n let captionsSubtitlesTrack = null;\n\n let i = tracks.length;\n while (i--) {\n let track = tracks[i];\n if (track['mode'] === 'showing') {\n if (track['kind'] === 'descriptions') {\n descriptionsTrack = track;\n } else {\n captionsSubtitlesTrack = track;\n }\n }\n }\n\n if (captionsSubtitlesTrack) {\n this.updateForTrack(captionsSubtitlesTrack);\n } else if (descriptionsTrack) {\n this.updateForTrack(descriptionsTrack);\n }\n }\n\n /**\n * Add texttrack to texttrack list\n *\n * @param {TextTrackObject} track Texttrack object to be added to list\n * @method updateForTrack\n */\n updateForTrack(track) {\n if (typeof window['WebVTT'] !== 'function' || !track['activeCues']) {\n return;\n }\n\n let overrides = this.player_['textTrackSettings'].getValues();\n\n let cues = [];\n for (let i = 0; i < track['activeCues'].length; i++) {\n cues.push(track['activeCues'][i]);\n }\n\n window['WebVTT']['processCues'](window, cues, this.el_);\n\n let i = cues.length;\n while (i--) {\n let cue = cues[i];\n if (!cue) {\n continue;\n }\n\n let cueDiv = cue.displayState;\n if (overrides.color) {\n cueDiv.firstChild.style.color = overrides.color;\n }\n if (overrides.textOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'color',\n constructColor(overrides.color || '#fff',\n overrides.textOpacity));\n }\n if (overrides.backgroundColor) {\n cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n }\n if (overrides.backgroundOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'backgroundColor',\n constructColor(overrides.backgroundColor || '#000',\n overrides.backgroundOpacity));\n }\n if (overrides.windowColor) {\n if (overrides.windowOpacity) {\n tryUpdateStyle(cueDiv,\n 'backgroundColor',\n constructColor(overrides.windowColor, overrides.windowOpacity));\n } else {\n cueDiv.style.backgroundColor = overrides.windowColor;\n }\n }\n if (overrides.edgeStyle) {\n if (overrides.edgeStyle === 'dropshadow') {\n cueDiv.firstChild.style.textShadow = `2px 2px 3px ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n } else if (overrides.edgeStyle === 'raised') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n } else if (overrides.edgeStyle === 'depressed') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n } else if (overrides.edgeStyle === 'uniform') {\n cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n }\n }\n if (overrides.fontPercent && overrides.fontPercent !== 1) {\n const fontSize = window.parseFloat(cueDiv.style.fontSize);\n cueDiv.style.fontSize = (fontSize * overrides.fontPercent) + 'px';\n cueDiv.style.height = 'auto';\n cueDiv.style.top = 'auto';\n cueDiv.style.bottom = '2px';\n }\n if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n if (overrides.fontFamily === 'small-caps') {\n cueDiv.firstChild.style.fontVariant = 'small-caps';\n } else {\n cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n }\n }\n }\n }\n\n}\n\n/**\n* Add cue HTML to display\n*\n* @param {Number} color Hex number for color, like #f0e\n* @param {Number} opacity Value for opacity,0.0 - 1.0\n* @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)'\n* @method constructColor\n*/\nfunction constructColor(color, opacity) {\n return 'rgba(' +\n // color looks like \"#f0e\"\n parseInt(color[1] + color[1], 16) + ',' +\n parseInt(color[2] + color[2], 16) + ',' +\n parseInt(color[3] + color[3], 16) + ',' +\n opacity + ')';\n}\n\n/**\n * Try to update style\n * Some style changes will throw an error, particularly in IE8. Those should be noops.\n *\n * @param {Element} el The element to be styles\n * @param {CSSProperty} style The CSS property to be styled\n * @param {CSSStyle} rule The actual style to be applied to the property\n * @method tryUpdateStyle\n */\nfunction tryUpdateStyle(el, style, rule) {\n //\n try {\n el.style[style] = rule;\n } catch (e) {}\n}\n\nComponent.registerComponent('TextTrackDisplay', TextTrackDisplay);\nexport default TextTrackDisplay;\n","/**\n * @file text-track-enums.js\n */\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n *\n * enum TextTrackMode { \"disabled\", \"hidden\", \"showing\" };\n */\nconst TextTrackMode = {\n disabled: 'disabled',\n hidden: 'hidden',\n showing: 'showing'\n};\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind\n *\n * enum TextTrackKind {\n * \"subtitles\",\n * \"captions\",\n * \"descriptions\",\n * \"chapters\",\n * \"metadata\"\n * };\n */\nconst TextTrackKind = {\n subtitles: 'subtitles',\n captions: 'captions',\n descriptions: 'descriptions',\n chapters: 'chapters',\n metadata: 'metadata'\n};\n\n/* jshint ignore:start */\n// we ignore jshint here because it does not see\n// TextTrackMode or TextTrackKind as defined here somehow...\nexport { TextTrackMode, TextTrackKind };\n/* jshint ignore:end */\n","/**\n * Utilities for capturing text track state and re-creating tracks\n * based on a capture.\n *\n * @file text-track-list-converter.js\n */\n\n/**\n * Examine a single text track and return a JSON-compatible javascript\n * object that represents the text track's state.\n * @param track {TextTrackObject} the text track to query\n * @return {Object} a serializable javascript representation of the\n * @private\n */\nlet trackToJson_ = function(track) {\n let ret = ['kind', 'label', 'language', 'id',\n 'inBandMetadataTrackDispatchType',\n 'mode', 'src'].reduce((acc, prop, i) => {\n if (track[prop]) {\n acc[prop] = track[prop];\n }\n \n return acc;\n }, {\n cues: track.cues && Array.prototype.map.call(track.cues, function(cue) {\n return {\n startTime: cue.startTime,\n endTime: cue.endTime,\n text: cue.text,\n id: cue.id\n };\n })\n });\n\n return ret;\n};\n\n/**\n * Examine a tech and return a JSON-compatible javascript array that\n * represents the state of all text tracks currently configured. The\n * return array is compatible with `jsonToTextTracks`.\n * @param tech {tech} the tech object to query\n * @return {Array} a serializable javascript representation of the\n * @function textTracksToJson\n */\nlet textTracksToJson = function(tech) {\n\n let trackEls = tech.$$('track');\n\n let trackObjs = Array.prototype.map.call(trackEls, (t) => t.track);\n let tracks = Array.prototype.map.call(trackEls, function(trackEl) {\n let json = trackToJson_(trackEl.track);\n if (trackEl.src) {\n json.src = trackEl.src;\n }\n return json;\n });\n\n return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function(track) {\n return trackObjs.indexOf(track) === -1;\n }).map(trackToJson_));\n};\n\n/**\n * Creates a set of remote text tracks on a tech based on an array of\n * javascript text track representations.\n * @param json {Array} an array of text track representation objects,\n * like those that would be produced by `textTracksToJson`\n * @param tech {tech} the tech to create text tracks on\n * @function jsonToTextTracks\n */\nlet jsonToTextTracks = function(json, tech) {\n json.forEach(function(track) {\n let addedTrack = tech.addRemoteTextTrack(track).track;\n if (!track.src && track.cues) {\n track.cues.forEach((cue) => addedTrack.addCue(cue));\n }\n });\n\n return tech.textTracks();\n};\n\nexport default {textTracksToJson, jsonToTextTracks, trackToJson_};\n","/**\n * @file text-track-list.js\n */\nimport EventTarget from '../event-target';\nimport * as Fn from '../utils/fn.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A text track list as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist\n *\n * interface TextTrackList : EventTarget {\n * readonly attribute unsigned long length;\n * getter TextTrack (unsigned long index);\n * TextTrack? getTrackById(DOMString id);\n *\n * attribute EventHandler onchange;\n * attribute EventHandler onaddtrack;\n * attribute EventHandler onremovetrack;\n * };\n *\n * @param {Track[]} tracks A list of tracks to initialize the list with\n * @extends EventTarget\n * @class TextTrackList\n */\n\nclass TextTrackList extends EventTarget {\n constructor(tracks = []) {\n super();\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackList.prototype[prop];\n }\n }\n }\n\n list.tracks_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.tracks_.length;\n }\n });\n\n for (let i = 0; i < tracks.length; i++) {\n list.addTrack_(tracks[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * Add TextTrack from TextTrackList\n *\n * @param {TextTrack} track\n * @method addTrack_\n * @private\n */\n addTrack_(track) {\n let index = this.tracks_.length;\n\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get() {\n return this.tracks_[index];\n }\n });\n }\n\n track.addEventListener('modechange', Fn.bind(this, function() {\n this.trigger('change');\n }));\n\n // Do not add duplicate tracks\n if (this.tracks_.indexOf(track) === -1) {\n this.tracks_.push(track);\n this.trigger({\n track,\n type: 'addtrack'\n });\n }\n\n }\n\n /**\n * Remove TextTrack from TextTrackList\n * NOTE: Be mindful of what is passed in as it may be a HTMLTrackElement\n *\n * @param {TextTrack} rtrack\n * @method removeTrack_\n * @private\n */\n removeTrack_(rtrack) {\n let track;\n\n for (let i = 0, l = this.length; i < l; i++) {\n if (this[i] === rtrack) {\n track = this[i];\n if (track.off) {\n track.off();\n }\n\n this.tracks_.splice(i, 1);\n\n break;\n }\n }\n\n if (!track) {\n return;\n }\n\n this.trigger({\n track,\n type: 'removetrack'\n });\n }\n\n /**\n * Get a TextTrack from TextTrackList by a tracks id\n *\n * @param {String} id - the id of the track to get\n * @method getTrackById\n * @return {TextTrack}\n * @private\n */\n getTrackById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let track = this[i];\n\n if (track.id === id) {\n result = track;\n break;\n }\n }\n\n return result;\n }\n}\n\n/**\n * change - One or more tracks in the track list have been enabled or disabled.\n * addtrack - A track has been added to the track list.\n * removetrack - A track has been removed from the track list.\n */\nTextTrackList.prototype.allowedEvents_ = {\n change: 'change',\n addtrack: 'addtrack',\n removetrack: 'removetrack'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (let event in TextTrackList.prototype.allowedEvents_) {\n TextTrackList.prototype['on' + event] = null;\n}\n\nexport default TextTrackList;\n","/**\n * @file text-track-settings.js\n */\nimport Component from '../component';\nimport * as Events from '../utils/events.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport window from 'global/window';\n\n/**\n * Manipulate settings of texttracks\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class TextTrackSettings\n */\nclass TextTrackSettings extends Component {\n\n constructor(player, options) {\n super(player, options);\n this.hide();\n\n // Grab `persistTextTrackSettings` from the player options if not passed in child options\n if (options.persistTextTrackSettings === undefined) {\n this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n }\n\n Events.on(this.$('.vjs-done-button'), 'click', Fn.bind(this, function() {\n this.saveSettings();\n this.hide();\n }));\n\n Events.on(this.$('.vjs-default-button'), 'click', Fn.bind(this, function() {\n this.$('.vjs-fg-color > select').selectedIndex = 0;\n this.$('.vjs-bg-color > select').selectedIndex = 0;\n this.$('.window-color > select').selectedIndex = 0;\n this.$('.vjs-text-opacity > select').selectedIndex = 0;\n this.$('.vjs-bg-opacity > select').selectedIndex = 0;\n this.$('.vjs-window-opacity > select').selectedIndex = 0;\n this.$('.vjs-edge-style select').selectedIndex = 0;\n this.$('.vjs-font-family select').selectedIndex = 0;\n this.$('.vjs-font-percent select').selectedIndex = 2;\n this.updateDisplay();\n }));\n\n Events.on(this.$('.vjs-fg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.window-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-text-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-window-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-percent select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-edge-style select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-family select'), 'change', Fn.bind(this, this.updateDisplay));\n\n if (this.options_.persistTextTrackSettings) {\n this.restoreSettings();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-caption-settings vjs-modal-overlay',\n innerHTML: captionOptionsMenuTemplate()\n });\n }\n\n /**\n * Get texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @return {Object}\n * @method getValues\n */\n getValues() {\n const textEdge = getSelectedOptionValue(this.$('.vjs-edge-style select'));\n const fontFamily = getSelectedOptionValue(this.$('.vjs-font-family select'));\n const fgColor = getSelectedOptionValue(this.$('.vjs-fg-color > select'));\n const textOpacity = getSelectedOptionValue(this.$('.vjs-text-opacity > select'));\n const bgColor = getSelectedOptionValue(this.$('.vjs-bg-color > select'));\n const bgOpacity = getSelectedOptionValue(this.$('.vjs-bg-opacity > select'));\n const windowColor = getSelectedOptionValue(this.$('.window-color > select'));\n const windowOpacity = getSelectedOptionValue(this.$('.vjs-window-opacity > select'));\n const fontPercent = window['parseFloat'](getSelectedOptionValue(this.$('.vjs-font-percent > select')));\n\n let result = {\n 'backgroundOpacity': bgOpacity,\n 'textOpacity': textOpacity,\n 'windowOpacity': windowOpacity,\n 'edgeStyle': textEdge,\n 'fontFamily': fontFamily,\n 'color': fgColor,\n 'backgroundColor': bgColor,\n 'windowColor': windowColor,\n 'fontPercent': fontPercent\n };\n for (let name in result) {\n if (result[name] === '' || result[name] === 'none' || (name === 'fontPercent' && result[name] === 1.00)) {\n delete result[name];\n }\n }\n return result;\n }\n\n /**\n * Set texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @param {Object} values Object with texttrack setting values\n * @method setValues\n */\n setValues(values) {\n setSelectedOption(this.$('.vjs-edge-style select'), values.edgeStyle);\n setSelectedOption(this.$('.vjs-font-family select'), values.fontFamily);\n setSelectedOption(this.$('.vjs-fg-color > select'), values.color);\n setSelectedOption(this.$('.vjs-text-opacity > select'), values.textOpacity);\n setSelectedOption(this.$('.vjs-bg-color > select'), values.backgroundColor);\n setSelectedOption(this.$('.vjs-bg-opacity > select'), values.backgroundOpacity);\n setSelectedOption(this.$('.window-color > select'), values.windowColor);\n setSelectedOption(this.$('.vjs-window-opacity > select'), values.windowOpacity);\n\n let fontPercent = values.fontPercent;\n\n if (fontPercent) {\n fontPercent = fontPercent.toFixed(2);\n }\n\n setSelectedOption(this.$('.vjs-font-percent > select'), fontPercent);\n }\n\n /**\n * Restore texttrack settings\n *\n * @method restoreSettings\n */\n restoreSettings() {\n let err, values;\n\n try {\n [err, values] = safeParseTuple(window.localStorage.getItem('vjs-text-track-settings'));\n\n if (err) {\n log.error(err);\n }\n } catch (e) {\n log.warn(e);\n }\n\n if (values) {\n this.setValues(values);\n }\n }\n\n /**\n * Save texttrack settings to local storage\n *\n * @method saveSettings\n */\n saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n\n let values = this.getValues();\n try {\n if (Object.getOwnPropertyNames(values).length > 0) {\n window.localStorage.setItem('vjs-text-track-settings', JSON.stringify(values));\n } else {\n window.localStorage.removeItem('vjs-text-track-settings');\n }\n } catch (e) {\n log.warn(e);\n }\n }\n\n /**\n * Update display of texttrack settings\n *\n * @method updateDisplay\n */\n updateDisplay() {\n let ttDisplay = this.player_.getChild('textTrackDisplay');\n if (ttDisplay) {\n ttDisplay.updateDisplay();\n }\n }\n\n}\n\nComponent.registerComponent('TextTrackSettings', TextTrackSettings);\n\nfunction getSelectedOptionValue(target) {\n let selectedOption;\n // not all browsers support selectedOptions, so, fallback to options\n if (target.selectedOptions) {\n selectedOption = target.selectedOptions[0];\n } else if (target.options) {\n selectedOption = target.options[target.options.selectedIndex];\n }\n\n return selectedOption.value;\n}\n\nfunction setSelectedOption(target, value) {\n if (!value) {\n return;\n }\n\n let i;\n for (i = 0; i < target.options.length; i++) {\n const option = target.options[i];\n if (option.value === value) {\n break;\n }\n }\n\n target.selectedIndex = i;\n}\n\nfunction captionOptionsMenuTemplate() {\n let template = `
    \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    `;\n\n return template;\n}\n\nexport default TextTrackSettings;\n","/**\n * @file text-track.js\n */\nimport TextTrackCueList from './text-track-cue-list';\nimport * as Fn from '../utils/fn.js';\nimport * as Guid from '../utils/guid.js';\nimport * as browser from '../utils/browser.js';\nimport * as TextTrackEnum from './text-track-enums';\nimport log from '../utils/log.js';\nimport EventTarget from '../event-target';\nimport document from 'global/document';\nimport window from 'global/window';\nimport { isCrossOrigin } from '../utils/url.js';\nimport XHR from 'xhr';\n\n/**\n * takes a webvtt file contents and parses it into cues\n *\n * @param {String} srcContent webVTT file contents\n * @param {Track} track track to addcues to\n */\nconst parseCues = function(srcContent, track) {\n let parser = new window.WebVTT.Parser(window,\n window.vttjs,\n window.WebVTT.StringDecoder());\n\n parser.oncue = function(cue) {\n track.addCue(cue);\n };\n\n parser.onparsingerror = function(error) {\n log.error(error);\n };\n\n parser.onflush = function() {\n track.trigger({\n type: 'loadeddata',\n target: track\n });\n };\n\n parser.parse(srcContent);\n parser.flush();\n};\n\n\n/**\n * load a track from a specifed url\n *\n * @param {String} src url to load track from\n * @param {Track} track track to addcues to\n */\nconst loadTrack = function(src, track) {\n let opts = {\n uri: src\n };\n let crossOrigin = isCrossOrigin(src);\n\n if (crossOrigin) {\n opts.cors = crossOrigin;\n }\n\n XHR(opts, Fn.bind(this, function(err, response, responseBody) {\n if (err) {\n return log.error(err, response);\n }\n\n track.loaded_ = true;\n\n // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n // NOTE: this is only used for the alt/video.novtt.js build\n if (typeof window.WebVTT !== 'function') {\n if (track.tech_) {\n let loadHandler = () => parseCues(responseBody, track);\n track.tech_.on('vttjsloaded', loadHandler);\n track.tech_.on('vttjserror', () => {\n log.error(`vttjs failed to load, stopping trying to process ${track.src}`);\n track.tech_.off('vttjsloaded', loadHandler);\n });\n\n }\n } else {\n parseCues(responseBody, track);\n }\n\n }));\n};\n\n/**\n * A single text track as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack\n *\n * interface TextTrack : EventTarget {\n * readonly attribute TextTrackKind kind;\n * readonly attribute DOMString label;\n * readonly attribute DOMString language;\n *\n * readonly attribute DOMString id;\n * readonly attribute DOMString inBandMetadataTrackDispatchType;\n *\n * attribute TextTrackMode mode;\n *\n * readonly attribute TextTrackCueList? cues;\n * readonly attribute TextTrackCueList? activeCues;\n *\n * void addCue(TextTrackCue cue);\n * void removeCue(TextTrackCue cue);\n *\n * attribute EventHandler oncuechange;\n * };\n *\n * @param {Object=} options Object of option names and values\n * @extends EventTarget\n * @class TextTrack\n */\nclass TextTrack extends EventTarget {\n constructor(options = {}) {\n super();\n if (!options.tech) {\n throw new Error('A tech was not provided.');\n }\n\n let tt = this;\n\n if (browser.IS_IE8) {\n tt = document.createElement('custom');\n\n for (let prop in TextTrack.prototype) {\n if (prop !== 'constructor') {\n tt[prop] = TextTrack.prototype[prop];\n }\n }\n }\n\n tt.tech_ = options.tech;\n\n let mode = TextTrackEnum.TextTrackMode[options.mode] || 'disabled';\n let kind = TextTrackEnum.TextTrackKind[options.kind] || 'subtitles';\n let label = options.label || '';\n let language = options.language || options.srclang || '';\n let id = options.id || 'vjs_text_track_' + Guid.newGUID();\n\n if (kind === 'metadata' || kind === 'chapters') {\n mode = 'hidden';\n }\n\n tt.cues_ = [];\n tt.activeCues_ = [];\n\n let cues = new TextTrackCueList(tt.cues_);\n let activeCues = new TextTrackCueList(tt.activeCues_);\n let changed = false;\n let timeupdateHandler = Fn.bind(tt, function() {\n this.activeCues;\n if (changed) {\n this.trigger('cuechange');\n changed = false;\n }\n });\n\n if (mode !== 'disabled') {\n tt.tech_.on('timeupdate', timeupdateHandler);\n }\n\n Object.defineProperty(tt, 'kind', {\n get() {\n return kind;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'label', {\n get() {\n return label;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'language', {\n get() {\n return language;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'id', {\n get() {\n return id;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'mode', {\n get() {\n return mode;\n },\n set(newMode) {\n if (!TextTrackEnum.TextTrackMode[newMode]) {\n return;\n }\n mode = newMode;\n if (mode === 'showing') {\n this.tech_.on('timeupdate', timeupdateHandler);\n }\n this.trigger('modechange');\n }\n });\n\n Object.defineProperty(tt, 'cues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n return cues;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'activeCues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n // nothing to do\n if (this.cues.length === 0) {\n return activeCues;\n }\n\n let ct = this.tech_.currentTime();\n let active = [];\n\n for (let i = 0, l = this.cues.length; i < l; i++) {\n let cue = this.cues[i];\n\n if (cue.startTime <= ct && cue.endTime >= ct) {\n active.push(cue);\n } else if (cue.startTime === cue.endTime &&\n cue.startTime <= ct &&\n cue.startTime + 0.5 >= ct) {\n active.push(cue);\n }\n }\n\n changed = false;\n\n if (active.length !== this.activeCues_.length) {\n changed = true;\n } else {\n for (let i = 0; i < active.length; i++) {\n if (this.activeCues_.indexOf(active[i]) === -1) {\n changed = true;\n }\n }\n }\n\n this.activeCues_ = active;\n activeCues.setCues_(this.activeCues_);\n\n return activeCues;\n },\n set() {}\n });\n\n if (options.src) {\n tt.src = options.src;\n loadTrack(options.src, tt);\n } else {\n tt.loaded_ = true;\n }\n\n if (browser.IS_IE8) {\n return tt;\n }\n }\n\n /**\n * add a cue to the internal list of cues\n *\n * @param {Object} cue the cue to add to our internal list\n * @method addCue\n */\n addCue(cue) {\n let tracks = this.tech_.textTracks();\n\n if (tracks) {\n for (let i = 0; i < tracks.length; i++) {\n if (tracks[i] !== this) {\n tracks[i].removeCue(cue);\n }\n }\n }\n\n this.cues_.push(cue);\n this.cues.setCues_(this.cues_);\n }\n\n /**\n * remvoe a cue from our internal list\n *\n * @param {Object} removeCue the cue to remove from our internal list\n * @method removeCue\n */\n removeCue(removeCue) {\n let removed = false;\n\n for (let i = 0, l = this.cues_.length; i < l; i++) {\n let cue = this.cues_[i];\n\n if (cue === removeCue) {\n this.cues_.splice(i, 1);\n removed = true;\n }\n }\n\n if (removed) {\n this.cues.setCues_(this.cues_);\n }\n }\n}\n\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n */\nTextTrack.prototype.allowedEvents_ = {\n cuechange: 'cuechange'\n};\n\nexport default TextTrack;\n","/**\n * @file browser.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst USER_AGENT = window.navigator.userAgent;\nconst webkitVersionMap = (/AppleWebKit\\/([\\d.]+)/i).exec(USER_AGENT);\nconst appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\n\n/*\n * Device is an iPhone\n *\n * @type {Boolean}\n * @constant\n * @private\n */\nexport const IS_IPAD = (/iPad/i).test(USER_AGENT);\n\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\nexport const IS_IPHONE = (/iPhone/i).test(USER_AGENT) && !IS_IPAD;\nexport const IS_IPOD = (/iPod/i).test(USER_AGENT);\nexport const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\nexport const IOS_VERSION = (function(){\n var match = USER_AGENT.match(/OS (\\d+)_/i);\n if (match && match[1]) { return match[1]; }\n})();\n\nexport const IS_ANDROID = (/Android/i).test(USER_AGENT);\nexport const ANDROID_VERSION = (function() {\n // This matches Android Major.Minor.Patch versions\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i),\n major,\n minor;\n\n if (!match) {\n return null;\n }\n\n major = match[1] && parseFloat(match[1]);\n minor = match[2] && parseFloat(match[2]);\n\n if (major && minor) {\n return parseFloat(match[1] + '.' + match[2]);\n } else if (major) {\n return major;\n } else {\n return null;\n }\n})();\n// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser\nexport const IS_OLD_ANDROID = IS_ANDROID && (/webkit/i).test(USER_AGENT) && ANDROID_VERSION < 2.3;\nexport const IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\n\nexport const IS_FIREFOX = (/Firefox/i).test(USER_AGENT);\nexport const IS_CHROME = (/Chrome/i).test(USER_AGENT);\nexport const IS_IE8 = (/MSIE\\s8\\.0/).test(USER_AGENT);\n\nexport const TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);\nexport const BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in document.createElement('video').style;\n","/**\n * @file buffer.js\n */\nimport { createTimeRange } from './time-ranges.js';\n\n/**\n * Compute how much your video has been buffered\n *\n * @param {Object} Buffered object\n * @param {Number} Total duration\n * @return {Number} Percent buffered of the total duration\n * @private\n * @function bufferedPercent\n */\nexport function bufferedPercent(buffered, duration) {\n var bufferedDuration = 0,\n start, end;\n\n if (!duration) {\n return 0;\n }\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0, 0);\n }\n\n for (let i = 0; i < buffered.length; i++){\n start = buffered.start(i);\n end = buffered.end(i);\n\n // buffered end can be bigger than duration by a very small fraction\n if (end > duration) {\n end = duration;\n }\n\n bufferedDuration += end - start;\n }\n\n return bufferedDuration / duration;\n}\n","import log from './log.js';\n\n/**\n * Object containing the default behaviors for available handler methods.\n *\n * @private\n * @type {Object}\n */\nconst defaultBehaviors = {\n get(obj, key) {\n return obj[key];\n },\n set(obj, key, value) {\n obj[key] = value;\n return true;\n }\n};\n\n/**\n * Expose private objects publicly using a Proxy to log deprecation warnings.\n *\n * Browsers that do not support Proxy objects will simply return the `target`\n * object, so it can be directly exposed.\n *\n * @param {Object} target The target object.\n * @param {Object} messages Messages to display from a Proxy. Only operations\n * with an associated message will be proxied.\n * @param {String} [messages.get]\n * @param {String} [messages.set]\n * @return {Object} A Proxy if supported or the `target` argument.\n */\nexport default (target, messages={}) => {\n if (typeof Proxy === 'function') {\n let handler = {};\n\n // Build a handler object based on those keys that have both messages\n // and default behaviors.\n Object.keys(messages).forEach(key => {\n if (defaultBehaviors.hasOwnProperty(key)) {\n handler[key] = function() {\n log.warn(messages[key]);\n return defaultBehaviors[key].apply(this, arguments);\n };\n }\n });\n\n return new Proxy(target, handler);\n }\n return target;\n};\n","/**\n * @file dom.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Guid from './guid.js';\nimport log from './log.js';\nimport tsml from 'tsml';\n\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction isNonBlankString(str) {\n return typeof str === 'string' && /\\S/.test(str);\n}\n\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction throwIfWhitespace(str) {\n if (/\\s/.test(str)) {\n throw new Error('class has illegal whitespace characters');\n }\n}\n\n/**\n * Produce a regular expression for matching a class name.\n *\n * @param {String} className\n * @return {RegExp}\n */\nfunction classRegExp(className) {\n return new RegExp('(^|\\\\s)' + className + '($|\\\\s)');\n}\n\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @function createQuerier\n * @private\n * @param {String} method\n * @return {Function}\n */\nfunction createQuerier(method) {\n return function (selector, context) {\n if (!isNonBlankString(selector)) {\n return document[method](null);\n }\n if (isNonBlankString(context)) {\n context = document.querySelector(context);\n }\n return (isEl(context) ? context : document)[method](selector);\n };\n}\n\n/**\n * Shorthand for document.getElementById()\n * Also allows for CSS (jQuery) ID syntax. But nothing other than IDs.\n *\n * @param {String} id Element ID\n * @return {Element} Element with supplied ID\n * @function getEl\n */\nexport function getEl(id){\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n return document.getElementById(id);\n}\n\n/**\n * Creates an element and applies properties.\n *\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n * @function createEl\n */\nexport function createEl(tagName='div', properties={}, attributes={}){\n let el = document.createElement(tagName);\n\n Object.getOwnPropertyNames(properties).forEach(function(propName){\n let val = properties[propName];\n\n // See #2176\n // We originally were accepting both properties and attributes in the\n // same object, but that doesn't work so well.\n if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\n log.warn(tsml`Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ${propName} to ${val}.`);\n el.setAttribute(propName, val);\n } else {\n el[propName] = val;\n }\n });\n\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let val = attributes[attrName];\n el.setAttribute(attrName, attributes[attrName]);\n });\n\n return el;\n}\n\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param {Element} el\n * @param {String} text\n * @return {Element}\n * @function textContent\n */\nexport function textContent(el, text) {\n if (typeof el.textContent === 'undefined') {\n el.innerText = text;\n } else {\n el.textContent = text;\n }\n}\n\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child Element to insert\n * @param {Element} parent Element to insert child into\n * @private\n * @function insertElFirst\n */\nexport function insertElFirst(child, parent){\n if (parent.firstChild) {\n parent.insertBefore(child, parent.firstChild);\n } else {\n parent.appendChild(child);\n }\n}\n\n/**\n * Element Data Store. Allows for binding data to an element without putting it directly on the element.\n * Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\nconst elData = {};\n\n/*\n * Unique attribute name to store an element's guid in\n *\n * @type {String}\n * @constant\n * @private\n */\nconst elIdAttr = 'vdata' + (new Date()).getTime();\n\n/**\n * Returns the cache object where data for an element is stored\n *\n * @param {Element} el Element to store data for.\n * @return {Object}\n * @function getElData\n */\nexport function getElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n id = el[elIdAttr] = Guid.newGUID();\n }\n\n if (!elData[id]) {\n elData[id] = {};\n }\n\n return elData[id];\n}\n\n/**\n * Returns whether or not an element has cached data\n *\n * @param {Element} el A dom element\n * @return {Boolean}\n * @private\n * @function hasElData\n */\nexport function hasElData(el) {\n const id = el[elIdAttr];\n\n if (!id) {\n return false;\n }\n\n return !!Object.getOwnPropertyNames(elData[id]).length;\n}\n\n/**\n * Delete data for the element from the cache and the guid attr from getElementById\n *\n * @param {Element} el Remove data for an element\n * @private\n * @function removeElData\n */\nexport function removeElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n return;\n }\n\n // Remove all stored data\n delete elData[id];\n\n // Remove the elIdAttr property from the DOM node\n try {\n delete el[elIdAttr];\n } catch(e) {\n if (el.removeAttribute) {\n el.removeAttribute(elIdAttr);\n } else {\n // IE doesn't appear to support removeAttribute on the document element\n el[elIdAttr] = null;\n }\n }\n}\n\n/**\n * Check if an element has a CSS class\n *\n * @function hasElClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nexport function hasElClass(element, classToCheck) {\n if (element.classList) {\n return element.classList.contains(classToCheck);\n } else {\n throwIfWhitespace(classToCheck);\n return classRegExp(classToCheck).test(element.className);\n }\n}\n\n/**\n * Add a CSS class name to an element\n *\n * @function addElClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nexport function addElClass(element, classToAdd) {\n if (element.classList) {\n element.classList.add(classToAdd);\n\n // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\n // in the case of classList not being supported.\n } else if (!hasElClass(element, classToAdd)) {\n element.className = (element.className + ' ' + classToAdd).trim();\n }\n\n return element;\n}\n\n/**\n * Remove a CSS class name from an element\n *\n * @function removeElClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nexport function removeElClass(element, classToRemove) {\n if (element.classList) {\n element.classList.remove(classToRemove);\n } else {\n throwIfWhitespace(classToRemove);\n element.className = element.className.split(/\\s+/).filter(function(c) {\n return c !== classToRemove;\n }).join(' ');\n }\n\n return element;\n}\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @function toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nexport function toggleElClass(element, classToToggle, predicate) {\n\n // This CANNOT use `classList` internally because IE does not support the\n // second parameter to the `classList.toggle()` method! Which is fine because\n // `classList` will be used by the add/remove functions.\n let has = hasElClass(element, classToToggle);\n\n if (typeof predicate === 'function') {\n predicate = predicate(element, classToToggle);\n }\n\n if (typeof predicate !== 'boolean') {\n predicate = !has;\n }\n\n // If the necessary class operation matches the current state of the\n // element, no action is required.\n if (predicate === has) {\n return;\n }\n\n if (predicate) {\n addElClass(element, classToToggle);\n } else {\n removeElClass(element, classToToggle);\n }\n\n return element;\n}\n\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n * @private\n * @function setElAttributes\n */\nexport function setElAttributes(el, attributes) {\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let attrValue = attributes[attrName];\n\n if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n el.removeAttribute(attrName);\n } else {\n el.setAttribute(attrName, (attrValue === true ? '' : attrValue));\n }\n });\n}\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n * @private\n * @function getElAttributes\n */\nexport function getElAttributes(tag) {\n var obj, knownBooleans, attrs, attrName, attrVal;\n\n obj = {};\n\n // known boolean attributes\n // we can check for matching boolean properties, but older browsers\n // won't know about HTML5 boolean attributes that we still read from\n knownBooleans = ','+'autoplay,controls,loop,muted,default'+',';\n\n if (tag && tag.attributes && tag.attributes.length > 0) {\n attrs = tag.attributes;\n\n for (var i = attrs.length - 1; i >= 0; i--) {\n attrName = attrs[i].name;\n attrVal = attrs[i].value;\n\n // check for known booleans\n // the matching element property will return a value for typeof\n if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(','+attrName+',') !== -1) {\n // the value of an included boolean attribute is typically an empty\n // string ('') which would equal false if we just check for a false value.\n // we also don't want support bad code like autoplay='false'\n attrVal = (attrVal !== null) ? true : false;\n }\n\n obj[attrName] = attrVal;\n }\n }\n\n return obj;\n}\n\n/**\n * Attempt to block the ability to select text while dragging controls\n *\n * @return {Boolean}\n * @function blockTextSelection\n */\nexport function blockTextSelection() {\n document.body.focus();\n document.onselectstart = function() {\n return false;\n };\n}\n\n/**\n * Turn off text selection blocking\n *\n * @return {Boolean}\n * @function unblockTextSelection\n */\nexport function unblockTextSelection() {\n document.onselectstart = function() {\n return true;\n };\n}\n\n/**\n * Offset Left\n * getBoundingClientRect technique from\n * John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @function findElPosition\n * @param {Element} el Element from which to get offset\n * @return {Object}\n */\nexport function findElPosition(el) {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = box.left + scrollLeft - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = box.top + scrollTop - clientTop;\n\n // Android sometimes returns slightly off decimal values, so need to round\n return {\n left: Math.round(left),\n top: Math.round(top)\n };\n}\n\n/**\n * Get pointer position in element\n * Returns an object with x and y coordinates.\n * The base on the coordinates are the bottom left of the element.\n *\n * @function getPointerPosition\n * @param {Element} el Element on which to get the pointer position on\n * @param {Event} event Event object\n * @return {Object} This object will have x and y coordinates corresponding to the mouse position\n */\nexport function getPointerPosition(el, event) {\n let position = {};\n let box = findElPosition(el);\n let boxW = el.offsetWidth;\n let boxH = el.offsetHeight;\n\n let boxY = box.top;\n let boxX = box.left;\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, ((boxY - pageY) + boxH) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @function isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isEl(value) {\n return !!value && typeof value === 'object' && value.nodeType === 1;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isTextNode(value) {\n return !!value && typeof value === 'object' && value.nodeType === 3;\n}\n\n/**\n * Empties the contents of an element.\n *\n * @function emptyEl\n * @param {Element} el\n * @return {Element}\n */\nexport function emptyEl(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n return el;\n}\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but protects\n * from falling into the trap of simply writing to `innerHTML`, which is\n * an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @function normalizeContent\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Array}\n */\nexport function normalizeContent(content) {\n\n // First, invoke content if it is a function. If it produces an array,\n // that needs to happen before normalization.\n if (typeof content === 'function') {\n content = content();\n }\n\n // Next up, normalize to an array, so one or many items can be normalized,\n // filtered, and returned.\n return (Array.isArray(content) ? content : [content]).map(value => {\n\n // First, invoke value if it is a function to produce a new value,\n // which will be subsequently normalized to a Node of some kind.\n if (typeof value === 'function') {\n value = value();\n }\n\n if (isEl(value) || isTextNode(value)) {\n return value;\n }\n\n if (typeof value === 'string' && /\\S/.test(value)) {\n return document.createTextNode(value);\n }\n }).filter(value => value);\n}\n\n/**\n * Normalizes and appends content to an element.\n *\n * @function appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function appendContent(el, content) {\n normalizeContent(content).forEach(node => el.appendChild(node));\n return el;\n}\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @function insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function insertContent(el, content) {\n return appendContent(emptyEl(el), content);\n}\n\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\nexport const $ = createQuerier('querySelector');\n\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\nexport const $$ = createQuerier('querySelectorAll');\n","/**\n * @file events.js\n *\n * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n */\n\nimport * as Dom from './dom.js';\nimport * as Guid from './guid.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nexport function on(elem, type, fn){\n if (Array.isArray(type)) {\n return _handleMultipleEvents(on, elem, type, fn);\n }\n\n let data = Dom.getElData(elem);\n\n // We need a place to store all our handler data\n if (!data.handlers) data.handlers = {};\n\n if (!data.handlers[type]) data.handlers[type] = [];\n\n if (!fn.guid) fn.guid = Guid.newGUID();\n\n data.handlers[type].push(fn);\n\n if (!data.dispatcher) {\n data.disabled = false;\n\n data.dispatcher = function (event, hash){\n\n if (data.disabled) return;\n event = fixEvent(event);\n\n var handlers = data.handlers[event.type];\n\n if (handlers) {\n // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n var handlersCopy = handlers.slice(0);\n\n for (var m = 0, n = handlersCopy.length; m < n; m++) {\n if (event.isImmediatePropagationStopped()) {\n break;\n } else {\n handlersCopy[m].call(elem, event, hash);\n }\n }\n }\n };\n }\n\n if (data.handlers[type].length === 1) {\n if (elem.addEventListener) {\n elem.addEventListener(type, data.dispatcher, false);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + type, data.dispatcher);\n }\n }\n}\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nexport function off(elem, type, fn) {\n // Don't want to add a cache object through getElData if not needed\n if (!Dom.hasElData(elem)) return;\n\n let data = Dom.getElData(elem);\n\n // If no events exist, nothing to unbind\n if (!data.handlers) { return; }\n\n if (Array.isArray(type)) {\n return _handleMultipleEvents(off, elem, type, fn);\n }\n\n // Utility function\n var removeType = function(t){\n data.handlers[t] = [];\n _cleanUpEvents(elem,t);\n };\n\n // Are we removing all bound events?\n if (!type) {\n for (let t in data.handlers) removeType(t);\n return;\n }\n\n var handlers = data.handlers[type];\n\n // If no handlers exist, nothing to unbind\n if (!handlers) return;\n\n // If no listener was provided, remove all listeners for type\n if (!fn) {\n removeType(type);\n return;\n }\n\n // We're only removing a single handler\n if (fn.guid) {\n for (let n = 0; n < handlers.length; n++) {\n if (handlers[n].guid === fn.guid) {\n handlers.splice(n--, 1);\n }\n }\n }\n\n _cleanUpEvents(elem, type);\n}\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nexport function trigger(elem, event, hash) {\n // Fetches element data and a reference to the parent (for bubbling).\n // Don't want to add a data object to cache for every parent,\n // so checking hasElData first.\n var elemData = (Dom.hasElData(elem)) ? Dom.getElData(elem) : {};\n var parent = elem.parentNode || elem.ownerDocument;\n // type = event.type || event,\n // handler;\n\n // If an event name was passed as a string, creates an event out of it\n if (typeof event === 'string') {\n event = { type:event, target:elem };\n }\n // Normalizes the event properties.\n event = fixEvent(event);\n\n // If the passed element has a dispatcher, executes the established handlers.\n if (elemData.dispatcher) {\n elemData.dispatcher.call(elem, event, hash);\n }\n\n // Unless explicitly stopped or the event does not bubble (e.g. media events)\n // recursively calls this function to bubble the event up the DOM.\n if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n trigger.call(null, parent, event, hash);\n\n // If at the top of the DOM, triggers the default action unless disabled.\n } else if (!parent && !event.defaultPrevented) {\n var targetData = Dom.getElData(event.target);\n\n // Checks if the target has a default action for this event.\n if (event.target[event.type]) {\n // Temporarily disables event dispatching on the target as we have already executed the handler.\n targetData.disabled = true;\n // Executes the default action.\n if (typeof event.target[event.type] === 'function') {\n event.target[event.type]();\n }\n // Re-enables event dispatching.\n targetData.disabled = false;\n }\n }\n\n // Inform the triggerer if the default was prevented by returning false\n return !event.defaultPrevented;\n}\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nexport function one(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(one, elem, type, fn);\n }\n var func = function(){\n off(elem, type, func);\n fn.apply(this, arguments);\n };\n // copy the guid to the new function so it can removed using the original function's ID\n func.guid = fn.guid = fn.guid || Guid.newGUID();\n on(elem, type, func);\n}\n\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event Event object to fix\n * @return {Object}\n * @private\n * @method fixEvent\n */\nexport function fixEvent(event) {\n\n function returnTrue() { return true; }\n function returnFalse() { return false; }\n\n // Test if fixing up is needed\n // Used to check if !event.stopPropagation instead of isPropagationStopped\n // But native events return true for stopPropagation, but don't have\n // other expected methods like isPropagationStopped. Seems to be a problem\n // with the Javascript Ninja code. So we're just overriding all events now.\n if (!event || !event.isPropagationStopped) {\n var old = event || window.event;\n\n event = {};\n // Clone the old object so that we can modify the values event = {};\n // IE8 Doesn't like when you mess with native event properties\n // Firefox returns false for event.hasOwnProperty('type') and other props\n // which makes copying more difficult.\n // TODO: Probably best to create a whitelist of event props\n for (var key in old) {\n // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n // and webkitMovementX/Y\n if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' &&\n key !== 'webkitMovementX' && key !== 'webkitMovementY') {\n // Chrome 32+ warns if you try to copy deprecated returnValue, but\n // we still want to if preventDefault isn't supported (IE8).\n if (!(key === 'returnValue' && old.preventDefault)) {\n event[key] = old[key];\n }\n }\n }\n\n // The event occurred on this element\n if (!event.target) {\n event.target = event.srcElement || document;\n }\n\n // Handle which other element the event is related to\n if (!event.relatedTarget) {\n event.relatedTarget = event.fromElement === event.target ?\n event.toElement :\n event.fromElement;\n }\n\n // Stop the default browser action\n event.preventDefault = function () {\n if (old.preventDefault) {\n old.preventDefault();\n }\n event.returnValue = false;\n old.returnValue = false;\n event.defaultPrevented = true;\n };\n\n event.defaultPrevented = false;\n\n // Stop the event from bubbling\n event.stopPropagation = function () {\n if (old.stopPropagation) {\n old.stopPropagation();\n }\n event.cancelBubble = true;\n old.cancelBubble = true;\n event.isPropagationStopped = returnTrue;\n };\n\n event.isPropagationStopped = returnFalse;\n\n // Stop the event from bubbling and executing other handlers\n event.stopImmediatePropagation = function () {\n if (old.stopImmediatePropagation) {\n old.stopImmediatePropagation();\n }\n event.isImmediatePropagationStopped = returnTrue;\n event.stopPropagation();\n };\n\n event.isImmediatePropagationStopped = returnFalse;\n\n // Handle mouse position\n if (event.clientX != null) {\n var doc = document.documentElement, body = document.body;\n\n event.pageX = event.clientX +\n (doc && doc.scrollLeft || body && body.scrollLeft || 0) -\n (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = event.clientY +\n (doc && doc.scrollTop || body && body.scrollTop || 0) -\n (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // Handle key presses\n event.which = event.charCode || event.keyCode;\n\n // Fix button for mouse clicks:\n // 0 == left; 1 == middle; 2 == right\n if (event.button != null) {\n event.button = (event.button & 1 ? 0 :\n (event.button & 4 ? 1 :\n (event.button & 2 ? 2 : 0)));\n }\n }\n\n // Returns fixed-up instance\n return event;\n}\n\n/**\n * Clean up the listener cache and dispatchers\n*\n * @param {Element|Object} elem Element to clean up\n * @param {String} type Type of event to clean up\n * @private\n * @method _cleanUpEvents\n */\nfunction _cleanUpEvents(elem, type) {\n var data = Dom.getElData(elem);\n\n // Remove the events of a particular type if there are none left\n if (data.handlers[type].length === 0) {\n delete data.handlers[type];\n // data.handlers[type] = null;\n // Setting to null was causing an error with data.handlers\n\n // Remove the meta-handler from the element\n if (elem.removeEventListener) {\n elem.removeEventListener(type, data.dispatcher, false);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + type, data.dispatcher);\n }\n }\n\n // Remove the events object if there are no types left\n if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n delete data.handlers;\n delete data.dispatcher;\n delete data.disabled;\n }\n\n // Finally remove the element data if there is no data left\n if (Object.getOwnPropertyNames(data).length === 0) {\n Dom.removeElData(elem);\n }\n}\n\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn The event method we want to use.\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String} type Type of event to bind to.\n * @param {Function} callback Event listener.\n * @private\n * @function _handleMultipleEvents\n */\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n types.forEach(function(type) {\n //Call the event method for each one of the types\n fn(elem, type, callback);\n });\n}\n","/**\n * @file fn.js\n */\nimport { newGUID } from './guid.js';\n\n/**\n * Bind (a.k.a proxy or Context). A simple method for changing the context of a function\n * It also stores a unique id on the function so it can be easily removed from events\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n * @private\n * @method bind\n */\nexport const bind = function(context, fn, uid) {\n // Make sure the function has a unique ID\n if (!fn.guid) { fn.guid = newGUID(); }\n\n // Create the new function that changes the context\n let ret = function() {\n return fn.apply(context, arguments);\n };\n\n // Allow for the ability to individualize this function\n // Needed in the case where multiple objects might share the same prototype\n // IF both items add an event listener with the same function, then you try to remove just one\n // it will remove both because they both have the same guid.\n // when using this, you need to use the bind method when you remove the listener as well.\n // currently used in text tracks\n ret.guid = (uid) ? uid + '_' + fn.guid : fn.guid;\n\n return ret;\n};\n","/**\n * @file format-time.js\n *\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @private\n * @function formatTime\n */\nfunction formatTime(seconds, guide=seconds) {\n seconds = seconds < 0 ? 0 : seconds;\n let s = Math.floor(seconds % 60);\n let m = Math.floor(seconds / 60 % 60);\n let h = Math.floor(seconds / 3600);\n const gm = Math.floor(guide / 60 % 60);\n const gh = Math.floor(guide / 3600);\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-';\n }\n\n // Check if we need to show hours\n h = (h > 0 || gh > 0) ? h + ':' : '';\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = (((h || gm >= 10) && m < 10) ? '0' + m : m) + ':';\n\n // Check if leading zero is need for seconds\n s = (s < 10) ? '0' + s : s;\n\n return h + m + s;\n}\n\nexport default formatTime;\n","/**\n * @file guid.js\n *\n * Unique ID for an element or function\n * @type {Number}\n * @private\n */\nlet _guid = 1;\n\n/**\n * Get the next unique ID\n *\n * @return {String} \n * @function newGUID\n */\nexport function newGUID() {\n return _guid++;\n}\n","/**\n * @file log.js\n */\nimport window from 'global/window';\n\n/**\n * Log plain debug messages\n */\nconst log = function(){\n _logType(null, arguments);\n};\n\n/**\n * Keep a history of log messages\n * @type {Array}\n */\nlog.history = [];\n\n/**\n * Log error messages\n */\nlog.error = function(){\n _logType('error', arguments);\n};\n\n/**\n * Log warning messages\n */\nlog.warn = function(){\n _logType('warn', arguments);\n};\n\n/**\n * Log messages to the console and history based on the type of message\n *\n * @param {String} type The type of message, or `null` for `log`\n * @param {Object} args The args to be passed to the log\n * @private\n * @method _logType\n */\nfunction _logType(type, args){\n // convert args to an array to get array functions\n let argsArray = Array.prototype.slice.call(args);\n // if there's no console then don't try to output messages\n // they will still be stored in log.history\n // Was setting these once outside of this function, but containing them\n // in the function makes it easier to test cases where console doesn't exist\n let noop = function(){};\n\n let console = window['console'] || {\n 'log': noop,\n 'warn': noop,\n 'error': noop\n };\n\n if (type) {\n // add the type to the front of the message\n argsArray.unshift(type.toUpperCase()+':');\n } else {\n // default to log with no prefix\n type = 'log';\n }\n\n // add to history\n log.history.push(argsArray);\n\n // add console prefix after adding to history\n argsArray.unshift('VIDEOJS:');\n\n // call appropriate log function\n if (console[type].apply) {\n console[type].apply(console, argsArray);\n } else {\n // ie8 doesn't allow error.apply, but it will just join() the array anyway\n console[type](argsArray.join(' '));\n }\n}\n\nexport default log;\n","/**\n * @file merge-options.js\n */\nimport merge from 'lodash-compat/object/merge';\n\nfunction isPlain(obj) {\n return !!obj\n && typeof obj === 'object'\n && obj.toString() === '[object Object]'\n && obj.constructor === Object;\n}\n\n/**\n * Merge customizer. video.js simply overwrites non-simple objects\n * (like arrays) instead of attempting to overlay them.\n * @see https://lodash.com/docs#merge\n */\nconst customizer = function(destination, source) {\n // If we're not working with a plain object, copy the value as is\n // If source is an array, for instance, it will replace destination\n if (!isPlain(source)) {\n return source;\n }\n\n // If the new value is a plain object but the first object value is not\n // we need to create a new object for the first object to merge with.\n // This makes it consistent with how merge() works by default\n // and also protects from later changes the to first object affecting\n // the second object's values.\n if (!isPlain(destination)) {\n return mergeOptions(source);\n }\n};\n\n/**\n * Merge one or more options objects, recursively merging **only**\n * plain object properties. Previously `deepMerge`.\n *\n * @param {...Object} source One or more objects to merge\n * @returns {Object} a new object that is the union of all\n * provided objects\n * @function mergeOptions\n */\nexport default function mergeOptions() {\n // contruct the call dynamically to handle the variable number of\n // objects to merge\n let args = Array.prototype.slice.call(arguments);\n\n // unshift an empty object into the front of the call as the target\n // of the merge\n args.unshift({});\n\n // customize conflict resolution to match our historical merge behavior\n args.push(customizer);\n\n merge.apply(null, args);\n\n // return the mutated result object\n return args[0];\n}\n","import document from 'global/document';\n\nexport let createStyleElement = function(className) {\n let style = document.createElement('style');\n style.className = className;\n\n return style;\n};\n\nexport let setTextContent = function(el, content) {\n if (el.styleSheet) {\n el.styleSheet.cssText = content;\n } else {\n el.textContent = content;\n }\n};\n","import log from './log.js';\n\n/**\n * @file time-ranges.js\n *\n * Should create a fake TimeRange object\n * Mimics an HTML5 time range instance, which has functions that\n * return the start and end times for a range\n * TimeRanges are returned by the buffered() method\n *\n * @param {(Number|Array)} Start of a single range or an array of ranges\n * @param {Number} End of a single range\n * @private\n * @method createTimeRanges\n */\nexport function createTimeRanges(start, end){\n if (Array.isArray(start)) {\n return createTimeRangesObj(start);\n } else if (start === undefined || end === undefined) {\n return createTimeRangesObj();\n }\n return createTimeRangesObj([[start, end]]);\n}\n\nexport { createTimeRanges as createTimeRange };\n\nfunction createTimeRangesObj(ranges){\n if (ranges === undefined || ranges.length === 0) {\n return {\n length: 0,\n start: function() {\n throw new Error('This TimeRanges object is empty');\n },\n end: function() {\n throw new Error('This TimeRanges object is empty');\n }\n };\n }\n return {\n length: ranges.length,\n start: getRange.bind(null, 'start', 0, ranges),\n end: getRange.bind(null, 'end', 1, ranges)\n };\n}\n\nfunction getRange(fnName, valueIndex, ranges, rangeIndex){\n if (rangeIndex === undefined) {\n log.warn(`DEPRECATED: Function '${fnName}' on 'TimeRanges' called without an index argument.`);\n rangeIndex = 0;\n }\n rangeCheck(fnName, rangeIndex, ranges.length - 1);\n return ranges[rangeIndex][valueIndex];\n}\n\nfunction rangeCheck(fnName, index, maxIndex){\n if (index < 0 || index > maxIndex) {\n throw new Error(`Failed to execute '${fnName}' on 'TimeRanges': The index provided (${index}) is greater than or equal to the maximum bound (${maxIndex}).`);\n }\n}\n","/**\n * @file to-title-case.js\n *\n * Uppercase the first letter of a string\n *\n * @param {String} string String to be uppercased\n * @return {String}\n * @private\n * @method toTitleCase\n */\nfunction toTitleCase(string){\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport default toTitleCase;\n","/**\n * @file url.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nexport const parseUrl = function(url) {\n const props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];\n\n // add the url to an anchor and let the browser parse the URL\n let a = document.createElement('a');\n a.href = url;\n\n // IE8 (and 9?) Fix\n // ie8 doesn't parse the URL correctly until the anchor is actually\n // added to the body, and an innerHTML is needed to trigger the parsing\n let addToBody = (a.host === '' && a.protocol !== 'file:');\n let div;\n if (addToBody) {\n div = document.createElement('div');\n div.innerHTML = ``;\n a = div.firstChild;\n // prevent the div from affecting layout\n div.setAttribute('style', 'display:none; position:absolute;');\n document.body.appendChild(div);\n }\n\n // Copy the specific URL properties to a new object\n // This is also needed for IE8 because the anchor loses its\n // properties when it's removed from the dom\n let details = {};\n for (var i = 0; i < props.length; i++) {\n details[props[i]] = a[props[i]];\n }\n\n // IE9 adds the port to the host property unlike everyone else. If\n // a port identifier is added for standard ports, strip it.\n if (details.protocol === 'http:') {\n details.host = details.host.replace(/:80$/, '');\n }\n if (details.protocol === 'https:') {\n details.host = details.host.replace(/:443$/, '');\n }\n\n if (addToBody) {\n document.body.removeChild(div);\n }\n\n return details;\n};\n\n/**\n * Get absolute version of relative URL. Used to tell flash correct URL.\n * http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n *\n * @param {String} url URL to make absolute\n * @return {String} Absolute URL\n * @private\n * @method getAbsoluteURL\n */\nexport const getAbsoluteURL = function(url){\n // Check if absolute URL\n if (!url.match(/^https?:\\/\\//)) {\n // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\n let div = document.createElement('div');\n div.innerHTML = `x`;\n url = div.firstChild.href;\n }\n\n return url;\n};\n\n/**\n * Returns the extension of the passed file name. It will return an empty string if you pass an invalid path\n *\n * @param {String} path The fileName path like '/path/to/file.mp4'\n * @returns {String} The extension in lower case or an empty string if no extension could be found.\n * @method getFileExtension\n */\nexport const getFileExtension = function(path) {\n if(typeof path === 'string'){\n let splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/i;\n let pathParts = splitPathRe.exec(path);\n\n if (pathParts) {\n return pathParts.pop().toLowerCase();\n }\n }\n\n return '';\n};\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nexport const isCrossOrigin = function(url) {\n let winLoc = window.location;\n let urlInfo = parseUrl(url);\n\n // IE8 protocol relative urls will return ':' for protocol\n let srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;\n\n // Check if url is for another domain/origin\n // IE8 doesn't know location.origin, so we won't rely on it here\n let crossOrigin = (srcProtocol + urlInfo.host) !== (winLoc.protocol + winLoc.host);\n\n return crossOrigin;\n};\n","/**\n * @file video.js\n */\nimport window from 'global/window';\nimport document from 'global/document';\nimport * as setup from './setup';\nimport * as stylesheet from './utils/stylesheet.js';\nimport Component from './component';\nimport EventTarget from './event-target';\nimport * as Events from './utils/events.js';\nimport Player from './player';\nimport plugin from './plugins.js';\nimport mergeOptions from '../../src/js/utils/merge-options.js';\nimport * as Fn from './utils/fn.js';\nimport TextTrack from './tracks/text-track.js';\n\nimport assign from 'object.assign';\nimport { createTimeRanges } from './utils/time-ranges.js';\nimport formatTime from './utils/format-time.js';\nimport log from './utils/log.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\nimport * as Url from './utils/url.js';\nimport extendFn from './extend.js';\nimport merge from 'lodash-compat/object/merge';\nimport createDeprecationProxy from './utils/create-deprecation-proxy.js';\nimport xhr from 'xhr';\n\n// Include the built-in techs\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\nimport Flash from './tech/flash.js';\n\n// HTML5 Element Shim for IE8\nif (typeof HTMLVideoElement === 'undefined') {\n document.createElement('video');\n document.createElement('audio');\n document.createElement('track');\n}\n\n/**\n * Doubles as the main function for users to create a player instance and also\n * the main library object.\n * The `videojs` function can be used to initialize or retrieve a player.\n * ```js\n * var myPlayer = videojs('my_video_id');\n * ```\n *\n * @param {String|Element} id Video element or video element ID\n * @param {Object=} options Optional options object for config/settings\n * @param {Function=} ready Optional ready callback\n * @return {Player} A player instance\n * @mixes videojs\n * @method videojs\n */\nlet videojs = function(id, options, ready){\n let tag; // Element of ID\n\n // Allow for element or ID to be passed in\n // String ID\n if (typeof id === 'string') {\n\n // Adjust for jQuery ID syntax\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n // If a player instance has already been created for this ID return it.\n if (videojs.getPlayers()[id]) {\n\n // If options or ready funtion are passed, warn\n if (options) {\n log.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n }\n\n if (ready) {\n videojs.getPlayers()[id].ready(ready);\n }\n\n return videojs.getPlayers()[id];\n\n // Otherwise get element for ID\n } else {\n tag = Dom.getEl(id);\n }\n\n // ID is a media element\n } else {\n tag = id;\n }\n\n // Check for a useable element\n if (!tag || !tag.nodeName) { // re: nodeName, could be a box div also\n throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns\n }\n\n // Element may have a player attr referring to an already created player instance.\n // If not, set up a new player and return the instance.\n return tag['player'] || Player.players[tag.playerId] || new Player(tag, options, ready);\n};\n\n// Add default styles\nif (window.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\n let style = Dom.$('.vjs-styles-defaults');\n\n if (!style) {\n style = stylesheet.createStyleElement('vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(style, head.firstChild);\n stylesheet.setTextContent(style, `\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n `);\n }\n}\n\n// Run Auto-load players\n// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version)\nsetup.autoSetupTimeout(1, videojs);\n\n/*\n * Current software version (semver)\n *\n * @type {String}\n */\nvideojs.VERSION = '__VERSION__';\n\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * ```js\n * videojs.options.autoplay = true\n * // -> all players will autoplay by default\n * ```\n *\n * @type {Object}\n */\nvideojs.options = Player.prototype.options_;\n\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object} The created players\n * @mixes videojs\n * @method getPlayers\n */\nvideojs.getPlayers = function() {\n return Player.players;\n};\n\n/**\n * For backward compatibility, expose players object.\n *\n * @deprecated\n * @memberOf videojs\n * @property {Object|Proxy} players\n */\nvideojs.players = createDeprecationProxy(Player.players, {\n get: 'Access to videojs.players is deprecated; use videojs.getPlayers instead',\n set: 'Modification of videojs.players is deprecated'\n});\n\n/**\n * Get a component class object by name\n * ```js\n * var VjsButton = videojs.getComponent('Button');\n * // Create a new instance of the component\n * var myButton = new VjsButton(myPlayer);\n * ```\n *\n * @return {Component} Component identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getComponent = Component.getComponent;\n\n/**\n * Register a component so it can referred to by name\n * Used when adding to other\n * components, either through addChild\n * `component.addChild('myComponent')`\n * or through default children options\n * `{ children: ['myComponent'] }`.\n * ```js\n * // Get a component to subclass\n * var VjsButton = videojs.getComponent('Button');\n * // Subclass the component (see 'extend' doc for more info)\n * var MySpecialButton = videojs.extend(VjsButton, {});\n * // Register the new component\n * VjsButton.registerComponent('MySepcialButton', MySepcialButton);\n * // (optionally) add the new component as a default player child\n * myPlayer.addChild('MySepcialButton');\n * ```\n * NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {String} The class name of the component\n * @param {Component} The component class\n * @return {Component} The newly registered component\n * @mixes videojs\n * @method registerComponent\n */\nvideojs.registerComponent = (name, comp) => {\n if (Tech.isTech(comp)) {\n log.warn(`The ${name} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`);\n }\n\n Component.registerComponent.call(Component, name, comp);\n};\n\n/**\n * Get a Tech class object by name\n * ```js\n * var Html5 = videojs.getTech('Html5');\n * // Create a new instance of the component\n * var html5 = new Html5(options);\n * ```\n *\n * @return {Tech} Tech identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getTech = Tech.getTech;\n\n/**\n * Register a Tech so it can referred to by name.\n * This is used in the tech order for the player.\n *\n * ```js\n * // get the Html5 Tech\n * var Html5 = videojs.getTech('Html5');\n * var MyTech = videojs.extend(Html5, {});\n * // Register the new Tech\n * VjsButton.registerTech('Tech', MyTech);\n * var player = videojs('myplayer', {\n * techOrder: ['myTech', 'html5']\n * });\n * ```\n *\n * @param {String} The class name of the tech\n * @param {Tech} The tech class\n * @return {Tech} The newly registered Tech\n * @mixes videojs\n * @method registerTech\n */\nvideojs.registerTech = Tech.registerTech;\n\n/**\n * A suite of browser and device tests\n *\n * @type {Object}\n * @private\n */\nvideojs.browser = browser;\n\n/**\n * Whether or not the browser supports touch events. Included for backward\n * compatibility with 4.x, but deprecated. Use `videojs.browser.TOUCH_ENABLED`\n * instead going forward.\n *\n * @deprecated\n * @type {Boolean}\n */\nvideojs.TOUCH_ENABLED = browser.TOUCH_ENABLED;\n\n/**\n * Subclass an existing class\n * Mimics ES6 subclassing with the `extend` keyword\n * ```js\n * // Create a basic javascript 'class'\n * function MyClass(name){\n * // Set a property at initialization\n * this.myName = name;\n * }\n * // Create an instance method\n * MyClass.prototype.sayMyName = function(){\n * alert(this.myName);\n * };\n * // Subclass the exisitng class and change the name\n * // when initializing\n * var MySubClass = videojs.extend(MyClass, {\n * constructor: function(name) {\n * // Call the super class constructor for the subclass\n * MyClass.call(this, name)\n * }\n * });\n * // Create an instance of the new sub class\n * var myInstance = new MySubClass('John');\n * myInstance.sayMyName(); // -> should alert \"John\"\n * ```\n *\n * @param {Function} The Class to subclass\n * @param {Object} An object including instace methods for the new class\n * Optionally including a `constructor` function\n * @return {Function} The newly created subclass\n * @mixes videojs\n * @method extend\n */\nvideojs.extend = extendFn;\n\n/**\n * Merge two options objects recursively\n * Performs a deep merge like lodash.merge but **only merges plain objects**\n * (not arrays, elements, anything else)\n * Other values will be copied directly from the second object.\n * ```js\n * var defaultOptions = {\n * foo: true,\n * bar: {\n * a: true,\n * b: [1,2,3]\n * }\n * };\n * var newOptions = {\n * foo: false,\n * bar: {\n * b: [4,5,6]\n * }\n * };\n * var result = videojs.mergeOptions(defaultOptions, newOptions);\n * // result.foo = false;\n * // result.bar.a = true;\n * // result.bar.b = [4,5,6];\n * ```\n *\n * @param {Object} defaults The options object whose values will be overriden\n * @param {Object} overrides The options object with values to override the first\n * @param {Object} etc Any number of additional options objects\n *\n * @return {Object} a new object with the merged values\n * @mixes videojs\n * @method mergeOptions\n */\nvideojs.mergeOptions = mergeOptions;\n\n/**\n * Change the context (this) of a function\n *\n * videojs.bind(newContext, function(){\n * this === newContext\n * });\n *\n * NOTE: as of v5.0 we require an ES5 shim, so you should use the native\n * `function(){}.bind(newContext);` instead of this.\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n */\nvideojs.bind = Fn.bind;\n\n/**\n * Create a Video.js player plugin\n * Plugins are only initialized when options for the plugin are included\n * in the player options, or the plugin function on the player instance is\n * called.\n * **See the plugin guide in the docs for a more detailed example**\n * ```js\n * // Make a plugin that alerts when the player plays\n * videojs.plugin('myPlugin', function(myPluginOptions) {\n * myPluginOptions = myPluginOptions || {};\n *\n * var player = this;\n * var alertText = myPluginOptions.text || 'Player is playing!'\n *\n * player.on('play', function(){\n * alert(alertText);\n * });\n * });\n * // USAGE EXAMPLES\n * // EXAMPLE 1: New player with plugin options, call plugin immediately\n * var player1 = videojs('idOne', {\n * myPlugin: {\n * text: 'Custom text!'\n * }\n * });\n * // Click play\n * // --> Should alert 'Custom text!'\n * // EXAMPLE 3: New player, initialize plugin later\n * var player3 = videojs('idThree');\n * // Click play\n * // --> NO ALERT\n * // Click pause\n * // Initialize plugin using the plugin function on the player instance\n * player3.myPlugin({\n * text: 'Plugin added later!'\n * });\n * // Click play\n * // --> Should alert 'Plugin added later!'\n * ```\n *\n * @param {String} name The plugin name\n * @param {Function} fn The plugin function that will be called with options\n * @mixes videojs\n * @method plugin\n */\nvideojs.plugin = plugin;\n\n/**\n * Adding languages so that they're available to all players.\n * ```js\n * videojs.addLanguage('es', { 'Hello': 'Hola' });\n * ```\n *\n * @param {String} code The language code or dictionary property\n * @param {Object} data The data values to be translated\n * @return {Object} The resulting language dictionary object\n * @mixes videojs\n * @method addLanguage\n */\nvideojs.addLanguage = function(code, data){\n code = ('' + code).toLowerCase();\n return merge(videojs.options.languages, { [code]: data })[code];\n};\n\n/**\n * Log debug messages.\n *\n * @param {...Object} messages One or more messages to log\n */\nvideojs.log = log;\n\n/**\n * Creates an emulated TimeRange object.\n *\n * @param {Number|Array} start Start time in seconds or an array of ranges\n * @param {Number} end End time in seconds\n * @return {Object} Fake TimeRange object\n * @method createTimeRange\n */\nvideojs.createTimeRange = videojs.createTimeRanges = createTimeRanges;\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @method formatTime\n */\nvideojs.formatTime = formatTime;\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nvideojs.parseUrl = Url.parseUrl;\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nvideojs.isCrossOrigin = Url.isCrossOrigin;\n\n/**\n * Event target class.\n *\n * @type {Function}\n */\nvideojs.EventTarget = EventTarget;\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nvideojs.on = Events.on;\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nvideojs.one = Events.one;\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nvideojs.off = Events.off;\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nvideojs.trigger = Events.trigger;\n\n/**\n * A cross-browser XMLHttpRequest wrapper. Here's a simple example:\n *\n * videojs.xhr({\n * body: someJSONString,\n * uri: \"/foo\",\n * headers: {\n * \"Content-Type\": \"application/json\"\n * }\n * }, function (err, resp, body) {\n * // check resp.statusCode\n * });\n *\n * Check out the [full\n * documentation](https://github.com/Raynos/xhr/blob/v2.1.0/README.md)\n * for more options.\n *\n * @param {Object} options settings for the request.\n * @return {XMLHttpRequest|XDomainRequest} the request object.\n * @see https://github.com/Raynos/xhr\n */\nvideojs.xhr = xhr;\n\n/**\n * TextTrack class\n *\n * @type {Function}\n */\nvideojs.TextTrack = TextTrack;\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @method isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isEl = Dom.isEl;\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @method isTextNode\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isTextNode = Dom.isTextNode;\n\n/**\n * Creates an element and applies properties.\n *\n * @method createEl\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n */\nvideojs.createEl = Dom.createEl;\n\n/**\n * Check if an element has a CSS class\n *\n * @method hasClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nvideojs.hasClass = Dom.hasElClass;\n\n/**\n * Add a CSS class name to an element\n *\n * @method addClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nvideojs.addClass = Dom.addElClass;\n\n/**\n * Remove a CSS class name from an element\n *\n * @method removeClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nvideojs.removeClass = Dom.removeElClass;\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @method toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nvideojs.toggleClass = Dom.toggleElClass;\n\n/**\n * Apply attributes to an HTML element.\n *\n * @method setAttributes\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n */\nvideojs.setAttributes = Dom.setElAttributes;\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @method getAttributes\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n */\nvideojs.getAttributes = Dom.getElAttributes;\n\n/**\n * Empties the contents of an element.\n *\n * @method emptyEl\n * @param {Element} el\n * @return {Element}\n */\nvideojs.emptyEl = Dom.emptyEl;\n\n/**\n * Normalizes and appends content to an element.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.appendContent = Dom.appendContent;\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.insertContent = Dom.insertContent;\n\n/*\n * Custom Universal Module Definition (UMD)\n *\n * Video.js will never be a non-browser lib so we can simplify UMD a bunch and\n * still support requirejs and browserify. This also needs to be closure\n * compiler compatible, so string keys are used.\n */\nif (typeof define === 'function' && define['amd']) {\n define('videojs', [], function(){ return videojs; });\n\n// checking that module is an object too because of umdjs/umd#35\n} else if (typeof exports === 'object' && typeof module === 'object') {\n module['exports'] = videojs;\n}\n\nexport default videojs;\n"]} \ No newline at end of file -- cgit v1.2.1 From 3925436a9582ec35c0eb4fddaeeaf71c23076754 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 17:38:49 +0800 Subject: Use shared_examples, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13173599 --- spec/requests/api/builds_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 06ebe4a8dd3..c2541346a51 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -191,8 +191,8 @@ describe API::API, api: true do end context 'non-existing build' do - def verify - expect(response).to have_http_status(404) + shared_examples 'not found' do + it { expect(response).to have_http_status(:not_found) } end context 'has no such ref' do @@ -200,7 +200,7 @@ describe API::API, api: true do get path_for_ref('TAIL', build.name) end - it('gives 404') { verify } + it_behaves_like 'not found' end context 'has no such build' do @@ -208,7 +208,7 @@ describe API::API, api: true do get path_for_ref(pipeline.ref, 'NOBUILD') end - it('gives 404') { verify } + it_behaves_like 'not found' end end -- cgit v1.2.1 From 2fe8ebc143737390ea8ba952ad1b8ba4c82dae84 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 18:06:35 +0800 Subject: We need INNER JOIN to get the right pipeline, also added a test for checking this. --- app/models/project.rb | 2 +- spec/requests/api/builds_spec.rb | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 026fff0da0c..f2e9d607967 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,7 +431,7 @@ class Project < ActiveRecord::Base # ref can't be HEAD, can only be branch/tag name or SHA def latest_successful_builds_for(ref = default_branch) - builds.where(pipeline: pipelines.latest_successful_for(ref)). + Ci::Build.joins(:pipeline).merge(pipelines.latest_successful_for(ref)). latest_successful_with_artifacts end diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index c2541346a51..553b432c7c7 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -256,14 +256,17 @@ describe API::API, api: true do context 'with latest pipeline' do before do - pipelines = Array.new(3).map do # creating some old pipelines + old_pipelines = Array.new(3).map do # creating some old pipelines create(:ci_pipeline, status: 'success') end - pipelines.reverse_each do |pipe| - new_build = create(:ci_build, :success, pipeline: pipe) - new_build.update(artifacts_file: another_artifacts) + old_pipelines.reverse_each do |pipe| + old_build = create(:ci_build, :success, pipeline: pipe) + old_build.update(artifacts_file: another_artifacts) end + + wrong_build = create(:ci_build, :success, pipeline: pipeline) + wrong_build.update(artifacts_file: another_artifacts) end before do -- cgit v1.2.1 From 457adb942cecb8ff40adee08fbce6bb3816707dc Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 20 Jul 2016 12:08:52 +0200 Subject: prevent algorithm and key length issue for upgrades from an older GilLab version - 8.6 or earlier --- .../20160302152808_remove_wrong_import_url_from_projects.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb index ac7eac0ea7c..611767ac7fe 100644 --- a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb +++ b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb @@ -7,7 +7,13 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration class ProjectImportDataFake extend AttrEncrypted attr_accessor :credentials - attr_encrypted :credentials, key: Gitlab::Application.secrets.db_key_base, marshal: true, encode: true, :mode => :per_attribute_iv_and_salt + attr_encrypted :credentials, + key: Gitlab::Application.secrets.db_key_base, + marshal: true, + encode: true, + :mode => :per_attribute_iv_and_salt, + insecure_mode: true, + algorithm: 'aes-256-cbc' end def up -- cgit v1.2.1 From be75d0d287a6e28bcc154803ac0987b1171d2bf6 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 20 Jul 2016 12:13:53 +0200 Subject: added changelog --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index b1a713108c0..3d72836835a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -135,6 +135,7 @@ v 8.10.0 (unreleased) - Allow bulk (un)subscription from issues in issue index - Fix MR diff encoding issues exporting GitLab projects - Export and import avatar as part of project import/export + - Fix migration corrupting import data for old version upgrades v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 -- cgit v1.2.1 From 4f0780cc04af34aeaab40d75373d22f015893cb6 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Wed, 20 Jul 2016 11:14:06 +0100 Subject: Ensure to_json methods take optional argument --- lib/gitlab/diff/position.rb | 4 ++-- lib/gitlab/git_access_status.rb | 4 ++-- spec/lib/gitlab/diff/position_spec.rb | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/lib/gitlab/diff/position.rb b/lib/gitlab/diff/position.rb index 989fff8918e..2fdcf8d7838 100644 --- a/lib/gitlab/diff/position.rb +++ b/lib/gitlab/diff/position.rb @@ -73,8 +73,8 @@ module Gitlab diff_refs.complete? end - def to_json - JSON.generate(self.to_h) + def to_json(opts = nil) + JSON.generate(self.to_h, opts) end def type diff --git a/lib/gitlab/git_access_status.rb b/lib/gitlab/git_access_status.rb index 5a806ff6e0d..09bb01be694 100644 --- a/lib/gitlab/git_access_status.rb +++ b/lib/gitlab/git_access_status.rb @@ -8,8 +8,8 @@ module Gitlab @message = message end - def to_json - { status: @status, message: @message }.to_json + def to_json(opts = nil) + { status: @status, message: @message }.to_json(opts) end end end diff --git a/spec/lib/gitlab/diff/position_spec.rb b/spec/lib/gitlab/diff/position_spec.rb index cf28628cb96..10537bea008 100644 --- a/spec/lib/gitlab/diff/position_spec.rb +++ b/spec/lib/gitlab/diff/position_spec.rb @@ -338,4 +338,28 @@ describe Gitlab::Diff::Position, lib: true do end end end + + describe "#to_json" do + let(:hash) do + { + old_path: "files/ruby/popen.rb", + new_path: "files/ruby/popen.rb", + old_line: nil, + new_line: 14, + base_sha: nil, + head_sha: nil, + start_sha: nil + } + end + + let(:diff_position) { described_class.new(hash) } + + it "returns the position as JSON" do + expect(JSON.parse(diff_position.to_json)).to eq(hash.stringify_keys) + end + + it "works when nested under another hash" do + expect(JSON.parse(JSON.generate(pos: diff_position))).to eq('pos' => hash.stringify_keys) + end + end end -- cgit v1.2.1 From a8bfe20d0dbc79616ad69b0e9c1c985ba1887407 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 24 Jun 2016 18:29:23 +0200 Subject: Added checks for migration downtime These new checks can be used to check if migrations require downtime or not (as tagged by their authors). In CI this compares the current branch with master so migrations added by merge requests are automatically verified. To check the migrations added since a Git reference simply run: bundle exec rake gitlab:db:downtime_check[GIT_REF] --- .gitlab-ci.yml | 3 +- doc/development/migration_style_guide.md | 46 ++++----- .../migration/create_table_migration.rb | 8 ++ .../active_record/migration/migration.rb | 8 ++ lib/gitlab/downtime_check.rb | 71 +++++++++++++ lib/gitlab/downtime_check/message.rb | 28 +++++ lib/tasks/downtime_check.rake | 26 +++++ lib/tasks/gitlab/db.rake | 15 +++ spec/lib/gitlab/downtime_check/message_spec.rb | 17 ++++ spec/lib/gitlab/downtime_check_spec.rb | 113 +++++++++++++++++++++ 10 files changed, 311 insertions(+), 24 deletions(-) create mode 100644 lib/gitlab/downtime_check.rb create mode 100644 lib/gitlab/downtime_check/message.rb create mode 100644 lib/tasks/downtime_check.rake create mode 100644 spec/lib/gitlab/downtime_check/message_spec.rb create mode 100644 spec/lib/gitlab/downtime_check_spec.rb diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff8aa351226..f566dfd76e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -148,7 +148,7 @@ spinach 9 10: *spinach-knapsack .spinach-knapsack-ruby23: &spinach-knapsack-ruby23 <<: *spinach-knapsack <<: *ruby-23 - + rspec 0 20 ruby23: *rspec-knapsack-ruby23 rspec 1 20 ruby23: *rspec-knapsack-ruby23 rspec 2 20 ruby23: *rspec-knapsack-ruby23 @@ -196,6 +196,7 @@ rake flog: *exec rake flay: *exec rake db:migrate:reset: *exec license_finder: *exec +rake downtime_check: *exec bundler:audit: stage: test diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index e2ca46504e7..b8fab3aaff7 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -11,7 +11,8 @@ migrations are written carefully, can be applied online and adhere to the style Migrations should not require GitLab installations to be taken offline unless _absolutely_ necessary. If a migration requires downtime this should be clearly mentioned during the review process as well as being documented in the -monthly release post. +monthly release post. For more information see the "Downtime Tagging" section +below. When writing your migrations, also consider that databases might have stale data or inconsistencies and guard for that. Try to make as little assumptions as possible @@ -20,35 +21,34 @@ about the state of the database. Please don't depend on GitLab specific code since it can change in future versions. If needed copy-paste GitLab code into the migration to make it forward compatible. -## Comments in the migration +## Downtime Tagging -Each migration you write needs to have the two following pieces of information -as comments. +Every migration must specify if it requires downtime or not, and if it should +require downtime it must also specify a reason for this. To do so, add the +following two constants to the migration class' body: -### Online, Offline, errors? +* `DOWNTIME`: a boolean that when set to `true` indicates the migration requires + downtime. +* `DOWNTIME_REASON`: a String containing the reason for the migration requiring + downtime. This constant **must** be set when `DOWNTIME` is set to `true`. -First, you need to provide information on whether the migration can be applied: +For example: -1. online without errors (works on previous version and new one) -2. online with errors on old instances after migrating -3. online with errors on new instances while migrating -4. offline (needs to happen without app servers to prevent db corruption) - -For example: - -``` -# Migration type: online without errors (works on previous version and new one) +```ruby class MyMigration < ActiveRecord::Migration -... -``` + DOWNTIME = true + DOWNTIME_REASON = 'This migration requires downtime because ...' -It is always preferable to have a migration run online. If you expect the migration -to take particularly long (for instance, if it loops through all notes), -this is valuable information to add. + def change + ... + end +end +``` -If you don't provide the information it means that a migration is safe to run online. +It is an error (that is, CI will fail) if the `DOWNTIME` constant is missing +from a migration class. -### Reversibility +## Reversibility Your migration should be reversible. This is very important, as it should be possible to downgrade in case of a vulnerability or bugs. @@ -100,7 +100,7 @@ value of `10` you'd write the following: class MyMigration < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers disable_ddl_transaction! - + def up add_column_with_default(:projects, :foo, :integer, default: 10) end diff --git a/generator_templates/active_record/migration/create_table_migration.rb b/generator_templates/active_record/migration/create_table_migration.rb index 27acc75dcc4..aad8626a720 100644 --- a/generator_templates/active_record/migration/create_table_migration.rb +++ b/generator_templates/active_record/migration/create_table_migration.rb @@ -4,6 +4,14 @@ class <%= migration_class_name %> < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + # When using the methods "add_concurrent_index" or "add_column_with_default" # you must disable the use of transactions as these methods can not run in an # existing transaction. When using "add_concurrent_index" make sure that this diff --git a/generator_templates/active_record/migration/migration.rb b/generator_templates/active_record/migration/migration.rb index 06bdea11367..825bc8bdf61 100644 --- a/generator_templates/active_record/migration/migration.rb +++ b/generator_templates/active_record/migration/migration.rb @@ -4,6 +4,14 @@ class <%= migration_class_name %> < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + # When using the methods "add_concurrent_index" or "add_column_with_default" # you must disable the use of transactions as these methods can not run in an # existing transaction. When using "add_concurrent_index" make sure that this diff --git a/lib/gitlab/downtime_check.rb b/lib/gitlab/downtime_check.rb new file mode 100644 index 00000000000..ab9537ed7d7 --- /dev/null +++ b/lib/gitlab/downtime_check.rb @@ -0,0 +1,71 @@ +module Gitlab + # Checks if a set of migrations requires downtime or not. + class DowntimeCheck + # The constant containing the boolean that indicates if downtime is needed + # or not. + DOWNTIME_CONST = :DOWNTIME + + # The constant that specifies the reason for the migration requiring + # downtime. + DOWNTIME_REASON_CONST = :DOWNTIME_REASON + + # Checks the given migration paths and returns an Array of + # `Gitlab::DowntimeCheck::Message` instances. + # + # migrations - The migration file paths to check. + def check(migrations) + migrations.map do |path| + require(path) + + migration_class = class_for_migration_file(path) + + unless migration_class.const_defined?(DOWNTIME_CONST) + raise "The migration in #{path} does not specify if it requires " \ + "downtime or not" + end + + if online?(migration_class) + Message.new(path) + else + reason = downtime_reason(migration_class) + + unless reason + raise "The migration in #{path} requires downtime but no reason " \ + "was given" + end + + Message.new(path, true, reason) + end + end + end + + # Checks the given migrations and prints the results to STDOUT/STDERR. + # + # migrations - The migration file paths to check. + def check_and_print(migrations) + check(migrations).each do |message| + puts message.to_s # rubocop: disable Rails/Output + end + end + + # Returns the class for the given migration file path. + def class_for_migration_file(path) + File.basename(path, File.extname(path)).split('_', 2).last.camelize. + constantize + end + + # Returns true if the given migration can be performed without downtime. + def online?(migration) + migration.const_get(DOWNTIME_CONST) == false + end + + # Returns the downtime reason, or nil if none was defined. + def downtime_reason(migration) + if migration.const_defined?(DOWNTIME_REASON_CONST) + migration.const_get(DOWNTIME_REASON_CONST) + else + nil + end + end + end +end diff --git a/lib/gitlab/downtime_check/message.rb b/lib/gitlab/downtime_check/message.rb new file mode 100644 index 00000000000..4446e921e0d --- /dev/null +++ b/lib/gitlab/downtime_check/message.rb @@ -0,0 +1,28 @@ +module Gitlab + class DowntimeCheck + class Message + attr_reader :path, :offline, :reason + + OFFLINE = "\e[32moffline\e[0m" + ONLINE = "\e[31monline\e[0m" + + # path - The file path of the migration. + # offline - When set to `true` the migration will require downtime. + # reason - The reason as to why the migration requires downtime. + def initialize(path, offline = false, reason = nil) + @path = path + @offline = offline + @reason = reason + end + + def to_s + label = offline ? OFFLINE : ONLINE + + message = "[#{label}]: #{path}" + message += ": #{reason}" if reason + + message + end + end + end +end diff --git a/lib/tasks/downtime_check.rake b/lib/tasks/downtime_check.rake new file mode 100644 index 00000000000..30a2e9be5ce --- /dev/null +++ b/lib/tasks/downtime_check.rake @@ -0,0 +1,26 @@ +desc 'Checks if migrations in a branch require downtime' +task downtime_check: :environment do + # First we'll want to make sure we're comparing with the right upstream + # repository/branch. + current_branch = `git rev-parse --abbrev-ref HEAD`.strip + + # Either the developer ran this task directly on the master branch, or they're + # making changes directly on the master branch. + if current_branch == 'master' + if defined?(Gitlab::License) + repo = 'gitlab-ee' + else + repo = 'gitlab-ce' + end + + `git fetch https://gitlab.com/gitlab-org/#{repo}.git --depth 1` + + compare_with = 'FETCH_HEAD' + # The developer is working on a different branch, in this case we can just + # compare with the master branch. + else + compare_with = 'master' + end + + Rake::Task['gitlab:db:downtime_check'].invoke(compare_with) +end diff --git a/lib/tasks/gitlab/db.rake b/lib/tasks/gitlab/db.rake index 7230b9485be..0ec19e1a625 100644 --- a/lib/tasks/gitlab/db.rake +++ b/lib/tasks/gitlab/db.rake @@ -46,5 +46,20 @@ namespace :gitlab do Rake::Task['db:seed_fu'].invoke end end + + desc 'Checks if migrations require downtime or not' + task :downtime_check, [:ref] => :environment do |_, args| + abort 'You must specify a Git reference to compare with' unless args[:ref] + + require 'shellwords' + + ref = Shellwords.escape(args[:ref]) + + migrations = `git diff #{ref}.. --name-only -- db/migrate`.lines. + map { |file| Rails.root.join(file.strip).to_s }. + select { |file| File.file?(file) } + + Gitlab::DowntimeCheck.new.check_and_print(migrations) + end end end diff --git a/spec/lib/gitlab/downtime_check/message_spec.rb b/spec/lib/gitlab/downtime_check/message_spec.rb new file mode 100644 index 00000000000..93094cda776 --- /dev/null +++ b/spec/lib/gitlab/downtime_check/message_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe Gitlab::DowntimeCheck::Message do + describe '#to_s' do + it 'returns an ANSI formatted String for an offline migration' do + message = described_class.new('foo.rb', true, 'hello') + + expect(message.to_s).to eq("[\e[32moffline\e[0m]: foo.rb: hello") + end + + it 'returns an ANSI formatted String for an online migration' do + message = described_class.new('foo.rb') + + expect(message.to_s).to eq("[\e[31monline\e[0m]: foo.rb") + end + end +end diff --git a/spec/lib/gitlab/downtime_check_spec.rb b/spec/lib/gitlab/downtime_check_spec.rb new file mode 100644 index 00000000000..42d895e548e --- /dev/null +++ b/spec/lib/gitlab/downtime_check_spec.rb @@ -0,0 +1,113 @@ +require 'spec_helper' + +describe Gitlab::DowntimeCheck do + subject { described_class.new } + let(:path) { 'foo.rb' } + + describe '#check' do + before do + expect(subject).to receive(:require).with(path) + end + + context 'when a migration does not specify if downtime is required' do + it 'raises RuntimeError' do + expect(subject).to receive(:class_for_migration_file). + with(path). + and_return(Class.new) + + expect { subject.check([path]) }. + to raise_error(RuntimeError, /it requires downtime/) + end + end + + context 'when a migration requires downtime' do + context 'when no reason is specified' do + it 'raises RuntimeError' do + stub_const('TestMigration::DOWNTIME', true) + + expect(subject).to receive(:class_for_migration_file). + with(path). + and_return(TestMigration) + + expect { subject.check([path]) }. + to raise_error(RuntimeError, /no reason was given/) + end + end + + context 'when a reason is specified' do + it 'returns an Array of messages' do + stub_const('TestMigration::DOWNTIME', true) + stub_const('TestMigration::DOWNTIME_REASON', 'foo') + + expect(subject).to receive(:class_for_migration_file). + with(path). + and_return(TestMigration) + + messages = subject.check([path]) + + expect(messages).to be_an_instance_of(Array) + expect(messages[0]).to be_an_instance_of(Gitlab::DowntimeCheck::Message) + + message = messages[0] + + expect(message.path).to eq(path) + expect(message.offline).to eq(true) + expect(message.reason).to eq('foo') + end + end + end + end + + describe '#check_and_print' do + it 'checks the migrations and prints the results to STDOUT' do + stub_const('TestMigration::DOWNTIME', true) + stub_const('TestMigration::DOWNTIME_REASON', 'foo') + + expect(subject).to receive(:require).with(path) + + expect(subject).to receive(:class_for_migration_file). + with(path). + and_return(TestMigration) + + expect(subject).to receive(:puts).with(an_instance_of(String)) + + subject.check_and_print([path]) + end + end + + describe '#class_for_migration_file' do + it 'returns the class for a migration file path' do + expect(subject.class_for_migration_file('123_string.rb')).to eq(String) + end + end + + describe '#online?' do + it 'returns true when a migration can be performed online' do + stub_const('TestMigration::DOWNTIME', false) + + expect(subject.online?(TestMigration)).to eq(true) + end + + it 'returns false when a migration can not be performed online' do + stub_const('TestMigration::DOWNTIME', true) + + expect(subject.online?(TestMigration)).to eq(false) + end + end + + describe '#downtime_reason' do + context 'when a reason is defined' do + it 'returns the downtime reason' do + stub_const('TestMigration::DOWNTIME_REASON', 'hello') + + expect(subject.downtime_reason(TestMigration)).to eq('hello') + end + end + + context 'when a reason is not defined' do + it 'returns nil' do + expect(subject.downtime_reason(Class.new)).to be_nil + end + end + end +end -- cgit v1.2.1 From d7ab81cf7d89f3edf6515f7d954e376029a17b88 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Wed, 20 Jul 2016 12:21:38 +0200 Subject: Log cron_jobs configuration instead of raising exception --- CHANGELOG | 2 +- config/initializers/sidekiq.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b1a713108c0..e79cafd8594 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -127,7 +127,7 @@ v 8.10.0 (unreleased) - Fix last update timestamp on issues not preserved on gitlab.com and project imports - Fix issues importing projects from EE to CE - Fix creating group with space in group path - - Improve cron_jobs loading error messages !5318 + - Improve cron_jobs loading error messages !5318 / !5360 - Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska) - Limit the number of retries on error to 3 for exporting projects - Allow empty repositories on project import/export diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index b40fd81ff96..5e839327e7a 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -18,7 +18,8 @@ Sidekiq.configure_server do |config| if cron_jobs[k] && cron_jobs_required_keys.all? { |s| cron_jobs[k].key?(s) } cron_jobs[k]['class'] = cron_jobs[k].delete('job_class') else - raise("Invalid cron_jobs config key: '#{k}'. Check your gitlab config file.") + cron_jobs.delete(k) + Rails.logger.error("Invalid cron_jobs config key: '#{k}'. Check your gitlab config file.") end end Sidekiq::Cron::Job.load_from_hash! cron_jobs -- cgit v1.2.1 From 64232c71a402b17f38f5425d9e600e2650078ce3 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Wed, 20 Jul 2016 12:02:39 +0100 Subject: updates local schema --- db/schema.rb | 15 +++++++------ spec/features/projects/branches_spec.rb~HEAD | 32 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 spec/features/projects/branches_spec.rb~HEAD diff --git a/db/schema.rb b/db/schema.rb index 8882377f9f4..39b02d9ba35 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -84,7 +84,7 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.string "health_check_access_token" t.boolean "send_user_confirmation_email", default: false t.integer "container_registry_token_expire_delay", default: 5 - t.boolean "user_default_external", default: false, null: false + t.boolean "user_default_external", default: false, null: false t.text "after_sign_up_text" t.string "repository_storage", default: "default" t.string "enabled_git_access_protocol" @@ -605,9 +605,9 @@ ActiveRecord::Schema.define(version: 20160716115710) do add_index "merge_request_diffs", ["merge_request_id"], name: "index_merge_request_diffs_on_merge_request_id", unique: true, using: :btree create_table "merge_requests", force: :cascade do |t| - t.string "target_branch", null: false - t.string "source_branch", null: false - t.integer "source_project_id", null: false + t.string "target_branch", null: false + t.string "source_branch", null: false + t.integer "source_project_id", null: false t.integer "author_id" t.integer "assignee_id" t.string "title" @@ -616,20 +616,21 @@ ActiveRecord::Schema.define(version: 20160716115710) do t.integer "milestone_id" t.string "state" t.string "merge_status" - t.integer "target_project_id", null: false + t.integer "target_project_id", null: false t.integer "iid" t.text "description" - t.integer "position", default: 0 + t.integer "position", default: 0 t.datetime "locked_at" t.integer "updated_by_id" t.string "merge_error" t.text "merge_params" - t.boolean "merge_when_build_succeeds", default: false, null: false + t.boolean "merge_when_build_succeeds", default: false, null: false t.integer "merge_user_id" t.string "merge_commit_sha" t.datetime "deleted_at" t.string "in_progress_merge_commit_sha" end + add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree add_index "merge_requests", ["author_id"], name: "index_merge_requests_on_author_id", using: :btree add_index "merge_requests", ["created_at", "id"], name: "index_merge_requests_on_created_at_and_id", using: :btree diff --git a/spec/features/projects/branches_spec.rb~HEAD b/spec/features/projects/branches_spec.rb~HEAD new file mode 100644 index 00000000000..79abba21854 --- /dev/null +++ b/spec/features/projects/branches_spec.rb~HEAD @@ -0,0 +1,32 @@ +require 'spec_helper' + +describe 'Branches', feature: true do + let(:project) { create(:project) } + let(:repository) { project.repository } + + before do + login_as :user + project.team << [@user, :developer] + end + + describe 'Initial branches page' do + it 'shows all the branches' do + visit namespace_project_branches_path(project.namespace, project) + + repository.branches { |branch| expect(page).to have_content("#{branch.name}") } + expect(page).to have_content("Protected branches can be managed in project settings") + end + end + + describe 'Find branches' do + it 'shows filtered branches', js: true do + visit namespace_project_branches_path(project.namespace, project, project.id) + + fill_in 'branch-search', with: 'fix' + find('#branch-search').native.send_keys(:enter) + + expect(page).to have_content('fix') + expect(find('.all-branches')).to have_selector('li', count: 1) + end + end +end -- cgit v1.2.1 From 66c8c3d4c390f886306c5bc074f9c0b3298f6911 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 19:13:32 +0800 Subject: More complex data manipulating tests to model, and this should properly test that it's really getting the builds from the latest successful pipelines and latest successful builds. --- spec/models/project_spec.rb | 68 +++++++++++++++++++++++++++++++++++----- spec/requests/api/builds_spec.rb | 38 ---------------------- 2 files changed, 60 insertions(+), 46 deletions(-) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index b03fdebf8e7..373170f9769 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1124,22 +1124,74 @@ describe Project, models: true do status: 'success') end - let!(:build) do + let(:build) do create(:ci_build, :artifacts, :success, pipeline: pipeline) end context 'with succeed pipeline' do - it 'returns builds for ref for default_branch' do - builds = project.latest_successful_builds_for + context 'standalone pipeline' do + before do + build + end + + it 'returns builds for ref for default_branch' do + builds = project.latest_successful_builds_for + + expect(builds).to contain_exactly(build) + end + + it 'returns empty relation if the build cannot be found' do + builds = project.latest_successful_builds_for('TAIL') - expect(builds).to contain_exactly(build) + expect(builds).to be_kind_of(ActiveRecord::Relation) + expect(builds).to be_empty + end end - it 'returns empty relation if the build cannot be found' do - builds = project.latest_successful_builds_for('TAIL') + context 'with multiple pipelines and builds' do + shared_examples 'latest successful one' do + it 'gives the latest build from latest pipeline' do + latest_build = project.latest_successful_builds_for.first - expect(builds).to be_kind_of(ActiveRecord::Relation) - expect(builds).to be_empty + expect(latest_build).to eq(build) + end + end + + context 'with all success pipeline' do + before do + old_pipelines = Array.new(3).map do + create(:ci_pipeline, project: project, + sha: project.commit.sha, + ref: project.default_branch, + status: 'success') + end + + # should not give this old build for the latest pipeline + create(:ci_build, :success, :artifacts, pipeline: pipeline) + build + + old_pipelines.reverse_each do |pipe| + create(:ci_build, :success, :artifacts, pipeline: pipe) + end + end + + it_behaves_like 'latest successful one' + end + + context 'with some pending pipeline' do + before do + # make sure pipeline was old, but still the latest success one + build + + new_pipeline = create(:ci_pipeline, project: project, + sha: project.commit.sha, + ref: project.default_branch, + status: 'pending') + create(:ci_build, :pending, :artifacts, pipeline: new_pipeline) + end + + it_behaves_like 'latest successful one' + end end end diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 553b432c7c7..6e84604c949 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -253,44 +253,6 @@ describe API::API, api: true do it_behaves_like 'a valid file' end - - context 'with latest pipeline' do - before do - old_pipelines = Array.new(3).map do # creating some old pipelines - create(:ci_pipeline, status: 'success') - end - - old_pipelines.reverse_each do |pipe| - old_build = create(:ci_build, :success, pipeline: pipe) - old_build.update(artifacts_file: another_artifacts) - end - - wrong_build = create(:ci_build, :success, pipeline: pipeline) - wrong_build.update(artifacts_file: another_artifacts) - end - - before do - get path_for_ref - end - - it_behaves_like 'a valid file' - end - - context 'with success pipeline' do - before do - build # make sure pipeline was old, but still the latest success one - new_pipeline = create(:ci_pipeline, status: 'success') - new_build = create(:ci_build, :pending, - pipeline: new_pipeline) - new_build.update(artifacts_file: another_artifacts) - end - - before do - get path_for_ref - end - - it_behaves_like 'a valid file' - end end end -- cgit v1.2.1 From 1b55e5af5c417a2a10ffb3af4dcef947f693ee74 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 13 Jul 2016 10:09:16 +0100 Subject: Fixed dropdown enter key when searching Closes #19741 --- CHANGELOG | 1 + app/assets/javascripts/gl_dropdown.js.coffee | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 1abc4afdddd..b1faf65aff8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -37,6 +37,7 @@ v 8.10.0 (unreleased) - Make images fit to the size of the viewport !4810 - Fix check for New Branch button on Issue page !4630 (winniehell) - Fix GFM autocomplete not working on wiki pages + - Fixed enter key not triggering click on first row when searching in a dropdown - Fix MR-auto-close text added to description. !4836 - Support U2F devices in Firefox. !5177 - Fix issue, preventing users w/o push access to sort tags !5105 (redetection) diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee index 951530e03a5..f0b52bb7f29 100644 --- a/app/assets/javascripts/gl_dropdown.js.coffee +++ b/app/assets/javascripts/gl_dropdown.js.coffee @@ -35,6 +35,8 @@ class GitLabDropdownFilter $inputContainer.removeClass HAS_VALUE_CLASS if keyCode is 13 + if @input.val() isnt "" and @options.enterCallback + @options.enterCallback(e) return false # Only filter asynchronously only if option remote is set @@ -212,6 +214,9 @@ class GitLabDropdown callback: (data) => currentIndex = -1 @parseData data + enterCallback: (e) => + @selectRowAtIndex(e, 0) + # Event listeners -- cgit v1.2.1 From dc1c7b7fc1e95bd80274e9bab27e0ba082087770 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 14 Jul 2016 15:04:23 +0100 Subject: Highlights first row when filtering in dropdowns --- app/assets/javascripts/gl_dropdown.js.coffee | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee index f0b52bb7f29..d60935cbb52 100644 --- a/app/assets/javascripts/gl_dropdown.js.coffee +++ b/app/assets/javascripts/gl_dropdown.js.coffee @@ -214,6 +214,17 @@ class GitLabDropdown callback: (data) => currentIndex = -1 @parseData data + + unless @filterInput.val() is '' + selector = '.dropdown-content li:not(.divider):visible' + + if @dropdown.find('.dropdown-toggle-page').length + selector = ".dropdown-page-one #{selector}" + + $(selector, @dropdown) + .first() + .find('a') + .addClass('is-focused') enterCallback: (e) => @selectRowAtIndex(e, 0) -- cgit v1.2.1 From c3882eb4eeba0792ffdf4773fa9283ea0a852270 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 13:17:21 +0200 Subject: Improve implementation of variables --- app/models/ci/build.rb | 78 ++++++++++++---------------------------- app/models/ci/pipeline.rb | 6 ++++ app/models/ci/runner.rb | 8 +++++ app/models/ci/trigger_request.rb | 8 +++++ app/models/project.rb | 27 ++++++++++++++ doc/ci/variables/README.md | 14 ++++---- spec/models/build_spec.rb | 17 ++++----- 7 files changed, 88 insertions(+), 70 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 6115ffd87c2..21c0e128b98 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -145,7 +145,15 @@ module Ci end def variables - predefined_variables + yaml_variables + project_variables + trigger_variables + variables = predefined_variables + variables += project.predefined_variables + variables += pipeline.predefined_variables + variables += runner.predefined_variables if runner + variables += project.container_registry_variables + variables += yaml_variables + variables += project.secret_variables + variables += trigger_request.user_variables if trigger_request + variables end def merge_request @@ -430,63 +438,23 @@ module Ci self.update(erased_by: user, erased_at: Time.now, artifacts_expire_at: nil) end - def project_variables - project.variables.map do |variable| - { key: variable.key, value: variable.value, public: false } - end - end - - def trigger_variables - if trigger_request && trigger_request.variables - trigger_request.variables.map do |key, value| - { key: key, value: value, public: false } - end - else - [] - end - end - def predefined_variables - variables = [] - variables << { key: 'CI', value: 'true', public: true } - variables << { key: 'GITLAB_CI', value: 'true', public: true } - - variables << { key: 'CI_BUILD_ID', value: id.to_s, public: true } - variables << { key: 'CI_BUILD_TOKEN', value: token, public: false } - variables << { key: 'CI_BUILD_REF', value: sha, public: true } - variables << { key: 'CI_BUILD_BEFORE_SHA', value: before_sha, public: true } - variables << { key: 'CI_BUILD_REF_NAME', value: ref, public: true } + variables = [ + { key: 'CI', value: 'true', public: true }, + { key: 'GITLAB_CI', value: 'true', public: true }, + { key: 'CI_BUILD_ID', value: id.to_s, public: true }, + { key: 'CI_BUILD_TOKEN', value: token, public: false }, + { key: 'CI_BUILD_REF', value: sha, public: true }, + { key: 'CI_BUILD_BEFORE_SHA', value: before_sha, public: true }, + { key: 'CI_BUILD_REF_NAME', value: ref, public: true }, + { key: 'CI_BUILD_NAME', value: name, public: true }, + { key: 'CI_BUILD_STAGE', value: stage, public: true }, + { key: 'CI_SERVER_NAME', value: 'GitLab', public: true }, + { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true }, + { key: 'CI_SERVER_REVISION', value: Gitlab::REVISION, public: true } + ] variables << { key: 'CI_BUILD_TAG', value: ref, public: true } if tag? - variables << { key: 'CI_BUILD_NAME', value: name, public: true } - variables << { key: 'CI_BUILD_STAGE', value: stage, public: true } variables << { key: 'CI_BUILD_TRIGGERED', value: 'true', public: true } if trigger_request - - variables << { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true } - - variables << { key: 'CI_PROJECT_ID', value: project.id.to_s, public: true } - variables << { key: 'CI_PROJECT_NAME', value: project.path, public: true } - variables << { key: 'CI_PROJECT_PATH', value: project.path_with_namespace, public: true } - variables << { key: 'CI_PROJECT_NAMESPACE', value: project.namespace.path, public: true } - variables << { key: 'CI_PROJECT_URL', value: project.web_url, public: true } - - if Gitlab.config.registry.enabled - variables << { key: 'CI_REGISTRY', value: Gitlab.config.registry.host_port, public: true } - - if project.container_registry_enabled? - variables << { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_repository_url, public: true } - end - end - - variables << { key: 'CI_SERVER_NAME', value: 'GitLab', public: true } - variables << { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true } - variables << { key: 'CI_SERVER_REVISION', value: Gitlab::REVISION, public: true } - - if runner - variables << { key: 'CI_RUNNER_ID', value: runner.id.to_s, public: true } - variables << { key: 'CI_RUNNER_DESCRIPTION', value: runner.description, public: true } - variables << { key: 'CI_RUNNER_TAGS', value: runner.tag_list.to_s, public: true } - end - variables end diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index aca8607f4e8..ad117e3950d 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -198,6 +198,12 @@ module Ci Note.for_commit_id(sha) end + def predefined_variables + [ + { key: 'CI_PIPELINE_ID', value: id.to_s, public: true } + ] + end + private def build_builds_for_stages(stages, user, status, trigger_request) diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index b64ec79ec2b..49f05f881a2 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -114,6 +114,14 @@ module Ci tag_list.any? end + def predefined_variables + [ + { key: 'CI_RUNNER_ID', value: id.to_s, public: true }, + { key: 'CI_RUNNER_DESCRIPTION', value: description, public: true }, + { key: 'CI_RUNNER_TAGS', value: tag_list.to_s, public: true } + ] + end + private def tag_constraints diff --git a/app/models/ci/trigger_request.rb b/app/models/ci/trigger_request.rb index fcf2b6dc5e2..fc674871743 100644 --- a/app/models/ci/trigger_request.rb +++ b/app/models/ci/trigger_request.rb @@ -7,5 +7,13 @@ module Ci has_many :builds, class_name: 'Ci::Build' serialize :variables + + def user_variables + return [] unless variables + + variables.map do |key, value| + { key: key, value: value, public: false } + end + end end end diff --git a/app/models/project.rb b/app/models/project.rb index a805f5d97bc..71e22087187 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1164,4 +1164,31 @@ class Project < ActiveRecord::Base def ensure_dir_exist gitlab_shell.add_namespace(repository_storage_path, namespace.path) end + + def predefined_variables + [ + { key: 'CI_PROJECT_ID', value: id.to_s, public: true }, + { key: 'CI_PROJECT_NAME', value: path, public: true }, + { key: 'CI_PROJECT_PATH', value: path_with_namespace, public: true }, + { key: 'CI_PROJECT_NAMESPACE', value: namespace.path, public: true }, + { key: 'CI_PROJECT_URL', value: web_url, public: true } + ] + end + + def container_registry_variables + return [] unless Gitlab.config.registry.enabled + + variables = [ + { key: 'CI_REGISTRY', value: Gitlab.config.registry.host_port, public: true } + ] + + variables << { key: 'CI_REGISTRY_IMAGE', value: container_registry_repository_url, public: true } if container_registry_enabled? + variables + end + + def secret_variables + variables.map do |variable| + { key: variable.key, value: variable.value, public: false } + end + end end diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index 420a3c831fa..c9eebec801d 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -37,15 +37,15 @@ The `API_TOKEN` will take the Secure Variable value: `SECURE`. | **CI_BUILD_TOKEN** | all | 1.2 | Token used for authenticating with the GitLab Container Registry | | **CI_PIPELINE_ID** | 8.10 | 0.5 | The unique id of the current pipeline that GitLab CI uses internally | | **CI_PROJECT_ID** | all | all | The unique id of the current project that GitLab CI uses internally | -| **CI_PROJECT_NAME** | 8.10 | 0.5 | The project name that is currently build | -| **CI_PROJECT_NAMESPACE**| 8.10 | 0.5 | The project namespace that is currently build | +| **CI_PROJECT_NAME** | 8.10 | 0.5 | The project name that is currently being built | +| **CI_PROJECT_NAMESPACE**| 8.10 | 0.5 | The project namespace that is currently being built | | **CI_PROJECT_PATH** | 8.10 | 0.5 | The namespace with project name | | **CI_PROJECT_URL** | 8.10 | 0.5 | The HTTP address to access project | -| **CI_PROJECT_DIR** | all | all | The full path where the repository is cloned and where the build is ran | -| **CI_REGISTRY** | 8.10 | 0.5 | If the Container Registry is enabled it returns address of GitLab's Container Registry | -| **CI_REGISTRY_IMAGE** | 8.10 | 0.5 | If the Container Registry is for project it returns the address of registry tied to specific project | +| **CI_PROJECT_DIR** | all | all | The full path where the repository is cloned and where the build is run | +| **CI_REGISTRY** | 8.10 | 0.5 | If the Container Registry is enabled it returns the address of GitLab's Container Registry | +| **CI_REGISTRY_IMAGE** | 8.10 | 0.5 | If the Container Registry is enabled for the project it returnes the address of the registry tied to the specific project | | **CI_RUNNER_ID** | 8.10 | 0.5 | The unique id of the used runner | -| **CI_RUNNER_DESCRIPTION** | 8.10 | 0.5 | The description of runners as saved in GitLab | +| **CI_RUNNER_DESCRIPTION** | 8.10 | 0.5 | The description of the runner as saved in GitLab | | **CI_RUNNER_TAGS** | 8.10 | 0.5 | The defined runner tags | **Some of the variables are only available when using runner with at least defined version.** @@ -68,7 +68,7 @@ export CI_PROJECT_DIR="/builds/gitlab-org/gitlab-ce" export CI_PROJECT_NAME="gitlab-ce" export CI_PROJECT_NAMESPACE="gitlab-org" export CI_PROJECT_PATH="gitlab-org/gitlab-ce" -export CI_PROJECT_URL="https://gitlab.com/gitlab-org/gitlab-ce.git" +export CI_PROJECT_URL="https://gitlab.com/gitlab-org/gitlab-ce" export CI_REGISTRY="registry.gitlab.com" export CI_REGISTRY_IMAGE="registry.gitlab.com/gitlab-org/gitlab-ce" export CI_RUNNER_ID="10" diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index bff46d8cbab..f9c9725a23d 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -203,15 +203,15 @@ describe Ci::Build, models: true do { key: 'CI_BUILD_REF_NAME', value: 'master', public: true }, { key: 'CI_BUILD_NAME', value: 'test', public: true }, { key: 'CI_BUILD_STAGE', value: 'test', public: true }, - { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true }, + { key: 'CI_SERVER_NAME', value: 'GitLab', public: true }, + { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true }, + { key: 'CI_SERVER_REVISION', value: Gitlab::REVISION, public: true }, { key: 'CI_PROJECT_ID', value: project.id.to_s, public: true }, { key: 'CI_PROJECT_NAME', value: project.path, public: true }, { key: 'CI_PROJECT_PATH', value: project.path_with_namespace, public: true }, { key: 'CI_PROJECT_NAMESPACE', value: project.namespace.path, public: true }, { key: 'CI_PROJECT_URL', value: project.web_url, public: true }, - { key: 'CI_SERVER_NAME', value: 'GitLab', public: true }, - { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true }, - { key: 'CI_SERVER_REVISION', value: Gitlab::REVISION, public: true } + { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true } ] end @@ -362,12 +362,13 @@ describe Ci::Build, models: true do context 'returns variables in valid order' do before do allow(build).to receive(:predefined_variables) { ['predefined'] } - allow(build).to receive(:yaml_variables) { ['yaml variables'] } - allow(build).to receive(:project_variables) { ['secure variables'] } - allow(build).to receive(:trigger_variables) { ['trigger variables'] } + allow(project).to receive(:predefined_variables) { ['project'] } + allow(pipeline).to receive(:predefined_variables) { ['pipeline'] } + allow(build).to receive(:yaml_variables) { ['yaml'] } + allow(project).to receive(:secret_variables) { ['secret'] } end - it { is_expected.to eq(['predefined', 'yaml variables', 'secure variables', 'trigger variables']) } + it { is_expected.to eq(%w[predefined project pipeline yaml secret]) } end end -- cgit v1.2.1 From f62cbe618bc2a17bb4ed85179d42f223854cb1a5 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 13:18:21 +0200 Subject: Update CHANGELOG --- CHANGELOG | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 4614cb4197a..591eaeb5da9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -280,7 +280,6 @@ v 8.9.0 - Reduce number of fog gem dependencies - Add number of merge requests for a given milestone to the milestones view. - Implement a fair usage of shared runners - - Add predefined CI variables to GitLab for container registry, pipelines, project name, etc. - Remove project notification settings associated with deleted projects - Fix 404 page when viewing TODOs that contain milestones or labels in different projects - Add a metric for the number of new Redis connections created by a transaction -- cgit v1.2.1 From a563f3311399d526bdfbef067c5a4c571acaaed5 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 19:27:53 +0800 Subject: Join on association --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index f2e9d607967..5cfc1d407e4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,7 +431,7 @@ class Project < ActiveRecord::Base # ref can't be HEAD, can only be branch/tag name or SHA def latest_successful_builds_for(ref = default_branch) - Ci::Build.joins(:pipeline).merge(pipelines.latest_successful_for(ref)). + builds.joins(:pipeline).merge(pipelines.latest_successful_for(ref)). latest_successful_with_artifacts end -- cgit v1.2.1 From 7e8ef1b853b2d95ba99ac597992724b51163fde6 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 13:59:20 +0200 Subject: Update routes --- config/routes.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 29ceb1e23e9..57f1e1428e1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -732,10 +732,7 @@ Rails.application.routes.draw do resources :triggers, only: [:index, :create, :destroy] resources :pipelines, only: [:index, :new, :create, :show] do - collection do - get :settings - patch :settings, to: 'pipelines#update_settings' - end + resource :settings, only: [:index, :update] member do post :cancel -- cgit v1.2.1 From 8eafdafdda25071dcad4ce143d5c65c1ca278730 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 14:00:25 +0200 Subject: Fix review comments --- app/models/project.rb | 5 ++++- doc/ci/variables/README.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 71e22087187..a2a91888a54 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1182,7 +1182,10 @@ class Project < ActiveRecord::Base { key: 'CI_REGISTRY', value: Gitlab.config.registry.host_port, public: true } ] - variables << { key: 'CI_REGISTRY_IMAGE', value: container_registry_repository_url, public: true } if container_registry_enabled? + if container_registry_enabled? + variables << { key: 'CI_REGISTRY_IMAGE', value: container_registry_repository_url, public: true } + end + variables end diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index c9eebec801d..4bf610f0e9a 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -44,7 +44,7 @@ The `API_TOKEN` will take the Secure Variable value: `SECURE`. | **CI_PROJECT_DIR** | all | all | The full path where the repository is cloned and where the build is run | | **CI_REGISTRY** | 8.10 | 0.5 | If the Container Registry is enabled it returns the address of GitLab's Container Registry | | **CI_REGISTRY_IMAGE** | 8.10 | 0.5 | If the Container Registry is enabled for the project it returnes the address of the registry tied to the specific project | -| **CI_RUNNER_ID** | 8.10 | 0.5 | The unique id of the used runner | +| **CI_RUNNER_ID** | 8.10 | 0.5 | The unique id of runner being used | | **CI_RUNNER_DESCRIPTION** | 8.10 | 0.5 | The description of the runner as saved in GitLab | | **CI_RUNNER_TAGS** | 8.10 | 0.5 | The defined runner tags | -- cgit v1.2.1 From bdb900cdbd40a0b4a18da4eb016ead94e7212784 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 20:04:56 +0800 Subject: Past tense, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13195632 --- spec/models/project_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 373170f9769..531b6afc580 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1157,7 +1157,7 @@ describe Project, models: true do end end - context 'with all success pipeline' do + context 'with all succeeded pipeline' do before do old_pipelines = Array.new(3).map do create(:ci_pipeline, project: project, -- cgit v1.2.1 From 0c202f3751e1aba94743a9e1b985a6c528775c33 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 20:05:51 +0800 Subject: Past tense: Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13195632 --- spec/models/project_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 531b6afc580..b4112d65a34 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1128,7 +1128,7 @@ describe Project, models: true do create(:ci_build, :artifacts, :success, pipeline: pipeline) end - context 'with succeed pipeline' do + context 'with succeeded pipeline' do context 'standalone pipeline' do before do build -- cgit v1.2.1 From 145da6b1c1794d8e7191e99edc71269130cbfbb9 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 20:08:09 +0800 Subject: Use only one before, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13195672 --- spec/requests/api/builds_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 6e84604c949..e623eed7e9e 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -232,9 +232,7 @@ describe API::API, api: true do before do pipeline.update(ref: 'master', sha: project.commit('master').sha) - end - before do get path_for_ref('master') end -- cgit v1.2.1 From a9f3f3c8c9a1656efae35b9837ab4076cc236bf1 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 20:09:29 +0800 Subject: Cleanup let a bit, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13195683 and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13195692 another_artifacts was no longer used and then there's no point to put let in outer scope anymore. --- spec/requests/api/builds_spec.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index e623eed7e9e..d14fd53afb9 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -213,17 +213,13 @@ describe API::API, api: true do end context 'find proper build' do - let(:another_artifacts) do - fixture_file_upload(Rails.root + 'spec/fixtures/dk.png', 'image/gif') - end - - let(:download_headers) do - { 'Content-Transfer-Encoding' => 'binary', - 'Content-Disposition' => - "attachment; filename=#{build.artifacts_file.filename}" } - end - shared_examples 'a valid file' do + let(:download_headers) do + { 'Content-Transfer-Encoding' => 'binary', + 'Content-Disposition' => + "attachment; filename=#{build.artifacts_file.filename}" } + end + it { expect(response).to have_http_status(200) } it { expect(response.headers).to include(download_headers) } end -- cgit v1.2.1 From 07be5943788fe0b672e8c6bea6859582cbdd3d11 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 30 May 2016 14:06:06 +0200 Subject: Enable Style/MultilineTernaryOperator rubocop cop Avoid multi-line ?: (the ternary operator). Use if/unless instead. See #17478 --- .rubocop.yml | 4 ++++ .rubocop_todo.yml | 4 ---- lib/banzai/filter/relative_link_filter.rb | 3 +-- spec/support/api_helpers.rb | 14 ++++++++++---- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index db0bcfadcf4..6adbda53456 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -291,6 +291,10 @@ Style/MultilineMethodDefinitionBraceLayout: Style/MultilineOperationIndentation: Enabled: false +# Avoid multi-line `? :` (the ternary operator), use if/unless instead. +Style/MultilineTernaryOperator: + Enabled: true + # Favor unless over if for negative conditions (or control flow or). Style/NegatedIf: Enabled: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9310e711889..b622b9239d4 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -226,10 +226,6 @@ Style/LineEndConcatenation: Style/MethodCallParentheses: Enabled: false -# Offense count: 3 -Style/MultilineTernaryOperator: - Enabled: false - # Offense count: 62 # Cop supports --auto-correct. Style/MutableConstant: diff --git a/lib/banzai/filter/relative_link_filter.rb b/lib/banzai/filter/relative_link_filter.rb index c78da404607..21ed0410f7f 100644 --- a/lib/banzai/filter/relative_link_filter.rb +++ b/lib/banzai/filter/relative_link_filter.rb @@ -112,8 +112,7 @@ module Banzai end def current_commit - @current_commit ||= context[:commit] || - ref ? repository.commit(ref) : repository.head_commit + @current_commit ||= context[:commit] || ref ? repository.commit(ref) : repository.head_commit end def relative_url_root diff --git a/spec/support/api_helpers.rb b/spec/support/api_helpers.rb index 1b3cafb497c..68b196d9033 100644 --- a/spec/support/api_helpers.rb +++ b/spec/support/api_helpers.rb @@ -24,8 +24,11 @@ module ApiHelpers (path.index('?') ? '' : '?') + # Append private_token if given a User object - (user.respond_to?(:private_token) ? - "&private_token=#{user.private_token}" : "") + if user.respond_to?(:private_token) + "&private_token=#{user.private_token}" + else + '' + end end def ci_api(path, user = nil) @@ -35,8 +38,11 @@ module ApiHelpers (path.index('?') ? '' : '?') + # Append private_token if given a User object - (user.respond_to?(:private_token) ? - "&private_token=#{user.private_token}" : "") + if user.respond_to?(:private_token) + "&private_token=#{user.private_token}" + else + '' + end end def json_response -- cgit v1.2.1 From 4d69cb9d9460f9805bfc1f34ca3a600f54804167 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Fri, 15 Jul 2016 18:46:29 -0300 Subject: Allow to disable user request access to groups/projects --- CHANGELOG | 1 + app/controllers/admin/groups_controller.rb | 2 +- app/controllers/groups_controller.rb | 2 +- app/controllers/projects_controller.rb | 2 +- app/models/ability.rb | 4 ++-- app/views/admin/groups/_form.html.haml | 4 ++++ app/views/groups/edit.html.haml | 4 ++++ app/views/projects/edit.html.haml | 4 ++++ app/views/shared/_allow_request_access.html.haml | 6 ++++++ ...60715154212_add_request_access_enabled_to_projects.rb | 12 ++++++++++++ ...0160715204316_add_request_access_enabled_to_groups.rb | 12 ++++++++++++ db/schema.rb | 12 +++++++----- doc/workflow/add-user/add-user.md | 3 +++ doc/workflow/groups.md | 3 +++ .../features/groups/members/user_requests_access_spec.rb | 16 ++++++++++++++++ .../projects/members/user_requests_access_spec.rb | 9 +++++++++ 16 files changed, 86 insertions(+), 10 deletions(-) create mode 100644 app/views/shared/_allow_request_access.html.haml create mode 100644 db/migrate/20160715154212_add_request_access_enabled_to_projects.rb create mode 100644 db/migrate/20160715204316_add_request_access_enabled_to_groups.rb diff --git a/CHANGELOG b/CHANGELOG index e9c86cc0bf3..2bc08da802c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,7 @@ v 8.10.0 (unreleased) - Fix commit builds API, return all builds for all pipelines for given commit. !4849 - Replace Haml with Hamlit to make view rendering faster. !3666 - Refresh the branch cache after `git gc` runs + - Allow to disable request access button on projects/groups - Refactor repository paths handling to allow multiple git mount points - Optimize system note visibility checking by memoizing the visible reference count !5070 - Add Application Setting to configure default Repository Path for new projects diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb index 94b5aaa71d0..f3a88a8e6c8 100644 --- a/app/controllers/admin/groups_controller.rb +++ b/app/controllers/admin/groups_controller.rb @@ -60,6 +60,6 @@ class Admin::GroupsController < Admin::ApplicationController end def group_params - params.require(:group).permit(:name, :description, :path, :avatar, :visibility_level) + params.require(:group).permit(:name, :description, :path, :avatar, :visibility_level, :request_access_enabled) end end diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index a04bf7df722..6780a6d4d87 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -121,7 +121,7 @@ class GroupsController < Groups::ApplicationController end def group_params - params.require(:group).permit(:name, :description, :path, :avatar, :public, :visibility_level, :share_with_group_lock) + params.require(:group).permit(:name, :description, :path, :avatar, :public, :visibility_level, :share_with_group_lock, :request_access_enabled) end def load_events diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 4e5bcff9cf8..ec7a2e63b9a 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -296,7 +296,7 @@ class ProjectsController < Projects::ApplicationController :issues_tracker_id, :default_branch, :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id, :avatar, :builds_enabled, :build_allow_git_fetch, :build_timeout_in_minutes, :build_coverage_regex, - :public_builds, :only_allow_merge_if_build_succeeds + :public_builds, :only_allow_merge_if_build_succeeds, :request_access_enabled ) end diff --git a/app/models/ability.rb b/app/models/ability.rb index 6fd18f2ee24..e6c186c6910 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -172,7 +172,7 @@ class Ability rules << :read_build if project.public_builds? unless owner || project.team.member?(user) || project_group_member?(project, user) - rules << :request_access + rules << :request_access if project.request_access_enabled end end @@ -372,7 +372,7 @@ class Ability ] end - if group.public? || (group.internal? && !user.external?) + if (group.public? || (group.internal? && !user.external?)) && group.request_access_enabled rules << :request_access unless group.users.include?(user) end diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 0cc405401cf..5f7fdfdb011 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -9,6 +9,10 @@ = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group + .form-group + .col-sm-offset-2.col-sm-10 + = render 'shared/allow_request_access', form: f + - if @group.new_record? .form-group .col-sm-offset-2.col-sm-10 diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 92cd4c553d0..decb89b2fd6 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -21,6 +21,10 @@ = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group + .form-group + .col-sm-offset-2.col-sm-10 + = render 'shared/allow_request_access', form: f + .form-group %hr = f.label :share_with_group_lock, class: 'control-label' do diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 57af167180b..541d81e65e5 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -32,6 +32,10 @@ %strong = visibility_level_label(@project.visibility_level) .light= visibility_level_description(@project.visibility_level, @project) + + .form-group + = render 'shared/allow_request_access', form: f + .form-group = f.label :tag_list, "Tags", class: 'label-light' = f.text_field :tag_list, value: @project.tag_list.to_s, maxlength: 2000, class: "form-control" diff --git a/app/views/shared/_allow_request_access.html.haml b/app/views/shared/_allow_request_access.html.haml new file mode 100644 index 00000000000..53a99a736c0 --- /dev/null +++ b/app/views/shared/_allow_request_access.html.haml @@ -0,0 +1,6 @@ +.checkbox + = form.label :request_access_enabled do + = form.check_box :request_access_enabled + %strong Allow users to request access + %br + %span.descr Allow users to request access if visibility is public or internal. diff --git a/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb new file mode 100644 index 00000000000..bf0131c6d76 --- /dev/null +++ b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb @@ -0,0 +1,12 @@ +class AddRequestAccessEnabledToProjects < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + def up + add_column_with_default :projects, :request_access_enabled, :boolean, default: true + end + + def down + remove_column :projects, :request_access_enabled + end +end diff --git a/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb new file mode 100644 index 00000000000..e7b14cd3ee2 --- /dev/null +++ b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb @@ -0,0 +1,12 @@ +class AddRequestAccessEnabledToGroups < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + def up + add_column_with_default :namespaces, :request_access_enabled, :boolean, default: true + end + + def down + remove_column :namespaces, :request_access_enabled + end +end diff --git a/db/schema.rb b/db/schema.rb index ebf31ded369..72780fb8d03 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -664,16 +664,17 @@ ActiveRecord::Schema.define(version: 20160718153603) do add_index "milestones", ["title"], name: "index_milestones_on_title_trigram", using: :gin, opclasses: {"title"=>"gin_trgm_ops"} create_table "namespaces", force: :cascade do |t| - t.string "name", null: false - t.string "path", null: false + t.string "name", null: false + t.string "path", null: false t.integer "owner_id" t.datetime "created_at" t.datetime "updated_at" t.string "type" - t.string "description", default: "", null: false + t.string "description", default: "", null: false t.string "avatar" - t.boolean "share_with_group_lock", default: false - t.integer "visibility_level", default: 20, null: false + t.boolean "share_with_group_lock", default: false + t.integer "visibility_level", default: 20, null: false + t.boolean "request_access_enabled", default: true, null: false end add_index "namespaces", ["created_at", "id"], name: "index_namespaces_on_created_at_and_id", using: :btree @@ -843,6 +844,7 @@ ActiveRecord::Schema.define(version: 20160718153603) do t.boolean "has_external_issue_tracker" t.string "repository_storage", default: "default", null: false t.boolean "has_external_wiki" + t.boolean "request_access_enabled", default: true, null: false end add_index "projects", ["builds_enabled", "shared_runners_enabled"], name: "index_projects_on_builds_enabled_and_shared_runners_enabled", using: :btree diff --git a/doc/workflow/add-user/add-user.md b/doc/workflow/add-user/add-user.md index 0537ce0bcd4..53d9750d4d3 100644 --- a/doc/workflow/add-user/add-user.md +++ b/doc/workflow/add-user/add-user.md @@ -90,6 +90,9 @@ GitLab account using the same e-mail address the invitation was sent to. ## Request access to a project +As project owner you can enable or disable non members to request access to +your project. Go to project settings and click on **allow users to request access** + As a user, you can request to be a member of a project. Go to the project you'd like to be a member of, and click the **Request Access** button on the right side of your screen. diff --git a/doc/workflow/groups.md b/doc/workflow/groups.md index 9b50286b179..f56de4f3f25 100644 --- a/doc/workflow/groups.md +++ b/doc/workflow/groups.md @@ -53,6 +53,9 @@ If necessary, you can increase the access level of an individual user for a spec ## Requesting access to a group +As group owner you can enable or disable non members to request access to +your group. Go to group settings and click on **allow users to request access** + As a user, you can request to be a member of a group. Go to the group you'd like to be a member of, and click the **Request Access** button on the right side of your screen. diff --git a/spec/features/groups/members/user_requests_access_spec.rb b/spec/features/groups/members/user_requests_access_spec.rb index d1a6a98ab72..5d3fc23d6f4 100644 --- a/spec/features/groups/members/user_requests_access_spec.rb +++ b/spec/features/groups/members/user_requests_access_spec.rb @@ -9,10 +9,19 @@ feature 'Groups > Members > User requests access', feature: true do background do group.add_owner(owner) login_as(user) + end + + scenario 'request access feature is disabled' do + group.update_attributes(request_access_enabled: false) + visit group_path(group) + visit group_path(group) + expect(page).not_to have_content 'Request Access' end scenario 'user can request access to a group' do + visit group_path(group) + perform_enqueued_jobs { click_link 'Request Access' } expect(ActionMailer::Base.deliveries.last.to).to eq [owner.notification_email] @@ -26,12 +35,15 @@ feature 'Groups > Members > User requests access', feature: true do end scenario 'user does not see private projects' do + visit group_path(group) + perform_enqueued_jobs { click_link 'Request Access' } expect(page).not_to have_content project.name end scenario 'user does not see group in the Dashboard > Groups page' do + visit group_path(group) perform_enqueued_jobs { click_link 'Request Access' } visit dashboard_groups_path @@ -40,6 +52,8 @@ feature 'Groups > Members > User requests access', feature: true do end scenario 'user is not listed in the group members page' do + visit group_path(group) + click_link 'Request Access' expect(group.requesters.exists?(user_id: user)).to be_truthy @@ -52,6 +66,8 @@ feature 'Groups > Members > User requests access', feature: true do end scenario 'user can withdraw its request for access' do + visit group_path(group) + click_link 'Request Access' expect(group.requesters.exists?(user_id: user)).to be_truthy diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb index f2fe3ef364d..3190fa21a15 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -8,10 +8,17 @@ feature 'Projects > Members > User requests access', feature: true do background do project.team << [master, :master] login_as(user) + end + + scenario 'request access feature is disabled' do + project.update_attributes(request_access_enabled: false) + visit namespace_project_path(project.namespace, project) + expect(page).not_to have_content 'Request Access' end scenario 'user can request access to a project' do + visit namespace_project_path(project.namespace, project) perform_enqueued_jobs { click_link 'Request Access' } expect(ActionMailer::Base.deliveries.last.to).to eq [master.notification_email] @@ -25,6 +32,7 @@ feature 'Projects > Members > User requests access', feature: true do end scenario 'user is not listed in the project members page' do + visit namespace_project_path(project.namespace, project) click_link 'Request Access' expect(project.requesters.exists?(user_id: user)).to be_truthy @@ -39,6 +47,7 @@ feature 'Projects > Members > User requests access', feature: true do end scenario 'user can withdraw its request for access' do + visit namespace_project_path(project.namespace, project) click_link 'Request Access' expect(project.requesters.exists?(user_id: user)).to be_truthy -- cgit v1.2.1 From 5fb436aaa4b9b597a1c9e995ecd13ee2a76aaedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 20 Jul 2016 12:34:29 +0200 Subject: Fix a few nitpicks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/models/ability.rb | 4 ++-- doc/workflow/add-user/add-user.md | 4 ++-- doc/workflow/groups.md | 4 ++-- spec/features/groups/members/user_requests_access_spec.rb | 11 +---------- spec/features/projects/members/user_requests_access_spec.rb | 6 ++---- 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index e6c186c6910..f33c8d61d3f 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -372,8 +372,8 @@ class Ability ] end - if (group.public? || (group.internal? && !user.external?)) && group.request_access_enabled - rules << :request_access unless group.users.include?(user) + if group.public? || (group.internal? && !user.external?) + rules << :request_access if group.request_access_enabled && group.users.exclude?(user) end rules.flatten diff --git a/doc/workflow/add-user/add-user.md b/doc/workflow/add-user/add-user.md index 53d9750d4d3..e541111d7b3 100644 --- a/doc/workflow/add-user/add-user.md +++ b/doc/workflow/add-user/add-user.md @@ -90,8 +90,8 @@ GitLab account using the same e-mail address the invitation was sent to. ## Request access to a project -As project owner you can enable or disable non members to request access to -your project. Go to project settings and click on **allow users to request access** +As a project owner you can enable or disable non members to request access to +your project. Go to the project settings and click on **Allow users to request access**. As a user, you can request to be a member of a project. Go to the project you'd like to be a member of, and click the **Request Access** button on the right diff --git a/doc/workflow/groups.md b/doc/workflow/groups.md index f56de4f3f25..a693cc3d0fd 100644 --- a/doc/workflow/groups.md +++ b/doc/workflow/groups.md @@ -53,8 +53,8 @@ If necessary, you can increase the access level of an individual user for a spec ## Requesting access to a group -As group owner you can enable or disable non members to request access to -your group. Go to group settings and click on **allow users to request access** +As a group owner you can enable or disable non members to request access to +your group. Go to the group settings and click on **Allow users to request access**. As a user, you can request to be a member of a group. Go to the group you'd like to be a member of, and click the **Request Access** button on the right diff --git a/spec/features/groups/members/user_requests_access_spec.rb b/spec/features/groups/members/user_requests_access_spec.rb index 5d3fc23d6f4..b3baa2ab57c 100644 --- a/spec/features/groups/members/user_requests_access_spec.rb +++ b/spec/features/groups/members/user_requests_access_spec.rb @@ -9,19 +9,17 @@ feature 'Groups > Members > User requests access', feature: true do background do group.add_owner(owner) login_as(user) + visit group_path(group) end scenario 'request access feature is disabled' do group.update_attributes(request_access_enabled: false) visit group_path(group) - visit group_path(group) expect(page).not_to have_content 'Request Access' end scenario 'user can request access to a group' do - visit group_path(group) - perform_enqueued_jobs { click_link 'Request Access' } expect(ActionMailer::Base.deliveries.last.to).to eq [owner.notification_email] @@ -35,15 +33,12 @@ feature 'Groups > Members > User requests access', feature: true do end scenario 'user does not see private projects' do - visit group_path(group) - perform_enqueued_jobs { click_link 'Request Access' } expect(page).not_to have_content project.name end scenario 'user does not see group in the Dashboard > Groups page' do - visit group_path(group) perform_enqueued_jobs { click_link 'Request Access' } visit dashboard_groups_path @@ -52,8 +47,6 @@ feature 'Groups > Members > User requests access', feature: true do end scenario 'user is not listed in the group members page' do - visit group_path(group) - click_link 'Request Access' expect(group.requesters.exists?(user_id: user)).to be_truthy @@ -66,8 +59,6 @@ feature 'Groups > Members > User requests access', feature: true do end scenario 'user can withdraw its request for access' do - visit group_path(group) - click_link 'Request Access' expect(group.requesters.exists?(user_id: user)).to be_truthy diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb index 3190fa21a15..56ede8eb5be 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -8,17 +8,17 @@ feature 'Projects > Members > User requests access', feature: true do background do project.team << [master, :master] login_as(user) + visit namespace_project_path(project.namespace, project) end scenario 'request access feature is disabled' do project.update_attributes(request_access_enabled: false) - visit namespace_project_path(project.namespace, project) + expect(page).not_to have_content 'Request Access' end scenario 'user can request access to a project' do - visit namespace_project_path(project.namespace, project) perform_enqueued_jobs { click_link 'Request Access' } expect(ActionMailer::Base.deliveries.last.to).to eq [master.notification_email] @@ -32,7 +32,6 @@ feature 'Projects > Members > User requests access', feature: true do end scenario 'user is not listed in the project members page' do - visit namespace_project_path(project.namespace, project) click_link 'Request Access' expect(project.requesters.exists?(user_id: user)).to be_truthy @@ -47,7 +46,6 @@ feature 'Projects > Members > User requests access', feature: true do end scenario 'user can withdraw its request for access' do - visit namespace_project_path(project.namespace, project) click_link 'Request Access' expect(project.requesters.exists?(user_id: user)).to be_truthy -- cgit v1.2.1 From 52d5d7daf13291416050de23c8635dd59373f3b7 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 14:33:13 +0200 Subject: Create PipelinesSettingsController for showing settings page --- app/controllers/projects/pipelines_controller.rb | 27 +----- .../projects/pipelines_settings_controller.rb | 33 +++++++ app/controllers/projects/refs_controller.rb | 2 +- app/views/layouts/nav/_project_settings.html.haml | 4 +- app/views/projects/pipelines/settings.html.haml | 103 --------------------- .../projects/pipelines_settings/show.html.haml | 103 +++++++++++++++++++++ config/routes.rb | 4 +- spec/features/pipelines_settings_spec.rb | 35 +++++++ spec/features/pipelines_spec.rb | 31 +------ spec/features/projects/badges/list_spec.rb | 2 +- 10 files changed, 181 insertions(+), 163 deletions(-) create mode 100644 app/controllers/projects/pipelines_settings_controller.rb delete mode 100644 app/views/projects/pipelines/settings.html.haml create mode 100644 app/views/projects/pipelines_settings/show.html.haml create mode 100644 spec/features/pipelines_settings_spec.rb diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 55b68b89d0d..487963fdcd7 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -1,10 +1,9 @@ class Projects::PipelinesController < Projects::ApplicationController - before_action :pipeline, except: [:index, :new, :create, :settings, :update_settings] + before_action :pipeline, except: [:index, :new, :create] before_action :commit, only: [:show] before_action :authorize_read_pipeline! before_action :authorize_create_pipeline!, only: [:new, :create] before_action :authorize_update_pipeline!, only: [:retry, :cancel] - before_action :authorize_admin_pipeline!, only: [:settings, :update_settings] def index @scope = params[:scope] @@ -44,36 +43,12 @@ class Projects::PipelinesController < Projects::ApplicationController redirect_back_or_default default: namespace_project_pipelines_path(project.namespace, project) end - def settings - @ref = params[:ref] || @project.default_branch || 'master' - @build_badge = Gitlab::Badge::Build.new(@project, @ref) - end - - def update_settings - if @project.update_attributes(pipelines_settings_params) - flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." - redirect_to( - settings_namespace_project_pipelines_path(@project.namespace, @project), - notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." - ) - else - render 'settings' - end - end - private def create_params params.require(:pipeline).permit(:ref) end - def pipelines_settings_params - params.require(:project).permit( - :runners_token, :builds_enabled, :build_allow_git_fetch, :build_timeout_in_minutes, :build_coverage_regex, - :public_builds - ) - end - def pipeline @pipeline ||= project.pipelines.find_by!(id: params[:id]) end diff --git a/app/controllers/projects/pipelines_settings_controller.rb b/app/controllers/projects/pipelines_settings_controller.rb new file mode 100644 index 00000000000..e7b96887c9c --- /dev/null +++ b/app/controllers/projects/pipelines_settings_controller.rb @@ -0,0 +1,33 @@ +class Projects::PipelinesSettingsController < Projects::ApplicationController + before_action :authorize_admin_pipeline! + + def show + @ref = params[:ref] || @project.default_branch || 'master' + @build_badge = Gitlab::Badge::Build.new(@project, @ref) + end + + def update + if @project.update_attributes(update_params) + flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." + redirect_to( + namespace_project_pipelines_settings_path(@project.namespace, @project), + notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." + ) + else + render 'index' + end + end + + private + + def create_params + params.require(:pipeline).permit(:ref) + end + + def update_params + params.require(:project).permit( + :runners_token, :builds_enabled, :build_allow_git_fetch, :build_timeout_in_minutes, :build_coverage_regex, + :public_builds + ) + end +end diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index 08d74634315..3602b3d5e58 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -25,7 +25,7 @@ class Projects::RefsController < Projects::ApplicationController when "graphs_commits" commits_namespace_project_graph_path(@project.namespace, @project, @id) when "badges" - settings_namespace_project_pipelines_path(@project.namespace, @project, ref: @id) + namespace_project_pipelines_settings_path(@project.namespace, @project, ref: @id) else namespace_project_commits_path(@project.namespace, @project, @id) end diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index ca7b502eb5a..52a5bdc1a1b 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -39,7 +39,7 @@ = link_to namespace_project_triggers_path(@project.namespace, @project), title: 'Triggers' do %span Triggers - = nav_link(controller: :pipelines) do - = link_to settings_namespace_project_pipelines_path(@project.namespace, @project), title: 'CI/CD Pipelines' do + = nav_link(controller: :pipelines_settings) do + = link_to namespace_project_pipelines_settings_path(@project.namespace, @project), title: 'CI/CD Pipelines' do %span CI/CD Pipelines diff --git a/app/views/projects/pipelines/settings.html.haml b/app/views/projects/pipelines/settings.html.haml deleted file mode 100644 index 8c90defc2be..00000000000 --- a/app/views/projects/pipelines/settings.html.haml +++ /dev/null @@ -1,103 +0,0 @@ -- page_title "CI/CD Pipelines" - -.row.prepend-top-default - .col-lg-3.profile-settings-sidebar - %h4.prepend-top-0 - = page_title - .col-lg-9 - %h5.prepend-top-0 - Pipelines - = form_for @project, url: settings_namespace_project_pipelines_path(@project.namespace.becomes(Namespace), @project), remote: true, authenticity_token: true do |f| - %fieldset.builds-feature - - unless @repository.gitlab_ci_yml - .form-group - %p Pipelines need to be configured before you can begin using Continuous Integration. - = link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' - .form-group - %p Get recent application code using the following command: - .radio - = f.label :build_allow_git_fetch_false do - = f.radio_button :build_allow_git_fetch, 'false' - %strong git clone - %br - %span.descr Slower but makes sure you have a clean dir before every build - .radio - = f.label :build_allow_git_fetch_true do - = f.radio_button :build_allow_git_fetch, 'true' - %strong git fetch - %br - %span.descr Faster - - .form-group - = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light' - = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0' - %p.help-block per build in minutes - .form-group - = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' - .input-group - %span.input-group-addon / - = f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered' - %span.input-group-addon / - %p.help-block - We will use this regular expression to find test coverage output in build trace. - Leave blank if you want to disable this feature - .bs-callout.bs-callout-info - %p Below are examples of regex for existing tools: - %ul - %li - Simplecov (Ruby) - - %code \(\d+.\d+\%\) covered - %li - pytest-cov (Python) - - %code \d+\%\s*$ - %li - phpunit --coverage-text --colors=never (PHP) - - %code ^\s*Lines:\s*\d+.\d+\% - %li - gcovr (C/C++) - - %code ^TOTAL.*\s+(\d+\%)$ - %li - tap --coverage-report=text-summary (Node.js) - - %code ^Statements\s*:\s*([^%]+) - - .form-group - .checkbox - = f.label :public_builds do - = f.check_box :public_builds - %strong Public pipelines - .help-block Allow everyone to access pipelines for Public and Internal projects - - .form-group.append-bottom-default - = f.label :runners_token, "Runners token", class: 'label-light' - = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' - %p.help-block The secure token used to checkout project. - - = f.submit 'Save changes', class: "btn btn-save" - -%hr - -.row.prepend-top-default - .col-lg-3.profile-settings-sidebar - %h4.prepend-top-0 - Builds Badge - .col-lg-9 - .prepend-top-10 - .panel.panel-default - .panel-heading - %b Builds badge · - = @build_badge.to_html - .pull-right - = render 'shared/ref_switcher', destination: 'badges', align_right: true - .panel-body - .row - .col-md-2.text-center - Markdown - .col-md-10.code.js-syntax-highlight - = highlight('.md', @build_badge.to_markdown) - .row - %hr - .row - .col-md-2.text-center - HTML - .col-md-10.code.js-syntax-highlight - = highlight('.html', @build_badge.to_html) diff --git a/app/views/projects/pipelines_settings/show.html.haml b/app/views/projects/pipelines_settings/show.html.haml new file mode 100644 index 00000000000..228bad36ebd --- /dev/null +++ b/app/views/projects/pipelines_settings/show.html.haml @@ -0,0 +1,103 @@ +- page_title "CI/CD Pipelines" + +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + = page_title + .col-lg-9 + %h5.prepend-top-0 + Pipelines + = form_for @project, url: namespace_project_pipelines_settings_path(@project.namespace.becomes(Namespace), @project), remote: true, authenticity_token: true do |f| + %fieldset.builds-feature + - unless @repository.gitlab_ci_yml + .form-group + %p Pipelines need to be configured before you can begin using Continuous Integration. + = link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' + .form-group + %p Get recent application code using the following command: + .radio + = f.label :build_allow_git_fetch_false do + = f.radio_button :build_allow_git_fetch, 'false' + %strong git clone + %br + %span.descr Slower but makes sure you have a clean dir before every build + .radio + = f.label :build_allow_git_fetch_true do + = f.radio_button :build_allow_git_fetch, 'true' + %strong git fetch + %br + %span.descr Faster + + .form-group + = f.label :build_timeout_in_minutes, 'Timeout', class: 'label-light' + = f.number_field :build_timeout_in_minutes, class: 'form-control', min: '0' + %p.help-block per build in minutes + .form-group + = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' + .input-group + %span.input-group-addon / + = f.text_field :build_coverage_regex, class: 'form-control', placeholder: '\(\d+.\d+\%\) covered' + %span.input-group-addon / + %p.help-block + We will use this regular expression to find test coverage output in build trace. + Leave blank if you want to disable this feature + .bs-callout.bs-callout-info + %p Below are examples of regex for existing tools: + %ul + %li + Simplecov (Ruby) - + %code \(\d+.\d+\%\) covered + %li + pytest-cov (Python) - + %code \d+\%\s*$ + %li + phpunit --coverage-text --colors=never (PHP) - + %code ^\s*Lines:\s*\d+.\d+\% + %li + gcovr (C/C++) - + %code ^TOTAL.*\s+(\d+\%)$ + %li + tap --coverage-report=text-summary (Node.js) - + %code ^Statements\s*:\s*([^%]+) + + .form-group + .checkbox + = f.label :public_builds do + = f.check_box :public_builds + %strong Public pipelines + .help-block Allow everyone to access pipelines for Public and Internal projects + + .form-group.append-bottom-default + = f.label :runners_token, "Runners token", class: 'label-light' + = f.text_field :runners_token, class: "form-control", placeholder: 'xEeFCaDAB89' + %p.help-block The secure token used to checkout project. + + = f.submit 'Save changes', class: "btn btn-save" + +%hr + +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + Builds Badge + .col-lg-9 + .prepend-top-10 + .panel.panel-default + .panel-heading + %b Builds badge · + = @build_badge.to_html + .pull-right + = render 'shared/ref_switcher', destination: 'badges', align_right: true + .panel-body + .row + .col-md-2.text-center + Markdown + .col-md-10.code.js-syntax-highlight + = highlight('.md', @build_badge.to_markdown) + .row + %hr + .row + .col-md-2.text-center + HTML + .col-md-10.code.js-syntax-highlight + = highlight('.html', @build_badge.to_html) diff --git a/config/routes.rb b/config/routes.rb index 57f1e1428e1..21f3585bacd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -732,7 +732,9 @@ Rails.application.routes.draw do resources :triggers, only: [:index, :create, :destroy] resources :pipelines, only: [:index, :new, :create, :show] do - resource :settings, only: [:index, :update] + collection do + resource :pipelines_settings, path: 'settings', only: [:show, :update] + end member do post :cancel diff --git a/spec/features/pipelines_settings_spec.rb b/spec/features/pipelines_settings_spec.rb new file mode 100644 index 00000000000..dcc364a3d01 --- /dev/null +++ b/spec/features/pipelines_settings_spec.rb @@ -0,0 +1,35 @@ +require 'spec_helper' + +feature "Pipelines settings", feature: true do + include GitlabRoutingHelper + + let(:project) { create(:empty_project) } + let(:user) { create(:user) } + let(:role) { :developer } + + background do + login_as(user) + project.team << [user, role] + visit namespace_project_pipelines_settings_path(project.namespace, project) + end + + context 'for developer' do + given(:role) { :developer } + + scenario 'to be disallowed to view' do + expect(page.status_code).to eq(404) + end + end + + context 'for master' do + given(:role) { :master } + + scenario 'be allowed to change' do + fill_in('Test coverage parsing', with: 'coverage_regex') + click_on 'Save changes' + + expect(page.status_code).to eq(200) + expect(page).to have_field('Test coverage parsing', with: 'coverage_regex') + end + end +end diff --git a/spec/features/pipelines_spec.rb b/spec/features/pipelines_spec.rb index 100f1015a32..7f861db1969 100644 --- a/spec/features/pipelines_spec.rb +++ b/spec/features/pipelines_spec.rb @@ -1,15 +1,14 @@ require 'spec_helper' -feature "Pipelines", feature: true do +describe "Pipelines" do include GitlabRoutingHelper let(:project) { create(:empty_project) } let(:user) { create(:user) } - let(:role) { :developer } before do login_as(user) - project.team << [user, role] + project.team << [user, :developer] end describe 'GET /:project/pipelines' do @@ -209,30 +208,4 @@ feature "Pipelines", feature: true do it { expect(page).to have_content('Reference not found') } end end - - describe 'Pipelines settings' do - background do - visit settings_namespace_project_pipelines_path(project.namespace, project) - end - - context 'for developer' do - given(:role) { :developer } - - scenario 'to be disallowed to view' do - expect(page.status_code).to eq(404) - end - end - - context 'for master' do - given(:role) { :master } - - scenario 'be allowed to change' do - fill_in('Test coverage parsing', with: 'coverage_regex') - click_on 'Save changes' - - expect(page.status_code).to eq(200) - expect(page).to have_field('Test coverage parsing', with: 'coverage_regex') - end - end - end end diff --git a/spec/features/projects/badges/list_spec.rb b/spec/features/projects/badges/list_spec.rb index d29fb265f91..75166bca119 100644 --- a/spec/features/projects/badges/list_spec.rb +++ b/spec/features/projects/badges/list_spec.rb @@ -6,7 +6,7 @@ feature 'list of badges' do project = create(:project) project.team << [user, :master] login_as(user) - visit settings_namespace_project_pipelines_path(project.namespace, project) + visit namespace_project_pipelines_settings_path(project.namespace, project) end scenario 'user displays list of badges' do -- cgit v1.2.1 From 90480359d5a23e2c01a16aef2679bb6720f3d751 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 14:48:23 +0200 Subject: Use flash[:notice] only --- app/controllers/projects/pipelines_settings_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/projects/pipelines_settings_controller.rb b/app/controllers/projects/pipelines_settings_controller.rb index e7b96887c9c..1b63ab2352f 100644 --- a/app/controllers/projects/pipelines_settings_controller.rb +++ b/app/controllers/projects/pipelines_settings_controller.rb @@ -8,10 +8,9 @@ class Projects::PipelinesSettingsController < Projects::ApplicationController def update if @project.update_attributes(update_params) - flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." + flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' were successfully updated." redirect_to( namespace_project_pipelines_settings_path(@project.namespace, @project), - notice: "CI/CD Pipelines settings for '#{@project.name}' was successfully updated." ) else render 'index' -- cgit v1.2.1 From 545cecb28c02a2350b6ecb7a8c0080f9663734d3 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 14:54:15 +0200 Subject: Change how we style redirect_to --- app/controllers/projects/pipelines_settings_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/projects/pipelines_settings_controller.rb b/app/controllers/projects/pipelines_settings_controller.rb index 1b63ab2352f..85ba706e5cd 100644 --- a/app/controllers/projects/pipelines_settings_controller.rb +++ b/app/controllers/projects/pipelines_settings_controller.rb @@ -9,9 +9,7 @@ class Projects::PipelinesSettingsController < Projects::ApplicationController def update if @project.update_attributes(update_params) flash[:notice] = "CI/CD Pipelines settings for '#{@project.name}' were successfully updated." - redirect_to( - namespace_project_pipelines_settings_path(@project.namespace, @project), - ) + redirect_to namespace_project_pipelines_settings_path(@project.namespace, @project) else render 'index' end -- cgit v1.2.1 From 71bb7bdf612097aa05cbd654f720d25d36598f17 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 20 Jul 2016 14:07:12 +0100 Subject: Fixed issue where using arrow keys would require arrow key to be pressed twice --- app/assets/javascripts/gl_dropdown.js.coffee | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee index d60935cbb52..7086ece29b8 100644 --- a/app/assets/javascripts/gl_dropdown.js.coffee +++ b/app/assets/javascripts/gl_dropdown.js.coffee @@ -35,8 +35,6 @@ class GitLabDropdownFilter $inputContainer.removeClass HAS_VALUE_CLASS if keyCode is 13 - if @input.val() isnt "" and @options.enterCallback - @options.enterCallback(e) return false # Only filter asynchronously only if option remote is set @@ -212,7 +210,6 @@ class GitLabDropdown data: => return @fullData callback: (data) => - currentIndex = -1 @parseData data unless @filterInput.val() is '' @@ -225,8 +222,8 @@ class GitLabDropdown .first() .find('a') .addClass('is-focused') - enterCallback: (e) => - @selectRowAtIndex(e, 0) + + currentIndex = 0 # Event listeners -- cgit v1.2.1 From 3e24a102976586a4417820694580eb9b72defb3d Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Mon, 18 Jul 2016 20:04:16 +0300 Subject: Prevent toggling sidebar when clipboard icon clicked. --- CHANGELOG | 1 + app/assets/javascripts/right_sidebar.js.coffee | 3 +++ app/views/shared/issuable/_sidebar.html.haml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 63fb78c8b02..19a9fa633a9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -131,6 +131,7 @@ v 8.10.0 (unreleased) - Fix issues importing projects from EE to CE - Fix creating group with space in group path - Improve cron_jobs loading error messages !5318 / !5360 + - Prevent toggling sidebar when clipboard icon clicked - Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska) - Limit the number of retries on error to 3 for exporting projects - Allow empty repositories on project import/export diff --git a/app/assets/javascripts/right_sidebar.js.coffee b/app/assets/javascripts/right_sidebar.js.coffee index 12340bbce54..0c95301e380 100644 --- a/app/assets/javascripts/right_sidebar.js.coffee +++ b/app/assets/javascripts/right_sidebar.js.coffee @@ -120,6 +120,9 @@ class @Sidebar i.show() sidebarCollapseClicked: (e) -> + + return if $(e.currentTarget).hasClass('dont-change-state') + sidebar = e.data e.preventDefault() $block = $(@).closest('.block') diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index e020a7d4d00..8e2fcbdfab8 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -156,7 +156,7 @@ - project_ref = cross_project_reference(@project, issuable) .block.project-reference - .sidebar-collapsed-icon + .sidebar-collapsed-icon.dont-change-state = clipboard_button(clipboard_text: project_ref) .cross-project-reference.hide-collapsed %span -- cgit v1.2.1 From ff894a8ec1bef2510c60140a4f42856d48f542d5 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 20 Jul 2016 06:44:40 -0700 Subject: Remove icons from explore nav --- app/views/layouts/nav/_explore.html.haml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/views/layouts/nav/_explore.html.haml b/app/views/layouts/nav/_explore.html.haml index 3b40006a0cc..e5bda7b3a6f 100644 --- a/app/views/layouts/nav/_explore.html.haml +++ b/app/views/layouts/nav/_explore.html.haml @@ -1,21 +1,17 @@ %ul.nav.nav-sidebar = nav_link(path: ['dashboard#show', 'root#show', 'projects#trending', 'projects#starred', 'projects#index'], html_options: {class: 'home'}) do = link_to explore_root_path, title: 'Projects' do - = icon('bookmark fw') %span Projects = nav_link(controller: [:groups, 'groups/milestones', 'groups/group_members']) do = link_to explore_groups_path, title: 'Groups' do - = icon('group fw') %span Groups = nav_link(controller: :snippets) do = link_to explore_snippets_path, title: 'Snippets' do - = icon('clipboard fw') %span Snippets = nav_link(controller: :help) do = link_to help_path, title: 'Help' do - = icon('question-circle fw') %span Help -- cgit v1.2.1 From 9f70abf185c5d55afc392f2ed39246594c62886d Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 21:46:46 +0800 Subject: Avoid mixing builds from different pipelines: So we no longer join anything, just find the latest pipeline and load builds from there to avoid mixing builds. Thanks Kamil for the help and tests. --- app/models/ci/build.rb | 3 --- app/models/ci/pipeline.rb | 2 +- app/models/project.rb | 9 ++++++-- spec/models/project_spec.rb | 51 ++++++++++++++++++++++++++------------------- 4 files changed, 38 insertions(+), 27 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 20492c54729..49a123d488b 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -15,9 +15,6 @@ module Ci scope :with_artifacts, ->() { where.not(artifacts_file: nil) } scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) } scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) } - scope :latest_successful_with_artifacts, ->() do - with_artifacts.success.order(id: :desc) - end scope :manual_actions, ->() { where(when: :manual) } mount_uploader :artifacts_file, ArtifactUploader diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 3646baea88e..63246de4692 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -22,7 +22,7 @@ module Ci # ref can't be HEAD or SHA, can only be branch/tag name scope :latest_successful_for, ->(ref = default_branch) do - where(ref: ref).success.order(id: :desc) + where(ref: ref).success.order(id: :desc).limit(1) end def self.truncate_sha(sha) diff --git a/app/models/project.rb b/app/models/project.rb index 5cfc1d407e4..4fd635abbb3 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,8 +431,13 @@ class Project < ActiveRecord::Base # ref can't be HEAD, can only be branch/tag name or SHA def latest_successful_builds_for(ref = default_branch) - builds.joins(:pipeline).merge(pipelines.latest_successful_for(ref)). - latest_successful_with_artifacts + latest_successful_pipeline = pipelines.latest_successful_for(ref).first + + if latest_successful_pipeline + latest_successful_pipeline.builds.with_artifacts.latest + else + builds.none + end end def merge_base_commit(first_commit_id, second_commit_id) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index b4112d65a34..163b7caf55a 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1148,6 +1148,36 @@ describe Project, models: true do end end + context 'with many builds' do + before do + @pipeline1 = create_pipeline + @pipeline2 = create_pipeline + @build1_p2 = create_build(@pipeline2, 'test') + @build1_p1 = create_build(@pipeline1, 'test') + @build2_p1 = create_build(@pipeline1, 'test2') + @build2_p2 = create_build(@pipeline2, 'test2') + end + + it 'gives the latest build from latest pipeline' do + latest_builds = project.latest_successful_builds_for + + expect(latest_builds).to contain_exactly(@build2_p2, @build1_p2) + end + + def create_pipeline + create(:ci_pipeline, project: project, + sha: project.commit.sha, + ref: project.default_branch, + status: 'success') + end + + def create_build(pipe, name = 'test') + create(:ci_build, :success, :artifacts, + pipeline: pipe, + name: name) + end + end + context 'with multiple pipelines and builds' do shared_examples 'latest successful one' do it 'gives the latest build from latest pipeline' do @@ -1157,27 +1187,6 @@ describe Project, models: true do end end - context 'with all succeeded pipeline' do - before do - old_pipelines = Array.new(3).map do - create(:ci_pipeline, project: project, - sha: project.commit.sha, - ref: project.default_branch, - status: 'success') - end - - # should not give this old build for the latest pipeline - create(:ci_build, :success, :artifacts, pipeline: pipeline) - build - - old_pipelines.reverse_each do |pipe| - create(:ci_build, :success, :artifacts, pipeline: pipe) - end - end - - it_behaves_like 'latest successful one' - end - context 'with some pending pipeline' do before do # make sure pipeline was old, but still the latest success one -- cgit v1.2.1 From 641febac64fcfa52e642ab3d8e8193d25a5c6cac Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 20 Jul 2016 15:50:21 +0200 Subject: fix JS - now tooltip and flash should show --- app/views/projects/new.html.haml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index c72d0140bb9..5025542f0f9 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -89,9 +89,9 @@ = link_to "#", class: 'btn js-toggle-button import_git' do %i.fa.fa-git %span Repo by URL - %div + %div{ class: 'import_gitlab_project' } - if gitlab_project_import_enabled? - = link_to new_import_gitlab_project_path, class: 'btn import_gitlab_project project-submit' do + = link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit' do %i.fa.fa-gitlab %span GitLab export @@ -130,16 +130,16 @@ $(".modal").hide(); }); - $('.import_gitlab_project').bind('click', function() { - var _href = $("a.import_gitlab_project").attr("href"); - $(".import_gitlab_project").attr("href", _href + '?namespace_id=' + $("#project_namespace_id").val() + '&path=' + $("#project_path").val()); + $('.btn_import_gitlab_project').bind('click', function() { + var _href = $("a.btn_import_gitlab_project").attr("href"); + $(".btn_import_gitlab_project").attr("href", _href + '?namespace_id=' + $("#project_namespace_id").val() + '&path=' + $("#project_path").val()); }); - $('.import_gitlab_project').attr('disabled',true) + $('.btn_import_gitlab_project').attr('disabled',true) $('.import_gitlab_project').attr('title', 'Project path required.'); $('.import_gitlab_project').click(function( event ) { - if($('.import_gitlab_project').attr('disabled')) { + if($('.btn_import_gitlab_project').attr('disabled')) { event.preventDefault(); new Flash("Please enter a path for the project to be imported to."); } @@ -147,11 +147,11 @@ $('#project_path').keyup(function(){ if($(this).val().length !=0) { - $('.import_gitlab_project').attr('disabled', false); + $('.btn_import_gitlab_project').attr('disabled', false); $('.import_gitlab_project').attr('title',''); $(".flash-container").html("") } else { - $('.import_gitlab_project').attr('disabled',true); + $('.btn_import_gitlab_project').attr('disabled',true); $('.import_gitlab_project').attr('title', 'Project path required.'); } }); -- cgit v1.2.1 From fcdfeba922a8480cf9cafdb98bb96c558165e51e Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 21:51:47 +0800 Subject: It should be plural --- spec/models/project_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 163b7caf55a..cbd1f5f9e32 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1158,7 +1158,7 @@ describe Project, models: true do @build2_p2 = create_build(@pipeline2, 'test2') end - it 'gives the latest build from latest pipeline' do + it 'gives the latest builds from latest pipeline' do latest_builds = project.latest_successful_builds_for expect(latest_builds).to contain_exactly(@build2_p2, @build1_p2) -- cgit v1.2.1 From 4eb9045ddede6d4b23cb0f9dd9676873c5a21f8c Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 20 Jul 2016 15:57:06 +0200 Subject: added changelog --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 748128f100a..56d0fe75f6f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -140,6 +140,7 @@ v 8.10.0 (unreleased) - Fix MR diff encoding issues exporting GitLab projects - Export and import avatar as part of project import/export - Fix migration corrupting import data for old version upgrades + - Show tooltip on GitLab export link in new project page v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 -- cgit v1.2.1 From 4a1edae3ac321241e2168b98df695e11048f7724 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 22:00:34 +0800 Subject: Use one query. Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13199055 --- app/models/project.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 4fd635abbb3..80860f142d4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,13 +431,8 @@ class Project < ActiveRecord::Base # ref can't be HEAD, can only be branch/tag name or SHA def latest_successful_builds_for(ref = default_branch) - latest_successful_pipeline = pipelines.latest_successful_for(ref).first - - if latest_successful_pipeline - latest_successful_pipeline.builds.with_artifacts.latest - else - builds.none - end + pipeline = pipelines.latest_successful_for(ref) + builds.where(pipeline: pipeline).latest.with_artifacts end def merge_base_commit(first_commit_id, second_commit_id) -- cgit v1.2.1 From fea934b596323190c966c5edf1c8631c725f3820 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 22:02:42 +0800 Subject: Still give descriptions, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13198953 --- spec/requests/api/builds_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index d14fd53afb9..d274466edec 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -187,7 +187,9 @@ describe API::API, api: true do get path_for_ref end - it { expect(response).to have_http_status(401) } + it 'gives 401' do + expect(response).to have_http_status(401) + end end context 'non-existing build' do -- cgit v1.2.1 From f0603e4cb7cfc043239554857a1143943b50b22f Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 20 Jul 2016 16:09:43 +0200 Subject: added spec, fixed wording --- app/views/projects/new.html.haml | 6 +++--- spec/features/projects/import_export/import_file_spec.rb | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 5025542f0f9..facdfcc9447 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -136,12 +136,12 @@ }); $('.btn_import_gitlab_project').attr('disabled',true) - $('.import_gitlab_project').attr('title', 'Project path required.'); + $('.import_gitlab_project').attr('title', 'Project path and name required.'); $('.import_gitlab_project').click(function( event ) { if($('.btn_import_gitlab_project').attr('disabled')) { event.preventDefault(); - new Flash("Please enter a path for the project to be imported to."); + new Flash("Please enter path and name for the project to be imported to."); } }); @@ -152,7 +152,7 @@ $(".flash-container").html("") } else { $('.btn_import_gitlab_project').attr('disabled',true); - $('.import_gitlab_project').attr('title', 'Project path required.'); + $('.import_gitlab_project').attr('title', 'Project path and name required.'); } }); diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb index bc3bf53fe9d..40809aa4aba 100644 --- a/spec/features/projects/import_export/import_file_spec.rb +++ b/spec/features/projects/import_export/import_file_spec.rb @@ -59,6 +59,19 @@ feature 'project import', feature: true, js: true do end end + scenario 'project with no name' do + project = create(:project, namespace_id: 2) + + visit new_project_path + + select2('2', from: '#project_namespace_id') + click_link 'GitLab export' + + page.within('.flash-container') do + expect(page).to have_content('Please enter path and name') + end + end + def wiki_exists? wiki = ProjectWiki.new(project) File.exist?(wiki.repository.path_to_repo) && !wiki.repository.empty? -- cgit v1.2.1 From a7713232ea723a7215ab0aff4c6fed87343df1fd Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 22:12:17 +0800 Subject: Also exclude artifacts_file with empty string, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13198105 --- app/models/ci/build.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 49a123d488b..f87c1206e91 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -12,7 +12,9 @@ module Ci scope :unstarted, ->() { where(runner_id: nil) } scope :ignore_failures, ->() { where(allow_failure: false) } - scope :with_artifacts, ->() { where.not(artifacts_file: nil) } + scope :with_artifacts, ->() do + where.not(artifacts_file: [nil, '']) + end scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) } scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) } scope :manual_actions, ->() { where(when: :manual) } -- cgit v1.2.1 From 88aacaa7e5ec57b85749028f4463a498fc1e35f1 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 22:31:40 +0800 Subject: Reuse those two methods --- spec/models/project_spec.rb | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index cbd1f5f9e32..9d122fd0083 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1115,19 +1115,23 @@ describe Project, models: true do end describe '#latest_successful_builds_for' do - let(:project) { create(:project) } - - let(:pipeline) do + def create_pipeline create(:ci_pipeline, project: project, - sha: project.commit.id, + sha: project.commit.sha, ref: project.default_branch, status: 'success') end - let(:build) do - create(:ci_build, :artifacts, :success, pipeline: pipeline) + def create_build(new_pipeline = pipeline, name = 'test') + create(:ci_build, :success, :artifacts, + pipeline: new_pipeline, + name: name) end + let(:project) { create(:project) } + let(:pipeline) { create_pipeline } + let(:build) { create_build } + context 'with succeeded pipeline' do context 'standalone pipeline' do before do @@ -1163,19 +1167,6 @@ describe Project, models: true do expect(latest_builds).to contain_exactly(@build2_p2, @build1_p2) end - - def create_pipeline - create(:ci_pipeline, project: project, - sha: project.commit.sha, - ref: project.default_branch, - status: 'success') - end - - def create_build(pipe, name = 'test') - create(:ci_build, :success, :artifacts, - pipeline: pipe, - name: name) - end end context 'with multiple pipelines and builds' do -- cgit v1.2.1 From 6d324f082e551f3ecf4df511aa483e972602eec6 Mon Sep 17 00:00:00 2001 From: "M. Ricketts" Date: Mon, 20 Jun 2016 10:22:58 +0100 Subject: Use limit parameter rather than hardcoded value --- lib/tasks/gitlab/check.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index e9a4e37ec48..60f4636e737 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -784,7 +784,7 @@ namespace :gitlab do servers.each do |server| puts "Server: #{server}" Gitlab::LDAP::Adapter.open(server) do |adapter| - users = adapter.users(adapter.config.uid, '*', 100) + users = adapter.users(adapter.config.uid, '*', limit) users.each do |user| puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}" end -- cgit v1.2.1 From 30f375cf5f5b5ca1d708c6f9558308a1d57cbd71 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 16:38:38 +0200 Subject: Don't show other actions of the same name --- app/models/ci/build.rb | 2 +- spec/models/build_spec.rb | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 21c0e128b98..58f25b20acf 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -97,7 +97,7 @@ module Ci end def other_actions - pipeline.manual_actions.where.not(id: self) + pipeline.manual_actions.where.not(name: name) end def playable? diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index f9c9725a23d..2de305738cc 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -808,6 +808,22 @@ describe Ci::Build, models: true do it 'returns other actions' do is_expected.to contain_exactly(other_build) end + + context 'when build is retried' do + let!(:new_build) { Ci::Build.retry(build) } + + it 'does not return any of them' do + is_expected.not_to include(build, new_build) + end + end + + context 'when other build is retried' do + let!(:retried_build) { Ci::Build.retry(other_build) } + + it 'returns a retried build' do + is_expected.to contain_exactly(retried_build) + end + end end describe '#play' do -- cgit v1.2.1 From db98474df1fe577eaa557306ccabc987468a4128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 20 Jul 2016 16:38:46 +0200 Subject: A CHANGELOG entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 8f20d7cb21d..6419d89d974 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -30,6 +30,7 @@ v 8.10.0 (unreleased) - Upgrade to Rails 4.2.7. !5236 - Extend exposed environment variables for CI builds - Allow to pull code with deploy key from public projects + - Use limit parameter rather than hardcoded value in `ldap:check` rake task (Mike Ricketts) - Add Sidekiq queue duration to transaction metrics. - Add a new column `artifacts_size` to table `ci_builds` !4964 - Let Workhorse serve format-patch diffs -- cgit v1.2.1 From ff3776c8d5a84f7ea6b1b50ad8c7add02d3f0434 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 22:40:49 +0800 Subject: Should check against `authorize_read_builds!` --- lib/api/builds.rb | 2 ++ spec/requests/api/builds_spec.rb | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/api/builds.rb b/lib/api/builds.rb index 7e5114052c4..657d421fe97 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -83,6 +83,8 @@ module API # GET /projects/:id/artifacts/:ref_name/download?job=name get ':id/builds/artifacts/:ref_name/download', requirements: { ref_name: /.+/ } do + authorize_read_builds! + builds = user_project.latest_successful_builds_for(params[:ref_name]) latest_build = builds.find_by!(name: params[:job]) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index d274466edec..43fb2edb730 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -6,9 +6,11 @@ describe API::API, api: true do let(:user) { create(:user) } let(:api_user) { user } let(:user2) { create(:user) } + let(:guest_user) { create(:user) } let!(:project) { create(:project, creator_id: user.id) } let!(:developer) { create(:project_member, :developer, user: user, project: project) } let!(:reporter) { create(:project_member, :reporter, user: user2, project: project) } + let!(:guest) { create(:project_member, :guest, user: guest_user, project: project) } let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id, ref: project.default_branch) } let!(:build) { create(:ci_build, pipeline: pipeline) } @@ -192,6 +194,18 @@ describe API::API, api: true do end end + context 'when forbidden' do + let(:api_user) { guest_user } + + before do + get path_for_ref + end + + it 'gives 403' do + expect(response).to have_http_status(403) + end + end + context 'non-existing build' do shared_examples 'not found' do it { expect(response).to have_http_status(:not_found) } -- cgit v1.2.1 From 782b384f8a738ecffef27b0651d986a9823045e9 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 22:42:14 +0800 Subject: Rename user2 to reporter_user --- spec/requests/api/builds_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 43fb2edb730..e110699596c 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -5,11 +5,11 @@ describe API::API, api: true do let(:user) { create(:user) } let(:api_user) { user } - let(:user2) { create(:user) } + let(:reporter_user) { create(:user) } let(:guest_user) { create(:user) } let!(:project) { create(:project, creator_id: user.id) } let!(:developer) { create(:project_member, :developer, user: user, project: project) } - let!(:reporter) { create(:project_member, :reporter, user: user2, project: project) } + let!(:reporter) { create(:project_member, :reporter, user: reporter_user, project: project) } let!(:guest) { create(:project_member, :guest, user: guest_user, project: project) } let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id, ref: project.default_branch) } let!(:build) { create(:ci_build, pipeline: pipeline) } @@ -175,7 +175,7 @@ describe API::API, api: true do end describe 'GET /projects/:id/artifacts/:ref_name/download?job=name' do - let(:api_user) { user2 } # is a reporter of the project + let(:api_user) { reporter_user } let(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) } def path_for_ref(ref = pipeline.ref, job = build.name) @@ -301,7 +301,7 @@ describe API::API, api: true do end context 'user without :update_build permission' do - let(:api_user) { user2 } + let(:api_user) { reporter_user } it 'should not cancel build' do expect(response).to have_http_status(403) @@ -333,7 +333,7 @@ describe API::API, api: true do end context 'user without :update_build permission' do - let(:api_user) { user2 } + let(:api_user) { reporter_user } it 'should not retry build' do expect(response).to have_http_status(403) -- cgit v1.2.1 From 6c339026a39eabb8593d2851d21f8eef7b595378 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 16:39:15 +0200 Subject: Fix a problem with processing a pipeline where stage only has manual actions --- app/models/ci/pipeline.rb | 5 +++-- spec/models/ci/pipeline_spec.rb | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index ad117e3950d..88fa01c896d 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -212,8 +212,9 @@ module Ci # build builds only for the first stage that has builds available. # stages.any? do |stage| - CreateBuildsService.new(self) - .execute(stage, user, status, trigger_request).present? + CreateBuildsService.new(self). + execute(stage, user, status, trigger_request). + any?(&:active?) end end diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index c29e4811385..a3bd8fdf30b 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -264,7 +264,7 @@ describe Ci::Pipeline, models: true do context 'when listing manual actions' do let(:yaml) do { - stages: ["build", "test", "test_failure", "deploy", "cleanup"], + stages: ["build", "test", "staging", "production", "cleanup"], build: { stage: "build", script: "BUILD", @@ -273,17 +273,12 @@ describe Ci::Pipeline, models: true do stage: "test", script: "TEST", }, - test_failure: { - stage: "test_failure", - script: "ON test failure", - when: "on_failure", - }, - deploy: { - stage: "deploy", + staging: { + stage: "staging", script: "PUBLISH", }, production: { - stage: "deploy", + stage: "production", script: "PUBLISH", when: "manual", }, @@ -311,11 +306,18 @@ describe Ci::Pipeline, models: true do # succeed stage test pipeline.builds.running_or_pending.each(&:success) - expect(manual_actions).to be_one # production + expect(manual_actions).to be_empty - # succeed stage deploy + # succeed stage staging and skip stage production pipeline.builds.running_or_pending.each(&:success) expect(manual_actions).to be_many # production and clear cache + + # succeed stage cleanup + pipeline.builds.running_or_pending.each(&:success) + + # after processing a pipeline we should have 6 builds, 5 succeeded + expect(pipeline.builds.count).to eq(6) + expect(pipeline.builds.success.count).to eq(4) end def manual_actions -- cgit v1.2.1 From 323d796a0e7b5f1ef5a170f9918897f6a2d4121e Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Wed, 13 Jul 2016 16:49:47 -0300 Subject: Refactor service settings view --- app/controllers/admin/services_controller.rb | 2 +- app/controllers/concerns/service_params.rb | 10 +-- app/controllers/projects/services_controller.rb | 15 +--- app/helpers/services_helper.rb | 14 ++-- app/models/project_services/slack_service.rb | 8 ++ app/models/service.rb | 8 ++ app/views/admin/services/_form.html.haml | 5 +- app/views/projects/services/_form.html.haml | 5 +- .../services/slack/_service_settings.html.haml | 34 --------- app/views/shared/_service_settings.html.haml | 81 +++++---------------- doc/integration/slack.md | 2 +- doc/project_services/img/slack_configuration.png | Bin 67350 -> 72072 bytes doc/project_services/slack.md | 4 +- .../projects/slack_service/slack_service_spec.rb | 26 +++++++ spec/models/project_services/slack_service_spec.rb | 10 +-- 15 files changed, 86 insertions(+), 138 deletions(-) delete mode 100644 app/views/projects/services/slack/_service_settings.html.haml create mode 100644 spec/features/projects/slack_service/slack_service_spec.rb diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 9d6287f3b61..7c37f3155da 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -15,7 +15,7 @@ class Admin::ServicesController < Admin::ApplicationController end def update - if service.update_attributes(application_services_params[:service]) + if service.update_attributes(service_params[:service]) redirect_to admin_application_settings_services_path, notice: 'Application settings saved successfully' else diff --git a/app/controllers/concerns/service_params.rb b/app/controllers/concerns/service_params.rb index a1c5cd28a27..471d15af913 100644 --- a/app/controllers/concerns/service_params.rb +++ b/app/controllers/concerns/service_params.rb @@ -18,18 +18,18 @@ module ServiceParams # Parameters to ignore if no value is specified FILTER_BLANK_PARAMS = [:password] - def application_services_params + def service_params dynamic_params = [] dynamic_params.concat(@service.event_channel_names) - application_services_params = params.permit(:id, service: ALLOWED_PARAMS + dynamic_params) + service_params = params.permit(:id, service: ALLOWED_PARAMS + dynamic_params) - if application_services_params[:service].is_a?(Hash) + if service_params[:service].is_a?(Hash) FILTER_BLANK_PARAMS.each do |param| - application_services_params[:service].delete(param) if application_services_params[:service][param].blank? + service_params[:service].delete(param) if service_params[:service][param].blank? end end - application_services_params + service_params end end diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index b0b66a9f599..6a227d85f6f 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -18,7 +18,7 @@ class Projects::ServicesController < Projects::ApplicationController end def update - if @service.update_attributes(service_params) + if @service.update_attributes(service_params[:service]) redirect_to( edit_namespace_project_service_path(@project.namespace, @project, @service.to_param, notice: @@ -49,17 +49,4 @@ class Projects::ServicesController < Projects::ApplicationController def service @service ||= @project.services.find { |service| service.to_param == params[:id] } end - - def service_params - dynamic_params = [] - dynamic_params.concat(@service.event_channel_names) if @service.is_a?(SlackService) - - service_params = params.require(:service).permit(ALLOWED_PARAMS + dynamic_params) - - FILTER_BLANK_PARAMS.each do |param| - service_params.delete(param) if service_params[param].blank? - end - - service_params - end end diff --git a/app/helpers/services_helper.rb b/app/helpers/services_helper.rb index 5d0f6e67c0c..2dd0bf5d71e 100644 --- a/app/helpers/services_helper.rb +++ b/app/helpers/services_helper.rb @@ -2,19 +2,19 @@ module ServicesHelper def service_event_description(event) case event when "push" - "Webhook will be triggered by a push to the repository" + "Event will be triggered by a push to the repository" when "tag_push" - "Webhook will be triggered when a new tag is pushed to the repository" + "Event will be triggered when a new tag is pushed to the repository" when "note" - "Webhook will be triggered when someone adds a comment" + "Event will be triggered when someone adds a comment" when "issue" - "Webhook will be triggered when an issue is created/updated/merged" + "Event will be triggered when an issue is created/updated/merged" when "merge_request" - "Webhook will be triggered when a merge request is created/updated/merged" + "Event will be triggered when a merge request is created/updated/merged" when "build" - "Webhook will be triggered when a build status changes" + "Event will be triggered when a build status changes" when "wiki_page" - "Webhook will be triggered when a wiki page is created/updated" + "Event will be triggered when a wiki page is created/updated" end end diff --git a/app/models/project_services/slack_service.rb b/app/models/project_services/slack_service.rb index 647188cc2ab..abbc780dc1a 100644 --- a/app/models/project_services/slack_service.rb +++ b/app/models/project_services/slack_service.rb @@ -95,6 +95,14 @@ class SlackService < Service supported_events.map { |event| event_channel_name(event) } end + def event_field(event) + fields.find { |field| field[:name] == event_channel_name(event) } + end + + def global_fields + fields.reject { |field| field[:name].end_with?('channel') } + end + private def get_channel_field(event) diff --git a/app/models/service.rb b/app/models/service.rb index 5e80b5e65d7..5bdbde97500 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -84,6 +84,14 @@ class Service < ActiveRecord::Base [] end + def event_field(event) + nil + end + + def global_fields + fields + end + def supported_events %w(push tag_push issue merge_request wiki_page) end diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index c6f8fc61a04..cdbfc60f9a4 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -4,10 +4,7 @@ %p #{@service.description} template = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |form| - - if @service.is_a?(SlackService) - = render 'projects/services/slack/service_settings', form: form - - else - = render 'shared/service_settings', form: form + = render 'shared/service_settings', form: form .form-actions = form.submit 'Save', class: 'btn btn-save' diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index abad7954db5..752fbc21a11 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -7,10 +7,7 @@ %p= @service.description .col-lg-9 = form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |form| - - if @service.is_a?(SlackService) - = render 'projects/services/slack/service_settings', form: form - - else - = render 'shared/service_settings', form: form + = render 'shared/service_settings', form: form = form.submit 'Save changes', class: 'btn btn-save'   diff --git a/app/views/projects/services/slack/_service_settings.html.haml b/app/views/projects/services/slack/_service_settings.html.haml deleted file mode 100644 index 12f4c2e45b9..00000000000 --- a/app/views/projects/services/slack/_service_settings.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -= form_errors(@service) - -- if @service.help.present? - .well - = preserve do - = markdown @service.help - -.form-group - = form.label :active, "Active", class: "control-label" - .col-sm-10 - = form.check_box :active - -.form-group - = form.label :url, "Trigger", class: 'control-label' - - .col-sm-10 - - @service.supported_events.each do |event| - %div - = form.check_box service_event_field_name(event), class: 'pull-left' - .prepend-left-20 - = form.label service_event_field_name(event), class: 'list-label' do - %strong - = event.humanize - - %p - - field = @service.fields.select{ |field| field[:name] == "#{event}_channel"}.first - = form.text_field field[:name], class: "form-control", placeholder: field[:placeholder] - - %p.light - = service_event_description(event) - -- @service.fields.each do |field| - - if %w(webhook username notify_only_broken_builds).include?(field[:name]) - = render 'shared/field', form: form, field: field diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 4eaf7c2a025..5254d265918 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -10,69 +10,28 @@ .col-sm-10 = form.check_box :active -- if @service.supported_events.length > 1 - .form-group - = form.label :url, "Trigger", class: 'control-label' - .col-sm-10 - - if @service.supported_events.include?("push") - %div - = form.check_box :push_events, class: 'pull-left' - .prepend-left-20 - = form.label :push_events, class: 'list-label' do - %strong Push events - %p.light - This url will be triggered by a push to the repository - - if @service.supported_events.include?("tag_push") - %div - = form.check_box :tag_push_events, class: 'pull-left' - .prepend-left-20 - = form.label :tag_push_events, class: 'list-label' do - %strong Tag push events - %p.light - This url will be triggered when a new tag is pushed to the repository - - if @service.supported_events.include?("note") - %div - = form.check_box :note_events, class: 'pull-left' - .prepend-left-20 - = form.label :note_events, class: 'list-label' do - %strong Comments - %p.light - This url will be triggered when someone adds a comment - - if @service.supported_events.include?("issue") - %div - = form.check_box :issues_events, class: 'pull-left' - .prepend-left-20 - = form.label :issues_events, class: 'list-label' do - %strong Issues events - %p.light - This url will be triggered when an issue is created/updated/merged - - if @service.supported_events.include?("merge_request") - %div - = form.check_box :merge_requests_events, class: 'pull-left' - .prepend-left-20 - = form.label :merge_requests_events, class: 'list-label' do - %strong Merge Request events - %p.light - This url will be triggered when a merge request is created/updated/merged - - if @service.supported_events.include?("build") - %div - = form.check_box :build_events, class: 'pull-left' - .prepend-left-20 - = form.label :build_events, class: 'list-label' do - %strong Build events - %p.light - This url will be triggered when a build status changes - - if @service.supported_events.include?("wiki_page") - %div - = form.check_box :wiki_page_events, class: 'pull-left' - .prepend-left-20 - = form.label :wiki_page_events, class: 'list-label' do - %strong Wiki Page events - %p.light - This url will be triggered when a wiki page is created/updated +.form-group + = form.label :url, "Trigger", class: 'control-label' + + .col-sm-10 + - @service.supported_events.each do |event| + %div + = form.check_box service_event_field_name(event), class: 'pull-left' + .prepend-left-20 + = form.label service_event_field_name(event), class: 'list-label' do + %strong + = event.humanize + + - field = @service.event_field(event) + + - if field + %p + = form.text_field field[:name], class: "form-control", placeholder: field[:placeholder] + %p.light + = service_event_description(event) -- @service.fields.each do |field| +- @service.global_fields.each do |field| - type = field[:type] - if type == 'fieldset' diff --git a/doc/integration/slack.md b/doc/integration/slack.md index 8dc6c4a24bb..11f956fed3e 100644 --- a/doc/integration/slack.md +++ b/doc/integration/slack.md @@ -26,7 +26,7 @@ After Slack is ready we need to setup GitLab. Here are the steps to achieve this 1. Navigate to Settings -> Services -> Slack -1. Pick the triggers you want to activate and respective channel(#general by default). +1. Pick the triggers you want to activate and respective channel (`#general` by default). 1. Fill in your Slack details - Webhook: Paste the Webhook URL from the step above diff --git a/doc/project_services/img/slack_configuration.png b/doc/project_services/img/slack_configuration.png index 0cc672c47c9..d3ebe5969af 100644 Binary files a/doc/project_services/img/slack_configuration.png and b/doc/project_services/img/slack_configuration.png differ diff --git a/doc/project_services/slack.md b/doc/project_services/slack.md index 1503d9cd983..4ed33838f7c 100644 --- a/doc/project_services/slack.md +++ b/doc/project_services/slack.md @@ -10,8 +10,8 @@ Go to your project's **Settings > Services > Slack** and you will see a checkbox * Build * Wiki page -Bellow each of these event checkboxes you will have a input to insert which Slack channel do you want to send that event message, -#general channel is default. +Below each of these event checkboxes you will have an input to insert which Slack channel do you want to send that event message, +`#general` channel is default. ![Slack configuration](img/slack_configuration.png) diff --git a/spec/features/projects/slack_service/slack_service_spec.rb b/spec/features/projects/slack_service/slack_service_spec.rb new file mode 100644 index 00000000000..16541f51d98 --- /dev/null +++ b/spec/features/projects/slack_service/slack_service_spec.rb @@ -0,0 +1,26 @@ +require 'spec_helper' + +feature 'Projects > Slack service > Setup events', feature: true do + let(:user) { create(:user) } + let(:service) { SlackService.new } + let(:project) { create(:project, slack_service: service) } + + background do + service.fields + service.update_attributes(push_channel: 1, issue_channel: 2, merge_request_channel: 3, note_channel: 4, tag_push_channel: 5, build_channel: 6, wiki_page_channel: 7) + project.team << [user, :master] + login_as(user) + end + + scenario 'user can filter events by channel' do + visit edit_namespace_project_service_path(project.namespace, project, service) + + expect(page.find_field("service_push_channel").value).to have_content '1' + expect(page.find_field("service_issue_channel").value).to have_content '2' + expect(page.find_field("service_merge_request_channel").value).to have_content '3' + expect(page.find_field("service_note_channel").value).to have_content '4' + expect(page.find_field("service_tag_push_channel").value).to have_content '5' + expect(page.find_field("service_build_channel").value).to have_content '6' + expect(page.find_field("service_wiki_page_channel").value).to have_content '7' + end +end diff --git a/spec/models/project_services/slack_service_spec.rb b/spec/models/project_services/slack_service_spec.rb index 1beb7c63b0b..df511b1bc4c 100644 --- a/spec/models/project_services/slack_service_spec.rb +++ b/spec/models/project_services/slack_service_spec.rb @@ -139,7 +139,7 @@ describe SlackService, models: true do end context "event channels" do - it "should user the right channel for push event" do + it "uses the right channel for push event" do slack.update_attributes(push_channel: "random") expect(Slack::Notifier).to receive(:new). @@ -151,7 +151,7 @@ describe SlackService, models: true do slack.execute(push_sample_data) end - it "should use the right channel for merge request event" do + it "uses the right channel for merge request event" do slack.update_attributes(merge_request_channel: "random") expect(Slack::Notifier).to receive(:new). @@ -163,7 +163,7 @@ describe SlackService, models: true do slack.execute(@merge_sample_data) end - it "should use the right channel for issue event" do + it "uses the right channel for issue event" do slack.update_attributes(issue_channel: "random") expect(Slack::Notifier).to receive(:new). @@ -175,7 +175,7 @@ describe SlackService, models: true do slack.execute(@issues_sample_data) end - it "should use the right channel for wiki event" do + it "uses the right channel for wiki event" do slack.update_attributes(wiki_page_channel: "random") expect(Slack::Notifier).to receive(:new). @@ -192,7 +192,7 @@ describe SlackService, models: true do create(:note_on_issue, project: project, note: "issue note") end - it "should use the right channel" do + it "uses the right channel" do slack.update_attributes(note_channel: "random") note_data = Gitlab::NoteDataBuilder.build(issue_note, user) -- cgit v1.2.1 From 70023c2179bf5752302078bfa0199b8ed8f73813 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 20 Jul 2016 17:12:18 +0200 Subject: fix spec --- spec/features/projects/import_export/import_file_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb index 40809aa4aba..239e8369d54 100644 --- a/spec/features/projects/import_export/import_file_spec.rb +++ b/spec/features/projects/import_export/import_file_spec.rb @@ -65,7 +65,9 @@ feature 'project import', feature: true, js: true do visit new_project_path select2('2', from: '#project_namespace_id') - click_link 'GitLab export' + + # click on disabled element + find(:link, 'GitLab export').trigger('click') page.within('.flash-container') do expect(page).to have_content('Please enter path and name') -- cgit v1.2.1 From e8bab842cb519cd8af61368d7307c9c84b6f8d38 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 23:17:28 +0800 Subject: Cleanup that a bit --- spec/models/project_spec.rb | 69 ++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 9d122fd0083..3a5e922bae7 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1115,29 +1115,44 @@ describe Project, models: true do end describe '#latest_successful_builds_for' do - def create_pipeline + def create_pipeline(status = 'success') create(:ci_pipeline, project: project, sha: project.commit.sha, ref: project.default_branch, - status: 'success') + status: status) end def create_build(new_pipeline = pipeline, name = 'test') create(:ci_build, :success, :artifacts, pipeline: new_pipeline, + status: new_pipeline.status, name: name) end let(:project) { create(:project) } let(:pipeline) { create_pipeline } - let(:build) { create_build } + + context 'with many builds' do + before do + @pipeline1 = create_pipeline + @pipeline2 = create_pipeline + @build1_p2 = create_build(@pipeline2, 'test') + @build1_p1 = create_build(@pipeline1, 'test') + @build2_p1 = create_build(@pipeline1, 'test2') + @build2_p2 = create_build(@pipeline2, 'test2') + end + + it 'gives the latest builds from latest pipeline' do + latest_builds = project.latest_successful_builds_for + + expect(latest_builds).to contain_exactly(@build2_p2, @build1_p2) + end + end context 'with succeeded pipeline' do - context 'standalone pipeline' do - before do - build - end + let!(:build) { create_build } + context 'standalone pipeline' do it 'returns builds for ref for default_branch' do builds = project.latest_successful_builds_for @@ -1152,45 +1167,15 @@ describe Project, models: true do end end - context 'with many builds' do + context 'with some pending pipeline' do before do - @pipeline1 = create_pipeline - @pipeline2 = create_pipeline - @build1_p2 = create_build(@pipeline2, 'test') - @build1_p1 = create_build(@pipeline1, 'test') - @build2_p1 = create_build(@pipeline1, 'test2') - @build2_p2 = create_build(@pipeline2, 'test2') + create_build(create_pipeline('pending')) end - it 'gives the latest builds from latest pipeline' do - latest_builds = project.latest_successful_builds_for - - expect(latest_builds).to contain_exactly(@build2_p2, @build1_p2) - end - end - - context 'with multiple pipelines and builds' do - shared_examples 'latest successful one' do - it 'gives the latest build from latest pipeline' do - latest_build = project.latest_successful_builds_for.first - - expect(latest_build).to eq(build) - end - end - - context 'with some pending pipeline' do - before do - # make sure pipeline was old, but still the latest success one - build - - new_pipeline = create(:ci_pipeline, project: project, - sha: project.commit.sha, - ref: project.default_branch, - status: 'pending') - create(:ci_build, :pending, :artifacts, pipeline: new_pipeline) - end + it 'gives the latest build from latest pipeline' do + latest_build = project.latest_successful_builds_for - it_behaves_like 'latest successful one' + expect(latest_build).to contain_exactly(build) end end end -- cgit v1.2.1 From a77a58dffb20838e4e3a51796b4b3d95d7b8c400 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 23:17:49 +0800 Subject: Use 'when logging as guest' for context, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13200997 --- spec/requests/api/builds_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index e110699596c..9b205d66ff6 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -194,7 +194,7 @@ describe API::API, api: true do end end - context 'when forbidden' do + context 'when logging as guest' do let(:api_user) { guest_user } before do -- cgit v1.2.1 From eea2fd80fc3fbcdfd9beeff2bec5f667bf6135de Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 23:19:35 +0800 Subject: Use the same logic, it should specify that it's not logged in --- spec/requests/api/builds_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 9b205d66ff6..e408ea06e7e 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -182,7 +182,7 @@ describe API::API, api: true do api("/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}", api_user) end - context 'when unauthorized' do + context 'when not logged in' do let(:api_user) { nil } before do -- cgit v1.2.1 From 08f01dbbc5dc7eb608e4a331a536cc08d297d31a Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 23:38:47 +0800 Subject: Make sure there's a build --- spec/models/project_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 3a5e922bae7..91b24e03793 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1183,6 +1183,7 @@ describe Project, models: true do context 'with pending pipeline' do before do pipeline.update(status: 'pending') + create_build(pipeline) end it 'returns empty relation' do -- cgit v1.2.1 From caf6438a2495c09a10f047d18a67b7071d05f7a2 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 23:42:07 +0800 Subject: It's not longer than 80 chars --- app/models/ci/build.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index f87c1206e91..a24665eed72 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -12,9 +12,7 @@ module Ci scope :unstarted, ->() { where(runner_id: nil) } scope :ignore_failures, ->() { where(allow_failure: false) } - scope :with_artifacts, ->() do - where.not(artifacts_file: [nil, '']) - end + scope :with_artifacts, ->() { where.not(artifacts_file: [nil, '']) } scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) } scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) } scope :manual_actions, ->() { where(when: :manual) } -- cgit v1.2.1 From 6558586f15f493968129b78544d76486cd2a6cd4 Mon Sep 17 00:00:00 2001 From: winniehell Date: Sat, 9 Jul 2016 02:47:05 +0200 Subject: Add link to user profile to commit avatar (!5163) --- CHANGELOG | 1 + app/helpers/avatars_helper.rb | 30 ++++++++++++++++++++++ app/helpers/commits_helper.rb | 10 -------- app/views/events/_event.html.haml | 6 +---- .../projects/ci/pipelines/_pipeline.html.haml | 2 +- app/views/projects/commits/_commit.html.haml | 3 ++- 6 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 app/helpers/avatars_helper.rb diff --git a/CHANGELOG b/CHANGELOG index 6419d89d974..16431440579 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ v 8.10.0 (unreleased) - Add Application Setting to configure default Repository Path for new projects - Delete award emoji when deleting a user - Remove pinTo from Flash and make inline flash messages look nicer !4854 (winniehell) + - Add link to profile to commit avatar !5163 (winniehell) - Wrap code blocks on Activies and Todos page. !4783 (winniehell) - Align flash messages with left side of page content !4959 (winniehell) - Display tooltip for "Copy to Clipboard" button !5164 (winniehell) diff --git a/app/helpers/avatars_helper.rb b/app/helpers/avatars_helper.rb new file mode 100644 index 00000000000..6ff40c6b461 --- /dev/null +++ b/app/helpers/avatars_helper.rb @@ -0,0 +1,30 @@ +module AvatarsHelper + + def author_avatar(commit_or_event, options = {}) + user_avatar(options.merge({ + user: commit_or_event.author, + user_name: commit_or_event.author_name, + user_email: commit_or_event.author_email, + })) + end + + private + + def user_avatar(options = {}) + avatar_size = options[:size] || 16 + user_name = options[:user].try(:name) || options[:user_name] + avatar = image_tag( + avatar_icon(options[:user] || options[:user_email], avatar_size), + class: "avatar has-tooltip hidden-xs s#{avatar_size}", + alt: "#{user_name}'s avatar", + title: user_name + ) + + if options[:user] + link_to(avatar, user_path(options[:user])) + elsif options[:user_email] + mail_to(options[:user_email], avatar) + end + end + +end diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 474041eccbb..052ce56809e 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -16,16 +16,6 @@ module CommitsHelper commit_person_link(commit, options.merge(source: :committer)) end - def commit_author_avatar(commit, options = {}) - options = options.merge(source: :author) - user = commit.send(options[:source]) - - source_email = clean(commit.send "#{options[:source]}_email".to_sym) - person_email = user.try(:email) || source_email - - image_tag(avatar_icon(person_email, options[:size]), class: "avatar #{"s#{options[:size]}" if options[:size]} hidden-xs", width: options[:size], alt: "") - end - def image_diff_class(diff) if diff.deleted_file "deleted" diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index e4629bae0e6..5c318cd3b8b 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -4,11 +4,7 @@ #{time_ago_with_tooltip(event.created_at)} = cache [event, current_application_settings, "v2.2"] do - - if event.author - = link_to user_path(event.author) do - = image_tag avatar_icon(event.author_email, 40), class: "avatar s40", alt:'' - - else - = image_tag avatar_icon(event.author_email, 40), class: "avatar s40", alt:'' + = author_avatar(event, size: 40) - if event.created_project? = render "events/event/created_project", event: event diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index cb0ca7bc8e3..2f7d54f0bdd 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -27,7 +27,7 @@ %p.commit-title - if commit = pipeline.commit - = commit_author_avatar(commit, size: 20) + = author_avatar(commit, size: 20) = link_to_gfm truncate(commit.title, length: 60), namespace_project_commit_path(@project.namespace, @project, commit.id), class: "commit-row-message" - else Cant find HEAD commit for this branch diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index c8c7b858baa..ab9afb06afb 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -9,7 +9,8 @@ = cache(cache_key) do %li.commit.js-toggle-container{ id: "commit-#{commit.short_id}" } - = commit_author_avatar(commit, size: 36) + = author_avatar(commit, size: 36) + .commit-info-block .commit-row-title %span.item-title -- cgit v1.2.1 From 96572bd006fd257eb037c0fbf9c6094f35d8cd60 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 20 Jul 2016 17:54:50 +0200 Subject: fix spec - unused var --- spec/features/projects/import_export/import_file_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb index 239e8369d54..2d1e3bbebe5 100644 --- a/spec/features/projects/import_export/import_file_spec.rb +++ b/spec/features/projects/import_export/import_file_spec.rb @@ -60,7 +60,7 @@ feature 'project import', feature: true, js: true do end scenario 'project with no name' do - project = create(:project, namespace_id: 2) + create(:project, namespace_id: 2) visit new_project_path -- cgit v1.2.1 From 01dcb5c2623f2123bdf6d7d6164aa90c35796f8a Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 20 Jul 2016 23:56:54 +0800 Subject: Lose unneeded instance variables and variables, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13202326 --- spec/models/project_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 91b24e03793..c25c971c606 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1134,12 +1134,12 @@ describe Project, models: true do context 'with many builds' do before do - @pipeline1 = create_pipeline - @pipeline2 = create_pipeline - @build1_p2 = create_build(@pipeline2, 'test') - @build1_p1 = create_build(@pipeline1, 'test') - @build2_p1 = create_build(@pipeline1, 'test2') - @build2_p2 = create_build(@pipeline2, 'test2') + pipeline1 = create_pipeline + pipeline2 = create_pipeline + @build1_p2 = create_build(pipeline2, 'test') + create_build(pipeline1, 'test') + create_build(pipeline1, 'test2') + @build2_p2 = create_build(pipeline2, 'test2') end it 'gives the latest builds from latest pipeline' do -- cgit v1.2.1 From ba962aa3f05bf325e0c435dfba5e9d939ab62085 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 21 Jul 2016 00:09:35 +0800 Subject: Cleanup the use of let, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13202424 --- spec/requests/api/builds_spec.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index e408ea06e7e..86a7b242fbe 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -5,12 +5,10 @@ describe API::API, api: true do let(:user) { create(:user) } let(:api_user) { user } - let(:reporter_user) { create(:user) } - let(:guest_user) { create(:user) } let!(:project) { create(:project, creator_id: user.id) } let!(:developer) { create(:project_member, :developer, user: user, project: project) } - let!(:reporter) { create(:project_member, :reporter, user: reporter_user, project: project) } - let!(:guest) { create(:project_member, :guest, user: guest_user, project: project) } + let(:reporter) { create(:project_member, :reporter, project: project) } + let(:guest) { create(:project_member, :guest, project: project) } let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id, ref: project.default_branch) } let!(:build) { create(:ci_build, pipeline: pipeline) } @@ -175,7 +173,7 @@ describe API::API, api: true do end describe 'GET /projects/:id/artifacts/:ref_name/download?job=name' do - let(:api_user) { reporter_user } + let(:api_user) { reporter.user } let(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) } def path_for_ref(ref = pipeline.ref, job = build.name) @@ -195,7 +193,7 @@ describe API::API, api: true do end context 'when logging as guest' do - let(:api_user) { guest_user } + let(:api_user) { guest.user } before do get path_for_ref @@ -301,7 +299,7 @@ describe API::API, api: true do end context 'user without :update_build permission' do - let(:api_user) { reporter_user } + let(:api_user) { reporter.user } it 'should not cancel build' do expect(response).to have_http_status(403) @@ -333,7 +331,7 @@ describe API::API, api: true do end context 'user without :update_build permission' do - let(:api_user) { reporter_user } + let(:api_user) { reporter.user } it 'should not retry build' do expect(response).to have_http_status(403) -- cgit v1.2.1 From 8ad92b95c92c6263d051c9f3045c9c2ad7e28f07 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 21 Jul 2016 00:13:02 +0800 Subject: Just put setup directly in the test, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13202462 --- spec/models/project_spec.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index c25c971c606..76dc70ae893 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1133,19 +1133,17 @@ describe Project, models: true do let(:pipeline) { create_pipeline } context 'with many builds' do - before do + it 'gives the latest builds from latest pipeline' do pipeline1 = create_pipeline pipeline2 = create_pipeline - @build1_p2 = create_build(pipeline2, 'test') + build1_p2 = create_build(pipeline2, 'test') create_build(pipeline1, 'test') create_build(pipeline1, 'test2') - @build2_p2 = create_build(pipeline2, 'test2') - end + build2_p2 = create_build(pipeline2, 'test2') - it 'gives the latest builds from latest pipeline' do latest_builds = project.latest_successful_builds_for - expect(latest_builds).to contain_exactly(@build2_p2, @build1_p2) + expect(latest_builds).to contain_exactly(build2_p2, build1_p2) end end -- cgit v1.2.1 From 1a596671b8bfe2ba3c389bea2a759cb696aac82f Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 20 Jul 2016 17:53:37 +0100 Subject: Fixed padding on line content --- app/assets/stylesheets/mailers/repository_push_email.scss | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/mailers/repository_push_email.scss b/app/assets/stylesheets/mailers/repository_push_email.scss index 847e4578baa..98dd6217aa9 100644 --- a/app/assets/stylesheets/mailers/repository_push_email.scss +++ b/app/assets/stylesheets/mailers/repository_push_email.scss @@ -11,6 +11,7 @@ // explicit child selectors. .code { + background-color: #fff; font-family: monospace; font-size: $code_font_size; -premailer-cellpadding: 0; @@ -25,8 +26,8 @@ .diff-line-num { padding: 0 5px; text-align: right; - max-width: 50px; width: 35px; + background-color: $background-color; color: $black-transparent; border-right: 1px solid $table-border-gray; @@ -42,8 +43,9 @@ } .line_content { + padding-left: 0.5em; + padding-right: 0.5em; white-space: pre; - background-color: #fff; &.old { background-color: $line-removed; @@ -69,10 +71,6 @@ } } -.diff-line-num { - background-color: $background-color; -} - span.highlight_word { background-color: #fafe3d !important; } -- cgit v1.2.1 From 122b046b92573f3e1db579b5ff73fa3bdfffc124 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 21 Jul 2016 01:10:08 +0800 Subject: Workaround MySQL with INNER JOIN: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' Oh well. --- app/models/commit_status.rb | 6 +++++- app/models/project.rb | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 535db26240a..2d185c28809 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -16,7 +16,11 @@ class CommitStatus < ActiveRecord::Base alias_attribute :author, :user - scope :latest, -> { where(id: unscope(:select).select('max(id)').group(:name, :commit_id)) } + scope :latest, -> do + max_id = unscope(:select).select("max(#{quoted_table_name}.id)") + + where(id: max_id.group(:name, :commit_id)) + end scope :retried, -> { where.not(id: latest) } scope :ordered, -> { order(:name) } scope :ignored, -> { where(allow_failure: true, status: [:failed, :canceled]) } diff --git a/app/models/project.rb b/app/models/project.rb index 80860f142d4..9f0dcb9a212 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,8 +431,13 @@ class Project < ActiveRecord::Base # ref can't be HEAD, can only be branch/tag name or SHA def latest_successful_builds_for(ref = default_branch) - pipeline = pipelines.latest_successful_for(ref) - builds.where(pipeline: pipeline).latest.with_artifacts + pipeline = pipelines.latest_successful_for(ref).to_sql + join_sql = "INNER JOIN (#{pipeline}) pipelines" + + " ON pipelines.id = #{Ci::Build.quoted_table_name}.commit_id" + builds.joins(join_sql).latest.with_artifacts + # TODO: Whenever we dropped support for MySQL, we could change to: + # pipeline = pipelines.latest_successful_for(ref) + # builds.where(pipeline: pipeline).latest.with_artifacts end def merge_base_commit(first_commit_id, second_commit_id) -- cgit v1.2.1 From 818ad89ea5f9ac3cf05506e7b81fd0c2fca5d9dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Wed, 1 Jun 2016 22:25:22 -0400 Subject: Add /deploy_keys API to retrieve all deploy keys regardless of project affiliation Also, in favour of consistency, deprecate `/projects/:id/keys/...` routes in favour of `/projects/:id/deploy_keys/...` --- CHANGELOG | 2 + doc/api/deploy_key_multiple_projects.md | 2 +- doc/api/deploy_keys.md | 49 ++++++++++--- lib/api/deploy_keys.rb | 119 ++++++++++++++++++-------------- spec/requests/api/deploy_keys.rb | 38 ++++++++++ spec/requests/api/projects_spec.rb | 24 +++---- 6 files changed, 159 insertions(+), 75 deletions(-) create mode 100644 spec/requests/api/deploy_keys.rb diff --git a/CHANGELOG b/CHANGELOG index c15077afb08..4f7bd0d08f8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -30,6 +30,8 @@ v 8.10.0 (unreleased) - Apply the trusted_proxies config to the rack request object for use with rack_attack - Upgrade to Rails 4.2.7. !5236 - Extend exposed environment variables for CI builds + - Deprecate APIs "projects/:id/keys/...". Use "projects/:id/deploy_keys/..." instead + - Add API "deploy_keys" for admins to get all deploy keys - Allow to pull code with deploy key from public projects - Use limit parameter rather than hardcoded value in `ldap:check` rake task (Mike Ricketts) - Add Sidekiq queue duration to transaction metrics. diff --git a/doc/api/deploy_key_multiple_projects.md b/doc/api/deploy_key_multiple_projects.md index 3ad836f51b5..9280f0d68b6 100644 --- a/doc/api/deploy_key_multiple_projects.md +++ b/doc/api/deploy_key_multiple_projects.md @@ -24,6 +24,6 @@ With those IDs, add the same deploy key to all: ``` for project_id in 321 456 987; do curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -H "Content-Type: application/json" \ - --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v3/projects/${project_id}/keys + --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v3/projects/${project_id}/deploy_keys done ``` diff --git a/doc/api/deploy_keys.md b/doc/api/deploy_keys.md index 9da1fe22e61..4e620ccc81a 100644 --- a/doc/api/deploy_keys.md +++ b/doc/api/deploy_keys.md @@ -1,11 +1,42 @@ # Deploy Keys -## List deploy keys +## List all deploy keys + +Get a list of all deploy keys across all projects. + +``` +GET /deploy_keys +``` + +```bash +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/deploy_keys" +``` + +Example response: + +```json +[ + { + "id": 1, + "title": "Public key", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=", + "created_at": "2013-10-02T10:12:29Z" + }, + { + "id": 3, + "title": "Another Public key", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=", + "created_at": "2013-10-02T11:12:29Z" + } +] +``` + +## List project deploy keys Get a list of a project's deploy keys. ``` -GET /projects/:id/keys +GET /projects/:id/deploy_keys ``` | Attribute | Type | Required | Description | @@ -13,7 +44,7 @@ GET /projects/:id/keys | `id` | integer | yes | The ID of the project | ```bash -curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/keys" +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys" ``` Example response: @@ -40,7 +71,7 @@ Example response: Get a single key. ``` -GET /projects/:id/keys/:key_id +GET /projects/:id/deploy_keys/:key_id ``` Parameters: @@ -51,7 +82,7 @@ Parameters: | `key_id` | integer | yes | The ID of the deploy key | ```bash -curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/keys/11" +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys/11" ``` Example response: @@ -73,7 +104,7 @@ If the deploy key already exists in another project, it will be joined to curren project only if original one was is accessible by the same user. ``` -POST /projects/:id/keys +POST /projects/:id/deploy_keys ``` | Attribute | Type | Required | Description | @@ -83,7 +114,7 @@ POST /projects/:id/keys | `key` | string | yes | New deploy key | ```bash -curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -H "Content-Type: application/json" --data '{"title": "My deploy key", "key": "ssh-rsa AAAA..."}' "https://gitlab.example.com/api/v3/projects/5/keys/" +curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -H "Content-Type: application/json" --data '{"title": "My deploy key", "key": "ssh-rsa AAAA..."}' "https://gitlab.example.com/api/v3/projects/5/deploy_keys/" ``` Example response: @@ -102,7 +133,7 @@ Example response: Delete a deploy key from a project ``` -DELETE /projects/:id/keys/:key_id +DELETE /projects/:id/deploy_keys/:key_id ``` | Attribute | Type | Required | Description | @@ -111,7 +142,7 @@ DELETE /projects/:id/keys/:key_id | `key_id` | integer | yes | The ID of the deploy key | ```bash -curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/keys/13" +curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/deploy_keys/13" ``` Example response: diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index 06eb7756841..63355e4968d 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -2,74 +2,87 @@ module API # Projects API class DeployKeys < Grape::API before { authenticate! } - before { authorize_admin_project } + + get "deploy_keys" do + authenticated_as_admin! + + keys = DeployKey.all + present keys, with: Entities::SSHKey + end resource :projects do - # Get a specific project's keys - # - # Example Request: - # GET /projects/:id/keys - get ":id/keys" do - present user_project.deploy_keys, with: Entities::SSHKey - end + before { authorize_admin_project } - # Get single key owned by currently authenticated user + # Routing "projects/:id/keys/..." is DEPRECATED and WILL BE REMOVED in version 9.0 + # Use "projects/:id/deploy_keys/..." instead. # - # Example Request: - # GET /projects/:id/keys/:id - get ":id/keys/:key_id" do - key = user_project.deploy_keys.find params[:key_id] - present key, with: Entities::SSHKey - end + %w(keys deploy_keys).each do |path| + # Get a specific project's deploy keys + # + # Example Request: + # GET /projects/:id/deploy_keys + get ":id/#{path}" do + present user_project.deploy_keys, with: Entities::SSHKey + end - # Add new ssh key to currently authenticated user - # If deploy key already exists - it will be joined to project - # but only if original one was is accessible by same user - # - # Parameters: - # key (required) - New SSH Key - # title (required) - New SSH Key's title - # Example Request: - # POST /projects/:id/keys - post ":id/keys" do - attrs = attributes_for_keys [:title, :key] + # Get single deploy key owned by currently authenticated user + # + # Example Request: + # GET /projects/:id/deploy_keys/:key_id + get ":id/#{path}/:key_id" do + key = user_project.deploy_keys.find params[:key_id] + present key, with: Entities::SSHKey + end - if attrs[:key].present? - attrs[:key].strip! + # Add new deploy key to currently authenticated user + # If deploy key already exists - it will be joined to project + # but only if original one was accessible by same user + # + # Parameters: + # key (required) - New deploy Key + # title (required) - New deploy Key's title + # Example Request: + # POST /projects/:id/deploy_keys + post ":id/#{path}" do + attrs = attributes_for_keys [:title, :key] - # check if key already exist in project - key = user_project.deploy_keys.find_by(key: attrs[:key]) - if key - present key, with: Entities::SSHKey - return + if attrs[:key].present? + attrs[:key].strip! + + # check if key already exist in project + key = user_project.deploy_keys.find_by(key: attrs[:key]) + if key + present key, with: Entities::SSHKey + return + end + + # Check for available deploy keys in other projects + key = current_user.accessible_deploy_keys.find_by(key: attrs[:key]) + if key + user_project.deploy_keys << key + present key, with: Entities::SSHKey + return + end end - # Check for available deploy keys in other projects - key = current_user.accessible_deploy_keys.find_by(key: attrs[:key]) - if key - user_project.deploy_keys << key + key = DeployKey.new attrs + + if key.valid? && user_project.deploy_keys << key present key, with: Entities::SSHKey - return + else + render_validation_error!(key) end end - key = DeployKey.new attrs - - if key.valid? && user_project.deploy_keys << key - present key, with: Entities::SSHKey - else - render_validation_error!(key) + # Delete existing deploy key of currently authenticated user + # + # Example Request: + # DELETE /projects/:id/deploy_keys/:key_id + delete ":id/#{path}/:key_id" do + key = user_project.deploy_keys.find params[:key_id] + key.destroy end end - - # Delete existed ssh key of currently authenticated user - # - # Example Request: - # DELETE /projects/:id/keys/:id - delete ":id/keys/:key_id" do - key = user_project.deploy_keys.find params[:key_id] - key.destroy - end end end end diff --git a/spec/requests/api/deploy_keys.rb b/spec/requests/api/deploy_keys.rb new file mode 100644 index 00000000000..ac42288bc34 --- /dev/null +++ b/spec/requests/api/deploy_keys.rb @@ -0,0 +1,38 @@ +require 'spec_helper' + +describe API::API, api: true do + include ApiHelpers + + let(:user) { create(:user) } + let(:project) { create(:project, creator_id: user.id) } + let!(:deploy_keys_project) { create(:deploy_keys_project, project: project) } + let(:admin) { create(:admin) } + + describe 'GET /deploy_keys' do + before { admin } + + context 'when unauthenticated' do + it 'should return authentication error' do + get api('/deploy_keys') + expect(response.status).to eq(401) + end + end + + context 'when authenticated as non-admin user' do + it 'should return a 403 error' do + get api('/deploy_keys', user) + expect(response.status).to eq(403) + end + end + + context 'when authenticated as admin' do + it 'should return all deploy keys' do + get api('/deploy_keys', admin) + expect(response.status).to eq(200) + + expect(json_response).to be_an Array + expect(json_response.first['id']).to eq(deploy_keys_project.deploy_key.id) + end + end + end +end diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 152cd802839..afa0599807f 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -647,33 +647,33 @@ describe API::API, api: true do let(:deploy_keys_project) { create(:deploy_keys_project, project: project) } let(:deploy_key) { deploy_keys_project.deploy_key } - describe 'GET /projects/:id/keys' do + describe 'GET /projects/:id/deploy_keys' do before { deploy_key } it 'should return array of ssh keys' do - get api("/projects/#{project.id}/keys", user) + get api("/projects/#{project.id}/deploy_keys", user) expect(response).to have_http_status(200) expect(json_response).to be_an Array expect(json_response.first['title']).to eq(deploy_key.title) end end - describe 'GET /projects/:id/keys/:key_id' do + describe 'GET /projects/:id/deploy_keys/:key_id' do it 'should return a single key' do - get api("/projects/#{project.id}/keys/#{deploy_key.id}", user) + get api("/projects/#{project.id}/deploy_keys/#{deploy_key.id}", user) expect(response).to have_http_status(200) expect(json_response['title']).to eq(deploy_key.title) end it 'should return 404 Not Found with invalid ID' do - get api("/projects/#{project.id}/keys/404", user) + get api("/projects/#{project.id}/deploy_keys/404", user) expect(response).to have_http_status(404) end end - describe 'POST /projects/:id/keys' do + describe 'POST /projects/:id/deploy_keys' do it 'should not create an invalid ssh key' do - post api("/projects/#{project.id}/keys", user), { title: 'invalid key' } + post api("/projects/#{project.id}/deploy_keys", user), { title: 'invalid key' } expect(response).to have_http_status(400) expect(json_response['message']['key']).to eq([ 'can\'t be blank', @@ -683,7 +683,7 @@ describe API::API, api: true do end it 'should not create a key without title' do - post api("/projects/#{project.id}/keys", user), key: 'some key' + post api("/projects/#{project.id}/deploy_keys", user), key: 'some key' expect(response).to have_http_status(400) expect(json_response['message']['title']).to eq([ 'can\'t be blank', @@ -694,22 +694,22 @@ describe API::API, api: true do it 'should create new ssh key' do key_attrs = attributes_for :key expect do - post api("/projects/#{project.id}/keys", user), key_attrs + post api("/projects/#{project.id}/deploy_keys", user), key_attrs end.to change{ project.deploy_keys.count }.by(1) end end - describe 'DELETE /projects/:id/keys/:key_id' do + describe 'DELETE /projects/:id/deploy_keys/:key_id' do before { deploy_key } it 'should delete existing key' do expect do - delete api("/projects/#{project.id}/keys/#{deploy_key.id}", user) + delete api("/projects/#{project.id}/deploy_keys/#{deploy_key.id}", user) end.to change{ project.deploy_keys.count }.by(-1) end it 'should return 404 Not Found with invalid ID' do - delete api("/projects/#{project.id}/keys/404", user) + delete api("/projects/#{project.id}/deploy_keys/404", user) expect(response).to have_http_status(404) end end -- cgit v1.2.1 From 04803174331f9874db572ad712edfdf73b1ded16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Fri, 3 Jun 2016 11:51:22 -0400 Subject: Change `return`s for `next`s to please rubocop (behaviour is the same) --- lib/api/deploy_keys.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index 63355e4968d..5c570b5e5ca 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -53,7 +53,7 @@ module API key = user_project.deploy_keys.find_by(key: attrs[:key]) if key present key, with: Entities::SSHKey - return + next end # Check for available deploy keys in other projects @@ -61,7 +61,7 @@ module API if key user_project.deploy_keys << key present key, with: Entities::SSHKey - return + next end end -- cgit v1.2.1 From ea63346df5a420cebbc44491eef8e2d2a0fb5ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Thu, 7 Jul 2016 16:08:06 -0400 Subject: Refactor user authorization check for a single project to avoid querying all user projects Currently, even when searching for all authorized issues of *one* project, we run the `Users#authorized_projects` query (which can be rather slow). This update checks if we are handling issues of just one project and does the authorization check locally. It does have the downside of basically repeating the logic of `Users#authorized_projects` on `Project#authorized_for_user`. --- CHANGELOG | 1 + app/models/issue.rb | 40 ++++++++++++++++++++++++++++++++++++ app/models/project.rb | 40 ++++++++++++++++++++++++++++++++++++ app/models/user.rb | 2 ++ spec/models/issue_spec.rb | 20 ++++++++++++++++++ spec/models/project_spec.rb | 49 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 152 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index c15077afb08..2a9cfa84ad4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -38,6 +38,7 @@ v 8.10.0 (unreleased) - Display tooltip for mentioned users and groups !5261 (winniehell) - Allow build email service to be tested - Added day name to contribution calendar tooltips + - Refactor user authorization check for a single project to avoid querying all user projects - Make images fit to the size of the viewport !4810 - Fix check for New Branch button on Issue page !4630 (winniehell) - Fix GFM autocomplete not working on wiki pages diff --git a/app/models/issue.rb b/app/models/issue.rb index 60abd47409e..60af8c15340 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -52,10 +52,50 @@ class Issue < ActiveRecord::Base attributes end + class << self + private + + # Returns the project that the current scope belongs to if any, nil otherwise. + # + # Examples: + # - my_project.issues.without_due_date.owner_project => my_project + # - Issue.all.owner_project => nil + def owner_project + # No owner if we're not being called from an association + return unless all.respond_to?(:proxy_association) + + owner = all.proxy_association.owner + + # Check if the association is or belongs to a project + if owner.is_a?(Project) + owner + else + begin + owner.association(:project).target + rescue ActiveRecord::AssociationNotFoundError + nil + end + end + end + end + def self.visible_to_user(user) return where('issues.confidential IS NULL OR issues.confidential IS FALSE') if user.blank? return all if user.admin? + # Check if we are scoped to a specific project's issues + if owner_project + if owner_project.authorized_for_user?(user, Gitlab::Access::REPORTER) + # If the project is authorized for the user, they can see all issues in the project + return all + else + # else only non confidential and authored/assigned to them + return where('issues.confidential IS NULL OR issues.confidential IS FALSE + OR issues.author_id = :user_id OR issues.assignee_id = :user_id', + user_id: user.id) + end + end + where(' issues.confidential IS NULL OR issues.confidential IS FALSE diff --git a/app/models/project.rb b/app/models/project.rb index c96de0f6c72..d6191e80e62 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1210,4 +1210,44 @@ class Project < ActiveRecord::Base { key: variable.key, value: variable.value, public: false } end end + + # Checks if `user` is authorized for this project, with at least the + # `min_access_level` (if given). + # + # If you change the logic of this method, please also update `User#authorized_projects` + def authorized_for_user?(user, min_access_level = nil) + return false unless user + + return true if personal? && namespace_id == user.namespace_id + + authorized_for_user_by_group?(user, min_access_level) || + authorized_for_user_by_members?(user, min_access_level) || + authorized_for_user_by_shared_projects?(user, min_access_level) + end + + private + + def authorized_for_user_by_group?(user, min_access_level) + member = user.group_members.find_by(source_id: group) + + member && (!min_access_level || member.access_level >= min_access_level) + end + + def authorized_for_user_by_members?(user, min_access_level) + member = members.find_by(user_id: user) + + member && (!min_access_level || member.access_level >= min_access_level) + end + + def authorized_for_user_by_shared_projects?(user, min_access_level) + shared_projects = user.group_members.joins(group: :shared_projects). + where(project_group_links: { project_id: self }) + + if min_access_level + members_scope = { access_level: Gitlab::Access.values.select { |access| access >= min_access_level } } + shared_projects = shared_projects.where(members: members_scope) + end + + shared_projects.any? + end end diff --git a/app/models/user.rb b/app/models/user.rb index 975e935fa20..8dc10becd69 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -412,6 +412,8 @@ class User < ActiveRecord::Base end # Returns projects user is authorized to access. + # + # If you change the logic of this method, please also update `Project#authorized_for_user` def authorized_projects(min_access_level = nil) Project.where("projects.id IN (#{projects_union(min_access_level).to_sql})") end diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index b87d68283e6..6a897c96690 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -22,6 +22,26 @@ describe Issue, models: true do it { is_expected.to have_db_index(:deleted_at) } end + describe 'visible_to_user' do + let(:user) { create(:user) } + let(:authorized_user) { create(:user) } + let(:project) { create(:project, namespace: authorized_user.namespace) } + let!(:public_issue) { create(:issue, project: project) } + let!(:confidential_issue) { create(:issue, project: project, confidential: true) } + + it 'returns non confidential issues for nil user' do + expect(Issue.visible_to_user(nil).count).to be(1) + end + + it 'returns non confidential issues for user not authorized for the issues projects' do + expect(Issue.visible_to_user(user).count).to be(1) + end + + it 'returns all issues for user authorized for the issues projects' do + expect(Issue.visible_to_user(authorized_user).count).to be(2) + end + end + describe '#to_reference' do it 'returns a String reference to the object' do expect(subject.to_reference).to eq "##{subject.iid}" diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index e3e7319beb2..a2b089c51e2 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1187,4 +1187,53 @@ describe Project, models: true do end end end + + describe 'authorized_for_user' do + let(:group) { create(:group) } + let(:developer) { create(:user) } + let(:master) { create(:user) } + let(:personal_project) { create(:project, namespace: developer.namespace) } + let(:group_project) { create(:project, namespace: group) } + let(:members_project) { create(:project) } + let(:shared_project) { create(:project) } + + before do + group.add_master(master) + group.add_developer(developer) + + members_project.team << [developer, :developer] + members_project.team << [master, :master] + + create(:project_group_link, project: shared_project, group: group) + end + + it 'returns false for no user' do + expect(personal_project.authorized_for_user?(nil)).to be(false) + end + + it 'returns true for personal projects of the user' do + expect(personal_project.authorized_for_user?(developer)).to be(true) + end + + it 'returns true for projects of groups the user is a member of' do + expect(group_project.authorized_for_user?(developer)).to be(true) + end + + it 'returns true for projects for which the user is a member of' do + expect(members_project.authorized_for_user?(developer)).to be(true) + end + + it 'returns true for projects shared on a group the user is a member of' do + expect(shared_project.authorized_for_user?(developer)).to be(true) + end + + it 'checks for the correct minimum level access' do + expect(group_project.authorized_for_user?(developer, Gitlab::Access::MASTER)).to be(false) + expect(group_project.authorized_for_user?(master, Gitlab::Access::MASTER)).to be(true) + expect(members_project.authorized_for_user?(developer, Gitlab::Access::MASTER)).to be(false) + expect(members_project.authorized_for_user?(master, Gitlab::Access::MASTER)).to be(true) + expect(shared_project.authorized_for_user?(developer, Gitlab::Access::MASTER)).to be(false) + expect(shared_project.authorized_for_user?(master, Gitlab::Access::MASTER)).to be(true) + end + end end -- cgit v1.2.1 From c2f77ee00be5ff7195beef3ba7d74e796f262003 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 20 Jul 2016 22:48:10 +0200 Subject: Use Re-deploy button on Deployments page --- CHANGELOG | 1 + app/views/projects/deployments/_actions.haml | 2 +- spec/features/environments_spec.rb | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index dfee9cc20bb..4874d17ea86 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -253,6 +253,7 @@ v 8.9.1 - Remove width restriction for logo on sign-in page. !4888 - Bump gitlab_git to 10.2.3 to fix false truncated warnings with ISO-8559 files. !4884 - Apply selected value as label. !4886 + - Change Retry to Re-deploy on Deployments page - Fix temp file being deleted after the request while importing a GitLab project. !4894 - Fix pagination when sorting by columns with lots of ties (like priority) - Implement Subresource Integrity for CSS and JavaScript assets. This prevents malicious assets from loading in the case of a CDN compromise. diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index 65d68aa2985..f70dba224fa 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -17,6 +17,6 @@ - if local_assigns.fetch(:allow_rollback, false) = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-build' do - if deployment.last? - Retry + Re-deploy - else Rollback diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb index 9c018be14b7..a7d9f2a0c72 100644 --- a/spec/features/environments_spec.rb +++ b/spec/features/environments_spec.rb @@ -92,8 +92,8 @@ feature 'Environments', feature: true do expect(page).to have_link(deployment.short_sha) end - scenario 'does not show a retry button for deployment without build' do - expect(page).not_to have_link('Retry') + scenario 'does not show a re-deploy button for deployment without build' do + expect(page).not_to have_link('Re-deploy') end context 'with build' do @@ -105,8 +105,8 @@ feature 'Environments', feature: true do expect(page).to have_link("#{build.name} (##{build.id})") end - scenario 'does show retry button' do - expect(page).to have_link('Retry') + scenario 'does show re-deploy button' do + expect(page).to have_link('Re-deploy') end context 'with manual action' do -- cgit v1.2.1 From 79214be727aaa0704a1be5b50aa6dd3011629bc2 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 20 Jul 2016 16:18:18 -0600 Subject: Add Discussion model to represent MR/diff discussion --- app/assets/javascripts/notes.js.coffee | 6 +- app/controllers/projects/commit_controller.rb | 4 +- app/controllers/projects/compare_controller.rb | 2 +- .../projects/merge_requests_controller.rb | 8 +- app/controllers/projects/notes_controller.rb | 65 +- app/helpers/diff_helper.rb | 16 +- app/helpers/notes_helper.rb | 37 +- app/models/concerns/note_on_diff.rb | 25 - app/models/discussion.rb | 91 +++ app/models/note.rb | 7 +- app/views/discussions/_diff_discussion.html.haml | 6 + app/views/discussions/_diff_with_notes.html.haml | 14 + app/views/discussions/_discussion.html.haml | 45 ++ app/views/discussions/_notes.html.haml | 5 + .../_parallel_diff_discussion.html.haml | 22 + .../projects/diffs/_match_line_parallel.html.haml | 4 - app/views/projects/diffs/_parallel_view.html.haml | 51 +- app/views/projects/diffs/_text_file.html.haml | 6 +- .../notes/_diff_notes_with_reply.html.haml | 7 - .../_diff_notes_with_reply_parallel.html.haml | 25 - app/views/projects/notes/_discussion.html.haml | 46 -- app/views/projects/notes/_notes.html.haml | 12 +- .../notes/discussions/_diff_with_notes.html.haml | 17 - .../projects/notes/discussions/_notes.html.haml | 6 - lib/gitlab/diff/parallel_diff.rb | 63 +- spec/fixtures/parallel_diff_result.yml | 800 --------------------- spec/lib/gitlab/diff/parallel_diff_spec.rb | 46 +- 27 files changed, 340 insertions(+), 1096 deletions(-) create mode 100644 app/models/discussion.rb create mode 100644 app/views/discussions/_diff_discussion.html.haml create mode 100644 app/views/discussions/_diff_with_notes.html.haml create mode 100644 app/views/discussions/_discussion.html.haml create mode 100644 app/views/discussions/_notes.html.haml create mode 100644 app/views/discussions/_parallel_diff_discussion.html.haml delete mode 100644 app/views/projects/diffs/_match_line_parallel.html.haml delete mode 100644 app/views/projects/notes/_diff_notes_with_reply.html.haml delete mode 100644 app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml delete mode 100644 app/views/projects/notes/_discussion.html.haml delete mode 100644 app/views/projects/notes/discussions/_diff_with_notes.html.haml delete mode 100644 app/views/projects/notes/discussions/_notes.html.haml delete mode 100644 spec/fixtures/parallel_diff_result.yml diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index 0ea54faae1a..d4de712f88c 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -162,7 +162,7 @@ class @Notes @last_fetched_at = data.last_fetched_at @setPollingInterval(data.notes.length) $.each notes, (i, note) => - if note.discussion_with_diff_html? + if note.discussion_html? @renderDiscussionNote(note) else @renderNote(note) @@ -251,7 +251,7 @@ class @Notes discussionContainer = $(".notes[data-discussion-id='" + note.original_discussion_id + "']") if discussionContainer.length is 0 # insert the note and the reply button after the temp row - row.after note.discussion_html + row.after note.diff_discussion_html # remove the note (will be added again below) row.next().find(".note").remove() @@ -265,7 +265,7 @@ class @Notes # Init discussion on 'Discussion' page if it is merge request page if $('body').attr('data-page').indexOf('projects:merge_request') is 0 $('ul.main-notes-list') - .append(note.discussion_with_diff_html) + .append(note.discussion_html) .syntaxHighlight() else # append new note to all matching discussions diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 727e84b40a1..7ae034f9398 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -115,11 +115,11 @@ class Projects::CommitController < Projects::ApplicationController end def define_note_vars - @grouped_diff_notes = commit.notes.grouped_diff_notes + @grouped_diff_discussions = commit.notes.grouped_diff_discussions @notes = commit.notes.non_diff_notes.fresh Banzai::NoteRenderer.render( - @grouped_diff_notes.values.flatten + @notes, + @grouped_diff_discussions.values.flat_map(&:notes) + @notes, @project, current_user, ) diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index 10749d0fef8..8c004724f02 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -54,7 +54,7 @@ class Projects::CompareController < Projects::ApplicationController ) @diff_notes_disabled = true - @grouped_diff_notes = {} + @grouped_diff_discussions = {} end end diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 7beeb7d97d0..594a61464b9 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -97,7 +97,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController else build_merge_request @diff_notes_disabled = true - @grouped_diff_notes = {} + @grouped_diff_discussions = {} end define_commit_vars @@ -378,7 +378,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController # This is not executed lazily @notes = Banzai::NoteRenderer.render( - @discussions.flatten, + @discussions.flat_map(&:notes), @project, current_user, @path, @@ -404,10 +404,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController } @use_legacy_diff_notes = !@merge_request.support_new_diff_notes? - @grouped_diff_notes = @merge_request.notes.grouped_diff_notes + @grouped_diff_discussions = @merge_request.notes.grouped_diff_discussions Banzai::NoteRenderer.render( - @grouped_diff_notes.values.flatten, + @grouped_diff_discussions.values.flat_map(&:notes), @project, current_user, @path, diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb index 3eacdbbd067..766b7e9cf22 100644 --- a/app/controllers/projects/notes_controller.rb +++ b/app/controllers/projects/notes_controller.rb @@ -73,7 +73,7 @@ class Projects::NotesController < Projects::ApplicationController end alias_method :awardable, :note - def note_to_html(note) + def note_html(note) render_to_string( "projects/notes/_note", layout: false, @@ -82,20 +82,20 @@ class Projects::NotesController < Projects::ApplicationController ) end - def note_to_discussion_html(note) - return unless note.diff_note? + def diff_discussion_html(discussion) + return unless discussion.diff_discussion? if params[:view] == 'parallel' - template = "projects/notes/_diff_notes_with_reply_parallel" + template = "discussions/_parallel_diff_discussion" locals = if params[:line_type] == 'old' - { notes_left: [note], notes_right: [] } + { discussion_left: discussion, discussion_right: nil } else - { notes_left: [], notes_right: [note] } + { discussion_left: nil, discussion_right: discussion } end else - template = "projects/notes/_diff_notes_with_reply" - locals = { notes: [note] } + template = "discussions/_diff_discussion" + locals = { discussion: discussion } end render_to_string( @@ -106,14 +106,14 @@ class Projects::NotesController < Projects::ApplicationController ) end - def note_to_discussion_with_diff_html(note) - return unless note.diff_note? + def discussion_html(discussion) + return unless discussion.diff_discussion? render_to_string( - "projects/notes/_discussion", + "discussions/_discussion", layout: false, formats: [:html], - locals: { discussion_notes: [note] } + locals: { discussion: discussion } ) end @@ -132,26 +132,33 @@ class Projects::NotesController < Projects::ApplicationController valid: true, id: note.id, discussion_id: note.discussion_id, - html: note_to_html(note), + html: note_html(note), award: false, - note: note.note, - discussion_html: note_to_discussion_html(note), - discussion_with_diff_html: note_to_discussion_with_diff_html(note) + note: note.note } - # The discussion_id is used to add the comment to the correct discussion - # element on the merge request page. Among other things, the discussion_id - # contains the sha of head commit of the merge request. - # When new commits are pushed into the merge request after the initial - # load of the merge request page, the discussion elements will still have - # the old discussion_ids, with the old head commit sha. The new comment, - # however, will have the new discussion_id with the new commit sha. - # To ensure that these new comments will still end up in the correct - # discussion element, we also send the original discussion_id, with the - # old commit sha, along, and fall back on this value when no discussion - # element with the new discussion_id could be found. - if note.new_diff_note? && note.position != note.original_position - attrs[:original_discussion_id] = note.original_discussion_id + if note.diff_note? + discussion = Discussion.new([note]) + + attrs.merge!( + diff_discussion_html: diff_discussion_html(discussion), + discussion_html: discussion_html(discussion) + ) + + # The discussion_id is used to add the comment to the correct discussion + # element on the merge request page. Among other things, the discussion_id + # contains the sha of head commit of the merge request. + # When new commits are pushed into the merge request after the initial + # load of the merge request page, the discussion elements will still have + # the old discussion_ids, with the old head commit sha. The new comment, + # however, will have the new discussion_id with the new commit sha. + # To ensure that these new comments will still end up in the correct + # discussion element, we also send the original discussion_id, with the + # old commit sha, along, and fall back on this value when no discussion + # element with the new discussion_id could be found. + if note.new_diff_note? && note.position != note.original_position + attrs[:original_discussion_id] = note.original_discussion_id + end end attrs diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index 75b029365f9..4c031942793 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -54,18 +54,20 @@ module DiffHelper end end - def organize_comments(left, right) - notes_left = notes_right = nil + def parallel_diff_discussions(left, right, diff_file) + discussion_left = discussion_right = nil - unless left[:type].nil? && right[:type] == 'new' - notes_left = @grouped_diff_notes[left[:line_code]] + if left && (left.unchanged? || left.removed?) + line_code = diff_file.line_code(left) + discussion_left = @grouped_diff_discussions[line_code] end - unless left[:type].nil? && right[:type].nil? - notes_right = @grouped_diff_notes[right[:line_code]] + if right && right.added? + line_code = diff_file.line_code(right) + discussion_right = @grouped_diff_discussions[line_code] end - [notes_left, notes_right] + [discussion_left, discussion_right] end def inline_diff_btn diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 98143dcee9b..0f60dd828ab 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -1,9 +1,4 @@ module NotesHelper - # Helps to distinguish e.g. commit notes in mr notes list - def note_for_main_target?(note) - @noteable.class.name == note.noteable_type && !note.diff_note? - end - def note_target_fields(note) if note.noteable hidden_field_tag(:target_type, note.noteable.class.name.underscore) + @@ -44,8 +39,8 @@ module NotesHelper # If we didn't, diff notes that would show for the same line on the changes # tab, would show in different discussions on the discussion tab. use_legacy_diff_note ||= begin - line_diff_notes = @grouped_diff_notes[line_code] - line_diff_notes && line_diff_notes.any?(&:legacy_diff_note?) + discussion = @grouped_diff_discussions[line_code] + discussion && discussion.legacy_diff_discussion? end data = { @@ -81,22 +76,10 @@ module NotesHelper data end - def link_to_reply_discussion(note, line_type = nil) + def link_to_reply_discussion(discussion, line_type = nil) return unless current_user - data = { - noteable_type: note.noteable_type, - noteable_id: note.noteable_id, - commit_id: note.commit_id, - discussion_id: note.discussion_id, - line_type: line_type - } - - if note.diff_note? - data[:note_type] = note.type - - data.merge!(note.diff_attributes) - end + data = discussion.reply_attributes.merge(line_type: line_type) content_tag(:div, class: "discussion-reply-holder") do button_tag 'Reply...', class: 'btn btn-text-field js-discussion-reply-button', @@ -114,13 +97,13 @@ module NotesHelper @max_access_by_user_id[full_key] end - def diff_note_path(note) - return unless note.diff_note? + def discussion_diff_path(discussion) + return unless discussion.diff_discussion? - if note.for_merge_request? && note.active? - diffs_namespace_project_merge_request_path(note.project.namespace, note.project, note.noteable, anchor: note.line_code) - elsif note.for_commit? - namespace_project_commit_path(note.project.namespace, note.project, note.noteable, anchor: note.line_code) + if discussion.for_merge_request? && discussion.active? + diffs_namespace_project_merge_request_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code) + elsif discussion.for_commit? + namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code) end end end diff --git a/app/models/concerns/note_on_diff.rb b/app/models/concerns/note_on_diff.rb index 2785fbb21c9..4be6a2f621b 100644 --- a/app/models/concerns/note_on_diff.rb +++ b/app/models/concerns/note_on_diff.rb @@ -1,12 +1,6 @@ module NoteOnDiff extend ActiveSupport::Concern - NUMBER_OF_TRUNCATED_DIFF_LINES = 16 - - included do - delegate :blob, :highlighted_diff_lines, to: :diff_file, allow_nil: true - end - def diff_note? true end @@ -30,23 +24,4 @@ module NoteOnDiff def can_be_award_emoji? false end - - # Returns an array of at most 16 highlighted lines above a diff note - def truncated_diff_lines - prev_lines = [] - - highlighted_diff_lines.each do |line| - if line.meta? - prev_lines.clear - else - prev_lines << line - - break if for_line?(line) - - prev_lines.shift if prev_lines.length >= NUMBER_OF_TRUNCATED_DIFF_LINES - end - end - - prev_lines - end end diff --git a/app/models/discussion.rb b/app/models/discussion.rb new file mode 100644 index 00000000000..74facfd1c9c --- /dev/null +++ b/app/models/discussion.rb @@ -0,0 +1,91 @@ +class Discussion + NUMBER_OF_TRUNCATED_DIFF_LINES = 16 + + attr_reader :first_note, :notes + + delegate :created_at, + :project, + :author, + + :noteable, + :for_commit?, + :for_merge_request?, + + :line_code, + :diff_file, + :for_line?, + :active?, + + to: :first_note + + delegate :blob, :highlighted_diff_lines, to: :diff_file, allow_nil: true + + def self.for_notes(notes) + notes.group_by(&:discussion_id).values.map { |notes| new(notes) } + end + + def self.for_diff_notes(notes) + notes.group_by(&:line_code).values.map { |notes| new(notes) } + end + + def initialize(notes) + @first_note = notes.first + @notes = notes + end + + def id + first_note.discussion_id + end + + def diff_discussion? + first_note.diff_note? + end + + def legacy_diff_discussion? + notes.any?(&:legacy_diff_note?) + end + + def for_target?(target) + self.noteable == target && !diff_discussion? + end + + def expanded? + !diff_discussion? || active? + end + + def reply_attributes + data = { + noteable_type: first_note.noteable_type, + noteable_id: first_note.noteable_id, + commit_id: first_note.commit_id, + discussion_id: self.id, + } + + if diff_discussion? + data[:note_type] = first_note.type + + data.merge!(first_note.diff_attributes) + end + + data + end + + # Returns an array of at most 16 highlighted lines above a diff note + def truncated_diff_lines + prev_lines = [] + + highlighted_diff_lines.each do |line| + if line.meta? + prev_lines.clear + else + prev_lines << line + + break if for_line?(line) + + prev_lines.shift if prev_lines.length >= NUMBER_OF_TRUNCATED_DIFF_LINES + end + end + + prev_lines + end +end diff --git a/app/models/note.rb b/app/models/note.rb index 0ce10c77de9..9b0a7211b4e 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -82,11 +82,12 @@ class Note < ActiveRecord::Base end def discussions - all.group_by(&:discussion_id).values + Discussion.for_notes(all) end - def grouped_diff_notes - diff_notes.select(&:active?).sort_by(&:created_at).group_by(&:line_code) + def grouped_diff_discussions + notes = diff_notes.fresh.select(&:active?) + Discussion.for_diff_notes(notes).map { |d| [d.line_code, d] }.to_h end # Searches for notes matching the given query. diff --git a/app/views/discussions/_diff_discussion.html.haml b/app/views/discussions/_diff_discussion.html.haml new file mode 100644 index 00000000000..fa1ad9efa73 --- /dev/null +++ b/app/views/discussions/_diff_discussion.html.haml @@ -0,0 +1,6 @@ +%tr.notes_holder + %td.notes_line{ colspan: 2 } + %td.notes_content + %ul.notes{ data: { discussion_id: discussion.id } } + = render partial: "projects/notes/note", collection: discussion.notes, as: :note + = link_to_reply_discussion(discussion) diff --git a/app/views/discussions/_diff_with_notes.html.haml b/app/views/discussions/_diff_with_notes.html.haml new file mode 100644 index 00000000000..02b159ffd45 --- /dev/null +++ b/app/views/discussions/_diff_with_notes.html.haml @@ -0,0 +1,14 @@ +- diff_file = discussion.diff_file +- blob = discussion.blob + +.diff-file.file-holder + .file-title + = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_file.content_commit, project: discussion.project, url: discussion_diff_path(discussion) + + .diff-content.code.js-syntax-highlight + %table + - discussion.truncated_diff_lines.each do |line| + = render "projects/diffs/line", line: line, diff_file: diff_file, plain: true + + - if discussion.for_line?(line) + = render "discussions/diff_discussion", discussion: discussion diff --git a/app/views/discussions/_discussion.html.haml b/app/views/discussions/_discussion.html.haml new file mode 100644 index 00000000000..49702e048aa --- /dev/null +++ b/app/views/discussions/_discussion.html.haml @@ -0,0 +1,45 @@ +- expanded = discussion.expanded? +%li.note.note-discussion.timeline-entry + .timeline-entry-inner + .timeline-icon + = link_to user_path(discussion.author) do + = image_tag avatar_icon(discussion.author), class: "avatar s40" + .timeline-content + .discussion.js-toggle-container{ class: discussion.id } + .discussion-header + = link_to_member(@project, discussion.author, avatar: false) + + .inline.discussion-headline-light + = discussion.author.to_reference + started a discussion on + + - if discussion.for_commit? + - commit = discussion.noteable + - if commit + commit + = link_to commit.short_id, namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code), class: 'monospace' + - else + a deleted commit + - else + - if discussion.active? + = link_to diffs_namespace_project_merge_request_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code) do + the diff + - else + an outdated diff + + = time_ago_with_tooltip(discussion.created_at, placement: "bottom", html_class: "note-created-ago") + + .discussion-actions + = link_to "#", class: "note-action-button discussion-toggle-button js-toggle-button" do + - if expanded + = icon("chevron-up") + - else + = icon("chevron-down") + + Toggle discussion + + .discussion-body.js-toggle-content{ class: ("hide" unless expanded) } + - if discussion.diff_discussion? && discussion.diff_file + = render "discussions/diff_with_notes", discussion: discussion + - else + = render "discussions/notes", discussion: discussion diff --git a/app/views/discussions/_notes.html.haml b/app/views/discussions/_notes.html.haml new file mode 100644 index 00000000000..a2642b839f6 --- /dev/null +++ b/app/views/discussions/_notes.html.haml @@ -0,0 +1,5 @@ +.panel.panel-default + .notes{ data: { discussion_id: discussion.id } } + %ul.notes.timeline + = render partial: "projects/notes/note", collection: discussion.notes, as: :note + = link_to_reply_discussion(discussion) diff --git a/app/views/discussions/_parallel_diff_discussion.html.haml b/app/views/discussions/_parallel_diff_discussion.html.haml new file mode 100644 index 00000000000..a798c438ea0 --- /dev/null +++ b/app/views/discussions/_parallel_diff_discussion.html.haml @@ -0,0 +1,22 @@ +%tr.notes_holder + - if discussion_left + %td.notes_line.old + %td.notes_content.parallel.old + %ul.notes{ data: { discussion_id: discussion_left.id } } + = render partial: "projects/notes/note", collection: discussion_left.notes, as: :note + + = link_to_reply_discussion(discussion_left, 'old') + - else + %td.notes_line.old= "" + %td.notes_content.parallel.old= "" + + - if discussion_right + %td.notes_line.new + %td.notes_content.parallel.new + %ul.notes{ data: { discussion_id: discussion_right.id } } + = render partial: "projects/notes/note", collection: discussion_right.notes, as: :note + + = link_to_reply_discussion(discussion_right, 'new') + - else + %td.notes_line.new= "" + %td.notes_content.parallel.new= "" diff --git a/app/views/projects/diffs/_match_line_parallel.html.haml b/app/views/projects/diffs/_match_line_parallel.html.haml deleted file mode 100644 index b9c0d9dcdfd..00000000000 --- a/app/views/projects/diffs/_match_line_parallel.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -%td.old_line.diff-line-num.empty-cell -%td.line_content.parallel.match= line -%td.new_line.diff-line-num.empty-cell -%td.line_content.parallel.match= line diff --git a/app/views/projects/diffs/_parallel_view.html.haml b/app/views/projects/diffs/_parallel_view.html.haml index d208fcee10b..7f30faa20d8 100644 --- a/app/views/projects/diffs/_parallel_view.html.haml +++ b/app/views/projects/diffs/_parallel_view.html.haml @@ -5,32 +5,35 @@ - left = line[:left] - right = line[:right] %tr.line_holder.parallel - - if left[:type] == 'match' - = render "projects/diffs/match_line_parallel", { line: left[:text] } - - elsif left[:type] == 'nonewline' - %td.old_line.diff-line-num.empty-cell - %td.line_content.parallel.match= left[:text] - %td.new_line.diff-line-num.empty-cell - %td.line_content.parallel.match= left[:text] + - if left + - if left.meta? + %td.old_line.diff-line-num.empty-cell + %td.line_content.parallel.match= left.text + - else + - left_line_code = diff_file.line_code(left) + - left_position = diff_file.position(left) + %td.old_line.diff-line-num{id: left_line_code, class: left.type, data: { linenumber: left.old_pos }} + %a{href: "##{left_line_code}" }= raw(left.old_pos) + %td.line_content.parallel.noteable_line{class: left.type, data: diff_view_line_data(left_line_code, left_position, 'old')}= diff_line_content(left.text) - else - %td.old_line.diff-line-num{id: left[:line_code], class: [left[:type], ('empty-cell' unless left[:number])], data: { linenumber: left[:number] }} - %a{href: "##{left[:line_code]}" }= raw(left[:number]) - %td.line_content.parallel.noteable_line{class: [left[:type], ('empty-cell' if left[:text].empty?)], data: diff_view_line_data(left[:line_code], left[:position], 'old')}= diff_line_content(left[:text]) + %td.old_line.diff-line-num.empty-cell + %td.line_content.parallel - - if right[:type] == 'new' - - new_line_type = 'new' - - new_line_code = right[:line_code] - - new_position = right[:position] + - if right + - if right.meta? + %td.old_line.diff-line-num.empty-cell + %td.line_content.parallel.match= left.text - else - - new_line_type = nil - - new_line_code = left[:line_code] - - new_position = left[:position] - - %td.new_line.diff-line-num{id: new_line_code, class: [new_line_type, ('empty-cell' unless right[:number])], data: { linenumber: right[:number] }} - %a{href: "##{new_line_code}" }= raw(right[:number]) - %td.line_content.parallel.noteable_line{class: [new_line_type, ('empty-cell' if right[:text].empty?)], data: diff_view_line_data(new_line_code, new_position, 'new')}= diff_line_content(right[:text]) + - right_line_code = diff_file.line_code(right) + - right_position = diff_file.position(right) + %td.new_line.diff-line-num{id: right_line_code, class: right.type, data: { linenumber: right.new_pos }} + %a{href: "##{right_line_code}" }= raw(right.new_pos) + %td.line_content.parallel.noteable_line{class: right.type, data: diff_view_line_data(right_line_code, right_position, 'new')}= diff_line_content(right.text) + - else + %td.old_line.diff-line-num.empty-cell + %td.line_content.parallel - unless @diff_notes_disabled - - notes_left, notes_right = organize_comments(left, right) - - if notes_left.present? || notes_right.present? - = render "projects/notes/diff_notes_with_reply_parallel", notes_left: notes_left, notes_right: notes_right + - discussion_left, discussion_right = parallel_diff_discussions(left, right, diff_file) + - if discussion_left || discussion_right + = render "discussions/parallel_diff_discussion", discussion_left: discussion_left, discussion_right: discussion_right diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index 196f8122db3..5970b9abf2b 100644 --- a/app/views/projects/diffs/_text_file.html.haml +++ b/app/views/projects/diffs/_text_file.html.haml @@ -11,9 +11,9 @@ - unless @diff_notes_disabled - line_code = diff_file.line_code(line) - - diff_notes = @grouped_diff_notes[line_code] if line_code - - if diff_notes - = render "projects/notes/diff_notes_with_reply", notes: diff_notes + - discussion = @grouped_diff_discussions[line_code] if line_code + - if discussion + = render "discussions/diff_discussion", discussion: discussion - if last_line > 0 = render "projects/diffs/match_line", { line: "", diff --git a/app/views/projects/notes/_diff_notes_with_reply.html.haml b/app/views/projects/notes/_diff_notes_with_reply.html.haml deleted file mode 100644 index ec6c4938efc..00000000000 --- a/app/views/projects/notes/_diff_notes_with_reply.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -- note = notes.first -%tr.notes_holder - %td.notes_line{ colspan: 2 } - %td.notes_content - %ul.notes{ data: { discussion_id: note.discussion_id } } - = render partial: "projects/notes/note", collection: notes, as: :note - = link_to_reply_discussion(note) diff --git a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml deleted file mode 100644 index e50a4f86d03..00000000000 --- a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml +++ /dev/null @@ -1,25 +0,0 @@ -- note_left = notes_left.present? ? notes_left.first : nil -- note_right = notes_right.present? ? notes_right.first : nil - -%tr.notes_holder - - if note_left - %td.notes_line.old - %td.notes_content.parallel.old - %ul.notes{ data: { discussion_id: note_left.discussion_id } } - = render partial: "projects/notes/note", collection: notes_left, as: :note - - = link_to_reply_discussion(note_left, 'old') - - else - %td.notes_line.old= "" - %td.notes_content.parallel.old= "" - - - if note_right - %td.notes_line.new - %td.notes_content.parallel.new - %ul.notes{ data: { discussion_id: note_right.discussion_id } } - = render partial: "projects/notes/note", collection: notes_right, as: :note - - = link_to_reply_discussion(note_right, 'new') - - else - %td.notes_line.new= "" - %td.notes_content.parallel.new= "" diff --git a/app/views/projects/notes/_discussion.html.haml b/app/views/projects/notes/_discussion.html.haml deleted file mode 100644 index 7869d6413d8..00000000000 --- a/app/views/projects/notes/_discussion.html.haml +++ /dev/null @@ -1,46 +0,0 @@ -- note = discussion_notes.first -- expanded = !note.diff_note? || note.active? -%li.note.note-discussion.timeline-entry - .timeline-entry-inner - .timeline-icon - = link_to user_path(note.author) do - = image_tag avatar_icon(note.author), class: "avatar s40" - .timeline-content - .discussion.js-toggle-container{ class: note.discussion_id } - .discussion-header - = link_to_member(@project, note.author, avatar: false) - - .inline.discussion-headline-light - = note.author.to_reference - started a discussion on - - - if note.for_commit? - - commit = note.noteable - - if commit - commit - = link_to commit.short_id, namespace_project_commit_path(note.project.namespace, note.project, note.noteable, anchor: note.line_code), class: 'monospace' - - else - a deleted commit - - else - - if note.active? - = link_to diffs_namespace_project_merge_request_path(note.project.namespace, note.project, note.noteable, anchor: note.line_code) do - the diff - - else - an outdated diff - - = time_ago_with_tooltip(note.created_at, placement: "bottom", html_class: "note-created-ago") - - .discussion-actions - = link_to "#", class: "note-action-button discussion-toggle-button js-toggle-button" do - - if expanded - = icon("chevron-up") - - else - = icon("chevron-down") - - Toggle discussion - - .discussion-body.js-toggle-content{ class: ("hide" unless expanded) } - - if note.diff_note? - = render "projects/notes/discussions/diff_with_notes", discussion_notes: discussion_notes - - else - = render "projects/notes/discussions/notes", discussion_notes: discussion_notes diff --git a/app/views/projects/notes/_notes.html.haml b/app/views/projects/notes/_notes.html.haml index ebf7e8a9cb3..022578bd6db 100644 --- a/app/views/projects/notes/_notes.html.haml +++ b/app/views/projects/notes/_notes.html.haml @@ -1,10 +1,8 @@ - if @discussions.present? - - @discussions.each do |discussion_notes| - - note = discussion_notes.first - - if note_for_main_target?(note) - = render partial: "projects/notes/note", object: note, as: :note + - @discussions.each do |discussion| + - if discussion.for_target?(@noteable) + = render partial: "projects/notes/note", object: discussion.first_note, as: :note - else - = render 'projects/notes/discussion', discussion_notes: discussion_notes + = render 'discussions/discussion', discussion: discussion - else - - @notes.each do |note| - = render partial: "projects/notes/note", object: note, as: :note + = render partial: "projects/notes/note", collection: @notes, as: :note diff --git a/app/views/projects/notes/discussions/_diff_with_notes.html.haml b/app/views/projects/notes/discussions/_diff_with_notes.html.haml deleted file mode 100644 index 4a69b8f8840..00000000000 --- a/app/views/projects/notes/discussions/_diff_with_notes.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -- note = discussion_notes.first -- diff_file = note.diff_file -- return unless diff_file - -- blob = note.blob - -.diff-file.file-holder - .file-title - = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_file.content_commit, project: note.project, url: diff_note_path(note) - - .diff-content.code.js-syntax-highlight - %table - - note.truncated_diff_lines.each do |line| - = render "projects/diffs/line", line: line, diff_file: diff_file, plain: true - - - if note.for_line?(line) - = render "projects/notes/diff_notes_with_reply", notes: discussion_notes diff --git a/app/views/projects/notes/discussions/_notes.html.haml b/app/views/projects/notes/discussions/_notes.html.haml deleted file mode 100644 index a785149549d..00000000000 --- a/app/views/projects/notes/discussions/_notes.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -- note = discussion_notes.first -.panel.panel-default - .notes{ data: { discussion_id: note.discussion_id } } - %ul.notes.timeline - = render partial: "projects/notes/note", collection: discussion_notes, as: :note - = link_to_reply_discussion(note) diff --git a/lib/gitlab/diff/parallel_diff.rb b/lib/gitlab/diff/parallel_diff.rb index b069afdd28c..481536a380b 100644 --- a/lib/gitlab/diff/parallel_diff.rb +++ b/lib/gitlab/diff/parallel_diff.rb @@ -8,72 +8,35 @@ module Gitlab end def parallelize - i = 0 free_right_index = nil lines = [] highlighted_diff_lines = diff_file.highlighted_diff_lines highlighted_diff_lines.each do |line| - line_code = diff_file.line_code(line) - position = diff_file.position(line) - - case line.type - when 'match', nil + if line.meta? || line.unchanged? # line in the right panel is the same as in the left one lines << { - left: { - type: line.type, - number: line.old_pos, - text: line.text, - line_code: line_code, - position: position - }, - right: { - type: line.type, - number: line.new_pos, - text: line.text, - line_code: line_code, - position: position - } + left: line, + right: line } free_right_index = nil i += 1 - when 'old' + elsif line.removed? lines << { - left: { - type: line.type, - number: line.old_pos, - text: line.text, - line_code: line_code, - position: position - }, - right: { - type: nil, - number: nil, - text: "", - line_code: line_code, - position: position - } + left: line, + right: nil } # Once we come upon a new line it can be put on the right of this old line free_right_index ||= i i += 1 - when 'new' - data = { - type: line.type, - number: line.new_pos, - text: line.text, - line_code: line_code, - position: position - } - + elsif line.added? if free_right_index # If an old line came before this without a line on the right, this # line can be put to the right of it. - lines[free_right_index][:right] = data + lines[free_right_index][:right] = line # If there are any other old lines on the left that don't yet have # a new counterpart on the right, update the free_right_index @@ -81,14 +44,8 @@ module Gitlab free_right_index = next_free_right_index < i ? next_free_right_index : nil else lines << { - left: { - type: nil, - number: nil, - text: "", - line_code: line_code, - position: position - }, - right: data + left: nil, + right: line } free_right_index = nil diff --git a/spec/fixtures/parallel_diff_result.yml b/spec/fixtures/parallel_diff_result.yml deleted file mode 100644 index 37066c8e930..00000000000 --- a/spec/fixtures/parallel_diff_result.yml +++ /dev/null @@ -1,800 +0,0 @@ ---- -- :left: - :type: match - :number: 6 - :text: "@@ -6,12 +6,18 @@ module Popen" - :line_code: - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: match - :number: 6 - :text: "@@ -6,12 +6,18 @@ module Popen" - :line_code: - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 6 - :text: |2 - - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_6_6 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 6 - :new_line: 6 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 6 - :text: |2 - - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_6_6 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 6 - :new_line: 6 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 7 - :text: |2 - def popen(cmd, path=nil) - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_7_7 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 7 - :new_line: 7 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 7 - :text: |2 - def popen(cmd, path=nil) - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_7_7 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 7 - :new_line: 7 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 8 - :text: |2 - unless cmd.is_a?(Array) - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_8_8 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 8 - :new_line: 8 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 8 - :text: |2 - unless cmd.is_a?(Array) - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_8_8 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 8 - :new_line: 8 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: old - :number: 9 - :text: | - - raise "System commands must be given as an array of strings" - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_9_9 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 9 - :new_line: - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 9 - :text: | - + raise RuntimeError, "System commands must be given as an array of strings" - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_10_9 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 9 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 10 - :text: |2 - end - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_10_10 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 10 - :new_line: 10 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 10 - :text: |2 - end - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_10_10 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 10 - :new_line: 10 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 11 - :text: |2 - - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_11_11 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 11 - :new_line: 11 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 11 - :text: |2 - - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_11_11 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 11 - :new_line: 11 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 12 - :text: |2 - path ||= Dir.pwd - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_12_12 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 12 - :new_line: 12 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 12 - :text: |2 - path ||= Dir.pwd - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_12_12 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 12 - :new_line: 12 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: old - :number: 13 - :text: | - - vars = { "PWD" => path } - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_13_13 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 13 - :new_line: - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 13 - :text: | - + - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_13 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 13 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: old - :number: 14 - :text: | - - options = { chdir: path } - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_14_13 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 14 - :new_line: - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 14 - :text: | - + vars = { - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_14 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 14 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: - :text: '' - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_15 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 15 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 15 - :text: | - + "PWD" => path - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_15 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 15 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: - :text: '' - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_16 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 16 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 16 - :text: | - + } - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_16 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 16 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: - :text: '' - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_17 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 17 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 17 - :text: | - + - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_17 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 17 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: - :text: '' - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_18 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 18 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 18 - :text: | - + options = { - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_18 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 18 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: - :text: '' - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_19 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 19 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 19 - :text: | - + chdir: path - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_19 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 19 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: - :text: '' - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_20 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 20 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 20 - :text: | - + } - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_20 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 20 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 15 - :text: |2 - - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_21 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 15 - :new_line: 21 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 21 - :text: |2 - - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_15_21 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 15 - :new_line: 21 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 16 - :text: |2 - unless File.directory?(path) - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_16_22 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 16 - :new_line: 22 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 22 - :text: |2 - unless File.directory?(path) - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_16_22 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 16 - :new_line: 22 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 17 - :text: |2 - FileUtils.mkdir_p(path) - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_17_23 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 17 - :new_line: 23 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 23 - :text: |2 - FileUtils.mkdir_p(path) - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_17_23 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 17 - :new_line: 23 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: match - :number: 19 - :text: "@@ -19,6 +25,7 @@ module Popen" - :line_code: - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: match - :number: 25 - :text: "@@ -19,6 +25,7 @@ module Popen" - :line_code: - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 19 - :text: |2 - - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_19_25 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 19 - :new_line: 25 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 25 - :text: |2 - - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_19_25 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 19 - :new_line: 25 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 20 - :text: |2 - @cmd_output = "" - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_20_26 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 20 - :new_line: 26 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 26 - :text: |2 - @cmd_output = "" - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_20_26 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 20 - :new_line: 26 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 21 - :text: |2 - @cmd_status = 0 - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_21_27 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 21 - :new_line: 27 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 27 - :text: |2 - @cmd_status = 0 - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_21_27 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 21 - :new_line: 27 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: - :text: '' - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_22_28 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 28 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: new - :number: 28 - :text: | - + - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_22_28 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: - :new_line: 28 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 22 - :text: |2 - Open3.popen3(vars, *cmd, options) do |stdin, stdout, stderr, wait_thr| - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_22_29 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 22 - :new_line: 29 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 29 - :text: |2 - Open3.popen3(vars, *cmd, options) do |stdin, stdout, stderr, wait_thr| - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_22_29 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 22 - :new_line: 29 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 23 - :text: |2 - @cmd_output << stdout.read - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_23_30 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 23 - :new_line: 30 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 30 - :text: |2 - @cmd_output << stdout.read - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_23_30 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 23 - :new_line: 30 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d -- :left: - :type: - :number: 24 - :text: |2 - @cmd_output << stderr.read - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_24_31 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 24 - :new_line: 31 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d - :right: - :type: - :number: 31 - :text: |2 - @cmd_output << stderr.read - :line_code: 2f6fcd96b88b36ce98c38da085c795a27d92a3dd_24_31 - :position: !ruby/object:Gitlab::Diff::Position - attributes: - :old_path: files/ruby/popen.rb - :new_path: files/ruby/popen.rb - :old_line: 24 - :new_line: 31 - :base_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :start_sha: 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9 - :head_sha: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d diff --git a/spec/lib/gitlab/diff/parallel_diff_spec.rb b/spec/lib/gitlab/diff/parallel_diff_spec.rb index 5f76b70c6f5..2aa5ae44f54 100644 --- a/spec/lib/gitlab/diff/parallel_diff_spec.rb +++ b/spec/lib/gitlab/diff/parallel_diff_spec.rb @@ -11,11 +11,51 @@ describe Gitlab::Diff::ParallelDiff, lib: true do let(:diff_file) { Gitlab::Diff::File.new(diff, diff_refs: commit.diff_refs, repository: repository) } subject { described_class.new(diff_file) } - let(:parallel_diff_result_array) { YAML.load_file("#{Rails.root}/spec/fixtures/parallel_diff_result.yml") } - describe '#parallelize' do it 'should return an array of arrays containing the parsed diff' do - expect(subject.parallelize).to match_array(parallel_diff_result_array) + diff_lines = diff_file.highlighted_diff_lines + expected = [ + # Unchanged lines + { left: diff_lines[0], right: diff_lines[0] }, + { left: diff_lines[1], right: diff_lines[1] }, + { left: diff_lines[2], right: diff_lines[2] }, + { left: diff_lines[3], right: diff_lines[3] }, + { left: diff_lines[4], right: diff_lines[5] }, + { left: diff_lines[6], right: diff_lines[6] }, + { left: diff_lines[7], right: diff_lines[7] }, + { left: diff_lines[8], right: diff_lines[8] }, + + # Changed lines + { left: diff_lines[9], right: diff_lines[11] }, + { left: diff_lines[10], right: diff_lines[12] }, + + # Added lines + { left: nil, right: diff_lines[13] }, + { left: nil, right: diff_lines[14] }, + { left: nil, right: diff_lines[15] }, + { left: nil, right: diff_lines[16] }, + { left: nil, right: diff_lines[17] }, + { left: nil, right: diff_lines[18] }, + + # Unchanged lines + { left: diff_lines[19], right: diff_lines[19] }, + { left: diff_lines[20], right: diff_lines[20] }, + { left: diff_lines[21], right: diff_lines[21] }, + { left: diff_lines[22], right: diff_lines[22] }, + { left: diff_lines[23], right: diff_lines[23] }, + { left: diff_lines[24], right: diff_lines[24] }, + { left: diff_lines[25], right: diff_lines[25] }, + + # Added line + { left: nil, right: diff_lines[26] }, + + # Unchanged lines + { left: diff_lines[27], right: diff_lines[27] }, + { left: diff_lines[28], right: diff_lines[28] }, + { left: diff_lines[29], right: diff_lines[29] } + ] + + expect(subject.parallelize).to eq(expected) end end end -- cgit v1.2.1 From 9379d0b1a46fde1b6dd18dd47eee80c08b84df55 Mon Sep 17 00:00:00 2001 From: Mark Pundsack Date: Wed, 20 Jul 2016 16:57:04 -0700 Subject: Clarify artifacts:name default value --- doc/ci/yaml/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 31b4fd2669e..01b7748e90e 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -538,7 +538,7 @@ The above script will: Introduced in GitLab 8.10. Manual actions are special type of jobs that are not executed automatically in pipeline. -They need to be explicitly started by the user. +They need to be explicitly started by the user. Manual actions can be started from pipelines, builds, environments and deployments views. You can execute the same manual action multiple times. @@ -645,9 +645,10 @@ be available for download in the GitLab UI. Introduced in GitLab 8.6 and GitLab Runner v1.1.0. The `name` directive allows you to define the name of the created artifacts -archive. That way, you can have a unique name of every archive which could be +archive. That way, you can have a unique name for every archive which could be useful when you'd like to download the archive from GitLab. The `artifacts:name` variable can make use of any of the [predefined variables](../variables/README.md). +The default name is `artifacts`, which becomes `artifacts.zip` when downloaded. --- -- cgit v1.2.1 From 51216af5c5e07e26d7b00d01250e560653a07a55 Mon Sep 17 00:00:00 2001 From: winniehell Date: Sat, 9 Jul 2016 02:16:43 +0200 Subject: Add image border in Markdown preview (!5162) --- CHANGELOG | 1 + .../stylesheets/framework/markdown_area.scss | 27 ++++++++++++++++++---- app/assets/stylesheets/pages/notes.scss | 23 ------------------ app/views/projects/notes/_note.html.haml | 2 +- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e1145f36ce3..e8099206377 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -28,6 +28,7 @@ v 8.10.0 (unreleased) - Display last commit of deleted branch in push events !4699 (winniehell) - Escape file extension when parsing search results !5141 (winniehell) - Add "passing with warnings" to the merge request pipeline possible statuses, this happens when builds that allow failures have failed. !5004 + - Add image border in Markdown preview !5162 (winniehell) - Apply the trusted_proxies config to the rack request object for use with rack_attack - Added the ability to block sign ups using a domain blacklist !5259 - Upgrade to Rails 4.2.7. !5236 diff --git a/app/assets/stylesheets/framework/markdown_area.scss b/app/assets/stylesheets/framework/markdown_area.scss index 5d3273ea64d..96565da1bc9 100644 --- a/app/assets/stylesheets/framework/markdown_area.scss +++ b/app/assets/stylesheets/framework/markdown_area.scss @@ -98,13 +98,30 @@ .md { &.md-preview-holder { - code { - white-space: pre-wrap; - word-break: keep-all; - } - + // Reset ul style types since we're nested inside a ul already @include bulleted-list; } + + // On diffs code should wrap nicely and not overflow + code { + white-space: pre-wrap; + word-break: keep-all; + } + + hr { + // Darken 'whitesmoke' a bit to make it more visible in note bodies + border-color: darken(#f5f5f5, 8%); + margin: 10px 0; + } + + // Border around images in issue and MR comments. + img:not(.emoji) { + border: 1px solid $table-border-gray; + padding: 5px; + margin: 5px 0; + // Ensure that image does not exceed viewport + max-height: calc(100vh - 100px); + } } .toolbar-group { diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index ac8c02b59dc..a2b5437e503 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -91,34 +91,11 @@ ul.notes { // Reset ul style types since we're nested inside a ul already @include bulleted-list; - // On diffs code should wrap nicely and not overflow - code { - white-space: pre-wrap; - } - ul.task-list { ul:not(.task-list) { padding-left: 1.3em; } } - - hr { - // Darken 'whitesmoke' a bit to make it more visible in note bodies - border-color: darken(#f5f5f5, 8%); - margin: 10px 0; - } - - code { - word-break: keep-all; - } - - // Border around images in issue and MR comments. - img:not(.emoji) { - border: 1px solid $table-border-gray; - padding: 5px; - margin: 5px 0; - max-height: calc(100vh - 100px); - } } } diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index af0046886fb..71da8ac9d7c 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -30,7 +30,7 @@ = link_to namespace_project_note_path(note.project.namespace, note.project, note), title: 'Remove comment', method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: 'note-action-button hidden-xs js-note-delete danger' do = icon('trash-o') .note-body{class: note_editable ? 'js-task-list-container' : ''} - .note-text + .note-text.md = preserve do = note.note_html = edited_time_ago_with_tooltip(note, placement: 'bottom', html_class: 'note_edited_ago', include_author: true) -- cgit v1.2.1 From 97c4a1dceab97cd1388f5bdb1d3f4fd3d228f94b Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 20 Jul 2016 16:45:19 -0600 Subject: Refactor Issues::BulkUpdateService spec - Create fewer Issue objects; 2 is as good as 5 for these cases. This gives us a nice little speed improvement. - Don't `describe` Symbols. - Simplify object creation. - Lessen "mystery guest" antipattern --- spec/factories/issues.rb | 10 ++ spec/services/issues/bulk_update_service_spec.rb | 131 ++++++++++------------- 2 files changed, 65 insertions(+), 76 deletions(-) diff --git a/spec/factories/issues.rb b/spec/factories/issues.rb index e72aa9479b7..2c0a2dd94ca 100644 --- a/spec/factories/issues.rb +++ b/spec/factories/issues.rb @@ -18,5 +18,15 @@ FactoryGirl.define do factory :closed_issue, traits: [:closed] factory :reopened_issue, traits: [:reopened] + + factory :labeled_issue do + transient do + labels [] + end + + after(:create) do |issue, evaluator| + issue.update_attributes(labels: evaluator.labels) + end + end end end diff --git a/spec/services/issues/bulk_update_service_spec.rb b/spec/services/issues/bulk_update_service_spec.rb index ba3a4dfc048..321b54ac39d 100644 --- a/spec/services/issues/bulk_update_service_spec.rb +++ b/spec/services/issues/bulk_update_service_spec.rb @@ -1,118 +1,106 @@ require 'spec_helper' describe Issues::BulkUpdateService, services: true do - let(:user) { create(:user) } - let(:project) { Projects::CreateService.new(user, namespace: user.namespace, name: 'test').execute } + let(:user) { create(:user) } + let(:project) { create(:empty_project, namespace: user.namespace) } - let!(:result) { Issues::BulkUpdateService.new(project, user, params).execute } + def bulk_update(issues, extra_params = {}) + bulk_update_params = extra_params + .reverse_merge(issues_ids: Array(issues).map(&:id).join(',')) - describe :close_issue do - let(:issues) { create_list(:issue, 5, project: project) } - let(:params) do - { - state_event: 'close', - issues_ids: issues.map(&:id).join(',') - } - end + Issues::BulkUpdateService.new(project, user, bulk_update_params).execute + end + + describe 'close issues' do + let(:issues) { create_list(:issue, 2, project: project) } it 'succeeds and returns the correct number of issues updated' do + result = bulk_update(issues, state_event: 'close') + expect(result[:success]).to be_truthy expect(result[:count]).to eq(issues.count) end it 'closes all the issues passed' do + bulk_update(issues, state_event: 'close') + expect(project.issues.opened).to be_empty expect(project.issues.closed).not_to be_empty end end - describe :reopen_issues do - let(:issues) { create_list(:closed_issue, 5, project: project) } - let(:params) do - { - state_event: 'reopen', - issues_ids: issues.map(&:id).join(',') - } - end + describe 'reopen issues' do + let(:issues) { create_list(:closed_issue, 2, project: project) } it 'succeeds and returns the correct number of issues updated' do + result = bulk_update(issues, state_event: 'reopen') + expect(result[:success]).to be_truthy expect(result[:count]).to eq(issues.count) end it 'reopens all the issues passed' do + bulk_update(issues, state_event: 'reopen') + expect(project.issues.closed).to be_empty expect(project.issues.opened).not_to be_empty end end describe 'updating assignee' do - let(:issue) do - create(:issue, project: project) { |issue| issue.update_attributes(assignee: user) } - end - - let(:params) do - { - assignee_id: assignee_id, - issues_ids: issue.id.to_s - } - end + let(:issue) { create(:issue, project: project, assignee: user) } context 'when the new assignee ID is a valid user' do - let(:new_assignee) { create(:user) } - let(:assignee_id) { new_assignee.id } - it 'succeeds' do + result = bulk_update(issue, assignee_id: create(:user).id) + expect(result[:success]).to be_truthy expect(result[:count]).to eq(1) end it 'updates the assignee to the use ID passed' do - expect(issue.reload.assignee).to eq(new_assignee) + assignee = create(:user) + + expect { bulk_update(issue, assignee_id: assignee.id) } + .to change { issue.reload.assignee }.from(user).to(assignee) end end context 'when the new assignee ID is -1' do - let(:assignee_id) { -1 } - it 'unassigns the issues' do - expect(issue.reload.assignee).to be_nil + expect { bulk_update(issue, assignee_id: -1) } + .to change { issue.reload.assignee }.to(nil) end end context 'when the new assignee ID is not present' do - let(:assignee_id) { nil } - it 'does not unassign' do - expect(issue.reload.assignee).to eq(user) + expect { bulk_update(issue, assignee_id: nil) } + .not_to change { issue.reload.assignee } end end end describe 'updating milestones' do - let(:issue) { create(:issue, project: project) } + let(:issue) { create(:issue, project: project) } let(:milestone) { create(:milestone, project: project) } - let(:params) do - { - issues_ids: issue.id.to_s, - milestone_id: milestone.id - } - end - it 'succeeds' do + result = bulk_update(issue, milestone_id: milestone.id) + expect(result[:success]).to be_truthy expect(result[:count]).to eq(1) end it 'updates the issue milestone' do - expect(project.issues.first.milestone).to eq(milestone) + expect { bulk_update(issue, milestone_id: milestone.id) } + .to change { issue.reload.milestone }.from(nil).to(milestone) end end describe 'updating labels' do def create_issue_with_labels(labels) - create(:issue, project: project) { |issue| issue.update_attributes(labels: labels) } + create(:labeled_issue, project: project, labels: labels) end let(:bug) { create(:label, project: project) } @@ -129,15 +117,18 @@ describe Issues::BulkUpdateService, services: true do let(:add_labels) { [] } let(:remove_labels) { [] } - let(:params) do + let(:bulk_update_params) do { - label_ids: labels.map(&:id), - add_label_ids: add_labels.map(&:id), + label_ids: labels.map(&:id), + add_label_ids: add_labels.map(&:id), remove_label_ids: remove_labels.map(&:id), - issues_ids: issues.map(&:id).join(',') } end + before do + bulk_update(issues, bulk_update_params) + end + context 'when label_ids are passed' do let(:issues) { [issue_all_labels, issue_no_labels] } let(:labels) { [bug, regression] } @@ -263,40 +254,28 @@ describe Issues::BulkUpdateService, services: true do end end - describe :subscribe_issues do - let(:issues) { create_list(:issue, 5, project: project) } - let(:params) do - { - subscription_event: 'subscribe', - issues_ids: issues.map(&:id).join(',') - } - end + describe 'subscribe to issues' do + let(:issues) { create_list(:issue, 2, project: project) } it 'subscribes the given user' do - issues.each do |issue| - expect(issue.subscribed?(user)).to be_truthy - end - end - end + bulk_update(issues, subscription_event: 'subscribe') - describe :unsubscribe_issues do - let(:issues) { create_list(:closed_issue, 5, project: project) } - let(:params) do - { - subscription_event: 'unsubscribe', - issues_ids: issues.map(&:id).join(',') - } + expect(issues).to all(be_subscribed(user)) end + end - before do - issues.each do |issue| + describe 'unsubscribe from issues' do + let(:issues) do + create_list(:closed_issue, 2, project: project) do |issue| issue.subscriptions.create(user: user, subscribed: true) end end it 'unsubscribes the given user' do + bulk_update(issues, subscription_event: 'unsubscribe') + issues.each do |issue| - expect(issue.subscribed?(user)).to be_falsey + expect(issue).not_to be_subscribed(user) end end end -- cgit v1.2.1 From c98475f2c23fb7e23e8150fdfc2376aa6b54f286 Mon Sep 17 00:00:00 2001 From: Mark Pundsack Date: Wed, 20 Jul 2016 17:26:18 -0700 Subject: Document when Docker Registery manifest v1 support was added --- doc/container_registry/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/container_registry/README.md b/doc/container_registry/README.md index 1b465434498..55077197ff9 100644 --- a/doc/container_registry/README.md +++ b/doc/container_registry/README.md @@ -1,7 +1,8 @@ # GitLab Container Registry > **Note:** -This feature was [introduced][ce-4040] in GitLab 8.8. +This feature was [introduced][ce-4040] in GitLab 8.8. Docker Registry manifest +v1 support was added in GitLab 8.9 to support Docker versions earlier than 1.10. > **Note:** This document is about the user guide. To learn how to enable GitLab Container -- cgit v1.2.1 From 7c0bf0dc31dec3f3224c062f33c45cc2b3ca86e7 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 20 Jul 2016 18:36:48 -0600 Subject: Remove flaky diff note tests for now --- spec/features/merge_requests/diffs_spec.rb | 94 ------------------------------ 1 file changed, 94 deletions(-) diff --git a/spec/features/merge_requests/diffs_spec.rb b/spec/features/merge_requests/diffs_spec.rb index 35f5bfe46be..c9a0059645d 100644 --- a/spec/features/merge_requests/diffs_spec.rb +++ b/spec/features/merge_requests/diffs_spec.rb @@ -22,98 +22,4 @@ feature 'Diffs URL', js: true, feature: true do expect(page).to have_css('.diffs.tab-pane.active') end end - - context 'when hovering over the parallel view diff file' do - let(:comment_button_class) { '.add-diff-note' } - - before(:each) do - visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request - click_link 'Side-by-side' - @old_line_number = first '.diff-line-num.old_line:not(.empty-cell)' - @new_line_number = first '.diff-line-num.new_line:not(.empty-cell)' - @old_line = first '.line_content[data-line-type="old"]' - @new_line = first '.line_content[data-line-type="new"]' - end - - it 'shows a comment button on the old side when hovering over an old line number' do - @old_line_number.hover - expect(@old_line_number).to have_css comment_button_class - expect(@new_line_number).not_to have_css comment_button_class - end - - it 'shows a comment button on the old side when hovering over an old line' do - @old_line.hover - expect(@old_line_number).to have_css comment_button_class - expect(@new_line_number).not_to have_css comment_button_class - end - - it 'shows a comment button on the new side when hovering over a new line number' do - @new_line_number.hover - expect(@new_line_number).to have_css comment_button_class - expect(@old_line_number).not_to have_css comment_button_class - end - - it 'shows a comment button on the new side when hovering over a new line' do - @new_line.hover - expect(@new_line_number).to have_css comment_button_class - expect(@old_line_number).not_to have_css comment_button_class - end - end - - context 'when hovering over the inline view diff file' do - let(:comment_button_class) { '.add-diff-note' } - - before(:each) do - visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request - click_link 'Inline' - @old_line_number = first '.diff-line-num.old_line:not(.unfold)' - @new_line_number = first '.diff-line-num.new_line:not(.unfold)' - @new_line = first '.line_content:not(.match)' - end - - it 'shows a comment button on the old side when hovering over an old line number' do - @old_line_number.hover - expect(@old_line_number).to have_css comment_button_class - expect(@new_line_number).not_to have_css comment_button_class - end - - it 'shows a comment button on the new side when hovering over a new line number' do - @new_line_number.hover - expect(@old_line_number).to have_css comment_button_class - expect(@new_line_number).not_to have_css comment_button_class - end - - it 'shows a comment button on the new side when hovering over a new line' do - @new_line.hover - expect(@old_line_number).to have_css comment_button_class - expect(@new_line_number).not_to have_css comment_button_class - end - end - - context 'when clicking a comment button' do - let(:test_note_comment) { 'this is a test note!' } - let(:note_class) { '.new-note' } - - before(:each) do - visit diffs_namespace_project_merge_request_path @project.namespace, @project, @merge_request - click_link 'Inline' - first('.diff-line-num.old_line:not(.unfold)').hover - find('.add-diff-note').click - end - - it 'shows a note form' do - expect(page).to have_css note_class - end - - it 'can be submitted and viewed' do - fill_in 'note[note]', with: :test_note_comment - click_button 'Comment' - expect(page).to have_content :test_note_comment - end - - it 'can be closed' do - find('.note-form-actions .btn-cancel').click - expect(page).not_to have_css note_class - end - end end -- cgit v1.2.1 From 76e78fca97f4d7a448ef87f6b6cb14a8268b7341 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 20 Jul 2016 19:04:03 -0600 Subject: Revert "Merge branch 'remove-csp-sentry-reporting' into 'master' " This reverts commit 79b02e40e5842540ceff4454f6c2c51f13fc081c, reversing changes made to f2cd21e8946dcef13e8be408b96b079b5ced682a. --- config/initializers/secure_headers.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb index 253e3cf7410..9fd24a667cc 100644 --- a/config/initializers/secure_headers.rb +++ b/config/initializers/secure_headers.rb @@ -4,7 +4,14 @@ require 'gitlab/current_settings' include Gitlab::CurrentSettings -CSP_REPORT_URI = '' +# If Sentry is enabled and the Rails app is running in production mode, +# this will construct the Report URI for Sentry. +if Rails.env.production? && current_application_settings.sentry_enabled + uri = URI.parse(current_application_settings.sentry_dsn) + CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}" +else + CSP_REPORT_URI = '' +end # Content Security Policy Headers # For more information on CSP see: @@ -64,7 +71,10 @@ SecureHeaders::Configuration.default do |config| upgrade_insecure_requests: true } - config.csp[:report_uri] = %W(#{CSP_REPORT_URI}) + # Reports are sent to Sentry if it's enabled. + if current_application_settings.sentry_enabled + config.csp[:report_uri] = %W(#{CSP_REPORT_URI}) + end # Allow Bootstrap Linter in development mode. if Rails.env.development? -- cgit v1.2.1 From 9a7815e4e2fabbfa6b4e6209829b9f9684ec617d Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 20 Jul 2016 19:04:15 -0600 Subject: Revert "Merge branch 'csp-basics' into 'master' " This reverts commit 9065f9c5ff073d376eb6377ca63ead93623fc8a3, reversing changes made to f0b446e55506b251e85afd4bb063586bccb52eb2. --- Gemfile | 3 - Gemfile.lock | 4 -- config/initializers/secure_headers.rb | 109 ---------------------------------- 3 files changed, 116 deletions(-) delete mode 100644 config/initializers/secure_headers.rb diff --git a/Gemfile b/Gemfile index c5df68839d5..ead64a6d4df 100644 --- a/Gemfile +++ b/Gemfile @@ -349,6 +349,3 @@ gem 'health_check', '~> 2.1.0' # System information gem 'vmstat', '~> 2.1.0' gem 'sys-filesystem', '~> 1.1.6' - -# Secure headers for Content Security Policy -gem 'secure_headers', '~> 3.3' diff --git a/Gemfile.lock b/Gemfile.lock index 363904a4baa..8739f8579d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -645,8 +645,6 @@ GEM sdoc (0.3.20) json (>= 1.1.3) rdoc (~> 3.10) - secure_headers (3.3.2) - useragent seed-fu (2.3.6) activerecord (>= 3.1) activesupport (>= 3.1) @@ -769,7 +767,6 @@ GEM get_process_mem (~> 0) unicorn (>= 4, < 6) uniform_notifier (1.9.0) - useragent (0.16.7) uuid (2.3.8) macaddr (~> 1.0) version_sorter (2.0.0) @@ -947,7 +944,6 @@ DEPENDENCIES sass-rails (~> 5.0.0) scss_lint (~> 0.47.0) sdoc (~> 0.3.20) - secure_headers (~> 3.3) seed-fu (~> 2.3.5) select2-rails (~> 3.5.9) sentry-raven (~> 1.1.0) diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb deleted file mode 100644 index 9fd24a667cc..00000000000 --- a/config/initializers/secure_headers.rb +++ /dev/null @@ -1,109 +0,0 @@ -# CSP headers have to have single quotes, so failures relating to quotes -# inside Ruby string arrays are irrelevant. -# rubocop:disable Lint/PercentStringArray -require 'gitlab/current_settings' -include Gitlab::CurrentSettings - -# If Sentry is enabled and the Rails app is running in production mode, -# this will construct the Report URI for Sentry. -if Rails.env.production? && current_application_settings.sentry_enabled - uri = URI.parse(current_application_settings.sentry_dsn) - CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}" -else - CSP_REPORT_URI = '' -end - -# Content Security Policy Headers -# For more information on CSP see: -# - https://gitlab.com/gitlab-org/gitlab-ce/issues/18231 -# - https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives -SecureHeaders::Configuration.default do |config| - # Mark all cookies as "Secure", "HttpOnly", and "SameSite=Strict". - config.cookies = { - secure: true, - httponly: true, - samesite: { - strict: true - } - } - config.x_content_type_options = "nosniff" - config.x_xss_protection = "1; mode=block" - config.x_download_options = "noopen" - config.x_permitted_cross_domain_policies = "none" - config.referrer_policy = "origin-when-cross-origin" - config.csp = { - # "Meta" values. - report_only: true, - preserve_schemes: true, - - # "Directive" values. - # Default source allows nothing, more permissive values are set per-policy. - default_src: %w('none'), - # (Deprecated) Don't allow iframes. - frame_src: %w('none'), - # Only allow XMLHTTPRequests from the GitLab instance itself. - connect_src: %w('self'), - # Only load local fonts. - font_src: %w('self'), - # Load local images, any external image available over HTTPS. - img_src: %w(* 'self' data:), - # Audio and video can't be played on GitLab currently, so it's disabled. - media_src: %w('none'), - # Don't allow , , or elements. - object_src: %w('none'), - # Allow local scripts and inline scripts. - script_src: %w('unsafe-inline' 'unsafe-eval' 'self'), - # Allow local stylesheets and inline styles. - style_src: %w('unsafe-inline' 'self'), - # The URIs that a user agent may use as the document base URL. - base_uri: %w('self'), - # Only allow local iframes and service workers - child_src: %w('self'), - # Only submit form information to the GitLab instance. - form_action: %w('self'), - # Disallow any parents from embedding a page in an iframe. - frame_ancestors: %w('none'), - # Don't allow any plugins (Flash, Shockwave, etc.) - plugin_types: %w(), - # Blocks all mixed (HTTP) content. - block_all_mixed_content: true, - # Upgrades insecure requests to HTTPS when possible. - upgrade_insecure_requests: true - } - - # Reports are sent to Sentry if it's enabled. - if current_application_settings.sentry_enabled - config.csp[:report_uri] = %W(#{CSP_REPORT_URI}) - end - - # Allow Bootstrap Linter in development mode. - if Rails.env.development? - config.csp[:script_src] << "maxcdn.bootstrapcdn.com" - end - - # reCAPTCHA - if current_application_settings.recaptcha_enabled - config.csp[:script_src] << "https://www.google.com/recaptcha/" - config.csp[:script_src] << "https://www.gstatic.com/recaptcha/" - config.csp[:frame_src] << "https://www.google.com/recaptcha/" - config.x_frame_options = "SAMEORIGIN" - end - - # Gravatar - if current_application_settings.gravatar_enabled? - config.csp[:img_src] << "www.gravatar.com" - config.csp[:img_src] << "secure.gravatar.com" - config.csp[:img_src] << Gitlab.config.gravatar.host - end - - # Piwik - if Gitlab.config.extra.has_key?('piwik_url') && Gitlab.config.extra.has_key?('piwik_site_id') - config.csp[:script_src] << Gitlab.config.extra.piwik_url - config.csp[:img_src] << Gitlab.config.extra.piwik_url - end - - # Google Analytics - if Gitlab.config.extra.has_key?('google_analytics_id') - config.csp[:script_src] << "https://www.google-analytics.com" - end -end -- cgit v1.2.1 From fa8d3ac8110da24c5c907a5daf2e3fa46bf6331f Mon Sep 17 00:00:00 2001 From: Mark Pundsack Date: Wed, 20 Jul 2016 17:43:37 -0700 Subject: Improve grammar of manual actions documentation --- doc/ci/yaml/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 01b7748e90e..d84f3b7d263 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -537,12 +537,12 @@ The above script will: >**Note:** Introduced in GitLab 8.10. -Manual actions are special type of jobs that are not executed automatically in pipeline. -They need to be explicitly started by the user. -Manual actions can be started from pipelines, builds, environments and deployments views. -You can execute the same manual action multiple times. +Manual actions are a special type of job that are not executed automatically; +they need to be explicitly started by a user. Manual actions can be started +from pipeline, build, environment, and deployment views. You can execute the +same manual action multiple times. -Example usage of manual actions is deployment, ex. promote a staging environment to production. +An example usage of manual actions is deployment to production. ### environment -- cgit v1.2.1 From d0341bc3ee682a2ef6a4818309b349c1ac7e153e Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 21 Jul 2016 09:32:41 +0300 Subject: Mention manual actions section in when clause docs --- doc/ci/yaml/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index d84f3b7d263..ecca469e4b8 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -485,7 +485,8 @@ failure. 1. `on_failure` - execute build only when at least one build from prior stages fails. 1. `always` - execute build regardless of the status of builds from prior stages. -1. `manual` - execute build manually. +1. `manual` - execute build manually (added in GitLab 8.10). Read about + [manual actions](#manual-actions) below. For example: @@ -528,9 +529,10 @@ cleanup_job: The above script will: -1. Execute `cleanup_build_job` only when `build_job` fails -2. Always execute `cleanup_job` as the last step in pipeline -3. Allow you to manually execute `deploy_job` from GitLab +1. Execute `cleanup_build_job` only when `build_job` fails. +2. Always execute `cleanup_job` as the last step in pipeline regardless of + success or failure. +3. Allow you to manually execute `deploy_job` from GitLab's UI. #### Manual actions -- cgit v1.2.1 From 62bcbfc820dfee8e680ff3cfa220ef0d988ed9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 21 Jul 2016 06:48:46 +0000 Subject: Add CHANGELOG item for videos support in GFM --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index a5d26db7626..14e9cf7e171 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -76,6 +76,7 @@ v 8.10.0 (unreleased) - Allow expanding and collapsing files in diff view (!4990) - Collapse large diffs by default (!4990) - Fix mentioned users list on diff notes + - Add support for inline videos in GitLab Flavored Markdown. !5215 (original implementation by Eric Hayes) - Fix creation of deployment on build that is retried, redeployed or rollback - Don't parse Rinku returned value to DocFragment when it didn't change the original html string. - Check for conflicts with existing Project's wiki path when creating a new project. -- cgit v1.2.1 From ab86d27d3390b0388bbd92f123adf71321faa492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 21 Jul 2016 08:55:19 +0200 Subject: Don't allow `.ogg` as a valid video extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `.ogg` is for music files. Signed-off-by: Rémy Coutable --- config/initializers/mime_types.rb | 2 +- doc/markdown/markdown.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index cd449b65818..3e553120205 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -11,4 +11,4 @@ Mime::Type.register_alias "text/html", :md Mime::Type.register "video/mp4", :mp4, [], [:m4v, :mov] Mime::Type.register "video/webm", :webm -Mime::Type.register "video/ogg", :ogv, [], [:ogg] +Mime::Type.register "video/ogg", :ogv diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index d407eec2494..2bbe4b2a36e 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -286,7 +286,7 @@ Task lists can only be created in descriptions, not in titles. Task item state c Image tags with a video extension are automatically converted to a video player. -The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, `.ogv`, and `.ogg`. +The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, and `.ogv`. Here's a sample video: -- cgit v1.2.1 From 587d404ad8aeec8c9ffdcddb37d39a738734d7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 21 Jul 2016 09:50:53 +0200 Subject: Update gitlab-workhorse version to 0.7.8 in installation and update guides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- doc/install/installation.md | 2 +- doc/update/8.9-to-8.10.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index 19d083d580d..9bc0dbb5e2a 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -398,7 +398,7 @@ If you are not using Linux you may have to run `gmake` instead of cd /home/git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git cd gitlab-workhorse - sudo -u git -H git checkout v0.7.7 + sudo -u git -H git checkout v0.7.8 sudo -u git -H make ### Initialize Database and Activate Advanced Features diff --git a/doc/update/8.9-to-8.10.md b/doc/update/8.9-to-8.10.md index 84065a84e50..71cbe5c8ac6 100644 --- a/doc/update/8.9-to-8.10.md +++ b/doc/update/8.9-to-8.10.md @@ -58,7 +58,7 @@ GitLab 8.1. ```bash cd /home/git/gitlab-workhorse sudo -u git -H git fetch --all -sudo -u git -H git checkout v0.7.7 +sudo -u git -H git checkout v0.7.8 sudo -u git -H make ``` -- cgit v1.2.1 From 2a9d773e2832dde166ffb2cd55c0e4753eb65646 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Thu, 21 Jul 2016 10:00:17 +0200 Subject: Update doc for award emoji API --- doc/api/award_emoji.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/award_emoji.md b/doc/api/award_emoji.md index b44f8cfd628..796b3680a75 100644 --- a/doc/api/award_emoji.md +++ b/doc/api/award_emoji.md @@ -67,9 +67,9 @@ Example Response: ] ``` -### Get single issue note +### Get single award emoji -Gets a single award emoji +Gets a single award emoji from an issue or merge request. ``` GET /projects/:id/issues/:issue_id/award_emoji/:award_id -- cgit v1.2.1 From f8afe47a87ca880c95163aa7e731638a730ed14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 21 Jul 2016 10:36:02 +0200 Subject: Make Service.external_wikis return only active external wikis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/models/service.rb | 2 +- ...081015_nullify_has_external_wiki_in_projects.rb | 13 +++++ db/schema.rb | 2 +- spec/models/project_spec.rb | 64 +++++++++++++--------- 4 files changed, 52 insertions(+), 29 deletions(-) create mode 100644 db/migrate/20160721081015_nullify_has_external_wiki_in_projects.rb diff --git a/app/models/service.rb b/app/models/service.rb index a8e1cc2f422..40cd9b861f0 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -26,7 +26,7 @@ class Service < ActiveRecord::Base scope :visible, -> { where.not(type: ['GitlabIssueTrackerService', 'GitlabCiService']) } scope :issue_trackers, -> { where(category: 'issue_tracker') } - scope :external_wikis, -> { where(type: 'ExternalWikiService') } + scope :external_wikis, -> { where(type: 'ExternalWikiService').active } scope :active, -> { where(active: true) } scope :without_defaults, -> { where(default: false) } diff --git a/db/migrate/20160721081015_nullify_has_external_wiki_in_projects.rb b/db/migrate/20160721081015_nullify_has_external_wiki_in_projects.rb new file mode 100644 index 00000000000..4bb5bb79632 --- /dev/null +++ b/db/migrate/20160721081015_nullify_has_external_wiki_in_projects.rb @@ -0,0 +1,13 @@ +class NullifyHasExternalWikiInProjects < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def up + execute("UPDATE projects SET has_external_wiki = NULL") + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index c7876426424..d541e1cccb7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160718153603) do +ActiveRecord::Schema.define(version: 20160721081015) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index a2b089c51e2..4c343154b0e 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -458,44 +458,54 @@ describe Project, models: true do end end - describe "#cache_has_external_wiki" do + describe '#external_wiki' do let(:project) { create(:project) } - it "stores true if there is an external wiki" do - services = double(:service, external_wikis: [ExternalWikiService.new]) - expect(project).to receive(:services).and_return(services) + context 'with an active external wiki' do + before do + create(:service, project: project, type: 'ExternalWikiService', active: true) + project.external_wiki + end - expect do - project.cache_has_external_wiki - end.to change { project.has_external_wiki }.to(true) - end + it 'sets :has_external_wiki as true' do + expect(project.has_external_wiki).to be(true) + end - it "stores false if there is no external wiki" do - services = double(:service, external_wikis: []) - expect(project).to receive(:services).and_return(services) + it 'sets :has_external_wiki as false if an external wiki service is destroyed later' do + expect(project.has_external_wiki).to be(true) - expect do - project.cache_has_external_wiki - end.to change { project.has_external_wiki }.to(false) + project.services.external_wikis.first.destroy + + expect(project.has_external_wiki).to be(false) + end end - it "changes to true if an external wiki service is created later" do - expect do - project.cache_has_external_wiki - end.to change { project.has_external_wiki }.to(false) + context 'with an inactive external wiki' do + before do + create(:service, project: project, type: 'ExternalWikiService', active: false) + end - expect do - create(:service, type: "ExternalWikiService", project: project) - end.to change { project.has_external_wiki }.to(true) + it 'sets :has_external_wiki as false' do + expect(project.has_external_wiki).to be(false) + end end - it "changes to false if an external wiki service is destroyed later" do - service = create(:service, type: "ExternalWikiService", project: project) - expect(project.has_external_wiki).to be_truthy + context 'with no external wiki' do + before do + project.external_wiki + end - expect do - service.destroy - end.to change { project.has_external_wiki }.to(false) + it 'sets :has_external_wiki as false' do + expect(project.has_external_wiki).to be(false) + end + + it 'sets :has_external_wiki as true if an external wiki service is created later' do + expect(project.has_external_wiki).to be(false) + + create(:service, project: project, type: 'ExternalWikiService', active: true) + + expect(project.has_external_wiki).to be(true) + end end end -- cgit v1.2.1 From 5e0669e0eb0fe466bab64f45249b16073e314c99 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 21 Jul 2016 17:02:28 +0800 Subject: Since it's too hard to use JOIN with Rails... feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13204564 --- app/models/project.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 9b9d497fbd8..d14d15fdc5c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -431,13 +431,13 @@ class Project < ActiveRecord::Base # ref can't be HEAD, can only be branch/tag name or SHA def latest_successful_builds_for(ref = default_branch) - pipeline = pipelines.latest_successful_for(ref).to_sql - join_sql = "INNER JOIN (#{pipeline}) pipelines" + - " ON pipelines.id = #{Ci::Build.quoted_table_name}.commit_id" - builds.joins(join_sql).latest.with_artifacts - # TODO: Whenever we dropped support for MySQL, we could change to: - # pipeline = pipelines.latest_successful_for(ref) - # builds.where(pipeline: pipeline).latest.with_artifacts + latest_pipeline = pipelines.latest_successful_for(ref).first + + if latest_pipeline + latest_pipeline.builds.latest.with_artifacts + else + builds.none + end end def merge_base_commit(first_commit_id, second_commit_id) -- cgit v1.2.1 From 4211f50014faebf027fd2bc80e0cf1d3f012627c Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 21 Jul 2016 12:34:36 +0300 Subject: Add API documentation for downloading the latest successful build --- doc/api/builds.md | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/doc/api/builds.md b/doc/api/builds.md index 2adea11247e..443739ff845 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -283,6 +283,40 @@ Response: [ce-2893]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2893 +## Download the artifacts file + +> [Introduced][ce-5347] in GitLab 8.10. + +Download the artifacts file from the given reference name and job provided the +build finished successfully. + +``` +GET /projects/:id/artifacts/:ref_name/download?job=name +``` + +Parameters + +| Attribute | Type | Required | Description | +|-------------|---------|----------|-------------------------- | +| `id` | integer | yes | The ID of a project | +| `ref_name` | string | yes | The ref from a repository | +| `job` | string | yes | The name of the job | + +Example request: + +``` +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/artifacts/master/download?job=test" +``` + +Example response: + +| Status | Description | +|-----------|---------------------------------| +| 200 | Serves the artifacts file | +| 404 | Build not found or no artifacts | + +[ce-5347]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347 + ## Get a trace file Get a trace of a specific build of a project @@ -409,7 +443,7 @@ POST /projects/:id/builds/:build_id/erase Parameters -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |-------------|---------|----------|---------------------| | `id` | integer | yes | The ID of a project | | `build_id` | integer | yes | The ID of a build | @@ -459,7 +493,7 @@ POST /projects/:id/builds/:build_id/artifacts/keep Parameters -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |-------------|---------|----------|---------------------| | `id` | integer | yes | The ID of a project | | `build_id` | integer | yes | The ID of a build | -- cgit v1.2.1 From 331571e0671baf606fd0c5cf694441b9a4036419 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Thu, 21 Jul 2016 10:53:38 +0100 Subject: Fix emails on push for new and deleted branches --- app/workers/emails_on_push_worker.rb | 4 ++-- spec/workers/emails_on_push_worker_spec.rb | 36 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/app/workers/emails_on_push_worker.rb b/app/workers/emails_on_push_worker.rb index 8551288e2f2..0b6a01a3200 100644 --- a/app/workers/emails_on_push_worker.rb +++ b/app/workers/emails_on_push_worker.rb @@ -28,12 +28,12 @@ class EmailsOnPushWorker :push end - merge_base_sha = project.merge_base_commit(before_sha, after_sha).try(:sha) - diff_refs = nil compare = nil reverse_compare = false + if action == :push + merge_base_sha = project.merge_base_commit(before_sha, after_sha).try(:sha) compare = Gitlab::Git::Compare.new(project.repository.raw_repository, before_sha, after_sha) diff_refs = Gitlab::Diff::DiffRefs.new( diff --git a/spec/workers/emails_on_push_worker_spec.rb b/spec/workers/emails_on_push_worker_spec.rb index 439da765c2c..796751efe8d 100644 --- a/spec/workers/emails_on_push_worker_spec.rb +++ b/spec/workers/emails_on_push_worker_spec.rb @@ -12,6 +12,42 @@ describe EmailsOnPushWorker do subject { EmailsOnPushWorker.new } describe "#perform" do + context "when push is a new branch" do + let(:email) { ActionMailer::Base.deliveries.last } + + before do + data_new_branch = data.stringify_keys.merge("before" => Gitlab::Git::BLANK_SHA) + + subject.perform(project.id, recipients, data_new_branch) + end + + it "sends a mail with the correct subject" do + expect(email.subject).to include("Pushed new branch") + end + + it "sends the mail to the correct recipient" do + expect(email.to).to eq([user.email]) + end + end + + context "when push is a deleted branch" do + let(:email) { ActionMailer::Base.deliveries.last } + + before do + data_deleted_branch = data.stringify_keys.merge("after" => Gitlab::Git::BLANK_SHA) + + subject.perform(project.id, recipients, data_deleted_branch) + end + + it "sends a mail with the correct subject" do + expect(email.subject).to include("Deleted branch") + end + + it "sends the mail to the correct recipient" do + expect(email.to).to eq([user.email]) + end + end + context "when there are no errors in sending" do let(:email) { ActionMailer::Base.deliveries.last } -- cgit v1.2.1 From 71a3336dc4f241e00c006a222397e62b039672ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 21 Jul 2016 12:18:34 +0200 Subject: Cast duration to integer in `TimeHelper#time_interval_in_words` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/helpers/time_helper.rb | 1 + spec/helpers/time_helper_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/helpers/time_helper.rb b/app/helpers/time_helper.rb index 1926f03af07..790001222f1 100644 --- a/app/helpers/time_helper.rb +++ b/app/helpers/time_helper.rb @@ -1,5 +1,6 @@ module TimeHelper def time_interval_in_words(interval_in_seconds) + interval_in_seconds = interval_in_seconds.to_i minutes = interval_in_seconds / 60 seconds = interval_in_seconds - minutes * 60 diff --git a/spec/helpers/time_helper_spec.rb b/spec/helpers/time_helper_spec.rb index 413ead944b9..bf3ed5c094c 100644 --- a/spec/helpers/time_helper_spec.rb +++ b/spec/helpers/time_helper_spec.rb @@ -5,6 +5,7 @@ describe TimeHelper do it "returns minutes and seconds" do intervals_in_words = { 100 => "1 minute 40 seconds", + 100.32 => "1 minute 40 seconds", 121 => "2 minutes 1 second", 3721 => "62 minutes 1 second", 0 => "0 seconds" -- cgit v1.2.1 From 27a44694af84acc98739cb243902cfd0db575727 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 21 Jul 2016 11:18:40 +0100 Subject: Changed tr to be direct descendant --- app/assets/stylesheets/mailers/repository_push_email.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/mailers/repository_push_email.scss b/app/assets/stylesheets/mailers/repository_push_email.scss index 98dd6217aa9..33aedf1f7c1 100644 --- a/app/assets/stylesheets/mailers/repository_push_email.scss +++ b/app/assets/stylesheets/mailers/repository_push_email.scss @@ -18,7 +18,7 @@ -premailer-cellspacing: 0; -premailer-width: 100%; - tr { + > tr { line-height: $code_line_height; } } -- cgit v1.2.1 From 3845f12de880c450d317dfb924b79d47791340f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 21 Jul 2016 12:45:03 +0200 Subject: Fix migration to make it fast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- ...1081015_drop_and_readd_has_external_wiki_in_projects.rb | 14 ++++++++++++++ ...20160721081015_nullify_has_external_wiki_in_projects.rb | 13 ------------- 2 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb delete mode 100644 db/migrate/20160721081015_nullify_has_external_wiki_in_projects.rb diff --git a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb new file mode 100644 index 00000000000..459a120155d --- /dev/null +++ b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb @@ -0,0 +1,14 @@ +class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def up + remove_column :projects, :has_external_wiki, :boolean + add_column :projects, :has_external_wiki, :boolean + end + + def down + end +end diff --git a/db/migrate/20160721081015_nullify_has_external_wiki_in_projects.rb b/db/migrate/20160721081015_nullify_has_external_wiki_in_projects.rb deleted file mode 100644 index 4bb5bb79632..00000000000 --- a/db/migrate/20160721081015_nullify_has_external_wiki_in_projects.rb +++ /dev/null @@ -1,13 +0,0 @@ -class NullifyHasExternalWikiInProjects < ActiveRecord::Migration - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - execute("UPDATE projects SET has_external_wiki = NULL") - end - - def down - end -end -- cgit v1.2.1 From 71b8ca038b38a12fdc1dc7463b57a67fb8b7fcb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 21 Jul 2016 13:14:30 +0200 Subject: Fix CHANGELOG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- CHANGELOG | 69 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0b9940c81a9..017cf92160f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ Please view this file on the master branch, on stable branches it's out of date. + v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check @@ -7,31 +8,31 @@ v 8.10.0 (unreleased) - Fix profile activity heatmap to show correct day name (eanplatter) - Speed up ExternalWikiHelper#get_project_wiki_path - Expose {should,force}_remove_source_branch (Ben Boeckel) - - Add the functionality to be able to rename a file. !5049 (tiagonbotelho) + - Add the functionality to be able to rename a file. !5049 - Disable PostgreSQL statement timeout during migrations - - Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho) + - Fix projects dropdown loading performance with a simplified api cal. !5113 - Fix commit builds API, return all builds for all pipelines for given commit. !4849 - Replace Haml with Hamlit to make view rendering faster. !3666 - Refresh the branch cache after `git gc` runs - Allow to disable request access button on projects/groups - Refactor repository paths handling to allow multiple git mount points - - Optimize system note visibility checking by memoizing the visible reference count !5070 + - Optimize system note visibility checking by memoizing the visible reference count. !5070 - Add Application Setting to configure default Repository Path for new projects - Delete award emoji when deleting a user - - Remove pinTo from Flash and make inline flash messages look nicer !4854 (winniehell) - - Add an API for downloading latest successful build from a particular branch or tag !5347 - - Add link to profile to commit avatar !5163 (winniehell) + - Remove pinTo from Flash and make inline flash messages look nicer. !4854 (winniehell) + - Add an API for downloading latest successful build from a particular branch or tag. !5347 + - Add link to profile to commit avatar. !5163 (winniehell) - Wrap code blocks on Activies and Todos page. !4783 (winniehell) - - Align flash messages with left side of page content !4959 (winniehell) - - Display tooltip for "Copy to Clipboard" button !5164 (winniehell) - - Use default cursor for table header of project files !5165 (winniehell) + - Align flash messages with left side of page content. !4959 (winniehell) + - Display tooltip for "Copy to Clipboard" button. !5164 (winniehell) + - Use default cursor for table header of project files. !5165 (winniehell) - Store when and yaml variables in builds table - - Display last commit of deleted branch in push events !4699 (winniehell) - - Escape file extension when parsing search results !5141 (winniehell) + - Display last commit of deleted branch in push events. !4699 (winniehell) + - Escape file extension when parsing search results. !5141 (winniehell) - Add "passing with warnings" to the merge request pipeline possible statuses, this happens when builds that allow failures have failed. !5004 - - Add image border in Markdown preview !5162 (winniehell) + - Add image border in Markdown preview. !5162 (winniehell) - Apply the trusted_proxies config to the rack request object for use with rack_attack - - Added the ability to block sign ups using a domain blacklist !5259 + - Added the ability to block sign ups using a domain blacklist. !5259 - Upgrade to Rails 4.2.7. !5236 - Extend exposed environment variables for CI builds - Deprecate APIs "projects/:id/keys/...". Use "projects/:id/deploy_keys/..." instead @@ -39,36 +40,36 @@ v 8.10.0 (unreleased) - Allow to pull code with deploy key from public projects - Use limit parameter rather than hardcoded value in `ldap:check` rake task (Mike Ricketts) - Add Sidekiq queue duration to transaction metrics. - - Add a new column `artifacts_size` to table `ci_builds` !4964 + - Add a new column `artifacts_size` to table `ci_builds`. !4964 - Let Workhorse serve format-patch diffs - - Display tooltip for mentioned users and groups !5261 (winniehell) + - Display tooltip for mentioned users and groups. !5261 (winniehell) - Allow build email service to be tested - Added day name to contribution calendar tooltips - Refactor user authorization check for a single project to avoid querying all user projects - - Make images fit to the size of the viewport !4810 - - Fix check for New Branch button on Issue page !4630 (winniehell) + - Make images fit to the size of the viewport. !4810 + - Fix check for New Branch button on Issue page. !4630 (winniehell) - Fix GFM autocomplete not working on wiki pages - Fixed enter key not triggering click on first row when searching in a dropdown - Fix MR-auto-close text added to description. !4836 - Support U2F devices in Firefox. !5177 - - Fix issue, preventing users w/o push access to sort tags !5105 (redetection) + - Fix issue, preventing users w/o push access to sort tags. !5105 (redetection) - Add Spring EmojiOne updates. - - Added Rake task for tracking deployments !5320 + - Added Rake task for tracking deployments. !5320 - Fix fetching LFS objects for private CI projects - Add the new 2016 Emoji! Adds 72 new emoji including bacon, facepalm, and selfie. !5237 - - Add syntax for multiline blockquote using `>>>` fence !3954 + - Add syntax for multiline blockquote using `>>>` fence. !3954 - Fix viewing notification settings when a project is pending deletion - Updated compare dropdown menus to use GL dropdown - Redirects back to issue after clicking login link - Eager load award emoji on notes - Allow to define manual actions/builds on Pipelines and Environments - Fix pagination when sorting by columns with lots of ties (like priority) - - The Markdown reference parsers now re-use query results to prevent running the same queries multiple times !5020 + - The Markdown reference parsers now re-use query results to prevent running the same queries multiple times. !5020 - Updated project header design - Issuable collapsed assignee tooltip is now the users name - Fix compare view not changing code view rendering style - Exclude email check from the standard health check - - Updated layout for Projects, Groups, Users on Admin area !4424 + - Updated layout for Projects, Groups, Users on Admin area. !4424 - Fix changing issue state columns in milestone view - Update health_check gem to version 2.1.0 - Add notification settings dropdown for groups @@ -76,20 +77,20 @@ v 8.10.0 (unreleased) - Wildcards for protected branches. !4665 - Allow importing from Github using Personal Access Tokens. (Eric K Idema) - API: Expose `due_date` for issues (Robert Schilling) - - API: Todos !3188 (Robert Schilling) - - API: Expose shared groups for projects and shared projects for groups !5050 (Robert Schilling) - - API: Expose `developers_can_push` and `developers_can_merge` for branches !5208 (Robert Schilling) + - API: Todos. !3188 (Robert Schilling) + - API: Expose shared groups for projects and shared projects for groups. !5050 (Robert Schilling) + - API: Expose `developers_can_push` and `developers_can_merge` for branches. !5208 (Robert Schilling) - Add "Enabled Git access protocols" to Application Settings - Diffs will create button/diff form on demand no on server side - Reduce size of HTML used by diff comment forms - Protected branches have a "Developers can Merge" setting. !4892 (original implementation by Mathias Vestergaard) - - Fix user creation with stronger minimum password requirements !4054 (nathan-pmt) + - Fix user creation with stronger minimum password requirements. !4054 (nathan-pmt) - Only show New Snippet button to users that can create snippets. - PipelinesFinder uses git cache data - Track a user who created a pipeline - Actually render old and new sections of parallel diff next to each other - Throttle the update of `project.pushes_since_gc` to 1 minute. - - Allow expanding and collapsing files in diff view (!4990) + - Allow expanding and collapsing files in diff view. !4990 - Collapse large diffs by default (!4990) - Fix mentioned users list on diff notes - Add support for inline videos in GitLab Flavored Markdown. !5215 (original implementation by Eric Hayes) @@ -105,9 +106,9 @@ v 8.10.0 (unreleased) - ObjectRenderer retrieve renderer content using Rails.cache.read_multi - Better caching of git calls on ProjectsController#show. - Avoid to retrieve MR closes_issues as much as possible. - - Hide project name in project activities !5068 (winniehell) - - Add API endpoint for a group issues !4520 (mahcsig) - - Add Bugzilla integration !4930 (iamtjg) + - Hide project name in project activities. !5068 (winniehell) + - Add API endpoint for a group issues. !4520 (mahcsig) + - Add Bugzilla integration. !4930 (iamtjg) - Fix new snippet style bug (elliotec) - Instrument Rinku usage - Be explicit to define merge request discussion variables @@ -129,10 +130,10 @@ v 8.10.0 (unreleased) - Fix importer for GitHub Pull Requests when a branch was reused across Pull Requests - Add date when user joined the team on the member page - Fix 404 redirect after validation fails importing a GitLab project - - Added setting to set new users by default as external !4545 (Dravere) - - Add min value for project limit field on user's form !3622 (jastkand) + - Added setting to set new users by default as external. !4545 (Dravere) + - Add min value for project limit field on user's form. !3622 (jastkand) - Reset project pushes_since_gc when we enqueue the git gc call - - Add reminder to not paste private SSH keys !4399 (Ingo Blechschmidt) + - Add reminder to not paste private SSH keys. !4399 (Ingo Blechschmidt) - Collapsed diffs lines/size don't acumulate to overflow diffs. - Remove duplicate `description` field in `MergeRequest` entities (Ben Boeckel) - Style of import project buttons were fixed in the new project page. !5183 (rdemirbay) @@ -146,7 +147,7 @@ v 8.10.0 (unreleased) - Fix last update timestamp on issues not preserved on gitlab.com and project imports - Fix issues importing projects from EE to CE - Fix creating group with space in group path - - Improve cron_jobs loading error messages !5318 / !5360 + - Improve cron_jobs loading error messages. !5318 / !5360 - Prevent toggling sidebar when clipboard icon clicked - Create Todos for Issue author when assign or mention himself (Katarzyna Kobierska) - Limit the number of retries on error to 3 for exporting projects -- cgit v1.2.1 From 880a40e7e94eb7a3c1e31eda9b6bd9f68b0a4068 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 21 Jul 2016 19:20:25 +0800 Subject: Fix URL in the documentation --- doc/api/builds.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/builds.md b/doc/api/builds.md index 443739ff845..24d90e22a9b 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -291,7 +291,7 @@ Download the artifacts file from the given reference name and job provided the build finished successfully. ``` -GET /projects/:id/artifacts/:ref_name/download?job=name +GET /projects/:id/builds/artifacts/:ref_name/download?job=name ``` Parameters @@ -305,7 +305,7 @@ Parameters Example request: ``` -curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/artifacts/master/download?job=test" +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/artifacts/master/download?job=test" ``` Example response: -- cgit v1.2.1 From 0b67945c99fde0d2c1ac6287f826001ef4c5d03b Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 21 Jul 2016 19:26:58 +0800 Subject: Also fix the URL in the comment --- lib/api/builds.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/builds.rb b/lib/api/builds.rb index 657d421fe97..be5a3484ec8 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -80,7 +80,7 @@ module API # ref_name (required) - The ref from repository # job (required) - The name for the build # Example Request: - # GET /projects/:id/artifacts/:ref_name/download?job=name + # GET /projects/:id/builds/artifacts/:ref_name/download?job=name get ':id/builds/artifacts/:ref_name/download', requirements: { ref_name: /.+/ } do authorize_read_builds! -- cgit v1.2.1 From 2ba5e6259e14f9bc9f60201da249a5a313bbd0db Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Thu, 21 Jul 2016 17:46:33 +0530 Subject: Don't use `params[:id]` while building `markdown_preview_path`. 1. Instead, use `@page.title`, since it's always guaranteed to be around in a wiki. 2. `params[:id]` is _not_ always guaranteed to be around - if a page is created with errors, `render :edit` is called, and `params[:id]` is `nil`. 3. More context: https://gitlab.com/gitlab-org/gitlab-ce/issues/20079#note_13223240 --- app/views/layouts/project.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 2049b204956..d03d5e2ca6a 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -6,7 +6,7 @@ - content_for :scripts_body_top do - project = @target_project || @project - if @project_wiki && @page - - markdown_preview_path = namespace_project_wiki_markdown_preview_path(project.namespace, project, params[:id]) + - markdown_preview_path = namespace_project_wiki_markdown_preview_path(project.namespace, project, @page.title) - else - markdown_preview_path = markdown_preview_namespace_project_path(project.namespace, project) - if current_user -- cgit v1.2.1 From 36b9cc3fff04efe4c5f2e8609ecd4a6d5d613f22 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 21 Jul 2016 15:37:32 +0300 Subject: Add allow_failure CI documentation --- doc/ci/yaml/README.md | 81 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index ecca469e4b8..ea3fff1596e 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -13,34 +13,36 @@ If you want a quick introduction to GitLab CI, follow our **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - [.gitlab-ci.yml](#gitlab-ci-yml) - - [image and services](#image-and-services) - - [before_script](#before_script) - - [after_script](#after_script) - - [stages](#stages) - - [types](#types) - - [variables](#variables) - - [cache](#cache) - - [cache:key](#cache-key) + - [image and services](#image-and-services) + - [before_script](#before_script) + - [after_script](#after_script) + - [stages](#stages) + - [types](#types) + - [variables](#variables) + - [cache](#cache) + - [cache:key](#cache-key) - [Jobs](#jobs) - - [script](#script) - - [stage](#stage) - - [only and except](#only-and-except) - - [job variables](#job-variables) - - [tags](#tags) - - [when](#when) - - [environment](#environment) - - [artifacts](#artifacts) - - [artifacts:name](#artifactsname) - - [artifacts:when](#artifactswhen) - - [artifacts:expire_in](#artifactsexpire_in) - - [dependencies](#dependencies) - - [before_script and after_script](#before_script-and-after_script) + - [script](#script) + - [stage](#stage) + - [only and except](#only-and-except) + - [job variables](#job-variables) + - [tags](#tags) + - [allow_failure](#allow_failure) + - [when](#when) + - [Manual actions](#manual-actions) + - [environment](#environment) + - [artifacts](#artifacts) + - [artifacts:name](#artifacts-name) + - [artifacts:when](#artifacts-when) + - [artifacts:expire_in](#artifacts-expire_in) + - [dependencies](#dependencies) + - [before_script and after_script](#before_script-and-after_script) - [Git Strategy](#git-strategy) - [Shallow cloning](#shallow-cloning) - [Hidden jobs](#hidden-jobs) - [Special YAML features](#special-yaml-features) - - [Anchors](#anchors) -- [Validate the .gitlab-ci.yml](#validate-the-gitlab-ciyml) + - [Anchors](#anchors) +- [Validate the .gitlab-ci.yml](#validate-the-gitlab-ci-yml) - [Skipping builds](#skipping-builds) - [Examples](#examples) @@ -473,6 +475,39 @@ job: The specification above, will make sure that `job` is built by a Runner that has both `ruby` AND `postgres` tags defined. +### allow_failure + +`allow_failure` is used when you want to allow a build to fail without impacting +the rest of the CI suite. Failed builds don't contribute to the commit status. + +When enabled and the build fails, the pipeline will be successful/green for all +intents and purposes, but a "CI build passed with warnings" message will be +displayed on the merge request or commit or build page. This is to be used by +builds that are allowed to fail, but where failure indicates some other (manual) +steps should be taken elsewhere. + +In the example below, `job1` and `job2` will run in parallel, but if `job1` +fails, it will not stop the next stage from running, since it's marked with +`allow_failure: true`: + +```yaml +job1: + stage: test + script: + - execute_script_that_will_fail + allow_failure: true + +job2: + stage: test + script: + - execute_script_that_will_succeed + +job3: + stage: deploy + script: + - deploy_to_staging +``` + ### when `when` is used to implement jobs that are run in case of failure or despite the -- cgit v1.2.1 From d62656b081f8abd5affc764c1f92fc4c787522e7 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Fri, 15 Jul 2016 16:26:46 -0300 Subject: Update default path for repository_downloads_path in gitlab.yml.example --- config/gitlab.yml.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 325eca72862..1470a6e2550 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -106,8 +106,8 @@ production: &base ## Repository downloads directory # When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory. - # The default is 'tmp/repositories' relative to the root of the Rails app. - # repository_downloads_path: tmp/repositories + # The default is 'shared/cache/archive/' relative to the root of the Rails app. + # repository_downloads_path: shared/cache/archive/ ## Reply by email # Allow users to comment on issues and merge requests by replying to notification emails. -- cgit v1.2.1 From 6ae177ef53e57d98f95238df990da2225bca3fab Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Fri, 15 Jul 2016 16:27:19 -0300 Subject: Avoid data-integrity issue when repository_downloads_path is incorrectly --- config/initializers/1_settings.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 693507e0bec..86f55210487 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -211,7 +211,6 @@ Settings.gitlab.default_projects_features['snippets'] = false if Setti Settings.gitlab.default_projects_features['builds'] = true if Settings.gitlab.default_projects_features['builds'].nil? Settings.gitlab.default_projects_features['container_registry'] = true if Settings.gitlab.default_projects_features['container_registry'].nil? Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE) -Settings.gitlab['repository_downloads_path'] = File.join(Settings.shared['path'], 'cache/archive') if Settings.gitlab['repository_downloads_path'].nil? Settings.gitlab['domain_whitelist'] ||= [] Settings.gitlab['import_sources'] ||= %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project] Settings.gitlab['trusted_proxies'] ||= [] @@ -315,6 +314,21 @@ Settings.repositories['storages'] ||= {} # Setting gitlab_shell.repos_path is DEPRECATED and WILL BE REMOVED in version 9.0 Settings.repositories.storages['default'] ||= Settings.gitlab_shell['repos_path'] || Settings.gitlab['user_home'] + '/repositories/' +# +# The repository_downloads_path is used to remove outdated repository +# archives, if someone has it configured incorrectly, and it points +# to the path where repositories are stored this can cause some +# data-integrity issue. In this case, we sets it to the default +# repository_downloads_path value. +# +repositories_storages_path = Settings.repositories.storages.values +repository_downloads_path = Settings.gitlab['repository_downloads_path'].to_s.gsub(/\/$/, '') +repository_downloads_full_path = File.expand_path(repository_downloads_path, Settings.gitlab['user_home']) + +if repository_downloads_path.blank? || repositories_storages_path.any? { |path| [repository_downloads_path, repository_downloads_full_path].include?(path.gsub(/\/$/, '')) } + Settings.gitlab['repository_downloads_path'] = File.join(Settings.shared['path'], 'cache/archive') +end + # # Backup # -- cgit v1.2.1 From a6de806498c405355380be4b80f63d134658b779 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Mon, 18 Jul 2016 16:38:36 -0300 Subject: Add service to clean up repository archive cache Replace invocation of `find` with Ruby code that matches old cached files in a better, and safe way to avoid data-integrity issues. --- app/models/repository.rb | 10 ------ .../repository_archive_clean_up_service.rb | 42 ++++++++++++++++++++++ app/workers/repository_archive_cache_worker.rb | 2 +- spec/models/repository_spec.rb | 24 ------------- .../repository_archive_clean_up_service_spec.rb | 31 ++++++++++++++++ 5 files changed, 74 insertions(+), 35 deletions(-) create mode 100644 app/services/repository_archive_clean_up_service.rb create mode 100644 spec/services/repository_archive_clean_up_service_spec.rb diff --git a/app/models/repository.rb b/app/models/repository.rb index 511df2d67c6..a6580e85498 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -11,16 +11,6 @@ class Repository attr_accessor :path_with_namespace, :project - def self.clean_old_archives - Gitlab::Metrics.measure(:clean_old_archives) do - repository_downloads_path = Gitlab.config.gitlab.repository_downloads_path - - return unless File.directory?(repository_downloads_path) - - Gitlab::Popen.popen(%W(find #{repository_downloads_path} -not -path #{repository_downloads_path} -mmin +120 -delete)) - end - end - def initialize(path_with_namespace, project) @path_with_namespace = path_with_namespace @project = project diff --git a/app/services/repository_archive_clean_up_service.rb b/app/services/repository_archive_clean_up_service.rb new file mode 100644 index 00000000000..9764df6492d --- /dev/null +++ b/app/services/repository_archive_clean_up_service.rb @@ -0,0 +1,42 @@ +class RepositoryArchiveCleanUpService + ALLOWED_ARCHIVE_EXTENSIONS = %w[tar tar.bz2 tar.gz zip].join(',').freeze + LAST_MODIFIED_TIME_IN_MINUTES = 120 + + def initialize(mmin = LAST_MODIFIED_TIME_IN_MINUTES) + @mmin = mmin + @path = Gitlab.config.gitlab.repository_downloads_path + end + + def execute + Gitlab::Metrics.measure(:repository_archive_clean_up) do + return unless File.directory?(path) + + clean_up_old_archives + clean_up_empty_directories + end + end + + private + + attr_reader :mmin, :path + + def clean_up_old_archives + Dir.glob("#{path}/**.git/*{#{ALLOWED_ARCHIVE_EXTENSIONS}}") do |filename| + File.delete(filename) if older?(filename) + end + end + + def older?(filename) + File.exist?(filename) && File.new(filename).mtime < (Time.now - mmin * 60) + end + + def clean_up_empty_directories + Dir.glob("#{path}/**.git/").reverse_each do |dir| + Dir.rmdir(dir) if empty?(dir) + end + end + + def empty?(dir) + (Dir.entries(dir) - %w[. ..]).empty? + end +end diff --git a/app/workers/repository_archive_cache_worker.rb b/app/workers/repository_archive_cache_worker.rb index 47c5a670ed4..a2e49c61f59 100644 --- a/app/workers/repository_archive_cache_worker.rb +++ b/app/workers/repository_archive_cache_worker.rb @@ -4,6 +4,6 @@ class RepositoryArchiveCacheWorker sidekiq_options queue: :default def perform - Repository.clean_old_archives + RepositoryArchiveCleanUpService.new.execute end end diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 59c5732c075..38b0c345b48 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1172,30 +1172,6 @@ describe Repository, models: true do end end - describe '.clean_old_archives' do - let(:path) { Gitlab.config.gitlab.repository_downloads_path } - - context 'when the downloads directory does not exist' do - it 'does not remove any archives' do - expect(File).to receive(:directory?).with(path).and_return(false) - - expect(Gitlab::Popen).not_to receive(:popen) - - described_class.clean_old_archives - end - end - - context 'when the downloads directory exists' do - it 'removes old archives' do - expect(File).to receive(:directory?).with(path).and_return(true) - - expect(Gitlab::Popen).to receive(:popen) - - described_class.clean_old_archives - end - end - end - describe "#keep_around" do it "stores a reference to the specified commit sha so it isn't garbage collected" do repository.keep_around(sample_commit.id) diff --git a/spec/services/repository_archive_clean_up_service_spec.rb b/spec/services/repository_archive_clean_up_service_spec.rb new file mode 100644 index 00000000000..a9ac21258da --- /dev/null +++ b/spec/services/repository_archive_clean_up_service_spec.rb @@ -0,0 +1,31 @@ +require 'spec_helper' + +describe RepositoryArchiveCleanUpService, services: true do + describe '#execute' do + let(:path) { Gitlab.config.gitlab.repository_downloads_path } + + subject(:service) { described_class.new } + + context 'when the downloads directory does not exist' do + it 'does not remove any archives' do + expect(File).to receive(:directory?).with(path).and_return(false) + + expect(service).not_to receive(:clean_up_old_archives) + expect(service).not_to receive(:clean_up_empty_directories) + + service.execute + end + end + + context 'when the downloads directory exists' do + it 'removes old archives' do + expect(File).to receive(:directory?).with(path).and_return(true) + + expect(service).to receive(:clean_up_old_archives) + expect(service).to receive(:clean_up_empty_directories) + + service.execute + end + end + end +end -- cgit v1.2.1 From 1bda45178977f613a9f4adc1d00e2694ca3963b5 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Tue, 19 Jul 2016 20:45:31 -0300 Subject: Cover the behavior RepositoryArchiveCleanUpService with tests --- .../repository_archive_clean_up_service_spec.rb | 96 ++++++++++++++++++++-- 1 file changed, 89 insertions(+), 7 deletions(-) diff --git a/spec/services/repository_archive_clean_up_service_spec.rb b/spec/services/repository_archive_clean_up_service_spec.rb index a9ac21258da..321cc6daf9d 100644 --- a/spec/services/repository_archive_clean_up_service_spec.rb +++ b/spec/services/repository_archive_clean_up_service_spec.rb @@ -2,14 +2,17 @@ require 'spec_helper' describe RepositoryArchiveCleanUpService, services: true do describe '#execute' do - let(:path) { Gitlab.config.gitlab.repository_downloads_path } + let(:path) { File.join(Rails.root, 'tmp/tests/shared/cache/archive') } subject(:service) { described_class.new } + before do + allow(Gitlab.config.gitlab).to receive(:repository_downloads_path).and_return(path) + end + context 'when the downloads directory does not exist' do it 'does not remove any archives' do expect(File).to receive(:directory?).with(path).and_return(false) - expect(service).not_to receive(:clean_up_old_archives) expect(service).not_to receive(:clean_up_empty_directories) @@ -18,13 +21,92 @@ describe RepositoryArchiveCleanUpService, services: true do end context 'when the downloads directory exists' do - it 'removes old archives' do - expect(File).to receive(:directory?).with(path).and_return(true) + before do + FileUtils.mkdir_p(path) + end - expect(service).to receive(:clean_up_old_archives) - expect(service).to receive(:clean_up_empty_directories) + after do + FileUtils.rm_rf(path) + end - service.execute + context 'when archives older than 2 hours exists' do + before do + allow_any_instance_of(File).to receive(:mtime).and_return(2.hours.ago) + end + + it 'removes old files that matches valid archive extensions' do + dirname = File.join(path, 'sample.git') + files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip]) + + service.execute + + files.each { |file| expect(File.exist?(file)).to eq false } + expect(File.directory?(dirname)).to eq false + end + + it 'keeps old files that does not matches valid archive extensions' do + dirname = File.join(path, 'sample.git') + files = create_temporary_files(dirname, %w[conf rb]) + + service.execute + + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end + + it 'keeps old files inside invalid directories' do + dirname = File.join(path, 'john_doe/sample.git') + files = create_temporary_files(dirname, %w[conf rb tar tar.gz]) + + service.execute + + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end + end + + context 'when archives older than 2 hours does not exist' do + before do + allow_any_instance_of(File).to receive(:mtime).and_return(1.hour.ago) + end + + it 'keeps files that matches valid archive extensions' do + dirname = File.join(path, 'sample.git') + files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip]) + + service.execute + + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end + + it 'keeps files that does not matches valid archive extensions' do + dirname = File.join(path, 'sample.git') + files = create_temporary_files(dirname, %w[conf rb]) + + service.execute + + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end + + it 'keeps files inside invalid directories' do + dirname = File.join(path, 'john_doe/sample.git') + files = create_temporary_files(dirname, %w[conf rb tar tar.gz]) + + service.execute + + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end + end + + def create_temporary_files(dirname, extensions) + FileUtils.mkdir_p(dirname) + + extensions.flat_map do |extension| + FileUtils.touch(File.join(dirname, "sample.#{extension}")) + end end end end -- cgit v1.2.1 From 79983afbbf052476eee3d86e0b970326e64f8514 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Wed, 20 Jul 2016 20:29:25 -0300 Subject: Use find instead Ruby to remove files due to performance reasons --- .../repository_archive_clean_up_service.rb | 17 ++++---------- .../repository_archive_clean_up_service_spec.rb | 27 +++++++--------------- 2 files changed, 12 insertions(+), 32 deletions(-) diff --git a/app/services/repository_archive_clean_up_service.rb b/app/services/repository_archive_clean_up_service.rb index 9764df6492d..0b56b09738d 100644 --- a/app/services/repository_archive_clean_up_service.rb +++ b/app/services/repository_archive_clean_up_service.rb @@ -1,5 +1,4 @@ class RepositoryArchiveCleanUpService - ALLOWED_ARCHIVE_EXTENSIONS = %w[tar tar.bz2 tar.gz zip].join(',').freeze LAST_MODIFIED_TIME_IN_MINUTES = 120 def initialize(mmin = LAST_MODIFIED_TIME_IN_MINUTES) @@ -21,22 +20,14 @@ class RepositoryArchiveCleanUpService attr_reader :mmin, :path def clean_up_old_archives - Dir.glob("#{path}/**.git/*{#{ALLOWED_ARCHIVE_EXTENSIONS}}") do |filename| - File.delete(filename) if older?(filename) - end - end - - def older?(filename) - File.exist?(filename) && File.new(filename).mtime < (Time.now - mmin * 60) + run(%W(find #{path} -not -path #{path} -type f \( -name \*.tar -o -name \*.bz2 -o -name \*.tar.gz -o -name \*.zip \) -maxdepth 2 -mmin +#{mmin} -delete)) end def clean_up_empty_directories - Dir.glob("#{path}/**.git/").reverse_each do |dir| - Dir.rmdir(dir) if empty?(dir) - end + run(%W(find #{path} -not -path #{path} -type d -empty -name \*.git -maxdepth 1 -delete)) end - def empty?(dir) - (Dir.entries(dir) - %w[. ..]).empty? + def run(cmd) + Gitlab::Popen.popen(cmd) end end diff --git a/spec/services/repository_archive_clean_up_service_spec.rb b/spec/services/repository_archive_clean_up_service_spec.rb index 321cc6daf9d..6173d6cb51c 100644 --- a/spec/services/repository_archive_clean_up_service_spec.rb +++ b/spec/services/repository_archive_clean_up_service_spec.rb @@ -30,13 +30,9 @@ describe RepositoryArchiveCleanUpService, services: true do end context 'when archives older than 2 hours exists' do - before do - allow_any_instance_of(File).to receive(:mtime).and_return(2.hours.ago) - end - it 'removes old files that matches valid archive extensions' do dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip]) + files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip], 2.hours) service.execute @@ -46,7 +42,7 @@ describe RepositoryArchiveCleanUpService, services: true do it 'keeps old files that does not matches valid archive extensions' do dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[conf rb]) + files = create_temporary_files(dirname, %w[conf rb], 2.hours) service.execute @@ -56,7 +52,7 @@ describe RepositoryArchiveCleanUpService, services: true do it 'keeps old files inside invalid directories' do dirname = File.join(path, 'john_doe/sample.git') - files = create_temporary_files(dirname, %w[conf rb tar tar.gz]) + files = create_temporary_files(dirname, %w[conf rb tar tar.gz], 2.hours) service.execute @@ -66,13 +62,9 @@ describe RepositoryArchiveCleanUpService, services: true do end context 'when archives older than 2 hours does not exist' do - before do - allow_any_instance_of(File).to receive(:mtime).and_return(1.hour.ago) - end - it 'keeps files that matches valid archive extensions' do dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip]) + files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip], 1.hour) service.execute @@ -82,7 +74,7 @@ describe RepositoryArchiveCleanUpService, services: true do it 'keeps files that does not matches valid archive extensions' do dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[conf rb]) + files = create_temporary_files(dirname, %w[conf rb], 1.hour) service.execute @@ -92,7 +84,7 @@ describe RepositoryArchiveCleanUpService, services: true do it 'keeps files inside invalid directories' do dirname = File.join(path, 'john_doe/sample.git') - files = create_temporary_files(dirname, %w[conf rb tar tar.gz]) + files = create_temporary_files(dirname, %w[conf rb tar tar.gz], 1.hour) service.execute @@ -101,12 +93,9 @@ describe RepositoryArchiveCleanUpService, services: true do end end - def create_temporary_files(dirname, extensions) + def create_temporary_files(dirname, extensions, mtime) FileUtils.mkdir_p(dirname) - - extensions.flat_map do |extension| - FileUtils.touch(File.join(dirname, "sample.#{extension}")) - end + FileUtils.touch(extensions.map { |ext| File.join(dirname, "sample.#{ext}") }, mtime: Time.now - mtime) end end end -- cgit v1.2.1 From 6130376ad6673facb729b78878f9156a29948a5b Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 20 Jul 2016 09:17:52 -0700 Subject: Bug fixes --- app/assets/stylesheets/pages/commit.scss | 8 ++++++++ app/assets/stylesheets/pages/pipelines.scss | 6 +++++- app/views/projects/ci/builds/_build.html.haml | 10 ++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/pages/commit.scss b/app/assets/stylesheets/pages/commit.scss index 35ab28b3fea..29d3bf8ae6f 100644 --- a/app/assets/stylesheets/pages/commit.scss +++ b/app/assets/stylesheets/pages/commit.scss @@ -66,6 +66,14 @@ margin-left: 8px; } } + + .ci-status-link { + svg { + position: relative; + top: 2px; + margin: 0 3px; + } + } } .commit-box { diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index a404f108dc4..a45c675e307 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -93,7 +93,7 @@ .commit-title { margin-top: 4px; - max-width: 320px; + max-width: 300px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -139,6 +139,10 @@ width: 18px; vertical-align: middle; } + + .light { + width: 3px; + } } .duration, diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 9264289987d..a9fb3c58431 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -14,16 +14,19 @@ %span ##{build.id} - if build.stuck? - = icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.') + .icon-container + = icon('warning', class: 'text-warning has-tooltip', title: 'Build is stuck. Check runners.') - if defined?(retried) && retried - = icon('warning', class: 'text-warning has-tooltip', title: 'Build was retried.') + .icon-container + = icon('warning', class: 'text-warning has-tooltip', title: 'Build was retried.') - if defined?(ref) && ref - if build.ref = link_to build.ref, namespace_project_commits_path(build.project.namespace, build.project, build.ref), class: "monospace branch-name" - else .light none - = custom_icon("icon_commit") + .icon-container + = custom_icon("icon_commit") - if defined?(commit_sha) && commit_sha = link_to build.short_sha, namespace_project_commit_path(build.project.namespace, build.project, build.sha), class: "commit-id monospace" @@ -88,4 +91,3 @@ - elsif build.playable? = link_to play_namespace_project_build_path(build.project.namespace, build.project, build, return_to: request.original_url), method: :post, title: 'Play', class: 'btn btn-build' do = icon('play') - -- cgit v1.2.1 From 23a437f10454125219d5510191d058af7f8afe76 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Wed, 20 Jul 2016 20:43:43 -0700 Subject: Add new fork SVG to fix weird styling of other SVGs --- app/views/shared/icons/_icon_fork.svg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/shared/icons/_icon_fork.svg b/app/views/shared/icons/_icon_fork.svg index 420ffe3a55b..a21f8f3a951 100644 --- a/app/views/shared/icons/_icon_fork.svg +++ b/app/views/shared/icons/_icon_fork.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + -- cgit v1.2.1 From 76a27d7c5803f031a8fe541238ee25f6776aeeab Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 21 Jul 2016 06:51:12 -0700 Subject: Fix icons on commits page and builds page --- app/assets/stylesheets/pages/builds.scss | 8 ++++++++ app/views/projects/commits/_commit.html.haml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/builds.scss b/app/assets/stylesheets/pages/builds.scss index 99a2cd306cf..e26f8f7080d 100644 --- a/app/assets/stylesheets/pages/builds.scss +++ b/app/assets/stylesheets/pages/builds.scss @@ -53,6 +53,14 @@ left: 70px; } } + + .nav-links { + svg { + position: relative; + top: 2px; + margin-right: 3px; + } + } } .build-header { diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index ab9afb06afb..04cf2965454 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -25,7 +25,7 @@ .commit-actions.hidden-xs - if commit.status - = render_commit_status(commit, cssclass: 'btn btn-transparent') + = render_commit_status(commit) = clipboard_button(clipboard_text: commit.id) = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-short-id btn btn-transparent" = link_to_browse_code(project, commit) -- cgit v1.2.1 From 0b36dcb8b043e987eca4f5efc75fb00c161d1a2b Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 21 Jul 2016 07:28:41 -0700 Subject: Fix firefox rendering of SVGs --- app/assets/stylesheets/pages/merge_requests.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index 4e806e60e7e..db295935b00 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -64,6 +64,7 @@ margin-right: 4px; position: relative; top: 1px; + overflow: visible; } &.ci-success { -- cgit v1.2.1 From 92ee8c5e6489a91d672f51a8807d755e52db4c05 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Wed, 20 Jul 2016 20:57:34 -0300 Subject: Use Dir.mktmpdir instead of FileUtils.mkdir_p in the spec --- .../repository_archive_clean_up_service_spec.rb | 104 +++++++++++---------- 1 file changed, 56 insertions(+), 48 deletions(-) diff --git a/spec/services/repository_archive_clean_up_service_spec.rb b/spec/services/repository_archive_clean_up_service_spec.rb index 6173d6cb51c..0a3c262df32 100644 --- a/spec/services/repository_archive_clean_up_service_spec.rb +++ b/spec/services/repository_archive_clean_up_service_spec.rb @@ -2,16 +2,13 @@ require 'spec_helper' describe RepositoryArchiveCleanUpService, services: true do describe '#execute' do - let(:path) { File.join(Rails.root, 'tmp/tests/shared/cache/archive') } - subject(:service) { described_class.new } - before do - allow(Gitlab.config.gitlab).to receive(:repository_downloads_path).and_return(path) - end - context 'when the downloads directory does not exist' do it 'does not remove any archives' do + path = '/invalid/path/' + stub_repository_downloads_path(path) + expect(File).to receive(:directory?).with(path).and_return(false) expect(service).not_to receive(:clean_up_old_archives) expect(service).not_to receive(:clean_up_empty_directories) @@ -21,82 +18,93 @@ describe RepositoryArchiveCleanUpService, services: true do end context 'when the downloads directory exists' do - before do - FileUtils.mkdir_p(path) - end - - after do - FileUtils.rm_rf(path) - end - context 'when archives older than 2 hours exists' do it 'removes old files that matches valid archive extensions' do - dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip], 2.hours) + Dir.mktmpdir do |path| + stub_repository_downloads_path(path) + dirname = File.join(path, 'sample.git') + files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip], 2.hours) - service.execute + service.execute - files.each { |file| expect(File.exist?(file)).to eq false } - expect(File.directory?(dirname)).to eq false + files.each { |file| expect(File.exist?(file)).to eq false } + expect(File.directory?(dirname)).to eq false + end end it 'keeps old files that does not matches valid archive extensions' do - dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[conf rb], 2.hours) + Dir.mktmpdir do |path| + stub_repository_downloads_path(path) + dirname = File.join(path, 'sample.git') + files = create_temporary_files(dirname, %w[conf rb], 2.hours) - service.execute + service.execute - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end end it 'keeps old files inside invalid directories' do - dirname = File.join(path, 'john_doe/sample.git') - files = create_temporary_files(dirname, %w[conf rb tar tar.gz], 2.hours) + Dir.mktmpdir do |path| + stub_repository_downloads_path(path) + dirname = File.join(path, 'john_doe/sample.git') + files = create_temporary_files(dirname, %w[conf rb tar tar.gz], 2.hours) - service.execute + service.execute - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end end end context 'when archives older than 2 hours does not exist' do it 'keeps files that matches valid archive extensions' do - dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip], 1.hour) + Dir.mktmpdir do |path| + dirname = File.join(path, 'sample.git') + files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip], 1.hour) - service.execute + service.execute - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end end it 'keeps files that does not matches valid archive extensions' do - dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[conf rb], 1.hour) + Dir.mktmpdir do |path| + dirname = File.join(path, 'sample.git') + files = create_temporary_files(dirname, %w[conf rb], 1.hour) - service.execute + service.execute - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end end it 'keeps files inside invalid directories' do - dirname = File.join(path, 'john_doe/sample.git') - files = create_temporary_files(dirname, %w[conf rb tar tar.gz], 1.hour) + Dir.mktmpdir do |path| + dirname = File.join(path, 'john_doe/sample.git') + files = create_temporary_files(dirname, %w[conf rb tar tar.gz], 1.hour) - service.execute + service.execute - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true + files.each { |file| expect(File.exist?(file)).to eq true } + expect(File.directory?(dirname)).to eq true + end end end + end - def create_temporary_files(dirname, extensions, mtime) - FileUtils.mkdir_p(dirname) - FileUtils.touch(extensions.map { |ext| File.join(dirname, "sample.#{ext}") }, mtime: Time.now - mtime) - end + def create_temporary_files(dirname, extensions, mtime) + FileUtils.mkdir_p(dirname) + FileUtils.touch(extensions.map { |ext| File.join(dirname, "sample.#{ext}") }, mtime: Time.now - mtime) + end + + def stub_repository_downloads_path(path) + allow(Gitlab.config.gitlab).to receive(:repository_downloads_path).and_return(path) end end end -- cgit v1.2.1 From 2053d89172b5edfa56c7f4e0451fcff74a5e26b5 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Thu, 21 Jul 2016 11:42:44 -0300 Subject: Extract helper methods to clean up RepositoryArchiveCleanUpService spec --- .../repository_archive_clean_up_service_spec.rb | 103 ++++++++------------- 1 file changed, 37 insertions(+), 66 deletions(-) diff --git a/spec/services/repository_archive_clean_up_service_spec.rb b/spec/services/repository_archive_clean_up_service_spec.rb index 0a3c262df32..842585f9e54 100644 --- a/spec/services/repository_archive_clean_up_service_spec.rb +++ b/spec/services/repository_archive_clean_up_service_spec.rb @@ -18,93 +18,64 @@ describe RepositoryArchiveCleanUpService, services: true do end context 'when the downloads directory exists' do - context 'when archives older than 2 hours exists' do - it 'removes old files that matches valid archive extensions' do - Dir.mktmpdir do |path| - stub_repository_downloads_path(path) - dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip], 2.hours) - - service.execute - - files.each { |file| expect(File.exist?(file)).to eq false } - expect(File.directory?(dirname)).to eq false - end - end - - it 'keeps old files that does not matches valid archive extensions' do - Dir.mktmpdir do |path| - stub_repository_downloads_path(path) - dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[conf rb], 2.hours) - - service.execute - - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true - end - end - - it 'keeps old files inside invalid directories' do - Dir.mktmpdir do |path| - stub_repository_downloads_path(path) - dirname = File.join(path, 'john_doe/sample.git') - files = create_temporary_files(dirname, %w[conf rb tar tar.gz], 2.hours) - + shared_examples 'invalid archive files' do |dirname, extensions, mtime| + it 'does not remove files and directoy' do + in_directory_with_files(dirname, extensions, mtime) do |dir, files| service.execute files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true + expect(File.directory?(dir)).to eq true end end end - context 'when archives older than 2 hours does not exist' do - it 'keeps files that matches valid archive extensions' do - Dir.mktmpdir do |path| - dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[tar tar.bz2 tar.gz zip], 1.hour) + it 'removes files older than 2 hours that matches valid archive extensions' do + in_directory_with_files('sample.git', %w[tar tar.bz2 tar.gz zip], 2.hours) do |dir, files| + service.execute - service.execute - - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true - end + files.each { |file| expect(File.exist?(file)).to eq false } + expect(File.directory?(dir)).to eq false end + end - it 'keeps files that does not matches valid archive extensions' do - Dir.mktmpdir do |path| - dirname = File.join(path, 'sample.git') - files = create_temporary_files(dirname, %w[conf rb], 1.hour) - - service.execute + context 'with files older than 2 hours that does not matches valid archive extensions' do + it_behaves_like 'invalid archive files', 'sample.git', %w[conf rb], 2.hours + end - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true - end - end + context 'with files older than 2 hours inside invalid directories' do + it_behaves_like 'invalid archive files', 'john_doe/sample.git', %w[conf rb tar tar.gz], 2.hours + end - it 'keeps files inside invalid directories' do - Dir.mktmpdir do |path| - dirname = File.join(path, 'john_doe/sample.git') - files = create_temporary_files(dirname, %w[conf rb tar tar.gz], 1.hour) + context 'with files newer than 2 hours that matches valid archive extensions' do + it_behaves_like 'invalid archive files', 'sample.git', %w[tar tar.bz2 tar.gz zip], 1.hour + end - service.execute + context 'with files newer than 2 hours that does not matches valid archive extensions' do + it_behaves_like 'invalid archive files', 'sample.git', %w[conf rb], 1.hour + end - files.each { |file| expect(File.exist?(file)).to eq true } - expect(File.directory?(dirname)).to eq true - end - end + context 'with files newer than 2 hours inside invalid directories' do + it_behaves_like 'invalid archive files', 'sample.git', %w[conf rb tar tar.gz], 1.hour end end - def create_temporary_files(dirname, extensions, mtime) - FileUtils.mkdir_p(dirname) - FileUtils.touch(extensions.map { |ext| File.join(dirname, "sample.#{ext}") }, mtime: Time.now - mtime) + def in_directory_with_files(dirname, extensions, mtime) + Dir.mktmpdir do |tmpdir| + stub_repository_downloads_path(tmpdir) + dir = File.join(tmpdir, dirname) + files = create_temporary_files(dir, extensions, mtime) + + yield(dir, files) + end end def stub_repository_downloads_path(path) allow(Gitlab.config.gitlab).to receive(:repository_downloads_path).and_return(path) end + + def create_temporary_files(dir, extensions, mtime) + FileUtils.mkdir_p(dir) + FileUtils.touch(extensions.map { |ext| File.join(dir, "sample.#{ext}") }, mtime: Time.now - mtime) + end end end -- cgit v1.2.1 From 3b2c17a9a203aa8e82a3367a77d28eacaa5a0ab7 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Thu, 21 Jul 2016 11:48:07 -0300 Subject: Update CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 017cf92160f..8fd65f76ccb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,6 +21,7 @@ v 8.10.0 (unreleased) - Delete award emoji when deleting a user - Remove pinTo from Flash and make inline flash messages look nicer. !4854 (winniehell) - Add an API for downloading latest successful build from a particular branch or tag. !5347 + - Avoid data-integrity issue when cleaning up repository archive cache. - Add link to profile to commit avatar. !5163 (winniehell) - Wrap code blocks on Activies and Todos page. !4783 (winniehell) - Align flash messages with left side of page content. !4959 (winniehell) -- cgit v1.2.1 From 6b5708e073cfb8003b82dc3b6c16fa479973ae87 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 21 Jul 2016 07:37:31 -0700 Subject: Fix ci icons getting cut off --- app/assets/stylesheets/pages/commit.scss | 10 ++++------ app/assets/stylesheets/pages/pipelines.scss | 1 + app/assets/stylesheets/pages/status.scss | 1 + app/helpers/ci_status_helper.rb | 4 ++-- app/views/projects/commits/_commit.html.haml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/pages/commit.scss b/app/assets/stylesheets/pages/commit.scss index 29d3bf8ae6f..bbe0c6c5f1f 100644 --- a/app/assets/stylesheets/pages/commit.scss +++ b/app/assets/stylesheets/pages/commit.scss @@ -66,13 +66,11 @@ margin-left: 8px; } } +} - .ci-status-link { - svg { - position: relative; - top: 2px; - margin: 0 3px; - } +.ci-status-link { + svg { + overflow: visible; } } diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index a45c675e307..081bd7204fe 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -138,6 +138,7 @@ height: 18px; width: 18px; vertical-align: middle; + overflow: visible; } .light { diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index 99f64b5e4cc..210ace357c0 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -49,6 +49,7 @@ position: relative; top: 1px; margin: 0 3px; + overflow: visible; } } diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index ffac28f78a0..ea2f5f9281a 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -45,10 +45,10 @@ module CiStatusHelper custom_icon(icon_name) end - def render_commit_status(commit, tooltip_placement: 'auto left', cssclass: '') + def render_commit_status(commit, tooltip_placement: 'auto left') project = commit.project path = builds_namespace_project_commit_path(project.namespace, project, commit) - render_status_with_link('commit', commit.status, path, tooltip_placement, cssclass: cssclass) + render_status_with_link('commit', commit.status, path, tooltip_placement) end def render_pipeline_status(pipeline, tooltip_placement: 'auto left') diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 04cf2965454..b195822d184 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -19,7 +19,7 @@ · = commit.short_id - if commit.status - = render_commit_status(commit, cssclass: 'visible-xs-inline') + = render_commit_status(commit) - if commit.description? %a.text-expander.hidden-xs.js-toggle-button ... -- cgit v1.2.1 From 420f117df98faef0ff06ea7eceabe46994518559 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 21 Jul 2016 08:31:05 -0700 Subject: Mobile view for commit status --- app/assets/stylesheets/pages/status.scss | 8 ++++++++ app/views/projects/commits/_commit.html.haml | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index 210ace357c0..587f2d9f3c1 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -75,3 +75,11 @@ color: $gl-gray; } } + +.visible-xs-inline { + .ci-status-link { + position: relative; + top: 2px; + left: 5px; + } +} diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index b195822d184..fd888f41b1e 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -19,7 +19,8 @@ · = commit.short_id - if commit.status - = render_commit_status(commit) + .visible-xs-inline + = render_commit_status(commit) - if commit.description? %a.text-expander.hidden-xs.js-toggle-button ... -- cgit v1.2.1 From b7c5cf9edb0b58d885be7783dd5f6ada756ccacd Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 21 Jul 2016 17:43:43 +0200 Subject: Don't drop in DropAndReaddHasExternalWikiInProjects Dropping a column and then re-adding it can lead to the application throwing errors as the column may temporarily not exist. To work around this we'll reset the various project rows in batches _without_ removing any columns. --- .../20160721081015_drop_and_readd_has_external_wiki_in_projects.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb index 459a120155d..1eb99feb40c 100644 --- a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb +++ b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb @@ -5,8 +5,9 @@ class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration DOWNTIME = false def up - remove_column :projects, :has_external_wiki, :boolean - add_column :projects, :has_external_wiki, :boolean + update_column_in_batches(:projects, :has_external_wiki, nil) do |table, query| + query.where(table[:has_external_wiki].not_eq(nil)) + end end def down -- cgit v1.2.1 From a6780a77df17214093166d43799443d4a15ff6ae Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 21 Jul 2016 08:38:19 -0700 Subject: Fix sha icon positioning on safari --- app/assets/stylesheets/pages/pipelines.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 081bd7204fe..843f04ab1f6 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -76,7 +76,7 @@ svg { height: 14px; - width: auto; + width: 14px; vertical-align: middle; fill: $table-text-gray; } @@ -158,7 +158,7 @@ svg { width: 12px; - height: auto; + height: 12px; vertical-align: middle; margin-right: 4px; } -- cgit v1.2.1 From b2a4b6defefb081e97c7c57123b9e64b209bdd20 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 21 Jul 2016 10:00:45 -0700 Subject: Bump vmstat version to fix issues reporting on FreeBSD --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index ead64a6d4df..92e666c1bb7 100644 --- a/Gemfile +++ b/Gemfile @@ -347,5 +347,5 @@ gem 'paranoia', '~> 2.0' gem 'health_check', '~> 2.1.0' # System information -gem 'vmstat', '~> 2.1.0' +gem 'vmstat', '~> 2.1.1' gem 'sys-filesystem', '~> 1.1.6' diff --git a/Gemfile.lock b/Gemfile.lock index 8739f8579d5..e2b3d55ee0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -775,7 +775,7 @@ GEM coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) - vmstat (2.1.0) + vmstat (2.1.1) warden (1.2.6) rack (>= 1.0) web-console (2.3.0) @@ -980,7 +980,7 @@ DEPENDENCIES unicorn-worker-killer (~> 0.4.2) version_sorter (~> 2.0.0) virtus (~> 1.0.1) - vmstat (~> 2.1.0) + vmstat (~> 2.1.1) web-console (~> 2.0) webmock (~> 1.21.0) wikicloth (= 0.8.1) -- cgit v1.2.1 From 4e321b01c6d2e26dae52573092764dec9faf2060 Mon Sep 17 00:00:00 2001 From: Mark Pundsack Date: Thu, 21 Jul 2016 11:33:07 -0700 Subject: Explain CI_PROJECT_NAMESPACE better --- doc/ci/variables/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index 4bf610f0e9a..4a7c21f811d 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -38,7 +38,7 @@ The `API_TOKEN` will take the Secure Variable value: `SECURE`. | **CI_PIPELINE_ID** | 8.10 | 0.5 | The unique id of the current pipeline that GitLab CI uses internally | | **CI_PROJECT_ID** | all | all | The unique id of the current project that GitLab CI uses internally | | **CI_PROJECT_NAME** | 8.10 | 0.5 | The project name that is currently being built | -| **CI_PROJECT_NAMESPACE**| 8.10 | 0.5 | The project namespace that is currently being built | +| **CI_PROJECT_NAMESPACE**| 8.10 | 0.5 | The project namespace (username or groupname) that is currently being built | | **CI_PROJECT_PATH** | 8.10 | 0.5 | The namespace with project name | | **CI_PROJECT_URL** | 8.10 | 0.5 | The HTTP address to access project | | **CI_PROJECT_DIR** | all | all | The full path where the repository is cloned and where the build is run | -- cgit v1.2.1 From 0c14c6332d38704a7bfd8916a8deedd5c5808978 Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Thu, 21 Jul 2016 19:15:31 +0200 Subject: Retrieve rendered HTML from cache in one request See #19985 --- CHANGELOG | 1 + lib/banzai/reference_extractor.rb | 9 +++++---- spec/models/note_spec.rb | 40 +++++++++++++++++++++++---------------- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 017cf92160f..8fe2caac7bd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check + - Retrieve rendered HTML from cache in one request v 8.10.0 (unreleased) - Fix profile activity heatmap to show correct day name (eanplatter) diff --git a/lib/banzai/reference_extractor.rb b/lib/banzai/reference_extractor.rb index bf366962aef..b26a41a1f3b 100644 --- a/lib/banzai/reference_extractor.rb +++ b/lib/banzai/reference_extractor.rb @@ -2,11 +2,11 @@ module Banzai # Extract possible GFM references from an arbitrary String for further processing. class ReferenceExtractor def initialize - @texts = [] + @texts_and_contexts = [] end def analyze(text, context = {}) - @texts << Renderer.render(text, context) + @texts_and_contexts << { text: text, context: context } end def references(type, project, current_user = nil) @@ -21,9 +21,10 @@ module Banzai def html_documents # This ensures that we don't memoize anything until we have a number of # text blobs to parse. - return [] if @texts.empty? + return [] if @texts_and_contexts.empty? - @html_documents ||= @texts.map { |html| Nokogiri::HTML.fragment(html) } + @html_documents ||= Renderer.cache_collection_render(@texts_and_contexts) + .map { |html| Nokogiri::HTML.fragment(html) } end end end diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 7d0697dab42..1243f5420a7 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -135,22 +135,30 @@ describe Note, models: true do let!(:note2) { create(:note_on_issue) } it "reads the rendered note body from the cache" do - expect(Banzai::Renderer).to receive(:render). - with(note1.note, - pipeline: :note, - cache_key: [note1, "note"], - project: note1.project, - author: note1.author) - - expect(Banzai::Renderer).to receive(:render). - with(note2.note, - pipeline: :note, - cache_key: [note2, "note"], - project: note2.project, - author: note2.author) - - note1.all_references - note2.all_references + expect(Banzai::Renderer).to receive(:cache_collection_render). + with([{ + text: note1.note, + context: { + pipeline: :note, + cache_key: [note1, "note"], + project: note1.project, + author: note1.author + } + }]).and_call_original + + expect(Banzai::Renderer).to receive(:cache_collection_render). + with([{ + text: note2.note, + context: { + pipeline: :note, + cache_key: [note2, "note"], + project: note2.project, + author: note2.author + } + }]).and_call_original + + note1.all_references.users + note2.all_references.users end end -- cgit v1.2.1 From 25ce5e7e707ddaf08e134c56419d95065b9479e8 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 21 Jul 2016 12:42:23 -0700 Subject: Reduce min width of pipeline table --- app/assets/stylesheets/pages/pipelines.scss | 9 +++++++++ app/views/projects/commit/_pipeline.html.haml | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 843f04ab1f6..c58e2ffe7f5 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -29,9 +29,18 @@ } } +.pipeline-holder { + width: 100%; + overflow: auto; +} + .table.builds { min-width: 1200px; + &.pipeline { + min-width: 650px; + } + tr { th { padding: 16px 8px; diff --git a/app/views/projects/commit/_pipeline.html.haml b/app/views/projects/commit/_pipeline.html.haml index 41fd5459429..540689f4a61 100644 --- a/app/views/projects/commit/_pipeline.html.haml +++ b/app/views/projects/commit/_pipeline.html.haml @@ -35,8 +35,8 @@ .bs-callout.bs-callout-warning \.gitlab-ci.yml not found in this commit -.table-holder - %table.table.builds +.table-holder.pipeline-holder + %table.table.builds.pipeline %thead %tr %th Status -- cgit v1.2.1 From 04ad02bc9f1c06b4f87ae105be74e8b47072ee02 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Date: Thu, 21 Jul 2016 14:12:08 -0700 Subject: Change nav link snippet controller --- app/views/layouts/nav/_dashboard.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index 21668698814..3a14751ea8e 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -30,7 +30,7 @@ %span Merge Requests %span.count= number_with_delimiter(current_user.assigned_merge_requests.opened.count) - = nav_link(controller: :snippets) do + = nav_link(controller: 'dashboard/snippets') do = link_to dashboard_snippets_path, title: 'Snippets' do %span Snippets -- cgit v1.2.1 From 04fff5cd8f4322ddc7729715dcc8098fb5211b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Thu, 21 Jul 2016 17:48:57 -0400 Subject: Update documentation according to the new multiple git mount points feature --- doc/administration/repository_storages.md | 3 ++- doc/raketasks/cleanup.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/administration/repository_storages.md b/doc/administration/repository_storages.md index 81bfe173151..fd2b4f00960 100644 --- a/doc/administration/repository_storages.md +++ b/doc/administration/repository_storages.md @@ -1,7 +1,8 @@ # Repository storages GitLab allows you to define repository storage paths to enable distribution of -storage load between several mount points. +storage load between several mount points. You can choose where new projects are +stored via the `Application Settings` in the Admin interface. ## For installations from source diff --git a/doc/raketasks/cleanup.md b/doc/raketasks/cleanup.md index 8fbcbb983e9..cf891cd90ad 100644 --- a/doc/raketasks/cleanup.md +++ b/doc/raketasks/cleanup.md @@ -2,7 +2,7 @@ ## Remove garbage from filesystem. Important! Data loss! -Remove namespaces(dirs) from `/home/git/repositories` if they don't exist in GitLab database. +Remove namespaces(dirs) from all repository storage paths if they don't exist in GitLab database. ``` # omnibus-gitlab @@ -12,7 +12,7 @@ sudo gitlab-rake gitlab:cleanup:dirs bundle exec rake gitlab:cleanup:dirs RAILS_ENV=production ``` -Rename repositories from `/home/git/repositories` if they don't exist in GitLab database. +Rename repositories from all repository storage paths if they don't exist in GitLab database. The repositories get a `+orphaned+TIMESTAMP` suffix so that they cannot block new repositories from being created. ``` -- cgit v1.2.1 From 065a65adfe3508581664358779821b802476ee0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Thu, 21 Jul 2016 16:49:43 -0400 Subject: Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects --- CHANGELOG | 1 + Gemfile | 2 +- Gemfile.lock | 4 ++-- app/models/repository.rb | 25 ++++++++++++++----------- app/services/delete_branch_service.rb | 2 +- app/services/delete_tag_service.rb | 2 +- app/services/git_tag_push_service.rb | 4 ++-- app/views/projects/branches/_commit.html.haml | 2 +- spec/models/repository_spec.rb | 26 ++++++-------------------- 9 files changed, 29 insertions(+), 39 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 938e3a496a6..bc09a51cc1e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -82,6 +82,7 @@ v 8.10.0 (unreleased) - API: Todos. !3188 (Robert Schilling) - API: Expose shared groups for projects and shared projects for groups. !5050 (Robert Schilling) - API: Expose `developers_can_push` and `developers_can_merge` for branches. !5208 (Robert Schilling) + - Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects - Add "Enabled Git access protocols" to Application Settings - Diffs will create button/diff form on demand no on server side - Reduce size of HTML used by diff comment forms diff --git a/Gemfile b/Gemfile index 92e666c1bb7..0504e643ed7 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem 'gitlab_git', '~> 10.3.2' +gem 'gitlab_git', '~> 10.4.1' # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index e2b3d55ee0c..195516d1bf1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -274,7 +274,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.3.2) + gitlab_git (10.4.1) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) @@ -861,7 +861,7 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.4) gitlab-flowdock-git-hook (~> 1.0.1) - gitlab_git (~> 10.3.2) + gitlab_git (~> 10.4.1) gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.2) diff --git a/app/models/repository.rb b/app/models/repository.rb index a6580e85498..46a04eb80cd 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -70,7 +70,12 @@ class Repository def commit(ref = 'HEAD') return nil unless exists? - commit = Gitlab::Git::Commit.find(raw_repository, ref) + commit = + if ref.is_a?(Gitlab::Git::Commit) + ref + else + Gitlab::Git::Commit.find(raw_repository, ref) + end commit = ::Commit.new(commit, @project) if commit commit rescue Rugged::OdbError @@ -247,10 +252,10 @@ class Repository # Rugged seems to throw a `ReferenceError` when given branch_names rather # than SHA-1 hashes number_commits_behind = raw_repository. - count_commits_between(branch.target, root_ref_hash) + count_commits_between(branch.target.sha, root_ref_hash) number_commits_ahead = raw_repository. - count_commits_between(root_ref_hash, branch.target) + count_commits_between(root_ref_hash, branch.target.sha) { behind: number_commits_behind, ahead: number_commits_ahead } end @@ -674,9 +679,7 @@ class Repository end def local_branches - @local_branches ||= rugged.branches.each(:local).map do |branch| - Gitlab::Git::Branch.new(branch.name, branch.target) - end + @local_branches ||= raw_repository.local_branches end alias_method :branches, :local_branches @@ -817,7 +820,7 @@ class Repository end def revert(user, commit, base_branch, revert_tree_id = nil) - source_sha = find_branch(base_branch).target + source_sha = find_branch(base_branch).target.sha revert_tree_id ||= check_revert_content(commit, base_branch) return false unless revert_tree_id @@ -834,7 +837,7 @@ class Repository end def cherry_pick(user, commit, base_branch, cherry_pick_tree_id = nil) - source_sha = find_branch(base_branch).target + source_sha = find_branch(base_branch).target.sha cherry_pick_tree_id ||= check_cherry_pick_content(commit, base_branch) return false unless cherry_pick_tree_id @@ -855,7 +858,7 @@ class Repository end def check_revert_content(commit, base_branch) - source_sha = find_branch(base_branch).target + source_sha = find_branch(base_branch).target.sha args = [commit.id, source_sha] args << { mainline: 1 } if commit.merge_commit? @@ -869,7 +872,7 @@ class Repository end def check_cherry_pick_content(commit, base_branch) - source_sha = find_branch(base_branch).target + source_sha = find_branch(base_branch).target.sha args = [commit.id, source_sha] args << 1 if commit.merge_commit? @@ -1034,7 +1037,7 @@ class Repository end def tags_sorted_by_committed_date - tags.sort_by { |tag| commit(tag.target).committed_date } + tags.sort_by { |tag| tag.target.committed_date } end def keep_around_ref_name(sha) diff --git a/app/services/delete_branch_service.rb b/app/services/delete_branch_service.rb index 332c55581a1..87f066edb6f 100644 --- a/app/services/delete_branch_service.rb +++ b/app/services/delete_branch_service.rb @@ -40,6 +40,6 @@ class DeleteBranchService < BaseService def build_push_data(branch) Gitlab::PushDataBuilder - .build(project, current_user, branch.target, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch.name}", []) + .build(project, current_user, branch.target.sha, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch.name}", []) end end diff --git a/app/services/delete_tag_service.rb b/app/services/delete_tag_service.rb index 1e41fbe34b6..32e0eed6b63 100644 --- a/app/services/delete_tag_service.rb +++ b/app/services/delete_tag_service.rb @@ -34,6 +34,6 @@ class DeleteTagService < BaseService def build_push_data(tag) Gitlab::PushDataBuilder - .build(project, current_user, tag.target, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::TAG_REF_PREFIX}#{tag.name}", []) + .build(project, current_user, tag.target.sha, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::TAG_REF_PREFIX}#{tag.name}", []) end end diff --git a/app/services/git_tag_push_service.rb b/app/services/git_tag_push_service.rb index 58573078048..969530c4fdc 100644 --- a/app/services/git_tag_push_service.rb +++ b/app/services/git_tag_push_service.rb @@ -26,8 +26,8 @@ class GitTagPushService < BaseService unless Gitlab::Git.blank_ref?(params[:newrev]) tag_name = Gitlab::Git.ref_name(params[:ref]) tag = project.repository.find_tag(tag_name) - - if tag && tag.target == params[:newrev] + + if tag && tag.object_sha == params[:newrev] commit = project.commit(tag.target) commits = [commit].compact message = tag.message diff --git a/app/views/projects/branches/_commit.html.haml b/app/views/projects/branches/_commit.html.haml index 9fe65cbb104..d54c76ff9c8 100644 --- a/app/views/projects/branches/_commit.html.haml +++ b/app/views/projects/branches/_commit.html.haml @@ -1,5 +1,5 @@ .branch-commit - = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-id monospace" + = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-id monospace" · %span.str-truncated = link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message" diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 38b0c345b48..3e133143bbc 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -50,8 +50,9 @@ describe Repository, models: true do double_first = double(committed_date: Time.now) double_last = double(committed_date: Time.now - 1.second) - allow(repository).to receive(:commit).with(tag_a.target).and_return(double_first) - allow(repository).to receive(:commit).with(tag_b.target).and_return(double_last) + allow(tag_a).to receive(:target).and_return(double_first) + allow(tag_b).to receive(:target).and_return(double_last) + allow(repository).to receive(:tags).and_return([tag_a, tag_b]) end it { is_expected.to eq(['v1.0.0', 'v1.1.0']) } @@ -64,8 +65,9 @@ describe Repository, models: true do double_first = double(committed_date: Time.now - 1.second) double_last = double(committed_date: Time.now) - allow(repository).to receive(:commit).with(tag_a.target).and_return(double_last) - allow(repository).to receive(:commit).with(tag_b.target).and_return(double_first) + allow(tag_a).to receive(:target).and_return(double_last) + allow(tag_b).to receive(:target).and_return(double_first) + allow(repository).to receive(:tags).and_return([tag_a, tag_b]) end it { is_expected.to eq(['v1.1.0', 'v1.0.0']) } @@ -1161,17 +1163,6 @@ describe Repository, models: true do end end - describe '#local_branches' do - it 'returns the local branches' do - masterrev = repository.find_branch('master').target - create_remote_branch('joe', 'remote_branch', masterrev) - repository.add_branch(user, 'local_branch', masterrev) - - expect(repository.local_branches.any? { |branch| branch.name == 'remote_branch' }).to eq(false) - expect(repository.local_branches.any? { |branch| branch.name == 'local_branch' }).to eq(true) - end - end - describe "#keep_around" do it "stores a reference to the specified commit sha so it isn't garbage collected" do repository.keep_around(sample_commit.id) @@ -1179,9 +1170,4 @@ describe Repository, models: true do expect(repository.kept_around?(sample_commit.id)).to be_truthy end end - - def create_remote_branch(remote_name, branch_name, target) - rugged = repository.rugged - rugged.references.create("refs/remotes/#{remote_name}/#{branch_name}", target) - end end -- cgit v1.2.1 From 72f59ddf4c9d276bd565892c0cf79d5622906090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Mon, 11 Jul 2016 21:29:13 -0400 Subject: Use Pathname to make the repository storage path validations more robust --- config/initializers/6_validations.rb | 11 ++++++----- spec/initializers/6_validations_spec.rb | 26 +++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/config/initializers/6_validations.rb b/config/initializers/6_validations.rb index 3ba9e36c567..83acdc8ab54 100644 --- a/config/initializers/6_validations.rb +++ b/config/initializers/6_validations.rb @@ -3,22 +3,23 @@ def storage_name_valid?(name) end def find_parent_path(name, path) + parent = Pathname.new(path).realpath.parent Gitlab.config.repositories.storages.detect do |n, p| - name != n && path.chomp('/').start_with?(p.chomp('/')) + name != n && Pathname.new(p).realpath == parent end end -def error(message) +def storage_validation_error(message) raise "#{message}. Please fix this in your gitlab.yml before starting GitLab." end -error('No repository storage path defined') if Gitlab.config.repositories.storages.empty? +storage_validation_error('No repository storage path defined') if Gitlab.config.repositories.storages.empty? Gitlab.config.repositories.storages.each do |name, path| - error("\"#{name}\" is not a valid storage name") unless storage_name_valid?(name) + storage_validation_error("\"#{name}\" is not a valid storage name") unless storage_name_valid?(name) parent_name, _parent_path = find_parent_path(name, path) if parent_name - error("#{name} is a nested path of #{parent_name}. Nested paths are not supported for repository storages") + storage_validation_error("#{name} is a nested path of #{parent_name}. Nested paths are not supported for repository storages") end end diff --git a/spec/initializers/6_validations_spec.rb b/spec/initializers/6_validations_spec.rb index 5178bd130f4..05d0aa63488 100644 --- a/spec/initializers/6_validations_spec.rb +++ b/spec/initializers/6_validations_spec.rb @@ -1,9 +1,19 @@ require 'spec_helper' describe '6_validations', lib: true do + before :all do + FileUtils.mkdir_p('tmp/tests/paths/a/b/c/d') + FileUtils.mkdir_p('tmp/tests/paths/a/b/c2') + FileUtils.mkdir_p('tmp/tests/paths/a/b/d') + end + + after :all do + FileUtils.rm_rf('tmp/tests/paths') + end + context 'with correct settings' do before do - mock_storages('foo' => '/a/b/c', 'bar' => 'a/b/d') + mock_storages('foo' => 'tmp/tests/paths/a/b/c', 'bar' => 'tmp/tests/paths/a/b/d') end it 'passes through' do @@ -13,7 +23,7 @@ describe '6_validations', lib: true do context 'with invalid storage names' do before do - mock_storages('name with spaces' => '/a/b/c') + mock_storages('name with spaces' => 'tmp/tests/paths/a/b/c') end it 'throws an error' do @@ -23,7 +33,7 @@ describe '6_validations', lib: true do context 'with nested storage paths' do before do - mock_storages('foo' => '/a/b/c', 'bar' => '/a/b/c/d') + mock_storages('foo' => 'tmp/tests/paths/a/b/c', 'bar' => 'tmp/tests/paths/a/b/c/d') end it 'throws an error' do @@ -31,6 +41,16 @@ describe '6_validations', lib: true do end end + context 'with similar but un-nested storage paths' do + before do + mock_storages('foo' => 'tmp/tests/paths/a/b/c', 'bar' => 'tmp/tests/paths/a/b/c2') + end + + it 'passes through' do + expect { load_validations }.not_to raise_error + end + end + def mock_storages(storages) allow(Gitlab.config.repositories).to receive(:storages).and_return(storages) end -- cgit v1.2.1 From 89589007aee6780c3dea2d44df12e9509a22f975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Mon, 18 Jul 2016 17:28:26 -0400 Subject: Skip repository storage path valitaions on test environment Storage path are not created until `TestEnv.init`, so we must skip their validation on initialization. --- config/initializers/6_validations.rb | 16 ++++++++++------ spec/initializers/6_validations_spec.rb | 13 +++++-------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/config/initializers/6_validations.rb b/config/initializers/6_validations.rb index 83acdc8ab54..37746968675 100644 --- a/config/initializers/6_validations.rb +++ b/config/initializers/6_validations.rb @@ -13,13 +13,17 @@ def storage_validation_error(message) raise "#{message}. Please fix this in your gitlab.yml before starting GitLab." end -storage_validation_error('No repository storage path defined') if Gitlab.config.repositories.storages.empty? +def validate_storages + storage_validation_error('No repository storage path defined') if Gitlab.config.repositories.storages.empty? -Gitlab.config.repositories.storages.each do |name, path| - storage_validation_error("\"#{name}\" is not a valid storage name") unless storage_name_valid?(name) + Gitlab.config.repositories.storages.each do |name, path| + storage_validation_error("\"#{name}\" is not a valid storage name") unless storage_name_valid?(name) - parent_name, _parent_path = find_parent_path(name, path) - if parent_name - storage_validation_error("#{name} is a nested path of #{parent_name}. Nested paths are not supported for repository storages") + parent_name, _parent_path = find_parent_path(name, path) + if parent_name + storage_validation_error("#{name} is a nested path of #{parent_name}. Nested paths are not supported for repository storages") + end end end + +validate_storages unless Rails.env.test? diff --git a/spec/initializers/6_validations_spec.rb b/spec/initializers/6_validations_spec.rb index 05d0aa63488..baab30f482f 100644 --- a/spec/initializers/6_validations_spec.rb +++ b/spec/initializers/6_validations_spec.rb @@ -1,4 +1,5 @@ require 'spec_helper' +require_relative '../../config/initializers/6_validations.rb' describe '6_validations', lib: true do before :all do @@ -17,7 +18,7 @@ describe '6_validations', lib: true do end it 'passes through' do - expect { load_validations }.not_to raise_error + expect { validate_storages }.not_to raise_error end end @@ -27,7 +28,7 @@ describe '6_validations', lib: true do end it 'throws an error' do - expect { load_validations }.to raise_error('"name with spaces" is not a valid storage name. Please fix this in your gitlab.yml before starting GitLab.') + expect { validate_storages }.to raise_error('"name with spaces" is not a valid storage name. Please fix this in your gitlab.yml before starting GitLab.') end end @@ -37,7 +38,7 @@ describe '6_validations', lib: true do end it 'throws an error' do - expect { load_validations }.to raise_error('bar is a nested path of foo. Nested paths are not supported for repository storages. Please fix this in your gitlab.yml before starting GitLab.') + expect { validate_storages }.to raise_error('bar is a nested path of foo. Nested paths are not supported for repository storages. Please fix this in your gitlab.yml before starting GitLab.') end end @@ -47,15 +48,11 @@ describe '6_validations', lib: true do end it 'passes through' do - expect { load_validations }.not_to raise_error + expect { validate_storages }.not_to raise_error end end def mock_storages(storages) allow(Gitlab.config.repositories).to receive(:storages).and_return(storages) end - - def load_validations - load File.join(__dir__, '../../config/initializers/6_validations.rb') - end end -- cgit v1.2.1 From c3cbee10bd438a2d8ded30f1a11865693a3d3c6a Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Fri, 22 Jul 2016 08:25:59 +0530 Subject: Add a spec for #20079. The issue was fixed in 2ba5e62. The spec is going in separately just so the fix could go in as soon as possible. --- features/project/wiki.feature | 6 ++++++ features/steps/project/wiki.rb | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/features/project/wiki.feature b/features/project/wiki.feature index d4811b1ff54..63ce3ccb536 100644 --- a/features/project/wiki.feature +++ b/features/project/wiki.feature @@ -8,6 +8,12 @@ Feature: Project Wiki Given I create the Wiki Home page Then I should see the newly created wiki page + Scenario: Add new page with errors + Given I create the Wiki Home page with no content + Then I should see a "Content can't be blank" error message + When I create the Wiki Home page + Then I should see the newly created wiki page + Scenario: Pressing Cancel while editing a brand new Wiki Given I click on the Cancel button Then I should be redirected back to the Edit Home Wiki page diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 3cbf832c728..5ad82a9b3c1 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -19,6 +19,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps click_on "Create page" end + step 'I create the Wiki Home page with no content' do + fill_in "wiki_content", with: '' + click_on "Create page" + end + step 'I should see the newly created wiki page' do expect(page).to have_content "Home" expect(page).to have_content "link test" @@ -173,6 +178,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps find('a[href*="?version_id"]') end + step 'I should see a "Content can\'t be blank" error message' do + expect(page).to have_content('The form contains the following error:') + expect(page).to have_content('Content can\'t be blank') + end + def wiki @project_wiki = ProjectWiki.new(project, current_user) end -- cgit v1.2.1 From 1a5b7e7d70cfe4802e858f129779e388307fbbab Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 22 Jul 2016 10:56:25 +0300 Subject: Refactor protected branches documentation --- .../projects/protected_branches/index.html.haml | 13 +-- doc/user/project/img/project_settings_list.png | Bin 0 -> 10788 bytes .../img/protected_branches_choose_branch.png | Bin 0 -> 20659 bytes .../img/protected_branches_devs_can_push.png | Bin 0 -> 23976 bytes .../project/img/protected_branches_error_ui.png | Bin 0 -> 37750 bytes doc/user/project/img/protected_branches_list.png | Bin 0 -> 16817 bytes .../project/img/protected_branches_matches.png | Bin 0 -> 32145 bytes doc/user/project/protected_branches.md | 106 +++++++++++++++++++++ doc/workflow/README.md | 2 +- doc/workflow/protected_branches.md | 56 +---------- .../protected_branches/protected_branches1.png | Bin 195061 -> 0 bytes .../protected_branches/protected_branches2.png | Bin 41179 -> 0 bytes .../protected_branches/protected_branches3.png | Bin 110160 -> 0 bytes 13 files changed, 115 insertions(+), 62 deletions(-) create mode 100644 doc/user/project/img/project_settings_list.png create mode 100644 doc/user/project/img/protected_branches_choose_branch.png create mode 100644 doc/user/project/img/protected_branches_devs_can_push.png create mode 100644 doc/user/project/img/protected_branches_error_ui.png create mode 100644 doc/user/project/img/protected_branches_list.png create mode 100644 doc/user/project/img/protected_branches_matches.png create mode 100644 doc/user/project/protected_branches.md delete mode 100644 doc/workflow/protected_branches/protected_branches1.png delete mode 100644 doc/workflow/protected_branches/protected_branches2.png delete mode 100644 doc/workflow/protected_branches/protected_branches3.png diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml index 151e1d64851..950df740bbc 100644 --- a/app/views/projects/protected_branches/index.html.haml +++ b/app/views/projects/protected_branches/index.html.haml @@ -6,12 +6,13 @@ = page_title %p Keep stable branches secure and force developers to use merge requests. %p.prepend-top-20 - Protected branches are designed to: + By default, protected branches are designed to: %ul - %li prevent pushes from everybody except #{link_to "masters", help_page_path("user/permissions"), class: "vlink"} - %li prevent anyone from force pushing to the branch - %li prevent anyone from deleting the branch - %p.append-bottom-0 Read more about #{link_to "project permissions", help_page_path("user/permissions"), class: "underlined-link"} + %li prevent their creation, if not already created, from everybody except Masters + %li prevent pushes from everybody except Masters + %li prevent anyone from force pushing to the branch + %li prevent anyone from deleting the branch + %p.append-bottom-0 Read more about #{link_to "protected branches", help_page_path("user/project/protected_branches"), class: "underlined-link"} and #{link_to "project permissions", help_page_path("user/permissions"), class: "underlined-link"}. .col-lg-9 %h5.prepend-top-0 Protect a branch @@ -23,7 +24,7 @@ = f.label :name, "Branch", class: "label-light" = render partial: "dropdown", locals: { f: f } %p.help-block - = link_to "Wildcards", help_page_path('workflow/protected_branches', anchor: "wildcard-protected-branches") + = link_to "Wildcards", help_page_path('user/project/protected_branches', anchor: "wildcard-protected-branches") such as %code *-stable or diff --git a/doc/user/project/img/project_settings_list.png b/doc/user/project/img/project_settings_list.png new file mode 100644 index 00000000000..57ca2ac5f9e Binary files /dev/null and b/doc/user/project/img/project_settings_list.png differ diff --git a/doc/user/project/img/protected_branches_choose_branch.png b/doc/user/project/img/protected_branches_choose_branch.png new file mode 100644 index 00000000000..26328143717 Binary files /dev/null and b/doc/user/project/img/protected_branches_choose_branch.png differ diff --git a/doc/user/project/img/protected_branches_devs_can_push.png b/doc/user/project/img/protected_branches_devs_can_push.png new file mode 100644 index 00000000000..9c33db36586 Binary files /dev/null and b/doc/user/project/img/protected_branches_devs_can_push.png differ diff --git a/doc/user/project/img/protected_branches_error_ui.png b/doc/user/project/img/protected_branches_error_ui.png new file mode 100644 index 00000000000..cc61df7ca97 Binary files /dev/null and b/doc/user/project/img/protected_branches_error_ui.png differ diff --git a/doc/user/project/img/protected_branches_list.png b/doc/user/project/img/protected_branches_list.png new file mode 100644 index 00000000000..9f070f7a208 Binary files /dev/null and b/doc/user/project/img/protected_branches_list.png differ diff --git a/doc/user/project/img/protected_branches_matches.png b/doc/user/project/img/protected_branches_matches.png new file mode 100644 index 00000000000..30ce53f704e Binary files /dev/null and b/doc/user/project/img/protected_branches_matches.png differ diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md new file mode 100644 index 00000000000..6a8170b5ecb --- /dev/null +++ b/doc/user/project/protected_branches.md @@ -0,0 +1,106 @@ +# Protected Branches + +[Permissions](../permissions.md) in GitLab are fundamentally defined around the +idea of having read or write permission to the repository and branches. To +prevent people from messing with history or pushing code without review, we've +created protected branches. + +By default, a protected branch does four simple things: + +- it prevents its creation, if not already created, from everybody except users + with Master permission +- it prevents pushes from everybody except users with Master permission +- it prevents **anyone** from force pushing to the branch +- it prevents **anyone** from deleting the branch + +See the [Changelog](#changelog) section for changes over time. + +## Configuring protected branches + +To protect a branch, you need to have at least Master permission level. Note +that the `master` branch is protected by default. + +1. Navigate to the main page of the project. +1. In the upper right corner, click the settings wheel and select **Protected branches**. + + ![Project settings list](img/project_settings_list.png) + +1. From the **Branch** dropdown menu, select the branch you want to protect and + click **Protect**. In the screenshot below, we chose the `develop` branch. + + ![Choose protected branch](img/protected_branches_choose_branch.png) + +1. Once done, the protected branch will appear in the "Already protected" list. + + ![Protected branches list](img/protected_branches_list.png) + + +Since GitLab 8.10, we added another layer of branch protection which provides +more granular management of protected branches. You can now choose the option +"Developers can merge" so that Developer users can merge a merge request but +not directly push. In that case, your branches are protected from direct pushes, +yet Developers don't need elevated permissions or wait for someone with a higher +permission level to press merge. + +You can set this option while creating the protected branch or after its +creation. + +## Wildcard protected branches + +>**Note:** +This feature was [introduced][ce-4665] in GitLab 8.10. + +You can specify a wildcard protected branch, which will protect all branches +matching the wildcard. For example: + +| Wildcard Protected Branch | Matching Branches | +|---------------------------+--------------------------------------------------------| +| `*-stable` | `production-stable`, `staging-stable` | +| `production/*` | `production/app-server`, `production/load-balancer` | +| `*gitlab*` | `gitlab`, `gitlab/staging`, `master/gitlab/production` | + +Protected branch settings (like "Developers can push") apply to all matching +branches. + +Two different wildcards can potentially match the same branch. For example, +`*-stable` and `production-*` would both match a `production-stable` branch. +In that case, if _any_ of these protected branches have a setting like +"Allowed to push", then `production-stable` will also inherit this setting. + +If you click on a protected branch's name that is created using a wildcard, +you will be presented with a list of all matching branches: + +![Protected branch matches](img/protected_branches_matches.png) + +## Restrict the creation of protected branches + +Creating a protected branch or a list of protected branches using the wildcard +feature, not only you are restricting pushes to those branches, but also their +creation if not already created. + +## Error messages when pushing to a protected branch + +A user with insufficient permissions will be presented with an error when +creating or pushing to a branch that's prohibited, either through GitLab's UI: + +![Protected branch error GitLab UI](img/protected_branches_error_ui.png) + +or using Git from their terminal: + +```bash +remote: GitLab: You are not allowed to push code to protected branches on this project. +To https://gitlab.example.com/thedude/bowling.git + ! [remote rejected] staging-stable -> staging-stable (pre-receive hook declined) +error: failed to push some refs to 'https://gitlab.example.com/thedude/bowling.git' +``` + +## Changelog + +**8.10.0** + +- Allow specifying protected branches using wildcards [gitlab-org/gitlab-ce!5081][ce-4665] + +--- + +[ce-4665]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4665 "Allow specifying protected branches using wildcards" +[ce-5081]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5081 "Allow creating protected branches that can't be pushed to" diff --git a/doc/workflow/README.md b/doc/workflow/README.md index ddb2f7281b1..49dec613716 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -12,7 +12,7 @@ - [Project Features](project_features.md) - [Project forking workflow](forking_workflow.md) - [Project users](add-user/add-user.md) -- [Protected branches](protected_branches.md) +- [Protected branches](../user/project/protected_branches.md) - [Sharing a project with a group](share_with_group.md) - [Share projects with other groups](share_projects_with_other_groups.md) - [Web Editor](web_editor.md) diff --git a/doc/workflow/protected_branches.md b/doc/workflow/protected_branches.md index 5c1c7b47c8a..aa48b8f750e 100644 --- a/doc/workflow/protected_branches.md +++ b/doc/workflow/protected_branches.md @@ -1,55 +1 @@ -# Protected Branches - -Permissions in GitLab are fundamentally defined around the idea of having read or write permission to the repository and branches. - -To prevent people from messing with history or pushing code without review, we've created protected branches. - -A protected branch does three simple things: - -* it prevents pushes from everybody except users with Master permission -* it prevents anyone from force pushing to the branch -* it prevents anyone from deleting the branch - -You can make any branch a protected branch. GitLab makes the master branch a protected branch by default. - -To protect a branch, user needs to have at least a Master permission level, see [permissions document](../user/permissions.md). - -![protected branches page](protected_branches/protected_branches1.png) - -Navigate to project settings page and select `protected branches`. From the `Branch` dropdown menu select the branch you want to protect. - -Some workflows, like [GitLab workflow](gitlab_flow.md), require all users with write access to submit a Merge request in order to get the code into a protected branch. - -Since Masters and Owners can already push to protected branches, that means Developers cannot push to protected branch and need to submit a Merge request. - -However, there are workflows where that is not needed and only protecting from force pushes and branch removal is useful. - -For those workflows, you can allow everyone with write access to push to a protected branch by selecting `Developers can push` check box. - -On already protected branches you can also allow developers to push to the repository by selecting the `Developers can push` check box. - -![Developers can push](protected_branches/protected_branches2.png) - -## Wildcard Protected Branches - ->**Note:** -This feature was added in GitLab 8.10. - -1. You can specify a wildcard protected branch, which will protect all branches matching the wildcard. For example: - - | Wildcard Protected Branch | Matching Branches | - |---------------------------+--------------------------------------------------------| - | `*-stable` | `production-stable`, `staging-stable` | - | `production/*` | `production/app-server`, `production/load-balancer` | - | `*gitlab*` | `gitlab`, `gitlab/staging`, `master/gitlab/production` | - -1. Protected branch settings (like "Developers Can Push") apply to all matching branches. - -1. Two different wildcards can potentially match the same branch. For example, `*-stable` and `production-*` would both match a `production-stable` branch. - >**Note:** - If _any_ of these protected branches have "Developers Can Push" set to true, then `production-stable` has it set to true. - -1. If you click on a protected branch's name, you will be presented with a list of all matching branches: - - ![protected branch matches](protected_branches/protected_branches3.png) - +This document is moved to [user/project/protected_branches.md](../user/project/protected_branches.md) diff --git a/doc/workflow/protected_branches/protected_branches1.png b/doc/workflow/protected_branches/protected_branches1.png deleted file mode 100644 index c00443803de..00000000000 Binary files a/doc/workflow/protected_branches/protected_branches1.png and /dev/null differ diff --git a/doc/workflow/protected_branches/protected_branches2.png b/doc/workflow/protected_branches/protected_branches2.png deleted file mode 100644 index a4f664d3b21..00000000000 Binary files a/doc/workflow/protected_branches/protected_branches2.png and /dev/null differ diff --git a/doc/workflow/protected_branches/protected_branches3.png b/doc/workflow/protected_branches/protected_branches3.png deleted file mode 100644 index 2a50cb174bb..00000000000 Binary files a/doc/workflow/protected_branches/protected_branches3.png and /dev/null differ -- cgit v1.2.1 From b48fd097ff22965bbb8d89780bc2a35385ffdfb5 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 22 Jul 2016 11:41:17 +0300 Subject: Fix failing spec on help controller --- spec/controllers/help_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb index 347bef1e129..33c75e7584f 100644 --- a/spec/controllers/help_controller_spec.rb +++ b/spec/controllers/help_controller_spec.rb @@ -36,7 +36,7 @@ describe HelpController do context 'when requested file exists' do it 'renders the raw file' do get :show, - path: 'workflow/protected_branches/protected_branches1', + path: 'user/project/img/labels_filter', format: :png expect(response).to be_success expect(response.content_type).to eq 'image/png' -- cgit v1.2.1 From 7a3b20ed36617aab2b56f12391903882c05f3ec0 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 22 Jul 2016 12:18:05 +0300 Subject: Move admin application settings to own path [ci skip] --- doc/README.md | 2 +- doc/administration/access_restrictions.md | 56 --------------------- doc/administration/img/access_restrictions.png | Bin 317529 -> 0 bytes doc/administration/img/domain_blacklist.png | Bin 178444 -> 0 bytes doc/administration/img/restricted_url.png | Bin 188210 -> 0 bytes .../settings/img/access_restrictions.png | Bin 0 -> 7435 bytes .../admin_area/settings/img/domain_blacklist.png | Bin 0 -> 34684 bytes .../admin_area/settings/img/restricted_url.png | Bin 0 -> 47539 bytes .../admin_area/settings/sign_up_restrictions.md | 22 ++++++++ .../settings/visibility_and_access_controls.md | 40 +++++++++++++++ 10 files changed, 63 insertions(+), 57 deletions(-) delete mode 100644 doc/administration/access_restrictions.md delete mode 100644 doc/administration/img/access_restrictions.png delete mode 100644 doc/administration/img/domain_blacklist.png delete mode 100644 doc/administration/img/restricted_url.png create mode 100644 doc/user/admin_area/settings/img/access_restrictions.png create mode 100644 doc/user/admin_area/settings/img/domain_blacklist.png create mode 100644 doc/user/admin_area/settings/img/restricted_url.png create mode 100644 doc/user/admin_area/settings/sign_up_restrictions.md create mode 100644 doc/user/admin_area/settings/visibility_and_access_controls.md diff --git a/doc/README.md b/doc/README.md index cc0b6e0c1e5..ad5267352b0 100644 --- a/doc/README.md +++ b/doc/README.md @@ -21,7 +21,7 @@ ## Administrator documentation -- [Access restrictions](administration/access_restrictions.md) Define which Git access protocols can be used to talk to GitLab +- [Access restrictions](user/admin_area/settings/visibility_and_access_controls.md#enabled-git-access-protocols) Define which Git access protocols can be used to talk to GitLab - [Authentication/Authorization](administration/auth/README.md) Configure external authentication with LDAP, SAML, CAS and additional Omniauth providers. - [Custom Git hooks](administration/custom_hooks.md) Custom Git hooks (on the filesystem) for when webhooks aren't enough. diff --git a/doc/administration/access_restrictions.md b/doc/administration/access_restrictions.md deleted file mode 100644 index eb08cf139d4..00000000000 --- a/doc/administration/access_restrictions.md +++ /dev/null @@ -1,56 +0,0 @@ -# Access Restrictions - -> **Note:** These features are only available on versions 8.10 and above. - -With GitLab's Access restrictions you can choose which Git access protocols you -want your users to use to communicate with GitLab. This feature can be enabled -via the `Application Settings` in the Admin interface. - -The setting is called `Enabled Git access protocols`, and it gives you the option -to choose between: - -- Both SSH and HTTP(S) -- Only SSH -- Only HTTP(s) - -![Settings Overview](img/access_restrictions.png) - -## Enabled Protocol - -When both SSH and HTTP(S) are enabled, GitLab will behave as usual, it will give -your users the option to choose which protocol they would like to use. - -When you choose to allow only one of the protocols, a couple of things will happen: - -- The project page will only show the allowed protocol's URL, with no option to - change it. -- A tooltip will be shown when you hover over the URL's protocol, if an action - on the user's part is required, e.g. adding an SSH key, or setting a password. - -![Project URL with SSH only access](img/restricted_url.png) - -On top of these UI restrictions, GitLab will deny all Git actions on the protocol -not selected. - -> **Note:** Please keep in mind that disabling an access protocol does not actually - block access to the server itself. The ports used for the protocol, be it SSH or - HTTP, will still be accessible. What GitLab does is restrict access on the - application level. - -## Blacklist email domains - -With this feature enabled, you can block email addresses of a specific domain -from creating an account on your GitLab server. This is particularly useful to -prevent spam. Disposable email addresses are usually used by malicious users to -create dummy accounts and spam issues. - -This feature can be activated via the `Application Settings` in the Admin area, -and you have the option of entering the list manually, or uploading a file with -the list. - -The blacklist accepts wildcards, so you can use `*.test.com` to block every -`test.com` subdomain, or `*.io` to block all domains ending in `.io`. Domains -should be separated by a whitespace, semicolon, comma, or a new line. - -![Domain Blacklist](img/domain_blacklist.png) - diff --git a/doc/administration/img/access_restrictions.png b/doc/administration/img/access_restrictions.png deleted file mode 100644 index 66fd9491e85..00000000000 Binary files a/doc/administration/img/access_restrictions.png and /dev/null differ diff --git a/doc/administration/img/domain_blacklist.png b/doc/administration/img/domain_blacklist.png deleted file mode 100644 index a7894e5f08d..00000000000 Binary files a/doc/administration/img/domain_blacklist.png and /dev/null differ diff --git a/doc/administration/img/restricted_url.png b/doc/administration/img/restricted_url.png deleted file mode 100644 index 0a677433dcf..00000000000 Binary files a/doc/administration/img/restricted_url.png and /dev/null differ diff --git a/doc/user/admin_area/settings/img/access_restrictions.png b/doc/user/admin_area/settings/img/access_restrictions.png new file mode 100644 index 00000000000..8eea84320d7 Binary files /dev/null and b/doc/user/admin_area/settings/img/access_restrictions.png differ diff --git a/doc/user/admin_area/settings/img/domain_blacklist.png b/doc/user/admin_area/settings/img/domain_blacklist.png new file mode 100644 index 00000000000..bd87b73cf9e Binary files /dev/null and b/doc/user/admin_area/settings/img/domain_blacklist.png differ diff --git a/doc/user/admin_area/settings/img/restricted_url.png b/doc/user/admin_area/settings/img/restricted_url.png new file mode 100644 index 00000000000..8b00a18320b Binary files /dev/null and b/doc/user/admin_area/settings/img/restricted_url.png differ diff --git a/doc/user/admin_area/settings/sign_up_restrictions.md b/doc/user/admin_area/settings/sign_up_restrictions.md new file mode 100644 index 00000000000..4b540473a6e --- /dev/null +++ b/doc/user/admin_area/settings/sign_up_restrictions.md @@ -0,0 +1,22 @@ +# Sign-up restrictions + +## Blacklist email domains + +> [Introduced][ce-5259] in GitLab 8.10. + +With this feature enabled, you can block email addresses of a specific domain +from creating an account on your GitLab server. This is particularly useful to +prevent spam. Disposable email addresses are usually used by malicious users to +create dummy accounts and spam issues. + +This feature can be activated via the **Application Settings** in the Admin area, +and you have the option of entering the list manually, or uploading a file with +the list. + +The blacklist accepts wildcards, so you can use `*.test.com` to block every +`test.com` subdomain, or `*.io` to block all domains ending in `.io`. Domains +should be separated by a whitespace, semicolon, comma, or a new line. + +![Domain Blacklist](img/domain_blacklist.png) + +[ce-5259]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5259 diff --git a/doc/user/admin_area/settings/visibility_and_access_controls.md b/doc/user/admin_area/settings/visibility_and_access_controls.md new file mode 100644 index 00000000000..633f16a617c --- /dev/null +++ b/doc/user/admin_area/settings/visibility_and_access_controls.md @@ -0,0 +1,40 @@ +# Visibility and access controls + +## Enabled Git access protocols + +> [Introduced][ce-4696] in GitLab 8.10. + +With GitLab's Access restrictions you can choose which Git access protocols you +want your users to use to communicate with GitLab. This feature can be enabled +via the `Application Settings` in the Admin interface. + +The setting is called `Enabled Git access protocols`, and it gives you the option +to choose between: + +- Both SSH and HTTP(S) +- Only SSH +- Only HTTP(s) + +![Settings Overview](img/access_restrictions.png) + +When both SSH and HTTP(S) are enabled, GitLab will behave as usual, it will give +your users the option to choose which protocol they would like to use. + +When you choose to allow only one of the protocols, a couple of things will happen: + +- The project page will only show the allowed protocol's URL, with no option to + change it. +- A tooltip will be shown when you hover over the URL's protocol, if an action + on the user's part is required, e.g. adding an SSH key, or setting a password. + +![Project URL with SSH only access](img/restricted_url.png) + +On top of these UI restrictions, GitLab will deny all Git actions on the protocol +not selected. + +> **Note:** Please keep in mind that disabling an access protocol does not actually + block access to the server itself. The ports used for the protocol, be it SSH or + HTTP, will still be accessible. What GitLab does is restrict access on the + application level. + +[ce-4696]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4696 -- cgit v1.2.1 From a93323cd9449ec59464727c7758401d25c4801d4 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 19 Jul 2016 19:33:02 +0300 Subject: Refactor Slack service documentation [ci skip] --- doc/integration/README.md | 1 - doc/integration/slack.md | 41 +----------------- doc/project_services/img/slack_configuration.png | Bin 72072 -> 75762 bytes doc/project_services/slack.md | 52 +++++++++++++++++------ 4 files changed, 39 insertions(+), 55 deletions(-) diff --git a/doc/integration/README.md b/doc/integration/README.md index fd330dd7a7d..ddbd570ac6c 100644 --- a/doc/integration/README.md +++ b/doc/integration/README.md @@ -11,7 +11,6 @@ See the documentation below for details on how to configure these services. - [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, GitLab.com, Google, Bitbucket, Facebook, Shibboleth, SAML, Crowd and Azure - [SAML](saml.md) Configure GitLab as a SAML 2.0 Service Provider - [CAS](cas.md) Configure GitLab to sign in using CAS -- [Slack](slack.md) Integrate with the Slack chat service - [OAuth2 provider](oauth_provider.md) OAuth2 application creation - [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages - [reCAPTCHA](recaptcha.md) Configure GitLab to use Google reCAPTCHA for new users diff --git a/doc/integration/slack.md b/doc/integration/slack.md index 11f956fed3e..8cd151fbf95 100644 --- a/doc/integration/slack.md +++ b/doc/integration/slack.md @@ -1,40 +1 @@ -# Slack integration - -## On Slack - -To enable Slack integration you must create an Incoming WebHooks integration on Slack: - -1. [Sign in to Slack](https://slack.com/signin) - -1. Visit [Incoming WebHooks](https://my.slack.com/services/new/incoming-webhook/) - -1. Choose the channel name you want to send notifications to. - -1. Click **Add Incoming WebHooks Integration** - - Optional step; You can change bot's name and avatar by clicking modifying the bot name or avatar under **Integration Settings**. - -1. Copy the **Webhook URL**, we'll need this later for GitLab. - - -## On GitLab - -After Slack is ready we need to setup GitLab. Here are the steps to achieve this. - -1. Sign in to GitLab - -1. Pick the repository you want. - -1. Navigate to Settings -> Services -> Slack - -1. Pick the triggers you want to activate and respective channel (`#general` by default). - -1. Fill in your Slack details - - Webhook: Paste the Webhook URL from the step above - - Username: Fill this in if you want to change the username of the bot - - Mark it as active - -1. Save your settings - -Have fun :) - -*P.S. You can set "branch,pushed,Compare changes" as highlight words on your Slack profile settings, so that you can be aware of new commits when somebody pushes them.* +This document was moved to [project_services/slack.md](../project_services/slack.md). diff --git a/doc/project_services/img/slack_configuration.png b/doc/project_services/img/slack_configuration.png index d3ebe5969af..b8de8a56db7 100644 Binary files a/doc/project_services/img/slack_configuration.png and b/doc/project_services/img/slack_configuration.png differ diff --git a/doc/project_services/slack.md b/doc/project_services/slack.md index 4ed33838f7c..3cfe77c9f85 100644 --- a/doc/project_services/slack.md +++ b/doc/project_services/slack.md @@ -1,26 +1,50 @@ # Slack Service -Go to your project's **Settings > Services > Slack** and you will see a checkbox with the following events that can be triggered: +## On Slack -* Push -* Issue -* Merge request -* Note -* Tag push -* Build -* Wiki page +To enable Slack integration you must create an incoming webhook integration on +Slack: -Below each of these event checkboxes you will have an input to insert which Slack channel do you want to send that event message, -`#general` channel is default. +1. [Sign in to Slack](https://slack.com/signin) +1. Visit [Incoming WebHooks](https://my.slack.com/services/new/incoming-webhook/) +1. Choose the channel name you want to send notifications to. +1. Click **Add Incoming WebHooks Integration** +1. Copy the **Webhook URL**, we'll need this later for GitLab. +## On GitLab -![Slack configuration](img/slack_configuration.png) +After you set up Slack, it's time to set up GitLab. + +Go to your project's **Settings > Services > Slack** and you will see a +checkbox with the following events that can be triggered: + +- Push +- Issue +- Merge request +- Note +- Tag push +- Build +- Wiki page + +Bellow each of these event checkboxes, you will have an input field to insert +which Slack channel you want to send that event message, with `#general` +being the default. Enter your preferred channel **without** the hash sign (`#`). +At the end, fill in your Slack details: | Field | Description | | ----- | ----------- | -| `Webhook` | The incoming webhook url which you have to setup on slack. (https://my.slack.com/services/new/incoming-webhook/) | -| `Username` | Optional username which can be on messages sent to slack. | -| `notify only broken builds` | Notify only about broken builds, when build events are marked to be sent.| +| **Webhook** | The [incoming webhook URL][slackhook] which you have to setup on Slack. | +| **Username** | Optional username which can be on messages sent to slack. Fill this in if you want to change the username of the bot. | +| **Notify only broken builds** | If you choose to enable the **Build** event and you want to be only notified about failed builds. | +After you are all done, click **Save changes** for the changes to take effect. + +>**Note:** +You can set "branch,pushed,Compare changes" as highlight words on your Slack +profile settings, so that you can be aware of new commits when somebody pushes +them. + +![Slack configuration](img/slack_configuration.png) +[slackhook]: https://my.slack.com/services/new/incoming-webhook -- cgit v1.2.1 From 12dd0f62012c6df8bd67abc2d9c5c54bd82366f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 22 Jul 2016 13:18:34 +0200 Subject: Update VERSION to 8.11.0-pre MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- CHANGELOG | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index bc09a51cc1e..e2104338f5c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,7 +5,7 @@ v 8.11.0 (unreleased) - Limit git rev-list output count to one in forced push check - Retrieve rendered HTML from cache in one request -v 8.10.0 (unreleased) +v 8.10.0 - Fix profile activity heatmap to show correct day name (eanplatter) - Speed up ExternalWikiHelper#get_project_wiki_path - Expose {should,force}_remove_source_branch (Ben Boeckel) diff --git a/VERSION b/VERSION index 213504430f3..542e7824102 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.10.0-pre +8.11.0-pre -- cgit v1.2.1 From de3f8ad397e8505ca56e1a81235ce36f6f145c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 22 Jul 2016 13:12:30 +0200 Subject: Make Notify specs more robust by setting up assignee names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- spec/mailers/notify_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 0a9b10bebea..3685b2b17b5 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -12,7 +12,7 @@ describe Notify do context 'for a project' do describe 'items that are assignable, the email' do let(:current_user) { create(:user, email: "current@email.com") } - let(:assignee) { create(:user, email: 'assignee@example.com') } + let(:assignee) { create(:user, email: 'assignee@example.com', name: 'John Doe') } let(:previous_assignee) { create(:user, name: 'Previous Assignee') } shared_examples 'an assignee email' do -- cgit v1.2.1 From 679bb671be0225d6e6b65a1cd7a47cf2814e849c Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 22 Jul 2016 14:57:45 +0300 Subject: Refactor repository storages documentation [ci skip] --- doc/README.md | 1 + .../img/repository_storages_admin_ui.png | Bin 0 -> 17081 bytes doc/administration/repository_storages.md | 82 ++++++++++++++++++--- 3 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 doc/administration/img/repository_storages_admin_ui.png diff --git a/doc/README.md b/doc/README.md index ad5267352b0..b5b377822e6 100644 --- a/doc/README.md +++ b/doc/README.md @@ -50,6 +50,7 @@ - [Sidekiq Troubleshooting](administration/troubleshooting/sidekiq.md) Debug when Sidekiq appears hung and is not processing jobs. - [High Availability](administration/high_availability/README.md) Configure multiple servers for scaling or high availability. - [Container Registry](administration/container_registry.md) Configure Docker Registry with GitLab. +- [Multiple mountpoints for the repositories storage](administration/repository_storages.md) Define multiple repository storage paths to distribute the storage load. ## Contributor documentation diff --git a/doc/administration/img/repository_storages_admin_ui.png b/doc/administration/img/repository_storages_admin_ui.png new file mode 100644 index 00000000000..599350bc098 Binary files /dev/null and b/doc/administration/img/repository_storages_admin_ui.png differ diff --git a/doc/administration/repository_storages.md b/doc/administration/repository_storages.md index fd2b4f00960..a9e22e2bdaa 100644 --- a/doc/administration/repository_storages.md +++ b/doc/administration/repository_storages.md @@ -1,19 +1,81 @@ # Repository storages -GitLab allows you to define repository storage paths to enable distribution of -storage load between several mount points. You can choose where new projects are -stored via the `Application Settings` in the Admin interface. +> [Introduced][ce-4578] in GitLab 8.10. -## For installations from source - -Add your repository storage paths in your `gitlab.yml` under repositories -> storages, using key -> value pairs. +GitLab allows you to define multiple repository storage paths to distribute the +storage load between several mount points. >**Notes:** +> - You must have at least one storage path called `default`. +- The paths are defined in key-value pairs. The key is an arbitrary name you + can pick to name the file path. +- The target directories and any of its subpaths must not be a symlink. + +## Configure GitLab + +>**Warning:** - In order for backups to work correctly the storage path must **not** be a -mount point and the GitLab user should have correct permissions for the parent -directory of the path. + mount point and the GitLab user should have correct permissions for the parent + directory of the path. + +Edit the configuration files and add the full paths of the alternative repository +storage paths. In the example below we added two more mountpoints that we named +`nfs` and `cephfs` respectively. + +**For installations from source** + +1. Edit `gitlab.yml` and add the storage paths: + + ```yaml + repositories: + # Paths where repositories can be stored. Give the canonicalized absolute pathname. + # NOTE: REPOS PATHS MUST NOT CONTAIN ANY SYMLINK!!! + storages: # You must have at least a 'default' storage path. + default: /home/git/repositories + nfs: /mnt/nfs/repositories + cephfs: /mnt/cephfs/repositories + ``` + +1. [Restart GitLab] for the changes to take effect. + +The `gitlab_shell: repos_path` entry in `gitlab.yml` will be deprecated and +replaced by `repositories: storages` in the future, so if you are upgrading +from a version prior to 8.10, make sure to add the configuration as described +in the step above. After you make the changes and confirm they are working, +you can remove: + +```yaml +repos_path: /home/git/repositories +``` + +which is located under the `gitlab_shell` section. + +--- + +**For Omnibus installations** + +1. Edit `/etc/gitlab/gitlab.rb` by appending the rest of the paths to the + default one: + + ```ruby + git_data_dirs({ + "default" => "/var/opt/gitlab/git-data", + "nfs" => "/mnt/nfs/git-data", + "cephfs" => "/mnt/cephfs/git-data" + }) + ``` + + Note that Omnibus stores the repositories in a `repositories` subdirectory + of the `git-data` directory. + +## Choose where new project repositories will be stored + +Once you set the multiple storage paths, you can choose where new projects will +be stored via the **Application Settings** in the Admin area. -## For omnibus installations +![Choose repository storage path in Admin area](img/repository_storages_admin_ui.png) -Follow the instructions at https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md#storing-git-data-in-an-alternative-directory +[ce-4578]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4578 +[restart gitlab]: restart_gitlab.md#installations-from-source +[reconfigure gitlab]: restart_gitlab.md#omnibus-gitlab-reconfigure -- cgit v1.2.1 From 391064830d82c4b009ab7f698cba38141f449f76 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 22 Jul 2016 06:38:02 -0700 Subject: Gracefully handle case when keep-around references are corrupted or exist already We were seeing a number of error messages when attempting to create a keep-around ref: 1. Failed to create locked file `refs/keep-around/XYZ`: File exists 2. Failed to write reference `refs/keep-around/XYZ`: a reference with that name already exists. I'm not sure how these happen, but I suspect when multiple workers attempt to write the same file we may have an issue. The force parameter should help ensure the file gets created, as well as the rescues to prevent 500 Errors. Rugged/libgit2 unfortunately do not allow you to delete or re-create a reference that has been corrupted, even with the force parameter. Closes #20109 --- app/models/repository.rb | 13 +++++++++++-- spec/models/repository_spec.rb | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 46a04eb80cd..1d3df6f9eaf 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -211,11 +211,20 @@ class Repository return if kept_around?(sha) - rugged.references.create(keep_around_ref_name(sha), sha) + # This will still fail if the file is corrupted (e.g. 0 bytes) + begin + rugged.references.create(keep_around_ref_name(sha), sha, force: true) + rescue Rugged::ReferenceError => ex + Rails.logger.error "Unable to create keep-around reference for repository #{path}: #{ex}" + end end def kept_around?(sha) - ref_exists?(keep_around_ref_name(sha)) + begin + ref_exists?(keep_around_ref_name(sha)) + rescue Rugged::ReferenceError + false + end end def tag_names diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 3e133143bbc..9b21d030416 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1164,10 +1164,30 @@ describe Repository, models: true do end describe "#keep_around" do + it "does not fail if we attempt to reference bad commit" do + expect(repository.kept_around?('abc1234')).to be_falsey + end + it "stores a reference to the specified commit sha so it isn't garbage collected" do repository.keep_around(sample_commit.id) expect(repository.kept_around?(sample_commit.id)).to be_truthy end + + it "attempting to call keep_around on truncated ref does not fail" do + repository.keep_around(sample_commit.id) + ref = repository.send(:keep_around_ref_name, sample_commit.id) + path = File.join(repository.path, ref) + # Corrupt the reference + File.truncate(path, 0) + + expect(repository.kept_around?(sample_commit.id)).to be_falsey + + repository.keep_around(sample_commit.id) + + expect(repository.kept_around?(sample_commit.id)).to be_falsey + + File.delete(path) + end end end -- cgit v1.2.1 From 87a5d7121bd3ce8362cc75b09566dd3d71f98bd7 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 22 Jul 2016 16:47:44 +0300 Subject: Add light border to rounded avatars Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/framework/avatar.scss | 20 +++++++++++--------- app/assets/stylesheets/pages/dashboard.scss | 4 ---- app/views/groups/show.html.haml | 2 +- app/views/projects/_home_panel.html.haml | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/framework/avatar.scss b/app/assets/stylesheets/framework/avatar.scss index 8b6ddf8ba18..c79b22d4d21 100644 --- a/app/assets/stylesheets/framework/avatar.scss +++ b/app/assets/stylesheets/framework/avatar.scss @@ -5,6 +5,7 @@ height: 40px; padding: 0; @include border-radius($avatar_radius); + border: 1px solid rgba(0, 0, 0, .1); &.avatar-inline { float: none; @@ -15,8 +16,9 @@ &.s24 { margin-right: 4px; } } - &.group-avatar, &.project-avatar, &.avatar-tile { + &.avatar-tile { @include border-radius(0); + border: none; } &.s16 { width: 16px; height: 16px; margin-right: 6px; } @@ -43,12 +45,12 @@ &.s16 { font-size: 12px; line-height: 1.33; } &.s24 { font-size: 14px; line-height: 1.8; } &.s26 { font-size: 20px; line-height: 1.33; } - &.s32 { font-size: 20px; line-height: 32px; } - &.s40 { font-size: 16px; line-height: 40px; } - &.s60 { font-size: 32px; line-height: 60px; } - &.s70 { font-size: 34px; line-height: 70px; } - &.s90 { font-size: 36px; line-height: 90px; } - &.s110 { font-size: 40px; line-height: 112px; font-weight: 300; } - &.s140 { font-size: 72px; line-height: 140px; } - &.s160 { font-size: 96px; line-height: 160px; } + &.s32 { font-size: 20px; line-height: 30px; } + &.s40 { font-size: 16px; line-height: 38px; } + &.s60 { font-size: 32px; line-height: 58px; } + &.s70 { font-size: 34px; line-height: 68px; } + &.s90 { font-size: 36px; line-height: 88px; } + &.s110 { font-size: 40px; line-height: 108px; font-weight: 300; } + &.s140 { font-size: 72px; line-height: 138px; } + &.s160 { font-size: 96px; line-height: 158px; } } diff --git a/app/assets/stylesheets/pages/dashboard.scss b/app/assets/stylesheets/pages/dashboard.scss index cf7567513ec..42928ee279c 100644 --- a/app/assets/stylesheets/pages/dashboard.scss +++ b/app/assets/stylesheets/pages/dashboard.scss @@ -36,10 +36,6 @@ .dash-project-avatar { float: left; - - .avatar { - @include border-radius(50%); - } } .dash-project-access-icon { diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index eddeae98bc4..53ed4fa991d 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -6,7 +6,7 @@ .cover-block.groups-cover-block %div{ class: container_class } - = image_tag group_icon(@group), class: "avatar group-avatar s70" + = image_tag group_icon(@group), class: "avatar group-avatar s70 avatar-tile" .group-info .cover-title %h1 diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index cf11723dc8e..51f74f3b7ce 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -1,7 +1,7 @@ - empty_repo = @project.empty_repo? .project-home-panel.text-center{ class: ("empty-project" if empty_repo) } %div{ class: container_class } - = project_icon(@project, alt: @project.name, class: 'project-avatar avatar s70') + = project_icon(@project, alt: @project.name, class: 'project-avatar avatar s70 avatar-tile') %h1.project-title = @project.name %span.visibility-icon.has-tooltip{data: { container: 'body' }, title: visibility_icon_description(@project)} -- cgit v1.2.1 From 34c0d2e361ac84c1dab0ef497ffce9295b0534b6 Mon Sep 17 00:00:00 2001 From: barthc Date: Fri, 22 Jul 2016 17:42:24 +0100 Subject: fix missing repo_ref param --- app/helpers/search_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index fcb2703e837..a2bba139c17 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -112,7 +112,8 @@ module SearchHelper search: params[:search], project_id: params[:project_id], group_id: params[:group_id], - scope: params[:scope] + scope: params[:scope], + repository_ref: params[:repository_ref] } options = exist_opts.merge(options) -- cgit v1.2.1 From df541e510e5da0949286aa73a24ad748bc2d05c6 Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Fri, 22 Jul 2016 18:42:54 +0200 Subject: Load project invited groups and members eagerly in ProjectTeam#fetch_members --- CHANGELOG | 1 + app/models/project_team.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index e2104338f5c..fa272755033 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check - Retrieve rendered HTML from cache in one request + - Load project invited groups and members eagerly in ProjectTeam#fetch_members v 8.10.0 - Fix profile activity heatmap to show correct day name (eanplatter) diff --git a/app/models/project_team.rb b/app/models/project_team.rb index 0b700930641..9d312a53790 100644 --- a/app/models/project_team.rb +++ b/app/models/project_team.rb @@ -173,7 +173,7 @@ class ProjectTeam invited_members = [] if project.invited_groups.any? && project.allowed_to_share_with_group? - project.project_group_links.each do |group_link| + project.project_group_links.includes(group: [:group_members]).each do |group_link| invited_group = group_link.group im = invited_group.members -- cgit v1.2.1 From 3b0c71f40f9427ea5f2c7cb44de96aa9f6bc1040 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 22 Jul 2016 20:41:31 +0300 Subject: Add detailed info on storage path mountpoints [ci skip] --- doc/administration/repository_storages.md | 52 +++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/doc/administration/repository_storages.md b/doc/administration/repository_storages.md index a9e22e2bdaa..55b054fc1a4 100644 --- a/doc/administration/repository_storages.md +++ b/doc/administration/repository_storages.md @@ -15,13 +15,33 @@ storage load between several mount points. ## Configure GitLab >**Warning:** -- In order for backups to work correctly the storage path must **not** be a - mount point and the GitLab user should have correct permissions for the parent - directory of the path. +In order for [backups] to work correctly, the storage path must **not** be a +mount point and the GitLab user should have correct permissions for the parent +directory of the path. In Omnibus GitLab this is taken care of automatically, +but for source installations you should be extra careful. +> +The thing is that for compatibility reasons `gitlab.yml` has a different +structure than Omnibus. In `gitlab.yml` you indicate the path for the +repositories, for example `/home/git/repositories`, while in Omnibus you +indicate `git_data_dirs`, which for the example above would be `/home/git`. +Then, Omnibus will create a `repositories` directory under that path to use with +`gitlab.yml`. +> +This little detail matters because while restoring a backup, the current +contents of `/home/git/repositories` [are moved to][raketask] `/home/git/repositories.old`, +so if `/home/git/repositories` is the mount point, then `mv` would be moving +things between mount points, and bad things could happen. Ideally, +`/home/git` would be the mount point, so then things would be moving within the +same mount point. This is guaranteed with Omnibus installations (because they +don't specify the full repository path but the parent path), but not for source +installations. + +--- -Edit the configuration files and add the full paths of the alternative repository -storage paths. In the example below we added two more mountpoints that we named -`nfs` and `cephfs` respectively. +Now that you've read that big fat warning above, let's edit the configuration +files and add the full paths of the alternative repository storage paths. In +the example below, we add two more mountpoints that are named `nfs` and `cephfs` +respectively. **For installations from source** @@ -39,17 +59,12 @@ storage paths. In the example below we added two more mountpoints that we named 1. [Restart GitLab] for the changes to take effect. -The `gitlab_shell: repos_path` entry in `gitlab.yml` will be deprecated and -replaced by `repositories: storages` in the future, so if you are upgrading -from a version prior to 8.10, make sure to add the configuration as described -in the step above. After you make the changes and confirm they are working, -you can remove: - -```yaml -repos_path: /home/git/repositories -``` - -which is located under the `gitlab_shell` section. +>**Note:** +The [`gitlab_shell: repos_path` entry][repospath] in `gitlab.yml` will be +deprecated and replaced by `repositories: storages` in the future, so if you +are upgrading from a version prior to 8.10, make sure to add the configuration +as described in the step above. After you make the changes and confirm they are +working, you can remove the `repos_path` line. --- @@ -79,3 +94,6 @@ be stored via the **Application Settings** in the Admin area. [ce-4578]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4578 [restart gitlab]: restart_gitlab.md#installations-from-source [reconfigure gitlab]: restart_gitlab.md#omnibus-gitlab-reconfigure +[backups]: ../raketasks/backup_restore.md +[raketask]: https://gitlab.com/gitlab-org/gitlab-ce/blob/033e5423a2594e08a7ebcd2379bd2331f4c39032/lib/backup/repository.rb#L54-56 +[repospath]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-9-stable/config/gitlab.yml.example#L457 -- cgit v1.2.1 From 0d80354df79ae3e75f7a415b2089ee3359a65046 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 22 Jul 2016 20:30:02 +0000 Subject: Add note to say GFM doesn't work on documentation website --- doc/markdown/markdown.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index 2bbe4b2a36e..1761487b6ca 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -1,5 +1,10 @@ # Markdown +> **Note:** +> Not all of the GitLab-specific extensions to Markdown that are described in this document currently work on our documentation website. +> +> For the best result, we encourage you to check this document out as rendered by GitLab: [markdown.md](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md). + ## Table of Contents **[GitLab Flavored Markdown](#gitlab-flavored-markdown-gfm)** -- cgit v1.2.1 From 2d64bda01f983c43f915e96bd5bf8fcb0790eb0e Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Fri, 22 Jul 2016 21:55:21 +0100 Subject: adds changelog item --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index a5d26db7626..6b0b8fc0b90 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' v 8.10.0 (unreleased) + - User can now search branches by name. !5144 (tiagonbotelho) - Fix profile activity heatmap to show correct day name (eanplatter) - Expose {should,force}_remove_source_branch (Ben Boeckel) - Add the functionality to be able to rename a file. !5049 (tiagonbotelho) -- cgit v1.2.1 From f735a4b2d2013ec462d3b3813f747c850a94b1c0 Mon Sep 17 00:00:00 2001 From: winniehell Date: Sat, 23 Jul 2016 02:15:08 +0200 Subject: Add green outline to New Branch button (!5447) --- CHANGELOG | 1 + app/assets/stylesheets/framework/buttons.scss | 9 +++++++++ app/views/projects/issues/_new_branch.html.haml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index fa272755033..4f646893d6e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check + - Add green outline to New Branch button !5447 (winniehell) - Retrieve rendered HTML from cache in one request - Load project invited groups and members eagerly in ProjectTeam#fetch_members diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index f87b8a2ad1c..473530cf094 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -135,6 +135,15 @@ @include btn-green; } + &.btn-inverted { + &.btn-success, + &.btn-new, + &.btn-create, + &.btn-save { + @include btn-outline($white-light, $green-normal, $green-normal, $green-light, $white-light, $green-light); + } + } + &.btn-gray { @include btn-gray; } diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml index e93b7e0d66d..24749699c6d 100644 --- a/app/views/projects/issues/_new_branch.html.haml +++ b/app/views/projects/issues/_new_branch.html.haml @@ -2,7 +2,7 @@ .pull-right #new-branch{'data-path' => can_create_branch_namespace_project_issue_path(@project.namespace, @project, @issue)} = link_to namespace_project_branches_path(@project.namespace, @project, branch_name: @issue.to_branch_name, issue_iid: @issue.iid), - method: :post, class: 'btn has-tooltip', title: @issue.to_branch_name, disabled: 'disabled' do + method: :post, class: 'btn btn-new btn-inverted has-tooltip', title: @issue.to_branch_name, disabled: 'disabled' do .checking = icon('spinner spin') Checking branches -- cgit v1.2.1 From 10d9df28ec3b494361abcee27ffddece580bbf3a Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Mon, 18 Jul 2016 13:58:08 +0200 Subject: Add gitlab-workhorse version to admin dashboard Test for showing GitLab Workhorse version on Admin Dashboard Refactoring --- CHANGELOG | 1 + app/views/admin/dashboard/index.html.haml | 4 ++++ lib/gitlab/workhorse.rb | 7 +++++++ spec/views/admin/dashboard/index.html.haml_spec.rb | 20 ++++++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 spec/views/admin/dashboard/index.html.haml_spec.rb diff --git a/CHANGELOG b/CHANGELOG index fa272755033..e3a8c3731bf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -164,6 +164,7 @@ v 8.10.0 - Export and import avatar as part of project import/export - Fix migration corrupting import data for old version upgrades - Show tooltip on GitLab export link in new project page + - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska) v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index a2ac407c159..452fc25ab07 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -79,6 +79,10 @@ GitLab Shell %span.pull-right = Gitlab::Shell.new.version + %p + GitLab Workhorse + %span.pull-right + = Gitlab::Workhorse.version %p GitLab API %span.pull-right diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index 6aeb49c0219..97610b1f962 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -4,6 +4,7 @@ require 'json' module Gitlab class Workhorse SEND_DATA_HEADER = 'Gitlab-Workhorse-Send-Data' + VERSION_FILE = 'GITLAB_WORKHORSE_VERSION' class << self def git_http_ok(repository, user) @@ -75,6 +76,12 @@ module Gitlab ] end + def version + if File.readable?(File.join(Rails.root, VERSION_FILE)) + File.read(File.join(Rails.root, VERSION_FILE)) + end + end + protected def encode(hash) diff --git a/spec/views/admin/dashboard/index.html.haml_spec.rb b/spec/views/admin/dashboard/index.html.haml_spec.rb new file mode 100644 index 00000000000..dae858a52f6 --- /dev/null +++ b/spec/views/admin/dashboard/index.html.haml_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe 'admin/dashboard/index.html.haml' do + include Devise::TestHelpers + + before do + assign(:projects, create_list(:empty_project, 1)) + assign(:users, create_list(:user, 1)) + assign(:groups, create_list(:group, 1)) + + allow(view).to receive(:admin?).and_return(true) + end + + it "shows version of GitLab Workhorse" do + render + + expect(rendered).to have_content 'GitLab Workhorse' + expect(rendered).to have_content Gitlab::Workhorse.version + end +end -- cgit v1.2.1 From ab419b08ce7741f3471439a9b912fdb504130615 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Thu, 21 Jul 2016 22:04:28 +0200 Subject: If version file is unavailable unknown status --- CHANGELOG | 2 +- lib/gitlab/workhorse.rb | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e3a8c3731bf..71ae0589948 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ v 8.11.0 (unreleased) - Limit git rev-list output count to one in forced push check - Retrieve rendered HTML from cache in one request - Load project invited groups and members eagerly in ProjectTeam#fetch_members + - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) v 8.10.0 - Fix profile activity heatmap to show correct day name (eanplatter) @@ -164,7 +165,6 @@ v 8.10.0 - Export and import avatar as part of project import/export - Fix migration corrupting import data for old version upgrades - Show tooltip on GitLab export link in new project page - - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska) v 8.9.6 - Fix importing of events under notes for GitLab projects. !5154 diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index 97610b1f962..c6826a09bd2 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -77,9 +77,8 @@ module Gitlab end def version - if File.readable?(File.join(Rails.root, VERSION_FILE)) - File.read(File.join(Rails.root, VERSION_FILE)) - end + path = Rails.root.join(VERSION_FILE) + path.readable? ? path.read.chomp : 'unknown' end protected -- cgit v1.2.1 From 990af894d329e5577cc9fd4489f0bf3d370e5421 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 23 Jul 2016 06:35:00 -0700 Subject: Improve project rename log messages for better debugging Helping to diagnose #20178 --- app/models/project.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 5452d9f768f..023b1dc3725 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -882,9 +882,13 @@ class Project < ActiveRecord::Base old_path_with_namespace = File.join(namespace_dir, path_was) new_path_with_namespace = File.join(namespace_dir, path) + Rails.logger.error "Attempting to rename #{old_path_with_namespace} -> #{new_path_with_namespace}" + expire_caches_before_rename(old_path_with_namespace) if has_container_registry_tags? + Rails.logger.error "Project #{old_path_with_namespace} cannot be renamed because container registry tags are present" + # we currently doesn't support renaming repository if it contains tags in container registry raise Exception.new('Project cannot be renamed, because tags are present in its container registry') end @@ -903,17 +907,22 @@ class Project < ActiveRecord::Base SystemHooksService.new.execute_hooks_for(self, :rename) @repository = nil - rescue + rescue => e + Rails.logger.error "Exception renaming #{old_path_with_namespace} -> #{new_path_with_namespace}: #{e}" # Returning false does not rollback after_* transaction but gives # us information about failing some of tasks false end else + Rails.logger.error "Repository could not be renamed: #{old_path_with_namespace} -> #{new_path_with_namespace}" + # if we cannot move namespace directory we should rollback # db changes in order to prevent out of sync between db and fs raise Exception.new('repository cannot be renamed') end + Gitlab::AppLogger.info "Project was renamed: #{old_path_with_namespace} -> #{new_path_with_namespace}" + Gitlab::UploadsTransfer.new.rename_project(path_was, path, namespace.path) end -- cgit v1.2.1 From bfaacb7bccac2b43974ffd527fad3f13a231fb2e Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 22 Jul 2016 16:26:33 -0600 Subject: Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page --- CHANGELOG | 3 +++ app/models/note.rb | 14 +++++++++----- db/migrate/20160722221922_nullify_blank_type_on_notes.rb | 9 +++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 db/migrate/20160722221922_nullify_blank_type_on_notes.rb diff --git a/CHANGELOG b/CHANGELOG index fa272755033..3e28b35e2aa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,9 @@ v 8.11.0 (unreleased) - Retrieve rendered HTML from cache in one request - Load project invited groups and members eagerly in ProjectTeam#fetch_members +v 8.10.1 (unreleased) + - Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page + v 8.10.0 - Fix profile activity heatmap to show correct day name (eanplatter) - Speed up ExternalWikiHelper#get_project_wiki_path diff --git a/app/models/note.rb b/app/models/note.rb index 9b0a7211b4e..b6b2ac6aa42 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -69,7 +69,7 @@ class Note < ActiveRecord::Base project: [:project_members, { group: [:group_members] }]) end - before_validation :clear_blank_line_code! + before_validation :nullify_blank_type, :nullify_blank_line_code after_save :keep_around_commit class << self @@ -217,10 +217,6 @@ class Note < ActiveRecord::Base !system? end - def clear_blank_line_code! - self.line_code = nil if self.line_code.blank? - end - def can_be_award_emoji? noteable.is_a?(Awardable) end @@ -238,4 +234,12 @@ class Note < ActiveRecord::Base def keep_around_commit project.repository.keep_around(self.commit_id) end + + def nullify_blank_type + self.type = nil if self.type.blank? + end + + def nullify_blank_line_code + self.line_code = nil if self.line_code.blank? + end end diff --git a/db/migrate/20160722221922_nullify_blank_type_on_notes.rb b/db/migrate/20160722221922_nullify_blank_type_on_notes.rb new file mode 100644 index 00000000000..c4b78e8e15c --- /dev/null +++ b/db/migrate/20160722221922_nullify_blank_type_on_notes.rb @@ -0,0 +1,9 @@ +class NullifyBlankTypeOnNotes < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + execute "UPDATE notes SET type = NULL WHERE type = ''" + end +end -- cgit v1.2.1 From 70ab2f72c6d36c662bbb20d5d7ccdc7b713e99b2 Mon Sep 17 00:00:00 2001 From: Scott Le Date: Thu, 21 Jul 2016 11:08:50 +0700 Subject: remove search_id for label dropdown filter --- CHANGELOG | 1 + app/views/shared/issuable/_label_page_default.html.haml | 2 +- spec/features/issues/filter_by_labels_spec.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 971a709e4c1..1144ff10c38 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ v 8.11.0 (unreleased) - Retrieve rendered HTML from cache in one request - Load project invited groups and members eagerly in ProjectTeam#fetch_members - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) + - Remove `search_id` of labels dropdown filter to fix 'Missleading URI for labels in Merge Requests and Issues view' !5368 (Scott Le) v 8.10.1 (unreleased) - Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page diff --git a/app/views/shared/issuable/_label_page_default.html.haml b/app/views/shared/issuable/_label_page_default.html.haml index 0acb8253139..4e280c371ac 100644 --- a/app/views/shared/issuable/_label_page_default.html.haml +++ b/app/views/shared/issuable/_label_page_default.html.haml @@ -4,7 +4,7 @@ - filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search labels') .dropdown-page-one = dropdown_title(title) - = dropdown_filter(filter_placeholder, search_id: "label-name") + = dropdown_filter(filter_placeholder) = dropdown_content - if @project && show_footer = dropdown_footer do diff --git a/spec/features/issues/filter_by_labels_spec.rb b/spec/features/issues/filter_by_labels_spec.rb index 5ea02b8d39c..cb117d2476f 100644 --- a/spec/features/issues/filter_by_labels_spec.rb +++ b/spec/features/issues/filter_by_labels_spec.rb @@ -205,7 +205,7 @@ feature 'Issue filtering by Labels', feature: true do page.within '.labels-filter' do click_button 'Label' wait_for_ajax - fill_in 'label-name', with: 'bug' + find('.dropdown-input input').set 'bug' page.within '.dropdown-content' do expect(page).not_to have_content 'enhancement' -- cgit v1.2.1 From 8d73c7613178f5d46ff91a81f7783ca907deb64a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 23 Jul 2016 21:01:23 -0700 Subject: Ignore invalid trusted proxies in X-Forwarded-For header Certain reverse proxies can send invalid IP addresses in the X-Forwarded-For header For example, Apache can send (null). Closes #20194 --- CHANGELOG | 3 ++- config/initializers/trusted_proxies.rb | 10 ++++++++-- spec/initializers/trusted_proxies_spec.rb | 6 ++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 971a709e4c1..973d1ae886c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,7 +8,8 @@ v 8.11.0 (unreleased) - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) v 8.10.1 (unreleased) - - Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page + - Ignore invalid trusted proxies in X-Forwarded-For header + - Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page v 8.10.0 - Fix profile activity heatmap to show correct day name (eanplatter) diff --git a/config/initializers/trusted_proxies.rb b/config/initializers/trusted_proxies.rb index df4a933e22f..30770b71e24 100644 --- a/config/initializers/trusted_proxies.rb +++ b/config/initializers/trusted_proxies.rb @@ -11,6 +11,12 @@ module Rack end end +gitlab_trusted_proxies = Array(Gitlab.config.gitlab.trusted_proxies).map do |proxy| + begin + IPAddr.new(proxy) + rescue IPAddr::InvalidAddressError + end +end.compact + Rails.application.config.action_dispatch.trusted_proxies = ( - [ '127.0.0.1', '::1' ] + Array(Gitlab.config.gitlab.trusted_proxies) -).map { |proxy| IPAddr.new(proxy) } + [ '127.0.0.1', '::1' ] + gitlab_trusted_proxies) diff --git a/spec/initializers/trusted_proxies_spec.rb b/spec/initializers/trusted_proxies_spec.rb index 14c8df954a6..52d5a7dffc9 100644 --- a/spec/initializers/trusted_proxies_spec.rb +++ b/spec/initializers/trusted_proxies_spec.rb @@ -17,6 +17,12 @@ describe 'trusted_proxies', lib: true do expect(request.remote_ip).to eq('10.1.5.89') expect(request.ip).to eq('10.1.5.89') end + + it 'filters out bad values' do + request = stub_request('HTTP_X_FORWARDED_FOR' => '(null), 10.1.5.89') + expect(request.remote_ip).to eq('10.1.5.89') + expect(request.ip).to eq('10.1.5.89') + end end context 'with private IP ranges added' do -- cgit v1.2.1 From 58c562a951e6417d824864b35c7518f67b2996dc Mon Sep 17 00:00:00 2001 From: winniehell Date: Wed, 20 Jul 2016 22:02:40 +0200 Subject: Remove magic comments from Ruby files (!5456) --- CHANGELOG | 1 + app/helpers/commits_helper.rb | 1 - app/uploaders/artifact_uploader.rb | 1 - app/uploaders/attachment_uploader.rb | 2 -- app/uploaders/avatar_uploader.rb | 2 -- app/uploaders/file_uploader.rb | 1 - app/uploaders/lfs_object_uploader.rb | 2 -- spec/lib/banzai/filter/relative_link_filter_spec.rb | 2 -- spec/lib/banzai/filter/table_of_contents_filter_spec.rb | 2 -- spec/lib/banzai/filter/upload_link_filter_spec.rb | 2 -- 10 files changed, 1 insertion(+), 15 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 971a709e4c1..eaa5ac10fab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.11.0 (unreleased) + - Remove magic comments (`# encoding: UTF-8`) from Ruby files !5456 (winniehell) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check - Retrieve rendered HTML from cache in one request diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 052ce56809e..f497626e21a 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -1,4 +1,3 @@ -# encoding: utf-8 module CommitsHelper # Returns a link to the commit author. If the author has a matching user and # is a member of the current @project it will link to the team member page. diff --git a/app/uploaders/artifact_uploader.rb b/app/uploaders/artifact_uploader.rb index 1cd93263c9f..b6c52ddac7a 100644 --- a/app/uploaders/artifact_uploader.rb +++ b/app/uploaders/artifact_uploader.rb @@ -1,4 +1,3 @@ -# encoding: utf-8 class ArtifactUploader < CarrierWave::Uploader::Base storage :file diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb index a65a896e41e..fb3b5dfecd0 100644 --- a/app/uploaders/attachment_uploader.rb +++ b/app/uploaders/attachment_uploader.rb @@ -1,5 +1,3 @@ -# encoding: utf-8 - class AttachmentUploader < CarrierWave::Uploader::Base include UploaderHelper diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb index 03d9329a14e..71ff14a3f20 100644 --- a/app/uploaders/avatar_uploader.rb +++ b/app/uploaders/avatar_uploader.rb @@ -1,5 +1,3 @@ -# encoding: utf-8 - class AvatarUploader < CarrierWave::Uploader::Base include UploaderHelper diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb index 2f5f49f7de7..3ac6030c21c 100644 --- a/app/uploaders/file_uploader.rb +++ b/app/uploaders/file_uploader.rb @@ -1,4 +1,3 @@ -# encoding: utf-8 class FileUploader < CarrierWave::Uploader::Base include UploaderHelper MARKDOWN_PATTERN = %r{\!?\[.*?\]\(/uploads/(?[0-9a-f]{32})/(?.*?)\)} diff --git a/app/uploaders/lfs_object_uploader.rb b/app/uploaders/lfs_object_uploader.rb index 046a1d641a9..4f356dd663e 100644 --- a/app/uploaders/lfs_object_uploader.rb +++ b/app/uploaders/lfs_object_uploader.rb @@ -1,5 +1,3 @@ -# encoding: utf-8 - class LfsObjectUploader < CarrierWave::Uploader::Base storage :file diff --git a/spec/lib/banzai/filter/relative_link_filter_spec.rb b/spec/lib/banzai/filter/relative_link_filter_spec.rb index b9e4a4eaf0e..2401875a057 100644 --- a/spec/lib/banzai/filter/relative_link_filter_spec.rb +++ b/spec/lib/banzai/filter/relative_link_filter_spec.rb @@ -1,5 +1,3 @@ -# encoding: UTF-8 - require 'spec_helper' describe Banzai::Filter::RelativeLinkFilter, lib: true do diff --git a/spec/lib/banzai/filter/table_of_contents_filter_spec.rb b/spec/lib/banzai/filter/table_of_contents_filter_spec.rb index 6a5d003e87f..356dd01a03a 100644 --- a/spec/lib/banzai/filter/table_of_contents_filter_spec.rb +++ b/spec/lib/banzai/filter/table_of_contents_filter_spec.rb @@ -1,5 +1,3 @@ -# encoding: UTF-8 - require 'spec_helper' describe Banzai::Filter::TableOfContentsFilter, lib: true do diff --git a/spec/lib/banzai/filter/upload_link_filter_spec.rb b/spec/lib/banzai/filter/upload_link_filter_spec.rb index 273d2ed709a..8b76c1d73c9 100644 --- a/spec/lib/banzai/filter/upload_link_filter_spec.rb +++ b/spec/lib/banzai/filter/upload_link_filter_spec.rb @@ -1,5 +1,3 @@ -# encoding: UTF-8 - require 'spec_helper' describe Banzai::Filter::UploadLinkFilter, lib: true do -- cgit v1.2.1 From 1526ead664a1840828e08a1884463ec53f739765 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 24 Jul 2016 11:23:40 +0300 Subject: Add links to the real markdown.md file for all GFM examples --- doc/markdown/markdown.md | 65 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md index 1761487b6ca..c6c7ac81c0d 100644 --- a/doc/markdown/markdown.md +++ b/doc/markdown/markdown.md @@ -1,10 +1,5 @@ # Markdown -> **Note:** -> Not all of the GitLab-specific extensions to Markdown that are described in this document currently work on our documentation website. -> -> For the best result, we encourage you to check this document out as rendered by GitLab: [markdown.md](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md). - ## Table of Contents **[GitLab Flavored Markdown](#gitlab-flavored-markdown-gfm)** @@ -37,26 +32,39 @@ ## GitLab Flavored Markdown (GFM) +> **Note:** +Not all of the GitLab-specific extensions to Markdown that are described in +this document currently work on our documentation website. +> +For the best result, we encourage you to check this document out as rendered +by GitLab: [markdown.md] + _GitLab uses the [Redcarpet Ruby library][redcarpet] for Markdown processing._ GitLab uses "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few significant ways to add some useful functionality. It was inspired by [GitHub Flavored Markdown](https://help.github.com/articles/basic-writing-and-formatting-syntax/). -You can use GFM in +You can use GFM in the following areas: - comments - issues - merge requests - milestones +- snippets (the snippet must be named with a `.md` extension) - wiki pages +- markdown documents inside the repository -You can also use other rich text files in GitLab. You might have to install a dependency to do so. Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information. +You can also use other rich text files in GitLab. You might have to install a +dependency to do so. Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information. ## Newlines +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#newlines + GFM honors the markdown specification in how [paragraphs and line breaks are handled](https://daringfireball.net/projects/markdown/syntax#p). A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. -Line-breaks, or softreturns, are rendered if you end a line with two or more spaces +Line-breaks, or softreturns, are rendered if you end a line with two or more spaces: Roses are red [followed by two or more spaces] Violets are blue @@ -70,17 +78,25 @@ Sugar is sweet ## Multiple underscores in words -It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words. +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#multiple-underscores-in-words + +It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words: perform_complicated_task + do_this_and_do_that_and_another_thing perform_complicated_task + do_this_and_do_that_and_another_thing ## URL auto-linking -GFM will autolink almost any URL you copy and paste into your text. +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#url-auto-linking + +GFM will autolink almost any URL you copy and paste into your text: * https://www.google.com * https://google.com/ @@ -98,8 +114,11 @@ GFM will autolink almost any URL you copy and paste into your text. ## Multiline Blockquote +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#multiline-blockquote + On top of standard Markdown [blockquotes](#blockquotes), which require prepending `>` to quoted lines, -GFM supports multiline blockquotes fenced by >>>. +GFM supports multiline blockquotes fenced by >>>: ```no-highlight >>> @@ -129,10 +148,15 @@ you can quote that without having to manually prepend `>` to every line! ## Code and Syntax Highlighting +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#code-and-syntax-highlighting + _GitLab uses the [Rouge Ruby library][rouge] for syntax highlighting. For a list of supported languages visit the Rouge website._ -Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. Only the fenced code blocks support syntax highlighting. +Blocks of code are either fenced by lines with three back-ticks ```, +or are indented with four spaces. Only the fenced code blocks support syntax +highlighting: ```no-highlight Inline `code` has `back-ticks around` it. @@ -194,6 +218,9 @@ But let's throw in a tag. ## Inline Diff +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#inline-diff + With inline diffs tags you can display {+ additions +} or [- deletions -]. The wrapping tags can be either curly braces or square brackets [+ additions +] or {- deletions -}. @@ -207,6 +234,9 @@ However the wrapping tags cannot be mixed as such: ## Emoji +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#emoji + Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you: :zap: You can use emoji anywhere GFM is supported. :v: @@ -269,6 +299,9 @@ GFM also recognizes certain cross-project references: ## Task Lists +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#task-lists + You can add task lists to issues, merge requests and comments. To create a task list, add a specially-formatted Markdown list, like so: ```no-highlight @@ -289,6 +322,9 @@ Task lists can only be created in descriptions, not in titles. Task item state c ## Videos +> If this is not rendered correctly, see +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#videos + Image tags with a video extension are automatically converted to a video player. The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, and `.ogv`. @@ -604,7 +640,7 @@ This line is separated from the one above by two newlines, so it will be a *sepa This line is also a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the *same paragraph*. -This line is also a separate paragraph, and... +This line is also a separate paragraph, and... This line is on its own line, because the previous line ends with two spaces. ``` @@ -616,7 +652,7 @@ This line is separated from the one above by two newlines, so it will be a *sepa This line is also begins a separate paragraph, but... This line is only separated by a single newline, so it's a separate line in the *same paragraph*. -This line is also a separate paragraph, and... +This line is also a separate paragraph, and... This line is on its own line, because the previous line ends with two spaces. @@ -662,6 +698,7 @@ By including colons in the header row, you can align the text within that column - The [Markdown Syntax Guide](https://daringfireball.net/projects/markdown/syntax) at Daring Fireball is an excellent resource for a detailed explanation of standard markdown. - [Dillinger.io](http://dillinger.io) is a handy tool for testing standard markdown. +[markdown.md]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md [rouge]: http://rouge.jneen.net/ "Rouge website" [redcarpet]: https://github.com/vmg/redcarpet "Redcarpet website" [^1]: This link will be broken if you see this document from the Help page or docs.gitlab.com -- cgit v1.2.1 From af84629715a6be8cc0b2c3c9bbd59ca89cc31f78 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 22 Jul 2016 13:51:37 -0700 Subject: Fix Error 500 when creating Wiki pages with hyphens or spaces Closes gitlab-com/support-forum#874 --- CHANGELOG | 3 +++ app/views/layouts/project.html.haml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 971a709e4c1..fdd140d5e44 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,9 @@ v 8.11.0 (unreleased) v 8.10.1 (unreleased) - Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page +v 8.10.1 (unreleased) + - Fix Error 500 when creating Wiki pages with hyphens or spaces + v 8.10.0 - Fix profile activity heatmap to show correct day name (eanplatter) - Speed up ExternalWikiHelper#get_project_wiki_path diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index d03d5e2ca6a..28cb6c56650 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -5,8 +5,8 @@ - content_for :scripts_body_top do - project = @target_project || @project - - if @project_wiki && @page - - markdown_preview_path = namespace_project_wiki_markdown_preview_path(project.namespace, project, @page.title) + - if @project_wiki && @page && @page.slug.present? + - markdown_preview_path = namespace_project_wiki_markdown_preview_path(project.namespace, project, @page.slug) - else - markdown_preview_path = markdown_preview_namespace_project_path(project.namespace, project) - if current_user -- cgit v1.2.1 From 030a5d880e14649d6e8d0f36fb77eaee9a6daf25 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 24 Jul 2016 05:57:26 -0700 Subject: Add spec for dashes in paths --- features/steps/project/wiki.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 5ad82a9b3c1..732dc5d0b93 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -130,15 +130,15 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps step 'I create a New page with paths' do click_on 'New Page' - fill_in 'Page slug', with: 'one/two/three' + fill_in 'Page slug', with: 'one/two/three-test' click_on 'Create Page' fill_in "wiki_content", with: 'wiki content' click_on "Create page" - expect(current_path).to include 'one/two/three' + expect(current_path).to include 'one/two/three-test' end step 'I should see non-escaped link in the pages list' do - expect(page).to have_xpath("//a[@href='/#{project.path_with_namespace}/wikis/one/two/three']") + expect(page).to have_xpath("//a[@href='/#{project.path_with_namespace}/wikis/one/two/three-test']") end step 'I edit the Wiki page with a path' do @@ -147,7 +147,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I should see a non-escaped path' do - expect(current_path).to include 'one/two/three' + expect(current_path).to include 'one/two/three-test' end step 'I should see the Editing page' do -- cgit v1.2.1 From 58178a4f0cfc388be0d2f97906bece56ac4c543c Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 24 Jul 2016 07:15:50 -0700 Subject: Fix CHANGELOG --- CHANGELOG | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index fdd140d5e44..bd116bdc0c9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,8 +9,6 @@ v 8.11.0 (unreleased) v 8.10.1 (unreleased) - Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page - -v 8.10.1 (unreleased) - Fix Error 500 when creating Wiki pages with hyphens or spaces v 8.10.0 -- cgit v1.2.1 From 3dc8075af5ea3796e8ff41f6616c94814abe5e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Sun, 24 Jul 2016 18:45:14 +0000 Subject: =?UTF-8?q?Revert=20"Merge=20branch=20'17073-tagscontroller-index-?= =?UTF-8?q?is-terrible-response-time-goes-up-to-5-=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts merge request !5375 --- CHANGELOG | 1 - Gemfile | 2 +- Gemfile.lock | 4 ++-- app/models/repository.rb | 25 +++++++++++-------------- app/services/delete_branch_service.rb | 2 +- app/services/delete_tag_service.rb | 2 +- app/services/git_tag_push_service.rb | 4 ++-- app/views/projects/branches/_commit.html.haml | 2 +- spec/models/repository_spec.rb | 26 ++++++++++++++++++++------ 9 files changed, 39 insertions(+), 29 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 971a709e4c1..4c504d9895b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -87,7 +87,6 @@ v 8.10.0 - API: Todos. !3188 (Robert Schilling) - API: Expose shared groups for projects and shared projects for groups. !5050 (Robert Schilling) - API: Expose `developers_can_push` and `developers_can_merge` for branches. !5208 (Robert Schilling) - - Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects - Add "Enabled Git access protocols" to Application Settings - Diffs will create button/diff form on demand no on server side - Reduce size of HTML used by diff comment forms diff --git a/Gemfile b/Gemfile index 0504e643ed7..92e666c1bb7 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem 'gitlab_git', '~> 10.4.1' +gem 'gitlab_git', '~> 10.3.2' # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index 195516d1bf1..e2b3d55ee0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -274,7 +274,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16, < 3) posix-spawn (~> 0.3) - gitlab_git (10.4.1) + gitlab_git (10.3.2) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) @@ -861,7 +861,7 @@ DEPENDENCIES github-linguist (~> 4.7.0) github-markup (~> 1.4) gitlab-flowdock-git-hook (~> 1.0.1) - gitlab_git (~> 10.4.1) + gitlab_git (~> 10.3.2) gitlab_meta (= 7.0) gitlab_omniauth-ldap (~> 1.2.1) gollum-lib (~> 4.2) diff --git a/app/models/repository.rb b/app/models/repository.rb index 1d3df6f9eaf..793b1cf4989 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -70,12 +70,7 @@ class Repository def commit(ref = 'HEAD') return nil unless exists? - commit = - if ref.is_a?(Gitlab::Git::Commit) - ref - else - Gitlab::Git::Commit.find(raw_repository, ref) - end + commit = Gitlab::Git::Commit.find(raw_repository, ref) commit = ::Commit.new(commit, @project) if commit commit rescue Rugged::OdbError @@ -261,10 +256,10 @@ class Repository # Rugged seems to throw a `ReferenceError` when given branch_names rather # than SHA-1 hashes number_commits_behind = raw_repository. - count_commits_between(branch.target.sha, root_ref_hash) + count_commits_between(branch.target, root_ref_hash) number_commits_ahead = raw_repository. - count_commits_between(root_ref_hash, branch.target.sha) + count_commits_between(root_ref_hash, branch.target) { behind: number_commits_behind, ahead: number_commits_ahead } end @@ -688,7 +683,9 @@ class Repository end def local_branches - @local_branches ||= raw_repository.local_branches + @local_branches ||= rugged.branches.each(:local).map do |branch| + Gitlab::Git::Branch.new(branch.name, branch.target) + end end alias_method :branches, :local_branches @@ -829,7 +826,7 @@ class Repository end def revert(user, commit, base_branch, revert_tree_id = nil) - source_sha = find_branch(base_branch).target.sha + source_sha = find_branch(base_branch).target revert_tree_id ||= check_revert_content(commit, base_branch) return false unless revert_tree_id @@ -846,7 +843,7 @@ class Repository end def cherry_pick(user, commit, base_branch, cherry_pick_tree_id = nil) - source_sha = find_branch(base_branch).target.sha + source_sha = find_branch(base_branch).target cherry_pick_tree_id ||= check_cherry_pick_content(commit, base_branch) return false unless cherry_pick_tree_id @@ -867,7 +864,7 @@ class Repository end def check_revert_content(commit, base_branch) - source_sha = find_branch(base_branch).target.sha + source_sha = find_branch(base_branch).target args = [commit.id, source_sha] args << { mainline: 1 } if commit.merge_commit? @@ -881,7 +878,7 @@ class Repository end def check_cherry_pick_content(commit, base_branch) - source_sha = find_branch(base_branch).target.sha + source_sha = find_branch(base_branch).target args = [commit.id, source_sha] args << 1 if commit.merge_commit? @@ -1046,7 +1043,7 @@ class Repository end def tags_sorted_by_committed_date - tags.sort_by { |tag| tag.target.committed_date } + tags.sort_by { |tag| commit(tag.target).committed_date } end def keep_around_ref_name(sha) diff --git a/app/services/delete_branch_service.rb b/app/services/delete_branch_service.rb index 87f066edb6f..332c55581a1 100644 --- a/app/services/delete_branch_service.rb +++ b/app/services/delete_branch_service.rb @@ -40,6 +40,6 @@ class DeleteBranchService < BaseService def build_push_data(branch) Gitlab::PushDataBuilder - .build(project, current_user, branch.target.sha, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch.name}", []) + .build(project, current_user, branch.target, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch.name}", []) end end diff --git a/app/services/delete_tag_service.rb b/app/services/delete_tag_service.rb index 32e0eed6b63..1e41fbe34b6 100644 --- a/app/services/delete_tag_service.rb +++ b/app/services/delete_tag_service.rb @@ -34,6 +34,6 @@ class DeleteTagService < BaseService def build_push_data(tag) Gitlab::PushDataBuilder - .build(project, current_user, tag.target.sha, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::TAG_REF_PREFIX}#{tag.name}", []) + .build(project, current_user, tag.target, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::TAG_REF_PREFIX}#{tag.name}", []) end end diff --git a/app/services/git_tag_push_service.rb b/app/services/git_tag_push_service.rb index 969530c4fdc..58573078048 100644 --- a/app/services/git_tag_push_service.rb +++ b/app/services/git_tag_push_service.rb @@ -26,8 +26,8 @@ class GitTagPushService < BaseService unless Gitlab::Git.blank_ref?(params[:newrev]) tag_name = Gitlab::Git.ref_name(params[:ref]) tag = project.repository.find_tag(tag_name) - - if tag && tag.object_sha == params[:newrev] + + if tag && tag.target == params[:newrev] commit = project.commit(tag.target) commits = [commit].compact message = tag.message diff --git a/app/views/projects/branches/_commit.html.haml b/app/views/projects/branches/_commit.html.haml index d54c76ff9c8..9fe65cbb104 100644 --- a/app/views/projects/branches/_commit.html.haml +++ b/app/views/projects/branches/_commit.html.haml @@ -1,5 +1,5 @@ .branch-commit - = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-id monospace" + = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-id monospace" · %span.str-truncated = link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message" diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 9b21d030416..881ab5ff8dc 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -50,9 +50,8 @@ describe Repository, models: true do double_first = double(committed_date: Time.now) double_last = double(committed_date: Time.now - 1.second) - allow(tag_a).to receive(:target).and_return(double_first) - allow(tag_b).to receive(:target).and_return(double_last) - allow(repository).to receive(:tags).and_return([tag_a, tag_b]) + allow(repository).to receive(:commit).with(tag_a.target).and_return(double_first) + allow(repository).to receive(:commit).with(tag_b.target).and_return(double_last) end it { is_expected.to eq(['v1.0.0', 'v1.1.0']) } @@ -65,9 +64,8 @@ describe Repository, models: true do double_first = double(committed_date: Time.now - 1.second) double_last = double(committed_date: Time.now) - allow(tag_a).to receive(:target).and_return(double_last) - allow(tag_b).to receive(:target).and_return(double_first) - allow(repository).to receive(:tags).and_return([tag_a, tag_b]) + allow(repository).to receive(:commit).with(tag_a.target).and_return(double_last) + allow(repository).to receive(:commit).with(tag_b.target).and_return(double_first) end it { is_expected.to eq(['v1.1.0', 'v1.0.0']) } @@ -1163,6 +1161,17 @@ describe Repository, models: true do end end + describe '#local_branches' do + it 'returns the local branches' do + masterrev = repository.find_branch('master').target + create_remote_branch('joe', 'remote_branch', masterrev) + repository.add_branch(user, 'local_branch', masterrev) + + expect(repository.local_branches.any? { |branch| branch.name == 'remote_branch' }).to eq(false) + expect(repository.local_branches.any? { |branch| branch.name == 'local_branch' }).to eq(true) + end + end + describe "#keep_around" do it "does not fail if we attempt to reference bad commit" do expect(repository.kept_around?('abc1234')).to be_falsey @@ -1190,4 +1199,9 @@ describe Repository, models: true do File.delete(path) end end + + def create_remote_branch(remote_name, branch_name, target) + rugged = repository.rugged + rugged.references.create("refs/remotes/#{remote_name}/#{branch_name}", target) + end end -- cgit v1.2.1 From 3992981ee45406be04a5fa8822c30e2f6d6512da Mon Sep 17 00:00:00 2001 From: winniehell Date: Sun, 24 Jul 2016 22:30:50 +0200 Subject: Make fork counter always clickable (!5463) --- CHANGELOG | 1 + app/views/projects/buttons/_fork.html.haml | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4c504d9895b..e689fc5fd64 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check - Retrieve rendered HTML from cache in one request + - Make fork counter always clickable !5463 (winniehell) - Load project invited groups and members eagerly in ProjectTeam#fetch_members - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml index a098a082854..d78888e9fe4 100644 --- a/app/views/projects/buttons/_fork.html.haml +++ b/app/views/projects/buttons/_fork.html.haml @@ -4,15 +4,11 @@ = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn has-tooltip' do = custom_icon('icon_fork') Fork - %div.count-with-arrow - %span.arrow - %span.count - = @project.forks_count - else = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn has-tooltip' do = custom_icon('icon_fork') Fork - %div.count-with-arrow - %span.arrow - = link_to namespace_project_forks_path(@project.namespace, @project), class: "count" do - = @project.forks_count + %div.count-with-arrow + %span.arrow + = link_to namespace_project_forks_path(@project.namespace, @project), class: "count" do + = @project.forks_count -- cgit v1.2.1 From aaa9509d120524573085e94af9de5cdde83e3271 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Sun, 24 Jul 2016 23:45:11 +0300 Subject: ES6ify all the things! --- app/assets/javascripts/LabelManager.js | 110 +++ app/assets/javascripts/LabelManager.js.coffee | 92 -- app/assets/javascripts/activities.js | 40 + app/assets/javascripts/activities.js.coffee | 24 - app/assets/javascripts/admin.js | 64 ++ app/assets/javascripts/admin.js.coffee | 51 -- app/assets/javascripts/api.js | 136 +++ app/assets/javascripts/api.js.coffee | 122 --- app/assets/javascripts/application.js | 320 +++++++ app/assets/javascripts/application.js.coffee | 310 ------- app/assets/javascripts/aside.js | 26 + app/assets/javascripts/aside.js.coffee | 16 - app/assets/javascripts/autosave.js | 63 ++ app/assets/javascripts/autosave.js.coffee | 39 - app/assets/javascripts/awards_handler.coffee | 372 -------- app/assets/javascripts/awards_handler.js | 380 ++++++++ app/assets/javascripts/behaviors/autosize.js | 30 + .../javascripts/behaviors/autosize.js.coffee | 22 - .../javascripts/behaviors/details_behavior.coffee | 15 - .../javascripts/behaviors/details_behavior.js | 15 + app/assets/javascripts/behaviors/quick_submit.js | 58 ++ .../javascripts/behaviors/quick_submit.js.coffee | 56 -- app/assets/javascripts/behaviors/requires_input.js | 45 + .../javascripts/behaviors/requires_input.js.coffee | 52 -- .../javascripts/behaviors/toggler_behavior.coffee | 14 - .../javascripts/behaviors/toggler_behavior.js | 10 + app/assets/javascripts/blob/blob_ci_yaml.js | 46 + app/assets/javascripts/blob/blob_ci_yaml.js.coffee | 23 - app/assets/javascripts/blob/blob_file_dropzone.js | 62 ++ .../javascripts/blob/blob_file_dropzone.js.coffee | 57 -- .../javascripts/blob/blob_gitignore_selector.js | 23 + .../blob/blob_gitignore_selector.js.coffee | 5 - .../javascripts/blob/blob_gitignore_selectors.js | 25 + .../blob/blob_gitignore_selectors.js.coffee | 17 - .../javascripts/blob/blob_license_selector.js | 28 + .../blob/blob_license_selector.js.coffee | 9 - .../javascripts/blob/blob_license_selectors.js | 25 + .../blob/blob_license_selectors.js.coffee | 17 - app/assets/javascripts/blob/edit_blob.js | 66 ++ app/assets/javascripts/blob/edit_blob.js.coffee | 42 - app/assets/javascripts/blob/template_selector.js | 74 ++ .../javascripts/blob/template_selector.js.coffee | 60 -- app/assets/javascripts/breakpoints.coffee | 37 - app/assets/javascripts/breakpoints.js | 68 ++ app/assets/javascripts/broadcast_message.js | 34 + app/assets/javascripts/broadcast_message.js.coffee | 22 - app/assets/javascripts/build.coffee | 114 --- app/assets/javascripts/build.js | 139 +++ app/assets/javascripts/build_artifacts.js | 27 + app/assets/javascripts/build_artifacts.js.coffee | 14 - app/assets/javascripts/commit.js | 13 + app/assets/javascripts/commit.js.coffee | 4 - app/assets/javascripts/commit/file.js | 13 + app/assets/javascripts/commit/file.js.coffee | 5 - app/assets/javascripts/commit/image-file.js | 175 ++++ app/assets/javascripts/commit/image-file.js.coffee | 127 --- app/assets/javascripts/commits.js | 58 ++ app/assets/javascripts/commits.js.coffee | 39 - app/assets/javascripts/compare.js | 91 ++ app/assets/javascripts/compare.js.coffee | 67 -- app/assets/javascripts/compare_autocomplete.js | 51 ++ .../javascripts/compare_autocomplete.js.coffee | 41 - app/assets/javascripts/confirm_danger_modal.js | 32 + .../javascripts/confirm_danger_modal.js.coffee | 20 - app/assets/javascripts/copy_to_clipboard.js | 42 + app/assets/javascripts/copy_to_clipboard.js.coffee | 37 - app/assets/javascripts/diff.js | 77 ++ app/assets/javascripts/diff.js.coffee | 51 -- app/assets/javascripts/dispatcher.js | 255 ++++++ app/assets/javascripts/dispatcher.js.coffee | 171 ---- app/assets/javascripts/dropzone_input.js | 219 +++++ app/assets/javascripts/dropzone_input.js.coffee | 201 ----- app/assets/javascripts/due_date_select.js | 104 +++ app/assets/javascripts/due_date_select.js.coffee | 99 --- app/assets/javascripts/extensions/jquery.js | 14 + app/assets/javascripts/extensions/jquery.js.coffee | 11 - app/assets/javascripts/files_comment_button.js | 141 +++ .../javascripts/files_comment_button.js.coffee | 98 --- app/assets/javascripts/flash.js | 43 + app/assets/javascripts/flash.js.coffee | 28 - app/assets/javascripts/gfm_auto_complete.js | 272 ++++++ app/assets/javascripts/gfm_auto_complete.js.coffee | 228 ----- app/assets/javascripts/gl_dropdown.js | 705 +++++++++++++++ app/assets/javascripts/gl_dropdown.js.coffee | 638 -------------- app/assets/javascripts/gl_form.js | 53 ++ app/assets/javascripts/gl_form.js.coffee | 54 -- app/assets/javascripts/graphs/graphs_bundle.js | 7 + .../javascripts/graphs/graphs_bundle.js.coffee | 7 - app/assets/javascripts/graphs/stat_graph.js | 19 + app/assets/javascripts/graphs/stat_graph.js.coffee | 6 - .../javascripts/graphs/stat_graph_contributors.js | 112 +++ .../graphs/stat_graph_contributors.js.coffee | 71 -- .../graphs/stat_graph_contributors_graph.js | 279 ++++++ .../graphs/stat_graph_contributors_graph.js.coffee | 173 ---- .../graphs/stat_graph_contributors_util.js | 135 +++ .../graphs/stat_graph_contributors_util.js.coffee | 98 --- app/assets/javascripts/group_avatar.js | 21 + app/assets/javascripts/group_avatar.js.coffee | 9 - app/assets/javascripts/groups.js | 13 + app/assets/javascripts/groups.js.coffee | 4 - app/assets/javascripts/groups_select.js | 67 ++ app/assets/javascripts/groups_select.js.coffee | 41 - app/assets/javascripts/importer_status.js | 69 ++ app/assets/javascripts/importer_status.js.coffee | 53 -- app/assets/javascripts/issuable.js | 89 ++ app/assets/javascripts/issuable.js.coffee | 93 -- app/assets/javascripts/issuable_context.js | 69 ++ app/assets/javascripts/issuable_context.js.coffee | 60 -- app/assets/javascripts/issuable_form.js | 136 +++ app/assets/javascripts/issuable_form.js.coffee | 112 --- app/assets/javascripts/issue.js | 154 ++++ app/assets/javascripts/issue.js.coffee | 117 --- app/assets/javascripts/issue_status_select.js | 35 + .../javascripts/issue_status_select.js.coffee | 18 - app/assets/javascripts/issues-bulk-assignment.js | 161 ++++ .../javascripts/issues-bulk-assignment.js.coffee | 128 --- app/assets/javascripts/labels.js | 44 + app/assets/javascripts/labels.js.coffee | 28 - app/assets/javascripts/labels_select.js | 377 ++++++++ app/assets/javascripts/labels_select.js.coffee | 386 --------- app/assets/javascripts/layout_nav.js | 27 + app/assets/javascripts/layout_nav.js.coffee | 24 - app/assets/javascripts/lib/chart.js | 7 + app/assets/javascripts/lib/chart.js.coffee | 1 - app/assets/javascripts/lib/cropper.js | 7 + app/assets/javascripts/lib/cropper.js.coffee | 1 - app/assets/javascripts/lib/d3.js | 7 + app/assets/javascripts/lib/d3.js.coffee | 1 - app/assets/javascripts/lib/raphael.js | 13 + app/assets/javascripts/lib/raphael.js.coffee | 3 - app/assets/javascripts/lib/utils/animate.js | 49 ++ app/assets/javascripts/lib/utils/animate.js.coffee | 39 - app/assets/javascripts/lib/utils/common_utils.js | 60 ++ .../javascripts/lib/utils/common_utils.js.coffee | 68 -- .../javascripts/lib/utils/datetime_utility.js | 36 + .../lib/utils/datetime_utility.js.coffee | 28 - app/assets/javascripts/lib/utils/notify.js | 41 + app/assets/javascripts/lib/utils/notify.js.coffee | 35 - app/assets/javascripts/lib/utils/text_utility.js | 112 +++ .../javascripts/lib/utils/text_utility.js.coffee | 105 --- app/assets/javascripts/lib/utils/type_utility.js | 15 + .../javascripts/lib/utils/type_utility.js.coffee | 9 - app/assets/javascripts/lib/utils/url_utility.js | 64 ++ .../javascripts/lib/utils/url_utility.js.coffee | 52 -- app/assets/javascripts/line_highlighter.js | 115 +++ app/assets/javascripts/line_highlighter.js.coffee | 148 ---- app/assets/javascripts/logo.js | 54 ++ app/assets/javascripts/logo.js.coffee | 44 - app/assets/javascripts/markdown_preview.js | 150 ++++ app/assets/javascripts/markdown_preview.js.coffee | 119 --- app/assets/javascripts/merge_request.js | 105 +++ app/assets/javascripts/merge_request.js.coffee | 82 -- app/assets/javascripts/merge_request_tabs.js | 239 +++++ .../javascripts/merge_request_tabs.js.coffee | 252 ------ app/assets/javascripts/merge_request_widget.js | 185 ++++ .../javascripts/merge_request_widget.js.coffee | 143 --- app/assets/javascripts/merged_buttons.js | 45 + app/assets/javascripts/merged_buttons.js.coffee | 30 - app/assets/javascripts/milestone.js | 195 +++++ app/assets/javascripts/milestone.js.coffee | 146 ---- app/assets/javascripts/milestone_select.js | 151 ++++ app/assets/javascripts/milestone_select.js.coffee | 137 --- app/assets/javascripts/namespace_select.js | 86 ++ app/assets/javascripts/namespace_select.js.coffee | 56 -- app/assets/javascripts/network/branch-graph.js | 404 +++++++++ .../javascripts/network/branch-graph.js.coffee | 340 -------- app/assets/javascripts/network/network.js | 19 + app/assets/javascripts/network/network.js.coffee | 9 - app/assets/javascripts/network/network_bundle.js | 16 + .../javascripts/network/network_bundle.js.coffee | 17 - app/assets/javascripts/new_branch_form.js | 104 +++ app/assets/javascripts/new_branch_form.js.coffee | 78 -- app/assets/javascripts/new_commit_form.js | 34 + app/assets/javascripts/new_commit_form.js.coffee | 21 - app/assets/javascripts/notes.js | 732 ++++++++++++++++ app/assets/javascripts/notes.js.coffee | 694 --------------- app/assets/javascripts/notifications_dropdown.js | 30 + .../javascripts/notifications_dropdown.js.coffee | 25 - app/assets/javascripts/notifications_form.js | 58 ++ .../javascripts/notifications_form.js.coffee | 49 -- app/assets/javascripts/pager.js | 63 ++ app/assets/javascripts/pager.js.coffee | 44 - app/assets/javascripts/profile/gl_crop.js | 169 ++++ app/assets/javascripts/profile/gl_crop.js.coffee | 152 ---- app/assets/javascripts/profile/profile.js | 102 +++ app/assets/javascripts/profile/profile.js.coffee | 83 -- app/assets/javascripts/profile/profile_bundle.js | 7 + .../javascripts/profile/profile_bundle.js.coffee | 2 - app/assets/javascripts/project.js | 103 +++ app/assets/javascripts/project.js.coffee | 91 -- app/assets/javascripts/project_avatar.js | 21 + app/assets/javascripts/project_avatar.js.coffee | 9 - app/assets/javascripts/project_find_file.js | 170 ++++ app/assets/javascripts/project_find_file.js.coffee | 125 --- app/assets/javascripts/project_fork.js | 14 + app/assets/javascripts/project_fork.js.coffee | 5 - app/assets/javascripts/project_import.js | 13 + app/assets/javascripts/project_import.js.coffee | 5 - app/assets/javascripts/project_members.js | 13 + app/assets/javascripts/project_members.js.coffee | 4 - app/assets/javascripts/project_new.js | 40 + app/assets/javascripts/project_new.js.coffee | 23 - app/assets/javascripts/project_select.js | 102 +++ app/assets/javascripts/project_select.js.coffee | 72 -- app/assets/javascripts/project_show.js | 9 + app/assets/javascripts/project_show.js.coffee | 3 - app/assets/javascripts/projects_list.js | 48 ++ app/assets/javascripts/projects_list.js.coffee | 36 - app/assets/javascripts/protected_branch_select.js | 72 ++ .../javascripts/protected_branch_select.js.coffee | 40 - app/assets/javascripts/protected_branches.js | 35 + .../javascripts/protected_branches.js.coffee | 22 - app/assets/javascripts/right_sidebar.js | 201 +++++ app/assets/javascripts/right_sidebar.js.coffee | 175 ---- app/assets/javascripts/search.js | 93 ++ app/assets/javascripts/search.js.coffee | 75 -- app/assets/javascripts/search_autocomplete.js | 360 ++++++++ .../javascripts/search_autocomplete.js.coffee | 334 ------- app/assets/javascripts/shortcuts.js | 97 +++ app/assets/javascripts/shortcuts.js.coffee | 60 -- app/assets/javascripts/shortcuts_blob.coffee | 10 - app/assets/javascripts/shortcuts_blob.js | 28 + .../javascripts/shortcuts_dashboard_navigation.js | 39 + .../shortcuts_dashboard_navigation.js.coffee | 14 - app/assets/javascripts/shortcuts_find_file.js | 35 + .../javascripts/shortcuts_find_file.js.coffee | 19 - app/assets/javascripts/shortcuts_issuable.coffee | 53 -- app/assets/javascripts/shortcuts_issuable.js | 75 ++ app/assets/javascripts/shortcuts_navigation.coffee | 23 - app/assets/javascripts/shortcuts_navigation.js | 64 ++ app/assets/javascripts/shortcuts_network.js | 27 + app/assets/javascripts/shortcuts_network.js.coffee | 12 - app/assets/javascripts/sidebar.js | 41 + app/assets/javascripts/sidebar.js.coffee | 37 - app/assets/javascripts/single_file_diff.js | 77 ++ app/assets/javascripts/single_file_diff.js.coffee | 54 -- app/assets/javascripts/star.js | 31 + app/assets/javascripts/star.js.coffee | 24 - app/assets/javascripts/subscription.js | 41 + app/assets/javascripts/subscription.js.coffee | 26 - app/assets/javascripts/subscription_select.js | 35 + .../javascripts/subscription_select.js.coffee | 18 - app/assets/javascripts/syntax_highlight.coffee | 20 - app/assets/javascripts/syntax_highlight.js | 18 + app/assets/javascripts/todos.js | 144 ++++ app/assets/javascripts/todos.js.coffee | 110 --- app/assets/javascripts/tree.js | 65 ++ app/assets/javascripts/tree.js.coffee | 50 -- app/assets/javascripts/u2f/authenticate.js | 89 ++ app/assets/javascripts/u2f/authenticate.js.coffee | 75 -- app/assets/javascripts/u2f/error.js | 27 + app/assets/javascripts/u2f/error.js.coffee | 13 - app/assets/javascripts/u2f/register.js | 87 ++ app/assets/javascripts/u2f/register.js.coffee | 63 -- app/assets/javascripts/u2f/util.js | 13 + app/assets/javascripts/u2f/util.js.coffee | 3 - app/assets/javascripts/user.js | 31 + app/assets/javascripts/user.js.coffee | 17 - app/assets/javascripts/user_tabs.js | 119 +++ app/assets/javascripts/user_tabs.js.coffee | 156 ---- app/assets/javascripts/users/calendar.js | 192 +++++ app/assets/javascripts/users/calendar.js.coffee | 194 ----- app/assets/javascripts/users/users_bundle.js | 7 + .../javascripts/users/users_bundle.js.coffee | 2 - app/assets/javascripts/users_select.js | 342 ++++++++ app/assets/javascripts/users_select.js.coffee | 330 ------- app/assets/javascripts/wikis.js | 37 + app/assets/javascripts/wikis.js.coffee | 19 - app/assets/javascripts/zen_mode.js | 80 ++ app/assets/javascripts/zen_mode.js.coffee | 80 -- spec/javascripts/application_spec.js | 32 + spec/javascripts/application_spec.js.coffee | 30 - spec/javascripts/awards_handler_spec.js | 187 ++++ spec/javascripts/awards_handler_spec.js.coffee | 200 ----- spec/javascripts/behaviors/autosize_spec.js | 21 + spec/javascripts/behaviors/autosize_spec.js.coffee | 11 - spec/javascripts/behaviors/quick_submit_spec.js | 93 ++ .../behaviors/quick_submit_spec.js.coffee | 70 -- spec/javascripts/behaviors/requires_input_spec.js | 44 + .../behaviors/requires_input_spec.js.coffee | 49 -- spec/javascripts/extensions/array_spec.js | 22 + spec/javascripts/extensions/array_spec.js.coffee | 12 - spec/javascripts/extensions/jquery_spec.js | 42 + spec/javascripts/extensions/jquery_spec.js.coffee | 34 - spec/javascripts/fixtures/emoji_menu.coffee | 957 --------------------- spec/javascripts/fixtures/emoji_menu.js | 4 + spec/javascripts/issue_spec.js | 121 +++ spec/javascripts/issue_spec.js.coffee | 109 --- spec/javascripts/line_highlighter_spec.js | 229 +++++ spec/javascripts/line_highlighter_spec.js.coffee | 158 ---- spec/javascripts/merge_request_spec.js | 28 + spec/javascripts/merge_request_spec.js.coffee | 23 - spec/javascripts/merge_request_tabs_spec.js | 106 +++ spec/javascripts/merge_request_tabs_spec.js.coffee | 88 -- spec/javascripts/merge_request_widget_spec.js | 74 ++ .../merge_request_widget_spec.js.coffee | 55 -- spec/javascripts/new_branch_spec.js | 170 ++++ spec/javascripts/new_branch_spec.js.coffee | 160 ---- spec/javascripts/notes_spec.js | 41 + spec/javascripts/notes_spec.js.coffee | 26 - spec/javascripts/project_title_spec.js | 60 ++ spec/javascripts/project_title_spec.js.coffee | 37 - spec/javascripts/right_sidebar_spec.js | 70 ++ spec/javascripts/right_sidebar_spec.js.coffee | 69 -- spec/javascripts/search_autocomplete_spec.js | 159 ++++ .../javascripts/search_autocomplete_spec.js.coffee | 149 ---- spec/javascripts/shortcuts_issuable_spec.js | 74 ++ spec/javascripts/shortcuts_issuable_spec.js.coffee | 82 -- spec/javascripts/spec_helper.coffee | 47 - spec/javascripts/spec_helper.js | 22 + spec/javascripts/syntax_highlight_spec.js | 44 + spec/javascripts/syntax_highlight_spec.js.coffee | 42 - spec/javascripts/u2f/authenticate_spec.coffee | 51 -- spec/javascripts/u2f/authenticate_spec.js | 75 ++ spec/javascripts/u2f/mock_u2f_device.js | 33 + spec/javascripts/u2f/mock_u2f_device.js.coffee | 15 - spec/javascripts/u2f/register_spec.js | 81 ++ spec/javascripts/u2f/register_spec.js.coffee | 56 -- spec/javascripts/zen_mode_spec.js | 73 ++ spec/javascripts/zen_mode_spec.js.coffee | 51 -- vendor/assets/javascripts/task_list.js | 119 +++ vendor/assets/javascripts/task_list.js.coffee | 258 ------ 322 files changed, 14719 insertions(+), 13302 deletions(-) create mode 100644 app/assets/javascripts/LabelManager.js delete mode 100644 app/assets/javascripts/LabelManager.js.coffee create mode 100644 app/assets/javascripts/activities.js delete mode 100644 app/assets/javascripts/activities.js.coffee create mode 100644 app/assets/javascripts/admin.js delete mode 100644 app/assets/javascripts/admin.js.coffee create mode 100644 app/assets/javascripts/api.js delete mode 100644 app/assets/javascripts/api.js.coffee create mode 100644 app/assets/javascripts/application.js delete mode 100644 app/assets/javascripts/application.js.coffee create mode 100644 app/assets/javascripts/aside.js delete mode 100644 app/assets/javascripts/aside.js.coffee create mode 100644 app/assets/javascripts/autosave.js delete mode 100644 app/assets/javascripts/autosave.js.coffee delete mode 100644 app/assets/javascripts/awards_handler.coffee create mode 100644 app/assets/javascripts/awards_handler.js create mode 100644 app/assets/javascripts/behaviors/autosize.js delete mode 100644 app/assets/javascripts/behaviors/autosize.js.coffee delete mode 100644 app/assets/javascripts/behaviors/details_behavior.coffee create mode 100644 app/assets/javascripts/behaviors/details_behavior.js create mode 100644 app/assets/javascripts/behaviors/quick_submit.js delete mode 100644 app/assets/javascripts/behaviors/quick_submit.js.coffee create mode 100644 app/assets/javascripts/behaviors/requires_input.js delete mode 100644 app/assets/javascripts/behaviors/requires_input.js.coffee delete mode 100644 app/assets/javascripts/behaviors/toggler_behavior.coffee create mode 100644 app/assets/javascripts/behaviors/toggler_behavior.js create mode 100644 app/assets/javascripts/blob/blob_ci_yaml.js delete mode 100644 app/assets/javascripts/blob/blob_ci_yaml.js.coffee create mode 100644 app/assets/javascripts/blob/blob_file_dropzone.js delete mode 100644 app/assets/javascripts/blob/blob_file_dropzone.js.coffee create mode 100644 app/assets/javascripts/blob/blob_gitignore_selector.js delete mode 100644 app/assets/javascripts/blob/blob_gitignore_selector.js.coffee create mode 100644 app/assets/javascripts/blob/blob_gitignore_selectors.js delete mode 100644 app/assets/javascripts/blob/blob_gitignore_selectors.js.coffee create mode 100644 app/assets/javascripts/blob/blob_license_selector.js delete mode 100644 app/assets/javascripts/blob/blob_license_selector.js.coffee create mode 100644 app/assets/javascripts/blob/blob_license_selectors.js delete mode 100644 app/assets/javascripts/blob/blob_license_selectors.js.coffee create mode 100644 app/assets/javascripts/blob/edit_blob.js delete mode 100644 app/assets/javascripts/blob/edit_blob.js.coffee create mode 100644 app/assets/javascripts/blob/template_selector.js delete mode 100644 app/assets/javascripts/blob/template_selector.js.coffee delete mode 100644 app/assets/javascripts/breakpoints.coffee create mode 100644 app/assets/javascripts/breakpoints.js create mode 100644 app/assets/javascripts/broadcast_message.js delete mode 100644 app/assets/javascripts/broadcast_message.js.coffee delete mode 100644 app/assets/javascripts/build.coffee create mode 100644 app/assets/javascripts/build.js create mode 100644 app/assets/javascripts/build_artifacts.js delete mode 100644 app/assets/javascripts/build_artifacts.js.coffee create mode 100644 app/assets/javascripts/commit.js delete mode 100644 app/assets/javascripts/commit.js.coffee create mode 100644 app/assets/javascripts/commit/file.js delete mode 100644 app/assets/javascripts/commit/file.js.coffee create mode 100644 app/assets/javascripts/commit/image-file.js delete mode 100644 app/assets/javascripts/commit/image-file.js.coffee create mode 100644 app/assets/javascripts/commits.js delete mode 100644 app/assets/javascripts/commits.js.coffee create mode 100644 app/assets/javascripts/compare.js delete mode 100644 app/assets/javascripts/compare.js.coffee create mode 100644 app/assets/javascripts/compare_autocomplete.js delete mode 100644 app/assets/javascripts/compare_autocomplete.js.coffee create mode 100644 app/assets/javascripts/confirm_danger_modal.js delete mode 100644 app/assets/javascripts/confirm_danger_modal.js.coffee create mode 100644 app/assets/javascripts/copy_to_clipboard.js delete mode 100644 app/assets/javascripts/copy_to_clipboard.js.coffee create mode 100644 app/assets/javascripts/diff.js delete mode 100644 app/assets/javascripts/diff.js.coffee create mode 100644 app/assets/javascripts/dispatcher.js delete mode 100644 app/assets/javascripts/dispatcher.js.coffee create mode 100644 app/assets/javascripts/dropzone_input.js delete mode 100644 app/assets/javascripts/dropzone_input.js.coffee create mode 100644 app/assets/javascripts/due_date_select.js delete mode 100644 app/assets/javascripts/due_date_select.js.coffee create mode 100644 app/assets/javascripts/extensions/jquery.js delete mode 100644 app/assets/javascripts/extensions/jquery.js.coffee create mode 100644 app/assets/javascripts/files_comment_button.js delete mode 100644 app/assets/javascripts/files_comment_button.js.coffee create mode 100644 app/assets/javascripts/flash.js delete mode 100644 app/assets/javascripts/flash.js.coffee create mode 100644 app/assets/javascripts/gfm_auto_complete.js delete mode 100644 app/assets/javascripts/gfm_auto_complete.js.coffee create mode 100644 app/assets/javascripts/gl_dropdown.js delete mode 100644 app/assets/javascripts/gl_dropdown.js.coffee create mode 100644 app/assets/javascripts/gl_form.js delete mode 100644 app/assets/javascripts/gl_form.js.coffee create mode 100644 app/assets/javascripts/graphs/graphs_bundle.js delete mode 100644 app/assets/javascripts/graphs/graphs_bundle.js.coffee create mode 100644 app/assets/javascripts/graphs/stat_graph.js delete mode 100644 app/assets/javascripts/graphs/stat_graph.js.coffee create mode 100644 app/assets/javascripts/graphs/stat_graph_contributors.js delete mode 100644 app/assets/javascripts/graphs/stat_graph_contributors.js.coffee create mode 100644 app/assets/javascripts/graphs/stat_graph_contributors_graph.js delete mode 100644 app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee create mode 100644 app/assets/javascripts/graphs/stat_graph_contributors_util.js delete mode 100644 app/assets/javascripts/graphs/stat_graph_contributors_util.js.coffee create mode 100644 app/assets/javascripts/group_avatar.js delete mode 100644 app/assets/javascripts/group_avatar.js.coffee create mode 100644 app/assets/javascripts/groups.js delete mode 100644 app/assets/javascripts/groups.js.coffee create mode 100644 app/assets/javascripts/groups_select.js delete mode 100644 app/assets/javascripts/groups_select.js.coffee create mode 100644 app/assets/javascripts/importer_status.js delete mode 100644 app/assets/javascripts/importer_status.js.coffee create mode 100644 app/assets/javascripts/issuable.js delete mode 100644 app/assets/javascripts/issuable.js.coffee create mode 100644 app/assets/javascripts/issuable_context.js delete mode 100644 app/assets/javascripts/issuable_context.js.coffee create mode 100644 app/assets/javascripts/issuable_form.js delete mode 100644 app/assets/javascripts/issuable_form.js.coffee create mode 100644 app/assets/javascripts/issue.js delete mode 100644 app/assets/javascripts/issue.js.coffee create mode 100644 app/assets/javascripts/issue_status_select.js delete mode 100644 app/assets/javascripts/issue_status_select.js.coffee create mode 100644 app/assets/javascripts/issues-bulk-assignment.js delete mode 100644 app/assets/javascripts/issues-bulk-assignment.js.coffee create mode 100644 app/assets/javascripts/labels.js delete mode 100644 app/assets/javascripts/labels.js.coffee create mode 100644 app/assets/javascripts/labels_select.js delete mode 100644 app/assets/javascripts/labels_select.js.coffee create mode 100644 app/assets/javascripts/layout_nav.js delete mode 100644 app/assets/javascripts/layout_nav.js.coffee create mode 100644 app/assets/javascripts/lib/chart.js delete mode 100644 app/assets/javascripts/lib/chart.js.coffee create mode 100644 app/assets/javascripts/lib/cropper.js delete mode 100644 app/assets/javascripts/lib/cropper.js.coffee create mode 100644 app/assets/javascripts/lib/d3.js delete mode 100644 app/assets/javascripts/lib/d3.js.coffee create mode 100644 app/assets/javascripts/lib/raphael.js delete mode 100644 app/assets/javascripts/lib/raphael.js.coffee create mode 100644 app/assets/javascripts/lib/utils/animate.js delete mode 100644 app/assets/javascripts/lib/utils/animate.js.coffee create mode 100644 app/assets/javascripts/lib/utils/common_utils.js delete mode 100644 app/assets/javascripts/lib/utils/common_utils.js.coffee create mode 100644 app/assets/javascripts/lib/utils/datetime_utility.js delete mode 100644 app/assets/javascripts/lib/utils/datetime_utility.js.coffee create mode 100644 app/assets/javascripts/lib/utils/notify.js delete mode 100644 app/assets/javascripts/lib/utils/notify.js.coffee create mode 100644 app/assets/javascripts/lib/utils/text_utility.js delete mode 100644 app/assets/javascripts/lib/utils/text_utility.js.coffee create mode 100644 app/assets/javascripts/lib/utils/type_utility.js delete mode 100644 app/assets/javascripts/lib/utils/type_utility.js.coffee create mode 100644 app/assets/javascripts/lib/utils/url_utility.js delete mode 100644 app/assets/javascripts/lib/utils/url_utility.js.coffee create mode 100644 app/assets/javascripts/line_highlighter.js delete mode 100644 app/assets/javascripts/line_highlighter.js.coffee create mode 100644 app/assets/javascripts/logo.js delete mode 100644 app/assets/javascripts/logo.js.coffee create mode 100644 app/assets/javascripts/markdown_preview.js delete mode 100644 app/assets/javascripts/markdown_preview.js.coffee create mode 100644 app/assets/javascripts/merge_request.js delete mode 100644 app/assets/javascripts/merge_request.js.coffee create mode 100644 app/assets/javascripts/merge_request_tabs.js delete mode 100644 app/assets/javascripts/merge_request_tabs.js.coffee create mode 100644 app/assets/javascripts/merge_request_widget.js delete mode 100644 app/assets/javascripts/merge_request_widget.js.coffee create mode 100644 app/assets/javascripts/merged_buttons.js delete mode 100644 app/assets/javascripts/merged_buttons.js.coffee create mode 100644 app/assets/javascripts/milestone.js delete mode 100644 app/assets/javascripts/milestone.js.coffee create mode 100644 app/assets/javascripts/milestone_select.js delete mode 100644 app/assets/javascripts/milestone_select.js.coffee create mode 100644 app/assets/javascripts/namespace_select.js delete mode 100644 app/assets/javascripts/namespace_select.js.coffee create mode 100644 app/assets/javascripts/network/branch-graph.js delete mode 100644 app/assets/javascripts/network/branch-graph.js.coffee create mode 100644 app/assets/javascripts/network/network.js delete mode 100644 app/assets/javascripts/network/network.js.coffee create mode 100644 app/assets/javascripts/network/network_bundle.js delete mode 100644 app/assets/javascripts/network/network_bundle.js.coffee create mode 100644 app/assets/javascripts/new_branch_form.js delete mode 100644 app/assets/javascripts/new_branch_form.js.coffee create mode 100644 app/assets/javascripts/new_commit_form.js delete mode 100644 app/assets/javascripts/new_commit_form.js.coffee create mode 100644 app/assets/javascripts/notes.js delete mode 100644 app/assets/javascripts/notes.js.coffee create mode 100644 app/assets/javascripts/notifications_dropdown.js delete mode 100644 app/assets/javascripts/notifications_dropdown.js.coffee create mode 100644 app/assets/javascripts/notifications_form.js delete mode 100644 app/assets/javascripts/notifications_form.js.coffee create mode 100644 app/assets/javascripts/pager.js delete mode 100644 app/assets/javascripts/pager.js.coffee create mode 100644 app/assets/javascripts/profile/gl_crop.js delete mode 100644 app/assets/javascripts/profile/gl_crop.js.coffee create mode 100644 app/assets/javascripts/profile/profile.js delete mode 100644 app/assets/javascripts/profile/profile.js.coffee create mode 100644 app/assets/javascripts/profile/profile_bundle.js delete mode 100644 app/assets/javascripts/profile/profile_bundle.js.coffee create mode 100644 app/assets/javascripts/project.js delete mode 100644 app/assets/javascripts/project.js.coffee create mode 100644 app/assets/javascripts/project_avatar.js delete mode 100644 app/assets/javascripts/project_avatar.js.coffee create mode 100644 app/assets/javascripts/project_find_file.js delete mode 100644 app/assets/javascripts/project_find_file.js.coffee create mode 100644 app/assets/javascripts/project_fork.js delete mode 100644 app/assets/javascripts/project_fork.js.coffee create mode 100644 app/assets/javascripts/project_import.js delete mode 100644 app/assets/javascripts/project_import.js.coffee create mode 100644 app/assets/javascripts/project_members.js delete mode 100644 app/assets/javascripts/project_members.js.coffee create mode 100644 app/assets/javascripts/project_new.js delete mode 100644 app/assets/javascripts/project_new.js.coffee create mode 100644 app/assets/javascripts/project_select.js delete mode 100644 app/assets/javascripts/project_select.js.coffee create mode 100644 app/assets/javascripts/project_show.js delete mode 100644 app/assets/javascripts/project_show.js.coffee create mode 100644 app/assets/javascripts/projects_list.js delete mode 100644 app/assets/javascripts/projects_list.js.coffee create mode 100644 app/assets/javascripts/protected_branch_select.js delete mode 100644 app/assets/javascripts/protected_branch_select.js.coffee create mode 100644 app/assets/javascripts/protected_branches.js delete mode 100644 app/assets/javascripts/protected_branches.js.coffee create mode 100644 app/assets/javascripts/right_sidebar.js delete mode 100644 app/assets/javascripts/right_sidebar.js.coffee create mode 100644 app/assets/javascripts/search.js delete mode 100644 app/assets/javascripts/search.js.coffee create mode 100644 app/assets/javascripts/search_autocomplete.js delete mode 100644 app/assets/javascripts/search_autocomplete.js.coffee create mode 100644 app/assets/javascripts/shortcuts.js delete mode 100644 app/assets/javascripts/shortcuts.js.coffee delete mode 100644 app/assets/javascripts/shortcuts_blob.coffee create mode 100644 app/assets/javascripts/shortcuts_blob.js create mode 100644 app/assets/javascripts/shortcuts_dashboard_navigation.js delete mode 100644 app/assets/javascripts/shortcuts_dashboard_navigation.js.coffee create mode 100644 app/assets/javascripts/shortcuts_find_file.js delete mode 100644 app/assets/javascripts/shortcuts_find_file.js.coffee delete mode 100644 app/assets/javascripts/shortcuts_issuable.coffee create mode 100644 app/assets/javascripts/shortcuts_issuable.js delete mode 100644 app/assets/javascripts/shortcuts_navigation.coffee create mode 100644 app/assets/javascripts/shortcuts_navigation.js create mode 100644 app/assets/javascripts/shortcuts_network.js delete mode 100644 app/assets/javascripts/shortcuts_network.js.coffee create mode 100644 app/assets/javascripts/sidebar.js delete mode 100644 app/assets/javascripts/sidebar.js.coffee create mode 100644 app/assets/javascripts/single_file_diff.js delete mode 100644 app/assets/javascripts/single_file_diff.js.coffee create mode 100644 app/assets/javascripts/star.js delete mode 100644 app/assets/javascripts/star.js.coffee create mode 100644 app/assets/javascripts/subscription.js delete mode 100644 app/assets/javascripts/subscription.js.coffee create mode 100644 app/assets/javascripts/subscription_select.js delete mode 100644 app/assets/javascripts/subscription_select.js.coffee delete mode 100644 app/assets/javascripts/syntax_highlight.coffee create mode 100644 app/assets/javascripts/syntax_highlight.js create mode 100644 app/assets/javascripts/todos.js delete mode 100644 app/assets/javascripts/todos.js.coffee create mode 100644 app/assets/javascripts/tree.js delete mode 100644 app/assets/javascripts/tree.js.coffee create mode 100644 app/assets/javascripts/u2f/authenticate.js delete mode 100644 app/assets/javascripts/u2f/authenticate.js.coffee create mode 100644 app/assets/javascripts/u2f/error.js delete mode 100644 app/assets/javascripts/u2f/error.js.coffee create mode 100644 app/assets/javascripts/u2f/register.js delete mode 100644 app/assets/javascripts/u2f/register.js.coffee create mode 100644 app/assets/javascripts/u2f/util.js delete mode 100644 app/assets/javascripts/u2f/util.js.coffee create mode 100644 app/assets/javascripts/user.js delete mode 100644 app/assets/javascripts/user.js.coffee create mode 100644 app/assets/javascripts/user_tabs.js delete mode 100644 app/assets/javascripts/user_tabs.js.coffee create mode 100644 app/assets/javascripts/users/calendar.js delete mode 100644 app/assets/javascripts/users/calendar.js.coffee create mode 100644 app/assets/javascripts/users/users_bundle.js delete mode 100644 app/assets/javascripts/users/users_bundle.js.coffee create mode 100644 app/assets/javascripts/users_select.js delete mode 100644 app/assets/javascripts/users_select.js.coffee create mode 100644 app/assets/javascripts/wikis.js delete mode 100644 app/assets/javascripts/wikis.js.coffee create mode 100644 app/assets/javascripts/zen_mode.js delete mode 100644 app/assets/javascripts/zen_mode.js.coffee create mode 100644 spec/javascripts/application_spec.js delete mode 100644 spec/javascripts/application_spec.js.coffee create mode 100644 spec/javascripts/awards_handler_spec.js delete mode 100644 spec/javascripts/awards_handler_spec.js.coffee create mode 100644 spec/javascripts/behaviors/autosize_spec.js delete mode 100644 spec/javascripts/behaviors/autosize_spec.js.coffee create mode 100644 spec/javascripts/behaviors/quick_submit_spec.js delete mode 100644 spec/javascripts/behaviors/quick_submit_spec.js.coffee create mode 100644 spec/javascripts/behaviors/requires_input_spec.js delete mode 100644 spec/javascripts/behaviors/requires_input_spec.js.coffee create mode 100644 spec/javascripts/extensions/array_spec.js delete mode 100644 spec/javascripts/extensions/array_spec.js.coffee create mode 100644 spec/javascripts/extensions/jquery_spec.js delete mode 100644 spec/javascripts/extensions/jquery_spec.js.coffee delete mode 100644 spec/javascripts/fixtures/emoji_menu.coffee create mode 100644 spec/javascripts/fixtures/emoji_menu.js create mode 100644 spec/javascripts/issue_spec.js delete mode 100644 spec/javascripts/issue_spec.js.coffee create mode 100644 spec/javascripts/line_highlighter_spec.js delete mode 100644 spec/javascripts/line_highlighter_spec.js.coffee create mode 100644 spec/javascripts/merge_request_spec.js delete mode 100644 spec/javascripts/merge_request_spec.js.coffee create mode 100644 spec/javascripts/merge_request_tabs_spec.js delete mode 100644 spec/javascripts/merge_request_tabs_spec.js.coffee create mode 100644 spec/javascripts/merge_request_widget_spec.js delete mode 100644 spec/javascripts/merge_request_widget_spec.js.coffee create mode 100644 spec/javascripts/new_branch_spec.js delete mode 100644 spec/javascripts/new_branch_spec.js.coffee create mode 100644 spec/javascripts/notes_spec.js delete mode 100644 spec/javascripts/notes_spec.js.coffee create mode 100644 spec/javascripts/project_title_spec.js delete mode 100644 spec/javascripts/project_title_spec.js.coffee create mode 100644 spec/javascripts/right_sidebar_spec.js delete mode 100644 spec/javascripts/right_sidebar_spec.js.coffee create mode 100644 spec/javascripts/search_autocomplete_spec.js delete mode 100644 spec/javascripts/search_autocomplete_spec.js.coffee create mode 100644 spec/javascripts/shortcuts_issuable_spec.js delete mode 100644 spec/javascripts/shortcuts_issuable_spec.js.coffee delete mode 100644 spec/javascripts/spec_helper.coffee create mode 100644 spec/javascripts/spec_helper.js create mode 100644 spec/javascripts/syntax_highlight_spec.js delete mode 100644 spec/javascripts/syntax_highlight_spec.js.coffee delete mode 100644 spec/javascripts/u2f/authenticate_spec.coffee create mode 100644 spec/javascripts/u2f/authenticate_spec.js create mode 100644 spec/javascripts/u2f/mock_u2f_device.js delete mode 100644 spec/javascripts/u2f/mock_u2f_device.js.coffee create mode 100644 spec/javascripts/u2f/register_spec.js delete mode 100644 spec/javascripts/u2f/register_spec.js.coffee create mode 100644 spec/javascripts/zen_mode_spec.js delete mode 100644 spec/javascripts/zen_mode_spec.js.coffee create mode 100644 vendor/assets/javascripts/task_list.js delete mode 100644 vendor/assets/javascripts/task_list.js.coffee diff --git a/app/assets/javascripts/LabelManager.js b/app/assets/javascripts/LabelManager.js new file mode 100644 index 00000000000..151455ce4a3 --- /dev/null +++ b/app/assets/javascripts/LabelManager.js @@ -0,0 +1,110 @@ +(function() { + this.LabelManager = (function() { + LabelManager.prototype.errorMessage = 'Unable to update label prioritization at this time'; + + function LabelManager(opts) { + var ref, ref1, ref2; + if (opts == null) { + opts = {}; + } + this.togglePriorityButton = (ref = opts.togglePriorityButton) != null ? ref : $('.js-toggle-priority'), this.prioritizedLabels = (ref1 = opts.prioritizedLabels) != null ? ref1 : $('.js-prioritized-labels'), this.otherLabels = (ref2 = opts.otherLabels) != null ? ref2 : $('.js-other-labels'); + this.prioritizedLabels.sortable({ + items: 'li', + placeholder: 'list-placeholder', + axis: 'y', + update: this.onPrioritySortUpdate.bind(this) + }); + this.bindEvents(); + } + + LabelManager.prototype.bindEvents = function() { + return this.togglePriorityButton.on('click', this, this.onTogglePriorityClick); + }; + + LabelManager.prototype.onTogglePriorityClick = function(e) { + var $btn, $label, $tooltip, _this, action; + e.preventDefault(); + _this = e.data; + $btn = $(e.currentTarget); + $label = $("#" + ($btn.data('domId'))); + action = $btn.parents('.js-prioritized-labels').length ? 'remove' : 'add'; + $tooltip = $("#" + ($btn.find('.has-tooltip:visible').attr('aria-describedby'))); + $tooltip.tooltip('destroy'); + return _this.toggleLabelPriority($label, action); + }; + + LabelManager.prototype.toggleLabelPriority = function($label, action, persistState) { + var $from, $target, _this, url, xhr; + if (persistState == null) { + persistState = true; + } + _this = this; + url = $label.find('.js-toggle-priority').data('url'); + $target = this.prioritizedLabels; + $from = this.otherLabels; + if (action === 'remove') { + $target = this.otherLabels; + $from = this.prioritizedLabels; + } + if ($from.find('li').length === 1) { + $from.find('.empty-message').removeClass('hidden'); + } + if (!$target.find('li').length) { + $target.find('.empty-message').addClass('hidden'); + } + $label.detach().appendTo($target); + if (!persistState) { + return; + } + if (action === 'remove') { + xhr = $.ajax({ + url: url, + type: 'DELETE' + }); + if (!$from.find('li').length) { + $from.find('.empty-message').removeClass('hidden'); + } + } else { + xhr = this.savePrioritySort($label, action); + } + return xhr.fail(this.rollbackLabelPosition.bind(this, $label, action)); + }; + + LabelManager.prototype.onPrioritySortUpdate = function() { + var xhr; + xhr = this.savePrioritySort(); + return xhr.fail(function() { + return new Flash(this.errorMessage, 'alert'); + }); + }; + + LabelManager.prototype.savePrioritySort = function() { + return $.post({ + url: this.prioritizedLabels.data('url'), + data: { + label_ids: this.getSortedLabelsIds() + } + }); + }; + + LabelManager.prototype.rollbackLabelPosition = function($label, originalAction) { + var action; + action = originalAction === 'remove' ? 'add' : 'remove'; + this.toggleLabelPriority($label, action, false); + return new Flash(this.errorMessage, 'alert'); + }; + + LabelManager.prototype.getSortedLabelsIds = function() { + var sortedIds; + sortedIds = []; + this.prioritizedLabels.find('li').each(function() { + return sortedIds.push($(this).data('id')); + }); + return sortedIds; + }; + + return LabelManager; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/LabelManager.js.coffee b/app/assets/javascripts/LabelManager.js.coffee deleted file mode 100644 index 6d8faba40d7..00000000000 --- a/app/assets/javascripts/LabelManager.js.coffee +++ /dev/null @@ -1,92 +0,0 @@ -class @LabelManager - errorMessage: 'Unable to update label prioritization at this time' - - constructor: (opts = {}) -> - # Defaults - { - @togglePriorityButton = $('.js-toggle-priority') - @prioritizedLabels = $('.js-prioritized-labels') - @otherLabels = $('.js-other-labels') - } = opts - - @prioritizedLabels.sortable( - items: 'li' - placeholder: 'list-placeholder' - axis: 'y' - update: @onPrioritySortUpdate.bind(@) - ) - - @bindEvents() - - bindEvents: -> - @togglePriorityButton.on 'click', @, @onTogglePriorityClick - - onTogglePriorityClick: (e) -> - e.preventDefault() - _this = e.data - $btn = $(e.currentTarget) - $label = $("##{$btn.data('domId')}") - action = if $btn.parents('.js-prioritized-labels').length then 'remove' else 'add' - - # Make sure tooltip will hide - $tooltip = $ "##{$btn.find('.has-tooltip:visible').attr('aria-describedby')}" - $tooltip.tooltip 'destroy' - - _this.toggleLabelPriority($label, action) - - toggleLabelPriority: ($label, action, persistState = true) -> - _this = @ - url = $label.find('.js-toggle-priority').data 'url' - - $target = @prioritizedLabels - $from = @otherLabels - - # Optimistic update - if action is 'remove' - $target = @otherLabels - $from = @prioritizedLabels - - if $from.find('li').length is 1 - $from.find('.empty-message').removeClass('hidden') - - if not $target.find('li').length - $target.find('.empty-message').addClass('hidden') - - $label.detach().appendTo($target) - - # Return if we are not persisting state - return unless persistState - - if action is 'remove' - xhr = $.ajax url: url, type: 'DELETE' - - # Restore empty message - $from.find('.empty-message').removeClass('hidden') unless $from.find('li').length - else - xhr = @savePrioritySort($label, action) - - xhr.fail @rollbackLabelPosition.bind(@, $label, action) - - onPrioritySortUpdate: -> - xhr = @savePrioritySort() - - xhr.fail -> - new Flash(@errorMessage, 'alert') - - savePrioritySort: () -> - $.post - url: @prioritizedLabels.data('url') - data: - label_ids: @getSortedLabelsIds() - - rollbackLabelPosition: ($label, originalAction)-> - action = if originalAction is 'remove' then 'add' else 'remove' - @toggleLabelPriority($label, action, false) - - new Flash(@errorMessage, 'alert') - - getSortedLabelsIds: -> - sortedIds = [] - @prioritizedLabels.find('li').each -> - sortedIds.push $(@).data 'id' - sortedIds diff --git a/app/assets/javascripts/activities.js b/app/assets/javascripts/activities.js new file mode 100644 index 00000000000..1ab3c2197d8 --- /dev/null +++ b/app/assets/javascripts/activities.js @@ -0,0 +1,40 @@ +(function() { + this.Activities = (function() { + function Activities() { + Pager.init(20, true, false, this.updateTooltips); + $(".event-filter-link").on("click", (function(_this) { + return function(event) { + event.preventDefault(); + _this.toggleFilter($(event.currentTarget)); + return _this.reloadActivities(); + }; + })(this)); + } + + Activities.prototype.updateTooltips = function() { + return gl.utils.localTimeAgo($('.js-timeago', '#activity')); + }; + + Activities.prototype.reloadActivities = function() { + $(".content_list").html(''); + return Pager.init(20, true); + }; + + Activities.prototype.toggleFilter = function(sender) { + var event_filters, filter; + $('.event-filter .active').removeClass("active"); + event_filters = $.cookie("event_filter"); + filter = sender.attr("id").split("_")[0]; + $.cookie("event_filter", (event_filters !== filter ? filter : ""), { + path: '/' + }); + if (event_filters !== filter) { + return sender.closest('li').toggleClass("active"); + } + }; + + return Activities; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/activities.js.coffee b/app/assets/javascripts/activities.js.coffee deleted file mode 100644 index ed5a5d0260c..00000000000 --- a/app/assets/javascripts/activities.js.coffee +++ /dev/null @@ -1,24 +0,0 @@ -class @Activities - constructor: -> - Pager.init 20, true, false, @updateTooltips - $(".event-filter-link").on "click", (event) => - event.preventDefault() - @toggleFilter($(event.currentTarget)) - @reloadActivities() - - updateTooltips: -> - gl.utils.localTimeAgo($('.js-timeago', '#activity')) - - reloadActivities: -> - $(".content_list").html '' - Pager.init 20, true - - - toggleFilter: (sender) -> - $('.event-filter .active').removeClass "active" - event_filters = $.cookie("event_filter") - filter = sender.attr("id").split("_")[0] - $.cookie "event_filter", (if event_filters isnt filter then filter else ""), { path: '/' } - - if event_filters isnt filter - sender.closest('li').toggleClass "active" diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js new file mode 100644 index 00000000000..f8460beb5d2 --- /dev/null +++ b/app/assets/javascripts/admin.js @@ -0,0 +1,64 @@ +(function() { + this.Admin = (function() { + function Admin() { + var modal, showBlacklistType; + $('input#user_force_random_password').on('change', function(elem) { + var elems; + elems = $('#user_password, #user_password_confirmation'); + if ($(this).attr('checked')) { + return elems.val('').attr('disabled', true); + } else { + return elems.removeAttr('disabled'); + } + }); + $('body').on('click', '.js-toggle-colors-link', function(e) { + e.preventDefault(); + return $('.js-toggle-colors-container').toggle(); + }); + $('.log-tabs a').click(function(e) { + e.preventDefault(); + return $(this).tab('show'); + }); + $('.log-bottom').click(function(e) { + var visible_log; + e.preventDefault(); + visible_log = $(".file-content:visible"); + return visible_log.animate({ + scrollTop: visible_log.find('ol').height() + }, "fast"); + }); + modal = $('.change-owner-holder'); + $('.change-owner-link').bind("click", function(e) { + e.preventDefault(); + $(this).hide(); + return modal.show(); + }); + $('.change-owner-cancel-link').bind("click", function(e) { + e.preventDefault(); + modal.hide(); + return $('.change-owner-link').show(); + }); + $('li.project_member').bind('ajax:success', function() { + return Turbolinks.visit(location.href); + }); + $('li.group_member').bind('ajax:success', function() { + return Turbolinks.visit(location.href); + }); + showBlacklistType = function() { + if ($("input[name='blacklist_type']:checked").val() === 'file') { + $('.blacklist-file').show(); + return $('.blacklist-raw').hide(); + } else { + $('.blacklist-file').hide(); + return $('.blacklist-raw').show(); + } + }; + $("input[name='blacklist_type']").click(showBlacklistType); + showBlacklistType(); + } + + return Admin; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee deleted file mode 100644 index 90c09619f8c..00000000000 --- a/app/assets/javascripts/admin.js.coffee +++ /dev/null @@ -1,51 +0,0 @@ -class @Admin - constructor: -> - $('input#user_force_random_password').on 'change', (elem) -> - elems = $('#user_password, #user_password_confirmation') - - if $(@).attr 'checked' - elems.val('').attr 'disabled', true - else - elems.removeAttr 'disabled' - - $('body').on 'click', '.js-toggle-colors-link', (e) -> - e.preventDefault() - $('.js-toggle-colors-container').toggle() - - $('.log-tabs a').click (e) -> - e.preventDefault() - $(this).tab('show') - - $('.log-bottom').click (e) -> - e.preventDefault() - visible_log = $(".file-content:visible") - visible_log.animate({ scrollTop: visible_log.find('ol').height() }, "fast") - - modal = $('.change-owner-holder') - - $('.change-owner-link').bind "click", (e) -> - e.preventDefault() - $(this).hide() - modal.show() - - $('.change-owner-cancel-link').bind "click", (e) -> - e.preventDefault() - modal.hide() - $('.change-owner-link').show() - - $('li.project_member').bind 'ajax:success', -> - Turbolinks.visit(location.href) - - $('li.group_member').bind 'ajax:success', -> - Turbolinks.visit(location.href) - - showBlacklistType = -> - if $("input[name='blacklist_type']:checked").val() == 'file' - $('.blacklist-file').show() - $('.blacklist-raw').hide() - else - $('.blacklist-file').hide() - $('.blacklist-raw').show() - - $("input[name='blacklist_type']").click showBlacklistType - showBlacklistType() diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js new file mode 100644 index 00000000000..49c2ac0dac3 --- /dev/null +++ b/app/assets/javascripts/api.js @@ -0,0 +1,136 @@ +(function() { + this.Api = { + groupsPath: "/api/:version/groups.json", + groupPath: "/api/:version/groups/:id.json", + namespacesPath: "/api/:version/namespaces.json", + groupProjectsPath: "/api/:version/groups/:id/projects.json", + projectsPath: "/api/:version/projects.json?simple=true", + labelsPath: "/api/:version/projects/:id/labels", + licensePath: "/api/:version/licenses/:key", + gitignorePath: "/api/:version/gitignores/:key", + gitlabCiYmlPath: "/api/:version/gitlab_ci_ymls/:key", + group: function(group_id, callback) { + var url; + url = Api.buildUrl(Api.groupPath); + url = url.replace(':id', group_id); + return $.ajax({ + url: url, + data: { + private_token: gon.api_token + }, + dataType: "json" + }).done(function(group) { + return callback(group); + }); + }, + groups: function(query, skip_ldap, callback) { + var url; + url = Api.buildUrl(Api.groupsPath); + return $.ajax({ + url: url, + data: { + private_token: gon.api_token, + search: query, + per_page: 20 + }, + dataType: "json" + }).done(function(groups) { + return callback(groups); + }); + }, + namespaces: function(query, callback) { + var url; + url = Api.buildUrl(Api.namespacesPath); + return $.ajax({ + url: url, + data: { + private_token: gon.api_token, + search: query, + per_page: 20 + }, + dataType: "json" + }).done(function(namespaces) { + return callback(namespaces); + }); + }, + projects: function(query, order, callback) { + var url; + url = Api.buildUrl(Api.projectsPath); + return $.ajax({ + url: url, + data: { + private_token: gon.api_token, + search: query, + order_by: order, + per_page: 20 + }, + dataType: "json" + }).done(function(projects) { + return callback(projects); + }); + }, + newLabel: function(project_id, data, callback) { + var url; + url = Api.buildUrl(Api.labelsPath); + url = url.replace(':id', project_id); + data.private_token = gon.api_token; + return $.ajax({ + url: url, + type: "POST", + data: data, + dataType: "json" + }).done(function(label) { + return callback(label); + }).error(function(message) { + return callback(message.responseJSON); + }); + }, + groupProjects: function(group_id, query, callback) { + var url; + url = Api.buildUrl(Api.groupProjectsPath); + url = url.replace(':id', group_id); + return $.ajax({ + url: url, + data: { + private_token: gon.api_token, + search: query, + per_page: 20 + }, + dataType: "json" + }).done(function(projects) { + return callback(projects); + }); + }, + licenseText: function(key, data, callback) { + var url; + url = Api.buildUrl(Api.licensePath).replace(':key', key); + return $.ajax({ + url: url, + data: data + }).done(function(license) { + return callback(license); + }); + }, + gitignoreText: function(key, callback) { + var url; + url = Api.buildUrl(Api.gitignorePath).replace(':key', key); + return $.get(url, function(gitignore) { + return callback(gitignore); + }); + }, + gitlabCiYml: function(key, callback) { + var url; + url = Api.buildUrl(Api.gitlabCiYmlPath).replace(':key', key); + return $.get(url, function(file) { + return callback(file); + }); + }, + buildUrl: function(url) { + if (gon.relative_url_root != null) { + url = gon.relative_url_root + url; + } + return url.replace(':version', gon.api_version); + } + }; + +}).call(this); diff --git a/app/assets/javascripts/api.js.coffee b/app/assets/javascripts/api.js.coffee deleted file mode 100644 index 89b0ac697ed..00000000000 --- a/app/assets/javascripts/api.js.coffee +++ /dev/null @@ -1,122 +0,0 @@ -@Api = - groupsPath: "/api/:version/groups.json" - groupPath: "/api/:version/groups/:id.json" - namespacesPath: "/api/:version/namespaces.json" - groupProjectsPath: "/api/:version/groups/:id/projects.json" - projectsPath: "/api/:version/projects.json?simple=true" - labelsPath: "/api/:version/projects/:id/labels" - licensePath: "/api/:version/licenses/:key" - gitignorePath: "/api/:version/gitignores/:key" - gitlabCiYmlPath: "/api/:version/gitlab_ci_ymls/:key" - - group: (group_id, callback) -> - url = Api.buildUrl(Api.groupPath) - url = url.replace(':id', group_id) - - $.ajax( - url: url - data: - private_token: gon.api_token - dataType: "json" - ).done (group) -> - callback(group) - - # Return groups list. Filtered by query - # Only active groups retrieved - groups: (query, skip_ldap, callback) -> - url = Api.buildUrl(Api.groupsPath) - - $.ajax( - url: url - data: - private_token: gon.api_token - search: query - per_page: 20 - dataType: "json" - ).done (groups) -> - callback(groups) - - # Return namespaces list. Filtered by query - namespaces: (query, callback) -> - url = Api.buildUrl(Api.namespacesPath) - - $.ajax( - url: url - data: - private_token: gon.api_token - search: query - per_page: 20 - dataType: "json" - ).done (namespaces) -> - callback(namespaces) - - # Return projects list. Filtered by query - projects: (query, order, callback) -> - url = Api.buildUrl(Api.projectsPath) - - $.ajax( - url: url - data: - private_token: gon.api_token - search: query - order_by: order - per_page: 20 - dataType: "json" - ).done (projects) -> - callback(projects) - - newLabel: (project_id, data, callback) -> - url = Api.buildUrl(Api.labelsPath) - url = url.replace(':id', project_id) - - data.private_token = gon.api_token - $.ajax( - url: url - type: "POST" - data: data - dataType: "json" - ).done (label) -> - callback(label) - .error (message) -> - callback(message.responseJSON) - - # Return group projects list. Filtered by query - groupProjects: (group_id, query, callback) -> - url = Api.buildUrl(Api.groupProjectsPath) - url = url.replace(':id', group_id) - - $.ajax( - url: url - data: - private_token: gon.api_token - search: query - per_page: 20 - dataType: "json" - ).done (projects) -> - callback(projects) - - # Return text for a specific license - licenseText: (key, data, callback) -> - url = Api.buildUrl(Api.licensePath).replace(':key', key) - - $.ajax( - url: url - data: data - ).done (license) -> - callback(license) - - gitignoreText: (key, callback) -> - url = Api.buildUrl(Api.gitignorePath).replace(':key', key) - - $.get url, (gitignore) -> - callback(gitignore) - - gitlabCiYml: (key, callback) -> - url = Api.buildUrl(Api.gitlabCiYmlPath).replace(':key', key) - - $.get url, (file) -> - callback(file) - - buildUrl: (url) -> - url = gon.relative_url_root + url if gon.relative_url_root? - return url.replace(':version', gon.api_version) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 00000000000..127e568adc9 --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,320 @@ +/*= require jquery2 */ +/*= require jquery-ui/autocomplete */ +/*= require jquery-ui/datepicker */ +/*= require jquery-ui/draggable */ +/*= require jquery-ui/effect-highlight */ +/*= require jquery-ui/sortable */ +/*= require jquery_ujs */ +/*= require jquery.cookie */ +/*= require jquery.endless-scroll */ +/*= require jquery.highlight */ +/*= require jquery.waitforimages */ +/*= require jquery.atwho */ +/*= require jquery.scrollTo */ +/*= require jquery.turbolinks */ +/*= require turbolinks */ +/*= require autosave */ +/*= require bootstrap/affix */ +/*= require bootstrap/alert */ +/*= require bootstrap/button */ +/*= require bootstrap/collapse */ +/*= require bootstrap/dropdown */ +/*= require bootstrap/modal */ +/*= require bootstrap/scrollspy */ +/*= require bootstrap/tab */ +/*= require bootstrap/transition */ +/*= require bootstrap/tooltip */ +/*= require bootstrap/popover */ +/*= require select2 */ +/*= require ace/ace */ +/*= require ace/ext-searchbox */ +/*= require underscore */ +/*= require dropzone */ +/*= require mousetrap */ +/*= require mousetrap/pause */ +/*= require shortcuts */ +/*= require shortcuts_navigation */ +/*= require shortcuts_dashboard_navigation */ +/*= require shortcuts_issuable */ +/*= require shortcuts_network */ +/*= require jquery.nicescroll */ +/*= require date.format */ +/*= require_directory ./behaviors */ +/*= require_directory ./blob */ +/*= require_directory ./commit */ +/*= require_directory ./extensions */ +/*= require_directory ./lib/utils */ +/*= require_directory ./u2f */ +/*= require_directory . */ +/*= require fuzzaldrin-plus */ + +(function() { + window.slugify = function(text) { + return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase(); + }; + + window.ajaxGet = function(url) { + return $.ajax({ + type: "GET", + url: url, + dataType: "script" + }); + }; + + window.split = function(val) { + return val.split(/,\s*/); + }; + + window.extractLast = function(term) { + return split(term).pop(); + }; + + window.rstrip = function(val) { + if (val) { + return val.replace(/\s+$/, ''); + } else { + return val; + } + }; + + window.disableButtonIfEmptyField = function(field_selector, button_selector) { + var closest_submit, field; + field = $(field_selector); + closest_submit = field.closest('form').find(button_selector); + if (rstrip(field.val()) === "") { + closest_submit.disable(); + } + return field.on('input', function() { + if (rstrip($(this).val()) === "") { + return closest_submit.disable(); + } else { + return closest_submit.enable(); + } + }); + }; + + window.disableButtonIfAnyEmptyField = function(form, form_selector, button_selector) { + var closest_submit, updateButtons; + closest_submit = form.find(button_selector); + updateButtons = function() { + var filled; + filled = true; + form.find('input').filter(form_selector).each(function() { + return filled = rstrip($(this).val()) !== "" || !$(this).attr('required'); + }); + if (filled) { + return closest_submit.enable(); + } else { + return closest_submit.disable(); + } + }; + updateButtons(); + return form.keyup(updateButtons); + }; + + window.sanitize = function(str) { + return str.replace(/<(?:.|\n)*?>/gm, ''); + }; + + window.unbindEvents = function() { + return $(document).off('scroll'); + }; + + window.shiftWindow = function() { + return scrollBy(0, -100); + }; + + document.addEventListener("page:fetch", unbindEvents); + + window.addEventListener("hashchange", shiftWindow); + + window.onload = function() { + if (location.hash) { + return setTimeout(shiftWindow, 100); + } + }; + + $(function() { + var $body, $document, $sidebarGutterToggle, $window, bootstrapBreakpoint, checkInitialSidebarSize, fitSidebarForSize, flash; + $document = $(document); + $window = $(window); + $body = $('body'); + gl.utils.preventDisabledButtons(); + bootstrapBreakpoint = bp.getBreakpointSize(); + $(".nav-sidebar").niceScroll({ + cursoropacitymax: '0.4', + cursorcolor: '#FFF', + cursorborder: "1px solid #FFF" + }); + $(".js-select-on-focus").on("focusin", function() { + return $(this).select().one('mouseup', function(e) { + return e.preventDefault(); + }); + }); + $('.remove-row').bind('ajax:success', function() { + return $(this).closest('li').fadeOut(); + }); + $('.js-remove-tr').bind('ajax:before', function() { + return $(this).hide(); + }); + $('.js-remove-tr').bind('ajax:success', function() { + return $(this).closest('tr').fadeOut(); + }); + $('select.select2').select2({ + width: 'resolve', + dropdownAutoWidth: true + }); + $('.js-select2').bind('select2-close', function() { + return setTimeout((function() { + $('.select2-container-active').removeClass('select2-container-active'); + return $(':focus').blur(); + }), 1); + }); + $body.tooltip({ + selector: '.has-tooltip, [data-toggle="tooltip"]', + placement: function(_, el) { + var $el; + $el = $(el); + return $el.data('placement') || 'bottom'; + } + }); + $('.trigger-submit').on('change', function() { + return $(this).parents('form').submit(); + }); + gl.utils.localTimeAgo($('abbr.timeago, .js-timeago'), true); + if ((flash = $(".flash-container")).length > 0) { + flash.click(function() { + return $(this).fadeOut(); + }); + flash.show(); + } + $body.on('ajax:complete, ajax:beforeSend, submit', 'form', function(e) { + var buttons; + buttons = $('[type="submit"]', this); + switch (e.type) { + case 'ajax:beforeSend': + case 'submit': + return buttons.disable(); + default: + return buttons.enable(); + } + }); + $(document).ajaxError(function(e, xhrObj, xhrSetting, xhrErrorText) { + var ref; + if (xhrObj.status === 401) { + return new Flash('You need to be logged in.', 'alert'); + } else if ((ref = xhrObj.status) === 404 || ref === 500) { + return new Flash('Something went wrong on our end.', 'alert'); + } + }); + $('.account-box').hover(function() { + return $(this).toggleClass('hover'); + }); + $document.on('click', '.diff-content .js-show-suppressed-diff', function() { + var $container; + $container = $(this).parent(); + $container.next('table').show(); + return $container.remove(); + }); + $('.navbar-toggle').on('click', function() { + $('.header-content .title').toggle(); + $('.header-content .header-logo').toggle(); + $('.header-content .navbar-collapse').toggle(); + return $('.navbar-toggle').toggleClass('active'); + }); + $body.on("click", ".js-toggle-diff-comments", function(e) { + $(this).toggleClass('active'); + $(this).closest(".diff-file").find(".notes_holder").toggle(); + return e.preventDefault(); + }); + $document.off("click", '.js-confirm-danger'); + $document.on("click", '.js-confirm-danger', function(e) { + var btn, form, text; + e.preventDefault(); + btn = $(e.target); + text = btn.data("confirm-danger-message"); + form = btn.closest("form"); + return new ConfirmDangerModal(form, text); + }); + $document.on('click', 'button', function() { + return $(this).blur(); + }); + $('input[type="search"]').each(function() { + var $this; + $this = $(this); + $this.attr('value', $this.val()); + }); + $document.off('keyup', 'input[type="search"]').on('keyup', 'input[type="search"]', function(e) { + var $this; + $this = $(this); + return $this.attr('value', $this.val()); + }); + $sidebarGutterToggle = $('.js-sidebar-toggle'); + $document.off('breakpoint:change').on('breakpoint:change', function(e, breakpoint) { + var $gutterIcon; + if (breakpoint === 'sm' || breakpoint === 'xs') { + $gutterIcon = $sidebarGutterToggle.find('i'); + if ($gutterIcon.hasClass('fa-angle-double-right')) { + return $sidebarGutterToggle.trigger('click'); + } + } + }); + fitSidebarForSize = function() { + var oldBootstrapBreakpoint; + oldBootstrapBreakpoint = bootstrapBreakpoint; + bootstrapBreakpoint = bp.getBreakpointSize(); + if (bootstrapBreakpoint !== oldBootstrapBreakpoint) { + return $document.trigger('breakpoint:change', [bootstrapBreakpoint]); + } + }; + checkInitialSidebarSize = function() { + bootstrapBreakpoint = bp.getBreakpointSize(); + if (bootstrapBreakpoint === "xs" || "sm") { + return $document.trigger('breakpoint:change', [bootstrapBreakpoint]); + } + }; + $window.off("resize.app").on("resize.app", function(e) { + return fitSidebarForSize(); + }); + gl.awardsHandler = new AwardsHandler(); + checkInitialSidebarSize(); + new Aside(); + if ($window.width() < 1024 && $.cookie('pin_nav') === 'true') { + $.cookie('pin_nav', 'false', { + path: '/', + expires: 365 * 10 + }); + $('.page-with-sidebar').toggleClass('page-sidebar-collapsed page-sidebar-expanded').removeClass('page-sidebar-pinned'); + $('.navbar-fixed-top').removeClass('header-pinned-nav'); + } + return $document.off('click', '.js-nav-pin').on('click', '.js-nav-pin', function(e) { + var $page, $pinBtn, $tooltip, $topNav, doPinNav, tooltipText; + e.preventDefault(); + $pinBtn = $(e.currentTarget); + $page = $('.page-with-sidebar'); + $topNav = $('.navbar-fixed-top'); + $tooltip = $("#" + ($pinBtn.attr('aria-describedby'))); + doPinNav = !$page.is('.page-sidebar-pinned'); + tooltipText = 'Pin navigation'; + $(this).toggleClass('is-active'); + if (doPinNav) { + $page.addClass('page-sidebar-pinned'); + $topNav.addClass('header-pinned-nav'); + } else { + $tooltip.remove(); + $page.removeClass('page-sidebar-pinned').toggleClass('page-sidebar-collapsed page-sidebar-expanded'); + $topNav.removeClass('header-pinned-nav').toggleClass('header-collapsed header-expanded'); + } + $.cookie('pin_nav', doPinNav, { + path: '/', + expires: 365 * 10 + }); + if ($.cookie('pin_nav') === 'true' || doPinNav) { + tooltipText = 'Unpin navigation'; + } + $tooltip.find('.tooltip-inner').text(tooltipText); + return $pinBtn.attr('title', tooltipText).tooltip('fixTitle'); + }); + }); + +}).call(this); diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee deleted file mode 100644 index eceff6d91d5..00000000000 --- a/app/assets/javascripts/application.js.coffee +++ /dev/null @@ -1,310 +0,0 @@ -# This is a manifest file that'll be compiled into including all the files listed below. -# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -# be included in the compiled file accessible from http://example.com/assets/application.js -# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -# the compiled file. -# -#= require jquery2 -#= require jquery-ui/autocomplete -#= require jquery-ui/datepicker -#= require jquery-ui/draggable -#= require jquery-ui/effect-highlight -#= require jquery-ui/sortable -#= require jquery_ujs -#= require jquery.cookie -#= require jquery.endless-scroll -#= require jquery.highlight -#= require jquery.waitforimages -#= require jquery.atwho -#= require jquery.scrollTo -#= require jquery.turbolinks -#= require turbolinks -#= require autosave -#= require bootstrap/affix -#= require bootstrap/alert -#= require bootstrap/button -#= require bootstrap/collapse -#= require bootstrap/dropdown -#= require bootstrap/modal -#= require bootstrap/scrollspy -#= require bootstrap/tab -#= require bootstrap/transition -#= require bootstrap/tooltip -#= require bootstrap/popover -#= require select2 -#= require ace/ace -#= require ace/ext-searchbox -#= require underscore -#= require dropzone -#= require mousetrap -#= require mousetrap/pause -#= require shortcuts -#= require shortcuts_navigation -#= require shortcuts_dashboard_navigation -#= require shortcuts_issuable -#= require shortcuts_network -#= require jquery.nicescroll -#= require date.format -#= require_directory ./behaviors -#= require_directory ./blob -#= require_directory ./commit -#= require_directory ./extensions -#= require_directory ./lib/utils -#= require_directory ./u2f -#= require_directory . -#= require fuzzaldrin-plus - -window.slugify = (text) -> - text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase() - -window.ajaxGet = (url) -> - $.ajax({type: "GET", url: url, dataType: "script"}) - -window.split = (val) -> - return val.split( /,\s*/ ) - -window.extractLast = (term) -> - return split( term ).pop() - -window.rstrip = (val) -> - return if val then val.replace(/\s+$/, '') else val - -# Disable button if text field is empty -window.disableButtonIfEmptyField = (field_selector, button_selector) -> - field = $(field_selector) - closest_submit = field.closest('form').find(button_selector) - - closest_submit.disable() if rstrip(field.val()) is "" - - field.on 'input', -> - if rstrip($(@).val()) is "" - closest_submit.disable() - else - closest_submit.enable() - -# Disable button if any input field with given selector is empty -window.disableButtonIfAnyEmptyField = (form, form_selector, button_selector) -> - closest_submit = form.find(button_selector) - updateButtons = -> - filled = true - form.find('input').filter(form_selector).each -> - filled = rstrip($(this).val()) != "" || !$(this).attr('required') - - if filled - closest_submit.enable() - else - closest_submit.disable() - - updateButtons() - form.keyup(updateButtons) - -window.sanitize = (str) -> - return str.replace(/<(?:.|\n)*?>/gm, '') - -window.unbindEvents = -> - $(document).off('scroll') - -window.shiftWindow = -> - scrollBy 0, -100 - -document.addEventListener("page:fetch", unbindEvents) - -window.addEventListener "hashchange", shiftWindow - -window.onload = -> - # Scroll the window to avoid the topnav bar - # https://github.com/twitter/bootstrap/issues/1768 - if location.hash - setTimeout shiftWindow, 100 - -$ -> - - $document = $(document) - $window = $(window) - $body = $('body') - - gl.utils.preventDisabledButtons() - bootstrapBreakpoint = bp.getBreakpointSize() - - $(".nav-sidebar").niceScroll(cursoropacitymax: '0.4', cursorcolor: '#FFF', cursorborder: "1px solid #FFF") - - # Click a .js-select-on-focus field, select the contents - $(".js-select-on-focus").on "focusin", -> - # Prevent a mouseup event from deselecting the input - $(this).select().one 'mouseup', (e) -> - e.preventDefault() - - $('.remove-row').bind 'ajax:success', -> - $(this).closest('li').fadeOut() - - $('.js-remove-tr').bind 'ajax:before', -> - $(this).hide() - - $('.js-remove-tr').bind 'ajax:success', -> - $(this).closest('tr').fadeOut() - - # Initialize select2 selects - $('select.select2').select2(width: 'resolve', dropdownAutoWidth: true) - - # Close select2 on escape - $('.js-select2').bind 'select2-close', -> - setTimeout ( -> - $('.select2-container-active').removeClass('select2-container-active') - $(':focus').blur() - ), 1 - - # Initialize tooltips - $body.tooltip( - selector: '.has-tooltip, [data-toggle="tooltip"]' - placement: (_, el) -> - $el = $(el) - $el.data('placement') || 'bottom' - ) - - # Form submitter - $('.trigger-submit').on 'change', -> - $(@).parents('form').submit() - - gl.utils.localTimeAgo($('abbr.timeago, .js-timeago'), true) - - # Flash - if (flash = $(".flash-container")).length > 0 - flash.click -> $(@).fadeOut() - flash.show() - - # Disable form buttons while a form is submitting - $body.on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) -> - buttons = $('[type="submit"]', @) - - switch e.type - when 'ajax:beforeSend', 'submit' - buttons.disable() - else - buttons.enable() - - $(document).ajaxError (e, xhrObj, xhrSetting, xhrErrorText) -> - - if xhrObj.status is 401 - new Flash 'You need to be logged in.', 'alert' - - else if xhrObj.status in [ 404, 500 ] - new Flash 'Something went wrong on our end.', 'alert' - - - # Show/Hide the profile menu when hovering the account box - $('.account-box').hover -> $(@).toggleClass('hover') - - # Commit show suppressed diff - $document.on 'click', '.diff-content .js-show-suppressed-diff', -> - $container = $(@).parent() - $container.next('table').show() - $container.remove() - - $('.navbar-toggle').on 'click', -> - $('.header-content .title').toggle() - $('.header-content .header-logo').toggle() - $('.header-content .navbar-collapse').toggle() - $('.navbar-toggle').toggleClass('active') - - # Show/hide comments on diff - $body.on "click", ".js-toggle-diff-comments", (e) -> - $(@).toggleClass('active') - $(@).closest(".diff-file").find(".notes_holder").toggle() - e.preventDefault() - - $document.off "click", '.js-confirm-danger' - $document.on "click", '.js-confirm-danger', (e) -> - e.preventDefault() - btn = $(e.target) - text = btn.data("confirm-danger-message") - form = btn.closest("form") - new ConfirmDangerModal(form, text) - - - $document.on 'click', 'button', -> - $(this).blur() - - $('input[type="search"]').each -> - $this = $(this) - $this.attr 'value', $this.val() - return - - $document - .off 'keyup', 'input[type="search"]' - .on 'keyup', 'input[type="search"]' , (e) -> - $this = $(this) - $this.attr 'value', $this.val() - - $sidebarGutterToggle = $('.js-sidebar-toggle') - - $document - .off 'breakpoint:change' - .on 'breakpoint:change', (e, breakpoint) -> - if breakpoint is 'sm' or breakpoint is 'xs' - $gutterIcon = $sidebarGutterToggle.find('i') - if $gutterIcon.hasClass('fa-angle-double-right') - $sidebarGutterToggle.trigger('click') - - fitSidebarForSize = -> - oldBootstrapBreakpoint = bootstrapBreakpoint - bootstrapBreakpoint = bp.getBreakpointSize() - if bootstrapBreakpoint != oldBootstrapBreakpoint - $document.trigger('breakpoint:change', [bootstrapBreakpoint]) - - checkInitialSidebarSize = -> - bootstrapBreakpoint = bp.getBreakpointSize() - if bootstrapBreakpoint is "xs" or "sm" - $document.trigger('breakpoint:change', [bootstrapBreakpoint]) - - $window - .off "resize.app" - .on "resize.app", (e) -> - fitSidebarForSize() - - gl.awardsHandler = new AwardsHandler() - checkInitialSidebarSize() - new Aside() - - # Sidenav pinning - if $window.width() < 1024 and $.cookie('pin_nav') is 'true' - $.cookie('pin_nav', 'false', { path: '/', expires: 365 * 10 }) - $('.page-with-sidebar') - .toggleClass('page-sidebar-collapsed page-sidebar-expanded') - .removeClass('page-sidebar-pinned') - $('.navbar-fixed-top').removeClass('header-pinned-nav') - - $document - .off 'click', '.js-nav-pin' - .on 'click', '.js-nav-pin', (e) -> - e.preventDefault() - - $pinBtn = $(e.currentTarget) - $page = $ '.page-with-sidebar' - $topNav = $ '.navbar-fixed-top' - $tooltip = $ "##{$pinBtn.attr('aria-describedby')}" - doPinNav = not $page.is('.page-sidebar-pinned') - tooltipText = 'Pin navigation' - - $(this).toggleClass 'is-active' - - if doPinNav - $page.addClass('page-sidebar-pinned') - $topNav.addClass('header-pinned-nav') - else - $tooltip.remove() # Remove it immediately when collapsing the sidebar - $page.removeClass('page-sidebar-pinned') - .toggleClass('page-sidebar-collapsed page-sidebar-expanded') - $topNav.removeClass('header-pinned-nav') - .toggleClass('header-collapsed header-expanded') - - # Save settings - $.cookie 'pin_nav', doPinNav, { path: '/', expires: 365 * 10 } - - if $.cookie('pin_nav') is 'true' or doPinNav - tooltipText = 'Unpin navigation' - - # Update tooltip text immediately - $tooltip.find('.tooltip-inner').text(tooltipText) - - # Persist tooltip title - $pinBtn.attr('title', tooltipText).tooltip('fixTitle') diff --git a/app/assets/javascripts/aside.js b/app/assets/javascripts/aside.js new file mode 100644 index 00000000000..7b546e79ee0 --- /dev/null +++ b/app/assets/javascripts/aside.js @@ -0,0 +1,26 @@ +(function() { + this.Aside = (function() { + function Aside() { + $(document).off("click", "a.show-aside"); + $(document).on("click", 'a.show-aside', function(e) { + var btn, icon; + e.preventDefault(); + btn = $(e.currentTarget); + icon = btn.find('i'); + if (icon.hasClass('fa-angle-left')) { + btn.parent().find('section').hide(); + btn.parent().find('aside').fadeIn(); + return icon.removeClass('fa-angle-left').addClass('fa-angle-right'); + } else { + btn.parent().find('aside').hide(); + btn.parent().find('section').fadeIn(); + return icon.removeClass('fa-angle-right').addClass('fa-angle-left'); + } + }); + } + + return Aside; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/aside.js.coffee b/app/assets/javascripts/aside.js.coffee deleted file mode 100644 index 66ab5054326..00000000000 --- a/app/assets/javascripts/aside.js.coffee +++ /dev/null @@ -1,16 +0,0 @@ -class @Aside - constructor: -> - $(document).off "click", "a.show-aside" - $(document).on "click", 'a.show-aside', (e) -> - e.preventDefault() - btn = $(e.currentTarget) - icon = btn.find('i') - - if icon.hasClass('fa-angle-left') - btn.parent().find('section').hide() - btn.parent().find('aside').fadeIn() - icon.removeClass('fa-angle-left').addClass('fa-angle-right') - else - btn.parent().find('aside').hide() - btn.parent().find('section').fadeIn() - icon.removeClass('fa-angle-right').addClass('fa-angle-left') diff --git a/app/assets/javascripts/autosave.js b/app/assets/javascripts/autosave.js new file mode 100644 index 00000000000..7116512d6b7 --- /dev/null +++ b/app/assets/javascripts/autosave.js @@ -0,0 +1,63 @@ +(function() { + this.Autosave = (function() { + function Autosave(field, key) { + this.field = field; + if (key.join != null) { + key = key.join("/"); + } + this.key = "autosave/" + key; + this.field.data("autosave", this); + this.restore(); + this.field.on("input", (function(_this) { + return function() { + return _this.save(); + }; + })(this)); + } + + Autosave.prototype.restore = function() { + var e, error, text; + if (window.localStorage == null) { + return; + } + try { + text = window.localStorage.getItem(this.key); + } catch (error) { + e = error; + return; + } + if ((text != null ? text.length : void 0) > 0) { + this.field.val(text); + } + return this.field.trigger("input"); + }; + + Autosave.prototype.save = function() { + var text; + if (window.localStorage == null) { + return; + } + text = this.field.val(); + if ((text != null ? text.length : void 0) > 0) { + try { + return window.localStorage.setItem(this.key, text); + } catch (undefined) {} + } else { + return this.reset(); + } + }; + + Autosave.prototype.reset = function() { + if (window.localStorage == null) { + return; + } + try { + return window.localStorage.removeItem(this.key); + } catch (undefined) {} + }; + + return Autosave; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/autosave.js.coffee b/app/assets/javascripts/autosave.js.coffee deleted file mode 100644 index 28f8e103664..00000000000 --- a/app/assets/javascripts/autosave.js.coffee +++ /dev/null @@ -1,39 +0,0 @@ -class @Autosave - constructor: (field, key) -> - @field = field - - key = key.join("/") if key.join? - @key = "autosave/#{key}" - - @field.data "autosave", this - - @restore() - - @field.on "input", => @save() - - restore: -> - return unless window.localStorage? - - try - text = window.localStorage.getItem @key - catch e - return - - @field.val text if text?.length > 0 - @field.trigger "input" - - save: -> - return unless window.localStorage? - - text = @field.val() - if text?.length > 0 - try - window.localStorage.setItem @key, text - else - @reset() - - reset: -> - return unless window.localStorage? - - try - window.localStorage.removeItem @key diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee deleted file mode 100644 index 37d0adaa625..00000000000 --- a/app/assets/javascripts/awards_handler.coffee +++ /dev/null @@ -1,372 +0,0 @@ -class @AwardsHandler - - constructor: -> - - @aliases = gl.emojiAliases() - - $(document) - .off 'click', '.js-add-award' - .on 'click', '.js-add-award', (e) => - e.stopPropagation() - e.preventDefault() - - @showEmojiMenu $(e.currentTarget) - - $('html').on 'click', (e) -> - $target = $ e.target - - unless $target.closest('.emoji-menu-content').length - $('.js-awards-block.current').removeClass 'current' - - unless $target.closest('.emoji-menu').length - if $('.emoji-menu').is(':visible') - $('.js-add-award.is-active').removeClass 'is-active' - $('.emoji-menu').removeClass 'is-visible' - - $(document) - .off 'click', '.js-emoji-btn' - .on 'click', '.js-emoji-btn', (e) => - e.preventDefault() - - $target = $ e.currentTarget - emoji = $target.find('.icon').data 'emoji' - - $target.closest('.js-awards-block').addClass 'current' - @addAward @getVotesBlock(), @getAwardUrl(), emoji - - - showEmojiMenu: ($addBtn) -> - - $menu = $ '.emoji-menu' - - if $addBtn.hasClass 'js-note-emoji' - $addBtn.closest('.note').find('.js-awards-block').addClass 'current' - else - $addBtn.closest('.js-awards-block').addClass 'current' - - if $menu.length - $holder = $addBtn.closest('.js-award-holder') - - if $menu.is '.is-visible' - $addBtn.removeClass 'is-active' - $menu.removeClass 'is-visible' - $('#emoji_search').blur() - else - $addBtn.addClass 'is-active' - @positionMenu($menu, $addBtn) - - $menu.addClass 'is-visible' - $('#emoji_search').focus() - else - $addBtn.addClass 'is-loading is-active' - url = @getAwardMenuUrl() - - @createEmojiMenu url, => - $addBtn.removeClass 'is-loading' - $menu = $('.emoji-menu') - @positionMenu($menu, $addBtn) - @renderFrequentlyUsedBlock() unless @frequentEmojiBlockRendered - - setTimeout => - $menu.addClass 'is-visible' - $('#emoji_search').focus() - @setupSearch() - , 200 - - - createEmojiMenu: (awardMenuUrl, callback) -> - - $.get awardMenuUrl, (response) -> - $('body').append response - callback() - - - positionMenu: ($menu, $addBtn) -> - - position = $addBtn.data('position') - - # The menu could potentially be off-screen or in a hidden overflow element - # So we position the element absolute in the body - css = - top: "#{$addBtn.offset().top + $addBtn.outerHeight()}px" - - if position? and position is 'right' - css.left = "#{($addBtn.offset().left - $menu.outerWidth()) + 20}px" - $menu.addClass 'is-aligned-right' - else - css.left = "#{$addBtn.offset().left}px" - $menu.removeClass 'is-aligned-right' - - $menu.css(css) - - - addAward: (votesBlock, awardUrl, emoji, checkMutuality = true, callback) -> - - emoji = @normilizeEmojiName emoji - - @postEmoji awardUrl, emoji, => - @addAwardToEmojiBar votesBlock, emoji, checkMutuality - callback?() - - $('.emoji-menu').removeClass 'is-visible' - - - addAwardToEmojiBar: (votesBlock, emoji, checkForMutuality = true) -> - - @checkMutuality votesBlock, emoji if checkForMutuality - @addEmojiToFrequentlyUsedList emoji - - emoji = @normilizeEmojiName emoji - $emojiButton = @findEmojiIcon(votesBlock, emoji).parent() - - if $emojiButton.length > 0 - if @isActive $emojiButton - @decrementCounter $emojiButton, emoji - else - counter = $emojiButton.find '.js-counter' - counter.text parseInt(counter.text()) + 1 - $emojiButton.addClass 'active' - @addMeToUserList votesBlock, emoji - @animateEmoji $emojiButton - else - votesBlock.removeClass 'hidden' - @createEmoji votesBlock, emoji - - - getVotesBlock: -> - - currentBlock = $ '.js-awards-block.current' - return if currentBlock.length then currentBlock else $('.js-awards-block').eq 0 - - - getAwardUrl: -> return @getVotesBlock().data 'award-url' - - - checkMutuality: (votesBlock, emoji) -> - - awardUrl = @getAwardUrl() - - if emoji in [ 'thumbsup', 'thumbsdown' ] - mutualVote = if emoji is 'thumbsup' then 'thumbsdown' else 'thumbsup' - $emojiButton = votesBlock.find("[data-emoji=#{mutualVote}]").parent() - isAlreadyVoted = $emojiButton.hasClass 'active' - - if isAlreadyVoted - @showEmojiLoader $emojiButton - @addAward votesBlock, awardUrl, mutualVote, false, -> - $emojiButton.removeClass 'is-loading' - - - showEmojiLoader: ($emojiButton) -> - - $loader = $emojiButton.find '.fa-spinner' - - unless $loader.length - $emojiButton.append '' - - $emojiButton.addClass 'is-loading' - - - isActive: ($emojiButton) -> $emojiButton.hasClass 'active' - - - decrementCounter: ($emojiButton, emoji) -> - - counter = $ '.js-counter', $emojiButton - counterNumber = parseInt counter.text(), 10 - - if counterNumber > 1 - counter.text counterNumber - 1 - @removeMeFromUserList $emojiButton, emoji - else if emoji is 'thumbsup' or emoji is 'thumbsdown' - $emojiButton.tooltip 'destroy' - counter.text '0' - @removeMeFromUserList $emojiButton, emoji - @removeEmoji $emojiButton if $emojiButton.parents('.note').length - else - @removeEmoji $emojiButton - - $emojiButton.removeClass 'active' - - - removeEmoji: ($emojiButton) -> - - $emojiButton.tooltip('destroy') - $emojiButton.remove() - - $votesBlock = @getVotesBlock() - - if $votesBlock.find('.js-emoji-btn').length is 0 - $votesBlock.addClass 'hidden' - - - getAwardTooltip: ($awardBlock) -> - - return $awardBlock.attr('data-original-title') or $awardBlock.attr('data-title') or '' - - - removeMeFromUserList: ($emojiButton, emoji) -> - - awardBlock = $emojiButton - originalTitle = @getAwardTooltip awardBlock - - authors = originalTitle.split ', ' - authors.splice authors.indexOf('me'), 1 - - newAuthors = authors.join ', ' - - awardBlock - .closest '.js-emoji-btn' - .removeData 'original-title' - .attr 'data-original-title', newAuthors - - @resetTooltip awardBlock - - - addMeToUserList: (votesBlock, emoji) -> - - awardBlock = @findEmojiIcon(votesBlock, emoji).parent() - origTitle = @getAwardTooltip awardBlock - users = [] - - if origTitle - users = origTitle.trim().split ', ' - - users.push 'me' - awardBlock.attr 'title', users.join ', ' - - @resetTooltip awardBlock - - - resetTooltip: (award) -> - - award.tooltip 'destroy' - - # 'destroy' call is asynchronous and there is no appropriate callback on it, this is why we need to set timeout. - cb = -> award.tooltip() - setTimeout cb, 200 - - - createEmoji_: (votesBlock, emoji) -> - - emojiCssClass = @resolveNameToCssClass emoji - buttonHtml = "" - - $emojiButton = $ buttonHtml - $emojiButton - .insertBefore votesBlock.find '.js-award-holder' - .find '.emoji-icon' - .data 'emoji', emoji - - @animateEmoji $emojiButton - $('.award-control').tooltip() - votesBlock.removeClass 'current' - - - animateEmoji: ($emoji) -> - - className = 'pulse animated' - - $emoji.addClass className - setTimeout (-> $emoji.removeClass className), 321 - - - createEmoji: (votesBlock, emoji) -> - - if $('.emoji-menu').length - return @createEmoji_ votesBlock, emoji - - @createEmojiMenu @getAwardMenuUrl(), => @createEmoji_ votesBlock, emoji - - - getAwardMenuUrl: -> return gon.award_menu_url - - - resolveNameToCssClass: (emoji) -> - - emojiIcon = $ ".emoji-menu-content [data-emoji='#{emoji}']" - - if emojiIcon.length > 0 - unicodeName = emojiIcon.data 'unicode-name' - else - # Find by alias - unicodeName = $(".emoji-menu-content [data-aliases*=':#{emoji}:']").data 'unicode-name' - - return "emoji-#{unicodeName}" - - - postEmoji: (awardUrl, emoji, callback) -> - - $.post awardUrl, { name: emoji }, (data) -> - callback() if data.ok - - - findEmojiIcon: (votesBlock, emoji) -> - - return votesBlock.find ".js-emoji-btn [data-emoji='#{emoji}']" - - - scrollToAwards: -> - - options = scrollTop: $('.awards').offset().top - 110 - $('body, html').animate options, 200 - - - normilizeEmojiName: (emoji) -> return @aliases[emoji] or emoji - - - addEmojiToFrequentlyUsedList: (emoji) -> - - frequentlyUsedEmojis = @getFrequentlyUsedEmojis() - frequentlyUsedEmojis.push emoji - $.cookie 'frequently_used_emojis', frequentlyUsedEmojis.join(','), { expires: 365 } - - - getFrequentlyUsedEmojis: -> - - frequentlyUsedEmojis = ($.cookie('frequently_used_emojis') or '').split(',') - return _.compact _.uniq frequentlyUsedEmojis - - - renderFrequentlyUsedBlock: -> - - if $.cookie 'frequently_used_emojis' - frequentlyUsedEmojis = @getFrequentlyUsedEmojis() - - ul = $("
      ") - - for emoji in frequentlyUsedEmojis - $(".emoji-menu-content [data-emoji='#{emoji}']").closest('li').clone().appendTo(ul) - - $('.emoji-menu-content') - .prepend(ul) - .prepend($('
      ').text('Frequently used')) - - @frequentEmojiBlockRendered = true - - - setupSearch: -> - - $('input.emoji-search').on 'keyup', (ev) => - term = $(ev.target).val() - - # Clean previous search results - $('ul.emoji-menu-search, h5.emoji-search').remove() - - if term - # Generate a search result block - h5 = $('
      ').text('Search results') - found_emojis = @searchEmojis(term).show() - ul = $('
        ').addClass('emoji-menu-list emoji-menu-search').append(found_emojis) - $('.emoji-menu-content ul, .emoji-menu-content h5').hide() - $('.emoji-menu-content').append(h5).append(ul) - else - $('.emoji-menu-content').children().show() - - - searchEmojis: (term) -> - - $(".emoji-menu-list:not(.frequent-emojis) [data-emoji*='#{term}']").closest('li').clone() diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js new file mode 100644 index 00000000000..ea683b31f75 --- /dev/null +++ b/app/assets/javascripts/awards_handler.js @@ -0,0 +1,380 @@ +(function() { + this.AwardsHandler = (function() { + function AwardsHandler() { + this.aliases = gl.emojiAliases(); + $(document).off('click', '.js-add-award').on('click', '.js-add-award', (function(_this) { + return function(e) { + e.stopPropagation(); + e.preventDefault(); + return _this.showEmojiMenu($(e.currentTarget)); + }; + })(this)); + $('html').on('click', function(e) { + var $target; + $target = $(e.target); + if (!$target.closest('.emoji-menu-content').length) { + $('.js-awards-block.current').removeClass('current'); + } + if (!$target.closest('.emoji-menu').length) { + if ($('.emoji-menu').is(':visible')) { + $('.js-add-award.is-active').removeClass('is-active'); + return $('.emoji-menu').removeClass('is-visible'); + } + } + }); + $(document).off('click', '.js-emoji-btn').on('click', '.js-emoji-btn', (function(_this) { + return function(e) { + var $target, emoji; + e.preventDefault(); + $target = $(e.currentTarget); + emoji = $target.find('.icon').data('emoji'); + $target.closest('.js-awards-block').addClass('current'); + return _this.addAward(_this.getVotesBlock(), _this.getAwardUrl(), emoji); + }; + })(this)); + } + + AwardsHandler.prototype.showEmojiMenu = function($addBtn) { + var $holder, $menu, url; + $menu = $('.emoji-menu'); + if ($addBtn.hasClass('js-note-emoji')) { + $addBtn.closest('.note').find('.js-awards-block').addClass('current'); + } else { + $addBtn.closest('.js-awards-block').addClass('current'); + } + if ($menu.length) { + $holder = $addBtn.closest('.js-award-holder'); + if ($menu.is('.is-visible')) { + $addBtn.removeClass('is-active'); + $menu.removeClass('is-visible'); + return $('#emoji_search').blur(); + } else { + $addBtn.addClass('is-active'); + this.positionMenu($menu, $addBtn); + $menu.addClass('is-visible'); + return $('#emoji_search').focus(); + } + } else { + $addBtn.addClass('is-loading is-active'); + url = this.getAwardMenuUrl(); + return this.createEmojiMenu(url, (function(_this) { + return function() { + $addBtn.removeClass('is-loading'); + $menu = $('.emoji-menu'); + _this.positionMenu($menu, $addBtn); + if (!_this.frequentEmojiBlockRendered) { + _this.renderFrequentlyUsedBlock(); + } + return setTimeout(function() { + $menu.addClass('is-visible'); + $('#emoji_search').focus(); + return _this.setupSearch(); + }, 200); + }; + })(this)); + } + }; + + AwardsHandler.prototype.createEmojiMenu = function(awardMenuUrl, callback) { + return $.get(awardMenuUrl, function(response) { + $('body').append(response); + return callback(); + }); + }; + + AwardsHandler.prototype.positionMenu = function($menu, $addBtn) { + var css, position; + position = $addBtn.data('position'); + css = { + top: ($addBtn.offset().top + $addBtn.outerHeight()) + "px" + }; + if ((position != null) && position === 'right') { + css.left = (($addBtn.offset().left - $menu.outerWidth()) + 20) + "px"; + $menu.addClass('is-aligned-right'); + } else { + css.left = ($addBtn.offset().left) + "px"; + $menu.removeClass('is-aligned-right'); + } + return $menu.css(css); + }; + + AwardsHandler.prototype.addAward = function(votesBlock, awardUrl, emoji, checkMutuality, callback) { + if (checkMutuality == null) { + checkMutuality = true; + } + emoji = this.normilizeEmojiName(emoji); + this.postEmoji(awardUrl, emoji, (function(_this) { + return function() { + _this.addAwardToEmojiBar(votesBlock, emoji, checkMutuality); + return typeof callback === "function" ? callback() : void 0; + }; + })(this)); + return $('.emoji-menu').removeClass('is-visible'); + }; + + AwardsHandler.prototype.addAwardToEmojiBar = function(votesBlock, emoji, checkForMutuality) { + var $emojiButton, counter; + if (checkForMutuality == null) { + checkForMutuality = true; + } + if (checkForMutuality) { + this.checkMutuality(votesBlock, emoji); + } + this.addEmojiToFrequentlyUsedList(emoji); + emoji = this.normilizeEmojiName(emoji); + $emojiButton = this.findEmojiIcon(votesBlock, emoji).parent(); + if ($emojiButton.length > 0) { + if (this.isActive($emojiButton)) { + return this.decrementCounter($emojiButton, emoji); + } else { + counter = $emojiButton.find('.js-counter'); + counter.text(parseInt(counter.text()) + 1); + $emojiButton.addClass('active'); + this.addMeToUserList(votesBlock, emoji); + return this.animateEmoji($emojiButton); + } + } else { + votesBlock.removeClass('hidden'); + return this.createEmoji(votesBlock, emoji); + } + }; + + AwardsHandler.prototype.getVotesBlock = function() { + var currentBlock; + currentBlock = $('.js-awards-block.current'); + if (currentBlock.length) { + return currentBlock; + } else { + return $('.js-awards-block').eq(0); + } + }; + + AwardsHandler.prototype.getAwardUrl = function() { + return this.getVotesBlock().data('award-url'); + }; + + AwardsHandler.prototype.checkMutuality = function(votesBlock, emoji) { + var $emojiButton, awardUrl, isAlreadyVoted, mutualVote; + awardUrl = this.getAwardUrl(); + if (emoji === 'thumbsup' || emoji === 'thumbsdown') { + mutualVote = emoji === 'thumbsup' ? 'thumbsdown' : 'thumbsup'; + $emojiButton = votesBlock.find("[data-emoji=" + mutualVote + "]").parent(); + isAlreadyVoted = $emojiButton.hasClass('active'); + if (isAlreadyVoted) { + this.showEmojiLoader($emojiButton); + return this.addAward(votesBlock, awardUrl, mutualVote, false, function() { + return $emojiButton.removeClass('is-loading'); + }); + } + } + }; + + AwardsHandler.prototype.showEmojiLoader = function($emojiButton) { + var $loader; + $loader = $emojiButton.find('.fa-spinner'); + if (!$loader.length) { + $emojiButton.append(''); + } + return $emojiButton.addClass('is-loading'); + }; + + AwardsHandler.prototype.isActive = function($emojiButton) { + return $emojiButton.hasClass('active'); + }; + + AwardsHandler.prototype.decrementCounter = function($emojiButton, emoji) { + var counter, counterNumber; + counter = $('.js-counter', $emojiButton); + counterNumber = parseInt(counter.text(), 10); + if (counterNumber > 1) { + counter.text(counterNumber - 1); + this.removeMeFromUserList($emojiButton, emoji); + } else if (emoji === 'thumbsup' || emoji === 'thumbsdown') { + $emojiButton.tooltip('destroy'); + counter.text('0'); + this.removeMeFromUserList($emojiButton, emoji); + if ($emojiButton.parents('.note').length) { + this.removeEmoji($emojiButton); + } + } else { + this.removeEmoji($emojiButton); + } + return $emojiButton.removeClass('active'); + }; + + AwardsHandler.prototype.removeEmoji = function($emojiButton) { + var $votesBlock; + $emojiButton.tooltip('destroy'); + $emojiButton.remove(); + $votesBlock = this.getVotesBlock(); + if ($votesBlock.find('.js-emoji-btn').length === 0) { + return $votesBlock.addClass('hidden'); + } + }; + + AwardsHandler.prototype.getAwardTooltip = function($awardBlock) { + return $awardBlock.attr('data-original-title') || $awardBlock.attr('data-title') || ''; + }; + + AwardsHandler.prototype.removeMeFromUserList = function($emojiButton, emoji) { + var authors, awardBlock, newAuthors, originalTitle; + awardBlock = $emojiButton; + originalTitle = this.getAwardTooltip(awardBlock); + authors = originalTitle.split(', '); + authors.splice(authors.indexOf('me'), 1); + newAuthors = authors.join(', '); + awardBlock.closest('.js-emoji-btn').removeData('original-title').attr('data-original-title', newAuthors); + return this.resetTooltip(awardBlock); + }; + + AwardsHandler.prototype.addMeToUserList = function(votesBlock, emoji) { + var awardBlock, origTitle, users; + awardBlock = this.findEmojiIcon(votesBlock, emoji).parent(); + origTitle = this.getAwardTooltip(awardBlock); + users = []; + if (origTitle) { + users = origTitle.trim().split(', '); + } + users.push('me'); + awardBlock.attr('title', users.join(', ')); + return this.resetTooltip(awardBlock); + }; + + AwardsHandler.prototype.resetTooltip = function(award) { + var cb; + award.tooltip('destroy'); + cb = function() { + return award.tooltip(); + }; + return setTimeout(cb, 200); + }; + + AwardsHandler.prototype.createEmoji_ = function(votesBlock, emoji) { + var $emojiButton, buttonHtml, emojiCssClass; + emojiCssClass = this.resolveNameToCssClass(emoji); + buttonHtml = ""; + $emojiButton = $(buttonHtml); + $emojiButton.insertBefore(votesBlock.find('.js-award-holder')).find('.emoji-icon').data('emoji', emoji); + this.animateEmoji($emojiButton); + $('.award-control').tooltip(); + return votesBlock.removeClass('current'); + }; + + AwardsHandler.prototype.animateEmoji = function($emoji) { + var className; + className = 'pulse animated'; + $emoji.addClass(className); + return setTimeout((function() { + return $emoji.removeClass(className); + }), 321); + }; + + AwardsHandler.prototype.createEmoji = function(votesBlock, emoji) { + if ($('.emoji-menu').length) { + return this.createEmoji_(votesBlock, emoji); + } + return this.createEmojiMenu(this.getAwardMenuUrl(), (function(_this) { + return function() { + return _this.createEmoji_(votesBlock, emoji); + }; + })(this)); + }; + + AwardsHandler.prototype.getAwardMenuUrl = function() { + return gon.award_menu_url; + }; + + AwardsHandler.prototype.resolveNameToCssClass = function(emoji) { + var emojiIcon, unicodeName; + emojiIcon = $(".emoji-menu-content [data-emoji='" + emoji + "']"); + if (emojiIcon.length > 0) { + unicodeName = emojiIcon.data('unicode-name'); + } else { + unicodeName = $(".emoji-menu-content [data-aliases*=':" + emoji + ":']").data('unicode-name'); + } + return "emoji-" + unicodeName; + }; + + AwardsHandler.prototype.postEmoji = function(awardUrl, emoji, callback) { + return $.post(awardUrl, { + name: emoji + }, function(data) { + if (data.ok) { + return callback(); + } + }); + }; + + AwardsHandler.prototype.findEmojiIcon = function(votesBlock, emoji) { + return votesBlock.find(".js-emoji-btn [data-emoji='" + emoji + "']"); + }; + + AwardsHandler.prototype.scrollToAwards = function() { + var options; + options = { + scrollTop: $('.awards').offset().top - 110 + }; + return $('body, html').animate(options, 200); + }; + + AwardsHandler.prototype.normilizeEmojiName = function(emoji) { + return this.aliases[emoji] || emoji; + }; + + AwardsHandler.prototype.addEmojiToFrequentlyUsedList = function(emoji) { + var frequentlyUsedEmojis; + frequentlyUsedEmojis = this.getFrequentlyUsedEmojis(); + frequentlyUsedEmojis.push(emoji); + return $.cookie('frequently_used_emojis', frequentlyUsedEmojis.join(','), { + expires: 365 + }); + }; + + AwardsHandler.prototype.getFrequentlyUsedEmojis = function() { + var frequentlyUsedEmojis; + frequentlyUsedEmojis = ($.cookie('frequently_used_emojis') || '').split(','); + return _.compact(_.uniq(frequentlyUsedEmojis)); + }; + + AwardsHandler.prototype.renderFrequentlyUsedBlock = function() { + var emoji, frequentlyUsedEmojis, i, len, ul; + if ($.cookie('frequently_used_emojis')) { + frequentlyUsedEmojis = this.getFrequentlyUsedEmojis(); + ul = $("
          "); + for (i = 0, len = frequentlyUsedEmojis.length; i < len; i++) { + emoji = frequentlyUsedEmojis[i]; + $(".emoji-menu-content [data-emoji='" + emoji + "']").closest('li').clone().appendTo(ul); + } + $('.emoji-menu-content').prepend(ul).prepend($('
          ').text('Frequently used')); + } + return this.frequentEmojiBlockRendered = true; + }; + + AwardsHandler.prototype.setupSearch = function() { + return $('input.emoji-search').on('keyup', (function(_this) { + return function(ev) { + var found_emojis, h5, term, ul; + term = $(ev.target).val(); + $('ul.emoji-menu-search, h5.emoji-search').remove(); + if (term) { + h5 = $('
          ').text('Search results'); + found_emojis = _this.searchEmojis(term).show(); + ul = $('
            ').addClass('emoji-menu-list emoji-menu-search').append(found_emojis); + $('.emoji-menu-content ul, .emoji-menu-content h5').hide(); + return $('.emoji-menu-content').append(h5).append(ul); + } else { + return $('.emoji-menu-content').children().show(); + } + }; + })(this)); + }; + + AwardsHandler.prototype.searchEmojis = function(term) { + return $(".emoji-menu-list:not(.frequent-emojis) [data-emoji*='" + term + "']").closest('li').clone(); + }; + + return AwardsHandler; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/behaviors/autosize.js b/app/assets/javascripts/behaviors/autosize.js new file mode 100644 index 00000000000..f977a1e8a7b --- /dev/null +++ b/app/assets/javascripts/behaviors/autosize.js @@ -0,0 +1,30 @@ + +/*= require jquery.ba-resize */ + + +/*= require autosize */ + +(function() { + $(function() { + var $fields; + $fields = $('.js-autosize'); + $fields.on('autosize:resized', function() { + var $field; + $field = $(this); + return $field.data('height', $field.outerHeight()); + }); + $fields.on('resize.autosize', function() { + var $field; + $field = $(this); + if ($field.data('height') !== $field.outerHeight()) { + $field.data('height', $field.outerHeight()); + autosize.destroy($field); + return $field.css('max-height', window.outerHeight); + } + }); + autosize($fields); + autosize.update($fields); + return $fields.css('resize', 'vertical'); + }); + +}).call(this); diff --git a/app/assets/javascripts/behaviors/autosize.js.coffee b/app/assets/javascripts/behaviors/autosize.js.coffee deleted file mode 100644 index a072fe48a98..00000000000 --- a/app/assets/javascripts/behaviors/autosize.js.coffee +++ /dev/null @@ -1,22 +0,0 @@ -#= require jquery.ba-resize -#= require autosize - -$ -> - $fields = $('.js-autosize') - - $fields.on 'autosize:resized', -> - $field = $(@) - $field.data('height', $field.outerHeight()) - - $fields.on 'resize.autosize', -> - $field = $(@) - - if $field.data('height') != $field.outerHeight() - $field.data('height', $field.outerHeight()) - autosize.destroy($field) - $field.css('max-height', window.outerHeight) - - autosize($fields) - autosize.update($fields) - - $fields.css('resize', 'vertical') diff --git a/app/assets/javascripts/behaviors/details_behavior.coffee b/app/assets/javascripts/behaviors/details_behavior.coffee deleted file mode 100644 index decab3e1bed..00000000000 --- a/app/assets/javascripts/behaviors/details_behavior.coffee +++ /dev/null @@ -1,15 +0,0 @@ -$ -> - $("body").on "click", ".js-details-target", -> - container = $(@).closest(".js-details-container") - container.toggleClass("open") - - # Show details content. Hides link after click. - # - # %div - # %a.js-details-expand - # %div.js-details-content - # - $("body").on "click", ".js-details-expand", (e) -> - $(@).next('.js-details-content').removeClass("hide") - $(@).hide() - e.preventDefault() diff --git a/app/assets/javascripts/behaviors/details_behavior.js b/app/assets/javascripts/behaviors/details_behavior.js new file mode 100644 index 00000000000..3631d1b74ac --- /dev/null +++ b/app/assets/javascripts/behaviors/details_behavior.js @@ -0,0 +1,15 @@ +(function() { + $(function() { + $("body").on("click", ".js-details-target", function() { + var container; + container = $(this).closest(".js-details-container"); + return container.toggleClass("open"); + }); + return $("body").on("click", ".js-details-expand", function(e) { + $(this).next('.js-details-content').removeClass("hide"); + $(this).hide(); + return e.preventDefault(); + }); + }); + +}).call(this); diff --git a/app/assets/javascripts/behaviors/quick_submit.js b/app/assets/javascripts/behaviors/quick_submit.js new file mode 100644 index 00000000000..3527d0a95fc --- /dev/null +++ b/app/assets/javascripts/behaviors/quick_submit.js @@ -0,0 +1,58 @@ + +/*= require extensions/jquery */ + +(function() { + var isMac, keyCodeIs; + + isMac = function() { + return navigator.userAgent.match(/Macintosh/); + }; + + keyCodeIs = function(e, keyCode) { + if ((e.originalEvent && e.originalEvent.repeat) || e.repeat) { + return false; + } + return e.keyCode === keyCode; + }; + + $(document).on('keydown.quick_submit', '.js-quick-submit', function(e) { + var $form, $submit_button; + if (!keyCodeIs(e, 13)) { + return; + } + if (!((e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey) || (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey))) { + return; + } + e.preventDefault(); + $form = $(e.target).closest('form'); + $submit_button = $form.find('input[type=submit], button[type=submit]'); + if ($submit_button.attr('disabled')) { + return; + } + $submit_button.disable(); + return $form.submit(); + }); + + $(document).on('keyup.quick_submit', '.js-quick-submit input[type=submit], .js-quick-submit button[type=submit]', function(e) { + var $this, title; + if (!keyCodeIs(e, 9)) { + return; + } + if (isMac()) { + title = "You can also press ⌘-Enter"; + } else { + title = "You can also press Ctrl-Enter"; + } + $this = $(this); + return $this.tooltip({ + container: 'body', + html: 'true', + placement: 'auto top', + title: title, + trigger: 'manual' + }).tooltip('show').one('blur', function() { + return $this.tooltip('hide'); + }); + }); + +}).call(this); diff --git a/app/assets/javascripts/behaviors/quick_submit.js.coffee b/app/assets/javascripts/behaviors/quick_submit.js.coffee deleted file mode 100644 index 3cb96bacaa7..00000000000 --- a/app/assets/javascripts/behaviors/quick_submit.js.coffee +++ /dev/null @@ -1,56 +0,0 @@ -# Quick Submit behavior -# -# When a child field of a form with a `js-quick-submit` class receives a -# "Meta+Enter" (Mac) or "Ctrl+Enter" (Linux/Windows) key combination, the form -# is submitted. -# -#= require extensions/jquery -# -# ### Example Markup -# -#
            -# -# -# -#
            -# -isMac = -> - navigator.userAgent.match(/Macintosh/) - -keyCodeIs = (e, keyCode) -> - return false if (e.originalEvent && e.originalEvent.repeat) || e.repeat - return e.keyCode == keyCode - -$(document).on 'keydown.quick_submit', '.js-quick-submit', (e) -> - return unless keyCodeIs(e, 13) # Enter - - return unless (e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey) || (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey) - - e.preventDefault() - - $form = $(e.target).closest('form') - $submit_button = $form.find('input[type=submit], button[type=submit]') - - return if $submit_button.attr('disabled') - - $submit_button.disable() - $form.submit() - -# If the user tabs to a submit button on a `js-quick-submit` form, display a -# tooltip to let them know they could've used the hotkey -$(document).on 'keyup.quick_submit', '.js-quick-submit input[type=submit], .js-quick-submit button[type=submit]', (e) -> - return unless keyCodeIs(e, 9) # Tab - - if isMac() - title = "You can also press ⌘-Enter" - else - title = "You can also press Ctrl-Enter" - - $this = $(@) - $this.tooltip( - container: 'body' - html: 'true' - placement: 'auto top' - title: title - trigger: 'manual' - ).tooltip('show').one('blur', -> $this.tooltip('hide')) diff --git a/app/assets/javascripts/behaviors/requires_input.js b/app/assets/javascripts/behaviors/requires_input.js new file mode 100644 index 00000000000..db0b36b24e9 --- /dev/null +++ b/app/assets/javascripts/behaviors/requires_input.js @@ -0,0 +1,45 @@ + +/*= require extensions/jquery */ + +(function() { + $.fn.requiresInput = function() { + var $button, $form, fieldSelector, requireInput, required; + $form = $(this); + $button = $('button[type=submit], input[type=submit]', $form); + required = '[required=required]'; + fieldSelector = "input" + required + ", select" + required + ", textarea" + required; + requireInput = function() { + var values; + values = _.map($(fieldSelector, $form), function(field) { + return field.value; + }); + if (values.length && _.any(values, _.isEmpty)) { + return $button.disable(); + } else { + return $button.enable(); + } + }; + requireInput(); + return $form.on('change input', fieldSelector, requireInput); + }; + + $(function() { + var $form, hideOrShowHelpBlock; + $form = $('form.js-requires-input'); + $form.requiresInput(); + hideOrShowHelpBlock = function(form) { + var selected; + selected = $('.js-select-namespace option:selected'); + if (selected.length && selected.data('options-parent') === 'groups') { + return form.find('.help-block').hide(); + } else if (selected.length) { + return form.find('.help-block').show(); + } + }; + hideOrShowHelpBlock($form); + return $('.select2.js-select-namespace').change(function() { + return hideOrShowHelpBlock($form); + }); + }); + +}).call(this); diff --git a/app/assets/javascripts/behaviors/requires_input.js.coffee b/app/assets/javascripts/behaviors/requires_input.js.coffee deleted file mode 100644 index 0faa570ce13..00000000000 --- a/app/assets/javascripts/behaviors/requires_input.js.coffee +++ /dev/null @@ -1,52 +0,0 @@ -# Requires Input behavior -# -# When called on a form with input fields with the `required` attribute, the -# form's submit button will be disabled until all required fields have values. -# -#= require extensions/jquery -# -# ### Example Markup -# -#
            -# -# -#
            -# -$.fn.requiresInput = -> - $form = $(this) - $button = $('button[type=submit], input[type=submit]', $form) - - required = '[required=required]' - fieldSelector = "input#{required}, select#{required}, textarea#{required}" - - requireInput = -> - # Collect the input values of *all* required fields - values = _.map $(fieldSelector, $form), (field) -> field.value - - # Disable the button if any required fields are empty - if values.length && _.any(values, _.isEmpty) - $button.disable() - else - $button.enable() - - # Set initial button state - requireInput() - - $form.on 'change input', fieldSelector, requireInput - -$ -> - $form = $('form.js-requires-input') - $form.requiresInput() - - # Hide or Show the help block when creating a new project - # based on the option selected - hideOrShowHelpBlock = (form) -> - selected = $('.js-select-namespace option:selected') - if selected.length and selected.data('options-parent') is 'groups' - return form.find('.help-block').hide() - else if selected.length - form.find('.help-block').show() - - hideOrShowHelpBlock($form) - - $('.select2.js-select-namespace').change -> hideOrShowHelpBlock($form) diff --git a/app/assets/javascripts/behaviors/toggler_behavior.coffee b/app/assets/javascripts/behaviors/toggler_behavior.coffee deleted file mode 100644 index 177b6918270..00000000000 --- a/app/assets/javascripts/behaviors/toggler_behavior.coffee +++ /dev/null @@ -1,14 +0,0 @@ -$ -> - # Toggle button. Show/hide content inside parent container. - # Button does not change visibility. If button has icon - it changes chevron style. - # - # %div.js-toggle-container - # %a.js-toggle-button - # %div.js-toggle-content - # - $("body").on "click", ".js-toggle-button", (e) -> - $(@).find('i'). - toggleClass('fa fa-chevron-down'). - toggleClass('fa fa-chevron-up') - $(@).closest(".js-toggle-container").find(".js-toggle-content").toggle() - e.preventDefault() diff --git a/app/assets/javascripts/behaviors/toggler_behavior.js b/app/assets/javascripts/behaviors/toggler_behavior.js new file mode 100644 index 00000000000..1b7b63489ea --- /dev/null +++ b/app/assets/javascripts/behaviors/toggler_behavior.js @@ -0,0 +1,10 @@ +(function() { + $(function() { + return $("body").on("click", ".js-toggle-button", function(e) { + $(this).find('i').toggleClass('fa fa-chevron-down').toggleClass('fa fa-chevron-up'); + $(this).closest(".js-toggle-container").find(".js-toggle-content").toggle(); + return e.preventDefault(); + }); + }); + +}).call(this); diff --git a/app/assets/javascripts/blob/blob_ci_yaml.js b/app/assets/javascripts/blob/blob_ci_yaml.js new file mode 100644 index 00000000000..68758574967 --- /dev/null +++ b/app/assets/javascripts/blob/blob_ci_yaml.js @@ -0,0 +1,46 @@ + +/*= require blob/template_selector */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.BlobCiYamlSelector = (function(superClass) { + extend(BlobCiYamlSelector, superClass); + + function BlobCiYamlSelector() { + return BlobCiYamlSelector.__super__.constructor.apply(this, arguments); + } + + BlobCiYamlSelector.prototype.requestFile = function(query) { + return Api.gitlabCiYml(query.name, this.requestFileSuccess.bind(this)); + }; + + return BlobCiYamlSelector; + + })(TemplateSelector); + + this.BlobCiYamlSelectors = (function() { + function BlobCiYamlSelectors(opts) { + var ref; + this.$dropdowns = (ref = opts.$dropdowns) != null ? ref : $('.js-gitlab-ci-yml-selector'), this.editor = opts.editor; + this.$dropdowns.each((function(_this) { + return function(i, dropdown) { + var $dropdown; + $dropdown = $(dropdown); + return new BlobCiYamlSelector({ + pattern: /(.gitlab-ci.yml)/, + data: $dropdown.data('data'), + wrapper: $dropdown.closest('.js-gitlab-ci-yml-selector-wrap'), + dropdown: $dropdown, + editor: _this.editor + }); + }; + })(this)); + } + + return BlobCiYamlSelectors; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/blob/blob_ci_yaml.js.coffee b/app/assets/javascripts/blob/blob_ci_yaml.js.coffee deleted file mode 100644 index d9a03d05529..00000000000 --- a/app/assets/javascripts/blob/blob_ci_yaml.js.coffee +++ /dev/null @@ -1,23 +0,0 @@ -#= require blob/template_selector - -class @BlobCiYamlSelector extends TemplateSelector - requestFile: (query) -> - Api.gitlabCiYml query.name, @requestFileSuccess.bind(@) - -class @BlobCiYamlSelectors - constructor: (opts) -> - { - @$dropdowns = $('.js-gitlab-ci-yml-selector') - @editor - } = opts - - @$dropdowns.each (i, dropdown) => - $dropdown = $(dropdown) - - new BlobCiYamlSelector( - pattern: /(.gitlab-ci.yml)/, - data: $dropdown.data('data'), - wrapper: $dropdown.closest('.js-gitlab-ci-yml-selector-wrap'), - dropdown: $dropdown, - editor: @editor - ) diff --git a/app/assets/javascripts/blob/blob_file_dropzone.js b/app/assets/javascripts/blob/blob_file_dropzone.js new file mode 100644 index 00000000000..f4044f22db2 --- /dev/null +++ b/app/assets/javascripts/blob/blob_file_dropzone.js @@ -0,0 +1,62 @@ +(function() { + this.BlobFileDropzone = (function() { + function BlobFileDropzone(form, method) { + var dropzone, form_dropzone, submitButton; + form_dropzone = form.find('.dropzone'); + Dropzone.autoDiscover = false; + dropzone = form_dropzone.dropzone({ + autoDiscover: false, + autoProcessQueue: false, + url: form.attr('action'), + method: method, + clickable: true, + uploadMultiple: false, + paramName: "file", + maxFilesize: gon.max_file_size || 10, + parallelUploads: 1, + maxFiles: 1, + addRemoveLinks: true, + previewsContainer: '.dropzone-previews', + headers: { + "X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content") + }, + init: function() { + this.on('addedfile', function(file) { + $('.dropzone-alerts').html('').hide(); + }); + this.on('success', function(header, response) { + window.location.href = response.filePath; + }); + this.on('maxfilesexceeded', function(file) { + this.removeFile(file); + }); + return this.on('sending', function(file, xhr, formData) { + formData.append('target_branch', form.find('.js-target-branch').val()); + formData.append('create_merge_request', form.find('.js-create-merge-request').val()); + formData.append('commit_message', form.find('.js-commit-message').val()); + }); + }, + error: function(file, errorMessage) { + var stripped; + stripped = $("
            ").html(errorMessage).text(); + $('.dropzone-alerts').html('Error uploading file: \"' + stripped + '\"').show(); + this.removeFile(file); + } + }); + submitButton = form.find('#submit-all')[0]; + submitButton.addEventListener('click', function(e) { + e.preventDefault(); + e.stopPropagation(); + if (dropzone[0].dropzone.getQueuedFiles().length === 0) { + alert("Please select a file"); + } + dropzone[0].dropzone.processQueue(); + return false; + }); + } + + return BlobFileDropzone; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/blob/blob_file_dropzone.js.coffee b/app/assets/javascripts/blob/blob_file_dropzone.js.coffee deleted file mode 100644 index 9df932817f6..00000000000 --- a/app/assets/javascripts/blob/blob_file_dropzone.js.coffee +++ /dev/null @@ -1,57 +0,0 @@ -class @BlobFileDropzone - constructor: (form, method) -> - form_dropzone = form.find('.dropzone') - Dropzone.autoDiscover = false - dropzone = form_dropzone.dropzone( - autoDiscover: false - autoProcessQueue: false - url: form.attr('action') - # Rails uses a hidden input field for PUT - # http://stackoverflow.com/questions/21056482/how-to-set-method-put-in-form-tag-in-rails - method: method - clickable: true - uploadMultiple: false - paramName: "file" - maxFilesize: gon.max_file_size or 10 - parallelUploads: 1 - maxFiles: 1 - addRemoveLinks: true - previewsContainer: '.dropzone-previews' - headers: - "X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content") - - init: -> - this.on 'addedfile', (file) -> - $('.dropzone-alerts').html('').hide() - - return - - this.on 'success', (header, response) -> - window.location.href = response.filePath - return - - this.on 'maxfilesexceeded', (file) -> - @removeFile file - return - - this.on 'sending', (file, xhr, formData) -> - formData.append('target_branch', form.find('.js-target-branch').val()) - formData.append('create_merge_request', form.find('.js-create-merge-request').val()) - formData.append('commit_message', form.find('.js-commit-message').val()) - return - - # Override behavior of adding error underneath preview - error: (file, errorMessage) -> - stripped = $("
            ").html(errorMessage).text(); - $('.dropzone-alerts').html('Error uploading file: \"' + stripped + '\"').show() - @removeFile file - return - ) - - submitButton = form.find('#submit-all')[0] - submitButton.addEventListener 'click', (e) -> - e.preventDefault() - e.stopPropagation() - alert "Please select a file" if dropzone[0].dropzone.getQueuedFiles().length == 0 - dropzone[0].dropzone.processQueue() - return false diff --git a/app/assets/javascripts/blob/blob_gitignore_selector.js b/app/assets/javascripts/blob/blob_gitignore_selector.js new file mode 100644 index 00000000000..54a09e919f8 --- /dev/null +++ b/app/assets/javascripts/blob/blob_gitignore_selector.js @@ -0,0 +1,23 @@ + +/*= require blob/template_selector */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.BlobGitignoreSelector = (function(superClass) { + extend(BlobGitignoreSelector, superClass); + + function BlobGitignoreSelector() { + return BlobGitignoreSelector.__super__.constructor.apply(this, arguments); + } + + BlobGitignoreSelector.prototype.requestFile = function(query) { + return Api.gitignoreText(query.name, this.requestFileSuccess.bind(this)); + }; + + return BlobGitignoreSelector; + + })(TemplateSelector); + +}).call(this); diff --git a/app/assets/javascripts/blob/blob_gitignore_selector.js.coffee b/app/assets/javascripts/blob/blob_gitignore_selector.js.coffee deleted file mode 100644 index 8d0e3f363d1..00000000000 --- a/app/assets/javascripts/blob/blob_gitignore_selector.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -#= require blob/template_selector - -class @BlobGitignoreSelector extends TemplateSelector - requestFile: (query) -> - Api.gitignoreText query.name, @requestFileSuccess.bind(@) diff --git a/app/assets/javascripts/blob/blob_gitignore_selectors.js b/app/assets/javascripts/blob/blob_gitignore_selectors.js new file mode 100644 index 00000000000..4e9500428b2 --- /dev/null +++ b/app/assets/javascripts/blob/blob_gitignore_selectors.js @@ -0,0 +1,25 @@ +(function() { + this.BlobGitignoreSelectors = (function() { + function BlobGitignoreSelectors(opts) { + var ref; + this.$dropdowns = (ref = opts.$dropdowns) != null ? ref : $('.js-gitignore-selector'), this.editor = opts.editor; + this.$dropdowns.each((function(_this) { + return function(i, dropdown) { + var $dropdown; + $dropdown = $(dropdown); + return new BlobGitignoreSelector({ + pattern: /(.gitignore)/, + data: $dropdown.data('data'), + wrapper: $dropdown.closest('.js-gitignore-selector-wrap'), + dropdown: $dropdown, + editor: _this.editor + }); + }; + })(this)); + } + + return BlobGitignoreSelectors; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/blob/blob_gitignore_selectors.js.coffee b/app/assets/javascripts/blob/blob_gitignore_selectors.js.coffee deleted file mode 100644 index a719ba25122..00000000000 --- a/app/assets/javascripts/blob/blob_gitignore_selectors.js.coffee +++ /dev/null @@ -1,17 +0,0 @@ -class @BlobGitignoreSelectors - constructor: (opts) -> - { - @$dropdowns = $('.js-gitignore-selector') - @editor - } = opts - - @$dropdowns.each (i, dropdown) => - $dropdown = $(dropdown) - - new BlobGitignoreSelector( - pattern: /(.gitignore)/, - data: $dropdown.data('data'), - wrapper: $dropdown.closest('.js-gitignore-selector-wrap'), - dropdown: $dropdown, - editor: @editor - ) diff --git a/app/assets/javascripts/blob/blob_license_selector.js b/app/assets/javascripts/blob/blob_license_selector.js new file mode 100644 index 00000000000..9a8ef08f4e5 --- /dev/null +++ b/app/assets/javascripts/blob/blob_license_selector.js @@ -0,0 +1,28 @@ + +/*= require blob/template_selector */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.BlobLicenseSelector = (function(superClass) { + extend(BlobLicenseSelector, superClass); + + function BlobLicenseSelector() { + return BlobLicenseSelector.__super__.constructor.apply(this, arguments); + } + + BlobLicenseSelector.prototype.requestFile = function(query) { + var data; + data = { + project: this.dropdown.data('project'), + fullname: this.dropdown.data('fullname') + }; + return Api.licenseText(query.id, data, this.requestFileSuccess.bind(this)); + }; + + return BlobLicenseSelector; + + })(TemplateSelector); + +}).call(this); diff --git a/app/assets/javascripts/blob/blob_license_selector.js.coffee b/app/assets/javascripts/blob/blob_license_selector.js.coffee deleted file mode 100644 index a3cc8dd844c..00000000000 --- a/app/assets/javascripts/blob/blob_license_selector.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -#= require blob/template_selector - -class @BlobLicenseSelector extends TemplateSelector - requestFile: (query) -> - data = - project: @dropdown.data('project') - fullname: @dropdown.data('fullname') - - Api.licenseText query.id, data, @requestFileSuccess.bind(@) diff --git a/app/assets/javascripts/blob/blob_license_selectors.js b/app/assets/javascripts/blob/blob_license_selectors.js new file mode 100644 index 00000000000..39237705e8d --- /dev/null +++ b/app/assets/javascripts/blob/blob_license_selectors.js @@ -0,0 +1,25 @@ +(function() { + this.BlobLicenseSelectors = (function() { + function BlobLicenseSelectors(opts) { + var ref; + this.$dropdowns = (ref = opts.$dropdowns) != null ? ref : $('.js-license-selector'), this.editor = opts.editor; + this.$dropdowns.each((function(_this) { + return function(i, dropdown) { + var $dropdown; + $dropdown = $(dropdown); + return new BlobLicenseSelector({ + pattern: /^(.+\/)?(licen[sc]e|copying)($|\.)/i, + data: $dropdown.data('data'), + wrapper: $dropdown.closest('.js-license-selector-wrap'), + dropdown: $dropdown, + editor: _this.editor + }); + }; + })(this)); + } + + return BlobLicenseSelectors; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/blob/blob_license_selectors.js.coffee b/app/assets/javascripts/blob/blob_license_selectors.js.coffee deleted file mode 100644 index 68438733108..00000000000 --- a/app/assets/javascripts/blob/blob_license_selectors.js.coffee +++ /dev/null @@ -1,17 +0,0 @@ -class @BlobLicenseSelectors - constructor: (opts) -> - { - @$dropdowns = $('.js-license-selector') - @editor - } = opts - - @$dropdowns.each (i, dropdown) => - $dropdown = $(dropdown) - - new BlobLicenseSelector( - pattern: /^(.+\/)?(licen[sc]e|copying)($|\.)/i, - data: $dropdown.data('data'), - wrapper: $dropdown.closest('.js-license-selector-wrap'), - dropdown: $dropdown, - editor: @editor - ) diff --git a/app/assets/javascripts/blob/edit_blob.js b/app/assets/javascripts/blob/edit_blob.js new file mode 100644 index 00000000000..649c79daee8 --- /dev/null +++ b/app/assets/javascripts/blob/edit_blob.js @@ -0,0 +1,66 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.EditBlob = (function() { + function EditBlob(assets_path, ace_mode) { + if (ace_mode == null) { + ace_mode = null; + } + this.editModeLinkClickHandler = bind(this.editModeLinkClickHandler, this); + ace.config.set("modePath", assets_path + "/ace"); + ace.config.loadModule("ace/ext/searchbox"); + this.editor = ace.edit("editor"); + this.editor.focus(); + if (ace_mode) { + this.editor.getSession().setMode("ace/mode/" + ace_mode); + } + $('form').submit((function(_this) { + return function() { + return $("#file-content").val(_this.editor.getValue()); + }; + })(this)); + this.initModePanesAndLinks(); + new BlobLicenseSelectors({ + editor: this.editor + }); + new BlobGitignoreSelectors({ + editor: this.editor + }); + new BlobCiYamlSelectors({ + editor: this.editor + }); + } + + EditBlob.prototype.initModePanesAndLinks = function() { + this.$editModePanes = $(".js-edit-mode-pane"); + this.$editModeLinks = $(".js-edit-mode a"); + return this.$editModeLinks.click(this.editModeLinkClickHandler); + }; + + EditBlob.prototype.editModeLinkClickHandler = function(event) { + var currentLink, currentPane, paneId; + event.preventDefault(); + currentLink = $(event.target); + paneId = currentLink.attr("href"); + currentPane = this.$editModePanes.filter(paneId); + this.$editModeLinks.parent().removeClass("active hover"); + currentLink.parent().addClass("active hover"); + this.$editModePanes.hide(); + currentPane.fadeIn(200); + if (paneId === "#preview") { + return $.post(currentLink.data("preview-url"), { + content: this.editor.getValue() + }, function(response) { + currentPane.empty().append(response); + return currentPane.syntaxHighlight(); + }); + } else { + return this.editor.focus(); + } + }; + + return EditBlob; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/blob/edit_blob.js.coffee b/app/assets/javascripts/blob/edit_blob.js.coffee deleted file mode 100644 index 19e584519d7..00000000000 --- a/app/assets/javascripts/blob/edit_blob.js.coffee +++ /dev/null @@ -1,42 +0,0 @@ -class @EditBlob - constructor: (assets_path, ace_mode = null) -> - ace.config.set "modePath", "#{assets_path}/ace" - ace.config.loadModule "ace/ext/searchbox" - @editor = ace.edit("editor") - @editor.focus() - @editor.getSession().setMode "ace/mode/#{ace_mode}" if ace_mode - - # Before a form submission, move the content from the Ace editor into the - # submitted textarea - $('form').submit => - $("#file-content").val(@editor.getValue()) - - @initModePanesAndLinks() - - new BlobLicenseSelectors { @editor } - new BlobGitignoreSelectors { @editor } - new BlobCiYamlSelectors { @editor } - - initModePanesAndLinks: -> - @$editModePanes = $(".js-edit-mode-pane") - @$editModeLinks = $(".js-edit-mode a") - @$editModeLinks.click @editModeLinkClickHandler - - editModeLinkClickHandler: (event) => - event.preventDefault() - currentLink = $(event.target) - paneId = currentLink.attr("href") - currentPane = @$editModePanes.filter(paneId) - @$editModeLinks.parent().removeClass "active hover" - currentLink.parent().addClass "active hover" - @$editModePanes.hide() - currentPane.fadeIn 200 - if paneId is "#preview" - $.post currentLink.data("preview-url"), - content: @editor.getValue() - , (response) -> - currentPane.empty().append response - currentPane.syntaxHighlight() - - else - @editor.focus() diff --git a/app/assets/javascripts/blob/template_selector.js b/app/assets/javascripts/blob/template_selector.js new file mode 100644 index 00000000000..2cf0a6631b8 --- /dev/null +++ b/app/assets/javascripts/blob/template_selector.js @@ -0,0 +1,74 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.TemplateSelector = (function() { + function TemplateSelector(opts) { + var ref; + if (opts == null) { + opts = {}; + } + this.onClick = bind(this.onClick, this); + this.dropdown = opts.dropdown, this.data = opts.data, this.pattern = opts.pattern, this.wrapper = opts.wrapper, this.editor = opts.editor, this.fileEndpoint = opts.fileEndpoint, this.$input = (ref = opts.$input) != null ? ref : $('#file_name'); + this.buildDropdown(); + this.bindEvents(); + this.onFilenameUpdate(); + } + + TemplateSelector.prototype.buildDropdown = function() { + return this.dropdown.glDropdown({ + data: this.data, + filterable: true, + selectable: true, + toggleLabel: this.toggleLabel, + search: { + fields: ['name'] + }, + clicked: this.onClick, + text: function(item) { + return item.name; + } + }); + }; + + TemplateSelector.prototype.bindEvents = function() { + return this.$input.on('keyup blur', (function(_this) { + return function(e) { + return _this.onFilenameUpdate(); + }; + })(this)); + }; + + TemplateSelector.prototype.toggleLabel = function(item) { + return item.name; + }; + + TemplateSelector.prototype.onFilenameUpdate = function() { + var filenameMatches; + if (!this.$input.length) { + return; + } + filenameMatches = this.pattern.test(this.$input.val().trim()); + if (!filenameMatches) { + this.wrapper.addClass('hidden'); + return; + } + return this.wrapper.removeClass('hidden'); + }; + + TemplateSelector.prototype.onClick = function(item, el, e) { + e.preventDefault(); + return this.requestFile(item); + }; + + TemplateSelector.prototype.requestFile = function(item) {}; + + TemplateSelector.prototype.requestFileSuccess = function(file) { + this.editor.setValue(file.content, 1); + return this.editor.focus(); + }; + + return TemplateSelector; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/blob/template_selector.js.coffee b/app/assets/javascripts/blob/template_selector.js.coffee deleted file mode 100644 index 40c9169beac..00000000000 --- a/app/assets/javascripts/blob/template_selector.js.coffee +++ /dev/null @@ -1,60 +0,0 @@ -class @TemplateSelector - constructor: (opts = {}) -> - { - @dropdown, - @data, - @pattern, - @wrapper, - @editor, - @fileEndpoint, - @$input = $('#file_name') - } = opts - - @buildDropdown() - @bindEvents() - @onFilenameUpdate() - - buildDropdown: -> - @dropdown.glDropdown( - data: @data, - filterable: true, - selectable: true, - toggleLabel: @toggleLabel, - search: - fields: ['name'] - clicked: @onClick - text: (item) -> - item.name - ) - - bindEvents: -> - @$input.on('keyup blur', (e) => - @onFilenameUpdate() - ) - - toggleLabel: (item) -> - item.name - - onFilenameUpdate: -> - return unless @$input.length - - filenameMatches = @pattern.test(@$input.val().trim()) - - if not filenameMatches - @wrapper.addClass('hidden') - return - - @wrapper.removeClass('hidden') - - onClick: (item, el, e) => - e.preventDefault() - @requestFile(item) - - requestFile: (item) -> - # To be implemented on the extending class - # e.g. - # Api.gitignoreText item.name, @requestFileSuccess.bind(@) - - requestFileSuccess: (file) -> - @editor.setValue(file.content, 1) - @editor.focus() diff --git a/app/assets/javascripts/breakpoints.coffee b/app/assets/javascripts/breakpoints.coffee deleted file mode 100644 index 5457430f921..00000000000 --- a/app/assets/javascripts/breakpoints.coffee +++ /dev/null @@ -1,37 +0,0 @@ -class @Breakpoints - instance = null; - - class BreakpointInstance - BREAKPOINTS = ["xs", "sm", "md", "lg"] - - constructor: -> - @setup() - - setup: -> - allDeviceSelector = BREAKPOINTS.map (breakpoint) -> - ".device-#{breakpoint}" - return if $(allDeviceSelector.join(",")).length - - # Create all the elements - els = $.map BREAKPOINTS, (breakpoint) -> - "
            " - $("body").append els.join('') - - visibleDevice: -> - allDeviceSelector = BREAKPOINTS.map (breakpoint) -> - ".device-#{breakpoint}" - $(allDeviceSelector.join(",")).filter(":visible") - - getBreakpointSize: -> - $visibleDevice = @visibleDevice - # the page refreshed via turbolinks - if not $visibleDevice().length - @setup() - $visibleDevice = @visibleDevice() - return $visibleDevice.attr("class").split("visible-")[1] - - @get: -> - return instance ?= new BreakpointInstance - -$ => - @bp = Breakpoints.get() diff --git a/app/assets/javascripts/breakpoints.js b/app/assets/javascripts/breakpoints.js new file mode 100644 index 00000000000..1e0148e5798 --- /dev/null +++ b/app/assets/javascripts/breakpoints.js @@ -0,0 +1,68 @@ +(function() { + this.Breakpoints = (function() { + var BreakpointInstance, instance; + + function Breakpoints() {} + + instance = null; + + BreakpointInstance = (function() { + var BREAKPOINTS; + + BREAKPOINTS = ["xs", "sm", "md", "lg"]; + + function BreakpointInstance() { + this.setup(); + } + + BreakpointInstance.prototype.setup = function() { + var allDeviceSelector, els; + allDeviceSelector = BREAKPOINTS.map(function(breakpoint) { + return ".device-" + breakpoint; + }); + if ($(allDeviceSelector.join(",")).length) { + return; + } + els = $.map(BREAKPOINTS, function(breakpoint) { + return "
            "; + }); + return $("body").append(els.join('')); + }; + + BreakpointInstance.prototype.visibleDevice = function() { + var allDeviceSelector; + allDeviceSelector = BREAKPOINTS.map(function(breakpoint) { + return ".device-" + breakpoint; + }); + return $(allDeviceSelector.join(",")).filter(":visible"); + }; + + BreakpointInstance.prototype.getBreakpointSize = function() { + var $visibleDevice; + $visibleDevice = this.visibleDevice; + if (!$visibleDevice().length) { + this.setup(); + } + $visibleDevice = this.visibleDevice(); + return $visibleDevice.attr("class").split("visible-")[1]; + }; + + return BreakpointInstance; + + })(); + + Breakpoints.get = function() { + return instance != null ? instance : instance = new BreakpointInstance; + }; + + return Breakpoints; + + })(); + + $((function(_this) { + return function() { + return _this.bp = Breakpoints.get(); + }; + })(this)); + +}).call(this); diff --git a/app/assets/javascripts/broadcast_message.js b/app/assets/javascripts/broadcast_message.js new file mode 100644 index 00000000000..fceeff36728 --- /dev/null +++ b/app/assets/javascripts/broadcast_message.js @@ -0,0 +1,34 @@ +(function() { + $(function() { + var previewPath; + $('input#broadcast_message_color').on('input', function() { + var previewColor; + previewColor = $(this).val(); + return $('div.broadcast-message-preview').css('background-color', previewColor); + }); + $('input#broadcast_message_font').on('input', function() { + var previewColor; + previewColor = $(this).val(); + return $('div.broadcast-message-preview').css('color', previewColor); + }); + previewPath = $('textarea#broadcast_message_message').data('preview-path'); + return $('textarea#broadcast_message_message').on('input', function() { + var message; + message = $(this).val(); + if (message === '') { + return $('.js-broadcast-message-preview').text("Your message here"); + } else { + return $.ajax({ + url: previewPath, + type: "POST", + data: { + broadcast_message: { + message: message + } + } + }); + } + }); + }); + +}).call(this); diff --git a/app/assets/javascripts/broadcast_message.js.coffee b/app/assets/javascripts/broadcast_message.js.coffee deleted file mode 100644 index a38a329c4c2..00000000000 --- a/app/assets/javascripts/broadcast_message.js.coffee +++ /dev/null @@ -1,22 +0,0 @@ -$ -> - $('input#broadcast_message_color').on 'input', -> - previewColor = $(@).val() - $('div.broadcast-message-preview').css('background-color', previewColor) - - $('input#broadcast_message_font').on 'input', -> - previewColor = $(@).val() - $('div.broadcast-message-preview').css('color', previewColor) - - previewPath = $('textarea#broadcast_message_message').data('preview-path') - - $('textarea#broadcast_message_message').on 'input', -> - message = $(@).val() - - if message == '' - $('.js-broadcast-message-preview').text("Your message here") - else - $.ajax( - url: previewPath - type: "POST" - data: { broadcast_message: { message: message } } - ) diff --git a/app/assets/javascripts/build.coffee b/app/assets/javascripts/build.coffee deleted file mode 100644 index cf203ea43a0..00000000000 --- a/app/assets/javascripts/build.coffee +++ /dev/null @@ -1,114 +0,0 @@ -class @Build - @interval: null - @state: null - - constructor: (@page_url, @build_url, @build_status, @state) -> - clearInterval(Build.interval) - - # Init breakpoint checker - @bp = Breakpoints.get() - @hideSidebar() - $('.js-build-sidebar').niceScroll() - $(document) - .off 'click', '.js-sidebar-build-toggle' - .on 'click', '.js-sidebar-build-toggle', @toggleSidebar - - $(window) - .off 'resize.build' - .on 'resize.build', @hideSidebar - - @updateArtifactRemoveDate() - - if $('#build-trace').length - @getInitialBuildTrace() - @initScrollButtonAffix() - - if @build_status is "running" or @build_status is "pending" - # - # Bind autoscroll button to follow build output - # - $('#autoscroll-button').on 'click', -> - state = $(this).data("state") - if "enabled" is state - $(this).data "state", "disabled" - $(this).text "enable autoscroll" - else - $(this).data "state", "enabled" - $(this).text "disable autoscroll" - - # - # Check for new build output if user still watching build page - # Only valid for runnig build when output changes during time - # - Build.interval = setInterval => - if window.location.href.split("#").first() is @page_url - @getBuildTrace() - , 4000 - - getInitialBuildTrace: -> - $.ajax - url: @build_url - dataType: 'json' - success: (build_data) -> - $('.js-build-output').html build_data.trace_html - - if build_data.status is 'success' or build_data.status is 'failed' - $('.js-build-refresh').remove() - - getBuildTrace: -> - $.ajax - url: "#{@page_url}/trace.json?state=#{encodeURIComponent(@state)}" - dataType: "json" - success: (log) => - if log.state - @state = log.state - - if log.status is "running" - if log.append - $('.js-build-output').append log.html - else - $('.js-build-output').html log.html - @checkAutoscroll() - else if log.status isnt @build_status - Turbolinks.visit @page_url - - checkAutoscroll: -> - $("html,body").scrollTop $("#build-trace").height() if "enabled" is $("#autoscroll-button").data("state") - - initScrollButtonAffix: -> - $buildScroll = $('#js-build-scroll') - $body = $('body') - $buildTrace = $('#build-trace') - - $buildScroll.affix( - offset: - bottom: -> - $body.outerHeight() - ($buildTrace.outerHeight() + $buildTrace.offset().top) - ) - - shouldHideSidebar: -> - bootstrapBreakpoint = @bp.getBreakpointSize() - - bootstrapBreakpoint is 'xs' or bootstrapBreakpoint is 'sm' - - toggleSidebar: => - if @shouldHideSidebar() - $('.js-build-sidebar') - .toggleClass 'right-sidebar-expanded right-sidebar-collapsed' - - hideSidebar: => - if @shouldHideSidebar() - $('.js-build-sidebar') - .removeClass 'right-sidebar-expanded' - .addClass 'right-sidebar-collapsed' - else - $('.js-build-sidebar') - .removeClass 'right-sidebar-collapsed' - .addClass 'right-sidebar-expanded' - - updateArtifactRemoveDate: -> - $date = $('.js-artifacts-remove') - - if $date.length - date = $date.text() - $date.text $.timefor(new Date(date), ' ') diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js new file mode 100644 index 00000000000..e135cb92a30 --- /dev/null +++ b/app/assets/javascripts/build.js @@ -0,0 +1,139 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Build = (function() { + Build.interval = null; + + Build.state = null; + + function Build(page_url, build_url, build_status, state1) { + this.page_url = page_url; + this.build_url = build_url; + this.build_status = build_status; + this.state = state1; + this.hideSidebar = bind(this.hideSidebar, this); + this.toggleSidebar = bind(this.toggleSidebar, this); + clearInterval(Build.interval); + this.bp = Breakpoints.get(); + this.hideSidebar(); + $('.js-build-sidebar').niceScroll(); + $(document).off('click', '.js-sidebar-build-toggle').on('click', '.js-sidebar-build-toggle', this.toggleSidebar); + $(window).off('resize.build').on('resize.build', this.hideSidebar); + this.updateArtifactRemoveDate(); + if ($('#build-trace').length) { + this.getInitialBuildTrace(); + this.initScrollButtonAffix(); + } + if (this.build_status === "running" || this.build_status === "pending") { + $('#autoscroll-button').on('click', function() { + var state; + state = $(this).data("state"); + if ("enabled" === state) { + $(this).data("state", "disabled"); + return $(this).text("enable autoscroll"); + } else { + $(this).data("state", "enabled"); + return $(this).text("disable autoscroll"); + } + }); + Build.interval = setInterval((function(_this) { + return function() { + if (window.location.href.split("#").first() === _this.page_url) { + return _this.getBuildTrace(); + } + }; + })(this), 4000); + } + } + + Build.prototype.getInitialBuildTrace = function() { + return $.ajax({ + url: this.build_url, + dataType: 'json', + success: function(build_data) { + $('.js-build-output').html(build_data.trace_html); + if (build_data.status === 'success' || build_data.status === 'failed') { + return $('.js-build-refresh').remove(); + } + } + }); + }; + + Build.prototype.getBuildTrace = function() { + return $.ajax({ + url: this.page_url + "/trace.json?state=" + (encodeURIComponent(this.state)), + dataType: "json", + success: (function(_this) { + return function(log) { + if (log.state) { + _this.state = log.state; + } + if (log.status === "running") { + if (log.append) { + $('.js-build-output').append(log.html); + } else { + $('.js-build-output').html(log.html); + } + return _this.checkAutoscroll(); + } else if (log.status !== _this.build_status) { + return Turbolinks.visit(_this.page_url); + } + }; + })(this) + }); + }; + + Build.prototype.checkAutoscroll = function() { + if ("enabled" === $("#autoscroll-button").data("state")) { + return $("html,body").scrollTop($("#build-trace").height()); + } + }; + + Build.prototype.initScrollButtonAffix = function() { + var $body, $buildScroll, $buildTrace; + $buildScroll = $('#js-build-scroll'); + $body = $('body'); + $buildTrace = $('#build-trace'); + return $buildScroll.affix({ + offset: { + bottom: function() { + return $body.outerHeight() - ($buildTrace.outerHeight() + $buildTrace.offset().top); + } + } + }); + }; + + Build.prototype.shouldHideSidebar = function() { + var bootstrapBreakpoint; + bootstrapBreakpoint = this.bp.getBreakpointSize(); + return bootstrapBreakpoint === 'xs' || bootstrapBreakpoint === 'sm'; + }; + + Build.prototype.toggleSidebar = function() { + if (this.shouldHideSidebar()) { + return $('.js-build-sidebar').toggleClass('right-sidebar-expanded right-sidebar-collapsed'); + } + }; + + Build.prototype.hideSidebar = function() { + if (this.shouldHideSidebar()) { + return $('.js-build-sidebar').removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed'); + } else { + return $('.js-build-sidebar').removeClass('right-sidebar-collapsed').addClass('right-sidebar-expanded'); + } + }; + + Build.prototype.updateArtifactRemoveDate = function() { + var $date, date; + $date = $('.js-artifacts-remove'); + if ($date.length) { + date = $date.text(); + return $date.text($.timefor(new Date(date), ' ')); + } + }; + + return Build; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/build_artifacts.js b/app/assets/javascripts/build_artifacts.js new file mode 100644 index 00000000000..f345ba0abe6 --- /dev/null +++ b/app/assets/javascripts/build_artifacts.js @@ -0,0 +1,27 @@ +(function() { + this.BuildArtifacts = (function() { + function BuildArtifacts() { + this.disablePropagation(); + this.setupEntryClick(); + } + + BuildArtifacts.prototype.disablePropagation = function() { + $('.top-block').on('click', '.download', function(e) { + return e.stopPropagation(); + }); + return $('.tree-holder').on('click', 'tr[data-link] a', function(e) { + return e.stopImmediatePropagation(); + }); + }; + + BuildArtifacts.prototype.setupEntryClick = function() { + return $('.tree-holder').on('click', 'tr[data-link]', function(e) { + return window.location = this.dataset.link; + }); + }; + + return BuildArtifacts; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/build_artifacts.js.coffee b/app/assets/javascripts/build_artifacts.js.coffee deleted file mode 100644 index 5ae6cba56c8..00000000000 --- a/app/assets/javascripts/build_artifacts.js.coffee +++ /dev/null @@ -1,14 +0,0 @@ -class @BuildArtifacts - constructor: () -> - @disablePropagation() - @setupEntryClick() - - disablePropagation: -> - $('.top-block').on 'click', '.download', (e) -> - e.stopPropagation() - $('.tree-holder').on 'click', 'tr[data-link] a', (e) -> - e.stopImmediatePropagation() - - setupEntryClick: -> - $('.tree-holder').on 'click', 'tr[data-link]', (e) -> - window.location = @dataset.link diff --git a/app/assets/javascripts/commit.js b/app/assets/javascripts/commit.js new file mode 100644 index 00000000000..23cf5b519f4 --- /dev/null +++ b/app/assets/javascripts/commit.js @@ -0,0 +1,13 @@ +(function() { + this.Commit = (function() { + function Commit() { + $('.files .diff-file').each(function() { + return new CommitFile(this); + }); + } + + return Commit; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/commit.js.coffee b/app/assets/javascripts/commit.js.coffee deleted file mode 100644 index 0566e239191..00000000000 --- a/app/assets/javascripts/commit.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -class @Commit - constructor: -> - $('.files .diff-file').each -> - new CommitFile(this) diff --git a/app/assets/javascripts/commit/file.js b/app/assets/javascripts/commit/file.js new file mode 100644 index 00000000000..be24ee56aad --- /dev/null +++ b/app/assets/javascripts/commit/file.js @@ -0,0 +1,13 @@ +(function() { + this.CommitFile = (function() { + function CommitFile(file) { + if ($('.image', file).length) { + new ImageFile(file); + } + } + + return CommitFile; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/commit/file.js.coffee b/app/assets/javascripts/commit/file.js.coffee deleted file mode 100644 index 83e793863b6..00000000000 --- a/app/assets/javascripts/commit/file.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -class @CommitFile - - constructor: (file) -> - if $('.image', file).length - new ImageFile(file) diff --git a/app/assets/javascripts/commit/image-file.js b/app/assets/javascripts/commit/image-file.js new file mode 100644 index 00000000000..c0d0b2d049f --- /dev/null +++ b/app/assets/javascripts/commit/image-file.js @@ -0,0 +1,175 @@ +(function() { + this.ImageFile = (function() { + var prepareFrames; + + ImageFile.availWidth = 900; + + ImageFile.viewModes = ['two-up', 'swipe']; + + function ImageFile(file) { + this.file = file; + this.requestImageInfo($('.two-up.view .frame.deleted img', this.file), (function(_this) { + return function(deletedWidth, deletedHeight) { + return _this.requestImageInfo($('.two-up.view .frame.added img', _this.file), function(width, height) { + if (width === deletedWidth && height === deletedHeight) { + return _this.initViewModes(); + } else { + return _this.initView('two-up'); + } + }); + }; + })(this)); + } + + ImageFile.prototype.initViewModes = function() { + var viewMode; + viewMode = ImageFile.viewModes[0]; + $('.view-modes', this.file).removeClass('hide'); + $('.view-modes-menu', this.file).on('click', 'li', (function(_this) { + return function(event) { + if (!$(event.currentTarget).hasClass('active')) { + return _this.activateViewMode(event.currentTarget.className); + } + }; + })(this)); + return this.activateViewMode(viewMode); + }; + + ImageFile.prototype.activateViewMode = function(viewMode) { + $('.view-modes-menu li', this.file).removeClass('active').filter("." + viewMode).addClass('active'); + return $(".view:visible:not(." + viewMode + ")", this.file).fadeOut(200, (function(_this) { + return function() { + $(".view." + viewMode, _this.file).fadeIn(200); + return _this.initView(viewMode); + }; + })(this)); + }; + + ImageFile.prototype.initView = function(viewMode) { + return this.views[viewMode].call(this); + }; + + prepareFrames = function(view) { + var maxHeight, maxWidth; + maxWidth = 0; + maxHeight = 0; + $('.frame', view).each((function(_this) { + return function(index, frame) { + var height, width; + width = $(frame).width(); + height = $(frame).height(); + maxWidth = width > maxWidth ? width : maxWidth; + return maxHeight = height > maxHeight ? height : maxHeight; + }; + })(this)).css({ + width: maxWidth, + height: maxHeight + }); + return [maxWidth, maxHeight]; + }; + + ImageFile.prototype.views = { + 'two-up': function() { + return $('.two-up.view .wrap', this.file).each((function(_this) { + return function(index, wrap) { + $('img', wrap).each(function() { + var currentWidth; + currentWidth = $(this).width(); + if (currentWidth > ImageFile.availWidth / 2) { + return $(this).width(ImageFile.availWidth / 2); + } + }); + return _this.requestImageInfo($('img', wrap), function(width, height) { + $('.image-info .meta-width', wrap).text(width + "px"); + $('.image-info .meta-height', wrap).text(height + "px"); + return $('.image-info', wrap).removeClass('hide'); + }); + }; + })(this)); + }, + 'swipe': function() { + var maxHeight, maxWidth; + maxWidth = 0; + maxHeight = 0; + return $('.swipe.view', this.file).each((function(_this) { + return function(index, view) { + var ref; + ref = prepareFrames(view), maxWidth = ref[0], maxHeight = ref[1]; + $('.swipe-frame', view).css({ + width: maxWidth + 16, + height: maxHeight + 28 + }); + $('.swipe-wrap', view).css({ + width: maxWidth + 1, + height: maxHeight + 2 + }); + return $('.swipe-bar', view).css({ + left: 0 + }).draggable({ + axis: 'x', + containment: 'parent', + drag: function(event) { + return $('.swipe-wrap', view).width((maxWidth + 1) - $(this).position().left); + }, + stop: function(event) { + return $('.swipe-wrap', view).width((maxWidth + 1) - $(this).position().left); + } + }); + }; + })(this)); + }, + 'onion-skin': function() { + var dragTrackWidth, maxHeight, maxWidth; + maxWidth = 0; + maxHeight = 0; + dragTrackWidth = $('.drag-track', this.file).width() - $('.dragger', this.file).width(); + return $('.onion-skin.view', this.file).each((function(_this) { + return function(index, view) { + var ref; + ref = prepareFrames(view), maxWidth = ref[0], maxHeight = ref[1]; + $('.onion-skin-frame', view).css({ + width: maxWidth + 16, + height: maxHeight + 28 + }); + $('.swipe-wrap', view).css({ + width: maxWidth + 1, + height: maxHeight + 2 + }); + return $('.dragger', view).css({ + left: dragTrackWidth + }).draggable({ + axis: 'x', + containment: 'parent', + drag: function(event) { + return $('.frame.added', view).css('opacity', $(this).position().left / dragTrackWidth); + }, + stop: function(event) { + return $('.frame.added', view).css('opacity', $(this).position().left / dragTrackWidth); + } + }); + }; + })(this)); + } + }; + + ImageFile.prototype.requestImageInfo = function(img, callback) { + var domImg; + domImg = img.get(0); + if (domImg) { + if (domImg.complete) { + return callback.call(this, domImg.naturalWidth, domImg.naturalHeight); + } else { + return img.on('load', (function(_this) { + return function() { + return callback.call(_this, domImg.naturalWidth, domImg.naturalHeight); + }; + })(this)); + } + } + }; + + return ImageFile; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/commit/image-file.js.coffee b/app/assets/javascripts/commit/image-file.js.coffee deleted file mode 100644 index 9c723f51e54..00000000000 --- a/app/assets/javascripts/commit/image-file.js.coffee +++ /dev/null @@ -1,127 +0,0 @@ -class @ImageFile - - # Width where images must fits in, for 2-up this gets divided by 2 - @availWidth = 900 - @viewModes = ['two-up', 'swipe'] - - constructor: (@file) -> - # Determine if old and new file has same dimensions, if not show 'two-up' view - this.requestImageInfo $('.two-up.view .frame.deleted img', @file), (deletedWidth, deletedHeight) => - this.requestImageInfo $('.two-up.view .frame.added img', @file), (width, height) => - if width == deletedWidth && height == deletedHeight - this.initViewModes() - else - this.initView('two-up') - - initViewModes: -> - viewMode = ImageFile.viewModes[0] - - $('.view-modes', @file).removeClass 'hide' - $('.view-modes-menu', @file).on 'click', 'li', (event) => - unless $(event.currentTarget).hasClass('active') - this.activateViewMode(event.currentTarget.className) - - this.activateViewMode(viewMode) - - activateViewMode: (viewMode) -> - $('.view-modes-menu li', @file) - .removeClass('active') - .filter(".#{viewMode}").addClass 'active' - $(".view:visible:not(.#{viewMode})", @file).fadeOut 200, => - $(".view.#{viewMode}", @file).fadeIn(200) - this.initView viewMode - - initView: (viewMode) -> - this.views[viewMode].call(this) - - prepareFrames = (view) -> - maxWidth = 0 - maxHeight = 0 - $('.frame', view).each (index, frame) => - width = $(frame).width() - height = $(frame).height() - maxWidth = if width > maxWidth then width else maxWidth - maxHeight = if height > maxHeight then height else maxHeight - .css - width: maxWidth - height: maxHeight - - [maxWidth, maxHeight] - - views: - 'two-up': -> - $('.two-up.view .wrap', @file).each (index, wrap) => - $('img', wrap).each -> - currentWidth = $(this).width() - if currentWidth > ImageFile.availWidth / 2 - $(this).width ImageFile.availWidth / 2 - - this.requestImageInfo $('img', wrap), (width, height) -> - $('.image-info .meta-width', wrap).text "#{width}px" - $('.image-info .meta-height', wrap).text "#{height}px" - $('.image-info', wrap).removeClass('hide') - - 'swipe': -> - maxWidth = 0 - maxHeight = 0 - - $('.swipe.view', @file).each (index, view) => - - [maxWidth, maxHeight] = prepareFrames(view) - - $('.swipe-frame', view).css - width: maxWidth + 16 - height: maxHeight + 28 - - $('.swipe-wrap', view).css - width: maxWidth + 1 - height: maxHeight + 2 - - $('.swipe-bar', view).css - left: 0 - .draggable - axis: 'x' - containment: 'parent' - drag: (event) -> - $('.swipe-wrap', view).width (maxWidth + 1) - $(this).position().left - stop: (event) -> - $('.swipe-wrap', view).width (maxWidth + 1) - $(this).position().left - - 'onion-skin': -> - maxWidth = 0 - maxHeight = 0 - - dragTrackWidth = $('.drag-track', @file).width() - $('.dragger', @file).width() - - $('.onion-skin.view', @file).each (index, view) => - - [maxWidth, maxHeight] = prepareFrames(view) - - $('.onion-skin-frame', view).css - width: maxWidth + 16 - height: maxHeight + 28 - - $('.swipe-wrap', view).css - width: maxWidth + 1 - height: maxHeight + 2 - - $('.dragger', view).css - left: dragTrackWidth - .draggable - axis: 'x' - containment: 'parent' - drag: (event) -> - $('.frame.added', view).css('opacity', $(this).position().left / dragTrackWidth) - stop: (event) -> - $('.frame.added', view).css('opacity', $(this).position().left / dragTrackWidth) - - - - requestImageInfo: (img, callback) -> - domImg = img.get(0) - if domImg - if domImg.complete - callback.call(this, domImg.naturalWidth, domImg.naturalHeight) - else - img.on 'load', => - callback.call(this, domImg.naturalWidth, domImg.naturalHeight) diff --git a/app/assets/javascripts/commits.js b/app/assets/javascripts/commits.js new file mode 100644 index 00000000000..37f168c5190 --- /dev/null +++ b/app/assets/javascripts/commits.js @@ -0,0 +1,58 @@ +(function() { + this.CommitsList = (function() { + function CommitsList() {} + + CommitsList.timer = null; + + CommitsList.init = function(limit) { + $("body").on("click", ".day-commits-table li.commit", function(event) { + if (event.target.nodeName !== "A") { + location.href = $(this).attr("url"); + e.stopPropagation(); + return false; + } + }); + Pager.init(limit, false); + this.content = $("#commits-list"); + this.searchField = $("#commits-search"); + return this.initSearch(); + }; + + CommitsList.initSearch = function() { + this.timer = null; + return this.searchField.keyup((function(_this) { + return function() { + clearTimeout(_this.timer); + return _this.timer = setTimeout(_this.filterResults, 500); + }; + })(this)); + }; + + CommitsList.filterResults = function() { + var commitsUrl, form, search; + form = $(".commits-search-form"); + search = CommitsList.searchField.val(); + commitsUrl = form.attr("action") + '?' + form.serialize(); + CommitsList.content.fadeTo('fast', 0.5); + return $.ajax({ + type: "GET", + url: form.attr("action"), + data: form.serialize(), + complete: function() { + return CommitsList.content.fadeTo('fast', 1.0); + }, + success: function(data) { + CommitsList.content.html(data.html); + return history.replaceState({ + page: commitsUrl + }, document.title, commitsUrl); + }, + dataType: "json" + }); + }; + + return CommitsList; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/commits.js.coffee b/app/assets/javascripts/commits.js.coffee deleted file mode 100644 index 0acb4c1955e..00000000000 --- a/app/assets/javascripts/commits.js.coffee +++ /dev/null @@ -1,39 +0,0 @@ -class @CommitsList - @timer = null - - @init: (limit) -> - $("body").on "click", ".day-commits-table li.commit", (event) -> - if event.target.nodeName != "A" - location.href = $(this).attr("url") - e.stopPropagation() - return false - - Pager.init limit, false - - @content = $("#commits-list") - @searchField = $("#commits-search") - @initSearch() - - @initSearch: -> - @timer = null - @searchField.keyup => - clearTimeout(@timer) - @timer = setTimeout(@filterResults, 500) - - @filterResults: => - form = $(".commits-search-form") - search = @searchField.val() - commitsUrl = form.attr("action") + '?' + form.serialize() - @content.fadeTo('fast', 0.5) - - $.ajax - type: "GET" - url: form.attr("action") - data: form.serialize() - complete: => - @content.fadeTo('fast', 1.0) - success: (data) => - @content.html(data.html) - # Change url so if user reload a page - search results are saved - history.replaceState {page: commitsUrl}, document.title, commitsUrl - dataType: "json" diff --git a/app/assets/javascripts/compare.js b/app/assets/javascripts/compare.js new file mode 100644 index 00000000000..342ac0e8e69 --- /dev/null +++ b/app/assets/javascripts/compare.js @@ -0,0 +1,91 @@ +(function() { + this.Compare = (function() { + function Compare(opts) { + this.opts = opts; + this.source_loading = $(".js-source-loading"); + this.target_loading = $(".js-target-loading"); + $('.js-compare-dropdown').each((function(_this) { + return function(i, dropdown) { + var $dropdown; + $dropdown = $(dropdown); + return $dropdown.glDropdown({ + selectable: true, + fieldName: $dropdown.data('field-name'), + filterable: true, + id: function(obj, $el) { + return $el.data('id'); + }, + toggleLabel: function(obj, $el) { + return $el.text().trim(); + }, + clicked: function(e, el) { + if ($dropdown.is('.js-target-branch')) { + return _this.getTargetHtml(); + } else if ($dropdown.is('.js-source-branch')) { + return _this.getSourceHtml(); + } else if ($dropdown.is('.js-target-project')) { + return _this.getTargetProject(); + } + } + }); + }; + })(this)); + this.initialState(); + } + + Compare.prototype.initialState = function() { + this.getSourceHtml(); + return this.getTargetHtml(); + }; + + Compare.prototype.getTargetProject = function() { + return $.ajax({ + url: this.opts.targetProjectUrl, + data: { + target_project_id: $("input[name='merge_request[target_project_id]']").val() + }, + beforeSend: function() { + return $('.mr_target_commit').empty(); + }, + success: function(html) { + return $('.js-target-branch-dropdown .dropdown-content').html(html); + } + }); + }; + + Compare.prototype.getSourceHtml = function() { + return this.sendAjax(this.opts.sourceBranchUrl, this.source_loading, '.mr_source_commit', { + ref: $("input[name='merge_request[source_branch]']").val() + }); + }; + + Compare.prototype.getTargetHtml = function() { + return this.sendAjax(this.opts.targetBranchUrl, this.target_loading, '.mr_target_commit', { + target_project_id: $("input[name='merge_request[target_project_id]']").val(), + ref: $("input[name='merge_request[target_branch]']").val() + }); + }; + + Compare.prototype.sendAjax = function(url, loading, target, data) { + var $target; + $target = $(target); + return $.ajax({ + url: url, + data: data, + beforeSend: function() { + loading.show(); + return $target.empty(); + }, + success: function(html) { + loading.hide(); + $target.html(html); + return $('.js-timeago', $target).timeago(); + } + }); + }; + + return Compare; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/compare.js.coffee b/app/assets/javascripts/compare.js.coffee deleted file mode 100644 index f20992ead3e..00000000000 --- a/app/assets/javascripts/compare.js.coffee +++ /dev/null @@ -1,67 +0,0 @@ -class @Compare - constructor: (@opts) -> - @source_loading = $ ".js-source-loading" - @target_loading = $ ".js-target-loading" - - $('.js-compare-dropdown').each (i, dropdown) => - $dropdown = $(dropdown) - - $dropdown.glDropdown( - selectable: true - fieldName: $dropdown.data 'field-name' - filterable: true - id: (obj, $el) -> - $el.data 'id' - toggleLabel: (obj, $el) -> - $el.text().trim() - clicked: (e, el) => - if $dropdown.is '.js-target-branch' - @getTargetHtml() - else if $dropdown.is '.js-source-branch' - @getSourceHtml() - else if $dropdown.is '.js-target-project' - @getTargetProject() - ) - - @initialState() - - initialState: -> - @getSourceHtml() - @getTargetHtml() - - getTargetProject: -> - $.ajax( - url: @opts.targetProjectUrl - data: - target_project_id: $("input[name='merge_request[target_project_id]']").val() - beforeSend: -> - $('.mr_target_commit').empty() - success: (html) -> - $('.js-target-branch-dropdown .dropdown-content').html html - ) - - getSourceHtml: -> - @sendAjax(@opts.sourceBranchUrl, @source_loading, '.mr_source_commit', - ref: $("input[name='merge_request[source_branch]']").val() - ) - - getTargetHtml: -> - @sendAjax(@opts.targetBranchUrl, @target_loading, '.mr_target_commit', - target_project_id: $("input[name='merge_request[target_project_id]']").val() - ref: $("input[name='merge_request[target_branch]']").val() - ) - - sendAjax: (url, loading, target, data) -> - $target = $(target) - - $.ajax( - url: url - data: data - beforeSend: -> - loading.show() - $target.empty() - success: (html) -> - loading.hide() - $target.html html - $('.js-timeago', $target).timeago() - ) diff --git a/app/assets/javascripts/compare_autocomplete.js b/app/assets/javascripts/compare_autocomplete.js new file mode 100644 index 00000000000..4e3a28cd163 --- /dev/null +++ b/app/assets/javascripts/compare_autocomplete.js @@ -0,0 +1,51 @@ +(function() { + this.CompareAutocomplete = (function() { + function CompareAutocomplete() { + this.initDropdown(); + } + + CompareAutocomplete.prototype.initDropdown = function() { + return $('.js-compare-dropdown').each(function() { + var $dropdown, selected; + $dropdown = $(this); + selected = $dropdown.data('selected'); + return $dropdown.glDropdown({ + data: function(term, callback) { + return $.ajax({ + url: $dropdown.data('refs-url'), + data: { + ref: $dropdown.data('ref') + } + }).done(function(refs) { + return callback(refs); + }); + }, + selectable: true, + filterable: true, + filterByText: true, + fieldName: $dropdown.attr('name'), + filterInput: 'input[type="text"]', + renderRow: function(ref) { + var link; + if (ref.header != null) { + return $('
          • ').addClass('dropdown-header').text(ref.header); + } else { + link = $('').attr('href', '#').addClass(ref === selected ? 'is-active' : '').text(ref).attr('data-ref', escape(ref)); + return $('
          • ').append(link); + } + }, + id: function(obj, $el) { + return $el.attr('data-ref'); + }, + toggleLabel: function(obj, $el) { + return $el.text().trim(); + } + }); + }); + }; + + return CompareAutocomplete; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/compare_autocomplete.js.coffee b/app/assets/javascripts/compare_autocomplete.js.coffee deleted file mode 100644 index 7ad9fd97637..00000000000 --- a/app/assets/javascripts/compare_autocomplete.js.coffee +++ /dev/null @@ -1,41 +0,0 @@ -class @CompareAutocomplete - constructor: -> - @initDropdown() - - initDropdown: -> - $('.js-compare-dropdown').each -> - $dropdown = $(@) - selected = $dropdown.data('selected') - - $dropdown.glDropdown( - data: (term, callback) -> - $.ajax( - url: $dropdown.data('refs-url') - data: - ref: $dropdown.data('ref') - ).done (refs) -> - callback(refs) - selectable: true - filterable: true - filterByText: true - fieldName: $dropdown.attr('name') - filterInput: 'input[type="text"]' - renderRow: (ref) -> - if ref.header? - $('
          • ') - .addClass('dropdown-header') - .text(ref.header) - else - link = $('') - .attr('href', '#') - .addClass(if ref is selected then 'is-active' else '') - .text(ref) - .attr('data-ref', escape(ref)) - - $('
          • ') - .append(link) - id: (obj, $el) -> - $el.attr('data-ref') - toggleLabel: (obj, $el) -> - $el.text().trim() - ) diff --git a/app/assets/javascripts/confirm_danger_modal.js b/app/assets/javascripts/confirm_danger_modal.js new file mode 100644 index 00000000000..708ab08ffac --- /dev/null +++ b/app/assets/javascripts/confirm_danger_modal.js @@ -0,0 +1,32 @@ +(function() { + this.ConfirmDangerModal = (function() { + function ConfirmDangerModal(form, text) { + var project_path, submit; + this.form = form; + $('.js-confirm-text').text(text || ''); + $('.js-confirm-danger-input').val(''); + $('#modal-confirm-danger').modal('show'); + project_path = $('.js-confirm-danger-match').text(); + submit = $('.js-confirm-danger-submit'); + submit.disable(); + $('.js-confirm-danger-input').off('input'); + $('.js-confirm-danger-input').on('input', function() { + if (rstrip($(this).val()) === project_path) { + return submit.enable(); + } else { + return submit.disable(); + } + }); + $('.js-confirm-danger-submit').off('click'); + $('.js-confirm-danger-submit').on('click', (function(_this) { + return function() { + return _this.form.submit(); + }; + })(this)); + } + + return ConfirmDangerModal; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/confirm_danger_modal.js.coffee b/app/assets/javascripts/confirm_danger_modal.js.coffee deleted file mode 100644 index 66e34dd4a08..00000000000 --- a/app/assets/javascripts/confirm_danger_modal.js.coffee +++ /dev/null @@ -1,20 +0,0 @@ -class @ConfirmDangerModal - constructor: (form, text) -> - @form = form - $('.js-confirm-text').text(text || '') - $('.js-confirm-danger-input').val('') - $('#modal-confirm-danger').modal('show') - project_path = $('.js-confirm-danger-match').text() - submit = $('.js-confirm-danger-submit') - submit.disable() - - $('.js-confirm-danger-input').off 'input' - $('.js-confirm-danger-input').on 'input', -> - if rstrip($(@).val()) is project_path - submit.enable() - else - submit.disable() - - $('.js-confirm-danger-submit').off 'click' - $('.js-confirm-danger-submit').on 'click', => - @form.submit() diff --git a/app/assets/javascripts/copy_to_clipboard.js b/app/assets/javascripts/copy_to_clipboard.js new file mode 100644 index 00000000000..c82798cc6a5 --- /dev/null +++ b/app/assets/javascripts/copy_to_clipboard.js @@ -0,0 +1,42 @@ + +/*= require clipboard */ + +(function() { + var genericError, genericSuccess, showTooltip; + + genericSuccess = function(e) { + showTooltip(e.trigger, 'Copied!'); + e.clearSelection(); + return $(e.trigger).blur(); + }; + + genericError = function(e) { + var key; + if (/Mac/i.test(navigator.userAgent)) { + key = '⌘'; + } else { + key = 'Ctrl'; + } + return showTooltip(e.trigger, "Press " + key + "-C to copy"); + }; + + showTooltip = function(target, title) { + return $(target).tooltip({ + container: 'body', + html: 'true', + placement: 'auto bottom', + title: title, + trigger: 'manual' + }).tooltip('show').one('mouseleave', function() { + return $(this).tooltip('hide'); + }); + }; + + $(function() { + var clipboard; + clipboard = new Clipboard('[data-clipboard-target], [data-clipboard-text]'); + clipboard.on('success', genericSuccess); + return clipboard.on('error', genericError); + }); + +}).call(this); diff --git a/app/assets/javascripts/copy_to_clipboard.js.coffee b/app/assets/javascripts/copy_to_clipboard.js.coffee deleted file mode 100644 index 24301e01b10..00000000000 --- a/app/assets/javascripts/copy_to_clipboard.js.coffee +++ /dev/null @@ -1,37 +0,0 @@ -#= require clipboard - -genericSuccess = (e) -> - showTooltip(e.trigger, 'Copied!') - - # Clear the selection and blur the trigger so it loses its border - e.clearSelection() - $(e.trigger).blur() - -# Safari doesn't support `execCommand`, so instead we inform the user to -# copy manually. -# -# See http://clipboardjs.com/#browser-support -genericError = (e) -> - if /Mac/i.test(navigator.userAgent) - key = '⌘' # Command - else - key = 'Ctrl' - - showTooltip(e.trigger, "Press #{key}-C to copy") - -showTooltip = (target, title) -> - $(target). - tooltip( - container: 'body' - html: 'true' - placement: 'auto bottom' - title: title - trigger: 'manual' - ). - tooltip('show'). - one('mouseleave', -> $(this).tooltip('hide')) - -$ -> - clipboard = new Clipboard '[data-clipboard-target], [data-clipboard-text]' - clipboard.on 'success', genericSuccess - clipboard.on 'error', genericError diff --git a/app/assets/javascripts/diff.js b/app/assets/javascripts/diff.js new file mode 100644 index 00000000000..298f3852085 --- /dev/null +++ b/app/assets/javascripts/diff.js @@ -0,0 +1,77 @@ +(function() { + this.Diff = (function() { + var UNFOLD_COUNT; + + UNFOLD_COUNT = 20; + + function Diff() { + $('.files .diff-file').singleFileDiff(); + this.filesCommentButton = $('.files .diff-file').filesCommentButton(); + $(document).off('click', '.js-unfold'); + $(document).on('click', '.js-unfold', (function(_this) { + return function(event) { + var line_number, link, offset, old_line, params, prev_new_line, prev_old_line, ref, ref1, since, target, to, unfold, unfoldBottom; + target = $(event.target); + unfoldBottom = target.hasClass('js-unfold-bottom'); + unfold = true; + ref = _this.lineNumbers(target.parent()), old_line = ref[0], line_number = ref[1]; + offset = line_number - old_line; + if (unfoldBottom) { + line_number += 1; + since = line_number; + to = line_number + UNFOLD_COUNT; + } else { + ref1 = _this.lineNumbers(target.parent().prev()), prev_old_line = ref1[0], prev_new_line = ref1[1]; + line_number -= 1; + to = line_number; + if (line_number - UNFOLD_COUNT > prev_new_line + 1) { + since = line_number - UNFOLD_COUNT; + } else { + since = prev_new_line + 1; + unfold = false; + } + } + link = target.parents('.diff-file').attr('data-blob-diff-path'); + params = { + since: since, + to: to, + bottom: unfoldBottom, + offset: offset, + unfold: unfold, + indent: 1 + }; + return $.get(link, params, function(response) { + return target.parent().replaceWith(response); + }); + }; + })(this)); + } + + Diff.prototype.lineNumbers = function(line) { + var i, l, len, line_number, line_numbers, lines, results; + if (!line.children().length) { + return [0, 0]; + } + lines = line.children().slice(0, 2); + line_numbers = (function() { + var i, len, results; + results = []; + for (i = 0, len = lines.length; i < len; i++) { + l = lines[i]; + results.push($(l).attr('data-linenumber')); + } + return results; + })(); + results = []; + for (i = 0, len = line_numbers.length; i < len; i++) { + line_number = line_numbers[i]; + results.push(parseInt(line_number)); + } + return results; + }; + + return Diff; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/diff.js.coffee b/app/assets/javascripts/diff.js.coffee deleted file mode 100644 index c132cc8c542..00000000000 --- a/app/assets/javascripts/diff.js.coffee +++ /dev/null @@ -1,51 +0,0 @@ -class @Diff - UNFOLD_COUNT = 20 - constructor: -> - $('.files .diff-file').singleFileDiff() - @filesCommentButton = $('.files .diff-file').filesCommentButton() - - $(document).off('click', '.js-unfold') - $(document).on('click', '.js-unfold', (event) => - target = $(event.target) - unfoldBottom = target.hasClass('js-unfold-bottom') - unfold = true - - [old_line, line_number] = @lineNumbers(target.parent()) - offset = line_number - old_line - - if unfoldBottom - line_number += 1 - since = line_number - to = line_number + UNFOLD_COUNT - else - [prev_old_line, prev_new_line] = @lineNumbers(target.parent().prev()) - line_number -= 1 - to = line_number - if line_number - UNFOLD_COUNT > prev_new_line + 1 - since = line_number - UNFOLD_COUNT - else - since = prev_new_line + 1 - unfold = false - - link = target.parents('.diff-file').attr('data-blob-diff-path') - params = - since: since - to: to - bottom: unfoldBottom - offset: offset - unfold: unfold - # indent is used to compensate for single space indent to fit - # '+' and '-' prepended to diff lines, - # see https://gitlab.com/gitlab-org/gitlab-ce/issues/707 - indent: 1 - - $.get(link, params, (response) -> - target.parent().replaceWith(response) - ) - ) - - lineNumbers: (line) -> - return ([0, 0]) unless line.children().length - lines = line.children().slice(0, 2) - line_numbers = ($(l).attr('data-linenumber') for l in lines) - (parseInt(line_number) for line_number in line_numbers) diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js new file mode 100644 index 00000000000..d212d66da1b --- /dev/null +++ b/app/assets/javascripts/dispatcher.js @@ -0,0 +1,255 @@ +(function() { + var Dispatcher; + + $(function() { + return new Dispatcher(); + }); + + Dispatcher = (function() { + function Dispatcher() { + this.initSearch(); + this.initPageScripts(); + } + + Dispatcher.prototype.initPageScripts = function() { + var page, path, shortcut_handler; + page = $('body').attr('data-page'); + if (!page) { + return false; + } + path = page.split(':'); + shortcut_handler = null; + switch (page) { + case 'projects:issues:index': + Issuable.init(); + new IssuableBulkActions(); + shortcut_handler = new ShortcutsNavigation(); + break; + case 'projects:issues:show': + new Issue(); + shortcut_handler = new ShortcutsIssuable(); + new ZenMode(); + break; + case 'projects:milestones:show': + case 'groups:milestones:show': + case 'dashboard:milestones:show': + new Milestone(); + break; + case 'dashboard:todos:index': + new Todos(); + break; + case 'projects:milestones:new': + case 'projects:milestones:edit': + new ZenMode(); + new DueDateSelect(); + new GLForm($('.milestone-form')); + break; + case 'groups:milestones:new': + new ZenMode(); + break; + case 'projects:compare:show': + new Diff(); + break; + case 'projects:issues:new': + case 'projects:issues:edit': + shortcut_handler = new ShortcutsNavigation(); + new GLForm($('.issue-form')); + new IssuableForm($('.issue-form')); + break; + case 'projects:merge_requests:new': + case 'projects:merge_requests:edit': + new Diff(); + shortcut_handler = new ShortcutsNavigation(); + new GLForm($('.merge-request-form')); + new IssuableForm($('.merge-request-form')); + break; + case 'projects:tags:new': + new ZenMode(); + new GLForm($('.tag-form')); + break; + case 'projects:releases:edit': + new ZenMode(); + new GLForm($('.release-form')); + break; + case 'projects:merge_requests:show': + new Diff(); + shortcut_handler = new ShortcutsIssuable(true); + new ZenMode(); + new MergedButtons(); + break; + case 'projects:merge_requests:commits': + case 'projects:merge_requests:builds': + new MergedButtons(); + break; + case "projects:merge_requests:diffs": + new Diff(); + new ZenMode(); + new MergedButtons(); + break; + case 'projects:merge_requests:index': + shortcut_handler = new ShortcutsNavigation(); + Issuable.init(); + break; + case 'dashboard:activity': + new Activities(); + break; + case 'dashboard:projects:starred': + new Activities(); + break; + case 'projects:commit:show': + new Commit(); + new Diff(); + new ZenMode(); + shortcut_handler = new ShortcutsNavigation(); + break; + case 'projects:commits:show': + case 'projects:activity': + shortcut_handler = new ShortcutsNavigation(); + break; + case 'projects:show': + shortcut_handler = new ShortcutsNavigation(); + new NotificationsForm(); + if ($('#tree-slider').length) { + new TreeView(); + } + break; + case 'groups:activity': + new Activities(); + break; + case 'groups:show': + shortcut_handler = new ShortcutsNavigation(); + new NotificationsForm(); + new NotificationsDropdown(); + break; + case 'groups:group_members:index': + new GroupMembers(); + new UsersSelect(); + break; + case 'projects:project_members:index': + new ProjectMembers(); + new UsersSelect(); + break; + case 'groups:new': + case 'groups:edit': + case 'admin:groups:edit': + case 'admin:groups:new': + new GroupAvatar(); + break; + case 'projects:tree:show': + shortcut_handler = new ShortcutsNavigation(); + new TreeView(); + break; + case 'projects:find_file:show': + shortcut_handler = true; + break; + case 'projects:blob:show': + case 'projects:blame:show': + new LineHighlighter(); + shortcut_handler = new ShortcutsNavigation(); + new ShortcutsBlob(true); + break; + case 'projects:labels:new': + case 'projects:labels:edit': + new Labels(); + break; + case 'projects:labels:index': + if ($('.prioritized-labels').length) { + new LabelManager(); + } + break; + case 'projects:network:show': + shortcut_handler = true; + break; + case 'projects:forks:new': + new ProjectFork(); + break; + case 'projects:artifacts:browse': + new BuildArtifacts(); + break; + case 'projects:group_links:index': + new GroupsSelect(); + break; + case 'search:show': + new Search(); + } + switch (path.first()) { + case 'admin': + new Admin(); + switch (path[1]) { + case 'groups': + new UsersSelect(); + break; + case 'projects': + new NamespaceSelects(); + } + break; + case 'dashboard': + case 'root': + shortcut_handler = new ShortcutsDashboardNavigation(); + break; + case 'profiles': + new NotificationsForm(); + new NotificationsDropdown(); + break; + case 'projects': + new Project(); + new ProjectAvatar(); + switch (path[1]) { + case 'compare': + new CompareAutocomplete(); + break; + case 'edit': + shortcut_handler = new ShortcutsNavigation(); + new ProjectNew(); + break; + case 'new': + new ProjectNew(); + break; + case 'show': + new ProjectNew(); + new ProjectShow(); + new NotificationsDropdown(); + break; + case 'wikis': + new Wikis(); + shortcut_handler = new ShortcutsNavigation(); + new ZenMode(); + new GLForm($('.wiki-form')); + break; + case 'snippets': + shortcut_handler = new ShortcutsNavigation(); + if (path[2] === 'show') { + new ZenMode(); + } + break; + case 'labels': + case 'graphs': + case 'compare': + case 'pipelines': + case 'forks': + case 'milestones': + case 'project_members': + case 'deploy_keys': + case 'builds': + case 'hooks': + case 'services': + case 'protected_branches': + shortcut_handler = new ShortcutsNavigation(); + } + } + if (!shortcut_handler) { + return new Shortcuts(); + } + }; + + Dispatcher.prototype.initSearch = function() { + if ($('.search').length) { + return new SearchAutocomplete(); + } + }; + + return Dispatcher; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee deleted file mode 100644 index afaa6407b05..00000000000 --- a/app/assets/javascripts/dispatcher.js.coffee +++ /dev/null @@ -1,171 +0,0 @@ -$ -> - new Dispatcher() - -class Dispatcher - constructor: () -> - @initSearch() - @initPageScripts() - - initPageScripts: -> - page = $('body').attr('data-page') - - unless page - return false - - path = page.split(':') - shortcut_handler = null - switch page - when 'projects:issues:index' - Issuable.init() - new IssuableBulkActions() - shortcut_handler = new ShortcutsNavigation() - when 'projects:issues:show' - new Issue() - shortcut_handler = new ShortcutsIssuable() - new ZenMode() - when 'projects:milestones:show', 'groups:milestones:show', 'dashboard:milestones:show' - new Milestone() - when 'dashboard:todos:index' - new Todos() - when 'projects:milestones:new', 'projects:milestones:edit' - new ZenMode() - new DueDateSelect() - new GLForm($('.milestone-form')) - when 'groups:milestones:new' - new ZenMode() - when 'projects:compare:show' - new Diff() - when 'projects:issues:new','projects:issues:edit' - shortcut_handler = new ShortcutsNavigation() - new GLForm($('.issue-form')) - new IssuableForm($('.issue-form')) - when 'projects:merge_requests:new', 'projects:merge_requests:edit' - new Diff() - shortcut_handler = new ShortcutsNavigation() - new GLForm($('.merge-request-form')) - new IssuableForm($('.merge-request-form')) - when 'projects:tags:new' - new ZenMode() - new GLForm($('.tag-form')) - when 'projects:releases:edit' - new ZenMode() - new GLForm($('.release-form')) - when 'projects:merge_requests:show' - new Diff() - shortcut_handler = new ShortcutsIssuable(true) - new ZenMode() - new MergedButtons() - when 'projects:merge_requests:commits', 'projects:merge_requests:builds' - new MergedButtons() - when "projects:merge_requests:diffs" - new Diff() - new ZenMode() - new MergedButtons() - when 'projects:merge_requests:index' - shortcut_handler = new ShortcutsNavigation() - Issuable.init() - when 'dashboard:activity' - new Activities() - when 'dashboard:projects:starred' - new Activities() - when 'projects:commit:show' - new Commit() - new Diff() - new ZenMode() - shortcut_handler = new ShortcutsNavigation() - when 'projects:commits:show', 'projects:activity' - shortcut_handler = new ShortcutsNavigation() - when 'projects:show' - shortcut_handler = new ShortcutsNavigation() - - new NotificationsForm() - new TreeView() if $('#tree-slider').length - when 'groups:activity' - new Activities() - when 'groups:show' - shortcut_handler = new ShortcutsNavigation() - new NotificationsForm() - new NotificationsDropdown() - when 'groups:group_members:index' - new GroupMembers() - new UsersSelect() - when 'projects:project_members:index' - new ProjectMembers() - new UsersSelect() - when 'groups:new', 'groups:edit', 'admin:groups:edit', 'admin:groups:new' - new GroupAvatar() - when 'projects:tree:show' - shortcut_handler = new ShortcutsNavigation() - new TreeView() - when 'projects:find_file:show' - shortcut_handler = true - when 'projects:blob:show', 'projects:blame:show' - new LineHighlighter() - shortcut_handler = new ShortcutsNavigation() - new ShortcutsBlob true - when 'projects:labels:new', 'projects:labels:edit' - new Labels() - when 'projects:labels:index' - new LabelManager() if $('.prioritized-labels').length - when 'projects:network:show' - # Ensure we don't create a particular shortcut handler here. This is - # already created, where the network graph is created. - shortcut_handler = true - when 'projects:forks:new' - new ProjectFork() - when 'projects:artifacts:browse' - new BuildArtifacts() - when 'projects:group_links:index' - new GroupsSelect() - when 'search:show' - new Search() - - switch path.first() - when 'admin' - new Admin() - switch path[1] - when 'groups' - new UsersSelect() - when 'projects' - new NamespaceSelects() - when 'dashboard', 'root' - shortcut_handler = new ShortcutsDashboardNavigation() - when 'profiles' - new NotificationsForm() - new NotificationsDropdown() - when 'projects' - new Project() - new ProjectAvatar() - switch path[1] - when 'compare' - new CompareAutocomplete() - when 'edit' - shortcut_handler = new ShortcutsNavigation() - new ProjectNew() - when 'new' - new ProjectNew() - when 'show' - new ProjectNew() - new ProjectShow() - new NotificationsDropdown() - when 'wikis' - new Wikis() - shortcut_handler = new ShortcutsNavigation() - new ZenMode() - new GLForm($('.wiki-form')) - when 'snippets' - shortcut_handler = new ShortcutsNavigation() - new ZenMode() if path[2] == 'show' - when 'labels', 'graphs', 'compare', 'pipelines', 'forks', \ - 'milestones', 'project_members', 'deploy_keys', 'builds', \ - 'hooks', 'services', 'protected_branches' - shortcut_handler = new ShortcutsNavigation() - - # If we haven't installed a custom shortcut handler, install the default one - if not shortcut_handler - new Shortcuts() - - initSearch: -> - - # Only when search form is present - new SearchAutocomplete() if $('.search').length diff --git a/app/assets/javascripts/dropzone_input.js b/app/assets/javascripts/dropzone_input.js new file mode 100644 index 00000000000..288cce04f87 --- /dev/null +++ b/app/assets/javascripts/dropzone_input.js @@ -0,0 +1,219 @@ + +/*= require markdown_preview */ + +(function() { + this.DropzoneInput = (function() { + function DropzoneInput(form) { + var $mdArea, alertAttr, alertClass, appendToTextArea, btnAlert, child, closeAlertMessage, closeSpinner, divAlert, divHover, divSpinner, dropzone, form_dropzone, form_textarea, getFilename, handlePaste, iconPaperclip, iconSpinner, insertToTextArea, isImage, max_file_size, pasteText, project_uploads_path, showError, showSpinner, uploadFile, uploadProgress; + Dropzone.autoDiscover = false; + alertClass = "alert alert-danger alert-dismissable div-dropzone-alert"; + alertAttr = "class=\"close\" data-dismiss=\"alert\"" + "aria-hidden=\"true\""; + divHover = "
            "; + divSpinner = "
            "; + divAlert = "
            "; + iconPaperclip = ""; + iconSpinner = ""; + uploadProgress = $("
            "); + btnAlert = ""; + project_uploads_path = window.project_uploads_path || null; + max_file_size = gon.max_file_size || 10; + form_textarea = $(form).find(".js-gfm-input"); + form_textarea.wrap("
            "); + form_textarea.on('paste', (function(_this) { + return function(event) { + return handlePaste(event); + }; + })(this)); + $mdArea = $(form_textarea).closest('.md-area'); + $(form).setupMarkdownPreview(); + form_dropzone = $(form).find('.div-dropzone'); + form_dropzone.parent().addClass("div-dropzone-wrapper"); + form_dropzone.append(divHover); + form_dropzone.find(".div-dropzone-hover").append(iconPaperclip); + form_dropzone.append(divSpinner); + form_dropzone.find(".div-dropzone-spinner").append(iconSpinner); + form_dropzone.find(".div-dropzone-spinner").append(uploadProgress); + form_dropzone.find(".div-dropzone-spinner").css({ + "opacity": 0, + "display": "none" + }); + dropzone = form_dropzone.dropzone({ + url: project_uploads_path, + dictDefaultMessage: "", + clickable: true, + paramName: "file", + maxFilesize: max_file_size, + uploadMultiple: false, + headers: { + "X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content") + }, + previewContainer: false, + processing: function() { + return $(".div-dropzone-alert").alert("close"); + }, + dragover: function() { + $mdArea.addClass('is-dropzone-hover'); + form.find(".div-dropzone-hover").css("opacity", 0.7); + }, + dragleave: function() { + $mdArea.removeClass('is-dropzone-hover'); + form.find(".div-dropzone-hover").css("opacity", 0); + }, + drop: function() { + $mdArea.removeClass('is-dropzone-hover'); + form.find(".div-dropzone-hover").css("opacity", 0); + form_textarea.focus(); + }, + success: function(header, response) { + pasteText(response.link.markdown); + }, + error: function(temp) { + var checkIfMsgExists, errorAlert; + errorAlert = $(form).find('.error-alert'); + checkIfMsgExists = errorAlert.children().length; + if (checkIfMsgExists === 0) { + errorAlert.append(divAlert); + $(".div-dropzone-alert").append(btnAlert + "Attaching the file failed."); + } + }, + totaluploadprogress: function(totalUploadProgress) { + uploadProgress.text(Math.round(totalUploadProgress) + "%"); + }, + sending: function() { + form_dropzone.find(".div-dropzone-spinner").css({ + "opacity": 0.7, + "display": "inherit" + }); + }, + queuecomplete: function() { + uploadProgress.text(""); + $(".dz-preview").remove(); + $(".markdown-area").trigger("input"); + $(".div-dropzone-spinner").css({ + "opacity": 0, + "display": "none" + }); + } + }); + child = $(dropzone[0]).children("textarea"); + handlePaste = function(event) { + var filename, image, pasteEvent, text; + pasteEvent = event.originalEvent; + if (pasteEvent.clipboardData && pasteEvent.clipboardData.items) { + image = isImage(pasteEvent); + if (image) { + event.preventDefault(); + filename = getFilename(pasteEvent) || "image.png"; + text = "{{" + filename + "}}"; + pasteText(text); + return uploadFile(image.getAsFile(), filename); + } + } + }; + isImage = function(data) { + var i, item; + i = 0; + while (i < data.clipboardData.items.length) { + item = data.clipboardData.items[i]; + if (item.type.indexOf("image") !== -1) { + return item; + } + i++; + } + return false; + }; + pasteText = function(text) { + var afterSelection, beforeSelection, caretEnd, caretStart, textEnd; + caretStart = $(child)[0].selectionStart; + caretEnd = $(child)[0].selectionEnd; + textEnd = $(child).val().length; + beforeSelection = $(child).val().substring(0, caretStart); + afterSelection = $(child).val().substring(caretEnd, textEnd); + $(child).val(beforeSelection + text + afterSelection); + child.get(0).setSelectionRange(caretStart + text.length, caretEnd + text.length); + return form_textarea.trigger("input"); + }; + getFilename = function(e) { + var value; + if (window.clipboardData && window.clipboardData.getData) { + value = window.clipboardData.getData("Text"); + } else if (e.clipboardData && e.clipboardData.getData) { + value = e.clipboardData.getData("text/plain"); + } + value = value.split("\r"); + return value.first(); + }; + uploadFile = function(item, filename) { + var formData; + formData = new FormData(); + formData.append("file", item, filename); + return $.ajax({ + url: project_uploads_path, + type: "POST", + data: formData, + dataType: "json", + processData: false, + contentType: false, + headers: { + "X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content") + }, + beforeSend: function() { + showSpinner(); + return closeAlertMessage(); + }, + success: function(e, textStatus, response) { + return insertToTextArea(filename, response.responseJSON.link.markdown); + }, + error: function(response) { + return showError(response.responseJSON.message); + }, + complete: function() { + return closeSpinner(); + } + }); + }; + insertToTextArea = function(filename, url) { + return $(child).val(function(index, val) { + return val.replace("{{" + filename + "}}", url + "\n"); + }); + }; + appendToTextArea = function(url) { + return $(child).val(function(index, val) { + return val + url + "\n"; + }); + }; + showSpinner = function(e) { + return form.find(".div-dropzone-spinner").css({ + "opacity": 0.7, + "display": "inherit" + }); + }; + closeSpinner = function() { + return form.find(".div-dropzone-spinner").css({ + "opacity": 0, + "display": "none" + }); + }; + showError = function(message) { + var checkIfMsgExists, errorAlert; + errorAlert = $(form).find('.error-alert'); + checkIfMsgExists = errorAlert.children().length; + if (checkIfMsgExists === 0) { + errorAlert.append(divAlert); + return $(".div-dropzone-alert").append(btnAlert + message); + } + }; + closeAlertMessage = function() { + return form.find(".div-dropzone-alert").alert("close"); + }; + form.find(".markdown-selector").click(function(e) { + e.preventDefault(); + $(this).closest('.gfm-form').find('.div-dropzone').click(); + }); + } + + return DropzoneInput; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/dropzone_input.js.coffee b/app/assets/javascripts/dropzone_input.js.coffee deleted file mode 100644 index 665246e2a7d..00000000000 --- a/app/assets/javascripts/dropzone_input.js.coffee +++ /dev/null @@ -1,201 +0,0 @@ -#= require markdown_preview - -class @DropzoneInput - constructor: (form) -> - Dropzone.autoDiscover = false - alertClass = "alert alert-danger alert-dismissable div-dropzone-alert" - alertAttr = "class=\"close\" data-dismiss=\"alert\"" + "aria-hidden=\"true\"" - divHover = "
            " - divSpinner = "
            " - divAlert = "
            " - iconPaperclip = "" - iconSpinner = "" - uploadProgress = $("
            ") - btnAlert = "" - project_uploads_path = window.project_uploads_path or null - max_file_size = gon.max_file_size or 10 - - form_textarea = $(form).find(".js-gfm-input") - form_textarea.wrap "
            " - form_textarea.on 'paste', (event) => - handlePaste(event) - - $mdArea = $(form_textarea).closest('.md-area') - - $(form).setupMarkdownPreview() - - form_dropzone = $(form).find('.div-dropzone') - form_dropzone.parent().addClass "div-dropzone-wrapper" - form_dropzone.append divHover - form_dropzone.find(".div-dropzone-hover").append iconPaperclip - form_dropzone.append divSpinner - form_dropzone.find(".div-dropzone-spinner").append iconSpinner - form_dropzone.find(".div-dropzone-spinner").append uploadProgress - form_dropzone.find(".div-dropzone-spinner").css - "opacity": 0 - "display": "none" - - dropzone = form_dropzone.dropzone( - url: project_uploads_path - dictDefaultMessage: "" - clickable: true - paramName: "file" - maxFilesize: max_file_size - uploadMultiple: false - headers: - "X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content") - - previewContainer: false - - processing: -> - $(".div-dropzone-alert").alert "close" - - dragover: -> - $mdArea.addClass 'is-dropzone-hover' - form.find(".div-dropzone-hover").css "opacity", 0.7 - return - - dragleave: -> - $mdArea.removeClass 'is-dropzone-hover' - form.find(".div-dropzone-hover").css "opacity", 0 - return - - drop: -> - $mdArea.removeClass 'is-dropzone-hover' - form.find(".div-dropzone-hover").css "opacity", 0 - form_textarea.focus() - return - - success: (header, response) -> - pasteText response.link.markdown - return - - error: (temp) -> - errorAlert = $(form).find('.error-alert') - checkIfMsgExists = errorAlert.children().length - if checkIfMsgExists is 0 - errorAlert.append divAlert - $(".div-dropzone-alert").append "#{btnAlert}Attaching the file failed." - return - - totaluploadprogress: (totalUploadProgress) -> - uploadProgress.text Math.round(totalUploadProgress) + "%" - return - - sending: -> - form_dropzone.find(".div-dropzone-spinner").css - "opacity": 0.7 - "display": "inherit" - return - - queuecomplete: -> - uploadProgress.text "" - $(".dz-preview").remove() - $(".markdown-area").trigger "input" - $(".div-dropzone-spinner").css - "opacity": 0 - "display": "none" - return - ) - - child = $(dropzone[0]).children("textarea") - - handlePaste = (event) -> - pasteEvent = event.originalEvent - if pasteEvent.clipboardData and pasteEvent.clipboardData.items - image = isImage(pasteEvent) - if image - event.preventDefault() - - filename = getFilename(pasteEvent) or "image.png" - text = "{{" + filename + "}}" - pasteText(text) - uploadFile image.getAsFile(), filename - - isImage = (data) -> - i = 0 - while i < data.clipboardData.items.length - item = data.clipboardData.items[i] - if item.type.indexOf("image") isnt -1 - return item - i++ - return false - - pasteText = (text) -> - caretStart = $(child)[0].selectionStart - caretEnd = $(child)[0].selectionEnd - textEnd = $(child).val().length - - beforeSelection = $(child).val().substring 0, caretStart - afterSelection = $(child).val().substring caretEnd, textEnd - $(child).val beforeSelection + text + afterSelection - child.get(0).setSelectionRange caretStart + text.length, caretEnd + text.length - form_textarea.trigger "input" - - getFilename = (e) -> - if window.clipboardData and window.clipboardData.getData - value = window.clipboardData.getData("Text") - else if e.clipboardData and e.clipboardData.getData - value = e.clipboardData.getData("text/plain") - - value = value.split("\r") - value.first() - - uploadFile = (item, filename) -> - formData = new FormData() - formData.append "file", item, filename - $.ajax - url: project_uploads_path - type: "POST" - data: formData - dataType: "json" - processData: false - contentType: false - headers: - "X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content") - - beforeSend: -> - showSpinner() - closeAlertMessage() - - success: (e, textStatus, response) -> - insertToTextArea(filename, response.responseJSON.link.markdown) - - error: (response) -> - showError(response.responseJSON.message) - - complete: -> - closeSpinner() - - insertToTextArea = (filename, url) -> - $(child).val (index, val) -> - val.replace("{{" + filename + "}}", url + "\n") - - appendToTextArea = (url) -> - $(child).val (index, val) -> - val + url + "\n" - - showSpinner = (e) -> - form.find(".div-dropzone-spinner").css - "opacity": 0.7 - "display": "inherit" - - closeSpinner = -> - form.find(".div-dropzone-spinner").css - "opacity": 0 - "display": "none" - - showError = (message) -> - errorAlert = $(form).find('.error-alert') - checkIfMsgExists = errorAlert.children().length - if checkIfMsgExists is 0 - errorAlert.append divAlert - $(".div-dropzone-alert").append btnAlert + message - - closeAlertMessage = -> - form.find(".div-dropzone-alert").alert "close" - - form.find(".markdown-selector").click (e) -> - e.preventDefault() - $(@).closest('.gfm-form').find('.div-dropzone').click() - return diff --git a/app/assets/javascripts/due_date_select.js b/app/assets/javascripts/due_date_select.js new file mode 100644 index 00000000000..5a725a41fd1 --- /dev/null +++ b/app/assets/javascripts/due_date_select.js @@ -0,0 +1,104 @@ +(function() { + this.DueDateSelect = (function() { + function DueDateSelect() { + var $datePicker, $dueDate, $loading; + $datePicker = $('.datepicker'); + if ($datePicker.length) { + $dueDate = $('#milestone_due_date'); + $datePicker.datepicker({ + dateFormat: 'yy-mm-dd', + onSelect: function(dateText, inst) { + return $dueDate.val(dateText); + } + }).datepicker('setDate', $.datepicker.parseDate('yy-mm-dd', $dueDate.val())); + } + $('.js-clear-due-date').on('click', function(e) { + e.preventDefault(); + return $.datepicker._clearDate($datePicker); + }); + $loading = $('.js-issuable-update .due_date').find('.block-loading').hide(); + $('.js-due-date-select').each(function(i, dropdown) { + var $block, $dropdown, $dropdownParent, $selectbox, $sidebarValue, $value, $valueContent, abilityName, addDueDate, fieldName, issueUpdateURL; + $dropdown = $(dropdown); + $dropdownParent = $dropdown.closest('.dropdown'); + $datePicker = $dropdownParent.find('.js-due-date-calendar'); + $block = $dropdown.closest('.block'); + $selectbox = $dropdown.closest('.selectbox'); + $value = $block.find('.value'); + $valueContent = $block.find('.value-content'); + $sidebarValue = $('.js-due-date-sidebar-value', $block); + fieldName = $dropdown.data('field-name'); + abilityName = $dropdown.data('ability-name'); + issueUpdateURL = $dropdown.data('issue-update'); + $dropdown.glDropdown({ + hidden: function() { + $selectbox.hide(); + return $value.css('display', ''); + } + }); + addDueDate = function(isDropdown) { + var data, date, mediumDate, value; + value = $("input[name='" + fieldName + "']").val(); + if (value !== '') { + date = new Date(value.replace(new RegExp('-', 'g'), ',')); + mediumDate = $.datepicker.formatDate('M d, yy', date); + } else { + mediumDate = 'No due date'; + } + data = {}; + data[abilityName] = {}; + data[abilityName].due_date = value; + return $.ajax({ + type: 'PUT', + url: issueUpdateURL, + data: data, + dataType: 'json', + beforeSend: function() { + var cssClass; + $loading.fadeIn(); + if (isDropdown) { + $dropdown.trigger('loading.gl.dropdown'); + $selectbox.hide(); + } + $value.css('display', ''); + cssClass = Date.parse(mediumDate) ? 'bold' : 'no-value'; + $valueContent.html("" + mediumDate + ""); + $sidebarValue.html(mediumDate); + if (value !== '') { + return $('.js-remove-due-date-holder').removeClass('hidden'); + } else { + return $('.js-remove-due-date-holder').addClass('hidden'); + } + } + }).done(function(data) { + if (isDropdown) { + $dropdown.trigger('loaded.gl.dropdown'); + $dropdown.dropdown('toggle'); + } + return $loading.fadeOut(); + }); + }; + $block.on('click', '.js-remove-due-date', function(e) { + e.preventDefault(); + $("input[name='" + fieldName + "']").val(''); + return addDueDate(false); + }); + return $datePicker.datepicker({ + dateFormat: 'yy-mm-dd', + defaultDate: $("input[name='" + fieldName + "']").val(), + altField: "input[name='" + fieldName + "']", + onSelect: function() { + return addDueDate(true); + } + }); + }); + $(document).off('click', '.ui-datepicker-header a').on('click', '.ui-datepicker-header a', function(e) { + return e.stopImmediatePropagation(); + }); + } + + return DueDateSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/due_date_select.js.coffee b/app/assets/javascripts/due_date_select.js.coffee deleted file mode 100644 index d65c018dad5..00000000000 --- a/app/assets/javascripts/due_date_select.js.coffee +++ /dev/null @@ -1,99 +0,0 @@ -class @DueDateSelect - constructor: -> - # Milestone edit/new form - $datePicker = $('.datepicker') - - if $datePicker.length - $dueDate = $('#milestone_due_date') - $datePicker.datepicker - dateFormat: 'yy-mm-dd' - onSelect: (dateText, inst) -> - $dueDate.val(dateText) - .datepicker('setDate', $.datepicker.parseDate('yy-mm-dd', $dueDate.val())) - - $('.js-clear-due-date').on 'click', (e) -> - e.preventDefault() - $.datepicker._clearDate($datePicker) - - # Issuable sidebar - $loading = $('.js-issuable-update .due_date') - .find('.block-loading') - .hide() - - $('.js-due-date-select').each (i, dropdown) -> - $dropdown = $(dropdown) - $dropdownParent = $dropdown.closest('.dropdown') - $datePicker = $dropdownParent.find('.js-due-date-calendar') - $block = $dropdown.closest('.block') - $selectbox = $dropdown.closest('.selectbox') - $value = $block.find('.value') - $valueContent = $block.find('.value-content') - $sidebarValue = $('.js-due-date-sidebar-value', $block) - - fieldName = $dropdown.data('field-name') - abilityName = $dropdown.data('ability-name') - issueUpdateURL = $dropdown.data('issue-update') - - $dropdown.glDropdown( - hidden: -> - $selectbox.hide() - $value.css('display', '') - ) - - addDueDate = (isDropdown) -> - # Create the post date - value = $("input[name='#{fieldName}']").val() - - if value isnt '' - date = new Date value.replace(new RegExp('-', 'g'), ',') - mediumDate = $.datepicker.formatDate 'M d, yy', date - else - mediumDate = 'No due date' - - data = {} - data[abilityName] = {} - data[abilityName].due_date = value - - $.ajax( - type: 'PUT' - url: issueUpdateURL - data: data - dataType: 'json' - beforeSend: -> - $loading.fadeIn() - if isDropdown - $dropdown.trigger('loading.gl.dropdown') - $selectbox.hide() - $value.css('display', '') - - cssClass = if Date.parse(mediumDate) then 'bold' else 'no-value' - $valueContent.html("#{mediumDate}") - $sidebarValue.html(mediumDate) - - if value isnt '' - $('.js-remove-due-date-holder').removeClass 'hidden' - else - $('.js-remove-due-date-holder').addClass 'hidden' - ).done (data) -> - if isDropdown - $dropdown.trigger('loaded.gl.dropdown') - $dropdown.dropdown('toggle') - $loading.fadeOut() - - $block.on 'click', '.js-remove-due-date', (e) -> - e.preventDefault() - $("input[name='#{fieldName}']").val '' - addDueDate(false) - - $datePicker.datepicker( - dateFormat: 'yy-mm-dd', - defaultDate: $("input[name='#{fieldName}']").val() - altField: "input[name='#{fieldName}']" - onSelect: -> - addDueDate(true) - ) - - $(document) - .off 'click', '.ui-datepicker-header a' - .on 'click', '.ui-datepicker-header a', (e) -> - e.stopImmediatePropagation() diff --git a/app/assets/javascripts/extensions/jquery.js b/app/assets/javascripts/extensions/jquery.js new file mode 100644 index 00000000000..ae3dde63da3 --- /dev/null +++ b/app/assets/javascripts/extensions/jquery.js @@ -0,0 +1,14 @@ +(function() { + $.fn.extend({ + disable: function() { + return $(this).attr('disabled', 'disabled').addClass('disabled'); + } + }); + + $.fn.extend({ + enable: function() { + return $(this).removeAttr('disabled').removeClass('disabled'); + } + }); + +}).call(this); diff --git a/app/assets/javascripts/extensions/jquery.js.coffee b/app/assets/javascripts/extensions/jquery.js.coffee deleted file mode 100644 index 0a9db8eb5ef..00000000000 --- a/app/assets/javascripts/extensions/jquery.js.coffee +++ /dev/null @@ -1,11 +0,0 @@ -# Disable an element and add the 'disabled' Bootstrap class -$.fn.extend disable: -> - $(@) - .attr('disabled', 'disabled') - .addClass('disabled') - -# Enable an element and remove the 'disabled' Bootstrap class -$.fn.extend enable: -> - $(@) - .removeAttr('disabled') - .removeClass('disabled') diff --git a/app/assets/javascripts/files_comment_button.js b/app/assets/javascripts/files_comment_button.js new file mode 100644 index 00000000000..09b5eb398d4 --- /dev/null +++ b/app/assets/javascripts/files_comment_button.js @@ -0,0 +1,141 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.FilesCommentButton = (function() { + var COMMENT_BUTTON_CLASS, COMMENT_BUTTON_TEMPLATE, DEBOUNCE_TIMEOUT_DURATION, EMPTY_CELL_CLASS, LINE_COLUMN_CLASSES, LINE_CONTENT_CLASS, LINE_HOLDER_CLASS, LINE_NUMBER_CLASS, OLD_LINE_CLASS, TEXT_FILE_SELECTOR, UNFOLDABLE_LINE_CLASS; + + COMMENT_BUTTON_CLASS = '.add-diff-note'; + + COMMENT_BUTTON_TEMPLATE = _.template(''); + + LINE_HOLDER_CLASS = '.line_holder'; + + LINE_NUMBER_CLASS = 'diff-line-num'; + + LINE_CONTENT_CLASS = 'line_content'; + + UNFOLDABLE_LINE_CLASS = 'js-unfold'; + + EMPTY_CELL_CLASS = 'empty-cell'; + + OLD_LINE_CLASS = 'old_line'; + + LINE_COLUMN_CLASSES = "." + LINE_NUMBER_CLASS + ", .line_content"; + + TEXT_FILE_SELECTOR = '.text-file'; + + DEBOUNCE_TIMEOUT_DURATION = 100; + + function FilesCommentButton(filesContainerElement) { + var debounce; + this.filesContainerElement = filesContainerElement; + this.destroy = bind(this.destroy, this); + this.render = bind(this.render, this); + this.VIEW_TYPE = $('input#view[type=hidden]').val(); + debounce = _.debounce(this.render, DEBOUNCE_TIMEOUT_DURATION); + $(document).off('mouseover', LINE_COLUMN_CLASSES).off('mouseleave', LINE_COLUMN_CLASSES).on('mouseover', LINE_COLUMN_CLASSES, debounce).on('mouseleave', LINE_COLUMN_CLASSES, this.destroy); + } + + FilesCommentButton.prototype.render = function(e) { + var $currentTarget, buttonParentElement, lineContentElement, textFileElement; + $currentTarget = $(e.currentTarget); + buttonParentElement = this.getButtonParent($currentTarget); + if (!this.shouldRender(e, buttonParentElement)) { + return; + } + textFileElement = this.getTextFileElement($currentTarget); + lineContentElement = this.getLineContent($currentTarget); + buttonParentElement.append(this.buildButton({ + noteableType: textFileElement.attr('data-noteable-type'), + noteableID: textFileElement.attr('data-noteable-id'), + commitID: textFileElement.attr('data-commit-id'), + noteType: lineContentElement.attr('data-note-type'), + position: lineContentElement.attr('data-position'), + lineType: lineContentElement.attr('data-line-type'), + discussionID: lineContentElement.attr('data-discussion-id'), + lineCode: lineContentElement.attr('data-line-code') + })); + }; + + FilesCommentButton.prototype.destroy = function(e) { + if (this.isMovingToSameType(e)) { + return; + } + $(COMMENT_BUTTON_CLASS, this.getButtonParent($(e.currentTarget))).remove(); + }; + + FilesCommentButton.prototype.buildButton = function(buttonAttributes) { + var initializedButtonTemplate; + initializedButtonTemplate = COMMENT_BUTTON_TEMPLATE({ + COMMENT_BUTTON_CLASS: COMMENT_BUTTON_CLASS.substr(1) + }); + return $(initializedButtonTemplate).attr({ + 'data-noteable-type': buttonAttributes.noteableType, + 'data-noteable-id': buttonAttributes.noteableID, + 'data-commit-id': buttonAttributes.commitID, + 'data-note-type': buttonAttributes.noteType, + 'data-line-code': buttonAttributes.lineCode, + 'data-position': buttonAttributes.position, + 'data-discussion-id': buttonAttributes.discussionID, + 'data-line-type': buttonAttributes.lineType + }); + }; + + FilesCommentButton.prototype.getTextFileElement = function(hoveredElement) { + return $(hoveredElement.closest(TEXT_FILE_SELECTOR)); + }; + + FilesCommentButton.prototype.getLineContent = function(hoveredElement) { + if (hoveredElement.hasClass(LINE_CONTENT_CLASS)) { + return hoveredElement; + } + if (this.VIEW_TYPE === 'inline') { + return $(hoveredElement).closest(LINE_HOLDER_CLASS).find("." + LINE_CONTENT_CLASS); + } else { + return $(hoveredElement).next("." + LINE_CONTENT_CLASS); + } + }; + + FilesCommentButton.prototype.getButtonParent = function(hoveredElement) { + if (this.VIEW_TYPE === 'inline') { + if (hoveredElement.hasClass(OLD_LINE_CLASS)) { + return hoveredElement; + } + return hoveredElement.parent().find("." + OLD_LINE_CLASS); + } else { + if (hoveredElement.hasClass(LINE_NUMBER_CLASS)) { + return hoveredElement; + } + return $(hoveredElement).prev("." + LINE_NUMBER_CLASS); + } + }; + + FilesCommentButton.prototype.isMovingToSameType = function(e) { + var newButtonParent; + newButtonParent = this.getButtonParent($(e.toElement)); + if (!newButtonParent) { + return false; + } + return newButtonParent.is(this.getButtonParent($(e.currentTarget))); + }; + + FilesCommentButton.prototype.shouldRender = function(e, buttonParentElement) { + return !buttonParentElement.hasClass(EMPTY_CELL_CLASS) && !buttonParentElement.hasClass(UNFOLDABLE_LINE_CLASS) && $(COMMENT_BUTTON_CLASS, buttonParentElement).length === 0; + }; + + return FilesCommentButton; + + })(); + + $.fn.filesCommentButton = function() { + if (!(this && (this.parent().data('can-create-note') != null))) { + return; + } + return this.each(function() { + if (!$.data(this, 'filesCommentButton')) { + return $.data(this, 'filesCommentButton', new FilesCommentButton($(this))); + } + }); + }; + +}).call(this); diff --git a/app/assets/javascripts/files_comment_button.js.coffee b/app/assets/javascripts/files_comment_button.js.coffee deleted file mode 100644 index 5ab82c39fcd..00000000000 --- a/app/assets/javascripts/files_comment_button.js.coffee +++ /dev/null @@ -1,98 +0,0 @@ -class @FilesCommentButton - COMMENT_BUTTON_CLASS = '.add-diff-note' - COMMENT_BUTTON_TEMPLATE = _.template '' - LINE_HOLDER_CLASS = '.line_holder' - LINE_NUMBER_CLASS = 'diff-line-num' - LINE_CONTENT_CLASS = 'line_content' - UNFOLDABLE_LINE_CLASS = 'js-unfold' - EMPTY_CELL_CLASS = 'empty-cell' - OLD_LINE_CLASS = 'old_line' - LINE_COLUMN_CLASSES = ".#{LINE_NUMBER_CLASS}, .line_content" - TEXT_FILE_SELECTOR = '.text-file' - DEBOUNCE_TIMEOUT_DURATION = 100 - - constructor: (@filesContainerElement) -> - @VIEW_TYPE = $('input#view[type=hidden]').val() - - debounce = _.debounce @render, DEBOUNCE_TIMEOUT_DURATION - - $(document) - .off 'mouseover', LINE_COLUMN_CLASSES - .off 'mouseleave', LINE_COLUMN_CLASSES - .on 'mouseover', LINE_COLUMN_CLASSES, debounce - .on 'mouseleave', LINE_COLUMN_CLASSES, @destroy - - render: (e) => - $currentTarget = $(e.currentTarget) - buttonParentElement = @getButtonParent $currentTarget - return unless @shouldRender e, buttonParentElement - - textFileElement = @getTextFileElement $currentTarget - lineContentElement = @getLineContent $currentTarget - - buttonParentElement.append @buildButton - noteableType: textFileElement.attr 'data-noteable-type' - noteableID: textFileElement.attr 'data-noteable-id' - commitID: textFileElement.attr 'data-commit-id' - noteType: lineContentElement.attr 'data-note-type' - position: lineContentElement.attr 'data-position' - lineType: lineContentElement.attr 'data-line-type' - discussionID: lineContentElement.attr 'data-discussion-id' - lineCode: lineContentElement.attr 'data-line-code' - return - - destroy: (e) => - return if @isMovingToSameType e - $(COMMENT_BUTTON_CLASS, @getButtonParent $(e.currentTarget)).remove() - return - - buildButton: (buttonAttributes) -> - initializedButtonTemplate = COMMENT_BUTTON_TEMPLATE - COMMENT_BUTTON_CLASS: COMMENT_BUTTON_CLASS.substr 1 - $(initializedButtonTemplate).attr - 'data-noteable-type': buttonAttributes.noteableType - 'data-noteable-id': buttonAttributes.noteableID - 'data-commit-id': buttonAttributes.commitID - 'data-note-type': buttonAttributes.noteType - 'data-line-code': buttonAttributes.lineCode - 'data-position': buttonAttributes.position - 'data-discussion-id': buttonAttributes.discussionID - 'data-line-type': buttonAttributes.lineType - - getTextFileElement: (hoveredElement) -> - $(hoveredElement.closest TEXT_FILE_SELECTOR) - - getLineContent: (hoveredElement) -> - return hoveredElement if hoveredElement.hasClass LINE_CONTENT_CLASS - - if @VIEW_TYPE is 'inline' - return $(hoveredElement).closest(LINE_HOLDER_CLASS).find ".#{LINE_CONTENT_CLASS}" - else - return $(hoveredElement).next ".#{LINE_CONTENT_CLASS}" - - getButtonParent: (hoveredElement) -> - if @VIEW_TYPE is 'inline' - return hoveredElement if hoveredElement.hasClass OLD_LINE_CLASS - - hoveredElement.parent().find ".#{OLD_LINE_CLASS}" - else - return hoveredElement if hoveredElement.hasClass LINE_NUMBER_CLASS - - $(hoveredElement).prev ".#{LINE_NUMBER_CLASS}" - - isMovingToSameType: (e) -> - newButtonParent = @getButtonParent $(e.toElement) - return false unless newButtonParent - newButtonParent.is @getButtonParent $(e.currentTarget) - - shouldRender: (e, buttonParentElement) -> - (not buttonParentElement.hasClass(EMPTY_CELL_CLASS) and \ - not buttonParentElement.hasClass(UNFOLDABLE_LINE_CLASS) and \ - $(COMMENT_BUTTON_CLASS, buttonParentElement).length is 0) - -$.fn.filesCommentButton = -> - return unless this and @parent().data('can-create-note')? - - @each -> - unless $.data this, 'filesCommentButton' - $.data this, 'filesCommentButton', new FilesCommentButton $(this) diff --git a/app/assets/javascripts/flash.js b/app/assets/javascripts/flash.js new file mode 100644 index 00000000000..c8a02d6fa15 --- /dev/null +++ b/app/assets/javascripts/flash.js @@ -0,0 +1,43 @@ +(function() { + this.Flash = (function() { + var hideFlash; + + hideFlash = function() { + return $(this).fadeOut(); + }; + + function Flash(message, type, parent) { + var flash, textDiv; + if (type == null) { + type = 'alert'; + } + if (parent == null) { + parent = null; + } + if (parent) { + this.flashContainer = parent.find('.flash-container'); + } else { + this.flashContainer = $('.flash-container-page'); + } + this.flashContainer.html(''); + flash = $('
            ', { + "class": "flash-" + type + }); + flash.on('click', hideFlash); + textDiv = $('
            ', { + "class": 'flash-text', + text: message + }); + textDiv.appendTo(flash); + if (this.flashContainer.parent().hasClass('content-wrapper')) { + textDiv.addClass('container-fluid container-limited'); + } + flash.appendTo(this.flashContainer); + this.flashContainer.show(); + } + + return Flash; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/flash.js.coffee b/app/assets/javascripts/flash.js.coffee deleted file mode 100644 index 5a493041538..00000000000 --- a/app/assets/javascripts/flash.js.coffee +++ /dev/null @@ -1,28 +0,0 @@ -class @Flash - hideFlash = -> $(@).fadeOut() - - constructor: (message, type = 'alert', parent = null)-> - if parent - @flashContainer = parent.find('.flash-container') - else - @flashContainer = $('.flash-container-page') - - @flashContainer.html('') - - flash = $('
            ', - class: "flash-#{type}" - ) - flash.on 'click', hideFlash - - textDiv = $('
            ', - class: 'flash-text', - text: message - ) - textDiv.appendTo(flash) - - if @flashContainer.parent().hasClass('content-wrapper') - textDiv.addClass('container-fluid container-limited') - - flash.appendTo(@flashContainer) - @flashContainer.show() - diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js new file mode 100644 index 00000000000..41f4c1914f2 --- /dev/null +++ b/app/assets/javascripts/gfm_auto_complete.js @@ -0,0 +1,272 @@ +(function() { + if (window.GitLab == null) { + window.GitLab = {}; + } + + GitLab.GfmAutoComplete = { + dataLoading: false, + dataLoaded: false, + cachedData: {}, + dataSource: '', + Emoji: { + template: '
          • ${name} ${name}
          • ' + }, + Members: { + template: '
          • ${username} ${title}
          • ' + }, + Labels: { + template: '
          • ${title}
          • ' + }, + Issues: { + template: '
          • ${id} ${title}
          • ' + }, + Milestones: { + template: '
          • ${title}
          • ' + }, + Loading: { + template: '
          • Loading...
          • ' + }, + DefaultOptions: { + sorter: function(query, items, searchKey) { + if ((items[0].name != null) && items[0].name === 'loading') { + return items; + } + return $.fn.atwho["default"].callbacks.sorter(query, items, searchKey); + }, + filter: function(query, data, searchKey) { + if (data[0] === 'loading') { + return data; + } + return $.fn.atwho["default"].callbacks.filter(query, data, searchKey); + }, + beforeInsert: function(value) { + if (!GitLab.GfmAutoComplete.dataLoaded) { + return this.at; + } else { + return value; + } + } + }, + setup: function(wrap) { + this.input = $('.js-gfm-input'); + this.destroyAtWho(); + this.setupAtWho(); + if (this.dataSource) { + if (!this.dataLoading && !this.cachedData) { + this.dataLoading = true; + setTimeout((function(_this) { + return function() { + var fetch; + fetch = _this.fetchData(_this.dataSource); + return fetch.done(function(data) { + _this.dataLoading = false; + return _this.loadData(data); + }); + }; + })(this), 1000); + } + if (this.cachedData != null) { + return this.loadData(this.cachedData); + } + } + }, + setupAtWho: function() { + this.input.atwho({ + at: ':', + displayTpl: (function(_this) { + return function(value) { + if (value.path != null) { + return _this.Emoji.template; + } else { + return _this.Loading.template; + } + }; + })(this), + insertTpl: ':${name}:', + data: ['loading'], + callbacks: { + sorter: this.DefaultOptions.sorter, + filter: this.DefaultOptions.filter, + beforeInsert: this.DefaultOptions.beforeInsert + } + }); + this.input.atwho({ + at: '@', + displayTpl: (function(_this) { + return function(value) { + if (value.username != null) { + return _this.Members.template; + } else { + return _this.Loading.template; + } + }; + })(this), + insertTpl: '${atwho-at}${username}', + searchKey: 'search', + data: ['loading'], + callbacks: { + sorter: this.DefaultOptions.sorter, + filter: this.DefaultOptions.filter, + beforeInsert: this.DefaultOptions.beforeInsert, + beforeSave: function(members) { + return $.map(members, function(m) { + var title; + if (m.username == null) { + return m; + } + title = m.name; + if (m.count) { + title += " (" + m.count + ")"; + } + return { + username: m.username, + title: sanitize(title), + search: sanitize(m.username + " " + m.name) + }; + }); + } + } + }); + this.input.atwho({ + at: '#', + alias: 'issues', + searchKey: 'search', + displayTpl: (function(_this) { + return function(value) { + if (value.title != null) { + return _this.Issues.template; + } else { + return _this.Loading.template; + } + }; + })(this), + data: ['loading'], + insertTpl: '${atwho-at}${id}', + callbacks: { + sorter: this.DefaultOptions.sorter, + filter: this.DefaultOptions.filter, + beforeInsert: this.DefaultOptions.beforeInsert, + beforeSave: function(issues) { + return $.map(issues, function(i) { + if (i.title == null) { + return i; + } + return { + id: i.iid, + title: sanitize(i.title), + search: i.iid + " " + i.title + }; + }); + } + } + }); + this.input.atwho({ + at: '%', + alias: 'milestones', + searchKey: 'search', + displayTpl: (function(_this) { + return function(value) { + if (value.title != null) { + return _this.Milestones.template; + } else { + return _this.Loading.template; + } + }; + })(this), + insertTpl: '${atwho-at}"${title}"', + data: ['loading'], + callbacks: { + beforeSave: function(milestones) { + return $.map(milestones, function(m) { + if (m.title == null) { + return m; + } + return { + id: m.iid, + title: sanitize(m.title), + search: "" + m.title + }; + }); + } + } + }); + this.input.atwho({ + at: '!', + alias: 'mergerequests', + searchKey: 'search', + displayTpl: (function(_this) { + return function(value) { + if (value.title != null) { + return _this.Issues.template; + } else { + return _this.Loading.template; + } + }; + })(this), + data: ['loading'], + insertTpl: '${atwho-at}${id}', + callbacks: { + sorter: this.DefaultOptions.sorter, + filter: this.DefaultOptions.filter, + beforeInsert: this.DefaultOptions.beforeInsert, + beforeSave: function(merges) { + return $.map(merges, function(m) { + if (m.title == null) { + return m; + } + return { + id: m.iid, + title: sanitize(m.title), + search: m.iid + " " + m.title + }; + }); + } + } + }); + return this.input.atwho({ + at: '~', + alias: 'labels', + searchKey: 'search', + displayTpl: this.Labels.template, + insertTpl: '${atwho-at}${title}', + callbacks: { + beforeSave: function(merges) { + var sanitizeLabelTitle; + sanitizeLabelTitle = function(title) { + if (/[\w\?&]+\s+[\w\?&]+/g.test(title)) { + return "\"" + (sanitize(title)) + "\""; + } else { + return sanitize(title); + } + }; + return $.map(merges, function(m) { + return { + title: sanitizeLabelTitle(m.title), + color: m.color, + search: "" + m.title + }; + }); + } + } + }); + }, + destroyAtWho: function() { + return this.input.atwho('destroy'); + }, + fetchData: function(dataSource) { + return $.getJSON(dataSource); + }, + loadData: function(data) { + this.cachedData = data; + this.dataLoaded = true; + this.input.atwho('load', '@', data.members); + this.input.atwho('load', 'issues', data.issues); + this.input.atwho('load', 'milestones', data.milestones); + this.input.atwho('load', 'mergerequests', data.mergerequests); + this.input.atwho('load', ':', data.emojis); + this.input.atwho('load', '~', data.labels); + return $(':focus').trigger('keyup'); + } + }; + +}).call(this); diff --git a/app/assets/javascripts/gfm_auto_complete.js.coffee b/app/assets/javascripts/gfm_auto_complete.js.coffee deleted file mode 100644 index 4a851d9c9fb..00000000000 --- a/app/assets/javascripts/gfm_auto_complete.js.coffee +++ /dev/null @@ -1,228 +0,0 @@ -# Creates the variables for setting up GFM auto-completion - -window.GitLab ?= {} -GitLab.GfmAutoComplete = - dataLoading: false - dataLoaded: false - cachedData: {} - dataSource: '' - - # Emoji - Emoji: - template: '
          • ${name} ${name}
          • ' - - # Team Members - Members: - template: '
          • ${username} ${title}
          • ' - - Labels: - template: '
          • ${title}
          • ' - - # Issues and MergeRequests - Issues: - template: '
          • ${id} ${title}
          • ' - - # Milestones - Milestones: - template: '
          • ${title}
          • ' - - Loading: - template: '
          • Loading...
          • ' - - DefaultOptions: - sorter: (query, items, searchKey) -> - return items if items[0].name? and items[0].name is 'loading' - - $.fn.atwho.default.callbacks.sorter(query, items, searchKey) - filter: (query, data, searchKey) -> - return data if data[0] is 'loading' - - $.fn.atwho.default.callbacks.filter(query, data, searchKey) - beforeInsert: (value) -> - if not GitLab.GfmAutoComplete.dataLoaded - @at - else - value - - # Add GFM auto-completion to all input fields, that accept GFM input. - setup: (wrap) -> - @input = $('.js-gfm-input') - - # destroy previous instances - @destroyAtWho() - - # set up instances - @setupAtWho() - - if @dataSource - if not @dataLoading and not @cachedData - @dataLoading = true - - # We should wait until initializations are done - # and only trigger the last .setup since - # The previous .dataSource belongs to the previous issuable - # and the last one will have the **proper** .dataSource property - # TODO: Make this a singleton and turn off events when moving to another page - setTimeout( => - fetch = @fetchData(@dataSource) - fetch.done (data) => - @dataLoading = false - @loadData(data) - , 1000) - - if @cachedData? - @loadData(@cachedData) - - setupAtWho: -> - # Emoji - @input.atwho - at: ':' - displayTpl: (value) => - if value.path? - @Emoji.template - else - @Loading.template - insertTpl: ':${name}:' - data: ['loading'] - callbacks: - sorter: @DefaultOptions.sorter - filter: @DefaultOptions.filter - beforeInsert: @DefaultOptions.beforeInsert - - # Team Members - @input.atwho - at: '@' - displayTpl: (value) => - if value.username? - @Members.template - else - @Loading.template - insertTpl: '${atwho-at}${username}' - searchKey: 'search' - data: ['loading'] - callbacks: - sorter: @DefaultOptions.sorter - filter: @DefaultOptions.filter - beforeInsert: @DefaultOptions.beforeInsert - beforeSave: (members) -> - $.map members, (m) -> - return m if not m.username? - - title = m.name - title += " (#{m.count})" if m.count - - username: m.username - title: sanitize(title) - search: sanitize("#{m.username} #{m.name}") - - @input.atwho - at: '#' - alias: 'issues' - searchKey: 'search' - displayTpl: (value) => - if value.title? - @Issues.template - else - @Loading.template - data: ['loading'] - insertTpl: '${atwho-at}${id}' - callbacks: - sorter: @DefaultOptions.sorter - filter: @DefaultOptions.filter - beforeInsert: @DefaultOptions.beforeInsert - beforeSave: (issues) -> - $.map issues, (i) -> - return i if not i.title? - - id: i.iid - title: sanitize(i.title) - search: "#{i.iid} #{i.title}" - - @input.atwho - at: '%' - alias: 'milestones' - searchKey: 'search' - displayTpl: (value) => - if value.title? - @Milestones.template - else - @Loading.template - insertTpl: '${atwho-at}"${title}"' - data: ['loading'] - callbacks: - beforeSave: (milestones) -> - $.map milestones, (m) -> - return m if not m.title? - - id: m.iid - title: sanitize(m.title) - search: "#{m.title}" - - @input.atwho - at: '!' - alias: 'mergerequests' - searchKey: 'search' - displayTpl: (value) => - if value.title? - @Issues.template - else - @Loading.template - data: ['loading'] - insertTpl: '${atwho-at}${id}' - callbacks: - sorter: @DefaultOptions.sorter - filter: @DefaultOptions.filter - beforeInsert: @DefaultOptions.beforeInsert - beforeSave: (merges) -> - $.map merges, (m) -> - return m if not m.title? - - id: m.iid - title: sanitize(m.title) - search: "#{m.iid} #{m.title}" - - @input.atwho - at: '~' - alias: 'labels' - searchKey: 'search' - displayTpl: @Labels.template - insertTpl: '${atwho-at}${title}' - callbacks: - beforeSave: (merges) -> - sanitizeLabelTitle = (title)-> - if /[\w\?&]+\s+[\w\?&]+/g.test(title) - "\"#{sanitize(title)}\"" - else - sanitize(title) - - $.map merges, (m) -> - title: sanitizeLabelTitle(m.title) - color: m.color - search: "#{m.title}" - - destroyAtWho: -> - @input.atwho('destroy') - - fetchData: (dataSource) -> - $.getJSON(dataSource) - - loadData: (data) -> - @cachedData = data - @dataLoaded = true - - # load members - @input.atwho 'load', '@', data.members - # load issues - @input.atwho 'load', 'issues', data.issues - # load milestones - @input.atwho 'load', 'milestones', data.milestones - # load merge requests - @input.atwho 'load', 'mergerequests', data.mergerequests - # load emojis - @input.atwho 'load', ':', data.emojis - # load labels - @input.atwho 'load', '~', data.labels - - # This trigger at.js again - # otherwise we would be stuck with loading until the user types - $(':focus').trigger('keyup') diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js new file mode 100644 index 00000000000..c5d92831fbe --- /dev/null +++ b/app/assets/javascripts/gl_dropdown.js @@ -0,0 +1,705 @@ +(function() { + var GitLabDropdown, GitLabDropdownFilter, GitLabDropdownRemote, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + GitLabDropdownFilter = (function() { + var ARROW_KEY_CODES, BLUR_KEYCODES, HAS_VALUE_CLASS; + + BLUR_KEYCODES = [27, 40]; + + ARROW_KEY_CODES = [38, 40]; + + HAS_VALUE_CLASS = "has-value"; + + function GitLabDropdownFilter(input, options) { + var $clearButton, $inputContainer, ref, timeout; + this.input = input; + this.options = options; + this.filterInputBlur = (ref = this.options.filterInputBlur) != null ? ref : true; + $inputContainer = this.input.parent(); + $clearButton = $inputContainer.find('.js-dropdown-input-clear'); + this.indeterminateIds = []; + $clearButton.on('click', (function(_this) { + return function(e) { + e.preventDefault(); + e.stopPropagation(); + return _this.input.val('').trigger('keyup').focus(); + }; + })(this)); + timeout = ""; + this.input.on("keyup", (function(_this) { + return function(e) { + var keyCode; + keyCode = e.which; + if (ARROW_KEY_CODES.indexOf(keyCode) >= 0) { + return; + } + if (_this.input.val() !== "" && !$inputContainer.hasClass(HAS_VALUE_CLASS)) { + $inputContainer.addClass(HAS_VALUE_CLASS); + } else if (_this.input.val() === "" && $inputContainer.hasClass(HAS_VALUE_CLASS)) { + $inputContainer.removeClass(HAS_VALUE_CLASS); + } + if (keyCode === 13) { + return false; + } + if (_this.options.remote) { + clearTimeout(timeout); + return timeout = setTimeout(function() { + var blur_field; + blur_field = _this.shouldBlur(keyCode); + if (blur_field && _this.filterInputBlur) { + _this.input.blur(); + } + return _this.options.query(_this.input.val(), function(data) { + return _this.options.callback(data); + }); + }, 250); + } else { + return _this.filter(_this.input.val()); + } + }; + })(this)); + } + + GitLabDropdownFilter.prototype.shouldBlur = function(keyCode) { + return BLUR_KEYCODES.indexOf(keyCode) >= 0; + }; + + GitLabDropdownFilter.prototype.filter = function(search_text) { + var data, elements, group, key, results, tmp; + if (this.options.onFilter) { + this.options.onFilter(search_text); + } + data = this.options.data(); + if ((data != null) && !this.options.filterByText) { + results = data; + if (search_text !== '') { + if (_.isArray(data)) { + results = fuzzaldrinPlus.filter(data, search_text, { + key: this.options.keys + }); + } else { + if (gl.utils.isObject(data)) { + results = {}; + for (key in data) { + group = data[key]; + tmp = fuzzaldrinPlus.filter(group, search_text, { + key: this.options.keys + }); + if (tmp.length) { + results[key] = tmp.map(function(item) { + return item; + }); + } + } + } + } + } + return this.options.callback(results); + } else { + elements = this.options.elements(); + if (search_text) { + return elements.each(function() { + var $el, matches; + $el = $(this); + matches = fuzzaldrinPlus.match($el.text().trim(), search_text); + if (!$el.is('.dropdown-header')) { + if (matches.length) { + return $el.show(); + } else { + return $el.hide(); + } + } + }); + } else { + return elements.show(); + } + } + }; + + return GitLabDropdownFilter; + + })(); + + GitLabDropdownRemote = (function() { + function GitLabDropdownRemote(dataEndpoint, options) { + this.dataEndpoint = dataEndpoint; + this.options = options; + } + + GitLabDropdownRemote.prototype.execute = function() { + if (typeof this.dataEndpoint === "string") { + return this.fetchData(); + } else if (typeof this.dataEndpoint === "function") { + if (this.options.beforeSend) { + this.options.beforeSend(); + } + return this.dataEndpoint("", (function(_this) { + return function(data) { + if (_this.options.success) { + _this.options.success(data); + } + if (_this.options.beforeSend) { + return _this.options.beforeSend(); + } + }; + })(this)); + } + }; + + GitLabDropdownRemote.prototype.fetchData = function() { + return $.ajax({ + url: this.dataEndpoint, + dataType: this.options.dataType, + beforeSend: (function(_this) { + return function() { + if (_this.options.beforeSend) { + return _this.options.beforeSend(); + } + }; + })(this), + success: (function(_this) { + return function(data) { + if (_this.options.success) { + return _this.options.success(data); + } + }; + })(this) + }); + }; + + return GitLabDropdownRemote; + + })(); + + GitLabDropdown = (function() { + var ACTIVE_CLASS, FILTER_INPUT, INDETERMINATE_CLASS, LOADING_CLASS, PAGE_TWO_CLASS, currentIndex; + + LOADING_CLASS = "is-loading"; + + PAGE_TWO_CLASS = "is-page-two"; + + ACTIVE_CLASS = "is-active"; + + INDETERMINATE_CLASS = "is-indeterminate"; + + currentIndex = -1; + + FILTER_INPUT = '.dropdown-input .dropdown-input-field'; + + function GitLabDropdown(el1, options) { + var ref, ref1, ref2, ref3, searchFields, selector, self; + this.el = el1; + this.options = options; + this.updateLabel = bind(this.updateLabel, this); + this.hidden = bind(this.hidden, this); + this.opened = bind(this.opened, this); + this.shouldPropagate = bind(this.shouldPropagate, this); + self = this; + selector = $(this.el).data("target"); + this.dropdown = selector != null ? $(selector) : $(this.el).parent(); + ref = this.options, this.filterInput = (ref1 = ref.filterInput) != null ? ref1 : this.getElement(FILTER_INPUT), this.highlight = (ref2 = ref.highlight) != null ? ref2 : false, this.filterInputBlur = (ref3 = ref.filterInputBlur) != null ? ref3 : true; + self = this; + if (_.isString(this.filterInput)) { + this.filterInput = this.getElement(this.filterInput); + } + searchFields = this.options.search ? this.options.search.fields : []; + if (this.options.data) { + if (_.isObject(this.options.data) && !_.isFunction(this.options.data)) { + this.fullData = this.options.data; + this.parseData(this.options.data); + } else { + this.remote = new GitLabDropdownRemote(this.options.data, { + dataType: this.options.dataType, + beforeSend: this.toggleLoading.bind(this), + success: (function(_this) { + return function(data) { + _this.fullData = data; + _this.parseData(_this.fullData); + if (_this.options.filterable && _this.filter && _this.filter.input) { + return _this.filter.input.trigger('keyup'); + } + }; + })(this) + }); + } + } + if (this.options.filterable) { + this.filter = new GitLabDropdownFilter(this.filterInput, { + filterInputBlur: this.filterInputBlur, + filterByText: this.options.filterByText, + onFilter: this.options.onFilter, + remote: this.options.filterRemote, + query: this.options.data, + keys: searchFields, + elements: (function(_this) { + return function() { + selector = '.dropdown-content li:not(.divider)'; + if (_this.dropdown.find('.dropdown-toggle-page').length) { + selector = ".dropdown-page-one " + selector; + } + return $(selector); + }; + })(this), + data: (function(_this) { + return function() { + return _this.fullData; + }; + })(this), + callback: (function(_this) { + return function(data) { + _this.parseData(data); + if (_this.filterInput.val() !== '') { + selector = '.dropdown-content li:not(.divider):visible'; + if (_this.dropdown.find('.dropdown-toggle-page').length) { + selector = ".dropdown-page-one " + selector; + } + $(selector, _this.dropdown).first().find('a').addClass('is-focused'); + return currentIndex = 0; + } + }; + })(this) + }); + } + this.dropdown.on("shown.bs.dropdown", this.opened); + this.dropdown.on("hidden.bs.dropdown", this.hidden); + $(this.el).on("update.label", this.updateLabel); + this.dropdown.on("click", ".dropdown-menu, .dropdown-menu-close", this.shouldPropagate); + this.dropdown.on('keyup', (function(_this) { + return function(e) { + if (e.which === 27) { + return $('.dropdown-menu-close', _this.dropdown).trigger('click'); + } + }; + })(this)); + this.dropdown.on('blur', 'a', (function(_this) { + return function(e) { + var $dropdownMenu, $relatedTarget; + if (e.relatedTarget != null) { + $relatedTarget = $(e.relatedTarget); + $dropdownMenu = $relatedTarget.closest('.dropdown-menu'); + if ($dropdownMenu.length === 0) { + return _this.dropdown.removeClass('open'); + } + } + }; + })(this)); + if (this.dropdown.find(".dropdown-toggle-page").length) { + this.dropdown.find(".dropdown-toggle-page, .dropdown-menu-back").on("click", (function(_this) { + return function(e) { + e.preventDefault(); + e.stopPropagation(); + return _this.togglePage(); + }; + })(this)); + } + if (this.options.selectable) { + selector = ".dropdown-content a"; + if (this.dropdown.find(".dropdown-toggle-page").length) { + selector = ".dropdown-page-one .dropdown-content a"; + } + this.dropdown.on("click", selector, function(e) { + var $el, selected; + $el = $(this); + selected = self.rowClicked($el); + if (self.options.clicked) { + self.options.clicked(selected, $el, e); + } + return $el.trigger('blur'); + }); + } + } + + GitLabDropdown.prototype.getElement = function(selector) { + return this.dropdown.find(selector); + }; + + GitLabDropdown.prototype.toggleLoading = function() { + return $('.dropdown-menu', this.dropdown).toggleClass(LOADING_CLASS); + }; + + GitLabDropdown.prototype.togglePage = function() { + var menu; + menu = $('.dropdown-menu', this.dropdown); + if (menu.hasClass(PAGE_TWO_CLASS)) { + if (this.remote) { + this.remote.execute(); + } + } + menu.toggleClass(PAGE_TWO_CLASS); + return this.dropdown.find('[class^="dropdown-page-"]:visible :text:visible:first').focus(); + }; + + GitLabDropdown.prototype.parseData = function(data) { + var full_html, groupData, html, name; + this.renderedData = data; + if (this.options.filterable && data.length === 0) { + html = [this.noResults()]; + } else { + if (gl.utils.isObject(data)) { + html = []; + for (name in data) { + groupData = data[name]; + html.push(this.renderItem({ + header: name + }, name)); + this.renderData(groupData, name).map(function(item) { + return html.push(item); + }); + } + } else { + html = this.renderData(data); + } + } + full_html = this.renderMenu(html); + return this.appendMenu(full_html); + }; + + GitLabDropdown.prototype.renderData = function(data, group) { + if (group == null) { + group = false; + } + return data.map((function(_this) { + return function(obj, index) { + return _this.renderItem(obj, group, index); + }; + })(this)); + }; + + GitLabDropdown.prototype.shouldPropagate = function(e) { + var $target; + if (this.options.multiSelect) { + $target = $(e.target); + if (!$target.hasClass('dropdown-menu-close') && !$target.hasClass('dropdown-menu-close-icon') && !$target.data('is-link')) { + e.stopPropagation(); + return false; + } else { + return true; + } + } + }; + + GitLabDropdown.prototype.opened = function() { + var contentHtml; + this.addArrowKeyEvent(); + if (this.options.setIndeterminateIds) { + this.options.setIndeterminateIds.call(this); + } + if (this.options.setActiveIds) { + this.options.setActiveIds.call(this); + } + if (this.fullData && this.dropdown.find('.dropdown-menu-toggle').hasClass('js-filter-bulk-update')) { + this.parseData(this.fullData); + } + contentHtml = $('.dropdown-content', this.dropdown).html(); + if (this.remote && contentHtml === "") { + this.remote.execute(); + } + if (this.options.filterable) { + this.filterInput.focus(); + } + return this.dropdown.trigger('shown.gl.dropdown'); + }; + + GitLabDropdown.prototype.hidden = function(e) { + var $input; + this.removeArrayKeyEvent(); + $input = this.dropdown.find(".dropdown-input-field"); + if (this.options.filterable) { + $input.blur().val(""); + } + if (!this.options.persistWhenHide) { + $input.trigger("keyup"); + } + if (this.dropdown.find(".dropdown-toggle-page").length) { + $('.dropdown-menu', this.dropdown).removeClass(PAGE_TWO_CLASS); + } + if (this.options.hidden) { + this.options.hidden.call(this, e); + } + return this.dropdown.trigger('hidden.gl.dropdown'); + }; + + GitLabDropdown.prototype.renderMenu = function(html) { + var menu_html; + menu_html = ""; + if (this.options.renderMenu) { + menu_html = this.options.renderMenu(html); + } else { + menu_html = $('
              ').append(html); + } + return menu_html; + }; + + GitLabDropdown.prototype.appendMenu = function(html) { + var selector; + selector = '.dropdown-content'; + if (this.dropdown.find(".dropdown-toggle-page").length) { + selector = ".dropdown-page-one .dropdown-content"; + } + return $(selector, this.dropdown).empty().append(html); + }; + + GitLabDropdown.prototype.renderItem = function(data, group, index) { + var cssClass, field, fieldName, groupAttrs, html, selected, text, url, value; + if (group == null) { + group = false; + } + if (index == null) { + index = false; + } + html = ""; + if (data === "divider") { + return "
            • "; + } + if (data === "separator") { + return "
            • "; + } + if (data.header != null) { + return ""; + } + if (this.options.renderRow) { + html = this.options.renderRow.call(this.options, data, this); + } else { + if (!selected) { + value = this.options.id ? this.options.id(data) : data.id; + fieldName = this.options.fieldName; + field = this.dropdown.parent().find("input[name='" + fieldName + "'][value='" + value + "']"); + if (field.length) { + selected = true; + } + } + if (this.options.url != null) { + url = this.options.url(data); + } else { + url = data.url != null ? data.url : '#'; + } + if (this.options.text != null) { + text = this.options.text(data); + } else { + text = data.text != null ? data.text : ''; + } + cssClass = ""; + if (selected) { + cssClass = "is-active"; + } + if (this.highlight) { + text = this.highlightTextMatches(text, this.filterInput.val()); + } + if (group) { + groupAttrs = "data-group='" + group + "' data-index='" + index + "'"; + } else { + groupAttrs = ''; + } + html = "
            • " + text + "
            • "; + } + return html; + }; + + GitLabDropdown.prototype.highlightTextMatches = function(text, term) { + var occurrences; + occurrences = fuzzaldrinPlus.match(text, term); + return text.split('').map(function(character, i) { + if (indexOf.call(occurrences, i) >= 0) { + return "" + character + ""; + } else { + return character; + } + }).join(''); + }; + + GitLabDropdown.prototype.noResults = function() { + var html; + return html = ""; + }; + + GitLabDropdown.prototype.highlightRow = function(index) { + var selector; + if (this.filterInput.val() !== "") { + selector = '.dropdown-content li:first-child a'; + if (this.dropdown.find(".dropdown-toggle-page").length) { + selector = ".dropdown-page-one .dropdown-content li:first-child a"; + } + return this.getElement(selector).addClass('is-focused'); + } + }; + + GitLabDropdown.prototype.rowClicked = function(el) { + var field, fieldName, groupName, isInput, selectedIndex, selectedObject, value; + fieldName = this.options.fieldName; + isInput = $(this.el).is('input'); + if (this.renderedData) { + groupName = el.data('group'); + if (groupName) { + selectedIndex = el.data('index'); + selectedObject = this.renderedData[groupName][selectedIndex]; + } else { + selectedIndex = el.closest('li').index(); + selectedObject = this.renderedData[selectedIndex]; + } + } + value = this.options.id ? this.options.id(selectedObject, el) : selectedObject.id; + if (isInput) { + field = $(this.el); + } else { + field = this.dropdown.parent().find("input[name='" + fieldName + "'][value='" + value + "']"); + } + if (el.hasClass(ACTIVE_CLASS)) { + el.removeClass(ACTIVE_CLASS); + if (isInput) { + field.val(''); + } else { + field.remove(); + } + if (this.options.toggleLabel) { + return this.updateLabel(selectedObject, el, this); + } else { + return selectedObject; + } + } else if (el.hasClass(INDETERMINATE_CLASS)) { + el.addClass(ACTIVE_CLASS); + el.removeClass(INDETERMINATE_CLASS); + if (value == null) { + field.remove(); + } + if (!field.length && fieldName) { + this.addInput(fieldName, value); + } + return selectedObject; + } else { + if (!this.options.multiSelect || el.hasClass('dropdown-clear-active')) { + this.dropdown.find("." + ACTIVE_CLASS).removeClass(ACTIVE_CLASS); + if (!isInput) { + this.dropdown.parent().find("input[name='" + fieldName + "']").remove(); + } + } + if (value == null) { + field.remove(); + } + el.addClass(ACTIVE_CLASS); + if (this.options.toggleLabel) { + this.updateLabel(selectedObject, el, this); + } + if (value != null) { + if (!field.length && fieldName) { + this.addInput(fieldName, value); + } else { + field.val(value).trigger('change'); + } + } + return selectedObject; + } + }; + + GitLabDropdown.prototype.addInput = function(fieldName, value) { + var $input; + $input = $('').attr('type', 'hidden').attr('name', fieldName).val(value); + if (this.options.inputId != null) { + $input.attr('id', this.options.inputId); + } + return this.dropdown.before($input); + }; + + GitLabDropdown.prototype.selectRowAtIndex = function(e, index) { + var $el, selector; + selector = ".dropdown-content li:not(.divider,.dropdown-header,.separator):eq(" + index + ") a"; + if (this.dropdown.find(".dropdown-toggle-page").length) { + selector = ".dropdown-page-one " + selector; + } + $el = $(selector, this.dropdown); + if ($el.length) { + e.preventDefault(); + e.stopImmediatePropagation(); + return $el.first().trigger('click'); + } + }; + + GitLabDropdown.prototype.addArrowKeyEvent = function() { + var $input, ARROW_KEY_CODES, selector; + ARROW_KEY_CODES = [38, 40]; + $input = this.dropdown.find(".dropdown-input-field"); + selector = '.dropdown-content li:not(.divider,.dropdown-header,.separator)'; + if (this.dropdown.find(".dropdown-toggle-page").length) { + selector = ".dropdown-page-one " + selector; + } + return $('body').on('keydown', (function(_this) { + return function(e) { + var $listItems, PREV_INDEX, currentKeyCode; + currentKeyCode = e.which; + if (ARROW_KEY_CODES.indexOf(currentKeyCode) >= 0) { + e.preventDefault(); + e.stopImmediatePropagation(); + PREV_INDEX = currentIndex; + $listItems = $(selector, _this.dropdown); + if (currentKeyCode === 40) { + if (currentIndex < ($listItems.length - 1)) { + currentIndex += 1; + } + } else if (currentKeyCode === 38) { + if (currentIndex > 0) { + currentIndex -= 1; + } + } + if (currentIndex !== PREV_INDEX) { + _this.highlightRowAtIndex($listItems, currentIndex); + } + return false; + } + if (currentKeyCode === 13 && currentIndex !== -1) { + return _this.selectRowAtIndex(e, currentIndex); + } + }; + })(this)); + }; + + GitLabDropdown.prototype.removeArrayKeyEvent = function() { + return $('body').off('keydown'); + }; + + GitLabDropdown.prototype.highlightRowAtIndex = function($listItems, index) { + var $dropdownContent, $listItem, dropdownContentBottom, dropdownContentHeight, dropdownContentTop, dropdownScrollTop, listItemBottom, listItemHeight, listItemTop; + $('.is-focused', this.dropdown).removeClass('is-focused'); + $listItem = $listItems.eq(index); + $listItem.find('a:first-child').addClass("is-focused"); + $dropdownContent = $listItem.closest('.dropdown-content'); + dropdownScrollTop = $dropdownContent.scrollTop(); + dropdownContentHeight = $dropdownContent.outerHeight(); + dropdownContentTop = $dropdownContent.prop('offsetTop'); + dropdownContentBottom = dropdownContentTop + dropdownContentHeight; + listItemHeight = $listItem.outerHeight(); + listItemTop = $listItem.prop('offsetTop'); + listItemBottom = listItemTop + listItemHeight; + if (listItemBottom > dropdownContentBottom + dropdownScrollTop) { + return $dropdownContent.scrollTop(listItemBottom - dropdownContentBottom); + } else if (listItemTop < dropdownContentTop + dropdownScrollTop) { + return $dropdownContent.scrollTop(listItemTop - dropdownContentTop); + } + }; + + GitLabDropdown.prototype.updateLabel = function(selected, el, instance) { + if (selected == null) { + selected = null; + } + if (el == null) { + el = null; + } + if (instance == null) { + instance = null; + } + return $(this.el).find(".dropdown-toggle-text").text(this.options.toggleLabel(selected, el, instance)); + }; + + return GitLabDropdown; + + })(); + + $.fn.glDropdown = function(opts) { + return this.each(function() { + if (!$.data(this, 'glDropdown')) { + return $.data(this, 'glDropdown', new GitLabDropdown(this, opts)); + } + }); + }; + +}).call(this); diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee deleted file mode 100644 index 7086ece29b8..00000000000 --- a/app/assets/javascripts/gl_dropdown.js.coffee +++ /dev/null @@ -1,638 +0,0 @@ -class GitLabDropdownFilter - BLUR_KEYCODES = [27, 40] - ARROW_KEY_CODES = [38, 40] - HAS_VALUE_CLASS = "has-value" - - constructor: (@input, @options) -> - { - @filterInputBlur = true - } = @options - - $inputContainer = @input.parent() - $clearButton = $inputContainer.find('.js-dropdown-input-clear') - - @indeterminateIds = [] - - # Clear click - $clearButton.on 'click', (e) => - e.preventDefault() - e.stopPropagation() - @input - .val('') - .trigger('keyup') - .focus() - - # Key events - timeout = "" - @input.on "keyup", (e) => - keyCode = e.which - - return if ARROW_KEY_CODES.indexOf(keyCode) >= 0 - - if @input.val() isnt "" and !$inputContainer.hasClass HAS_VALUE_CLASS - $inputContainer.addClass HAS_VALUE_CLASS - else if @input.val() is "" and $inputContainer.hasClass HAS_VALUE_CLASS - $inputContainer.removeClass HAS_VALUE_CLASS - - if keyCode is 13 - return false - - # Only filter asynchronously only if option remote is set - if @options.remote - clearTimeout timeout - timeout = setTimeout => - blur_field = @shouldBlur keyCode - - if blur_field and @filterInputBlur - @input.blur() - - @options.query @input.val(), (data) => - @options.callback(data) - , 250 - else - @filter @input.val() - - shouldBlur: (keyCode) -> - return BLUR_KEYCODES.indexOf(keyCode) >= 0 - - filter: (search_text) -> - @options.onFilter(search_text) if @options.onFilter - data = @options.data() - - if data? and not @options.filterByText - results = data - - if search_text isnt '' - # When data is an array of objects therefore [object Array] e.g. - # [ - # { prop: 'foo' }, - # { prop: 'baz' } - # ] - if _.isArray(data) - results = fuzzaldrinPlus.filter(data, search_text, - key: @options.keys - ) - else - # If data is grouped therefore an [object Object]. e.g. - # { - # groupName1: [ - # { prop: 'foo' }, - # { prop: 'baz' } - # ], - # groupName2: [ - # { prop: 'abc' }, - # { prop: 'def' } - # ] - # } - if gl.utils.isObject data - results = {} - for key, group of data - tmp = fuzzaldrinPlus.filter(group, search_text, - key: @options.keys - ) - - if tmp.length - results[key] = tmp.map (item) -> item - - @options.callback results - else - elements = @options.elements() - - if search_text - elements.each -> - $el = $(@) - matches = fuzzaldrinPlus.match($el.text().trim(), search_text) - - unless $el.is('.dropdown-header') - if matches.length - $el.show() - else - $el.hide() - else - elements.show() - -class GitLabDropdownRemote - constructor: (@dataEndpoint, @options) -> - - execute: -> - if typeof @dataEndpoint is "string" - @fetchData() - else if typeof @dataEndpoint is "function" - if @options.beforeSend - @options.beforeSend() - - # Fetch the data by calling the data funcfion - @dataEndpoint "", (data) => - if @options.success - @options.success(data) - - if @options.beforeSend - @options.beforeSend() - - # Fetch the data through ajax if the data is a string - fetchData: -> - $.ajax( - url: @dataEndpoint, - dataType: @options.dataType, - beforeSend: => - if @options.beforeSend - @options.beforeSend() - success: (data) => - if @options.success - @options.success(data) - ) - -class GitLabDropdown - LOADING_CLASS = "is-loading" - PAGE_TWO_CLASS = "is-page-two" - ACTIVE_CLASS = "is-active" - INDETERMINATE_CLASS = "is-indeterminate" - currentIndex = -1 - - FILTER_INPUT = '.dropdown-input .dropdown-input-field' - - constructor: (@el, @options) -> - self = @ - selector = $(@el).data "target" - @dropdown = if selector? then $(selector) else $(@el).parent() - - # Set Defaults - { - # If no input is passed create a default one - @filterInput = @getElement(FILTER_INPUT) - @highlight = false - @filterInputBlur = true - } = @options - - self = @ - - # If selector was passed - if _.isString(@filterInput) - @filterInput = @getElement(@filterInput) - - searchFields = if @options.search then @options.search.fields else []; - - if @options.data - # If we provided data - # data could be an array of objects or a group of arrays - if _.isObject(@options.data) and not _.isFunction(@options.data) - @fullData = @options.data - @parseData @options.data - else - # Remote data - @remote = new GitLabDropdownRemote @options.data, { - dataType: @options.dataType, - beforeSend: @toggleLoading.bind(@) - success: (data) => - @fullData = data - - @parseData @fullData - - @filter.input.trigger('keyup') if @options.filterable and @filter and @filter.input - } - - # Init filterable - if @options.filterable - @filter = new GitLabDropdownFilter @filterInput, - filterInputBlur: @filterInputBlur - filterByText: @options.filterByText - onFilter: @options.onFilter - remote: @options.filterRemote - query: @options.data - keys: searchFields - elements: => - selector = '.dropdown-content li:not(.divider)' - - if @dropdown.find('.dropdown-toggle-page').length - selector = ".dropdown-page-one #{selector}" - - return $(selector) - data: => - return @fullData - callback: (data) => - @parseData data - - unless @filterInput.val() is '' - selector = '.dropdown-content li:not(.divider):visible' - - if @dropdown.find('.dropdown-toggle-page').length - selector = ".dropdown-page-one #{selector}" - - $(selector, @dropdown) - .first() - .find('a') - .addClass('is-focused') - - currentIndex = 0 - - - # Event listeners - - @dropdown.on "shown.bs.dropdown", @opened - @dropdown.on "hidden.bs.dropdown", @hidden - $(@el).on "update.label", @updateLabel - @dropdown.on "click", ".dropdown-menu, .dropdown-menu-close", @shouldPropagate - @dropdown.on 'keyup', (e) => - if e.which is 27 # Escape key - $('.dropdown-menu-close', @dropdown).trigger 'click' - @dropdown.on 'blur', 'a', (e) => - if e.relatedTarget? - $relatedTarget = $(e.relatedTarget) - $dropdownMenu = $relatedTarget.closest('.dropdown-menu') - - if $dropdownMenu.length is 0 - @dropdown.removeClass('open') - - if @dropdown.find(".dropdown-toggle-page").length - @dropdown.find(".dropdown-toggle-page, .dropdown-menu-back").on "click", (e) => - e.preventDefault() - e.stopPropagation() - - @togglePage() - - if @options.selectable - selector = ".dropdown-content a" - - if @dropdown.find(".dropdown-toggle-page").length - selector = ".dropdown-page-one .dropdown-content a" - - @dropdown.on "click", selector, (e) -> - $el = $(@) - selected = self.rowClicked $el - - if self.options.clicked - self.options.clicked(selected, $el, e) - - $el.trigger('blur') - - # Finds an element inside wrapper element - getElement: (selector) -> - @dropdown.find selector - - toggleLoading: -> - $('.dropdown-menu', @dropdown).toggleClass LOADING_CLASS - - togglePage: -> - menu = $('.dropdown-menu', @dropdown) - - if menu.hasClass(PAGE_TWO_CLASS) - if @remote - @remote.execute() - - menu.toggleClass PAGE_TWO_CLASS - - # Focus first visible input on active page - @dropdown.find('[class^="dropdown-page-"]:visible :text:visible:first').focus() - - parseData: (data) -> - @renderedData = data - - if @options.filterable and data.length is 0 - # render no matching results - html = [@noResults()] - else - # Handle array groups - if gl.utils.isObject data - html = [] - for name, groupData of data - # Add header for each group - html.push(@renderItem(header: name, name)) - - @renderData(groupData, name) - .map (item) -> - html.push item - else - # Render each row - html = @renderData(data) - - # Render the full menu - full_html = @renderMenu(html) - - @appendMenu(full_html) - - renderData: (data, group = false) -> - data.map (obj, index) => - return @renderItem(obj, group, index) - - shouldPropagate: (e) => - if @options.multiSelect - $target = $(e.target) - - if not $target.hasClass('dropdown-menu-close') and not $target.hasClass('dropdown-menu-close-icon') and not $target.data('is-link') - e.stopPropagation() - return false - else - return true - - opened: => - @addArrowKeyEvent() - - if @options.setIndeterminateIds - @options.setIndeterminateIds.call(@) - - if @options.setActiveIds - @options.setActiveIds.call(@) - - # Makes indeterminate items effective - if @fullData and @dropdown.find('.dropdown-menu-toggle').hasClass('js-filter-bulk-update') - @parseData @fullData - - contentHtml = $('.dropdown-content', @dropdown).html() - if @remote && contentHtml is "" - @remote.execute() - - if @options.filterable - @filterInput.focus() - - @dropdown.trigger('shown.gl.dropdown') - - hidden: (e) => - @removeArrayKeyEvent() - - $input = @dropdown.find(".dropdown-input-field") - - if @options.filterable - $input - .blur() - .val("") - - # Triggering 'keyup' will re-render the dropdown which is not always required - # specially if we want to keep the state of the dropdown needed for bulk-assignment - if not @options.persistWhenHide - $input.trigger("keyup") - - if @dropdown.find(".dropdown-toggle-page").length - $('.dropdown-menu', @dropdown).removeClass PAGE_TWO_CLASS - - if @options.hidden - @options.hidden.call(@,e) - - @dropdown.trigger('hidden.gl.dropdown') - - - # Render the full menu - renderMenu: (html) -> - menu_html = "" - - if @options.renderMenu - menu_html = @options.renderMenu(html) - else - menu_html = $('
                ') - .append(html) - - return menu_html - - # Append the menu into the dropdown - appendMenu: (html) -> - selector = '.dropdown-content' - if @dropdown.find(".dropdown-toggle-page").length - selector = ".dropdown-page-one .dropdown-content" - $(selector, @dropdown) - .empty() - .append(html) - - # Render the row - renderItem: (data, group = false, index = false) -> - html = "" - - # Divider - return "
              • " if data is "divider" - - # Separator is a full-width divider - return "
              • " if data is "separator" - - # Header - return "" if data.header? - - if @options.renderRow - # Call the render function - html = @options.renderRow.call(@options, data, @) - else - if not selected - value = if @options.id then @options.id(data) else data.id - fieldName = @options.fieldName - field = @dropdown.parent().find("input[name='#{fieldName}'][value='#{value}']") - if field.length - selected = true - - # Set URL - if @options.url? - url = @options.url(data) - else - url = if data.url? then data.url else '#' - - # Set Text - if @options.text? - text = @options.text(data) - else - text = if data.text? then data.text else '' - - cssClass = ""; - - if selected - cssClass = "is-active" - - if @highlight - text = @highlightTextMatches(text, @filterInput.val()) - - if group - groupAttrs = "data-group='#{group}' data-index='#{index}'" - else - groupAttrs = '' - - html = "
              • - - #{text} - -
              • " - - return html - - highlightTextMatches: (text, term) -> - occurrences = fuzzaldrinPlus.match(text, term) - text.split('').map((character, i) -> - if i in occurrences then "#{character}" else character - ).join('') - - noResults: -> - html = "" - - highlightRow: (index) -> - if @filterInput.val() isnt "" - selector = '.dropdown-content li:first-child a' - if @dropdown.find(".dropdown-toggle-page").length - selector = ".dropdown-page-one .dropdown-content li:first-child a" - - @getElement(selector).addClass 'is-focused' - - rowClicked: (el) -> - fieldName = @options.fieldName - isInput = $(@el).is('input') - - if @renderedData - groupName = el.data('group') - if groupName - selectedIndex = el.data('index') - selectedObject = @renderedData[groupName][selectedIndex] - else - selectedIndex = el.closest('li').index() - selectedObject = @renderedData[selectedIndex] - - value = if @options.id then @options.id(selectedObject, el) else selectedObject.id - - if isInput - field = $(@el) - else - field = @dropdown.parent().find("input[name='#{fieldName}'][value='#{value}']") - - if el.hasClass(ACTIVE_CLASS) - el.removeClass(ACTIVE_CLASS) - - if isInput - field.val('') - else - field.remove() - - # Toggle the dropdown label - if @options.toggleLabel - @updateLabel(selectedObject, el, @) - else - selectedObject - else if el.hasClass(INDETERMINATE_CLASS) - el.addClass ACTIVE_CLASS - el.removeClass INDETERMINATE_CLASS - - if not value? - field.remove() - - if not field.length and fieldName - @addInput(fieldName, value) - - return selectedObject - else - if not @options.multiSelect or el.hasClass('dropdown-clear-active') - @dropdown.find(".#{ACTIVE_CLASS}").removeClass ACTIVE_CLASS - - unless isInput - @dropdown.parent().find("input[name='#{fieldName}']").remove() - - if !value? - field.remove() - - # Toggle active class for the tick mark - el.addClass ACTIVE_CLASS - - # Toggle the dropdown label - if @options.toggleLabel - @updateLabel(selectedObject, el, @) - if value? - if !field.length and fieldName - @addInput(fieldName, value) - else - field - .val value - .trigger 'change' - - return selectedObject - - addInput: (fieldName, value)-> - # Create hidden input for form - $input = $('').attr('type', 'hidden') - .attr('name', fieldName) - .val(value) - - if @options.inputId? - $input.attr('id', @options.inputId) - - @dropdown.before $input - - selectRowAtIndex: (e, index) -> - selector = ".dropdown-content li:not(.divider,.dropdown-header,.separator):eq(#{index}) a" - - if @dropdown.find(".dropdown-toggle-page").length - selector = ".dropdown-page-one #{selector}" - - # simulate a click on the first link - $el = $(selector, @dropdown) - - if $el.length - e.preventDefault() - e.stopImmediatePropagation() - $el.first().trigger('click') - - addArrowKeyEvent: -> - ARROW_KEY_CODES = [38, 40] - $input = @dropdown.find(".dropdown-input-field") - - selector = '.dropdown-content li:not(.divider,.dropdown-header,.separator)' - if @dropdown.find(".dropdown-toggle-page").length - selector = ".dropdown-page-one #{selector}" - - $('body').on 'keydown', (e) => - currentKeyCode = e.which - - if ARROW_KEY_CODES.indexOf(currentKeyCode) >= 0 - e.preventDefault() - e.stopImmediatePropagation() - - PREV_INDEX = currentIndex - $listItems = $(selector, @dropdown) - - # if @options.filterable - # $input.blur() - - if currentKeyCode is 40 - # Move down - currentIndex += 1 if currentIndex < ($listItems.length - 1) - else if currentKeyCode is 38 - # Move up - currentIndex -= 1 if currentIndex > 0 - - @highlightRowAtIndex($listItems, currentIndex) if currentIndex isnt PREV_INDEX - - return false - - if currentKeyCode is 13 and currentIndex isnt -1 - @selectRowAtIndex e, currentIndex - - removeArrayKeyEvent: -> - $('body').off 'keydown' - - highlightRowAtIndex: ($listItems, index) -> - # Remove the class for the previously focused row - $('.is-focused', @dropdown).removeClass 'is-focused' - - # Update the class for the row at the specific index - $listItem = $listItems.eq(index) - $listItem.find('a:first-child').addClass "is-focused" - - # Dropdown content scroll area - $dropdownContent = $listItem.closest('.dropdown-content') - dropdownScrollTop = $dropdownContent.scrollTop() - dropdownContentHeight = $dropdownContent.outerHeight() - dropdownContentTop = $dropdownContent.prop('offsetTop') - dropdownContentBottom = dropdownContentTop + dropdownContentHeight - - # Get the offset bottom of the list item - listItemHeight = $listItem.outerHeight() - listItemTop = $listItem.prop('offsetTop') - listItemBottom = listItemTop + listItemHeight - - if listItemBottom > dropdownContentBottom + dropdownScrollTop - # Scroll the dropdown content down - $dropdownContent.scrollTop(listItemBottom - dropdownContentBottom) - else if listItemTop < dropdownContentTop + dropdownScrollTop - # Scroll the dropdown content up - $dropdownContent.scrollTop(listItemTop - dropdownContentTop) - - updateLabel: (selected = null, el = null, instance = null) => - $(@el).find(".dropdown-toggle-text").text @options.toggleLabel(selected, el, instance) - -$.fn.glDropdown = (opts) -> - return @.each -> - if (!$.data @, 'glDropdown') - $.data(@, 'glDropdown', new GitLabDropdown @, opts) diff --git a/app/assets/javascripts/gl_form.js b/app/assets/javascripts/gl_form.js new file mode 100644 index 00000000000..6ac7564a848 --- /dev/null +++ b/app/assets/javascripts/gl_form.js @@ -0,0 +1,53 @@ +(function() { + this.GLForm = (function() { + function GLForm(form) { + this.form = form; + this.textarea = this.form.find('textarea.js-gfm-input'); + this.destroy(); + this.setupForm(); + this.form.data('gl-form', this); + } + + GLForm.prototype.destroy = function() { + this.clearEventListeners(); + return this.form.data('gl-form', null); + }; + + GLForm.prototype.setupForm = function() { + var isNewForm; + isNewForm = this.form.is(':not(.gfm-form)'); + this.form.removeClass('js-new-note-form'); + if (isNewForm) { + this.form.find('.div-dropzone').remove(); + this.form.addClass('gfm-form'); + disableButtonIfEmptyField(this.form.find('.js-note-text'), this.form.find('.js-comment-button')); + GitLab.GfmAutoComplete.setup(); + new DropzoneInput(this.form); + autosize(this.textarea); + this.addEventListeners(); + gl.text.init(this.form); + } + this.form.find('.js-note-discard').hide(); + return this.form.show(); + }; + + GLForm.prototype.clearEventListeners = function() { + this.textarea.off('focus'); + this.textarea.off('blur'); + return gl.text.removeListeners(this.form); + }; + + GLForm.prototype.addEventListeners = function() { + this.textarea.on('focus', function() { + return $(this).closest('.md-area').addClass('is-focused'); + }); + return this.textarea.on('blur', function() { + return $(this).closest('.md-area').removeClass('is-focused'); + }); + }; + + return GLForm; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/gl_form.js.coffee b/app/assets/javascripts/gl_form.js.coffee deleted file mode 100644 index 77512d187c9..00000000000 --- a/app/assets/javascripts/gl_form.js.coffee +++ /dev/null @@ -1,54 +0,0 @@ -class @GLForm - constructor: (@form) -> - @textarea = @form.find('textarea.js-gfm-input') - - # Before we start, we should clean up any previous data for this form - @destroy() - - # Setup the form - @setupForm() - - @form.data 'gl-form', @ - - destroy: -> - # Clean form listeners - @clearEventListeners() - @form.data 'gl-form', null - - setupForm: -> - isNewForm = @form.is(':not(.gfm-form)') - - @form.removeClass 'js-new-note-form' - - if isNewForm - @form.find('.div-dropzone').remove() - @form.addClass('gfm-form') - disableButtonIfEmptyField @form.find('.js-note-text'), @form.find('.js-comment-button') - - # remove notify commit author checkbox for non-commit notes - GitLab.GfmAutoComplete.setup() - new DropzoneInput(@form) - - autosize(@textarea) - - # form and textarea event listeners - @addEventListeners() - - gl.text.init(@form) - - # hide discard button - @form.find('.js-note-discard').hide() - - @form.show() - - clearEventListeners: -> - @textarea.off 'focus' - @textarea.off 'blur' - gl.text.removeListeners(@form) - - addEventListeners: -> - @textarea.on 'focus', -> - $(@).closest('.md-area').addClass 'is-focused' - - @textarea.on 'blur', -> - $(@).closest('.md-area').removeClass 'is-focused' diff --git a/app/assets/javascripts/graphs/graphs_bundle.js b/app/assets/javascripts/graphs/graphs_bundle.js new file mode 100644 index 00000000000..b95faadc8e7 --- /dev/null +++ b/app/assets/javascripts/graphs/graphs_bundle.js @@ -0,0 +1,7 @@ + +/*= require_tree . */ + +(function() { + + +}).call(this); diff --git a/app/assets/javascripts/graphs/graphs_bundle.js.coffee b/app/assets/javascripts/graphs/graphs_bundle.js.coffee deleted file mode 100644 index e0f681acf0b..00000000000 --- a/app/assets/javascripts/graphs/graphs_bundle.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -# This is a manifest file that'll be compiled into including all the files listed below. -# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -# be included in the compiled file accessible from http://example.com/assets/application.js -# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -# the compiled file. -# -#= require_tree . diff --git a/app/assets/javascripts/graphs/stat_graph.js b/app/assets/javascripts/graphs/stat_graph.js new file mode 100644 index 00000000000..f041980bc19 --- /dev/null +++ b/app/assets/javascripts/graphs/stat_graph.js @@ -0,0 +1,19 @@ +(function() { + this.StatGraph = (function() { + function StatGraph() {} + + StatGraph.log = {}; + + StatGraph.get_log = function() { + return this.log; + }; + + StatGraph.set_log = function(data) { + return this.log = data; + }; + + return StatGraph; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/graphs/stat_graph.js.coffee b/app/assets/javascripts/graphs/stat_graph.js.coffee deleted file mode 100644 index f36c71fd25e..00000000000 --- a/app/assets/javascripts/graphs/stat_graph.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -class @StatGraph - @log: {} - @get_log: -> - @log - @set_log: (data) -> - @log = data diff --git a/app/assets/javascripts/graphs/stat_graph_contributors.js b/app/assets/javascripts/graphs/stat_graph_contributors.js new file mode 100644 index 00000000000..927d241b357 --- /dev/null +++ b/app/assets/javascripts/graphs/stat_graph_contributors.js @@ -0,0 +1,112 @@ + +/*= require d3 */ + +(function() { + this.ContributorsStatGraph = (function() { + function ContributorsStatGraph() {} + + ContributorsStatGraph.prototype.init = function(log) { + var author_commits, total_commits; + this.parsed_log = ContributorsStatGraphUtil.parse_log(log); + this.set_current_field("commits"); + total_commits = ContributorsStatGraphUtil.get_total_data(this.parsed_log, this.field); + author_commits = ContributorsStatGraphUtil.get_author_data(this.parsed_log, this.field); + this.add_master_graph(total_commits); + this.add_authors_graph(author_commits); + return this.change_date_header(); + }; + + ContributorsStatGraph.prototype.add_master_graph = function(total_data) { + this.master_graph = new ContributorsMasterGraph(total_data); + return this.master_graph.draw(); + }; + + ContributorsStatGraph.prototype.add_authors_graph = function(author_data) { + var limited_author_data; + this.authors = []; + limited_author_data = author_data.slice(0, 100); + return _.each(limited_author_data, (function(_this) { + return function(d) { + var author_graph, author_header; + author_header = _this.create_author_header(d); + $(".contributors-list").append(author_header); + _this.authors[d.author_name] = author_graph = new ContributorsAuthorGraph(d.dates); + return author_graph.draw(); + }; + })(this)); + }; + + ContributorsStatGraph.prototype.format_author_commit_info = function(author) { + var commits; + commits = $('', { + "class": 'graph-author-commits-count' + }); + commits.text(author.commits + " commits"); + return $('').append(commits); + }; + + ContributorsStatGraph.prototype.create_author_header = function(author) { + var author_commit_info, author_commit_info_span, author_email, author_name, list_item; + list_item = $('
              • ', { + "class": 'person', + style: 'display: block;' + }); + author_name = $('

                ' + author.author_name + '

                '); + author_email = $('

                ' + author.author_email + '

                '); + author_commit_info_span = $('', { + "class": 'commits' + }); + author_commit_info = this.format_author_commit_info(author); + author_commit_info_span.html(author_commit_info); + list_item.append(author_name); + list_item.append(author_email); + list_item.append(author_commit_info_span); + return list_item; + }; + + ContributorsStatGraph.prototype.redraw_master = function() { + var total_data; + total_data = ContributorsStatGraphUtil.get_total_data(this.parsed_log, this.field); + this.master_graph.set_data(total_data); + return this.master_graph.redraw(); + }; + + ContributorsStatGraph.prototype.redraw_authors = function() { + var author_commits, x_domain; + $("ol").html(""); + x_domain = ContributorsGraph.prototype.x_domain; + author_commits = ContributorsStatGraphUtil.get_author_data(this.parsed_log, this.field, x_domain); + return _.each(author_commits, (function(_this) { + return function(d) { + _this.redraw_author_commit_info(d); + $(_this.authors[d.author_name].list_item).appendTo("ol"); + _this.authors[d.author_name].set_data(d.dates); + return _this.authors[d.author_name].redraw(); + }; + })(this)); + }; + + ContributorsStatGraph.prototype.set_current_field = function(field) { + return this.field = field; + }; + + ContributorsStatGraph.prototype.change_date_header = function() { + var print, print_date_format, x_domain; + x_domain = ContributorsGraph.prototype.x_domain; + print_date_format = d3.time.format("%B %e %Y"); + print = print_date_format(x_domain[0]) + " - " + print_date_format(x_domain[1]); + return $("#date_header").text(print); + }; + + ContributorsStatGraph.prototype.redraw_author_commit_info = function(author) { + var author_commit_info, author_list_item; + author_list_item = $(this.authors[author.author_name].list_item); + author_commit_info = this.format_author_commit_info(author); + return author_list_item.find("span").html(author_commit_info); + }; + + return ContributorsStatGraph; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/graphs/stat_graph_contributors.js.coffee b/app/assets/javascripts/graphs/stat_graph_contributors.js.coffee deleted file mode 100644 index 1d9fae7cf79..00000000000 --- a/app/assets/javascripts/graphs/stat_graph_contributors.js.coffee +++ /dev/null @@ -1,71 +0,0 @@ -#= require d3 - -class @ContributorsStatGraph - init: (log) -> - @parsed_log = ContributorsStatGraphUtil.parse_log(log) - @set_current_field("commits") - total_commits = ContributorsStatGraphUtil.get_total_data(@parsed_log, @field) - author_commits = ContributorsStatGraphUtil.get_author_data(@parsed_log, @field) - @add_master_graph(total_commits) - @add_authors_graph(author_commits) - @change_date_header() - add_master_graph: (total_data) -> - @master_graph = new ContributorsMasterGraph(total_data) - @master_graph.draw() - add_authors_graph: (author_data) -> - @authors = [] - limited_author_data = author_data.slice(0, 100) - _.each(limited_author_data, (d) => - author_header = @create_author_header(d) - $(".contributors-list").append(author_header) - @authors[d.author_name] = author_graph = new ContributorsAuthorGraph(d.dates) - author_graph.draw() - ) - format_author_commit_info: (author) -> - commits = $('', { - class: 'graph-author-commits-count' - }) - commits.text(author.commits + " commits") - $('').append(commits) - - create_author_header: (author) -> - list_item = $('
              • ', { - class: 'person' - style: 'display: block;' - }) - author_name = $('

                ' + author.author_name + '

                ') - author_email = $('

                ' + author.author_email + '

                ') - author_commit_info_span = $('', { - class: 'commits' - }) - author_commit_info = @format_author_commit_info(author) - author_commit_info_span.html(author_commit_info) - list_item.append(author_name) - list_item.append(author_email) - list_item.append(author_commit_info_span) - list_item - redraw_master: -> - total_data = ContributorsStatGraphUtil.get_total_data(@parsed_log, @field) - @master_graph.set_data(total_data) - @master_graph.redraw() - redraw_authors: -> - $("ol").html("") - x_domain = ContributorsGraph.prototype.x_domain - author_commits = ContributorsStatGraphUtil.get_author_data(@parsed_log, @field, x_domain) - _.each(author_commits, (d) => - @redraw_author_commit_info(d) - $(@authors[d.author_name].list_item).appendTo("ol") - @authors[d.author_name].set_data(d.dates) - @authors[d.author_name].redraw() - ) - set_current_field: (field) -> - @field = field - change_date_header: -> - x_domain = ContributorsGraph.prototype.x_domain - print_date_format = d3.time.format("%B %e %Y") - print = print_date_format(x_domain[0]) + " - " + print_date_format(x_domain[1]) - $("#date_header").text(print) - redraw_author_commit_info: (author) -> - author_list_item = $(@authors[author.author_name].list_item) - author_commit_info = @format_author_commit_info(author) - author_list_item.find("span").html(author_commit_info) diff --git a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js new file mode 100644 index 00000000000..a646ca1d84f --- /dev/null +++ b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js @@ -0,0 +1,279 @@ + +/*= require d3 */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.ContributorsGraph = (function() { + function ContributorsGraph() {} + + ContributorsGraph.prototype.MARGIN = { + top: 20, + right: 20, + bottom: 30, + left: 50 + }; + + ContributorsGraph.prototype.x_domain = null; + + ContributorsGraph.prototype.y_domain = null; + + ContributorsGraph.prototype.dates = []; + + ContributorsGraph.set_x_domain = function(data) { + return ContributorsGraph.prototype.x_domain = data; + }; + + ContributorsGraph.set_y_domain = function(data) { + return ContributorsGraph.prototype.y_domain = [ + 0, d3.max(data, function(d) { + var ref, ref1; + return d.commits = (ref = (ref1 = d.commits) != null ? ref1 : d.additions) != null ? ref : d.deletions; + }) + ]; + }; + + ContributorsGraph.init_x_domain = function(data) { + return ContributorsGraph.prototype.x_domain = d3.extent(data, function(d) { + return d.date; + }); + }; + + ContributorsGraph.init_y_domain = function(data) { + return ContributorsGraph.prototype.y_domain = [ + 0, d3.max(data, function(d) { + var ref, ref1; + return d.commits = (ref = (ref1 = d.commits) != null ? ref1 : d.additions) != null ? ref : d.deletions; + }) + ]; + }; + + ContributorsGraph.init_domain = function(data) { + ContributorsGraph.init_x_domain(data); + return ContributorsGraph.init_y_domain(data); + }; + + ContributorsGraph.set_dates = function(data) { + return ContributorsGraph.prototype.dates = data; + }; + + ContributorsGraph.prototype.set_x_domain = function() { + return this.x.domain(this.x_domain); + }; + + ContributorsGraph.prototype.set_y_domain = function() { + return this.y.domain(this.y_domain); + }; + + ContributorsGraph.prototype.set_domain = function() { + this.set_x_domain(); + return this.set_y_domain(); + }; + + ContributorsGraph.prototype.create_scale = function(width, height) { + this.x = d3.time.scale().range([0, width]).clamp(true); + return this.y = d3.scale.linear().range([height, 0]).nice(); + }; + + ContributorsGraph.prototype.draw_x_axis = function() { + return this.svg.append("g").attr("class", "x axis").attr("transform", "translate(0, " + this.height + ")").call(this.x_axis); + }; + + ContributorsGraph.prototype.draw_y_axis = function() { + return this.svg.append("g").attr("class", "y axis").call(this.y_axis); + }; + + ContributorsGraph.prototype.set_data = function(data) { + return this.data = data; + }; + + return ContributorsGraph; + + })(); + + this.ContributorsMasterGraph = (function(superClass) { + extend(ContributorsMasterGraph, superClass); + + function ContributorsMasterGraph(data1) { + this.data = data1; + this.update_content = bind(this.update_content, this); + this.width = $('.content').width() - 70; + this.height = 200; + this.x = null; + this.y = null; + this.x_axis = null; + this.y_axis = null; + this.area = null; + this.svg = null; + this.brush = null; + this.x_max_domain = null; + } + + ContributorsMasterGraph.prototype.process_dates = function(data) { + var dates; + dates = this.get_dates(data); + this.parse_dates(data); + return ContributorsGraph.set_dates(dates); + }; + + ContributorsMasterGraph.prototype.get_dates = function(data) { + return _.pluck(data, 'date'); + }; + + ContributorsMasterGraph.prototype.parse_dates = function(data) { + var parseDate; + parseDate = d3.time.format("%Y-%m-%d").parse; + return data.forEach(function(d) { + return d.date = parseDate(d.date); + }); + }; + + ContributorsMasterGraph.prototype.create_scale = function() { + return ContributorsMasterGraph.__super__.create_scale.call(this, this.width, this.height); + }; + + ContributorsMasterGraph.prototype.create_axes = function() { + this.x_axis = d3.svg.axis().scale(this.x).orient("bottom"); + return this.y_axis = d3.svg.axis().scale(this.y).orient("left").ticks(5); + }; + + ContributorsMasterGraph.prototype.create_svg = function() { + return this.svg = d3.select("#contributors-master").append("svg").attr("width", this.width + this.MARGIN.left + this.MARGIN.right).attr("height", this.height + this.MARGIN.top + this.MARGIN.bottom).attr("class", "tint-box").append("g").attr("transform", "translate(" + this.MARGIN.left + "," + this.MARGIN.top + ")"); + }; + + ContributorsMasterGraph.prototype.create_area = function(x, y) { + return this.area = d3.svg.area().x(function(d) { + return x(d.date); + }).y0(this.height).y1(function(d) { + var ref, ref1, xa; + xa = d.commits = (ref = (ref1 = d.commits) != null ? ref1 : d.additions) != null ? ref : d.deletions; + return y(xa); + }).interpolate("basis"); + }; + + ContributorsMasterGraph.prototype.create_brush = function() { + return this.brush = d3.svg.brush().x(this.x).on("brushend", this.update_content); + }; + + ContributorsMasterGraph.prototype.draw_path = function(data) { + return this.svg.append("path").datum(data).attr("class", "area").attr("d", this.area); + }; + + ContributorsMasterGraph.prototype.add_brush = function() { + return this.svg.append("g").attr("class", "selection").call(this.brush).selectAll("rect").attr("height", this.height); + }; + + ContributorsMasterGraph.prototype.update_content = function() { + ContributorsGraph.set_x_domain(this.brush.empty() ? this.x_max_domain : this.brush.extent()); + return $("#brush_change").trigger('change'); + }; + + ContributorsMasterGraph.prototype.draw = function() { + this.process_dates(this.data); + this.create_scale(); + this.create_axes(); + ContributorsGraph.init_domain(this.data); + this.x_max_domain = this.x_domain; + this.set_domain(); + this.create_area(this.x, this.y); + this.create_svg(); + this.create_brush(); + this.draw_path(this.data); + this.draw_x_axis(); + this.draw_y_axis(); + return this.add_brush(); + }; + + ContributorsMasterGraph.prototype.redraw = function() { + this.process_dates(this.data); + ContributorsGraph.set_y_domain(this.data); + this.set_y_domain(); + this.svg.select("path").datum(this.data); + this.svg.select("path").attr("d", this.area); + return this.svg.select(".y.axis").call(this.y_axis); + }; + + return ContributorsMasterGraph; + + })(ContributorsGraph); + + this.ContributorsAuthorGraph = (function(superClass) { + extend(ContributorsAuthorGraph, superClass); + + function ContributorsAuthorGraph(data1) { + this.data = data1; + if ($(window).width() < 768) { + this.width = $('.content').width() - 80; + } else { + this.width = ($('.content').width() / 2) - 100; + } + this.height = 200; + this.x = null; + this.y = null; + this.x_axis = null; + this.y_axis = null; + this.area = null; + this.svg = null; + this.list_item = null; + } + + ContributorsAuthorGraph.prototype.create_scale = function() { + return ContributorsAuthorGraph.__super__.create_scale.call(this, this.width, this.height); + }; + + ContributorsAuthorGraph.prototype.create_axes = function() { + this.x_axis = d3.svg.axis().scale(this.x).orient("bottom").ticks(8); + return this.y_axis = d3.svg.axis().scale(this.y).orient("left").ticks(5); + }; + + ContributorsAuthorGraph.prototype.create_area = function(x, y) { + return this.area = d3.svg.area().x(function(d) { + var parseDate; + parseDate = d3.time.format("%Y-%m-%d").parse; + return x(parseDate(d)); + }).y0(this.height).y1((function(_this) { + return function(d) { + if (_this.data[d] != null) { + return y(_this.data[d]); + } else { + return y(0); + } + }; + })(this)).interpolate("basis"); + }; + + ContributorsAuthorGraph.prototype.create_svg = function() { + this.list_item = d3.selectAll(".person")[0].pop(); + return this.svg = d3.select(this.list_item).append("svg").attr("width", this.width + this.MARGIN.left + this.MARGIN.right).attr("height", this.height + this.MARGIN.top + this.MARGIN.bottom).attr("class", "spark").append("g").attr("transform", "translate(" + this.MARGIN.left + "," + this.MARGIN.top + ")"); + }; + + ContributorsAuthorGraph.prototype.draw_path = function(data) { + return this.svg.append("path").datum(data).attr("class", "area-contributor").attr("d", this.area); + }; + + ContributorsAuthorGraph.prototype.draw = function() { + this.create_scale(); + this.create_axes(); + this.set_domain(); + this.create_area(this.x, this.y); + this.create_svg(); + this.draw_path(this.dates); + this.draw_x_axis(); + return this.draw_y_axis(); + }; + + ContributorsAuthorGraph.prototype.redraw = function() { + this.set_domain(); + this.svg.select("path").datum(this.dates); + this.svg.select("path").attr("d", this.area); + this.svg.select(".x.axis").call(this.x_axis); + return this.svg.select(".y.axis").call(this.y_axis); + }; + + return ContributorsAuthorGraph; + + })(ContributorsGraph); + +}).call(this); diff --git a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee b/app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee deleted file mode 100644 index 834a81af459..00000000000 --- a/app/assets/javascripts/graphs/stat_graph_contributors_graph.js.coffee +++ /dev/null @@ -1,173 +0,0 @@ -#= require d3 - -class @ContributorsGraph - MARGIN: - top: 20 - right: 20 - bottom: 30 - left: 50 - x_domain: null - y_domain: null - dates: [] - @set_x_domain: (data) => - @prototype.x_domain = data - @set_y_domain: (data) => - @prototype.y_domain = [0, d3.max(data, (d) -> - d.commits = d.commits ? d.additions ? d.deletions - )] - @init_x_domain: (data) => - @prototype.x_domain = d3.extent(data, (d) -> - d.date - ) - @init_y_domain: (data) => - @prototype.y_domain = [0, d3.max(data, (d) -> - d.commits = d.commits ? d.additions ? d.deletions - )] - @init_domain: (data) => - @init_x_domain(data) - @init_y_domain(data) - @set_dates: (data) => - @prototype.dates = data - set_x_domain: -> - @x.domain(@x_domain) - set_y_domain: -> - @y.domain(@y_domain) - set_domain: -> - @set_x_domain() - @set_y_domain() - create_scale: (width, height) -> - @x = d3.time.scale().range([0, width]).clamp(true) - @y = d3.scale.linear().range([height, 0]).nice() - draw_x_axis: -> - @svg.append("g").attr("class", "x axis").attr("transform", "translate(0, #{@height})") - .call(@x_axis) - draw_y_axis: -> - @svg.append("g").attr("class", "y axis").call(@y_axis) - set_data: (data) -> - @data = data - -class @ContributorsMasterGraph extends ContributorsGraph - constructor: (@data) -> - @width = $('.content').width() - 70 - @height = 200 - @x = null - @y = null - @x_axis = null - @y_axis = null - @area = null - @svg = null - @brush = null - @x_max_domain = null - process_dates: (data) -> - dates = @get_dates(data) - @parse_dates(data) - ContributorsGraph.set_dates(dates) - get_dates: (data) -> - _.pluck(data, 'date') - parse_dates: (data) -> - parseDate = d3.time.format("%Y-%m-%d").parse - data.forEach((d) -> - d.date = parseDate(d.date) - ) - create_scale: -> - super @width, @height - create_axes: -> - @x_axis = d3.svg.axis().scale(@x).orient("bottom") - @y_axis = d3.svg.axis().scale(@y).orient("left").ticks(5) - create_svg: -> - @svg = d3.select("#contributors-master").append("svg") - .attr("width", @width + @MARGIN.left + @MARGIN.right) - .attr("height", @height + @MARGIN.top + @MARGIN.bottom) - .attr("class", "tint-box") - .append("g") - .attr("transform", "translate(" + @MARGIN.left + "," + @MARGIN.top + ")") - create_area: (x, y) -> - @area = d3.svg.area().x((d) -> - x(d.date) - ).y0(@height).y1((d) -> - xa = d.commits = d.commits ? d.additions ? d.deletions - y(xa) - ).interpolate("basis") - create_brush: -> - @brush = d3.svg.brush().x(@x).on("brushend", @update_content) - draw_path: (data) -> - @svg.append("path").datum(data).attr("class", "area").attr("d", @area) - add_brush: -> - @svg.append("g").attr("class", "selection").call(@brush).selectAll("rect").attr("height", @height) - update_content: => - ContributorsGraph.set_x_domain(if @brush.empty() then @x_max_domain else @brush.extent()) - $("#brush_change").trigger('change') - draw: -> - @process_dates(@data) - @create_scale() - @create_axes() - ContributorsGraph.init_domain(@data) - @x_max_domain = @x_domain - @set_domain() - @create_area(@x, @y) - @create_svg() - @create_brush() - @draw_path(@data) - @draw_x_axis() - @draw_y_axis() - @add_brush() - redraw: -> - @process_dates(@data) - ContributorsGraph.set_y_domain(@data) - @set_y_domain() - @svg.select("path").datum(@data) - @svg.select("path").attr("d", @area) - @svg.select(".y.axis").call(@y_axis) - -class @ContributorsAuthorGraph extends ContributorsGraph - constructor: (@data) -> - # Don't split graph size in half for mobile devices. - if $(window).width() < 768 - @width = $('.content').width() - 80 - else - @width = ($('.content').width() / 2) - 100 - @height = 200 - @x = null - @y = null - @x_axis = null - @y_axis = null - @area = null - @svg = null - @list_item = null - create_scale: -> - super @width, @height - create_axes: -> - @x_axis = d3.svg.axis().scale(@x).orient("bottom").ticks(8) - @y_axis = d3.svg.axis().scale(@y).orient("left").ticks(5) - create_area: (x, y) -> - @area = d3.svg.area().x((d) -> - parseDate = d3.time.format("%Y-%m-%d").parse - x(parseDate(d)) - ).y0(@height).y1((d) => - if @data[d]? then y(@data[d]) else y(0) - ).interpolate("basis") - create_svg: -> - @list_item = d3.selectAll(".person")[0].pop() - @svg = d3.select(@list_item).append("svg") - .attr("width", @width + @MARGIN.left + @MARGIN.right) - .attr("height", @height + @MARGIN.top + @MARGIN.bottom) - .attr("class", "spark") - .append("g") - .attr("transform", "translate(" + @MARGIN.left + "," + @MARGIN.top + ")") - draw_path: (data) -> - @svg.append("path").datum(data).attr("class", "area-contributor").attr("d", @area) - draw: -> - @create_scale() - @create_axes() - @set_domain() - @create_area(@x, @y) - @create_svg() - @draw_path(@dates) - @draw_x_axis() - @draw_y_axis() - redraw: -> - @set_domain() - @svg.select("path").datum(@dates) - @svg.select("path").attr("d", @area) - @svg.select(".x.axis").call(@x_axis) - @svg.select(".y.axis").call(@y_axis) diff --git a/app/assets/javascripts/graphs/stat_graph_contributors_util.js b/app/assets/javascripts/graphs/stat_graph_contributors_util.js new file mode 100644 index 00000000000..0d240bed8b6 --- /dev/null +++ b/app/assets/javascripts/graphs/stat_graph_contributors_util.js @@ -0,0 +1,135 @@ +(function() { + window.ContributorsStatGraphUtil = { + parse_log: function(log) { + var by_author, by_email, data, entry, i, len, total; + total = {}; + by_author = {}; + by_email = {}; + for (i = 0, len = log.length; i < len; i++) { + entry = log[i]; + if (total[entry.date] == null) { + this.add_date(entry.date, total); + } + data = by_author[entry.author_name] || by_email[entry.author_email]; + if (data == null) { + data = this.add_author(entry, by_author, by_email); + } + if (!data[entry.date]) { + this.add_date(entry.date, data); + } + this.store_data(entry, total[entry.date], data[entry.date]); + } + total = _.toArray(total); + by_author = _.toArray(by_author); + return { + total: total, + by_author: by_author + }; + }, + add_date: function(date, collection) { + collection[date] = {}; + return collection[date].date = date; + }, + add_author: function(author, by_author, by_email) { + var data; + data = {}; + data.author_name = author.author_name; + data.author_email = author.author_email; + by_author[author.author_name] = data; + return by_email[author.author_email] = data; + }, + store_data: function(entry, total, by_author) { + this.store_commits(total, by_author); + this.store_additions(entry, total, by_author); + return this.store_deletions(entry, total, by_author); + }, + store_commits: function(total, by_author) { + this.add(total, "commits", 1); + return this.add(by_author, "commits", 1); + }, + add: function(collection, field, value) { + if (collection[field] == null) { + collection[field] = 0; + } + return collection[field] += value; + }, + store_additions: function(entry, total, by_author) { + if (entry.additions == null) { + entry.additions = 0; + } + this.add(total, "additions", entry.additions); + return this.add(by_author, "additions", entry.additions); + }, + store_deletions: function(entry, total, by_author) { + if (entry.deletions == null) { + entry.deletions = 0; + } + this.add(total, "deletions", entry.deletions); + return this.add(by_author, "deletions", entry.deletions); + }, + get_total_data: function(parsed_log, field) { + var log, total_data; + log = parsed_log.total; + total_data = this.pick_field(log, field); + return _.sortBy(total_data, function(d) { + return d.date; + }); + }, + pick_field: function(log, field) { + var total_data; + total_data = []; + _.each(log, function(d) { + return total_data.push(_.pick(d, [field, 'date'])); + }); + return total_data; + }, + get_author_data: function(parsed_log, field, date_range) { + var author_data, log; + if (date_range == null) { + date_range = null; + } + log = parsed_log.by_author; + author_data = []; + _.each(log, (function(_this) { + return function(log_entry) { + var parsed_log_entry; + parsed_log_entry = _this.parse_log_entry(log_entry, field, date_range); + if (!_.isEmpty(parsed_log_entry.dates)) { + return author_data.push(parsed_log_entry); + } + }; + })(this)); + return _.sortBy(author_data, function(d) { + return d[field]; + }).reverse(); + }, + parse_log_entry: function(log_entry, field, date_range) { + var parsed_entry; + parsed_entry = {}; + parsed_entry.author_name = log_entry.author_name; + parsed_entry.author_email = log_entry.author_email; + parsed_entry.dates = {}; + parsed_entry.commits = parsed_entry.additions = parsed_entry.deletions = 0; + _.each(_.omit(log_entry, 'author_name', 'author_email'), (function(_this) { + return function(value, key) { + if (_this.in_range(value.date, date_range)) { + parsed_entry.dates[value.date] = value[field]; + parsed_entry.commits += value.commits; + parsed_entry.additions += value.additions; + return parsed_entry.deletions += value.deletions; + } + }; + })(this)); + return parsed_entry; + }, + in_range: function(date, date_range) { + var ref; + if (date_range === null || (date_range[0] <= (ref = new Date(date)) && ref <= date_range[1])) { + return true; + } else { + return false; + } + } + }; + +}).call(this); diff --git a/app/assets/javascripts/graphs/stat_graph_contributors_util.js.coffee b/app/assets/javascripts/graphs/stat_graph_contributors_util.js.coffee deleted file mode 100644 index 31617c88b4a..00000000000 --- a/app/assets/javascripts/graphs/stat_graph_contributors_util.js.coffee +++ /dev/null @@ -1,98 +0,0 @@ -window.ContributorsStatGraphUtil = - parse_log: (log) -> - total = {} - by_author = {} - by_email = {} - for entry in log - @add_date(entry.date, total) unless total[entry.date]? - - data = by_author[entry.author_name] || by_email[entry.author_email] - data ?= @add_author(entry, by_author, by_email) - - @add_date(entry.date, data) unless data[entry.date] - @store_data(entry, total[entry.date], data[entry.date]) - total = _.toArray(total) - by_author = _.toArray(by_author) - total: total, by_author: by_author - - add_date: (date, collection) -> - collection[date] = {} - collection[date].date = date - - add_author: (author, by_author, by_email) -> - data = {} - data.author_name = author.author_name - data.author_email = author.author_email - by_author[author.author_name] = data - by_email[author.author_email] = data - - store_data: (entry, total, by_author) -> - @store_commits(total, by_author) - @store_additions(entry, total, by_author) - @store_deletions(entry, total, by_author) - - store_commits: (total, by_author) -> - @add(total, "commits", 1) - @add(by_author, "commits", 1) - - add: (collection, field, value) -> - collection[field] ?= 0 - collection[field] += value - - store_additions: (entry, total, by_author) -> - entry.additions ?= 0 - @add(total, "additions", entry.additions) - @add(by_author, "additions", entry.additions) - - store_deletions: (entry, total, by_author) -> - entry.deletions ?= 0 - @add(total, "deletions", entry.deletions) - @add(by_author, "deletions", entry.deletions) - - get_total_data: (parsed_log, field) -> - log = parsed_log.total - total_data = @pick_field(log, field) - _.sortBy(total_data, (d) -> - d.date - ) - pick_field: (log, field) -> - total_data = [] - _.each(log, (d) -> - total_data.push(_.pick(d, [field, 'date'])) - ) - total_data - - get_author_data: (parsed_log, field, date_range = null) -> - log = parsed_log.by_author - author_data = [] - - _.each(log, (log_entry) => - parsed_log_entry = @parse_log_entry(log_entry, field, date_range) - if not _.isEmpty(parsed_log_entry.dates) - author_data.push(parsed_log_entry) - ) - - _.sortBy(author_data, (d) -> - d[field] - ).reverse() - - parse_log_entry: (log_entry, field, date_range) -> - parsed_entry = {} - parsed_entry.author_name = log_entry.author_name - parsed_entry.author_email = log_entry.author_email - parsed_entry.dates = {} - parsed_entry.commits = parsed_entry.additions = parsed_entry.deletions = 0 - _.each(_.omit(log_entry, 'author_name', 'author_email'), (value, key) => - if @in_range(value.date, date_range) - parsed_entry.dates[value.date] = value[field] - parsed_entry.commits += value.commits - parsed_entry.additions += value.additions - parsed_entry.deletions += value.deletions - ) - return parsed_entry - - in_range: (date, date_range) -> - if date_range is null || date_range[0] <= new Date(date) <= date_range[1] - true - else - false diff --git a/app/assets/javascripts/group_avatar.js b/app/assets/javascripts/group_avatar.js new file mode 100644 index 00000000000..c28ce86d7af --- /dev/null +++ b/app/assets/javascripts/group_avatar.js @@ -0,0 +1,21 @@ +(function() { + this.GroupAvatar = (function() { + function GroupAvatar() { + $('.js-choose-group-avatar-button').bind("click", function() { + var form; + form = $(this).closest("form"); + return form.find(".js-group-avatar-input").click(); + }); + $('.js-group-avatar-input').bind("change", function() { + var filename, form; + form = $(this).closest("form"); + filename = $(this).val().replace(/^.*[\\\/]/, ''); + return form.find(".js-avatar-filename").text(filename); + }); + } + + return GroupAvatar; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/group_avatar.js.coffee b/app/assets/javascripts/group_avatar.js.coffee deleted file mode 100644 index 0825fd3ce52..00000000000 --- a/app/assets/javascripts/group_avatar.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -class @GroupAvatar - constructor: -> - $('.js-choose-group-avatar-button').bind "click", -> - form = $(this).closest("form") - form.find(".js-group-avatar-input").click() - $('.js-group-avatar-input').bind "change", -> - form = $(this).closest("form") - filename = $(this).val().replace(/^.*[\\\/]/, '') - form.find(".js-avatar-filename").text(filename) diff --git a/app/assets/javascripts/groups.js b/app/assets/javascripts/groups.js new file mode 100644 index 00000000000..4382dd6860f --- /dev/null +++ b/app/assets/javascripts/groups.js @@ -0,0 +1,13 @@ +(function() { + this.GroupMembers = (function() { + function GroupMembers() { + $('li.group_member').bind('ajax:success', function() { + return $(this).fadeOut(); + }); + } + + return GroupMembers; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/groups.js.coffee b/app/assets/javascripts/groups.js.coffee deleted file mode 100644 index cc905e91ea2..00000000000 --- a/app/assets/javascripts/groups.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -class @GroupMembers - constructor: -> - $('li.group_member').bind 'ajax:success', -> - $(this).fadeOut() diff --git a/app/assets/javascripts/groups_select.js b/app/assets/javascripts/groups_select.js new file mode 100644 index 00000000000..fd5b6dc0ddd --- /dev/null +++ b/app/assets/javascripts/groups_select.js @@ -0,0 +1,67 @@ +(function() { + var slice = [].slice; + + this.GroupsSelect = (function() { + function GroupsSelect() { + $('.ajax-groups-select').each((function(_this) { + return function(i, select) { + var skip_ldap; + skip_ldap = $(select).hasClass('skip_ldap'); + return $(select).select2({ + placeholder: "Search for a group", + multiple: $(select).hasClass('multiselect'), + minimumInputLength: 0, + query: function(query) { + return Api.groups(query.term, skip_ldap, function(groups) { + var data; + data = { + results: groups + }; + return query.callback(data); + }); + }, + initSelection: function(element, callback) { + var id; + id = $(element).val(); + if (id !== "") { + return Api.group(id, callback); + } + }, + formatResult: function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return _this.formatResult.apply(_this, args); + }, + formatSelection: function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return _this.formatSelection.apply(_this, args); + }, + dropdownCssClass: "ajax-groups-dropdown", + escapeMarkup: function(m) { + return m; + } + }); + }; + })(this)); + } + + GroupsSelect.prototype.formatResult = function(group) { + var avatar; + if (group.avatar_url) { + avatar = group.avatar_url; + } else { + avatar = gon.default_avatar_url; + } + return "
                " + group.name + "
                " + group.path + "
                "; + }; + + GroupsSelect.prototype.formatSelection = function(group) { + return group.name; + }; + + return GroupsSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/groups_select.js.coffee b/app/assets/javascripts/groups_select.js.coffee deleted file mode 100644 index 1084e2a17d1..00000000000 --- a/app/assets/javascripts/groups_select.js.coffee +++ /dev/null @@ -1,41 +0,0 @@ -class @GroupsSelect - constructor: -> - $('.ajax-groups-select').each (i, select) => - skip_ldap = $(select).hasClass('skip_ldap') - - $(select).select2 - placeholder: "Search for a group" - multiple: $(select).hasClass('multiselect') - minimumInputLength: 0 - query: (query) -> - Api.groups query.term, skip_ldap, (groups) -> - data = { results: groups } - query.callback(data) - - initSelection: (element, callback) -> - id = $(element).val() - if id isnt "" - Api.group(id, callback) - - - formatResult: (args...) => - @formatResult(args...) - formatSelection: (args...) => - @formatSelection(args...) - dropdownCssClass: "ajax-groups-dropdown" - escapeMarkup: (m) -> # we do not want to escape markup since we are displaying html in results - m - - formatResult: (group) -> - if group.avatar_url - avatar = group.avatar_url - else - avatar = gon.default_avatar_url - - "
                -
                #{group.name}
                -
                #{group.path}
                -
                " - - formatSelection: (group) -> - group.name diff --git a/app/assets/javascripts/importer_status.js b/app/assets/javascripts/importer_status.js new file mode 100644 index 00000000000..55b6f132bab --- /dev/null +++ b/app/assets/javascripts/importer_status.js @@ -0,0 +1,69 @@ +(function() { + this.ImporterStatus = (function() { + function ImporterStatus(jobs_url, import_url) { + this.jobs_url = jobs_url; + this.import_url = import_url; + this.initStatusPage(); + this.setAutoUpdate(); + } + + ImporterStatus.prototype.initStatusPage = function() { + $('.js-add-to-import').off('click').on('click', (function(_this) { + return function(e) { + var $btn, $namespace_input, $target_field, $tr, id, new_namespace; + $btn = $(e.currentTarget); + $tr = $btn.closest('tr'); + $target_field = $tr.find('.import-target'); + $namespace_input = $target_field.find('input'); + id = $tr.attr('id').replace('repo_', ''); + new_namespace = null; + if ($namespace_input.length > 0) { + new_namespace = $namespace_input.prop('value'); + $target_field.empty().append(new_namespace + "/" + ($target_field.data('project_name'))); + } + $btn.disable().addClass('is-loading'); + return $.post(_this.import_url, { + repo_id: id, + new_namespace: new_namespace + }, { + dataType: 'script' + }); + }; + })(this)); + return $('.js-import-all').off('click').on('click', function(e) { + var $btn; + $btn = $(this); + $btn.disable().addClass('is-loading'); + return $('.js-add-to-import').each(function() { + return $(this).trigger('click'); + }); + }); + }; + + ImporterStatus.prototype.setAutoUpdate = function() { + return setInterval(((function(_this) { + return function() { + return $.get(_this.jobs_url, function(data) { + return $.each(data, function(i, job) { + var job_item, status_field; + job_item = $("#project_" + job.id); + status_field = job_item.find(".job-status"); + if (job.import_status === 'finished') { + job_item.removeClass("active").addClass("success"); + return status_field.html(' done'); + } else if (job.import_status === 'started') { + return status_field.html(" started"); + } else { + return status_field.html(job.import_status); + } + }); + }); + }; + })(this)), 4000); + }; + + return ImporterStatus; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/importer_status.js.coffee b/app/assets/javascripts/importer_status.js.coffee deleted file mode 100644 index eb046eb2eff..00000000000 --- a/app/assets/javascripts/importer_status.js.coffee +++ /dev/null @@ -1,53 +0,0 @@ -class @ImporterStatus - constructor: (@jobs_url, @import_url) -> - this.initStatusPage() - this.setAutoUpdate() - - initStatusPage: -> - $('.js-add-to-import') - .off 'click' - .on 'click', (e) => - $btn = $(e.currentTarget) - $tr = $btn.closest('tr') - $target_field = $tr.find('.import-target') - $namespace_input = $target_field.find('input') - id = $tr.attr('id').replace('repo_', '') - new_namespace = null - - if $namespace_input.length > 0 - new_namespace = $namespace_input.prop('value') - $target_field.empty().append("#{new_namespace}/#{$target_field.data('project_name')}") - - $btn - .disable() - .addClass 'is-loading' - - $.post @import_url, {repo_id: id, new_namespace: new_namespace}, dataType: 'script' - - $('.js-import-all') - .off 'click' - .on 'click', (e) -> - $btn = $(@) - $btn - .disable() - .addClass 'is-loading' - - $('.js-add-to-import').each -> - $(this).trigger('click') - - setAutoUpdate: -> - setInterval (=> - $.get @jobs_url, (data) => - $.each data, (i, job) => - job_item = $("#project_" + job.id) - status_field = job_item.find(".job-status") - - if job.import_status == 'finished' - job_item.removeClass("active").addClass("success") - status_field.html(' done') - else if job.import_status == 'started' - status_field.html(" started") - else - status_field.html(job.import_status) - - ), 4000 diff --git a/app/assets/javascripts/issuable.js b/app/assets/javascripts/issuable.js new file mode 100644 index 00000000000..f27f1bad1f7 --- /dev/null +++ b/app/assets/javascripts/issuable.js @@ -0,0 +1,89 @@ +(function() { + var issuable_created; + + issuable_created = false; + + this.Issuable = { + init: function() { + if (!issuable_created) { + issuable_created = true; + Issuable.initTemplates(); + Issuable.initSearch(); + Issuable.initChecks(); + return Issuable.initLabelFilterRemove(); + } + }, + initTemplates: function() { + return Issuable.labelRow = _.template('<% _.each(labels, function(label){ %> <%- label.title %> <% }); %>'); + }, + initSearch: function() { + this.timer = null; + return $('#issue_search').off('keyup').on('keyup', function() { + clearTimeout(this.timer); + return this.timer = setTimeout(function() { + var $form, $input, $search; + $search = $('#issue_search'); + $form = $('.js-filter-form'); + $input = $("input[name='" + ($search.attr('name')) + "']", $form); + if ($input.length === 0) { + $form.append(""); + } else { + $input.val($search.val()); + } + if ($search.val() !== '') { + return Issuable.filterResults($form); + } + }, 500); + }); + }, + initLabelFilterRemove: function() { + return $(document).off('click', '.js-label-filter-remove').on('click', '.js-label-filter-remove', function(e) { + var $button; + $button = $(this); + $('input[name="label_name[]"]').filter(function() { + return this.value === $button.data('label'); + }).remove(); + Issuable.filterResults($('.filter-form')); + return $('.js-label-select').trigger('update.label'); + }); + }, + filterResults: (function(_this) { + return function(form) { + var formAction, formData, issuesUrl; + formData = form.serialize(); + formAction = form.attr('action'); + issuesUrl = formAction; + issuesUrl += "" + (formAction.indexOf('?') < 0 ? '?' : '&'); + issuesUrl += formData; + return Turbolinks.visit(issuesUrl); + }; + })(this), + initChecks: function() { + this.issuableBulkActions = $('.bulk-update').data('bulkActions'); + $('.check_all_issues').off('click').on('click', function() { + $('.selected_issue').prop('checked', this.checked); + return Issuable.checkChanged(); + }); + return $('.selected_issue').off('change').on('change', Issuable.checkChanged.bind(this)); + }, + checkChanged: function() { + var checked_issues, ids; + checked_issues = $('.selected_issue:checked'); + if (checked_issues.length > 0) { + ids = $.map(checked_issues, function(value) { + return $(value).data('id'); + }); + $('#update_issues_ids').val(ids); + $('.issues-other-filters').hide(); + $('.issues_bulk_update').show(); + } else { + $('#update_issues_ids').val([]); + $('.issues_bulk_update').hide(); + $('.issues-other-filters').show(); + this.issuableBulkActions.willUpdateLabels = false; + } + return true; + } + }; + +}).call(this); diff --git a/app/assets/javascripts/issuable.js.coffee b/app/assets/javascripts/issuable.js.coffee deleted file mode 100644 index 7f795f8096b..00000000000 --- a/app/assets/javascripts/issuable.js.coffee +++ /dev/null @@ -1,93 +0,0 @@ -issuable_created = false -@Issuable = - init: -> - unless issuable_created - issuable_created = true - Issuable.initTemplates() - Issuable.initSearch() - Issuable.initChecks() - Issuable.initLabelFilterRemove() - - initTemplates: -> - Issuable.labelRow = _.template( - '<% _.each(labels, function(label){ %> - - - <%- label.title %> - - - - <% }); %>' - ) - - initSearch: -> - @timer = null - $('#issue_search') - .off 'keyup' - .on 'keyup', -> - clearTimeout(@timer) - @timer = setTimeout( -> - $search = $('#issue_search') - $form = $('.js-filter-form') - $input = $("input[name='#{$search.attr('name')}']", $form) - if $input.length is 0 - $form.append "" - else - $input.val $search.val() - Issuable.filterResults $form if $search.val() isnt '' - , 500) - - initLabelFilterRemove: -> - $(document) - .off 'click', '.js-label-filter-remove' - .on 'click', '.js-label-filter-remove', (e) -> - $button = $(@) - - # Remove the label input box - $('input[name="label_name[]"]') - .filter -> @value is $button.data('label') - .remove() - - # Submit the form to get new data - Issuable.filterResults $('.filter-form') - $('.js-label-select').trigger('update.label') - - filterResults: (form) => - formData = form.serialize() - - formAction = form.attr('action') - issuesUrl = formAction - issuesUrl += ("#{if formAction.indexOf('?') < 0 then '?' else '&'}") - issuesUrl += formData - - Turbolinks.visit(issuesUrl) - - initChecks: -> - @issuableBulkActions = $('.bulk-update').data('bulkActions') - - $('.check_all_issues').off('click').on('click', -> - $('.selected_issue').prop('checked', @checked) - Issuable.checkChanged() - ) - - $('.selected_issue').off('change').on('change', Issuable.checkChanged.bind(@)) - - - checkChanged: -> - checked_issues = $('.selected_issue:checked') - if checked_issues.length > 0 - ids = $.map checked_issues, (value) -> - $(value).data('id') - - $('#update_issues_ids').val ids - $('.issues-other-filters').hide() - $('.issues_bulk_update').show() - else - $('#update_issues_ids').val [] - $('.issues_bulk_update').hide() - $('.issues-other-filters').show() - @issuableBulkActions.willUpdateLabels = false - - return true diff --git a/app/assets/javascripts/issuable_context.js b/app/assets/javascripts/issuable_context.js new file mode 100644 index 00000000000..8147e83ffe8 --- /dev/null +++ b/app/assets/javascripts/issuable_context.js @@ -0,0 +1,69 @@ +(function() { + this.IssuableContext = (function() { + function IssuableContext(currentUser) { + this.initParticipants(); + new UsersSelect(currentUser); + $('select.select2').select2({ + width: 'resolve', + dropdownAutoWidth: true + }); + $(".issuable-sidebar .inline-update").on("change", "select", function() { + return $(this).submit(); + }); + $(".issuable-sidebar .inline-update").on("change", ".js-assignee", function() { + return $(this).submit(); + }); + $(document).off('click', '.issuable-sidebar .dropdown-content a').on('click', '.issuable-sidebar .dropdown-content a', function(e) { + return e.preventDefault(); + }); + $(document).off('click', '.edit-link').on('click', '.edit-link', function(e) { + var $block, $selectbox; + e.preventDefault(); + $block = $(this).parents('.block'); + $selectbox = $block.find('.selectbox'); + if ($selectbox.is(':visible')) { + $selectbox.hide(); + $block.find('.value').show(); + } else { + $selectbox.show(); + $block.find('.value').hide(); + } + if ($selectbox.is(':visible')) { + return setTimeout(function() { + return $block.find('.dropdown-menu-toggle').trigger('click'); + }, 0); + } + }); + $(".right-sidebar").niceScroll(); + } + + IssuableContext.prototype.initParticipants = function() { + var _this; + _this = this; + $(document).on("click", ".js-participants-more", this.toggleHiddenParticipants); + return $(".js-participants-author").each(function(i) { + if (i >= _this.PARTICIPANTS_ROW_COUNT) { + return $(this).addClass("js-participants-hidden").hide(); + } + }); + }; + + IssuableContext.prototype.toggleHiddenParticipants = function(e) { + var currentText, lessText, originalText; + e.preventDefault(); + currentText = $(this).text().trim(); + lessText = $(this).data("less-text"); + originalText = $(this).data("original-text"); + if (currentText === originalText) { + $(this).text(lessText); + } else { + $(this).text(originalText); + } + return $(".js-participants-hidden").toggle(); + }; + + return IssuableContext; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/issuable_context.js.coffee b/app/assets/javascripts/issuable_context.js.coffee deleted file mode 100644 index 3c491ebfc4c..00000000000 --- a/app/assets/javascripts/issuable_context.js.coffee +++ /dev/null @@ -1,60 +0,0 @@ -class @IssuableContext - constructor: (currentUser) -> - @initParticipants() - new UsersSelect(currentUser) - $('select.select2').select2({width: 'resolve', dropdownAutoWidth: true}) - - $(".issuable-sidebar .inline-update").on "change", "select", -> - $(this).submit() - $(".issuable-sidebar .inline-update").on "change", ".js-assignee", -> - $(this).submit() - - $(document) - .off 'click', '.issuable-sidebar .dropdown-content a' - .on 'click', '.issuable-sidebar .dropdown-content a', (e) -> - e.preventDefault() - - $(document) - .off 'click', '.edit-link' - .on 'click', '.edit-link', (e) -> - e.preventDefault() - - $block = $(@).parents('.block') - $selectbox = $block.find('.selectbox') - if $selectbox.is(':visible') - $selectbox.hide() - $block.find('.value').show() - else - $selectbox.show() - $block.find('.value').hide() - - if $selectbox.is(':visible') - setTimeout -> - $block.find('.dropdown-menu-toggle').trigger 'click' - , 0 - - $(".right-sidebar").niceScroll() - - initParticipants: -> - _this = @ - $(document).on "click", ".js-participants-more", @toggleHiddenParticipants - - $(".js-participants-author").each (i) -> - if i >= _this.PARTICIPANTS_ROW_COUNT - $(@) - .addClass "js-participants-hidden" - .hide() - - toggleHiddenParticipants: (e) -> - e.preventDefault() - - currentText = $(this).text().trim() - lessText = $(this).data("less-text") - originalText = $(this).data("original-text") - - if currentText is originalText - $(this).text(lessText) - else - $(this).text(originalText) - - $(".js-participants-hidden").toggle() diff --git a/app/assets/javascripts/issuable_form.js b/app/assets/javascripts/issuable_form.js new file mode 100644 index 00000000000..297d4f029f0 --- /dev/null +++ b/app/assets/javascripts/issuable_form.js @@ -0,0 +1,136 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.IssuableForm = (function() { + IssuableForm.prototype.issueMoveConfirmMsg = 'Are you sure you want to move this issue to another project?'; + + IssuableForm.prototype.wipRegex = /^\s*(\[WIP\]\s*|WIP:\s*|WIP\s+)+\s*/i; + + function IssuableForm(form) { + var $issuableDueDate; + this.form = form; + this.toggleWip = bind(this.toggleWip, this); + this.renderWipExplanation = bind(this.renderWipExplanation, this); + this.resetAutosave = bind(this.resetAutosave, this); + this.handleSubmit = bind(this.handleSubmit, this); + GitLab.GfmAutoComplete.setup(); + new UsersSelect(); + new ZenMode(); + this.titleField = this.form.find("input[name*='[title]']"); + this.descriptionField = this.form.find("textarea[name*='[description]']"); + this.issueMoveField = this.form.find("#move_to_project_id"); + if (!(this.titleField.length && this.descriptionField.length)) { + return; + } + this.initAutosave(); + this.form.on("submit", this.handleSubmit); + this.form.on("click", ".btn-cancel", this.resetAutosave); + this.initWip(); + this.initMoveDropdown(); + $issuableDueDate = $('#issuable-due-date'); + if ($issuableDueDate.length) { + $('.datepicker').datepicker({ + dateFormat: 'yy-mm-dd', + onSelect: function(dateText, inst) { + return $issuableDueDate.val(dateText); + } + }).datepicker('setDate', $.datepicker.parseDate('yy-mm-dd', $issuableDueDate.val())); + } + } + + IssuableForm.prototype.initAutosave = function() { + new Autosave(this.titleField, [document.location.pathname, document.location.search, "title"]); + return new Autosave(this.descriptionField, [document.location.pathname, document.location.search, "description"]); + }; + + IssuableForm.prototype.handleSubmit = function() { + var ref, ref1; + if (((ref = parseInt((ref1 = this.issueMoveField) != null ? ref1.val() : void 0)) != null ? ref : 0) > 0) { + if (!confirm(this.issueMoveConfirmMsg)) { + return false; + } + } + return this.resetAutosave(); + }; + + IssuableForm.prototype.resetAutosave = function() { + this.titleField.data("autosave").reset(); + return this.descriptionField.data("autosave").reset(); + }; + + IssuableForm.prototype.initWip = function() { + this.$wipExplanation = this.form.find(".js-wip-explanation"); + this.$noWipExplanation = this.form.find(".js-no-wip-explanation"); + if (!(this.$wipExplanation.length && this.$noWipExplanation.length)) { + return; + } + this.form.on("click", ".js-toggle-wip", this.toggleWip); + this.titleField.on("keyup blur", this.renderWipExplanation); + return this.renderWipExplanation(); + }; + + IssuableForm.prototype.workInProgress = function() { + return this.wipRegex.test(this.titleField.val()); + }; + + IssuableForm.prototype.renderWipExplanation = function() { + if (this.workInProgress()) { + this.$wipExplanation.show(); + return this.$noWipExplanation.hide(); + } else { + this.$wipExplanation.hide(); + return this.$noWipExplanation.show(); + } + }; + + IssuableForm.prototype.toggleWip = function(event) { + event.preventDefault(); + if (this.workInProgress()) { + this.removeWip(); + } else { + this.addWip(); + } + return this.renderWipExplanation(); + }; + + IssuableForm.prototype.removeWip = function() { + return this.titleField.val(this.titleField.val().replace(this.wipRegex, "")); + }; + + IssuableForm.prototype.addWip = function() { + return this.titleField.val("WIP: " + (this.titleField.val())); + }; + + IssuableForm.prototype.initMoveDropdown = function() { + var $moveDropdown; + $moveDropdown = $('.js-move-dropdown'); + if ($moveDropdown.length) { + return $('.js-move-dropdown').select2({ + ajax: { + url: $moveDropdown.data('projects-url'), + results: function(data) { + return { + results: data + }; + }, + data: function(query) { + return { + search: query + }; + } + }, + formatResult: function(project) { + return project.name_with_namespace; + }, + formatSelection: function(project) { + return project.name_with_namespace; + } + }); + } + }; + + return IssuableForm; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/issuable_form.js.coffee b/app/assets/javascripts/issuable_form.js.coffee deleted file mode 100644 index 5b7a4831dfc..00000000000 --- a/app/assets/javascripts/issuable_form.js.coffee +++ /dev/null @@ -1,112 +0,0 @@ -class @IssuableForm - issueMoveConfirmMsg: 'Are you sure you want to move this issue to another project?' - wipRegex: /^\s*(\[WIP\]\s*|WIP:\s*|WIP\s+)+\s*/i - - constructor: (@form) -> - GitLab.GfmAutoComplete.setup() - new UsersSelect() - new ZenMode() - - @titleField = @form.find("input[name*='[title]']") - @descriptionField = @form.find("textarea[name*='[description]']") - @issueMoveField = @form.find("#move_to_project_id") - - return unless @titleField.length && @descriptionField.length - - @initAutosave() - - @form.on "submit", @handleSubmit - @form.on "click", ".btn-cancel", @resetAutosave - - @initWip() - @initMoveDropdown() - - $issuableDueDate = $('#issuable-due-date') - - if $issuableDueDate.length - $('.datepicker').datepicker( - dateFormat: 'yy-mm-dd', - onSelect: (dateText, inst) -> - $issuableDueDate.val dateText - ).datepicker 'setDate', $.datepicker.parseDate('yy-mm-dd', $issuableDueDate.val()) - - initAutosave: -> - new Autosave @titleField, [ - document.location.pathname, - document.location.search, - "title" - ] - - new Autosave @descriptionField, [ - document.location.pathname, - document.location.search, - "description" - ] - - handleSubmit: => - if (parseInt(@issueMoveField?.val()) ? 0) > 0 - return false unless confirm(@issueMoveConfirmMsg) - - @resetAutosave() - - resetAutosave: => - @titleField.data("autosave").reset() - @descriptionField.data("autosave").reset() - - initWip: -> - @$wipExplanation = @form.find(".js-wip-explanation") - @$noWipExplanation = @form.find(".js-no-wip-explanation") - return unless @$wipExplanation.length and @$noWipExplanation.length - - @form.on "click", ".js-toggle-wip", @toggleWip - - @titleField.on "keyup blur", @renderWipExplanation - - @renderWipExplanation() - - workInProgress: -> - @wipRegex.test @titleField.val() - - renderWipExplanation: => - if @workInProgress() - @$wipExplanation.show() - @$noWipExplanation.hide() - else - @$wipExplanation.hide() - @$noWipExplanation.show() - - toggleWip: (event) => - event.preventDefault() - - if @workInProgress() - @removeWip() - else - @addWip() - - @renderWipExplanation() - - removeWip: -> - @titleField.val @titleField.val().replace(@wipRegex, "") - - addWip: -> - @titleField.val "WIP: #{@titleField.val()}" - - initMoveDropdown: -> - $moveDropdown = $('.js-move-dropdown') - - if $moveDropdown.length - $('.js-move-dropdown').select2 - ajax: - url: $moveDropdown.data('projects-url') - results: (data) -> - return { - results: data - } - data: (query) -> - { - search: query - } - formatResult: (project) -> - project.name_with_namespace - formatSelection: (project) -> - project.name_with_namespace diff --git a/app/assets/javascripts/issue.js b/app/assets/javascripts/issue.js new file mode 100644 index 00000000000..6838d9d8da1 --- /dev/null +++ b/app/assets/javascripts/issue.js @@ -0,0 +1,154 @@ + +/*= require flash */ + + +/*= require jquery.waitforimages */ + + +/*= require task_list */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Issue = (function() { + function Issue() { + this.submitNoteForm = bind(this.submitNoteForm, this); + this.disableTaskList(); + if ($('a.btn-close').length) { + this.initTaskList(); + this.initIssueBtnEventListeners(); + } + this.initMergeRequests(); + this.initRelatedBranches(); + this.initCanCreateBranch(); + } + + Issue.prototype.initTaskList = function() { + $('.detail-page-description .js-task-list-container').taskList('enable'); + return $(document).on('tasklist:changed', '.detail-page-description .js-task-list-container', this.updateTaskList); + }; + + Issue.prototype.initIssueBtnEventListeners = function() { + var _this, issueFailMessage; + _this = this; + issueFailMessage = 'Unable to update this issue at this time.'; + return $('a.btn-close, a.btn-reopen').on('click', function(e) { + var $this, isClose, shouldSubmit, url; + e.preventDefault(); + e.stopImmediatePropagation(); + $this = $(this); + isClose = $this.hasClass('btn-close'); + shouldSubmit = $this.hasClass('btn-comment'); + if (shouldSubmit) { + _this.submitNoteForm($this.closest('form')); + } + $this.prop('disabled', true); + url = $this.attr('href'); + return $.ajax({ + type: 'PUT', + url: url, + error: function(jqXHR, textStatus, errorThrown) { + var issueStatus; + issueStatus = isClose ? 'close' : 'open'; + return new Flash(issueFailMessage, 'alert'); + }, + success: function(data, textStatus, jqXHR) { + if ('id' in data) { + $(document).trigger('issuable:change'); + if (isClose) { + $('a.btn-close').addClass('hidden'); + $('a.btn-reopen').removeClass('hidden'); + $('div.status-box-closed').removeClass('hidden'); + $('div.status-box-open').addClass('hidden'); + } else { + $('a.btn-reopen').addClass('hidden'); + $('a.btn-close').removeClass('hidden'); + $('div.status-box-closed').addClass('hidden'); + $('div.status-box-open').removeClass('hidden'); + } + } else { + new Flash(issueFailMessage, 'alert'); + } + return $this.prop('disabled', false); + } + }); + }); + }; + + Issue.prototype.submitNoteForm = function(form) { + var noteText; + noteText = form.find("textarea.js-note-text").val(); + if (noteText.trim().length > 0) { + return form.submit(); + } + }; + + Issue.prototype.disableTaskList = function() { + $('.detail-page-description .js-task-list-container').taskList('disable'); + return $(document).off('tasklist:changed', '.detail-page-description .js-task-list-container'); + }; + + Issue.prototype.updateTaskList = function() { + var patchData; + patchData = {}; + patchData['issue'] = { + 'description': $('.js-task-list-field', this).val() + }; + return $.ajax({ + type: 'PATCH', + url: $('form.js-issuable-update').attr('action'), + data: patchData + }); + }; + + Issue.prototype.initMergeRequests = function() { + var $container; + $container = $('#merge-requests'); + return $.getJSON($container.data('url')).error(function() { + return new Flash('Failed to load referenced merge requests', 'alert'); + }).success(function(data) { + if ('html' in data) { + return $container.html(data.html); + } + }); + }; + + Issue.prototype.initRelatedBranches = function() { + var $container; + $container = $('#related-branches'); + return $.getJSON($container.data('url')).error(function() { + return new Flash('Failed to load related branches', 'alert'); + }).success(function(data) { + if ('html' in data) { + return $container.html(data.html); + } + }); + }; + + Issue.prototype.initCanCreateBranch = function() { + var $container; + $container = $('div#new-branch'); + if ($container.length === 0) { + return; + } + return $.getJSON($container.data('path')).error(function() { + $container.find('.checking').hide(); + $container.find('.unavailable').show(); + return new Flash('Failed to check if a new branch can be created.', 'alert'); + }).success(function(data) { + if (data.can_create_branch) { + $container.find('.checking').hide(); + $container.find('.available').show(); + return $container.find('a').attr('disabled', false); + } else { + $container.find('.checking').hide(); + return $container.find('.unavailable').show(); + } + }); + }; + + return Issue; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/issue.js.coffee b/app/assets/javascripts/issue.js.coffee deleted file mode 100644 index f446aa49cde..00000000000 --- a/app/assets/javascripts/issue.js.coffee +++ /dev/null @@ -1,117 +0,0 @@ -#= require flash -#= require jquery.waitforimages -#= require task_list - -class @Issue - constructor: -> - # Prevent duplicate event bindings - @disableTaskList() - if $('a.btn-close').length - @initTaskList() - @initIssueBtnEventListeners() - - @initMergeRequests() - @initRelatedBranches() - @initCanCreateBranch() - - initTaskList: -> - $('.detail-page-description .js-task-list-container').taskList('enable') - $(document).on 'tasklist:changed', '.detail-page-description .js-task-list-container', @updateTaskList - - initIssueBtnEventListeners: -> - _this = @ - issueFailMessage = 'Unable to update this issue at this time.' - $('a.btn-close, a.btn-reopen').on 'click', (e) -> - e.preventDefault() - e.stopImmediatePropagation() - $this = $(this) - isClose = $this.hasClass('btn-close') - shouldSubmit = $this.hasClass('btn-comment') - if shouldSubmit - _this.submitNoteForm($this.closest('form')) - $this.prop('disabled', true) - url = $this.attr('href') - $.ajax - type: 'PUT' - url: url, - error: (jqXHR, textStatus, errorThrown) -> - issueStatus = if isClose then 'close' else 'open' - new Flash(issueFailMessage, 'alert') - success: (data, textStatus, jqXHR) -> - if 'id' of data - $(document).trigger('issuable:change'); - if isClose - $('a.btn-close').addClass('hidden') - $('a.btn-reopen').removeClass('hidden') - $('div.status-box-closed').removeClass('hidden') - $('div.status-box-open').addClass('hidden') - else - $('a.btn-reopen').addClass('hidden') - $('a.btn-close').removeClass('hidden') - $('div.status-box-closed').addClass('hidden') - $('div.status-box-open').removeClass('hidden') - else - new Flash(issueFailMessage, 'alert') - $this.prop('disabled', false) - - submitNoteForm: (form) => - noteText = form.find("textarea.js-note-text").val() - if noteText.trim().length > 0 - form.submit() - - disableTaskList: -> - $('.detail-page-description .js-task-list-container').taskList('disable') - $(document).off 'tasklist:changed', '.detail-page-description .js-task-list-container' - - # TODO (rspeicher): Make the issue description inline-editable like a note so - # that we can re-use its form here - updateTaskList: -> - patchData = {} - patchData['issue'] = {'description': $('.js-task-list-field', this).val()} - - $.ajax - type: 'PATCH' - url: $('form.js-issuable-update').attr('action') - data: patchData - - initMergeRequests: -> - $container = $('#merge-requests') - - $.getJSON($container.data('url')) - .error -> - new Flash('Failed to load referenced merge requests', 'alert') - .success (data) -> - if 'html' of data - $container.html(data.html) - - initRelatedBranches: -> - $container = $('#related-branches') - - $.getJSON($container.data('url')) - .error -> - new Flash('Failed to load related branches', 'alert') - .success (data) -> - if 'html' of data - $container.html(data.html) - - initCanCreateBranch: -> - $container = $('div#new-branch') - - # If the user doesn't have the required permissions the container isn't - # rendered at all. - return if $container.length is 0 - - $.getJSON($container.data('path')) - .error -> - $container.find('.checking').hide() - $container.find('.unavailable').show() - - new Flash('Failed to check if a new branch can be created.', 'alert') - .success (data) -> - if data.can_create_branch - $container.find('.checking').hide() - $container.find('.available').show() - $container.find('a').attr('disabled', false) - else - $container.find('.checking').hide() - $container.find('.unavailable').show() diff --git a/app/assets/javascripts/issue_status_select.js b/app/assets/javascripts/issue_status_select.js new file mode 100644 index 00000000000..076e3972944 --- /dev/null +++ b/app/assets/javascripts/issue_status_select.js @@ -0,0 +1,35 @@ +(function() { + this.IssueStatusSelect = (function() { + function IssueStatusSelect() { + $('.js-issue-status').each(function(i, el) { + var fieldName; + fieldName = $(el).data("field-name"); + return $(el).glDropdown({ + selectable: true, + fieldName: fieldName, + toggleLabel: (function(_this) { + return function(selected, el, instance) { + var $item, label; + label = 'Author'; + $item = instance.dropdown.find('.is-active'); + if ($item.length) { + label = $item.text(); + } + return label; + }; + })(this), + clicked: function(item, $el, e) { + return e.preventDefault(); + }, + id: function(obj, el) { + return $(el).data("id"); + } + }); + }); + } + + return IssueStatusSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/issue_status_select.js.coffee b/app/assets/javascripts/issue_status_select.js.coffee deleted file mode 100644 index ed50e2e698f..00000000000 --- a/app/assets/javascripts/issue_status_select.js.coffee +++ /dev/null @@ -1,18 +0,0 @@ -class @IssueStatusSelect - constructor: -> - $('.js-issue-status').each (i, el) -> - fieldName = $(el).data("field-name") - - $(el).glDropdown( - selectable: true - fieldName: fieldName - toggleLabel: (selected, el, instance) => - label = 'Author' - $item = instance.dropdown.find('.is-active') - label = $item.text() if $item.length - label - clicked: (item, $el, e)-> - e.preventDefault() - id: (obj, el) -> - $(el).data("id") - ) diff --git a/app/assets/javascripts/issues-bulk-assignment.js b/app/assets/javascripts/issues-bulk-assignment.js new file mode 100644 index 00000000000..98d3358ba92 --- /dev/null +++ b/app/assets/javascripts/issues-bulk-assignment.js @@ -0,0 +1,161 @@ +(function() { + this.IssuableBulkActions = (function() { + function IssuableBulkActions(opts) { + var ref, ref1, ref2; + if (opts == null) { + opts = {}; + } + this.container = (ref = opts.container) != null ? ref : $('.content'), this.form = (ref1 = opts.form) != null ? ref1 : this.getElement('.bulk-update'), this.issues = (ref2 = opts.issues) != null ? ref2 : this.getElement('.issues-list .issue'); + this.form.data('bulkActions', this); + this.willUpdateLabels = false; + this.bindEvents(); + Issuable.initChecks(); + } + + IssuableBulkActions.prototype.getElement = function(selector) { + return this.container.find(selector); + }; + + IssuableBulkActions.prototype.bindEvents = function() { + return this.form.off('submit').on('submit', this.onFormSubmit.bind(this)); + }; + + IssuableBulkActions.prototype.onFormSubmit = function(e) { + e.preventDefault(); + return this.submit(); + }; + + IssuableBulkActions.prototype.submit = function() { + var _this, xhr; + _this = this; + xhr = $.ajax({ + url: this.form.attr('action'), + method: this.form.attr('method'), + dataType: 'JSON', + data: this.getFormDataAsObject() + }); + xhr.done(function(response, status, xhr) { + return location.reload(); + }); + xhr.fail(function() { + return new Flash("Issue update failed"); + }); + return xhr.always(this.onFormSubmitAlways.bind(this)); + }; + + IssuableBulkActions.prototype.onFormSubmitAlways = function() { + return this.form.find('[type="submit"]').enable(); + }; + + IssuableBulkActions.prototype.getSelectedIssues = function() { + return this.issues.has('.selected_issue:checked'); + }; + + IssuableBulkActions.prototype.getLabelsFromSelection = function() { + var labels; + labels = []; + this.getSelectedIssues().map(function() { + var _labels; + _labels = $(this).data('labels'); + if (_labels) { + return _labels.map(function(labelId) { + if (labels.indexOf(labelId) === -1) { + return labels.push(labelId); + } + }); + } + }); + return labels; + }; + + + /** + * Will return only labels that were marked previously and the user has unmarked + * @return {Array} Label IDs + */ + + IssuableBulkActions.prototype.getUnmarkedIndeterminedLabels = function() { + var el, i, id, j, labelsToKeep, len, len1, ref, ref1, result; + result = []; + labelsToKeep = []; + ref = this.getElement('.labels-filter .is-indeterminate'); + for (i = 0, len = ref.length; i < len; i++) { + el = ref[i]; + labelsToKeep.push($(el).data('labelId')); + } + ref1 = this.getLabelsFromSelection(); + for (j = 0, len1 = ref1.length; j < len1; j++) { + id = ref1[j]; + if (labelsToKeep.indexOf(id) === -1) { + result.push(id); + } + } + return result; + }; + + + /** + * Simple form serialization, it will return just what we need + * Returns key/value pairs from form data + */ + + IssuableBulkActions.prototype.getFormDataAsObject = function() { + var formData; + formData = { + update: { + state_event: this.form.find('input[name="update[state_event]"]').val(), + assignee_id: this.form.find('input[name="update[assignee_id]"]').val(), + milestone_id: this.form.find('input[name="update[milestone_id]"]').val(), + issues_ids: this.form.find('input[name="update[issues_ids]"]').val(), + subscription_event: this.form.find('input[name="update[subscription_event]"]').val(), + add_label_ids: [], + remove_label_ids: [] + } + }; + if (this.willUpdateLabels) { + this.getLabelsToApply().map(function(id) { + return formData.update.add_label_ids.push(id); + }); + this.getLabelsToRemove().map(function(id) { + return formData.update.remove_label_ids.push(id); + }); + } + return formData; + }; + + IssuableBulkActions.prototype.getLabelsToApply = function() { + var $labels, labelIds; + labelIds = []; + $labels = this.form.find('.labels-filter input[name="update[label_ids][]"]'); + $labels.each(function(k, label) { + if (label) { + return labelIds.push(parseInt($(label).val())); + } + }); + return labelIds; + }; + + + /** + * Returns Label IDs that will be removed from issue selection + * @return {Array} Array of labels IDs + */ + + IssuableBulkActions.prototype.getLabelsToRemove = function() { + var indeterminatedLabels, labelsToApply, result; + result = []; + indeterminatedLabels = this.getUnmarkedIndeterminedLabels(); + labelsToApply = this.getLabelsToApply(); + indeterminatedLabels.map(function(id) { + if (labelsToApply.indexOf(id) === -1) { + return result.push(id); + } + }); + return result; + }; + + return IssuableBulkActions; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/issues-bulk-assignment.js.coffee b/app/assets/javascripts/issues-bulk-assignment.js.coffee deleted file mode 100644 index 3d09ea08e3b..00000000000 --- a/app/assets/javascripts/issues-bulk-assignment.js.coffee +++ /dev/null @@ -1,128 +0,0 @@ -class @IssuableBulkActions - constructor: (opts = {}) -> - # Set defaults - { - @container = $('.content') - @form = @getElement('.bulk-update') - @issues = @getElement('.issues-list .issue') - } = opts - - # Save instance - @form.data 'bulkActions', @ - - @willUpdateLabels = false - - @bindEvents() - - # Fixes bulk-assign not working when navigating through pages - Issuable.initChecks(); - - getElement: (selector) -> - @container.find selector - - bindEvents: -> - @form.off('submit').on('submit', @onFormSubmit.bind(@)) - - onFormSubmit: (e) -> - e.preventDefault() - @submit() - - submit: -> - _this = @ - - xhr = $.ajax - url: @form.attr 'action' - method: @form.attr 'method' - dataType: 'JSON', - data: @getFormDataAsObject() - - xhr.done (response, status, xhr) -> - location.reload() - - xhr.fail -> - new Flash("Issue update failed") - - xhr.always @onFormSubmitAlways.bind(@) - - onFormSubmitAlways: -> - @form.find('[type="submit"]').enable() - - getSelectedIssues: -> - @issues.has('.selected_issue:checked') - - getLabelsFromSelection: -> - labels = [] - - @getSelectedIssues().map -> - _labels = $(@).data('labels') - if _labels - _labels.map (labelId) -> - labels.push(labelId) if labels.indexOf(labelId) is -1 - - labels - - ###* - * Will return only labels that were marked previously and the user has unmarked - * @return {Array} Label IDs - ### - getUnmarkedIndeterminedLabels: -> - result = [] - labelsToKeep = [] - - for el in @getElement('.labels-filter .is-indeterminate') - labelsToKeep.push $(el).data('labelId') - - for id in @getLabelsFromSelection() - # Only the ones that we are not going to keep - result.push(id) if labelsToKeep.indexOf(id) is -1 - - result - - ###* - * Simple form serialization, it will return just what we need - * Returns key/value pairs from form data - ### - getFormDataAsObject: -> - formData = - update: - state_event : @form.find('input[name="update[state_event]"]').val() - assignee_id : @form.find('input[name="update[assignee_id]"]').val() - milestone_id : @form.find('input[name="update[milestone_id]"]').val() - issues_ids : @form.find('input[name="update[issues_ids]"]').val() - subscription_event : @form.find('input[name="update[subscription_event]"]').val() - add_label_ids : [] - remove_label_ids : [] - - if @willUpdateLabels - @getLabelsToApply().map (id) -> - formData.update.add_label_ids.push id - - @getLabelsToRemove().map (id) -> - formData.update.remove_label_ids.push id - - formData - - getLabelsToApply: -> - labelIds = [] - $labels = @form.find('.labels-filter input[name="update[label_ids][]"]') - - $labels.each (k, label) -> - labelIds.push parseInt($(label).val()) if label - - labelIds - - ###* - * Returns Label IDs that will be removed from issue selection - * @return {Array} Array of labels IDs - ### - getLabelsToRemove: -> - result = [] - indeterminatedLabels = @getUnmarkedIndeterminedLabels() - labelsToApply = @getLabelsToApply() - - indeterminatedLabels.map (id) -> - # We need to exclude label IDs that will be applied - # By not doing this will cause issues from selection to not add labels at all - result.push(id) if labelsToApply.indexOf(id) is -1 - - result diff --git a/app/assets/javascripts/labels.js b/app/assets/javascripts/labels.js new file mode 100644 index 00000000000..fe071fca67c --- /dev/null +++ b/app/assets/javascripts/labels.js @@ -0,0 +1,44 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Labels = (function() { + function Labels() { + this.setSuggestedColor = bind(this.setSuggestedColor, this); + this.updateColorPreview = bind(this.updateColorPreview, this); + var form; + form = $('.label-form'); + this.cleanBinding(); + this.addBinding(); + this.updateColorPreview(); + } + + Labels.prototype.addBinding = function() { + $(document).on('click', '.suggest-colors a', this.setSuggestedColor); + return $(document).on('input', 'input#label_color', this.updateColorPreview); + }; + + Labels.prototype.cleanBinding = function() { + $(document).off('click', '.suggest-colors a'); + return $(document).off('input', 'input#label_color'); + }; + + Labels.prototype.updateColorPreview = function() { + var previewColor; + previewColor = $('input#label_color').val(); + return $('div.label-color-preview').css('background-color', previewColor); + }; + + Labels.prototype.setSuggestedColor = function(e) { + var color; + color = $(e.currentTarget).data('color'); + $('input#label_color').val(color); + this.updateColorPreview(); + $('.label-form').trigger('keyup'); + return e.preventDefault(); + }; + + return Labels; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/labels.js.coffee b/app/assets/javascripts/labels.js.coffee deleted file mode 100644 index d05bacd7494..00000000000 --- a/app/assets/javascripts/labels.js.coffee +++ /dev/null @@ -1,28 +0,0 @@ -class @Labels - constructor: -> - form = $('.label-form') - @cleanBinding() - @addBinding() - @updateColorPreview() - - addBinding: -> - $(document).on 'click', '.suggest-colors a', @setSuggestedColor - $(document).on 'input', 'input#label_color', @updateColorPreview - - cleanBinding: -> - $(document).off 'click', '.suggest-colors a' - $(document).off 'input', 'input#label_color' - - # Updates the the preview color with the hex-color input - updateColorPreview: => - previewColor = $('input#label_color').val() - $('div.label-color-preview').css('background-color', previewColor) - - # Updates the preview color with a click on a suggested color - setSuggestedColor: (e) => - color = $(e.currentTarget).data('color') - $('input#label_color').val(color) - @updateColorPreview() - # Notify the form, that color has changed - $('.label-form').trigger('keyup') - e.preventDefault() diff --git a/app/assets/javascripts/labels_select.js b/app/assets/javascripts/labels_select.js new file mode 100644 index 00000000000..675dd5b7cea --- /dev/null +++ b/app/assets/javascripts/labels_select.js @@ -0,0 +1,377 @@ +(function() { + this.LabelsSelect = (function() { + function LabelsSelect() { + var _this; + _this = this; + $('.js-label-select').each(function(i, dropdown) { + var $block, $colorPreview, $dropdown, $form, $loading, $newLabelCreateButton, $newLabelError, $selectbox, $sidebarCollapsedValue, $value, abilityName, defaultLabel, enableLabelCreateButton, issueURLSplit, issueUpdateURL, labelHTMLTemplate, labelNoneHTMLTemplate, labelUrl, newColorField, newLabelField, projectId, resetForm, saveLabel, saveLabelData, selectedLabel, showAny, showNo; + $dropdown = $(dropdown); + projectId = $dropdown.data('project-id'); + labelUrl = $dropdown.data('labels'); + issueUpdateURL = $dropdown.data('issueUpdate'); + selectedLabel = $dropdown.data('selected'); + if ((selectedLabel != null) && !$dropdown.hasClass('js-multiselect')) { + selectedLabel = selectedLabel.split(','); + } + newLabelField = $('#new_label_name'); + newColorField = $('#new_label_color'); + showNo = $dropdown.data('show-no'); + showAny = $dropdown.data('show-any'); + defaultLabel = $dropdown.data('default-label'); + abilityName = $dropdown.data('ability-name'); + $selectbox = $dropdown.closest('.selectbox'); + $block = $selectbox.closest('.block'); + $form = $dropdown.closest('form'); + $sidebarCollapsedValue = $block.find('.sidebar-collapsed-icon span'); + $value = $block.find('.value'); + $newLabelError = $('.js-label-error'); + $colorPreview = $('.js-dropdown-label-color-preview'); + $newLabelCreateButton = $('.js-new-label-btn'); + $newLabelError.hide(); + $loading = $block.find('.block-loading').fadeOut(); + if (issueUpdateURL != null) { + issueURLSplit = issueUpdateURL.split('/'); + } + if (issueUpdateURL) { + labelHTMLTemplate = _.template('<% _.each(labels, function(label){ %> issues?label_name[]=<%- encodeURIComponent(label.title) %>"> <%- label.title %> <% }); %>'); + labelNoneHTMLTemplate = 'None'; + } + if (newLabelField.length) { + $('.suggest-colors-dropdown a').on("click", function(e) { + e.preventDefault(); + e.stopPropagation(); + newColorField.val($(this).data('color')).trigger('change'); + return $colorPreview.css('background-color', $(this).data('color')).parent().addClass('is-active'); + }); + resetForm = function() { + newLabelField.val('').trigger('change'); + newColorField.val('').trigger('change'); + return $colorPreview.css('background-color', '').parent().removeClass('is-active'); + }; + $('.dropdown-menu-back').on('click', function() { + return resetForm(); + }); + $('.js-cancel-label-btn').on('click', function(e) { + e.preventDefault(); + e.stopPropagation(); + resetForm(); + return $('.dropdown-menu-back', $dropdown.parent()).trigger('click'); + }); + enableLabelCreateButton = function() { + if (newLabelField.val() !== '' && newColorField.val() !== '') { + $newLabelError.hide(); + return $newLabelCreateButton.enable(); + } else { + return $newLabelCreateButton.disable(); + } + }; + saveLabel = function() { + return Api.newLabel(projectId, { + name: newLabelField.val(), + color: newColorField.val() + }, function(label) { + var errors; + $newLabelCreateButton.enable(); + if (label.message != null) { + errors = _.map(label.message, function(value, key) { + return key + " " + value[0]; + }); + return $newLabelError.html(errors.join("
                ")).show(); + } else { + return $('.dropdown-menu-back', $dropdown.parent()).trigger('click'); + } + }); + }; + newLabelField.on('keyup change', enableLabelCreateButton); + newColorField.on('keyup change', enableLabelCreateButton); + $newLabelCreateButton.disable().on('click', function(e) { + e.preventDefault(); + e.stopPropagation(); + return saveLabel(); + }); + } + saveLabelData = function() { + var data, selected; + selected = $dropdown.closest('.selectbox').find("input[name='" + ($dropdown.data('field-name')) + "']").map(function() { + return this.value; + }).get(); + data = {}; + data[abilityName] = {}; + data[abilityName].label_ids = selected; + if (!selected.length) { + data[abilityName].label_ids = ['']; + } + $loading.fadeIn(); + $dropdown.trigger('loading.gl.dropdown'); + return $.ajax({ + type: 'PUT', + url: issueUpdateURL, + dataType: 'JSON', + data: data + }).done(function(data) { + var labelCount, template; + $loading.fadeOut(); + $dropdown.trigger('loaded.gl.dropdown'); + $selectbox.hide(); + data.issueURLSplit = issueURLSplit; + labelCount = 0; + if (data.labels.length) { + template = labelHTMLTemplate(data); + labelCount = data.labels.length; + } else { + template = labelNoneHTMLTemplate; + } + $value.removeAttr('style').html(template); + $sidebarCollapsedValue.text(labelCount); + $('.has-tooltip', $value).tooltip({ + container: 'body' + }); + return $value.find('a').each(function(i) { + return setTimeout((function(_this) { + return function() { + return gl.animate.animate($(_this), 'pulse'); + }; + })(this), 200 * i); + }); + }); + }; + return $dropdown.glDropdown({ + data: function(term, callback) { + return $.ajax({ + url: labelUrl + }).done(function(data) { + data = _.chain(data).groupBy(function(label) { + return label.title; + }).map(function(label) { + var color; + color = _.map(label, function(dup) { + return dup.color; + }); + return { + id: label[0].id, + title: label[0].title, + color: color, + duplicate: color.length > 1 + }; + }).value(); + if ($dropdown.hasClass('js-extra-options')) { + if (showNo) { + data.unshift({ + id: 0, + title: 'No Label' + }); + } + if (showAny) { + data.unshift({ + isAny: true, + title: 'Any Label' + }); + } + if (data.length > 2) { + data.splice(2, 0, 'divider'); + } + } + return callback(data); + }); + }, + renderRow: function(label, instance) { + var $a, $li, active, color, colorEl, indeterminate, removesAll, selectedClass, spacing; + $li = $('
              • '); + $a = $(''); + selectedClass = []; + removesAll = label.id === 0 || (label.id == null); + if ($dropdown.hasClass('js-filter-bulk-update')) { + indeterminate = instance.indeterminateIds; + active = instance.activeIds; + if (indeterminate.indexOf(label.id) !== -1) { + selectedClass.push('is-indeterminate'); + } + if (active.indexOf(label.id) !== -1) { + i = selectedClass.indexOf('is-indeterminate'); + if (i !== -1) { + selectedClass.splice(i, 1); + } + selectedClass.push('is-active'); + instance.addInput(this.fieldName, label.id); + } + } + if ($form.find("input[type='hidden'][name='" + ($dropdown.data('fieldName')) + "'][value='" + (this.id(label)) + "']").length) { + selectedClass.push('is-active'); + } + if ($dropdown.hasClass('js-multiselect') && removesAll) { + selectedClass.push('dropdown-clear-active'); + } + if (label.duplicate) { + spacing = 100 / label.color.length; + label.color = label.color.filter(function(color, i) { + return i < 4; + }); + color = _.map(label.color, function(color, i) { + var percentFirst, percentSecond; + percentFirst = Math.floor(spacing * i); + percentSecond = Math.floor(spacing * (i + 1)); + return color + " " + percentFirst + "%," + color + " " + percentSecond + "% "; + }).join(','); + color = "linear-gradient(" + color + ")"; + } else { + if (label.color != null) { + color = label.color[0]; + } + } + if (color) { + colorEl = ""; + } else { + colorEl = ''; + } + if (label.id) { + selectedClass.push('label-item'); + $a.attr('data-label-id', label.id); + } + $a.addClass(selectedClass.join(' ')).html(colorEl + " " + label.title); + return $li.html($a).prop('outerHTML'); + }, + persistWhenHide: $dropdown.data('persistWhenHide'), + search: { + fields: ['title'] + }, + selectable: true, + filterable: true, + toggleLabel: function(selected, el) { + var selected_labels; + selected_labels = $('.js-label-select').siblings('.dropdown-menu-labels').find('.is-active'); + if (selected && (selected.title != null)) { + if (selected_labels.length > 1) { + return selected.title + " +" + (selected_labels.length - 1) + " more"; + } else { + return selected.title; + } + } else if (!selected && selected_labels.length !== 0) { + if (selected_labels.length > 1) { + return ($(selected_labels[0]).text()) + " +" + (selected_labels.length - 1) + " more"; + } else if (selected_labels.length === 1) { + return $(selected_labels).text(); + } + } else { + return defaultLabel; + } + }, + fieldName: $dropdown.data('field-name'), + id: function(label) { + if ($dropdown.hasClass("js-filter-submit") && (label.isAny == null)) { + return label.title; + } else { + return label.id; + } + }, + hidden: function() { + var isIssueIndex, isMRIndex, page, selectedLabels; + page = $('body').data('page'); + isIssueIndex = page === 'projects:issues:index'; + isMRIndex = page === 'projects:merge_requests:index'; + $selectbox.hide(); + $value.removeAttr('style'); + if ($dropdown.hasClass('js-multiselect')) { + if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) { + selectedLabels = $dropdown.closest('form').find("input:hidden[name='" + ($dropdown.data('fieldName')) + "']"); + Issuable.filterResults($dropdown.closest('form')); + } else if ($dropdown.hasClass('js-filter-submit')) { + $dropdown.closest('form').submit(); + } else { + if (!$dropdown.hasClass('js-filter-bulk-update')) { + saveLabelData(); + } + } + } + if ($dropdown.hasClass('js-filter-bulk-update')) { + if (!this.options.persistWhenHide) { + return $dropdown.parent().find('.is-active, .is-indeterminate').removeClass(); + } + } + }, + multiSelect: $dropdown.hasClass('js-multiselect'), + clicked: function(label) { + var isIssueIndex, isMRIndex, page; + _this.enableBulkLabelDropdown(); + if ($dropdown.hasClass('js-filter-bulk-update')) { + return; + } + page = $('body').data('page'); + isIssueIndex = page === 'projects:issues:index'; + isMRIndex = page === 'projects:merge_requests:index'; + if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) { + if (!$dropdown.hasClass('js-multiselect')) { + selectedLabel = label.title; + return Issuable.filterResults($dropdown.closest('form')); + } + } else if ($dropdown.hasClass('js-filter-submit')) { + return $dropdown.closest('form').submit(); + } else { + if ($dropdown.hasClass('js-multiselect')) { + + } else { + return saveLabelData(); + } + } + }, + setIndeterminateIds: function() { + if (this.dropdown.find('.dropdown-menu-toggle').hasClass('js-filter-bulk-update')) { + return this.indeterminateIds = _this.getIndeterminateIds(); + } + }, + setActiveIds: function() { + if (this.dropdown.find('.dropdown-menu-toggle').hasClass('js-filter-bulk-update')) { + return this.activeIds = _this.getActiveIds(); + } + } + }); + }); + this.bindEvents(); + } + + LabelsSelect.prototype.bindEvents = function() { + return $('body').on('change', '.selected_issue', this.onSelectCheckboxIssue); + }; + + LabelsSelect.prototype.onSelectCheckboxIssue = function() { + if ($('.selected_issue:checked').length) { + return; + } + $('.issues_bulk_update .labels-filter input[type="hidden"]').remove(); + return $('.issues_bulk_update .labels-filter .dropdown-toggle-text').text('Label'); + }; + + LabelsSelect.prototype.getIndeterminateIds = function() { + var label_ids; + label_ids = []; + $('.selected_issue:checked').each(function(i, el) { + var issue_id; + issue_id = $(el).data('id'); + return label_ids.push($("#issue_" + issue_id).data('labels')); + }); + return _.flatten(label_ids); + }; + + LabelsSelect.prototype.getActiveIds = function() { + var label_ids; + label_ids = []; + $('.selected_issue:checked').each(function(i, el) { + var issue_id; + issue_id = $(el).data('id'); + return label_ids.push($("#issue_" + issue_id).data('labels')); + }); + return _.intersection.apply(_, label_ids); + }; + + LabelsSelect.prototype.enableBulkLabelDropdown = function() { + var issuableBulkActions; + if ($('.selected_issue:checked').length) { + issuableBulkActions = $('.bulk-update').data('bulkActions'); + return issuableBulkActions.willUpdateLabels = true; + } + }; + + return LabelsSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/labels_select.js.coffee b/app/assets/javascripts/labels_select.js.coffee deleted file mode 100644 index 7688609b301..00000000000 --- a/app/assets/javascripts/labels_select.js.coffee +++ /dev/null @@ -1,386 +0,0 @@ -class @LabelsSelect - constructor: -> - _this = @ - - $('.js-label-select').each (i, dropdown) -> - $dropdown = $(dropdown) - projectId = $dropdown.data('project-id') - labelUrl = $dropdown.data('labels') - issueUpdateURL = $dropdown.data('issueUpdate') - selectedLabel = $dropdown.data('selected') - if selectedLabel? and not $dropdown.hasClass 'js-multiselect' - selectedLabel = selectedLabel.split(',') - newLabelField = $('#new_label_name') - newColorField = $('#new_label_color') - showNo = $dropdown.data('show-no') - showAny = $dropdown.data('show-any') - defaultLabel = $dropdown.data('default-label') - abilityName = $dropdown.data('ability-name') - $selectbox = $dropdown.closest('.selectbox') - $block = $selectbox.closest('.block') - $form = $dropdown.closest('form') - $sidebarCollapsedValue = $block.find('.sidebar-collapsed-icon span') - $value = $block.find('.value') - $newLabelError = $('.js-label-error') - $colorPreview = $('.js-dropdown-label-color-preview') - $newLabelCreateButton = $('.js-new-label-btn') - - $newLabelError.hide() - $loading = $block.find('.block-loading').fadeOut() - - issueURLSplit = issueUpdateURL.split('/') if issueUpdateURL? - if issueUpdateURL - labelHTMLTemplate = _.template( - '<% _.each(labels, function(label){ %> - issues?label_name[]=<%- encodeURIComponent(label.title) %>"> - - <%- label.title %> - - - <% }); %>' - ) - labelNoneHTMLTemplate = 'None' - - if newLabelField.length - - # Suggested colors in the dropdown to chose from pre-chosen colors - $('.suggest-colors-dropdown a').on "click", (e) -> - e.preventDefault() - e.stopPropagation() - newColorField - .val($(this).data('color')) - .trigger('change') - $colorPreview - .css 'background-color', $(this).data('color') - .parent() - .addClass 'is-active' - - # Cancel button takes back to first page - resetForm = -> - newLabelField - .val '' - .trigger 'change' - newColorField - .val '' - .trigger 'change' - $colorPreview - .css 'background-color', '' - .parent() - .removeClass 'is-active' - - $('.dropdown-menu-back').on 'click', -> - resetForm() - - $('.js-cancel-label-btn').on 'click', (e) -> - e.preventDefault() - e.stopPropagation() - resetForm() - $('.dropdown-menu-back', $dropdown.parent()).trigger 'click' - - # Listen for change and keyup events on label and color field - # This allows us to enable the button when ready - enableLabelCreateButton = -> - if newLabelField.val() isnt '' and newColorField.val() isnt '' - $newLabelError.hide() - $newLabelCreateButton.enable() - else - $newLabelCreateButton.disable() - - saveLabel = -> - # Create new label with API - Api.newLabel projectId, { - name: newLabelField.val() - color: newColorField.val() - }, (label) -> - $newLabelCreateButton.enable() - - if label.message? - errors = _.map label.message, (value, key) -> - "#{key} #{value[0]}" - - $newLabelError - .html errors.join("
                ") - .show() - else - $('.dropdown-menu-back', $dropdown.parent()).trigger 'click' - - newLabelField.on 'keyup change', enableLabelCreateButton - - newColorField.on 'keyup change', enableLabelCreateButton - - # Send the API call to create the label - $newLabelCreateButton - .disable() - .on 'click', (e) -> - e.preventDefault() - e.stopPropagation() - saveLabel() - - saveLabelData = -> - selected = $dropdown - .closest('.selectbox') - .find("input[name='#{$dropdown.data('field-name')}']") - .map(-> - @value - ).get() - data = {} - data[abilityName] = {} - data[abilityName].label_ids = selected - if not selected.length - data[abilityName].label_ids = [''] - $loading.fadeIn() - $dropdown.trigger('loading.gl.dropdown') - $.ajax( - type: 'PUT' - url: issueUpdateURL - dataType: 'JSON' - data: data - ).done (data) -> - $loading.fadeOut() - $dropdown.trigger('loaded.gl.dropdown') - $selectbox.hide() - data.issueURLSplit = issueURLSplit - labelCount = 0 - if data.labels.length - template = labelHTMLTemplate(data) - labelCount = data.labels.length - else - template = labelNoneHTMLTemplate - $value - .removeAttr('style') - .html(template) - $sidebarCollapsedValue.text(labelCount) - - $('.has-tooltip', $value).tooltip(container: 'body') - - $value - .find('a') - .each((i) -> - setTimeout(=> - gl.animate.animate($(@), 'pulse') - ,200 * i - ) - ) - - - $dropdown.glDropdown( - data: (term, callback) -> - $.ajax( - url: labelUrl - ).done (data) -> - data = _.chain data - .groupBy (label) -> - label.title - .map (label) -> - color = _.map label, (dup) -> - dup.color - - return { - id: label[0].id - title: label[0].title - color: color - duplicate: color.length > 1 - } - .value() - - if $dropdown.hasClass 'js-extra-options' - if showNo - data.unshift( - id: 0 - title: 'No Label' - ) - - if showAny - data.unshift( - isAny: true - title: 'Any Label' - ) - - if data.length > 2 - data.splice 2, 0, 'divider' - - callback data - - renderRow: (label, instance) -> - $li = $('
              • ') - $a = $('') - - selectedClass = [] - removesAll = label.id is 0 or not label.id? - - if $dropdown.hasClass('js-filter-bulk-update') - indeterminate = instance.indeterminateIds - active = instance.activeIds - - if indeterminate.indexOf(label.id) isnt -1 - selectedClass.push 'is-indeterminate' - - if active.indexOf(label.id) isnt -1 - # Remove is-indeterminate class if the item will be marked as active - i = selectedClass.indexOf 'is-indeterminate' - selectedClass.splice i, 1 unless i is -1 - - selectedClass.push 'is-active' - - # Add input manually - instance.addInput @fieldName, label.id - - if $form.find("input[type='hidden']\ - [name='#{$dropdown.data('fieldName')}']\ - [value='#{this.id(label)}']").length - selectedClass.push 'is-active' - - if $dropdown.hasClass('js-multiselect') and removesAll - selectedClass.push 'dropdown-clear-active' - - if label.duplicate - spacing = 100 / label.color.length - - # Reduce the colors to 4 - label.color = label.color.filter (color, i) -> - i < 4 - - color = _.map(label.color, (color, i) -> - percentFirst = Math.floor(spacing * i) - percentSecond = Math.floor(spacing * (i + 1)) - "#{color} #{percentFirst}%,#{color} #{percentSecond}% " - ).join(',') - color = "linear-gradient(#{color})" - else - if label.color? - color = label.color[0] - - if color - colorEl = "" - else - colorEl = '' - - # We need to identify which items are actually labels - if label.id - selectedClass.push('label-item') - $a.attr('data-label-id', label.id) - - $a.addClass(selectedClass.join(' ')) - .html("#{colorEl} #{label.title}") - - # Return generated html - $li.html($a).prop('outerHTML') - persistWhenHide: $dropdown.data('persistWhenHide') - search: - fields: ['title'] - selectable: true - filterable: true - toggleLabel: (selected, el) -> - selected_labels = $('.js-label-select').siblings('.dropdown-menu-labels').find('.is-active') - - if selected and selected.title? - if selected_labels.length > 1 - "#{selected.title} +#{selected_labels.length - 1} more" - else - selected.title - else if not selected and selected_labels.length isnt 0 - if selected_labels.length > 1 - "#{$(selected_labels[0]).text()} +#{selected_labels.length - 1} more" - else if selected_labels.length is 1 - $(selected_labels).text() - else - defaultLabel - fieldName: $dropdown.data('field-name') - id: (label) -> - if $dropdown.hasClass("js-filter-submit") and not label.isAny? - label.title - else - label.id - - hidden: -> - page = $('body').data 'page' - isIssueIndex = page is 'projects:issues:index' - isMRIndex = page is 'projects:merge_requests:index' - - $selectbox.hide() - # display:block overrides the hide-collapse rule - $value.removeAttr('style') - if $dropdown.hasClass 'js-multiselect' - if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex) - selectedLabels = $dropdown - .closest('form') - .find("input:hidden[name='#{$dropdown.data('fieldName')}']") - Issuable.filterResults $dropdown.closest('form') - else if $dropdown.hasClass('js-filter-submit') - $dropdown.closest('form').submit() - else - if not $dropdown.hasClass 'js-filter-bulk-update' - saveLabelData() - - if $dropdown.hasClass('js-filter-bulk-update') - # If we are persisting state we need the classes - if not @options.persistWhenHide - $dropdown.parent().find('.is-active, .is-indeterminate').removeClass() - - multiSelect: $dropdown.hasClass 'js-multiselect' - clicked: (label) -> - _this.enableBulkLabelDropdown() - - if $dropdown.hasClass('js-filter-bulk-update') - return - - page = $('body').data 'page' - isIssueIndex = page is 'projects:issues:index' - isMRIndex = page is 'projects:merge_requests:index' - if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex) - if not $dropdown.hasClass 'js-multiselect' - selectedLabel = label.title - Issuable.filterResults $dropdown.closest('form') - else if $dropdown.hasClass 'js-filter-submit' - $dropdown.closest('form').submit() - else - if $dropdown.hasClass 'js-multiselect' - return - else - saveLabelData() - - setIndeterminateIds: -> - if @dropdown.find('.dropdown-menu-toggle').hasClass('js-filter-bulk-update') - @indeterminateIds = _this.getIndeterminateIds() - - setActiveIds: -> - if @dropdown.find('.dropdown-menu-toggle').hasClass('js-filter-bulk-update') - @activeIds = _this.getActiveIds() - ) - - @bindEvents() - - bindEvents: -> - $('body').on 'change', '.selected_issue', @onSelectCheckboxIssue - - onSelectCheckboxIssue: -> - return if $('.selected_issue:checked').length - - # Remove inputs - $('.issues_bulk_update .labels-filter input[type="hidden"]').remove() - - # Also restore button text - $('.issues_bulk_update .labels-filter .dropdown-toggle-text').text('Label') - - getIndeterminateIds: -> - label_ids = [] - - $('.selected_issue:checked').each (i, el) -> - issue_id = $(el).data('id') - label_ids.push $("#issue_#{issue_id}").data('labels') - - _.flatten(label_ids) - - getActiveIds: -> - label_ids = [] - - $('.selected_issue:checked').each (i, el) -> - issue_id = $(el).data('id') - label_ids.push $("#issue_#{issue_id}").data('labels') - - _.intersection.apply _, label_ids - - enableBulkLabelDropdown: -> - if $('.selected_issue:checked').length - issuableBulkActions = $('.bulk-update').data('bulkActions') - issuableBulkActions.willUpdateLabels = true diff --git a/app/assets/javascripts/layout_nav.js b/app/assets/javascripts/layout_nav.js new file mode 100644 index 00000000000..ce472f3bcd0 --- /dev/null +++ b/app/assets/javascripts/layout_nav.js @@ -0,0 +1,27 @@ +(function() { + var hideEndFade; + + hideEndFade = function($scrollingTabs) { + return $scrollingTabs.each(function() { + var $this; + $this = $(this); + return $this.siblings('.fade-right').toggleClass('scrolling', $this.width() < $this.prop('scrollWidth')); + }); + }; + + $(function() { + hideEndFade($('.scrolling-tabs')); + $(window).off('resize.nav').on('resize.nav', function() { + return hideEndFade($('.scrolling-tabs')); + }); + return $('.scrolling-tabs').on('scroll', function(event) { + var $this, currentPosition, maxPosition; + $this = $(this); + currentPosition = $this.scrollLeft(); + maxPosition = $this.prop('scrollWidth') - $this.outerWidth(); + $this.siblings('.fade-left').toggleClass('scrolling', currentPosition > 0); + return $this.siblings('.fade-right').toggleClass('scrolling', currentPosition < maxPosition - 1); + }); + }); + +}).call(this); diff --git a/app/assets/javascripts/layout_nav.js.coffee b/app/assets/javascripts/layout_nav.js.coffee deleted file mode 100644 index f639f7f5892..00000000000 --- a/app/assets/javascripts/layout_nav.js.coffee +++ /dev/null @@ -1,24 +0,0 @@ -hideEndFade = ($scrollingTabs) -> - $scrollingTabs.each -> - $this = $(@) - - $this - .siblings('.fade-right') - .toggleClass('scrolling', $this.width() < $this.prop('scrollWidth')) - -$ -> - - hideEndFade($('.scrolling-tabs')) - - $(window) - .off 'resize.nav' - .on 'resize.nav', -> - hideEndFade($('.scrolling-tabs')) - - $('.scrolling-tabs').on 'scroll', (event) -> - $this = $(this) - currentPosition = $this.scrollLeft() - maxPosition = $this.prop('scrollWidth') - $this.outerWidth() - - $this.siblings('.fade-left').toggleClass('scrolling', currentPosition > 0) - $this.siblings('.fade-right').toggleClass('scrolling', currentPosition < maxPosition - 1) diff --git a/app/assets/javascripts/lib/chart.js b/app/assets/javascripts/lib/chart.js new file mode 100644 index 00000000000..8d5e52286b7 --- /dev/null +++ b/app/assets/javascripts/lib/chart.js @@ -0,0 +1,7 @@ + +/*= require Chart */ + +(function() { + + +}).call(this); diff --git a/app/assets/javascripts/lib/chart.js.coffee b/app/assets/javascripts/lib/chart.js.coffee deleted file mode 100644 index 82217fc5107..00000000000 --- a/app/assets/javascripts/lib/chart.js.coffee +++ /dev/null @@ -1 +0,0 @@ -#= require Chart diff --git a/app/assets/javascripts/lib/cropper.js b/app/assets/javascripts/lib/cropper.js new file mode 100644 index 00000000000..8ee81804513 --- /dev/null +++ b/app/assets/javascripts/lib/cropper.js @@ -0,0 +1,7 @@ + +/*= require cropper */ + +(function() { + + +}).call(this); diff --git a/app/assets/javascripts/lib/cropper.js.coffee b/app/assets/javascripts/lib/cropper.js.coffee deleted file mode 100644 index 32536d23fe3..00000000000 --- a/app/assets/javascripts/lib/cropper.js.coffee +++ /dev/null @@ -1 +0,0 @@ -#= require cropper diff --git a/app/assets/javascripts/lib/d3.js b/app/assets/javascripts/lib/d3.js new file mode 100644 index 00000000000..31e6033e756 --- /dev/null +++ b/app/assets/javascripts/lib/d3.js @@ -0,0 +1,7 @@ + +/*= require d3 */ + +(function() { + + +}).call(this); diff --git a/app/assets/javascripts/lib/d3.js.coffee b/app/assets/javascripts/lib/d3.js.coffee deleted file mode 100644 index 74f0a0bb06a..00000000000 --- a/app/assets/javascripts/lib/d3.js.coffee +++ /dev/null @@ -1 +0,0 @@ -#= require d3 diff --git a/app/assets/javascripts/lib/raphael.js b/app/assets/javascripts/lib/raphael.js new file mode 100644 index 00000000000..923c575dcfe --- /dev/null +++ b/app/assets/javascripts/lib/raphael.js @@ -0,0 +1,13 @@ + +/*= require raphael */ + + +/*= require g.raphael */ + + +/*= require g.bar */ + +(function() { + + +}).call(this); diff --git a/app/assets/javascripts/lib/raphael.js.coffee b/app/assets/javascripts/lib/raphael.js.coffee deleted file mode 100644 index ab8e5979b87..00000000000 --- a/app/assets/javascripts/lib/raphael.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -#= require raphael -#= require g.raphael -#= require g.bar diff --git a/app/assets/javascripts/lib/utils/animate.js b/app/assets/javascripts/lib/utils/animate.js new file mode 100644 index 00000000000..d36efdabc93 --- /dev/null +++ b/app/assets/javascripts/lib/utils/animate.js @@ -0,0 +1,49 @@ +(function() { + (function(w) { + if (w.gl == null) { + w.gl = {}; + } + if (gl.animate == null) { + gl.animate = {}; + } + gl.animate.animate = function($el, animation, options, done) { + if ((options != null ? options.cssStart : void 0) != null) { + $el.css(options.cssStart); + } + $el.removeClass(animation + ' animated').addClass(animation + ' animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).removeClass(animation + ' animated'); + if (done != null) { + done(); + } + if ((options != null ? options.cssEnd : void 0) != null) { + $el.css(options.cssEnd); + } + }); + }; + gl.animate.animateEach = function($els, animation, time, options, done) { + var dfd; + dfd = $.Deferred(); + if (!$els.length) { + dfd.resolve(); + } + $els.each(function(i) { + setTimeout((function(_this) { + return function() { + var $this; + $this = $(_this); + return gl.animate.animate($this, animation, options, function() { + if (i === $els.length - 1) { + dfd.resolve(); + if (done != null) { + return done(); + } + } + }); + }; + })(this), time * i); + }); + return dfd.promise(); + }; + })(window); + +}).call(this); diff --git a/app/assets/javascripts/lib/utils/animate.js.coffee b/app/assets/javascripts/lib/utils/animate.js.coffee deleted file mode 100644 index ec3b44d6126..00000000000 --- a/app/assets/javascripts/lib/utils/animate.js.coffee +++ /dev/null @@ -1,39 +0,0 @@ -((w) -> - if not w.gl? then w.gl = {} - if not gl.animate? then gl.animate = {} - - gl.animate.animate = ($el, animation, options, done) -> - if options?.cssStart? - $el.css(options.cssStart) - $el - .removeClass(animation + ' animated') - .addClass(animation + ' animated') - .one 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', -> - $(this).removeClass(animation + ' animated') - if done? - done() - if options?.cssEnd? - $el.css(options.cssEnd) - return - return - - gl.animate.animateEach = ($els, animation, time, options, done) -> - dfd = $.Deferred() - if not $els.length - dfd.resolve() - $els.each((i) -> - setTimeout(=> - $this = $(@) - gl.animate.animate($this, animation, options, => - if i is $els.length - 1 - dfd.resolve() - if done? - done() - ) - ,time * i - ) - return - ) - return dfd.promise() - return -) window \ No newline at end of file diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js new file mode 100644 index 00000000000..9299d0eabd2 --- /dev/null +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -0,0 +1,60 @@ +(function() { + (function(w) { + var base; + w.gl || (w.gl = {}); + (base = w.gl).utils || (base.utils = {}); + w.gl.utils.isInGroupsPage = function() { + return gl.utils.getPagePath() === 'groups'; + }; + w.gl.utils.isInProjectPage = function() { + return gl.utils.getPagePath() === 'projects'; + }; + w.gl.utils.getProjectSlug = function() { + if (this.isInProjectPage()) { + return $('body').data('project'); + } else { + return null; + } + }; + w.gl.utils.getGroupSlug = function() { + if (this.isInGroupsPage()) { + return $('body').data('group'); + } else { + return null; + } + }; + gl.utils.updateTooltipTitle = function($tooltipEl, newTitle) { + return $tooltipEl.tooltip('destroy').attr('title', newTitle).tooltip('fixTitle'); + }; + gl.utils.preventDisabledButtons = function() { + return $('.btn').click(function(e) { + if ($(this).hasClass('disabled')) { + e.preventDefault(); + e.stopImmediatePropagation(); + return false; + } + }); + }; + gl.utils.getPagePath = function() { + return $('body').data('page').split(':')[0]; + }; + return jQuery.timefor = function(time, suffix, expiredLabel) { + var suffixFromNow, timefor; + if (!time) { + return ''; + } + suffix || (suffix = 'remaining'); + expiredLabel || (expiredLabel = 'Past due'); + jQuery.timeago.settings.allowFuture = true; + suffixFromNow = jQuery.timeago.settings.strings.suffixFromNow; + jQuery.timeago.settings.strings.suffixFromNow = suffix; + timefor = $.timeago(time); + if (timefor.indexOf('ago') > -1) { + timefor = expiredLabel; + } + jQuery.timeago.settings.strings.suffixFromNow = suffixFromNow; + return timefor; + }; + })(window); + +}).call(this); diff --git a/app/assets/javascripts/lib/utils/common_utils.js.coffee b/app/assets/javascripts/lib/utils/common_utils.js.coffee deleted file mode 100644 index d4dd3dc329a..00000000000 --- a/app/assets/javascripts/lib/utils/common_utils.js.coffee +++ /dev/null @@ -1,68 +0,0 @@ -((w) -> - - w.gl or= {} - w.gl.utils or= {} - - w.gl.utils.isInGroupsPage = -> - - return gl.utils.getPagePath() is 'groups' - - - w.gl.utils.isInProjectPage = -> - - return gl.utils.getPagePath() is 'projects' - - - w.gl.utils.getProjectSlug = -> - - return if @isInProjectPage() then $('body').data 'project' else null - - - w.gl.utils.getGroupSlug = -> - - return if @isInGroupsPage() then $('body').data 'group' else null - - - - gl.utils.updateTooltipTitle = ($tooltipEl, newTitle) -> - - $tooltipEl - .tooltip 'destroy' - .attr 'title', newTitle - .tooltip 'fixTitle' - - - gl.utils.preventDisabledButtons = -> - - $('.btn').click (e) -> - if $(this).hasClass 'disabled' - e.preventDefault() - e.stopImmediatePropagation() - return false - - gl.utils.getPagePath = -> - return $('body').data('page').split(':')[0] - - - jQuery.timefor = (time, suffix, expiredLabel) -> - - return '' unless time - - suffix or= 'remaining' - expiredLabel or= 'Past due' - - jQuery.timeago.settings.allowFuture = yes - - { suffixFromNow } = jQuery.timeago.settings.strings - jQuery.timeago.settings.strings.suffixFromNow = suffix - - timefor = $.timeago time - - if timefor.indexOf('ago') > -1 - timefor = expiredLabel - - jQuery.timeago.settings.strings.suffixFromNow = suffixFromNow - - return timefor - -) window diff --git a/app/assets/javascripts/lib/utils/datetime_utility.js b/app/assets/javascripts/lib/utils/datetime_utility.js new file mode 100644 index 00000000000..e817261f210 --- /dev/null +++ b/app/assets/javascripts/lib/utils/datetime_utility.js @@ -0,0 +1,36 @@ +(function() { + (function(w) { + var base; + if (w.gl == null) { + w.gl = {}; + } + if ((base = w.gl).utils == null) { + base.utils = {}; + } + w.gl.utils.days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + w.gl.utils.formatDate = function(datetime) { + return dateFormat(datetime, 'mmm d, yyyy h:MMtt Z'); + }; + w.gl.utils.getDayName = function(date) { + return this.days[date.getDay()]; + }; + return w.gl.utils.localTimeAgo = function($timeagoEls, setTimeago) { + if (setTimeago == null) { + setTimeago = true; + } + $timeagoEls.each(function() { + var $el; + $el = $(this); + return $el.attr('title', gl.utils.formatDate($el.attr('datetime'))); + }); + if (setTimeago) { + $timeagoEls.timeago(); + $timeagoEls.tooltip('destroy'); + return $timeagoEls.tooltip({ + template: '' + }); + } + }; + })(window); + +}).call(this); diff --git a/app/assets/javascripts/lib/utils/datetime_utility.js.coffee b/app/assets/javascripts/lib/utils/datetime_utility.js.coffee deleted file mode 100644 index 2371e913844..00000000000 --- a/app/assets/javascripts/lib/utils/datetime_utility.js.coffee +++ /dev/null @@ -1,28 +0,0 @@ -((w) -> - - w.gl ?= {} - w.gl.utils ?= {} - w.gl.utils.days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] - - w.gl.utils.formatDate = (datetime) -> - dateFormat(datetime, 'mmm d, yyyy h:MMtt Z') - - w.gl.utils.getDayName = (date) -> - this.days[date.getDay()] - - w.gl.utils.localTimeAgo = ($timeagoEls, setTimeago = true) -> - $timeagoEls.each( -> - $el = $(@) - $el.attr('title', gl.utils.formatDate($el.attr('datetime'))) - ) - - if setTimeago - $timeagoEls.timeago() - $timeagoEls.tooltip('destroy') - - # Recreate with custom template - $timeagoEls.tooltip( - template: '' - ) - -) window diff --git a/app/assets/javascripts/lib/utils/notify.js b/app/assets/javascripts/lib/utils/notify.js new file mode 100644 index 00000000000..42b6ac0589e --- /dev/null +++ b/app/assets/javascripts/lib/utils/notify.js @@ -0,0 +1,41 @@ +(function() { + (function(w) { + var notificationGranted, notifyMe, notifyPermissions; + notificationGranted = function(message, opts, onclick) { + var notification; + notification = new Notification(message, opts); + setTimeout(function() { + return notification.close(); + }, 8000); + if (onclick) { + return notification.onclick = onclick; + } + }; + notifyPermissions = function() { + if ('Notification' in window) { + return Notification.requestPermission(); + } + }; + notifyMe = function(message, body, icon, onclick) { + var opts; + opts = { + body: body, + icon: icon + }; + if (!('Notification' in window)) { + + } else if (Notification.permission === 'granted') { + return notificationGranted(message, opts, onclick); + } else if (Notification.permission !== 'denied') { + return Notification.requestPermission(function(permission) { + if (permission === 'granted') { + return notificationGranted(message, opts, onclick); + } + }); + } + }; + w.notify = notifyMe; + return w.notifyPermissions = notifyPermissions; + })(window); + +}).call(this); diff --git a/app/assets/javascripts/lib/utils/notify.js.coffee b/app/assets/javascripts/lib/utils/notify.js.coffee deleted file mode 100644 index 9e28353ac34..00000000000 --- a/app/assets/javascripts/lib/utils/notify.js.coffee +++ /dev/null @@ -1,35 +0,0 @@ -((w) -> - notificationGranted = (message, opts, onclick) -> - notification = new Notification(message, opts) - - # Hide the notification after X amount of seconds - setTimeout -> - notification.close() - , 8000 - - if onclick - notification.onclick = onclick - - notifyPermissions = -> - if 'Notification' of window - Notification.requestPermission() - - notifyMe = (message, body, icon, onclick) -> - opts = - body: body - icon: icon - # Let's check if the browser supports notifications - if !('Notification' of window) - # do nothing - else if Notification.permission == 'granted' - # If it's okay let's create a notification - notificationGranted message, opts, onclick - else if Notification.permission != 'denied' - Notification.requestPermission (permission) -> - # If the user accepts, let's create a notification - if permission == 'granted' - notificationGranted message, opts, onclick - - w.notify = notifyMe - w.notifyPermissions = notifyPermissions -) window diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js new file mode 100644 index 00000000000..130479642f3 --- /dev/null +++ b/app/assets/javascripts/lib/utils/text_utility.js @@ -0,0 +1,112 @@ +(function() { + (function(w) { + var base; + if (w.gl == null) { + w.gl = {}; + } + if ((base = w.gl).text == null) { + base.text = {}; + } + gl.text.randomString = function() { + return Math.random().toString(36).substring(7); + }; + gl.text.replaceRange = function(s, start, end, substitute) { + return s.substring(0, start) + substitute + s.substring(end); + }; + gl.text.selectedText = function(text, textarea) { + return text.substring(textarea.selectionStart, textarea.selectionEnd); + }; + gl.text.lineBefore = function(text, textarea) { + var split; + split = text.substring(0, textarea.selectionStart).trim().split('\n'); + return split[split.length - 1]; + }; + gl.text.lineAfter = function(text, textarea) { + return text.substring(textarea.selectionEnd).trim().split('\n')[0]; + }; + gl.text.blockTagText = function(text, textArea, blockTag, selected) { + var lineAfter, lineBefore; + lineBefore = this.lineBefore(text, textArea); + lineAfter = this.lineAfter(text, textArea); + if (lineBefore === blockTag && lineAfter === blockTag) { + if (blockTag != null) { + textArea.selectionStart = textArea.selectionStart - (blockTag.length + 1); + textArea.selectionEnd = textArea.selectionEnd + (blockTag.length + 1); + } + return selected; + } else { + return blockTag + "\n" + selected + "\n" + blockTag; + } + }; + gl.text.insertText = function(textArea, text, tag, blockTag, selected, wrap) { + var insertText, inserted, selectedSplit, startChar; + selectedSplit = selected.split('\n'); + startChar = !wrap && textArea.selectionStart > 0 ? '\n' : ''; + if (selectedSplit.length > 1 && (!wrap || (blockTag != null))) { + if (blockTag != null) { + insertText = this.blockTagText(text, textArea, blockTag, selected); + } else { + insertText = selectedSplit.map(function(val) { + if (val.indexOf(tag) === 0) { + return "" + (val.replace(tag, '')); + } else { + return "" + tag + val; + } + }).join('\n'); + } + } else { + insertText = "" + startChar + tag + selected + (wrap ? tag : ' '); + } + if (document.queryCommandSupported('insertText')) { + inserted = document.execCommand('insertText', false, insertText); + } + if (!inserted) { + try { + document.execCommand("ms-beginUndoUnit"); + } catch (undefined) {} + textArea.value = this.replaceRange(text, textArea.selectionStart, textArea.selectionEnd, insertText); + try { + document.execCommand("ms-endUndoUnit"); + } catch (undefined) {} + } + return this.moveCursor(textArea, tag, wrap); + }; + gl.text.moveCursor = function(textArea, tag, wrapped) { + var pos; + if (!textArea.setSelectionRange) { + return; + } + if (textArea.selectionStart === textArea.selectionEnd) { + if (wrapped) { + pos = textArea.selectionStart - tag.length; + } else { + pos = textArea.selectionStart; + } + return textArea.setSelectionRange(pos, pos); + } + }; + gl.text.updateText = function(textArea, tag, blockTag, wrap) { + var $textArea, oldVal, selected, text; + $textArea = $(textArea); + oldVal = $textArea.val(); + textArea = $textArea.get(0); + text = $textArea.val(); + selected = this.selectedText(text, textArea); + $textArea.focus(); + return this.insertText(textArea, text, tag, blockTag, selected, wrap); + }; + gl.text.init = function(form) { + var self; + self = this; + return $('.js-md', form).off('click').on('click', function() { + var $this; + $this = $(this); + return self.updateText($this.closest('.md-area').find('textarea'), $this.data('md-tag'), $this.data('md-block'), !$this.data('md-prepend')); + }); + }; + return gl.text.removeListeners = function(form) { + return $('.js-md', form).off(); + }; + })(window); + +}).call(this); diff --git a/app/assets/javascripts/lib/utils/text_utility.js.coffee b/app/assets/javascripts/lib/utils/text_utility.js.coffee deleted file mode 100644 index 2e1407f8738..00000000000 --- a/app/assets/javascripts/lib/utils/text_utility.js.coffee +++ /dev/null @@ -1,105 +0,0 @@ -((w) -> - w.gl ?= {} - w.gl.text ?= {} - - gl.text.randomString = -> Math.random().toString(36).substring(7) - - gl.text.replaceRange = (s, start, end, substitute) -> - s.substring(0, start) + substitute + s.substring(end); - - gl.text.selectedText = (text, textarea) -> - text.substring(textarea.selectionStart, textarea.selectionEnd) - - gl.text.lineBefore = (text, textarea) -> - split = text.substring(0, textarea.selectionStart).trim().split('\n') - split[split.length - 1] - - gl.text.lineAfter = (text, textarea) -> - text.substring(textarea.selectionEnd).trim().split('\n')[0] - - gl.text.blockTagText = (text, textArea, blockTag, selected) -> - lineBefore = @lineBefore(text, textArea) - lineAfter = @lineAfter(text, textArea) - - if lineBefore is blockTag and lineAfter is blockTag - # To remove the block tag we have to select the line before & after - if blockTag? - textArea.selectionStart = textArea.selectionStart - (blockTag.length + 1) - textArea.selectionEnd = textArea.selectionEnd + (blockTag.length + 1) - - selected - else - "#{blockTag}\n#{selected}\n#{blockTag}" - - gl.text.insertText = (textArea, text, tag, blockTag, selected, wrap) -> - selectedSplit = selected.split('\n') - startChar = if not wrap and textArea.selectionStart > 0 then '\n' else '' - - if selectedSplit.length > 1 and (not wrap or blockTag?) - if blockTag? - insertText = @blockTagText(text, textArea, blockTag, selected) - else - insertText = selectedSplit.map((val) -> - if val.indexOf(tag) is 0 - "#{val.replace(tag, '')}" - else - "#{tag}#{val}" - ).join('\n') - else - insertText = "#{startChar}#{tag}#{selected}#{if wrap then tag else ' '}" - - if document.queryCommandSupported('insertText') - inserted = document.execCommand 'insertText', false, insertText - - unless inserted - try - document.execCommand("ms-beginUndoUnit") - - textArea.value = @replaceRange( - text, - textArea.selectionStart, - textArea.selectionEnd, - insertText) - try - document.execCommand("ms-endUndoUnit") - - @moveCursor(textArea, tag, wrap) - - gl.text.moveCursor = (textArea, tag, wrapped) -> - return unless textArea.setSelectionRange - - if textArea.selectionStart is textArea.selectionEnd - if wrapped - pos = textArea.selectionStart - tag.length - else - pos = textArea.selectionStart - - textArea.setSelectionRange pos, pos - - gl.text.updateText = (textArea, tag, blockTag, wrap) -> - $textArea = $(textArea) - oldVal = $textArea.val() - textArea = $textArea.get(0) - text = $textArea.val() - selected = @selectedText(text, textArea) - $textArea.focus() - - @insertText(textArea, text, tag, blockTag, selected, wrap) - - gl.text.init = (form) -> - self = @ - $('.js-md', form) - .off 'click' - .on 'click', -> - $this = $(@) - self.updateText( - $this.closest('.md-area').find('textarea'), - $this.data('md-tag'), - $this.data('md-block'), - not $this.data('md-prepend') - ) - - gl.text.removeListeners = (form) -> - $('.js-md', form).off() - -) window diff --git a/app/assets/javascripts/lib/utils/type_utility.js b/app/assets/javascripts/lib/utils/type_utility.js new file mode 100644 index 00000000000..dc30babd645 --- /dev/null +++ b/app/assets/javascripts/lib/utils/type_utility.js @@ -0,0 +1,15 @@ +(function() { + (function(w) { + var base; + if (w.gl == null) { + w.gl = {}; + } + if ((base = w.gl).utils == null) { + base.utils = {}; + } + return w.gl.utils.isObject = function(obj) { + return (obj != null) && (obj.constructor === Object); + }; + })(window); + +}).call(this); diff --git a/app/assets/javascripts/lib/utils/type_utility.js.coffee b/app/assets/javascripts/lib/utils/type_utility.js.coffee deleted file mode 100644 index 957f0d86b36..00000000000 --- a/app/assets/javascripts/lib/utils/type_utility.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -((w) -> - - w.gl ?= {} - w.gl.utils ?= {} - - w.gl.utils.isObject = (obj) -> - obj? and (obj.constructor is Object) - -) window diff --git a/app/assets/javascripts/lib/utils/url_utility.js b/app/assets/javascripts/lib/utils/url_utility.js new file mode 100644 index 00000000000..fffbfd19745 --- /dev/null +++ b/app/assets/javascripts/lib/utils/url_utility.js @@ -0,0 +1,64 @@ +(function() { + (function(w) { + var base; + if (w.gl == null) { + w.gl = {}; + } + if ((base = w.gl).utils == null) { + base.utils = {}; + } + w.gl.utils.getParameterValues = function(sParam) { + var i, sPageURL, sParameterName, sURLVariables, values; + sPageURL = decodeURIComponent(window.location.search.substring(1)); + sURLVariables = sPageURL.split('&'); + sParameterName = void 0; + values = []; + i = 0; + while (i < sURLVariables.length) { + sParameterName = sURLVariables[i].split('='); + if (sParameterName[0] === sParam) { + values.push(sParameterName[1]); + } + i++; + } + return values; + }; + w.gl.utils.mergeUrlParams = function(params, url) { + var lastChar, newUrl, paramName, paramValue, pattern; + newUrl = decodeURIComponent(url); + for (paramName in params) { + paramValue = params[paramName]; + pattern = new RegExp("\\b(" + paramName + "=).*?(&|$)"); + if (paramValue == null) { + newUrl = newUrl.replace(pattern, ''); + } else if (url.search(pattern) !== -1) { + newUrl = newUrl.replace(pattern, "$1" + paramValue + "$2"); + } else { + newUrl = "" + newUrl + (newUrl.indexOf('?') > 0 ? '&' : '?') + paramName + "=" + paramValue; + } + } + lastChar = newUrl[newUrl.length - 1]; + if (lastChar === '&') { + newUrl = newUrl.slice(0, -1); + } + return newUrl; + }; + return w.gl.utils.removeParamQueryString = function(url, param) { + var urlVariables, variables; + url = decodeURIComponent(url); + urlVariables = url.split('&'); + return ((function() { + var j, len, results; + results = []; + for (j = 0, len = urlVariables.length; j < len; j++) { + variables = urlVariables[j]; + if (variables.indexOf(param) === -1) { + results.push(variables); + } + } + return results; + })()).join('&'); + }; + })(window); + +}).call(this); diff --git a/app/assets/javascripts/lib/utils/url_utility.js.coffee b/app/assets/javascripts/lib/utils/url_utility.js.coffee deleted file mode 100644 index e8085e1c2e4..00000000000 --- a/app/assets/javascripts/lib/utils/url_utility.js.coffee +++ /dev/null @@ -1,52 +0,0 @@ -((w) -> - - w.gl ?= {} - w.gl.utils ?= {} - - # Returns an array containing the value(s) of the - # of the key passed as an argument - w.gl.utils.getParameterValues = (sParam) -> - sPageURL = decodeURIComponent(window.location.search.substring(1)) - sURLVariables = sPageURL.split('&') - sParameterName = undefined - values = [] - i = 0 - while i < sURLVariables.length - sParameterName = sURLVariables[i].split('=') - if sParameterName[0] is sParam - values.push(sParameterName[1]) - i++ - values - - # # - # @param {Object} params - url keys and value to merge - # @param {String} url - # # - w.gl.utils.mergeUrlParams = (params, url) -> - newUrl = decodeURIComponent(url) - for paramName, paramValue of params - pattern = new RegExp "\\b(#{paramName}=).*?(&|$)" - if not paramValue? - newUrl = newUrl.replace pattern, '' - else if url.search(pattern) isnt -1 - newUrl = newUrl.replace pattern, "$1#{paramValue}$2" - else - newUrl = "#{newUrl}#{(if newUrl.indexOf('?') > 0 then '&' else '?')}#{paramName}=#{paramValue}" - - # Remove a trailing ampersand - lastChar = newUrl[newUrl.length - 1] - - if lastChar is '&' - newUrl = newUrl.slice 0, -1 - - newUrl - - # removes parameter query string from url. returns the modified url - w.gl.utils.removeParamQueryString = (url, param) -> - url = decodeURIComponent(url) - urlVariables = url.split('&') - ( - variables for variables in urlVariables when variables.indexOf(param) is -1 - ).join('&') - -) window diff --git a/app/assets/javascripts/line_highlighter.js b/app/assets/javascripts/line_highlighter.js new file mode 100644 index 00000000000..f145bd3ad74 --- /dev/null +++ b/app/assets/javascripts/line_highlighter.js @@ -0,0 +1,115 @@ + +/*= require jquery.scrollTo */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.LineHighlighter = (function() { + LineHighlighter.prototype.highlightClass = 'hll'; + + LineHighlighter.prototype._hash = ''; + + function LineHighlighter(hash) { + var range; + if (hash == null) { + hash = location.hash; + } + this.setHash = bind(this.setHash, this); + this.highlightLine = bind(this.highlightLine, this); + this.clickHandler = bind(this.clickHandler, this); + this._hash = hash; + this.bindEvents(); + if (hash !== '') { + range = this.hashToRange(hash); + if (range[0]) { + this.highlightRange(range); + $.scrollTo("#L" + range[0], { + offset: -150 + }); + } + } + } + + LineHighlighter.prototype.bindEvents = function() { + $('#blob-content-holder').on('mousedown', 'a[data-line-number]', this.clickHandler); + return $('#blob-content-holder').on('click', 'a[data-line-number]', function(event) { + return event.preventDefault(); + }); + }; + + LineHighlighter.prototype.clickHandler = function(event) { + var current, lineNumber, range; + event.preventDefault(); + this.clearHighlight(); + lineNumber = $(event.target).closest('a').data('line-number'); + current = this.hashToRange(this._hash); + if (!(current[0] && event.shiftKey)) { + this.setHash(lineNumber); + return this.highlightLine(lineNumber); + } else if (event.shiftKey) { + if (lineNumber < current[0]) { + range = [lineNumber, current[0]]; + } else { + range = [current[0], lineNumber]; + } + this.setHash(range[0], range[1]); + return this.highlightRange(range); + } + }; + + LineHighlighter.prototype.clearHighlight = function() { + return $("." + this.highlightClass).removeClass(this.highlightClass); + }; + + LineHighlighter.prototype.hashToRange = function(hash) { + var first, last, matches; + matches = hash.match(/^#?L(\d+)(?:-(\d+))?$/); + if (matches && matches.length) { + first = parseInt(matches[1]); + last = matches[2] ? parseInt(matches[2]) : null; + return [first, last]; + } else { + return [null, null]; + } + }; + + LineHighlighter.prototype.highlightLine = function(lineNumber) { + return $("#LC" + lineNumber).addClass(this.highlightClass); + }; + + LineHighlighter.prototype.highlightRange = function(range) { + var i, lineNumber, ref, ref1, results; + if (range[1]) { + results = []; + for (lineNumber = i = ref = range[0], ref1 = range[1]; ref <= ref1 ? i <= ref1 : i >= ref1; lineNumber = ref <= ref1 ? ++i : --i) { + results.push(this.highlightLine(lineNumber)); + } + return results; + } else { + return this.highlightLine(range[0]); + } + }; + + LineHighlighter.prototype.setHash = function(firstLineNumber, lastLineNumber) { + var hash; + if (lastLineNumber) { + hash = "#L" + firstLineNumber + "-" + lastLineNumber; + } else { + hash = "#L" + firstLineNumber; + } + this._hash = hash; + return this.__setLocationHash__(hash); + }; + + LineHighlighter.prototype.__setLocationHash__ = function(value) { + return history.pushState({ + turbolinks: false, + url: value + }, document.title, value); + }; + + return LineHighlighter; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/line_highlighter.js.coffee b/app/assets/javascripts/line_highlighter.js.coffee deleted file mode 100644 index 2254a3f91ae..00000000000 --- a/app/assets/javascripts/line_highlighter.js.coffee +++ /dev/null @@ -1,148 +0,0 @@ -# LineHighlighter -# -# Handles single- and multi-line selection and highlight for blob views. -# -#= require jquery.scrollTo -# -# ### Example Markup -# -#
                -#
                -#
                -# 1 -# 2 -# 3 -# 4 -# 5 -#
                -#
                -#         
                -#           ...
                -#           ...
                -#           ...
                -#           ...
                -#           ...
                -#         
                -#       
                -#
                -#
                -# -class @LineHighlighter - # CSS class applied to highlighted lines - highlightClass: 'hll' - - # Internal copy of location.hash so we're not dependent on `location` in tests - _hash: '' - - # Initialize a LineHighlighter object - # - # hash - String URL hash for dependency injection in tests - constructor: (hash = location.hash) -> - @_hash = hash - - @bindEvents() - - unless hash == '' - range = @hashToRange(hash) - - if range[0] - @highlightRange(range) - - # Scroll to the first highlighted line on initial load - # Offset -50 for the sticky top bar, and another -100 for some context - $.scrollTo("#L#{range[0]}", offset: -150) - - bindEvents: -> - $('#blob-content-holder').on 'mousedown', 'a[data-line-number]', @clickHandler - - # While it may seem odd to bind to the mousedown event and then throw away - # the click event, there is a method to our madness. - # - # If not done this way, the line number anchor will sometimes keep its - # active state even when the event is cancelled, resulting in an ugly border - # around the link and/or a persisted underline text decoration. - - $('#blob-content-holder').on 'click', 'a[data-line-number]', (event) -> - event.preventDefault() - - clickHandler: (event) => - event.preventDefault() - - @clearHighlight() - - lineNumber = $(event.target).closest('a').data('line-number') - current = @hashToRange(@_hash) - - unless current[0] && event.shiftKey - # If there's no current selection, or there is but Shift wasn't held, - # treat this like a single-line selection. - @setHash(lineNumber) - @highlightLine(lineNumber) - else if event.shiftKey - if lineNumber < current[0] - range = [lineNumber, current[0]] - else - range = [current[0], lineNumber] - - @setHash(range[0], range[1]) - @highlightRange(range) - - # Unhighlight previously highlighted lines - clearHighlight: -> - $(".#{@highlightClass}").removeClass(@highlightClass) - - # Convert a URL hash String into line numbers - # - # hash - Hash String - # - # Examples: - # - # hashToRange('#L5') # => [5, null] - # hashToRange('#L5-15') # => [5, 15] - # hashToRange('#foo') # => [null, null] - # - # Returns an Array - hashToRange: (hash) -> - matches = hash.match(/^#?L(\d+)(?:-(\d+))?$/) - - if matches && matches.length - first = parseInt(matches[1]) - last = if matches[2] then parseInt(matches[2]) else null - - [first, last] - else - [null, null] - - # Highlight a single line - # - # lineNumber - Line number to highlight - highlightLine: (lineNumber) => - $("#LC#{lineNumber}").addClass(@highlightClass) - - # Highlight all lines within a range - # - # range - Array containing the starting and ending line numbers - highlightRange: (range) -> - if range[1] - for lineNumber in [range[0]..range[1]] - @highlightLine(lineNumber) - else - @highlightLine(range[0]) - - # Set the URL hash string - setHash: (firstLineNumber, lastLineNumber) => - if lastLineNumber - hash = "#L#{firstLineNumber}-#{lastLineNumber}" - else - hash = "#L#{firstLineNumber}" - - @_hash = hash - @__setLocationHash__(hash) - - # Make the actual hash change in the browser - # - # This method is stubbed in tests. - __setLocationHash__: (value) -> - # We're using pushState instead of assigning location.hash directly to - # prevent the page from scrolling on the hashchange event - history.pushState({turbolinks: false, url: value}, document.title, value) diff --git a/app/assets/javascripts/logo.js b/app/assets/javascripts/logo.js new file mode 100644 index 00000000000..218f24fe908 --- /dev/null +++ b/app/assets/javascripts/logo.js @@ -0,0 +1,54 @@ +(function() { + var clearHighlights, currentTimer, defaultClass, delay, firstPiece, pieceIndex, pieces, start, stop, work; + + Turbolinks.enableProgressBar(); + + defaultClass = 'tanuki-shape'; + + pieces = ['path#tanuki-right-cheek', 'path#tanuki-right-eye, path#tanuki-right-ear', 'path#tanuki-nose', 'path#tanuki-left-eye, path#tanuki-left-ear', 'path#tanuki-left-cheek']; + + pieceIndex = 0; + + firstPiece = pieces[0]; + + currentTimer = null; + + delay = 150; + + clearHighlights = function() { + return $("." + defaultClass + ".highlight").attr('class', defaultClass); + }; + + start = function() { + clearHighlights(); + pieceIndex = 0; + if (pieces[0] !== firstPiece) { + pieces.reverse(); + } + if (currentTimer) { + clearInterval(currentTimer); + } + return currentTimer = setInterval(work, delay); + }; + + stop = function() { + clearInterval(currentTimer); + return clearHighlights(); + }; + + work = function() { + clearHighlights(); + $(pieces[pieceIndex]).attr('class', defaultClass + " highlight"); + if (pieceIndex === pieces.length - 1) { + pieceIndex = 0; + return pieces.reverse(); + } else { + return pieceIndex++; + } + }; + + $(document).on('page:fetch', start); + + $(document).on('page:change', stop); + +}).call(this); diff --git a/app/assets/javascripts/logo.js.coffee b/app/assets/javascripts/logo.js.coffee deleted file mode 100644 index dc2590a0355..00000000000 --- a/app/assets/javascripts/logo.js.coffee +++ /dev/null @@ -1,44 +0,0 @@ -Turbolinks.enableProgressBar(); - -defaultClass = 'tanuki-shape' -pieces = [ - 'path#tanuki-right-cheek', - 'path#tanuki-right-eye, path#tanuki-right-ear', - 'path#tanuki-nose', - 'path#tanuki-left-eye, path#tanuki-left-ear', - 'path#tanuki-left-cheek', -] -pieceIndex = 0 -firstPiece = pieces[0] - -currentTimer = null -delay = 150 - -clearHighlights = -> - $(".#{defaultClass}.highlight").attr('class', defaultClass) - -start = -> - clearHighlights() - pieceIndex = 0 - pieces.reverse() unless pieces[0] == firstPiece - clearInterval(currentTimer) if currentTimer - currentTimer = setInterval(work, delay) - -stop = -> - clearInterval(currentTimer) - clearHighlights() - -work = -> - clearHighlights() - $(pieces[pieceIndex]).attr('class', "#{defaultClass} highlight") - - # If we hit the last piece, reset the index and then reverse the array to - # get a nice back-and-forth sweeping look - if pieceIndex == pieces.length - 1 - pieceIndex = 0 - pieces.reverse() - else - pieceIndex++ - -$(document).on('page:fetch', start) -$(document).on('page:change', stop) diff --git a/app/assets/javascripts/markdown_preview.js b/app/assets/javascripts/markdown_preview.js new file mode 100644 index 00000000000..18fc7bae09a --- /dev/null +++ b/app/assets/javascripts/markdown_preview.js @@ -0,0 +1,150 @@ +(function() { + var lastTextareaPreviewed, markdownPreview, previewButtonSelector, writeButtonSelector; + + this.MarkdownPreview = (function() { + function MarkdownPreview() {} + + MarkdownPreview.prototype.referenceThreshold = 10; + + MarkdownPreview.prototype.ajaxCache = {}; + + MarkdownPreview.prototype.showPreview = function(form) { + var mdText, preview; + preview = form.find('.js-md-preview'); + mdText = form.find('textarea.markdown-area').val(); + if (mdText.trim().length === 0) { + preview.text('Nothing to preview.'); + return this.hideReferencedUsers(form); + } else { + preview.text('Loading...'); + return this.renderMarkdown(mdText, (function(_this) { + return function(response) { + preview.html(response.body); + preview.syntaxHighlight(); + return _this.renderReferencedUsers(response.references.users, form); + }; + })(this)); + } + }; + + MarkdownPreview.prototype.renderMarkdown = function(text, success) { + if (!window.markdown_preview_path) { + return; + } + if (text === this.ajaxCache.text) { + return success(this.ajaxCache.response); + } + return $.ajax({ + type: 'POST', + url: window.markdown_preview_path, + data: { + text: text + }, + dataType: 'json', + success: (function(_this) { + return function(response) { + _this.ajaxCache = { + text: text, + response: response + }; + return success(response); + }; + })(this) + }); + }; + + MarkdownPreview.prototype.hideReferencedUsers = function(form) { + var referencedUsers; + referencedUsers = form.find('.referenced-users'); + return referencedUsers.hide(); + }; + + MarkdownPreview.prototype.renderReferencedUsers = function(users, form) { + var referencedUsers; + referencedUsers = form.find('.referenced-users'); + if (referencedUsers.length) { + if (users.length >= this.referenceThreshold) { + referencedUsers.show(); + return referencedUsers.find('.js-referenced-users-count').text(users.length); + } else { + return referencedUsers.hide(); + } + } + }; + + return MarkdownPreview; + + })(); + + markdownPreview = new MarkdownPreview(); + + previewButtonSelector = '.js-md-preview-button'; + + writeButtonSelector = '.js-md-write-button'; + + lastTextareaPreviewed = null; + + $.fn.setupMarkdownPreview = function() { + var $form, form_textarea; + $form = $(this); + form_textarea = $form.find('textarea.markdown-area'); + form_textarea.on('input', function() { + return markdownPreview.hideReferencedUsers($form); + }); + return form_textarea.on('blur', function() { + return markdownPreview.showPreview($form); + }); + }; + + $(document).on('markdown-preview:show', function(e, $form) { + if (!$form) { + return; + } + lastTextareaPreviewed = $form.find('textarea.markdown-area'); + $form.find(writeButtonSelector).parent().removeClass('active'); + $form.find(previewButtonSelector).parent().addClass('active'); + $form.find('.md-write-holder').hide(); + $form.find('.md-preview-holder').show(); + return markdownPreview.showPreview($form); + }); + + $(document).on('markdown-preview:hide', function(e, $form) { + if (!$form) { + return; + } + lastTextareaPreviewed = null; + $form.find(writeButtonSelector).parent().addClass('active'); + $form.find(previewButtonSelector).parent().removeClass('active'); + $form.find('.md-write-holder').show(); + $form.find('textarea.markdown-area').focus(); + return $form.find('.md-preview-holder').hide(); + }); + + $(document).on('markdown-preview:toggle', function(e, keyboardEvent) { + var $target; + $target = $(keyboardEvent.target); + if ($target.is('textarea.markdown-area')) { + $(document).triggerHandler('markdown-preview:show', [$target.closest('form')]); + return keyboardEvent.preventDefault(); + } else if (lastTextareaPreviewed) { + $target = lastTextareaPreviewed; + $(document).triggerHandler('markdown-preview:hide', [$target.closest('form')]); + return keyboardEvent.preventDefault(); + } + }); + + $(document).on('click', previewButtonSelector, function(e) { + var $form; + e.preventDefault(); + $form = $(this).closest('form'); + return $(document).triggerHandler('markdown-preview:show', [$form]); + }); + + $(document).on('click', writeButtonSelector, function(e) { + var $form; + e.preventDefault(); + $form = $(this).closest('form'); + return $(document).triggerHandler('markdown-preview:hide', [$form]); + }); + +}).call(this); diff --git a/app/assets/javascripts/markdown_preview.js.coffee b/app/assets/javascripts/markdown_preview.js.coffee deleted file mode 100644 index 2a0b9479445..00000000000 --- a/app/assets/javascripts/markdown_preview.js.coffee +++ /dev/null @@ -1,119 +0,0 @@ -# MarkdownPreview -# -# Handles toggling the "Write" and "Preview" tab clicks, rendering the preview, -# and showing a warning when more than `x` users are referenced. -# -class @MarkdownPreview - # Minimum number of users referenced before triggering a warning - referenceThreshold: 10 - ajaxCache: {} - - showPreview: (form) -> - preview = form.find('.js-md-preview') - mdText = form.find('textarea.markdown-area').val() - - if mdText.trim().length == 0 - preview.text('Nothing to preview.') - @hideReferencedUsers(form) - else - preview.text('Loading...') - @renderMarkdown mdText, (response) => - preview.html(response.body) - preview.syntaxHighlight() - @renderReferencedUsers(response.references.users, form) - - renderMarkdown: (text, success) -> - return unless window.markdown_preview_path - - return success(@ajaxCache.response) if text == @ajaxCache.text - - $.ajax - type: 'POST' - url: window.markdown_preview_path - data: { text: text } - dataType: 'json' - success: (response) => - @ajaxCache = text: text, response: response - success(response) - - hideReferencedUsers: (form) -> - referencedUsers = form.find('.referenced-users') - referencedUsers.hide() - - renderReferencedUsers: (users, form) -> - referencedUsers = form.find('.referenced-users') - - if referencedUsers.length - if users.length >= @referenceThreshold - referencedUsers.show() - referencedUsers.find('.js-referenced-users-count').text(users.length) - else - referencedUsers.hide() - -markdownPreview = new MarkdownPreview() - -previewButtonSelector = '.js-md-preview-button' -writeButtonSelector = '.js-md-write-button' -lastTextareaPreviewed = null - -$.fn.setupMarkdownPreview = -> - $form = $(this) - - form_textarea = $form.find('textarea.markdown-area') - - form_textarea.on 'input', -> markdownPreview.hideReferencedUsers($form) - form_textarea.on 'blur', -> markdownPreview.showPreview($form) - -$(document).on 'markdown-preview:show', (e, $form) -> - return unless $form - - lastTextareaPreviewed = $form.find('textarea.markdown-area') - - # toggle tabs - $form.find(writeButtonSelector).parent().removeClass('active') - $form.find(previewButtonSelector).parent().addClass('active') - - # toggle content - $form.find('.md-write-holder').hide() - $form.find('.md-preview-holder').show() - - markdownPreview.showPreview($form) - -$(document).on 'markdown-preview:hide', (e, $form) -> - return unless $form - - lastTextareaPreviewed = null - - # toggle tabs - $form.find(writeButtonSelector).parent().addClass('active') - $form.find(previewButtonSelector).parent().removeClass('active') - - # toggle content - $form.find('.md-write-holder').show() - $form.find('textarea.markdown-area').focus() - $form.find('.md-preview-holder').hide() - -$(document).on 'markdown-preview:toggle', (e, keyboardEvent) -> - $target = $(keyboardEvent.target) - - if $target.is('textarea.markdown-area') - $(document).triggerHandler('markdown-preview:show', [$target.closest('form')]) - keyboardEvent.preventDefault() - else if lastTextareaPreviewed - $target = lastTextareaPreviewed - $(document).triggerHandler('markdown-preview:hide', [$target.closest('form')]) - keyboardEvent.preventDefault() - -$(document).on 'click', previewButtonSelector, (e) -> - e.preventDefault() - - $form = $(this).closest('form') - - $(document).triggerHandler('markdown-preview:show', [$form]) - -$(document).on 'click', writeButtonSelector, (e) -> - e.preventDefault() - - $form = $(this).closest('form') - - $(document).triggerHandler('markdown-preview:hide', [$form]) diff --git a/app/assets/javascripts/merge_request.js b/app/assets/javascripts/merge_request.js new file mode 100644 index 00000000000..47e6dd1084d --- /dev/null +++ b/app/assets/javascripts/merge_request.js @@ -0,0 +1,105 @@ + +/*= require jquery.waitforimages */ + + +/*= require task_list */ + + +/*= require merge_request_tabs */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.MergeRequest = (function() { + function MergeRequest(opts) { + this.opts = opts != null ? opts : {}; + this.submitNoteForm = bind(this.submitNoteForm, this); + this.$el = $('.merge-request'); + this.$('.show-all-commits').on('click', (function(_this) { + return function() { + return _this.showAllCommits(); + }; + })(this)); + this.initTabs(); + this.disableTaskList(); + this.initMRBtnListeners(); + if ($("a.btn-close").length) { + this.initTaskList(); + } + } + + MergeRequest.prototype.$ = function(selector) { + return this.$el.find(selector); + }; + + MergeRequest.prototype.initTabs = function() { + if (this.opts.action !== 'new') { + return new MergeRequestTabs(this.opts); + } else { + return $('.merge-request-tabs a[data-toggle="tab"]:first').tab('show'); + } + }; + + MergeRequest.prototype.showAllCommits = function() { + this.$('.first-commits').remove(); + return this.$('.all-commits').removeClass('hide'); + }; + + MergeRequest.prototype.initTaskList = function() { + $('.detail-page-description .js-task-list-container').taskList('enable'); + return $(document).on('tasklist:changed', '.detail-page-description .js-task-list-container', this.updateTaskList); + }; + + MergeRequest.prototype.initMRBtnListeners = function() { + var _this; + _this = this; + return $('a.btn-close, a.btn-reopen').on('click', function(e) { + var $this, shouldSubmit; + $this = $(this); + shouldSubmit = $this.hasClass('btn-comment'); + if (shouldSubmit && $this.data('submitted')) { + return; + } + if (shouldSubmit) { + if ($this.hasClass('btn-comment-and-close') || $this.hasClass('btn-comment-and-reopen')) { + e.preventDefault(); + e.stopImmediatePropagation(); + return _this.submitNoteForm($this.closest('form'), $this); + } + } + }); + }; + + MergeRequest.prototype.submitNoteForm = function(form, $button) { + var noteText; + noteText = form.find("textarea.js-note-text").val(); + if (noteText.trim().length > 0) { + form.submit(); + $button.data('submitted', true); + return $button.trigger('click'); + } + }; + + MergeRequest.prototype.disableTaskList = function() { + $('.detail-page-description .js-task-list-container').taskList('disable'); + return $(document).off('tasklist:changed', '.detail-page-description .js-task-list-container'); + }; + + MergeRequest.prototype.updateTaskList = function() { + var patchData; + patchData = {}; + patchData['merge_request'] = { + 'description': $('.js-task-list-field', this).val() + }; + return $.ajax({ + type: 'PATCH', + url: $('form.js-issuable-update').attr('action'), + data: patchData + }); + }; + + return MergeRequest; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/merge_request.js.coffee b/app/assets/javascripts/merge_request.js.coffee deleted file mode 100644 index dabfd91cf14..00000000000 --- a/app/assets/javascripts/merge_request.js.coffee +++ /dev/null @@ -1,82 +0,0 @@ -#= require jquery.waitforimages -#= require task_list - -#= require merge_request_tabs - -class @MergeRequest - # Initialize MergeRequest behavior - # - # Options: - # action - String, current controller action - # - constructor: (@opts = {}) -> - this.$el = $('.merge-request') - - this.$('.show-all-commits').on 'click', => - this.showAllCommits() - - @initTabs() - - # Prevent duplicate event bindings - @disableTaskList() - @initMRBtnListeners() - - if $("a.btn-close").length - @initTaskList() - - # Local jQuery finder - $: (selector) -> - this.$el.find(selector) - - initTabs: -> - if @opts.action != 'new' - # `MergeRequests#new` has no tab-persisting or lazy-loading behavior - new MergeRequestTabs(@opts) - else - # Show the first tab (Commits) - $('.merge-request-tabs a[data-toggle="tab"]:first').tab('show') - - showAllCommits: -> - this.$('.first-commits').remove() - this.$('.all-commits').removeClass 'hide' - - initTaskList: -> - $('.detail-page-description .js-task-list-container').taskList('enable') - $(document).on 'tasklist:changed', '.detail-page-description .js-task-list-container', @updateTaskList - - initMRBtnListeners: -> - _this = @ - $('a.btn-close, a.btn-reopen').on 'click', (e) -> - $this = $(this) - shouldSubmit = $this.hasClass('btn-comment') - if shouldSubmit && $this.data('submitted') - return - if shouldSubmit - if $this.hasClass('btn-comment-and-close') || $this.hasClass('btn-comment-and-reopen') - e.preventDefault() - e.stopImmediatePropagation() - _this.submitNoteForm($this.closest('form'),$this) - - - submitNoteForm: (form, $button) => - noteText = form.find("textarea.js-note-text").val() - if noteText.trim().length > 0 - form.submit() - $button.data('submitted',true) - $button.trigger('click') - - - disableTaskList: -> - $('.detail-page-description .js-task-list-container').taskList('disable') - $(document).off 'tasklist:changed', '.detail-page-description .js-task-list-container' - - # TODO (rspeicher): Make the merge request description inline-editable like a - # note so that we can re-use its form here - updateTaskList: -> - patchData = {} - patchData['merge_request'] = {'description': $('.js-task-list-field', this).val()} - - $.ajax - type: 'PATCH' - url: $('form.js-issuable-update').attr('action') - data: patchData diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js new file mode 100644 index 00000000000..52c2ed61012 --- /dev/null +++ b/app/assets/javascripts/merge_request_tabs.js @@ -0,0 +1,239 @@ + +/*= require jquery.cookie */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.MergeRequestTabs = (function() { + MergeRequestTabs.prototype.diffsLoaded = false; + + MergeRequestTabs.prototype.buildsLoaded = false; + + MergeRequestTabs.prototype.commitsLoaded = false; + + function MergeRequestTabs(opts) { + this.opts = opts != null ? opts : {}; + this.setCurrentAction = bind(this.setCurrentAction, this); + this.tabShown = bind(this.tabShown, this); + this.showTab = bind(this.showTab, this); + this._location = location; + this.bindEvents(); + this.activateTab(this.opts.action); + } + + MergeRequestTabs.prototype.bindEvents = function() { + $(document).on('shown.bs.tab', '.merge-request-tabs a[data-toggle="tab"]', this.tabShown); + return $(document).on('click', '.js-show-tab', this.showTab); + }; + + MergeRequestTabs.prototype.showTab = function(event) { + event.preventDefault(); + return this.activateTab($(event.target).data('action')); + }; + + MergeRequestTabs.prototype.tabShown = function(event) { + var $target, action, navBarHeight; + $target = $(event.target); + action = $target.data('action'); + if (action === 'commits') { + this.loadCommits($target.attr('href')); + this.expandView(); + } else if (action === 'diffs') { + this.loadDiff($target.attr('href')); + if ((typeof bp !== "undefined" && bp !== null) && bp.getBreakpointSize() !== 'lg') { + this.shrinkView(); + } + navBarHeight = $('.navbar-gitlab').outerHeight(); + $.scrollTo(".merge-request-details .merge-request-tabs", { + offset: -navBarHeight + }); + } else if (action === 'builds') { + this.loadBuilds($target.attr('href')); + this.expandView(); + } else { + this.expandView(); + } + return this.setCurrentAction(action); + }; + + MergeRequestTabs.prototype.scrollToElement = function(container) { + var $el, navBarHeight; + if (window.location.hash) { + navBarHeight = $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight(); + $el = $(container + " " + window.location.hash + ":not(.match)"); + if ($el.length) { + return $.scrollTo(container + " " + window.location.hash + ":not(.match)", { + offset: -navBarHeight + }); + } + } + }; + + MergeRequestTabs.prototype.activateTab = function(action) { + if (action === 'show') { + action = 'notes'; + } + return $(".merge-request-tabs a[data-action='" + action + "']").tab('show'); + }; + + MergeRequestTabs.prototype.setCurrentAction = function(action) { + var new_state; + if (action === 'show') { + action = 'notes'; + } + new_state = this._location.pathname.replace(/\/(commits|diffs|builds)(\.html)?\/?$/, ''); + if (action !== 'notes') { + new_state += "/" + action; + } + new_state += this._location.search + this._location.hash; + history.replaceState({ + turbolinks: true, + url: new_state + }, document.title, new_state); + return new_state; + }; + + MergeRequestTabs.prototype.loadCommits = function(source) { + if (this.commitsLoaded) { + return; + } + return this._get({ + url: source + ".json", + success: (function(_this) { + return function(data) { + document.querySelector("div#commits").innerHTML = data.html; + gl.utils.localTimeAgo($('.js-timeago', 'div#commits')); + _this.commitsLoaded = true; + return _this.scrollToElement("#commits"); + }; + })(this) + }); + }; + + MergeRequestTabs.prototype.loadDiff = function(source) { + if (this.diffsLoaded) { + return; + } + return this._get({ + url: (source + ".json") + this._location.search, + success: (function(_this) { + return function(data) { + $('#diffs').html(data.html); + gl.utils.localTimeAgo($('.js-timeago', 'div#diffs')); + $('#diffs .js-syntax-highlight').syntaxHighlight(); + $('#diffs .diff-file').singleFileDiff(); + if (_this.diffViewType() === 'parallel') { + _this.expandViewContainer(); + } + _this.diffsLoaded = true; + _this.scrollToElement("#diffs"); + _this.highlighSelectedLine(); + _this.filesCommentButton = $('.files .diff-file').filesCommentButton(); + return $(document).off('click', '.diff-line-num a').on('click', '.diff-line-num a', function(e) { + e.preventDefault(); + window.location.hash = $(e.currentTarget).attr('href'); + _this.highlighSelectedLine(); + return _this.scrollToElement("#diffs"); + }); + }; + })(this) + }); + }; + + MergeRequestTabs.prototype.highlighSelectedLine = function() { + var $diffLine, diffLineTop, hashClassString, locationHash, navBarHeight; + $('.hll').removeClass('hll'); + locationHash = window.location.hash; + if (locationHash !== '') { + hashClassString = "." + (locationHash.replace('#', '')); + $diffLine = $(locationHash + ":not(.match)", $('#diffs')); + if (!$diffLine.is('tr')) { + $diffLine = $('#diffs').find("td" + locationHash + ", td" + hashClassString); + } else { + $diffLine = $diffLine.find('td'); + } + if ($diffLine.length) { + $diffLine.addClass('hll'); + diffLineTop = $diffLine.offset().top; + return navBarHeight = $('.navbar-gitlab').outerHeight(); + } + } + }; + + MergeRequestTabs.prototype.loadBuilds = function(source) { + if (this.buildsLoaded) { + return; + } + return this._get({ + url: source + ".json", + success: (function(_this) { + return function(data) { + document.querySelector("div#builds").innerHTML = data.html; + gl.utils.localTimeAgo($('.js-timeago', 'div#builds')); + _this.buildsLoaded = true; + return _this.scrollToElement("#builds"); + }; + })(this) + }); + }; + + MergeRequestTabs.prototype.toggleLoading = function(status) { + return $('.mr-loading-status .loading').toggle(status); + }; + + MergeRequestTabs.prototype._get = function(options) { + var defaults; + defaults = { + beforeSend: (function(_this) { + return function() { + return _this.toggleLoading(true); + }; + })(this), + complete: (function(_this) { + return function() { + return _this.toggleLoading(false); + }; + })(this), + dataType: 'json', + type: 'GET' + }; + options = $.extend({}, defaults, options); + return $.ajax(options); + }; + + MergeRequestTabs.prototype.diffViewType = function() { + return $('.inline-parallel-buttons a.active').data('view-type'); + }; + + MergeRequestTabs.prototype.expandViewContainer = function() { + return $('.container-fluid').removeClass('container-limited'); + }; + + MergeRequestTabs.prototype.shrinkView = function() { + var $gutterIcon; + $gutterIcon = $('.js-sidebar-toggle i:visible'); + return setTimeout(function() { + if ($gutterIcon.is('.fa-angle-double-right')) { + return $gutterIcon.closest('a').trigger('click', [true]); + } + }, 0); + }; + + MergeRequestTabs.prototype.expandView = function() { + var $gutterIcon; + if ($.cookie('collapsed_gutter') === 'true') { + return; + } + $gutterIcon = $('.js-sidebar-toggle i:visible'); + return setTimeout(function() { + if ($gutterIcon.is('.fa-angle-double-left')) { + return $gutterIcon.closest('a').trigger('click', [true]); + } + }, 0); + }; + + return MergeRequestTabs; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee deleted file mode 100644 index 86539e0d725..00000000000 --- a/app/assets/javascripts/merge_request_tabs.js.coffee +++ /dev/null @@ -1,252 +0,0 @@ -# MergeRequestTabs -# -# Handles persisting and restoring the current tab selection and lazily-loading -# content on the MergeRequests#show page. -# -#= require jquery.cookie -# -# ### Example Markup -# -# -# -#
                -#
                -# Notes Content -#
                -#
                -# Commits Content -#
                -#
                -# Diffs Content -#
                -#
                -# -#
                -#
                -# Loading Animation -#
                -#
                -# -class @MergeRequestTabs - diffsLoaded: false - buildsLoaded: false - commitsLoaded: false - - constructor: (@opts = {}) -> - # Store the `location` object, allowing for easier stubbing in tests - @_location = location - - @bindEvents() - @activateTab(@opts.action) - - bindEvents: -> - $(document).on 'shown.bs.tab', '.merge-request-tabs a[data-toggle="tab"]', @tabShown - $(document).on 'click', '.js-show-tab', @showTab - - showTab: (event) => - event.preventDefault() - - @activateTab $(event.target).data('action') - - tabShown: (event) => - $target = $(event.target) - action = $target.data('action') - - if action == 'commits' - @loadCommits($target.attr('href')) - @expandView() - else if action == 'diffs' - @loadDiff($target.attr('href')) - if bp? and bp.getBreakpointSize() isnt 'lg' - @shrinkView() - - navBarHeight = $('.navbar-gitlab').outerHeight() - $.scrollTo(".merge-request-details .merge-request-tabs", offset: -navBarHeight) - else if action == 'builds' - @loadBuilds($target.attr('href')) - @expandView() - else - @expandView() - - @setCurrentAction(action) - - scrollToElement: (container) -> - if window.location.hash - navBarHeight = $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight() - - $el = $("#{container} #{window.location.hash}:not(.match)") - $.scrollTo("#{container} #{window.location.hash}:not(.match)", offset: -navBarHeight) if $el.length - - # Activate a tab based on the current action - activateTab: (action) -> - action = 'notes' if action == 'show' - $(".merge-request-tabs a[data-action='#{action}']").tab('show') - - # Replaces the current Merge Request-specific action in the URL with a new one - # - # If the action is "notes", the URL is reset to the standard - # `MergeRequests#show` route. - # - # Examples: - # - # location.pathname # => "/namespace/project/merge_requests/1" - # setCurrentAction('diffs') - # location.pathname # => "/namespace/project/merge_requests/1/diffs" - # - # location.pathname # => "/namespace/project/merge_requests/1/diffs" - # setCurrentAction('notes') - # location.pathname # => "/namespace/project/merge_requests/1" - # - # location.pathname # => "/namespace/project/merge_requests/1/diffs" - # setCurrentAction('commits') - # location.pathname # => "/namespace/project/merge_requests/1/commits" - # - # Returns the new URL String - setCurrentAction: (action) => - # Normalize action, just to be safe - action = 'notes' if action == 'show' - - # Remove a trailing '/commits' or '/diffs' - new_state = @_location.pathname.replace(/\/(commits|diffs|builds)(\.html)?\/?$/, '') - - # Append the new action if we're on a tab other than 'notes' - unless action == 'notes' - new_state += "/#{action}" - - # Ensure parameters and hash come along for the ride - new_state += @_location.search + @_location.hash - - # Replace the current history state with the new one without breaking - # Turbolinks' history. - # - # See https://github.com/rails/turbolinks/issues/363 - history.replaceState {turbolinks: true, url: new_state}, document.title, new_state - - new_state - - loadCommits: (source) -> - return if @commitsLoaded - - @_get - url: "#{source}.json" - success: (data) => - document.querySelector("div#commits").innerHTML = data.html - gl.utils.localTimeAgo($('.js-timeago', 'div#commits')) - @commitsLoaded = true - @scrollToElement("#commits") - - loadDiff: (source) -> - return if @diffsLoaded - @_get - url: "#{source}.json" + @_location.search - success: (data) => - $('#diffs').html data.html - gl.utils.localTimeAgo($('.js-timeago', 'div#diffs')) - $('#diffs .js-syntax-highlight').syntaxHighlight() - $('#diffs .diff-file').singleFileDiff() - @expandViewContainer() if @diffViewType() is 'parallel' - @diffsLoaded = true - @scrollToElement("#diffs") - @highlighSelectedLine() - @filesCommentButton = $('.files .diff-file').filesCommentButton() - - $(document) - .off 'click', '.diff-line-num a' - .on 'click', '.diff-line-num a', (e) => - e.preventDefault() - window.location.hash = $(e.currentTarget).attr 'href' - @highlighSelectedLine() - @scrollToElement("#diffs") - - highlighSelectedLine: -> - $('.hll').removeClass 'hll' - locationHash = window.location.hash - - if locationHash isnt '' - hashClassString = ".#{locationHash.replace('#', '')}" - $diffLine = $("#{locationHash}:not(.match)", $('#diffs')) - - if not $diffLine.is 'tr' - $diffLine = $('#diffs').find("td#{locationHash}, td#{hashClassString}") - else - $diffLine = $diffLine.find('td') - - if $diffLine.length - $diffLine.addClass 'hll' - diffLineTop = $diffLine.offset().top - navBarHeight = $('.navbar-gitlab').outerHeight() - - loadBuilds: (source) -> - return if @buildsLoaded - - @_get - url: "#{source}.json" - success: (data) => - document.querySelector("div#builds").innerHTML = data.html - gl.utils.localTimeAgo($('.js-timeago', 'div#builds')) - @buildsLoaded = true - @scrollToElement("#builds") - - # Show or hide the loading spinner - # - # status - Boolean, true to show, false to hide - toggleLoading: (status) -> - $('.mr-loading-status .loading').toggle(status) - - _get: (options) -> - defaults = { - beforeSend: => @toggleLoading(true) - complete: => @toggleLoading(false) - dataType: 'json' - type: 'GET' - } - - options = $.extend({}, defaults, options) - - $.ajax(options) - - # Returns diff view type - diffViewType: -> - $('.inline-parallel-buttons a.active').data('view-type') - - expandViewContainer: -> - $('.container-fluid').removeClass('container-limited') - - shrinkView: -> - $gutterIcon = $('.js-sidebar-toggle i:visible') - - # Wait until listeners are set - setTimeout( -> - # Only when sidebar is expanded - if $gutterIcon.is('.fa-angle-double-right') - $gutterIcon.closest('a').trigger('click', [true]) - , 0) - - # Expand the issuable sidebar unless the user explicitly collapsed it - expandView: -> - return if $.cookie('collapsed_gutter') == 'true' - - $gutterIcon = $('.js-sidebar-toggle i:visible') - - # Wait until listeners are set - setTimeout( -> - # Only when sidebar is collapsed - if $gutterIcon.is('.fa-angle-double-left') - $gutterIcon.closest('a').trigger('click', [true]) - , 0) diff --git a/app/assets/javascripts/merge_request_widget.js b/app/assets/javascripts/merge_request_widget.js new file mode 100644 index 00000000000..362aaa906d0 --- /dev/null +++ b/app/assets/javascripts/merge_request_widget.js @@ -0,0 +1,185 @@ +(function() { + var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + this.MergeRequestWidget = (function() { + function MergeRequestWidget(opts) { + this.opts = opts; + $('#modal_merge_info').modal({ + show: false + }); + this.firstCICheck = true; + this.readyForCICheck = false; + this.cancel = false; + clearInterval(this.fetchBuildStatusInterval); + this.clearEventListeners(); + this.addEventListeners(); + this.getCIStatus(false); + this.pollCIStatus(); + notifyPermissions(); + } + + MergeRequestWidget.prototype.clearEventListeners = function() { + return $(document).off('page:change.merge_request'); + }; + + MergeRequestWidget.prototype.cancelPolling = function() { + return this.cancel = true; + }; + + MergeRequestWidget.prototype.addEventListeners = function() { + var allowedPages; + allowedPages = ['show', 'commits', 'builds', 'changes']; + return $(document).on('page:change.merge_request', (function(_this) { + return function() { + var page; + page = $('body').data('page').split(':').last(); + if (allowedPages.indexOf(page) < 0) { + clearInterval(_this.fetchBuildStatusInterval); + _this.cancelPolling(); + return _this.clearEventListeners(); + } + }; + })(this)); + }; + + MergeRequestWidget.prototype.mergeInProgress = function(deleteSourceBranch) { + if (deleteSourceBranch == null) { + deleteSourceBranch = false; + } + return $.ajax({ + type: 'GET', + url: $('.merge-request').data('url'), + success: (function(_this) { + return function(data) { + var callback, urlSuffix; + if (data.state === "merged") { + urlSuffix = deleteSourceBranch ? '?delete_source=true' : ''; + return window.location.href = window.location.pathname + urlSuffix; + } else if (data.merge_error) { + return $('.mr-widget-body').html("

                " + data.merge_error + "

                "); + } else { + callback = function() { + return merge_request_widget.mergeInProgress(deleteSourceBranch); + }; + return setTimeout(callback, 2000); + } + }; + })(this), + dataType: 'json' + }); + }; + + MergeRequestWidget.prototype.getMergeStatus = function() { + return $.get(this.opts.merge_check_url, function(data) { + return $('.mr-state-widget').replaceWith(data); + }); + }; + + MergeRequestWidget.prototype.ciLabelForStatus = function(status) { + switch (status) { + case 'success': + return 'passed'; + case 'success_with_warnings': + return 'passed with warnings'; + default: + return status; + } + }; + + MergeRequestWidget.prototype.pollCIStatus = function() { + return this.fetchBuildStatusInterval = setInterval(((function(_this) { + return function() { + if (!_this.readyForCICheck) { + return; + } + _this.getCIStatus(true); + return _this.readyForCICheck = false; + }; + })(this)), 10000); + }; + + MergeRequestWidget.prototype.getCIStatus = function(showNotification) { + var _this; + _this = this; + $('.ci-widget-fetching').show(); + return $.getJSON(this.opts.ci_status_url, (function(_this) { + return function(data) { + var message, status, title; + if (_this.cancel) { + return; + } + _this.readyForCICheck = true; + if (data.status === '') { + return; + } + if (_this.firstCICheck || data.status !== _this.opts.ci_status && (data.status != null)) { + _this.opts.ci_status = data.status; + _this.showCIStatus(data.status); + if (data.coverage) { + _this.showCICoverage(data.coverage); + } + if (showNotification && !_this.firstCICheck) { + status = _this.ciLabelForStatus(data.status); + if (status === "preparing") { + title = _this.opts.ci_title.preparing; + status = status.charAt(0).toUpperCase() + status.slice(1); + message = _this.opts.ci_message.preparing.replace('{{status}}', status); + } else { + title = _this.opts.ci_title.normal; + message = _this.opts.ci_message.normal.replace('{{status}}', status); + } + title = title.replace('{{status}}', status); + message = message.replace('{{sha}}', data.sha); + message = message.replace('{{title}}', data.title); + notify(title, message, _this.opts.gitlab_icon, function() { + this.close(); + return Turbolinks.visit(_this.opts.builds_path); + }); + } + return _this.firstCICheck = false; + } + }; + })(this)); + }; + + MergeRequestWidget.prototype.showCIStatus = function(state) { + var allowed_states; + if (state == null) { + return; + } + $('.ci_widget').hide(); + allowed_states = ["failed", "canceled", "running", "pending", "success", "success_with_warnings", "skipped", "not_found"]; + if (indexOf.call(allowed_states, state) >= 0) { + $('.ci_widget.ci-' + state).show(); + switch (state) { + case "failed": + case "canceled": + case "not_found": + return this.setMergeButtonClass('btn-danger'); + case "running": + return this.setMergeButtonClass('btn-warning'); + case "success": + case "success_with_warnings": + return this.setMergeButtonClass('btn-create'); + } + } else { + $('.ci_widget.ci-error').show(); + return this.setMergeButtonClass('btn-danger'); + } + }; + + MergeRequestWidget.prototype.showCICoverage = function(coverage) { + var text; + text = 'Coverage ' + coverage + '%'; + return $('.ci_widget:visible .ci-coverage').text(text); + }; + + MergeRequestWidget.prototype.setMergeButtonClass = function(css_class) { + return $('.js-merge-button,.accept-action .dropdown-toggle').removeClass('btn-danger btn-warning btn-create').addClass(css_class); + }; + + return MergeRequestWidget; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/merge_request_widget.js.coffee b/app/assets/javascripts/merge_request_widget.js.coffee deleted file mode 100644 index 963a0550c35..00000000000 --- a/app/assets/javascripts/merge_request_widget.js.coffee +++ /dev/null @@ -1,143 +0,0 @@ -class @MergeRequestWidget - # Initialize MergeRequestWidget behavior - # - # check_enable - Boolean, whether to check automerge status - # merge_check_url - String, URL to use to check automerge status - # ci_status_url - String, URL to use to check CI status - # - - constructor: (@opts) -> - $('#modal_merge_info').modal(show: false) - @firstCICheck = true - @readyForCICheck = false - @cancel = false - clearInterval @fetchBuildStatusInterval - - @clearEventListeners() - @addEventListeners() - @getCIStatus(false) - @pollCIStatus() - notifyPermissions() - - clearEventListeners: -> - $(document).off 'page:change.merge_request' - - cancelPolling: -> - @cancel = true - - addEventListeners: -> - allowedPages = ['show', 'commits', 'builds', 'changes'] - $(document).on 'page:change.merge_request', => - page = $('body').data('page').split(':').last() - if allowedPages.indexOf(page) < 0 - clearInterval @fetchBuildStatusInterval - @cancelPolling() - @clearEventListeners() - - mergeInProgress: (deleteSourceBranch = false)-> - $.ajax - type: 'GET' - url: $('.merge-request').data('url') - success: (data) => - if data.state == "merged" - urlSuffix = if deleteSourceBranch then '?delete_source=true' else '' - - window.location.href = window.location.pathname + urlSuffix - else if data.merge_error - $('.mr-widget-body').html("

                " + data.merge_error + "

                ") - else - callback = -> merge_request_widget.mergeInProgress(deleteSourceBranch) - setTimeout(callback, 2000) - dataType: 'json' - - getMergeStatus: -> - $.get @opts.merge_check_url, (data) -> - $('.mr-state-widget').replaceWith(data) - - ciLabelForStatus: (status) -> - switch status - when 'success' - 'passed' - when 'success_with_warnings' - 'passed with warnings' - else - status - - pollCIStatus: -> - @fetchBuildStatusInterval = setInterval ( => - return if not @readyForCICheck - - @getCIStatus(true) - - @readyForCICheck = false - ), 10000 - - getCIStatus: (showNotification) -> - _this = @ - $('.ci-widget-fetching').show() - - $.getJSON @opts.ci_status_url, (data) => - return if @cancel - @readyForCICheck = true - - if data.status is '' - return - - if @firstCICheck || data.status isnt @opts.ci_status and data.status? - @opts.ci_status = data.status - @showCIStatus data.status - if data.coverage - @showCICoverage data.coverage - - # The first check should only update the UI, a notification - # should only be displayed on status changes - if showNotification and not @firstCICheck - status = @ciLabelForStatus(data.status) - - if status is "preparing" - title = @opts.ci_title.preparing - status = status.charAt(0).toUpperCase() + status.slice(1); - message = @opts.ci_message.preparing.replace('{{status}}', status) - else - title = @opts.ci_title.normal - message = @opts.ci_message.normal.replace('{{status}}', status) - - title = title.replace('{{status}}', status) - message = message.replace('{{sha}}', data.sha) - message = message.replace('{{title}}', data.title) - - notify( - title, - message, - @opts.gitlab_icon, - -> - @close() - Turbolinks.visit _this.opts.builds_path - ) - @firstCICheck = false - - showCIStatus: (state) -> - return if not state? - $('.ci_widget').hide() - allowed_states = ["failed", "canceled", "running", "pending", "success", "success_with_warnings", "skipped", "not_found"] - if state in allowed_states - $('.ci_widget.ci-' + state).show() - switch state - when "failed", "canceled", "not_found" - @setMergeButtonClass('btn-danger') - when "running" - @setMergeButtonClass('btn-warning') - when "success", "success_with_warnings" - @setMergeButtonClass('btn-create') - else - $('.ci_widget.ci-error').show() - @setMergeButtonClass('btn-danger') - - showCICoverage: (coverage) -> - text = 'Coverage ' + coverage + '%' - $('.ci_widget:visible .ci-coverage').text(text) - - setMergeButtonClass: (css_class) -> - $('.js-merge-button,.accept-action .dropdown-toggle') - .removeClass('btn-danger btn-warning btn-create') - .addClass(css_class) diff --git a/app/assets/javascripts/merged_buttons.js b/app/assets/javascripts/merged_buttons.js new file mode 100644 index 00000000000..1fed38661a2 --- /dev/null +++ b/app/assets/javascripts/merged_buttons.js @@ -0,0 +1,45 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.MergedButtons = (function() { + function MergedButtons() { + this.removeSourceBranch = bind(this.removeSourceBranch, this); + this.$removeBranchWidget = $('.remove_source_branch_widget'); + this.$removeBranchProgress = $('.remove_source_branch_in_progress'); + this.$removeBranchFailed = $('.remove_source_branch_widget.failed'); + this.cleanEventListeners(); + this.initEventListeners(); + } + + MergedButtons.prototype.cleanEventListeners = function() { + $(document).off('click', '.remove_source_branch'); + $(document).off('ajax:success', '.remove_source_branch'); + return $(document).off('ajax:error', '.remove_source_branch'); + }; + + MergedButtons.prototype.initEventListeners = function() { + $(document).on('click', '.remove_source_branch', this.removeSourceBranch); + $(document).on('ajax:success', '.remove_source_branch', this.removeBranchSuccess); + return $(document).on('ajax:error', '.remove_source_branch', this.removeBranchError); + }; + + MergedButtons.prototype.removeSourceBranch = function() { + this.$removeBranchWidget.hide(); + return this.$removeBranchProgress.show(); + }; + + MergedButtons.prototype.removeBranchSuccess = function() { + return location.reload(); + }; + + MergedButtons.prototype.removeBranchError = function() { + this.$removeBranchWidget.hide(); + this.$removeBranchProgress.hide(); + return this.$removeBranchFailed.show(); + }; + + return MergedButtons; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/merged_buttons.js.coffee b/app/assets/javascripts/merged_buttons.js.coffee deleted file mode 100644 index 4929295c10b..00000000000 --- a/app/assets/javascripts/merged_buttons.js.coffee +++ /dev/null @@ -1,30 +0,0 @@ -class @MergedButtons - constructor: -> - @$removeBranchWidget = $('.remove_source_branch_widget') - @$removeBranchProgress = $('.remove_source_branch_in_progress') - @$removeBranchFailed = $('.remove_source_branch_widget.failed') - - @cleanEventListeners() - @initEventListeners() - - cleanEventListeners: -> - $(document).off 'click', '.remove_source_branch' - $(document).off 'ajax:success', '.remove_source_branch' - $(document).off 'ajax:error', '.remove_source_branch' - - initEventListeners: -> - $(document).on 'click', '.remove_source_branch', @removeSourceBranch - $(document).on 'ajax:success', '.remove_source_branch', @removeBranchSuccess - $(document).on 'ajax:error', '.remove_source_branch', @removeBranchError - - removeSourceBranch: => - @$removeBranchWidget.hide() - @$removeBranchProgress.show() - - removeBranchSuccess: -> - location.reload() - - removeBranchError: -> - @$removeBranchWidget.hide() - @$removeBranchProgress.hide() - @$removeBranchFailed.show() diff --git a/app/assets/javascripts/milestone.js b/app/assets/javascripts/milestone.js new file mode 100644 index 00000000000..e8d51da7d58 --- /dev/null +++ b/app/assets/javascripts/milestone.js @@ -0,0 +1,195 @@ +(function() { + this.Milestone = (function() { + Milestone.updateIssue = function(li, issue_url, data) { + return $.ajax({ + type: "PUT", + url: issue_url, + data: data, + success: (function(_this) { + return function(_data) { + return _this.successCallback(_data, li); + }; + })(this), + error: function(data) { + return new Flash("Issue update failed", 'alert'); + }, + dataType: "json" + }); + }; + + Milestone.sortIssues = function(data) { + var sort_issues_url; + sort_issues_url = location.href + "/sort_issues"; + return $.ajax({ + type: "PUT", + url: sort_issues_url, + data: data, + success: (function(_this) { + return function(_data) { + return _this.successCallback(_data); + }; + })(this), + error: function() { + return new Flash("Issues update failed", 'alert'); + }, + dataType: "json" + }); + }; + + Milestone.sortMergeRequests = function(data) { + var sort_mr_url; + sort_mr_url = location.href + "/sort_merge_requests"; + return $.ajax({ + type: "PUT", + url: sort_mr_url, + data: data, + success: (function(_this) { + return function(_data) { + return _this.successCallback(_data); + }; + })(this), + error: function(data) { + return new Flash("Issue update failed", 'alert'); + }, + dataType: "json" + }); + }; + + Milestone.updateMergeRequest = function(li, merge_request_url, data) { + return $.ajax({ + type: "PUT", + url: merge_request_url, + data: data, + success: (function(_this) { + return function(_data) { + return _this.successCallback(_data, li); + }; + })(this), + error: function(data) { + return new Flash("Issue update failed", 'alert'); + }, + dataType: "json" + }); + }; + + Milestone.successCallback = function(data, element) { + var img_tag; + if (data.assignee) { + img_tag = $(''); + img_tag.attr('src', data.assignee.avatar_url); + img_tag.addClass('avatar s16'); + $(element).find('.assignee-icon').html(img_tag); + } else { + $(element).find('.assignee-icon').html(''); + } + return $(element).effect('highlight'); + }; + + function Milestone() { + var oldMouseStart; + oldMouseStart = $.ui.sortable.prototype._mouseStart; + $.ui.sortable.prototype._mouseStart = function(event, overrideHandle, noActivation) { + this._trigger("beforeStart", event, this._uiHash()); + return oldMouseStart.apply(this, [event, overrideHandle, noActivation]); + }; + this.bindIssuesSorting(); + this.bindMergeRequestSorting(); + this.bindTabsSwitching(); + } + + Milestone.prototype.bindIssuesSorting = function() { + return $("#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed").sortable({ + connectWith: ".issues-sortable-list", + dropOnEmpty: true, + items: "li:not(.ui-sort-disabled)", + beforeStart: function(event, ui) { + return $(".issues-sortable-list").css("min-height", ui.item.outerHeight()); + }, + stop: function(event, ui) { + return $(".issues-sortable-list").css("min-height", "0px"); + }, + update: function(event, ui) { + var data; + if ($(this).find(ui.item).length > 0) { + data = $(this).sortable("serialize"); + return Milestone.sortIssues(data); + } + }, + receive: function(event, ui) { + var data, issue_id, issue_url, new_state; + new_state = $(this).data('state'); + issue_id = ui.item.data('iid'); + issue_url = ui.item.data('url'); + data = (function() { + switch (new_state) { + case 'ongoing': + return "issue[assignee_id]=" + gon.current_user_id; + case 'unassigned': + return "issue[assignee_id]="; + case 'closed': + return "issue[state_event]=close"; + } + })(); + if ($(ui.sender).data('state') === "closed") { + data += "&issue[state_event]=reopen"; + } + return Milestone.updateIssue(ui.item, issue_url, data); + } + }).disableSelection(); + }; + + Milestone.prototype.bindTabsSwitching = function() { + return $('a[data-toggle="tab"]').on('show.bs.tab', function(e) { + var currentTabClass, previousTabClass; + currentTabClass = $(e.target).data('show'); + previousTabClass = $(e.relatedTarget).data('show'); + $(previousTabClass).hide(); + $(currentTabClass).removeClass('hidden'); + return $(currentTabClass).show(); + }); + }; + + Milestone.prototype.bindMergeRequestSorting = function() { + return $("#merge_requests-list-unassigned, #merge_requests-list-ongoing, #merge_requests-list-closed").sortable({ + connectWith: ".merge_requests-sortable-list", + dropOnEmpty: true, + items: "li:not(.ui-sort-disabled)", + beforeStart: function(event, ui) { + return $(".merge_requests-sortable-list").css("min-height", ui.item.outerHeight()); + }, + stop: function(event, ui) { + return $(".merge_requests-sortable-list").css("min-height", "0px"); + }, + update: function(event, ui) { + var data; + data = $(this).sortable("serialize"); + return Milestone.sortMergeRequests(data); + }, + receive: function(event, ui) { + var data, merge_request_id, merge_request_url, new_state; + new_state = $(this).data('state'); + merge_request_id = ui.item.data('iid'); + merge_request_url = ui.item.data('url'); + data = (function() { + switch (new_state) { + case 'ongoing': + return "merge_request[assignee_id]=" + gon.current_user_id; + case 'unassigned': + return "merge_request[assignee_id]="; + case 'closed': + return "merge_request[state_event]=close"; + } + })(); + if ($(ui.sender).data('state') === "closed") { + data += "&merge_request[state_event]=reopen"; + } + return Milestone.updateMergeRequest(ui.item, merge_request_url, data); + } + }).disableSelection(); + }; + + return Milestone; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/milestone.js.coffee b/app/assets/javascripts/milestone.js.coffee deleted file mode 100644 index a19e68b39e2..00000000000 --- a/app/assets/javascripts/milestone.js.coffee +++ /dev/null @@ -1,146 +0,0 @@ -class @Milestone - @updateIssue: (li, issue_url, data) -> - $.ajax - type: "PUT" - url: issue_url - data: data - success: (_data) => - @successCallback(_data, li) - error: (data) -> - new Flash("Issue update failed", 'alert') - dataType: "json" - - @sortIssues: (data) -> - sort_issues_url = location.href + "/sort_issues" - - $.ajax - type: "PUT" - url: sort_issues_url - data: data - success: (_data) => - @successCallback(_data) - error: -> - new Flash("Issues update failed", 'alert') - dataType: "json" - - @sortMergeRequests: (data) -> - sort_mr_url = location.href + "/sort_merge_requests" - - $.ajax - type: "PUT" - url: sort_mr_url - data: data - success: (_data) => - @successCallback(_data) - error: (data) -> - new Flash("Issue update failed", 'alert') - dataType: "json" - - @updateMergeRequest: (li, merge_request_url, data) -> - $.ajax - type: "PUT" - url: merge_request_url - data: data - success: (_data) => - @successCallback(_data, li) - error: (data) -> - new Flash("Issue update failed", 'alert') - dataType: "json" - - @successCallback: (data, element) => - if data.assignee - img_tag = $('') - img_tag.attr('src', data.assignee.avatar_url) - img_tag.addClass('avatar s16') - $(element).find('.assignee-icon').html(img_tag) - else - $(element).find('.assignee-icon').html('') - - $(element).effect 'highlight' - - constructor: -> - oldMouseStart = $.ui.sortable.prototype._mouseStart - $.ui.sortable.prototype._mouseStart = (event, overrideHandle, noActivation) -> - this._trigger "beforeStart", event, this._uiHash() - oldMouseStart.apply this, [event, overrideHandle, noActivation] - - @bindIssuesSorting() - @bindMergeRequestSorting() - @bindTabsSwitching() - - bindIssuesSorting: -> - $("#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed").sortable( - connectWith: ".issues-sortable-list", - dropOnEmpty: true, - items: "li:not(.ui-sort-disabled)", - beforeStart: (event, ui) -> - $(".issues-sortable-list").css "min-height", ui.item.outerHeight() - stop: (event, ui) -> - $(".issues-sortable-list").css "min-height", "0px" - update: (event, ui) -> - # Prevents sorting from container which element has been removed. - if $(this).find(ui.item).length > 0 - data = $(this).sortable("serialize") - Milestone.sortIssues(data) - - receive: (event, ui) -> - new_state = $(this).data('state') - issue_id = ui.item.data('iid') - issue_url = ui.item.data('url') - - data = switch new_state - when 'ongoing' - "issue[assignee_id]=" + gon.current_user_id - when 'unassigned' - "issue[assignee_id]=" - when 'closed' - "issue[state_event]=close" - - if $(ui.sender).data('state') == "closed" - data += "&issue[state_event]=reopen" - - Milestone.updateIssue(ui.item, issue_url, data) - - ).disableSelection() - - bindTabsSwitching: -> - $('a[data-toggle="tab"]').on 'show.bs.tab', (e) -> - currentTabClass = $(e.target).data('show') - previousTabClass = $(e.relatedTarget).data('show') - - $(previousTabClass).hide() - $(currentTabClass).removeClass('hidden') - $(currentTabClass).show() - - bindMergeRequestSorting: -> - $("#merge_requests-list-unassigned, #merge_requests-list-ongoing, #merge_requests-list-closed").sortable( - connectWith: ".merge_requests-sortable-list", - dropOnEmpty: true, - items: "li:not(.ui-sort-disabled)", - beforeStart: (event, ui) -> - $(".merge_requests-sortable-list").css "min-height", ui.item.outerHeight() - stop: (event, ui) -> - $(".merge_requests-sortable-list").css "min-height", "0px" - update: (event, ui) -> - data = $(this).sortable("serialize") - Milestone.sortMergeRequests(data) - - receive: (event, ui) -> - new_state = $(this).data('state') - merge_request_id = ui.item.data('iid') - merge_request_url = ui.item.data('url') - - data = switch new_state - when 'ongoing' - "merge_request[assignee_id]=" + gon.current_user_id - when 'unassigned' - "merge_request[assignee_id]=" - when 'closed' - "merge_request[state_event]=close" - - if $(ui.sender).data('state') == "closed" - data += "&merge_request[state_event]=reopen" - - Milestone.updateMergeRequest(ui.item, merge_request_url, data) - - ).disableSelection() diff --git a/app/assets/javascripts/milestone_select.js b/app/assets/javascripts/milestone_select.js new file mode 100644 index 00000000000..a0b65d20c03 --- /dev/null +++ b/app/assets/javascripts/milestone_select.js @@ -0,0 +1,151 @@ +(function() { + this.MilestoneSelect = (function() { + function MilestoneSelect(currentProject) { + var _this; + if (currentProject != null) { + _this = this; + this.currentProject = JSON.parse(currentProject); + } + $('.js-milestone-select').each(function(i, dropdown) { + var $block, $dropdown, $loading, $selectbox, $sidebarCollapsedValue, $value, abilityName, collapsedSidebarLabelTemplate, defaultLabel, issuableId, issueUpdateURL, milestoneLinkNoneTemplate, milestoneLinkTemplate, milestonesUrl, projectId, selectedMilestone, showAny, showNo, showUpcoming, useId; + $dropdown = $(dropdown); + projectId = $dropdown.data('project-id'); + milestonesUrl = $dropdown.data('milestones'); + issueUpdateURL = $dropdown.data('issueUpdate'); + selectedMilestone = $dropdown.data('selected'); + showNo = $dropdown.data('show-no'); + showAny = $dropdown.data('show-any'); + showUpcoming = $dropdown.data('show-upcoming'); + useId = $dropdown.data('use-id'); + defaultLabel = $dropdown.data('default-label'); + issuableId = $dropdown.data('issuable-id'); + abilityName = $dropdown.data('ability-name'); + $selectbox = $dropdown.closest('.selectbox'); + $block = $selectbox.closest('.block'); + $sidebarCollapsedValue = $block.find('.sidebar-collapsed-icon'); + $value = $block.find('.value'); + $loading = $block.find('.block-loading').fadeOut(); + if (issueUpdateURL) { + milestoneLinkTemplate = _.template('<%- title %>'); + milestoneLinkNoneTemplate = 'None'; + collapsedSidebarLabelTemplate = _.template(' <%- title %> '); + } + return $dropdown.glDropdown({ + data: function(term, callback) { + return $.ajax({ + url: milestonesUrl + }).done(function(data) { + var extraOptions; + extraOptions = []; + if (showAny) { + extraOptions.push({ + id: 0, + name: '', + title: 'Any Milestone' + }); + } + if (showNo) { + extraOptions.push({ + id: -1, + name: 'No Milestone', + title: 'No Milestone' + }); + } + if (showUpcoming) { + extraOptions.push({ + id: -2, + name: '#upcoming', + title: 'Upcoming' + }); + } + if (extraOptions.length > 2) { + extraOptions.push('divider'); + } + return callback(extraOptions.concat(data)); + }); + }, + filterable: true, + search: { + fields: ['title'] + }, + selectable: true, + toggleLabel: function(selected) { + if (selected && 'id' in selected) { + return selected.title; + } else { + return defaultLabel; + } + }, + fieldName: $dropdown.data('field-name'), + text: function(milestone) { + return _.escape(milestone.title); + }, + id: function(milestone) { + if (!useId) { + return milestone.name; + } else { + return milestone.id; + } + }, + isSelected: function(milestone) { + return milestone.name === selectedMilestone; + }, + hidden: function() { + $selectbox.hide(); + return $value.css('display', ''); + }, + clicked: function(selected) { + var data, isIssueIndex, isMRIndex, page; + page = $('body').data('page'); + isIssueIndex = page === 'projects:issues:index'; + isMRIndex = (page === page && page === 'projects:merge_requests:index'); + if ($dropdown.hasClass('js-filter-bulk-update')) { + return; + } + if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) { + if (selected.name != null) { + selectedMilestone = selected.name; + } else { + selectedMilestone = ''; + } + return Issuable.filterResults($dropdown.closest('form')); + } else if ($dropdown.hasClass('js-filter-submit')) { + return $dropdown.closest('form').submit(); + } else { + selected = $selectbox.find('input[type="hidden"]').val(); + data = {}; + data[abilityName] = {}; + data[abilityName].milestone_id = selected != null ? selected : null; + $loading.fadeIn(); + $dropdown.trigger('loading.gl.dropdown'); + return $.ajax({ + type: 'PUT', + url: issueUpdateURL, + data: data + }).done(function(data) { + $dropdown.trigger('loaded.gl.dropdown'); + $loading.fadeOut(); + $selectbox.hide(); + $value.css('display', ''); + if (data.milestone != null) { + data.milestone.namespace = _this.currentProject.namespace; + data.milestone.path = _this.currentProject.path; + data.milestone.remaining = $.timefor(data.milestone.due_date); + $value.html(milestoneLinkTemplate(data.milestone)); + return $sidebarCollapsedValue.find('span').html(collapsedSidebarLabelTemplate(data.milestone)); + } else { + $value.html(milestoneLinkNoneTemplate); + return $sidebarCollapsedValue.find('span').text('No'); + } + }); + } + } + }); + }); + } + + return MilestoneSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/milestone_select.js.coffee b/app/assets/javascripts/milestone_select.js.coffee deleted file mode 100644 index 8ab03ed93ee..00000000000 --- a/app/assets/javascripts/milestone_select.js.coffee +++ /dev/null @@ -1,137 +0,0 @@ -class @MilestoneSelect - constructor: (currentProject) -> - if currentProject? - _this = @ - @currentProject = JSON.parse(currentProject) - $('.js-milestone-select').each (i, dropdown) -> - $dropdown = $(dropdown) - projectId = $dropdown.data('project-id') - milestonesUrl = $dropdown.data('milestones') - issueUpdateURL = $dropdown.data('issueUpdate') - selectedMilestone = $dropdown.data('selected') - showNo = $dropdown.data('show-no') - showAny = $dropdown.data('show-any') - showUpcoming = $dropdown.data('show-upcoming') - useId = $dropdown.data('use-id') - defaultLabel = $dropdown.data('default-label') - issuableId = $dropdown.data('issuable-id') - abilityName = $dropdown.data('ability-name') - $selectbox = $dropdown.closest('.selectbox') - $block = $selectbox.closest('.block') - $sidebarCollapsedValue = $block.find('.sidebar-collapsed-icon') - $value = $block.find('.value') - $loading = $block.find('.block-loading').fadeOut() - - if issueUpdateURL - milestoneLinkTemplate = _.template( - '<%- title %>' - ) - - milestoneLinkNoneTemplate = 'None' - - collapsedSidebarLabelTemplate = _.template( - ' - <%- title %> - ' - ) - - $dropdown.glDropdown( - data: (term, callback) -> - $.ajax( - url: milestonesUrl - ).done (data) -> - extraOptions = [] - if showAny - extraOptions.push( - id: 0 - name: '' - title: 'Any Milestone' - ) - - if showNo - extraOptions.push( - id: -1 - name: 'No Milestone' - title: 'No Milestone' - ) - - if showUpcoming - extraOptions.push( - id: -2 - name: '#upcoming' - title: 'Upcoming' - ) - - if extraOptions.length > 2 - extraOptions.push 'divider' - - callback(extraOptions.concat(data)) - filterable: true - search: - fields: ['title'] - selectable: true - toggleLabel: (selected) -> - if selected && 'id' of selected - selected.title - else - defaultLabel - fieldName: $dropdown.data('field-name') - text: (milestone) -> - _.escape(milestone.title) - id: (milestone) -> - if !useId - milestone.name - else - milestone.id - isSelected: (milestone) -> - milestone.name is selectedMilestone - hidden: -> - $selectbox.hide() - - # display:block overrides the hide-collapse rule - $value.css('display', '') - clicked: (selected) -> - page = $('body').data 'page' - isIssueIndex = page is 'projects:issues:index' - isMRIndex = page is page is 'projects:merge_requests:index' - - if $dropdown.hasClass 'js-filter-bulk-update' - return - - if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex) - if selected.name? - selectedMilestone = selected.name - else - selectedMilestone = '' - Issuable.filterResults $dropdown.closest('form') - else if $dropdown.hasClass('js-filter-submit') - $dropdown.closest('form').submit() - else - selected = $selectbox - .find('input[type="hidden"]') - .val() - data = {} - data[abilityName] = {} - data[abilityName].milestone_id = if selected? then selected else null - $loading - .fadeIn() - $dropdown.trigger('loading.gl.dropdown') - $.ajax( - type: 'PUT' - url: issueUpdateURL - data: data - ).done (data) -> - $dropdown.trigger('loaded.gl.dropdown') - $loading.fadeOut() - $selectbox.hide() - $value.css('display', '') - if data.milestone? - data.milestone.namespace = _this.currentProject.namespace - data.milestone.path = _this.currentProject.path - data.milestone.remaining = $.timefor data.milestone.due_date - $value.html(milestoneLinkTemplate(data.milestone)) - $sidebarCollapsedValue.find('span').html(collapsedSidebarLabelTemplate(data.milestone)) - else - $value.html(milestoneLinkNoneTemplate) - $sidebarCollapsedValue.find('span').text('No') - ) diff --git a/app/assets/javascripts/namespace_select.js b/app/assets/javascripts/namespace_select.js new file mode 100644 index 00000000000..10f4fd106d8 --- /dev/null +++ b/app/assets/javascripts/namespace_select.js @@ -0,0 +1,86 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.NamespaceSelect = (function() { + function NamespaceSelect(opts) { + this.onSelectItem = bind(this.onSelectItem, this); + var fieldName, showAny; + this.dropdown = opts.dropdown; + showAny = true; + fieldName = 'namespace_id'; + if (this.dropdown.attr('data-field-name')) { + fieldName = this.dropdown.data('fieldName'); + } + if (this.dropdown.attr('data-show-any')) { + showAny = this.dropdown.data('showAny'); + } + this.dropdown.glDropdown({ + filterable: true, + selectable: true, + filterRemote: true, + search: { + fields: ['path'] + }, + fieldName: fieldName, + toggleLabel: function(selected) { + if (selected.id == null) { + return selected.text; + } else { + return selected.kind + ": " + selected.path; + } + }, + data: function(term, dataCallback) { + return Api.namespaces(term, function(namespaces) { + var anyNamespace; + if (showAny) { + anyNamespace = { + text: 'Any namespace', + id: null + }; + namespaces.unshift(anyNamespace); + namespaces.splice(1, 0, 'divider'); + } + return dataCallback(namespaces); + }); + }, + text: function(namespace) { + if (namespace.id == null) { + return namespace.text; + } else { + return namespace.kind + ": " + namespace.path; + } + }, + renderRow: this.renderRow, + clicked: this.onSelectItem + }); + } + + NamespaceSelect.prototype.onSelectItem = function(item, el, e) { + return e.preventDefault(); + }; + + return NamespaceSelect; + + })(); + + this.NamespaceSelects = (function() { + function NamespaceSelects(opts) { + var ref; + if (opts == null) { + opts = {}; + } + this.$dropdowns = (ref = opts.$dropdowns) != null ? ref : $('.js-namespace-select'); + this.$dropdowns.each(function(i, dropdown) { + var $dropdown; + $dropdown = $(dropdown); + return new NamespaceSelect({ + dropdown: $dropdown + }); + }); + } + + return NamespaceSelects; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/namespace_select.js.coffee b/app/assets/javascripts/namespace_select.js.coffee deleted file mode 100644 index 3b419dff105..00000000000 --- a/app/assets/javascripts/namespace_select.js.coffee +++ /dev/null @@ -1,56 +0,0 @@ -class @NamespaceSelect - constructor: (opts) -> - { - @dropdown - } = opts - - showAny = true - fieldName = 'namespace_id' - - if @dropdown.attr 'data-field-name' - fieldName = @dropdown.data 'fieldName' - - if @dropdown.attr 'data-show-any' - showAny = @dropdown.data 'showAny' - - @dropdown.glDropdown( - filterable: true - selectable: true - filterRemote: true - search: - fields: ['path'] - fieldName: fieldName - toggleLabel: (selected) -> - return if not selected.id? then selected.text else "#{selected.kind}: #{selected.path}" - data: (term, dataCallback) -> - Api.namespaces term, (namespaces) -> - if showAny - anyNamespace = - text: 'Any namespace' - id: null - - namespaces.unshift(anyNamespace) - namespaces.splice 1, 0, 'divider' - - dataCallback(namespaces) - text: (namespace) -> - return if not namespace.id? then namespace.text else "#{namespace.kind}: #{namespace.path}" - renderRow: @renderRow - clicked: @onSelectItem - ) - - onSelectItem: (item, el, e) => - e.preventDefault() - -class @NamespaceSelects - constructor: (opts = {}) -> - { - @$dropdowns = $('.js-namespace-select') - } = opts - - @$dropdowns.each (i, dropdown) -> - $dropdown = $(dropdown) - - new NamespaceSelect( - dropdown: $dropdown - ) diff --git a/app/assets/javascripts/network/branch-graph.js b/app/assets/javascripts/network/branch-graph.js new file mode 100644 index 00000000000..c0fec1f8607 --- /dev/null +++ b/app/assets/javascripts/network/branch-graph.js @@ -0,0 +1,404 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.BranchGraph = (function() { + function BranchGraph(element1, options1) { + this.element = element1; + this.options = options1; + this.scrollTop = bind(this.scrollTop, this); + this.scrollBottom = bind(this.scrollBottom, this); + this.scrollRight = bind(this.scrollRight, this); + this.scrollLeft = bind(this.scrollLeft, this); + this.scrollUp = bind(this.scrollUp, this); + this.scrollDown = bind(this.scrollDown, this); + this.preparedCommits = {}; + this.mtime = 0; + this.mspace = 0; + this.parents = {}; + this.colors = ["#000"]; + this.offsetX = 150; + this.offsetY = 20; + this.unitTime = 30; + this.unitSpace = 10; + this.prev_start = -1; + this.load(); + } + + BranchGraph.prototype.load = function() { + return $.ajax({ + url: this.options.url, + method: "get", + dataType: "json", + success: $.proxy(function(data) { + $(".loading", this.element).hide(); + this.prepareData(data.days, data.commits); + return this.buildGraph(); + }, this) + }); + }; + + BranchGraph.prototype.prepareData = function(days, commits) { + var c, ch, cw, j, len, ref; + this.days = days; + this.commits = commits; + this.collectParents(); + this.graphHeight = $(this.element).height(); + this.graphWidth = $(this.element).width(); + ch = Math.max(this.graphHeight, this.offsetY + this.unitTime * this.mtime + 150); + cw = Math.max(this.graphWidth, this.offsetX + this.unitSpace * this.mspace + 300); + this.r = Raphael(this.element.get(0), cw, ch); + this.top = this.r.set(); + this.barHeight = Math.max(this.graphHeight, this.unitTime * this.days.length + 320); + ref = this.commits; + for (j = 0, len = ref.length; j < len; j++) { + c = ref[j]; + if (c.id in this.parents) { + c.isParent = true; + } + this.preparedCommits[c.id] = c; + this.markCommit(c); + } + return this.collectColors(); + }; + + BranchGraph.prototype.collectParents = function() { + var c, j, len, p, ref, results; + ref = this.commits; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + c = ref[j]; + this.mtime = Math.max(this.mtime, c.time); + this.mspace = Math.max(this.mspace, c.space); + results.push((function() { + var l, len1, ref1, results1; + ref1 = c.parents; + results1 = []; + for (l = 0, len1 = ref1.length; l < len1; l++) { + p = ref1[l]; + this.parents[p[0]] = true; + results1.push(this.mspace = Math.max(this.mspace, p[1])); + } + return results1; + }).call(this)); + } + return results; + }; + + BranchGraph.prototype.collectColors = function() { + var k, results; + k = 0; + results = []; + while (k < this.mspace) { + this.colors.push(Raphael.getColor(.8)); + Raphael.getColor(); + Raphael.getColor(); + results.push(k++); + } + return results; + }; + + BranchGraph.prototype.buildGraph = function() { + var cuday, cumonth, day, j, len, mm, r, ref; + r = this.r; + cuday = 0; + cumonth = ""; + r.rect(0, 0, 40, this.barHeight).attr({ + fill: "#222" + }); + r.rect(40, 0, 30, this.barHeight).attr({ + fill: "#444" + }); + ref = this.days; + for (mm = j = 0, len = ref.length; j < len; mm = ++j) { + day = ref[mm]; + if (cuday !== day[0] || cumonth !== day[1]) { + r.text(55, this.offsetY + this.unitTime * mm, day[0]).attr({ + font: "12px Monaco, monospace", + fill: "#BBB" + }); + cuday = day[0]; + } + if (cumonth !== day[1]) { + r.text(20, this.offsetY + this.unitTime * mm, day[1]).attr({ + font: "12px Monaco, monospace", + fill: "#EEE" + }); + cumonth = day[1]; + } + } + this.renderPartialGraph(); + return this.bindEvents(); + }; + + BranchGraph.prototype.renderPartialGraph = function() { + var commit, end, i, isGraphEdge, start, x, y; + start = Math.floor((this.element.scrollTop() - this.offsetY) / this.unitTime) - 10; + if (start < 0) { + isGraphEdge = true; + start = 0; + } + end = start + 40; + if (this.commits.length < end) { + isGraphEdge = true; + end = this.commits.length; + } + if (this.prev_start === -1 || Math.abs(this.prev_start - start) > 10 || isGraphEdge) { + i = start; + this.prev_start = start; + while (i < end) { + commit = this.commits[i]; + i += 1; + if (commit.hasDrawn !== true) { + x = this.offsetX + this.unitSpace * (this.mspace - commit.space); + y = this.offsetY + this.unitTime * commit.time; + this.drawDot(x, y, commit); + this.drawLines(x, y, commit); + this.appendLabel(x, y, commit); + this.appendAnchor(x, y, commit); + commit.hasDrawn = true; + } + } + return this.top.toFront(); + } + }; + + BranchGraph.prototype.bindEvents = function() { + var element; + element = this.element; + return $(element).scroll((function(_this) { + return function(event) { + return _this.renderPartialGraph(); + }; + })(this)); + }; + + BranchGraph.prototype.scrollDown = function() { + this.element.scrollTop(this.element.scrollTop() + 50); + return this.renderPartialGraph(); + }; + + BranchGraph.prototype.scrollUp = function() { + this.element.scrollTop(this.element.scrollTop() - 50); + return this.renderPartialGraph(); + }; + + BranchGraph.prototype.scrollLeft = function() { + this.element.scrollLeft(this.element.scrollLeft() - 50); + return this.renderPartialGraph(); + }; + + BranchGraph.prototype.scrollRight = function() { + this.element.scrollLeft(this.element.scrollLeft() + 50); + return this.renderPartialGraph(); + }; + + BranchGraph.prototype.scrollBottom = function() { + return this.element.scrollTop(this.element.find('svg').height()); + }; + + BranchGraph.prototype.scrollTop = function() { + return this.element.scrollTop(0); + }; + + BranchGraph.prototype.appendLabel = function(x, y, commit) { + var label, r, rect, shortrefs, text, textbox, triangle; + if (!commit.refs) { + return; + } + r = this.r; + shortrefs = commit.refs; + if (shortrefs.length > 17) { + shortrefs = shortrefs.substr(0, 15) + "…"; + } + text = r.text(x + 4, y, shortrefs).attr({ + "text-anchor": "start", + font: "10px Monaco, monospace", + fill: "#FFF", + title: commit.refs + }); + textbox = text.getBBox(); + rect = r.rect(x, y - 7, textbox.width + 5, textbox.height + 5, 4).attr({ + fill: "#000", + "fill-opacity": .5, + stroke: "none" + }); + triangle = r.path(["M", x - 5, y, "L", x - 15, y - 4, "L", x - 15, y + 4, "Z"]).attr({ + fill: "#000", + "fill-opacity": .5, + stroke: "none" + }); + label = r.set(rect, text); + label.transform(["t", -rect.getBBox().width - 15, 0]); + return text.toFront(); + }; + + BranchGraph.prototype.appendAnchor = function(x, y, commit) { + var anchor, options, r, top; + r = this.r; + top = this.top; + options = this.options; + anchor = r.circle(x, y, 10).attr({ + fill: "#000", + opacity: 0, + cursor: "pointer" + }).click(function() { + return window.open(options.commit_url.replace("%s", commit.id), "_blank"); + }).hover(function() { + this.tooltip = r.commitTooltip(x + 5, y, commit); + return top.push(this.tooltip.insertBefore(this)); + }, function() { + return this.tooltip && this.tooltip.remove() && delete this.tooltip; + }); + return top.push(anchor); + }; + + BranchGraph.prototype.drawDot = function(x, y, commit) { + var avatar_box_x, avatar_box_y, r; + r = this.r; + r.circle(x, y, 3).attr({ + fill: this.colors[commit.space], + stroke: "none" + }); + avatar_box_x = this.offsetX + this.unitSpace * this.mspace + 10; + avatar_box_y = y - 10; + r.rect(avatar_box_x, avatar_box_y, 20, 20).attr({ + stroke: this.colors[commit.space], + "stroke-width": 2 + }); + r.image(commit.author.icon, avatar_box_x, avatar_box_y, 20, 20); + return r.text(this.offsetX + this.unitSpace * this.mspace + 35, y, commit.message.split("\n")[0]).attr({ + "text-anchor": "start", + font: "14px Monaco, monospace" + }); + }; + + BranchGraph.prototype.drawLines = function(x, y, commit) { + var arrow, color, i, j, len, offset, parent, parentCommit, parentX1, parentX2, parentY, r, ref, results, route; + r = this.r; + ref = commit.parents; + results = []; + for (i = j = 0, len = ref.length; j < len; i = ++j) { + parent = ref[i]; + parentCommit = this.preparedCommits[parent[0]]; + parentY = this.offsetY + this.unitTime * parentCommit.time; + parentX1 = this.offsetX + this.unitSpace * (this.mspace - parentCommit.space); + parentX2 = this.offsetX + this.unitSpace * (this.mspace - parent[1]); + if (parentCommit.space <= commit.space) { + color = this.colors[commit.space]; + } else { + color = this.colors[parentCommit.space]; + } + if (parent[1] === commit.space) { + offset = [0, 5]; + arrow = "l-2,5,4,0,-2,-5,0,5"; + } else if (parent[1] < commit.space) { + offset = [3, 3]; + arrow = "l5,0,-2,4,-3,-4,4,2"; + } else { + offset = [-3, 3]; + arrow = "l-5,0,2,4,3,-4,-4,2"; + } + route = ["M", x + offset[0], y + offset[1]]; + if (i > 0) { + route.push(arrow); + } + if (commit.space !== parentCommit.space || commit.space !== parent[1]) { + route.push("L", parentX2, y + 10, "L", parentX2, parentY - 5); + } + route.push("L", parentX1, parentY); + results.push(r.path(route).attr({ + stroke: color, + "stroke-width": 2 + })); + } + return results; + }; + + BranchGraph.prototype.markCommit = function(commit) { + var r, x, y; + if (commit.id === this.options.commit_id) { + r = this.r; + x = this.offsetX + this.unitSpace * (this.mspace - commit.space); + y = this.offsetY + this.unitTime * commit.time; + r.path(["M", x + 5, y, "L", x + 15, y + 4, "L", x + 15, y - 4, "Z"]).attr({ + fill: "#000", + "fill-opacity": .5, + stroke: "none" + }); + return this.element.scrollTop(y - this.graphHeight / 2); + } + }; + + return BranchGraph; + + })(); + + Raphael.prototype.commitTooltip = function(x, y, commit) { + var boxHeight, boxWidth, icon, idText, messageText, nameText, rect, textSet, tooltip; + boxWidth = 300; + boxHeight = 200; + icon = this.image(gon.relative_url_root + commit.author.icon, x, y, 20, 20); + nameText = this.text(x + 25, y + 10, commit.author.name); + idText = this.text(x, y + 35, commit.id); + messageText = this.text(x, y + 50, commit.message); + textSet = this.set(icon, nameText, idText, messageText).attr({ + "text-anchor": "start", + font: "12px Monaco, monospace" + }); + nameText.attr({ + font: "14px Arial", + "font-weight": "bold" + }); + idText.attr({ + fill: "#AAA" + }); + this.textWrap(messageText, boxWidth - 50); + rect = this.rect(x - 10, y - 10, boxWidth, 100, 4).attr({ + fill: "#FFF", + stroke: "#000", + "stroke-linecap": "round", + "stroke-width": 2 + }); + tooltip = this.set(rect, textSet); + rect.attr({ + height: tooltip.getBBox().height + 10, + width: tooltip.getBBox().width + 10 + }); + tooltip.transform(["t", 20, 20]); + return tooltip; + }; + + Raphael.prototype.textWrap = function(t, width) { + var abc, b, content, h, j, len, letterWidth, s, word, words, x; + content = t.attr("text"); + abc = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + t.attr({ + text: abc + }); + letterWidth = t.getBBox().width / abc.length; + t.attr({ + text: content + }); + words = content.split(" "); + x = 0; + s = []; + for (j = 0, len = words.length; j < len; j++) { + word = words[j]; + if (x + (word.length * letterWidth) > width) { + s.push("\n"); + x = 0; + } + x += word.length * letterWidth; + s.push(word + " "); + } + t.attr({ + text: s.join("") + }); + b = t.getBBox(); + h = Math.abs(b.y2) - Math.abs(b.y) + 1; + return t.attr({ + y: b.y + h + }); + }; + +}).call(this); diff --git a/app/assets/javascripts/network/branch-graph.js.coffee b/app/assets/javascripts/network/branch-graph.js.coffee deleted file mode 100644 index f2fd2a775a4..00000000000 --- a/app/assets/javascripts/network/branch-graph.js.coffee +++ /dev/null @@ -1,340 +0,0 @@ -class @BranchGraph - constructor: (@element, @options) -> - @preparedCommits = {} - @mtime = 0 - @mspace = 0 - @parents = {} - @colors = ["#000"] - @offsetX = 150 - @offsetY = 20 - @unitTime = 30 - @unitSpace = 10 - @prev_start = -1 - @load() - - load: -> - $.ajax - url: @options.url - method: "get" - dataType: "json" - success: $.proxy((data) -> - $(".loading", @element).hide() - @prepareData data.days, data.commits - @buildGraph() - , this) - - prepareData: (@days, @commits) -> - @collectParents() - @graphHeight = $(@element).height() - @graphWidth = $(@element).width() - ch = Math.max(@graphHeight, @offsetY + @unitTime * @mtime + 150) - cw = Math.max(@graphWidth, @offsetX + @unitSpace * @mspace + 300) - @r = Raphael(@element.get(0), cw, ch) - @top = @r.set() - @barHeight = Math.max(@graphHeight, @unitTime * @days.length + 320) - - for c in @commits - c.isParent = true if c.id of @parents - @preparedCommits[c.id] = c - @markCommit(c) - - @collectColors() - - collectParents: -> - for c in @commits - @mtime = Math.max(@mtime, c.time) - @mspace = Math.max(@mspace, c.space) - for p in c.parents - @parents[p[0]] = true - @mspace = Math.max(@mspace, p[1]) - - collectColors: -> - k = 0 - while k < @mspace - @colors.push Raphael.getColor(.8) - # Skipping a few colors in the spectrum to get more contrast between colors - Raphael.getColor() - Raphael.getColor() - k++ - - buildGraph: -> - r = @r - cuday = 0 - cumonth = "" - - r.rect(0, 0, 40, @barHeight).attr fill: "#222" - r.rect(40, 0, 30, @barHeight).attr fill: "#444" - - for day, mm in @days - if cuday isnt day[0] || cumonth isnt day[1] - # Dates - r.text(55, @offsetY + @unitTime * mm, day[0]) - .attr( - font: "12px Monaco, monospace" - fill: "#BBB" - ) - cuday = day[0] - - if cumonth isnt day[1] - # Months - r.text(20, @offsetY + @unitTime * mm, day[1]) - .attr( - font: "12px Monaco, monospace" - fill: "#EEE" - ) - cumonth = day[1] - - @renderPartialGraph() - - @bindEvents() - - renderPartialGraph: -> - start = Math.floor((@element.scrollTop() - @offsetY) / @unitTime) - 10 - if start < 0 - isGraphEdge = true - start = 0 - end = start + 40 - if @commits.length < end - isGraphEdge = true - end = @commits.length - - if @prev_start == -1 or Math.abs(@prev_start - start) > 10 or isGraphEdge - i = start - - @prev_start = start - - while i < end - commit = @commits[i] - i += 1 - - if commit.hasDrawn isnt true - x = @offsetX + @unitSpace * (@mspace - commit.space) - y = @offsetY + @unitTime * commit.time - - @drawDot(x, y, commit) - - @drawLines(x, y, commit) - - @appendLabel(x, y, commit) - - @appendAnchor(x, y, commit) - - commit.hasDrawn = true - - @top.toFront() - - bindEvents: -> - element = @element - - $(element).scroll (event) => - @renderPartialGraph() - - scrollDown: => - @element.scrollTop @element.scrollTop() + 50 - @renderPartialGraph() - - scrollUp: => - @element.scrollTop @element.scrollTop() - 50 - @renderPartialGraph() - - scrollLeft: => - @element.scrollLeft @element.scrollLeft() - 50 - @renderPartialGraph() - - scrollRight: => - @element.scrollLeft @element.scrollLeft() + 50 - @renderPartialGraph() - - scrollBottom: => - @element.scrollTop @element.find('svg').height() - - scrollTop: => - @element.scrollTop 0 - - appendLabel: (x, y, commit) -> - return unless commit.refs - - r = @r - shortrefs = commit.refs - # Truncate if longer than 15 chars - shortrefs = shortrefs.substr(0, 15) + "…" if shortrefs.length > 17 - text = r.text(x + 4, y, shortrefs).attr( - "text-anchor": "start" - font: "10px Monaco, monospace" - fill: "#FFF" - title: commit.refs - ) - textbox = text.getBBox() - # Create rectangle based on the size of the textbox - rect = r.rect(x, y - 7, textbox.width + 5, textbox.height + 5, 4).attr( - fill: "#000" - "fill-opacity": .5 - stroke: "none" - ) - triangle = r.path(["M", x - 5, y, "L", x - 15, y - 4, "L", x - 15, y + 4, "Z"]).attr( - fill: "#000" - "fill-opacity": .5 - stroke: "none" - ) - - label = r.set(rect, text) - label.transform(["t", -rect.getBBox().width - 15, 0]) - - # Set text to front - text.toFront() - - appendAnchor: (x, y, commit) -> - r = @r - top = @top - options = @options - anchor = r.circle(x, y, 10).attr( - fill: "#000" - opacity: 0 - cursor: "pointer" - ).click(-> - window.open options.commit_url.replace("%s", commit.id), "_blank" - ).hover(-> - @tooltip = r.commitTooltip(x + 5, y, commit) - top.push @tooltip.insertBefore(this) - , -> - @tooltip and @tooltip.remove() and delete @tooltip - ) - top.push anchor - - drawDot: (x, y, commit) -> - r = @r - r.circle(x, y, 3).attr( - fill: @colors[commit.space] - stroke: "none" - ) - - avatar_box_x = @offsetX + @unitSpace * @mspace + 10 - avatar_box_y = y - 10 - r.rect(avatar_box_x, avatar_box_y, 20, 20).attr( - stroke: @colors[commit.space] - "stroke-width": 2 - ) - r.image(commit.author.icon, avatar_box_x, avatar_box_y, 20, 20) - r.text(@offsetX + @unitSpace * @mspace + 35, y, commit.message.split("\n")[0]).attr( - "text-anchor": "start" - font: "14px Monaco, monospace" - ) - - drawLines: (x, y, commit) -> - r = @r - for parent, i in commit.parents - parentCommit = @preparedCommits[parent[0]] - parentY = @offsetY + @unitTime * parentCommit.time - parentX1 = @offsetX + @unitSpace * (@mspace - parentCommit.space) - parentX2 = @offsetX + @unitSpace * (@mspace - parent[1]) - - # Set line color - if parentCommit.space <= commit.space - color = @colors[commit.space] - - else - color = @colors[parentCommit.space] - - # Build line shape - if parent[1] is commit.space - offset = [0, 5] - arrow = "l-2,5,4,0,-2,-5,0,5" - - else if parent[1] < commit.space - offset = [3, 3] - arrow = "l5,0,-2,4,-3,-4,4,2" - - else - offset = [-3, 3] - arrow = "l-5,0,2,4,3,-4,-4,2" - - # Start point - route = ["M", x + offset[0], y + offset[1]] - - # Add arrow if not first parent - if i > 0 - route.push(arrow) - - # Circumvent if overlap - if commit.space isnt parentCommit.space or commit.space isnt parent[1] - route.push( - "L", parentX2, y + 10, - "L", parentX2, parentY - 5, - ) - - # End point - route.push("L", parentX1, parentY) - - r - .path(route) - .attr( - stroke: color - "stroke-width": 2) - - markCommit: (commit) -> - if commit.id is @options.commit_id - r = @r - x = @offsetX + @unitSpace * (@mspace - commit.space) - y = @offsetY + @unitTime * commit.time - r.path(["M", x + 5, y, "L", x + 15, y + 4, "L", x + 15, y - 4, "Z"]).attr( - fill: "#000" - "fill-opacity": .5 - stroke: "none" - ) - # Displayed in the center - @element.scrollTop(y - @graphHeight / 2) - -Raphael::commitTooltip = (x, y, commit) -> - boxWidth = 300 - boxHeight = 200 - icon = @image(gon.relative_url_root + commit.author.icon, x, y, 20, 20) - nameText = @text(x + 25, y + 10, commit.author.name) - idText = @text(x, y + 35, commit.id) - messageText = @text(x, y + 50, commit.message) - textSet = @set(icon, nameText, idText, messageText).attr( - "text-anchor": "start" - font: "12px Monaco, monospace" - ) - nameText.attr( - font: "14px Arial" - "font-weight": "bold" - ) - - idText.attr fill: "#AAA" - @textWrap messageText, boxWidth - 50 - rect = @rect(x - 10, y - 10, boxWidth, 100, 4).attr( - fill: "#FFF" - stroke: "#000" - "stroke-linecap": "round" - "stroke-width": 2 - ) - tooltip = @set(rect, textSet) - rect.attr( - height: tooltip.getBBox().height + 10 - width: tooltip.getBBox().width + 10 - ) - - tooltip.transform ["t", 20, 20] - tooltip - -Raphael::textWrap = (t, width) -> - content = t.attr("text") - abc = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - t.attr text: abc - letterWidth = t.getBBox().width / abc.length - t.attr text: content - words = content.split(" ") - x = 0 - s = [] - - for word in words - if x + (word.length * letterWidth) > width - s.push "\n" - x = 0 - x += word.length * letterWidth - s.push word + " " - - t.attr text: s.join("") - b = t.getBBox() - h = Math.abs(b.y2) - Math.abs(b.y) + 1 - t.attr y: b.y + h diff --git a/app/assets/javascripts/network/network.js b/app/assets/javascripts/network/network.js new file mode 100644 index 00000000000..7baebcd100a --- /dev/null +++ b/app/assets/javascripts/network/network.js @@ -0,0 +1,19 @@ +(function() { + this.Network = (function() { + function Network(opts) { + var vph; + $("#filter_ref").click(function() { + return $(this).closest('form').submit(); + }); + this.branch_graph = new BranchGraph($(".network-graph"), opts); + vph = $(window).height() - 250; + $('.network-graph').css({ + 'height': vph + 'px' + }); + } + + return Network; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/network/network.js.coffee b/app/assets/javascripts/network/network.js.coffee deleted file mode 100644 index f4ef07a50a7..00000000000 --- a/app/assets/javascripts/network/network.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -class @Network - constructor: (opts) -> - $("#filter_ref").click -> - $(this).closest('form').submit() - - @branch_graph = new BranchGraph($(".network-graph"), opts) - - vph = $(window).height() - 250 - $('.network-graph').css 'height': (vph + 'px') diff --git a/app/assets/javascripts/network/network_bundle.js b/app/assets/javascripts/network/network_bundle.js new file mode 100644 index 00000000000..6a7422a7755 --- /dev/null +++ b/app/assets/javascripts/network/network_bundle.js @@ -0,0 +1,16 @@ + +/*= require_tree . */ + +(function() { + $(function() { + var network_graph; + network_graph = new Network({ + url: $(".network-graph").attr('data-url'), + commit_url: $(".network-graph").attr('data-commit-url'), + ref: $(".network-graph").attr('data-ref'), + commit_id: $(".network-graph").attr('data-commit-id') + }); + return new ShortcutsNetwork(network_graph.branch_graph); + }); + +}).call(this); diff --git a/app/assets/javascripts/network/network_bundle.js.coffee b/app/assets/javascripts/network/network_bundle.js.coffee deleted file mode 100644 index f75f63869c5..00000000000 --- a/app/assets/javascripts/network/network_bundle.js.coffee +++ /dev/null @@ -1,17 +0,0 @@ -# This is a manifest file that'll be compiled into including all the files listed below. -# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -# be included in the compiled file accessible from http://example.com/assets/application.js -# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -# the compiled file. -# -#= require_tree . - -$ -> - network_graph = new Network({ - url: $(".network-graph").attr('data-url'), - commit_url: $(".network-graph").attr('data-commit-url'), - ref: $(".network-graph").attr('data-ref'), - commit_id: $(".network-graph").attr('data-commit-id') - }) - - new ShortcutsNetwork(network_graph.branch_graph) diff --git a/app/assets/javascripts/new_branch_form.js b/app/assets/javascripts/new_branch_form.js new file mode 100644 index 00000000000..20aa2fced27 --- /dev/null +++ b/app/assets/javascripts/new_branch_form.js @@ -0,0 +1,104 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + this.NewBranchForm = (function() { + function NewBranchForm(form, availableRefs) { + this.validate = bind(this.validate, this); + this.branchNameError = form.find('.js-branch-name-error'); + this.name = form.find('.js-branch-name'); + this.ref = form.find('#ref'); + this.setupAvailableRefs(availableRefs); + this.setupRestrictions(); + this.addBinding(); + this.init(); + } + + NewBranchForm.prototype.addBinding = function() { + return this.name.on('blur', this.validate); + }; + + NewBranchForm.prototype.init = function() { + if (this.name.val().length > 0) { + return this.name.trigger('blur'); + } + }; + + NewBranchForm.prototype.setupAvailableRefs = function(availableRefs) { + return this.ref.autocomplete({ + source: availableRefs, + minLength: 1 + }); + }; + + NewBranchForm.prototype.setupRestrictions = function() { + var endsWith, invalid, single, startsWith; + startsWith = { + pattern: /^(\/|\.)/g, + prefix: "can't start with", + conjunction: "or" + }; + endsWith = { + pattern: /(\/|\.|\.lock)$/g, + prefix: "can't end in", + conjunction: "or" + }; + invalid = { + pattern: /(\s|~|\^|:|\?|\*|\[|\\|\.\.|@\{|\/{2,}){1}/g, + prefix: "can't contain", + conjunction: ", " + }; + single = { + pattern: /^@+$/g, + prefix: "can't be", + conjunction: "or" + }; + return this.restrictions = [startsWith, invalid, endsWith, single]; + }; + + NewBranchForm.prototype.validate = function() { + var errorMessage, errors, formatter, unique, validator; + this.branchNameError.empty(); + unique = function(values, value) { + if (indexOf.call(values, value) < 0) { + values.push(value); + } + return values; + }; + formatter = function(values, restriction) { + var formatted; + formatted = values.map(function(value) { + switch (false) { + case !/\s/.test(value): + return 'spaces'; + case !/\/{2,}/g.test(value): + return 'consecutive slashes'; + default: + return "'" + value + "'"; + } + }); + return restriction.prefix + " " + (formatted.join(restriction.conjunction)); + }; + validator = (function(_this) { + return function(errors, restriction) { + var matched; + matched = _this.name.val().match(restriction.pattern); + if (matched) { + return errors.concat(formatter(matched.reduce(unique, []), restriction)); + } else { + return errors; + } + }; + })(this); + errors = this.restrictions.reduce(validator, []); + if (errors.length > 0) { + errorMessage = $("").text(errors.join(', ')); + return this.branchNameError.append(errorMessage); + } + }; + + return NewBranchForm; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/new_branch_form.js.coffee b/app/assets/javascripts/new_branch_form.js.coffee deleted file mode 100644 index 4b350854f78..00000000000 --- a/app/assets/javascripts/new_branch_form.js.coffee +++ /dev/null @@ -1,78 +0,0 @@ -class @NewBranchForm - constructor: (form, availableRefs) -> - @branchNameError = form.find('.js-branch-name-error') - @name = form.find('.js-branch-name') - @ref = form.find('#ref') - - @setupAvailableRefs(availableRefs) - @setupRestrictions() - @addBinding() - @init() - - addBinding: -> - @name.on 'blur', @validate - - init: -> - @name.trigger 'blur' if @name.val().length > 0 - - setupAvailableRefs: (availableRefs) -> - @ref.autocomplete - source: availableRefs, - minLength: 1 - - setupRestrictions: -> - startsWith = { - pattern: /^(\/|\.)/g, - prefix: "can't start with", - conjunction: "or" - } - - endsWith = { - pattern: /(\/|\.|\.lock)$/g, - prefix: "can't end in", - conjunction: "or" - } - - invalid = { - pattern: /(\s|~|\^|:|\?|\*|\[|\\|\.\.|@\{|\/{2,}){1}/g - prefix: "can't contain", - conjunction: ", " - } - - single = { - pattern: /^@+$/g - prefix: "can't be", - conjunction: "or" - } - - @restrictions = [startsWith, invalid, endsWith, single] - - validate: => - @branchNameError.empty() - - unique = (values, value) -> - values.push(value) unless value in values - values - - formatter = (values, restriction) -> - formatted = values.map (value) -> - switch - when /\s/.test value then 'spaces' - when /\/{2,}/g.test value then 'consecutive slashes' - else "'#{value}'" - - "#{restriction.prefix} #{formatted.join(restriction.conjunction)}" - - validator = (errors, restriction) => - matched = @name.val().match(restriction.pattern) - - if matched - errors.concat formatter(matched.reduce(unique, []), restriction) - else - errors - - errors = @restrictions.reduce validator, [] - - if errors.length > 0 - errorMessage = $("").text(errors.join(', ')) - @branchNameError.append(errorMessage) diff --git a/app/assets/javascripts/new_commit_form.js b/app/assets/javascripts/new_commit_form.js new file mode 100644 index 00000000000..21bf8867f7b --- /dev/null +++ b/app/assets/javascripts/new_commit_form.js @@ -0,0 +1,34 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.NewCommitForm = (function() { + function NewCommitForm(form) { + this.renderDestination = bind(this.renderDestination, this); + this.newBranch = form.find('.js-target-branch'); + this.originalBranch = form.find('.js-original-branch'); + this.createMergeRequest = form.find('.js-create-merge-request'); + this.createMergeRequestContainer = form.find('.js-create-merge-request-container'); + this.renderDestination(); + this.newBranch.keyup(this.renderDestination); + } + + NewCommitForm.prototype.renderDestination = function() { + var different; + different = this.newBranch.val() !== this.originalBranch.val(); + if (different) { + this.createMergeRequestContainer.show(); + if (!this.wasDifferent) { + this.createMergeRequest.prop('checked', true); + } + } else { + this.createMergeRequestContainer.hide(); + this.createMergeRequest.prop('checked', false); + } + return this.wasDifferent = different; + }; + + return NewCommitForm; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/new_commit_form.js.coffee b/app/assets/javascripts/new_commit_form.js.coffee deleted file mode 100644 index 03f0f51acfa..00000000000 --- a/app/assets/javascripts/new_commit_form.js.coffee +++ /dev/null @@ -1,21 +0,0 @@ -class @NewCommitForm - constructor: (form) -> - @newBranch = form.find('.js-target-branch') - @originalBranch = form.find('.js-original-branch') - @createMergeRequest = form.find('.js-create-merge-request') - @createMergeRequestContainer = form.find('.js-create-merge-request-container') - - @renderDestination() - @newBranch.keyup @renderDestination - - renderDestination: => - different = @newBranch.val() != @originalBranch.val() - - if different - @createMergeRequestContainer.show() - @createMergeRequest.prop('checked', true) unless @wasDifferent - else - @createMergeRequestContainer.hide() - @createMergeRequest.prop('checked', false) - - @wasDifferent = different diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js new file mode 100644 index 00000000000..9ece474d994 --- /dev/null +++ b/app/assets/javascripts/notes.js @@ -0,0 +1,732 @@ + +/*= require autosave */ + + +/*= require autosize */ + + +/*= require dropzone */ + + +/*= require dropzone_input */ + + +/*= require gfm_auto_complete */ + + +/*= require jquery.atwho */ + + +/*= require task_list */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Notes = (function() { + var isMetaKey; + + Notes.interval = null; + + function Notes(notes_url, note_ids, last_fetched_at, view) { + this.updateTargetButtons = bind(this.updateTargetButtons, this); + this.updateCloseButton = bind(this.updateCloseButton, this); + this.visibilityChange = bind(this.visibilityChange, this); + this.cancelDiscussionForm = bind(this.cancelDiscussionForm, this); + this.addDiffNote = bind(this.addDiffNote, this); + this.setupDiscussionNoteForm = bind(this.setupDiscussionNoteForm, this); + this.replyToDiscussionNote = bind(this.replyToDiscussionNote, this); + this.removeNote = bind(this.removeNote, this); + this.cancelEdit = bind(this.cancelEdit, this); + this.updateNote = bind(this.updateNote, this); + this.addDiscussionNote = bind(this.addDiscussionNote, this); + this.addNoteError = bind(this.addNoteError, this); + this.addNote = bind(this.addNote, this); + this.resetMainTargetForm = bind(this.resetMainTargetForm, this); + this.refresh = bind(this.refresh, this); + this.keydownNoteText = bind(this.keydownNoteText, this); + this.notes_url = notes_url; + this.note_ids = note_ids; + this.last_fetched_at = last_fetched_at; + this.view = view; + this.noteable_url = document.URL; + this.notesCountBadge || (this.notesCountBadge = $(".issuable-details").find(".notes-tab .badge")); + this.basePollingInterval = 15000; + this.maxPollingSteps = 4; + this.cleanBinding(); + this.addBinding(); + this.setPollingInterval(); + this.setupMainTargetNoteForm(); + this.initTaskList(); + } + + Notes.prototype.addBinding = function() { + $(document).on("ajax:success", ".js-main-target-form", this.addNote); + $(document).on("ajax:success", ".js-discussion-note-form", this.addDiscussionNote); + $(document).on("ajax:error", ".js-main-target-form", this.addNoteError); + $(document).on("ajax:success", "form.edit-note", this.updateNote); + $(document).on("click", ".js-note-edit", this.showEditForm); + $(document).on("click", ".note-edit-cancel", this.cancelEdit); + $(document).on("click", ".js-comment-button", this.updateCloseButton); + $(document).on("keyup input", ".js-note-text", this.updateTargetButtons); + $(document).on("click", ".js-note-delete", this.removeNote); + $(document).on("click", ".js-note-attachment-delete", this.removeAttachment); + $(document).on("ajax:complete", ".js-main-target-form", this.reenableTargetFormSubmitButton); + $(document).on("ajax:success", ".js-main-target-form", this.resetMainTargetForm); + $(document).on("click", ".js-note-discard", this.resetMainTargetForm); + $(document).on("change", ".js-note-attachment-input", this.updateFormAttachment); + $(document).on("click", ".js-discussion-reply-button", this.replyToDiscussionNote); + $(document).on("click", ".js-add-diff-note-button", this.addDiffNote); + $(document).on("click", ".js-close-discussion-note-form", this.cancelDiscussionForm); + $(document).on("visibilitychange", this.visibilityChange); + $(document).on("issuable:change", this.refresh); + return $(document).on("keydown", ".js-note-text", this.keydownNoteText); + }; + + Notes.prototype.cleanBinding = function() { + $(document).off("ajax:success", ".js-main-target-form"); + $(document).off("ajax:success", ".js-discussion-note-form"); + $(document).off("ajax:success", "form.edit-note"); + $(document).off("click", ".js-note-edit"); + $(document).off("click", ".note-edit-cancel"); + $(document).off("click", ".js-note-delete"); + $(document).off("click", ".js-note-attachment-delete"); + $(document).off("ajax:complete", ".js-main-target-form"); + $(document).off("ajax:success", ".js-main-target-form"); + $(document).off("click", ".js-discussion-reply-button"); + $(document).off("click", ".js-add-diff-note-button"); + $(document).off("visibilitychange"); + $(document).off("keyup", ".js-note-text"); + $(document).off("click", ".js-note-target-reopen"); + $(document).off("click", ".js-note-target-close"); + $(document).off("click", ".js-note-discard"); + $(document).off("keydown", ".js-note-text"); + $('.note .js-task-list-container').taskList('disable'); + return $(document).off('tasklist:changed', '.note .js-task-list-container'); + }; + + Notes.prototype.keydownNoteText = function(e) { + var $textarea, discussionNoteForm, editNote, myLastNote, myLastNoteEditBtn, newText, originalText; + if (isMetaKey(e)) { + return; + } + $textarea = $(e.target); + switch (e.which) { + case 38: + if ($textarea.val() !== '') { + return; + } + myLastNote = $("li.note[data-author-id='" + gon.current_user_id + "'][data-editable]:last"); + if (myLastNote.length) { + myLastNoteEditBtn = myLastNote.find('.js-note-edit'); + return myLastNoteEditBtn.trigger('click', [true, myLastNote]); + } + break; + case 27: + discussionNoteForm = $textarea.closest('.js-discussion-note-form'); + if (discussionNoteForm.length) { + if ($textarea.val() !== '') { + if (!confirm('Are you sure you want to cancel creating this comment?')) { + return; + } + } + this.removeDiscussionNoteForm(discussionNoteForm); + return; + } + editNote = $textarea.closest('.note'); + if (editNote.length) { + originalText = $textarea.closest('form').data('original-note'); + newText = $textarea.val(); + if (originalText !== newText) { + if (!confirm('Are you sure you want to cancel editing this comment?')) { + return; + } + } + return this.removeNoteEditForm(editNote); + } + } + }; + + isMetaKey = function(e) { + return e.metaKey || e.ctrlKey || e.altKey || e.shiftKey; + }; + + Notes.prototype.initRefresh = function() { + clearInterval(Notes.interval); + return Notes.interval = setInterval((function(_this) { + return function() { + return _this.refresh(); + }; + })(this), this.pollingInterval); + }; + + Notes.prototype.refresh = function() { + if (!document.hidden && document.URL.indexOf(this.noteable_url) === 0) { + return this.getContent(); + } + }; + + Notes.prototype.getContent = function() { + if (this.refreshing) { + return; + } + this.refreshing = true; + return $.ajax({ + url: this.notes_url, + data: "last_fetched_at=" + this.last_fetched_at, + dataType: "json", + success: (function(_this) { + return function(data) { + var notes; + notes = data.notes; + _this.last_fetched_at = data.last_fetched_at; + _this.setPollingInterval(data.notes.length); + return $.each(notes, function(i, note) { + if (note.discussion_html != null) { + return _this.renderDiscussionNote(note); + } else { + return _this.renderNote(note); + } + }); + }; + })(this) + }).always((function(_this) { + return function() { + return _this.refreshing = false; + }; + })(this)); + }; + + + /* + Increase @pollingInterval up to 120 seconds on every function call, + if `shouldReset` has a truthy value, 'null' or 'undefined' the variable + will reset to @basePollingInterval. + + Note: this function is used to gradually increase the polling interval + if there aren't new notes coming from the server + */ + + Notes.prototype.setPollingInterval = function(shouldReset) { + var nthInterval; + if (shouldReset == null) { + shouldReset = true; + } + nthInterval = this.basePollingInterval * Math.pow(2, this.maxPollingSteps - 1); + if (shouldReset) { + this.pollingInterval = this.basePollingInterval; + } else if (this.pollingInterval < nthInterval) { + this.pollingInterval *= 2; + } + return this.initRefresh(); + }; + + + /* + Render note in main comments area. + + Note: for rendering inline notes use renderDiscussionNote + */ + + Notes.prototype.renderNote = function(note) { + var $notesList, votesBlock; + if (!note.valid) { + if (note.award) { + new Flash('You have already awarded this emoji!', 'alert'); + } + return; + } + if (note.award) { + votesBlock = $('.js-awards-block').eq(0); + gl.awardsHandler.addAwardToEmojiBar(votesBlock, note.name); + return gl.awardsHandler.scrollToAwards(); + } else if (this.isNewNote(note)) { + this.note_ids.push(note.id); + $notesList = $('ul.main-notes-list'); + $notesList.append(note.html).syntaxHighlight(); + gl.utils.localTimeAgo($notesList.find("#note_" + note.id + " .js-timeago"), false); + this.initTaskList(); + return this.updateNotesCount(1); + } + }; + + + /* + Check if note does not exists on page + */ + + Notes.prototype.isNewNote = function(note) { + return $.inArray(note.id, this.note_ids) === -1; + }; + + Notes.prototype.isParallelView = function() { + return this.view === 'parallel'; + }; + + + /* + Render note in discussion area. + + Note: for rendering inline notes use renderDiscussionNote + */ + + Notes.prototype.renderDiscussionNote = function(note) { + var discussionContainer, form, note_html, row; + if (!this.isNewNote(note)) { + return; + } + this.note_ids.push(note.id); + form = $("#new-discussion-note-form-" + note.discussion_id); + if ((note.original_discussion_id != null) && form.length === 0) { + form = $("#new-discussion-note-form-" + note.original_discussion_id); + } + row = form.closest("tr"); + note_html = $(note.html); + note_html.syntaxHighlight(); + discussionContainer = $(".notes[data-discussion-id='" + note.discussion_id + "']"); + if ((note.original_discussion_id != null) && discussionContainer.length === 0) { + discussionContainer = $(".notes[data-discussion-id='" + note.original_discussion_id + "']"); + } + if (discussionContainer.length === 0) { + row.after(note.diff_discussion_html); + row.next().find(".note").remove(); + discussionContainer = $(".notes[data-discussion-id='" + note.discussion_id + "']"); + discussionContainer.append(note_html); + if ($('body').attr('data-page').indexOf('projects:merge_request') === 0) { + $('ul.main-notes-list').append(note.discussion_html).syntaxHighlight(); + } + } else { + discussionContainer.append(note_html); + } + gl.utils.localTimeAgo($('.js-timeago', note_html), false); + return this.updateNotesCount(1); + }; + + + /* + Called in response the main target form has been successfully submitted. + + Removes any errors. + Resets text and preview. + Resets buttons. + */ + + Notes.prototype.resetMainTargetForm = function(e) { + var form; + form = $(".js-main-target-form"); + form.find(".js-errors").remove(); + form.find(".js-md-write-button").click(); + form.find(".js-note-text").val("").trigger("input"); + form.find(".js-note-text").data("autosave").reset(); + return this.updateTargetButtons(e); + }; + + Notes.prototype.reenableTargetFormSubmitButton = function() { + var form; + form = $(".js-main-target-form"); + return form.find(".js-note-text").trigger("input"); + }; + + + /* + Shows the main form and does some setup on it. + + Sets some hidden fields in the form. + */ + + Notes.prototype.setupMainTargetNoteForm = function() { + var form; + form = $(".js-new-note-form"); + this.formClone = form.clone(); + this.setupNoteForm(form); + form.removeClass("js-new-note-form"); + form.addClass("js-main-target-form"); + form.find("#note_line_code").remove(); + form.find("#note_position").remove(); + form.find("#note_type").remove(); + return this.parentTimeline = form.parents('.timeline'); + }; + + + /* + General note form setup. + + deactivates the submit button when text is empty + hides the preview button when text is empty + setup GFM auto complete + show the form + */ + + Notes.prototype.setupNoteForm = function(form) { + var textarea; + new GLForm(form); + textarea = form.find(".js-note-text"); + return new Autosave(textarea, ["Note", form.find("#note_noteable_type").val(), form.find("#note_noteable_id").val(), form.find("#note_commit_id").val(), form.find("#note_type").val(), form.find("#note_line_code").val(), form.find("#note_position").val()]); + }; + + + /* + Called in response to the new note form being submitted + + Adds new note to list. + */ + + Notes.prototype.addNote = function(xhr, note, status) { + return this.renderNote(note); + }; + + Notes.prototype.addNoteError = function(xhr, note, status) { + return new Flash('Your comment could not be submitted! Please check your network connection and try again.', 'alert', this.parentTimeline); + }; + + + /* + Called in response to the new note form being submitted + + Adds new note to list. + */ + + Notes.prototype.addDiscussionNote = function(xhr, note, status) { + this.renderDiscussionNote(note); + return this.removeDiscussionNoteForm($(xhr.target)); + }; + + + /* + Called in response to the edit note form being submitted + + Updates the current note field. + */ + + Notes.prototype.updateNote = function(_xhr, note, _status) { + var $html, $note_li; + $html = $(note.html); + gl.utils.localTimeAgo($('.js-timeago', $html)); + $html.syntaxHighlight(); + $html.find('.js-task-list-container').taskList('enable'); + $note_li = $('.note-row-' + note.id); + return $note_li.replaceWith($html); + }; + + + /* + Called in response to clicking the edit note link + + Replaces the note text with the note edit form + Adds a data attribute to the form with the original content of the note for cancellations + */ + + Notes.prototype.showEditForm = function(e, scrollTo, myLastNote) { + var $noteText, done, form, note; + e.preventDefault(); + note = $(this).closest(".note"); + note.addClass("is-editting"); + form = note.find(".note-edit-form"); + form.addClass('current-note-edit-form'); + note.find(".js-note-attachment-delete").show(); + done = function($noteText) { + var noteTextVal; + noteTextVal = $noteText.val(); + form.find('form.edit-note').data('original-note', noteTextVal); + return $noteText.val('').val(noteTextVal); + }; + new GLForm(form); + if ((scrollTo != null) && (myLastNote != null)) { + $('html, body').scrollTop($(document).height()); + return $('html, body').animate({ + scrollTop: myLastNote.offset().top - 150 + }, 500, function() { + var $noteText; + $noteText = form.find(".js-note-text"); + $noteText.focus(); + return done($noteText); + }); + } else { + $noteText = form.find('.js-note-text'); + $noteText.focus(); + return done($noteText); + } + }; + + + /* + Called in response to clicking the edit note link + + Hides edit form and restores the original note text to the editor textarea. + */ + + Notes.prototype.cancelEdit = function(e) { + var note; + e.preventDefault(); + note = $(e.target).closest('.note'); + return this.removeNoteEditForm(note); + }; + + Notes.prototype.removeNoteEditForm = function(note) { + var form; + form = note.find(".current-note-edit-form"); + note.removeClass("is-editting"); + form.removeClass("current-note-edit-form"); + return form.find(".js-note-text").val(form.find('form.edit-note').data('original-note')); + }; + + + /* + Called in response to deleting a note of any kind. + + Removes the actual note from view. + Removes the whole discussion if the last note is being removed. + */ + + Notes.prototype.removeNote = function(e) { + var noteId; + noteId = $(e.currentTarget).closest(".note").attr("id"); + $(".note[id='" + noteId + "']").each((function(_this) { + return function(i, el) { + var note, notes; + note = $(el); + notes = note.closest(".notes"); + if (notes.find(".note").length === 1) { + notes.closest(".timeline-entry").remove(); + notes.closest("tr").remove(); + } + return note.remove(); + }; + })(this)); + return this.updateNotesCount(-1); + }; + + + /* + Called in response to clicking the delete attachment link + + Removes the attachment wrapper view, including image tag if it exists + Resets the note editing form + */ + + Notes.prototype.removeAttachment = function() { + var note; + note = $(this).closest(".note"); + note.find(".note-attachment").remove(); + note.find(".note-body > .note-text").show(); + note.find(".note-header").show(); + return note.find(".current-note-edit-form").remove(); + }; + + + /* + Called when clicking on the "reply" button for a diff line. + + Shows the note form below the notes. + */ + + Notes.prototype.replyToDiscussionNote = function(e) { + var form, replyLink; + form = this.formClone.clone(); + replyLink = $(e.target).closest(".js-discussion-reply-button"); + replyLink.hide(); + replyLink.after(form); + return this.setupDiscussionNoteForm(replyLink, form); + }; + + + /* + Shows the diff or discussion form and does some setup on it. + + Sets some hidden fields in the form. + + Note: dataHolder must have the "discussionId", "lineCode", "noteableType" + and "noteableId" data attributes set. + */ + + Notes.prototype.setupDiscussionNoteForm = function(dataHolder, form) { + form.attr('id', "new-discussion-note-form-" + (dataHolder.data("discussionId"))); + form.attr("data-line-code", dataHolder.data("lineCode")); + form.find("#note_type").val(dataHolder.data("noteType")); + form.find("#line_type").val(dataHolder.data("lineType")); + form.find("#note_commit_id").val(dataHolder.data("commitId")); + form.find("#note_line_code").val(dataHolder.data("lineCode")); + form.find("#note_position").val(dataHolder.attr("data-position")); + form.find("#note_noteable_type").val(dataHolder.data("noteableType")); + form.find("#note_noteable_id").val(dataHolder.data("noteableId")); + form.find('.js-note-discard').show().removeClass('js-note-discard').addClass('js-close-discussion-note-form').text(form.find('.js-close-discussion-note-form').data('cancel-text')); + this.setupNoteForm(form); + form.find(".js-note-text").focus(); + return form.removeClass('js-main-target-form').addClass("discussion-form js-discussion-note-form"); + }; + + + /* + Called when clicking on the "add a comment" button on the side of a diff line. + + Inserts a temporary row for the form below the line. + Sets up the form and shows it. + */ + + Notes.prototype.addDiffNote = function(e) { + var $link, addForm, hasNotes, lineType, newForm, nextRow, noteForm, notesContent, replyButton, row, rowCssToAdd, targetContent; + e.preventDefault(); + $link = $(e.currentTarget); + row = $link.closest("tr"); + nextRow = row.next(); + hasNotes = nextRow.is(".notes_holder"); + addForm = false; + targetContent = ".notes_content"; + rowCssToAdd = ""; + if (this.isParallelView()) { + lineType = $link.data("lineType"); + targetContent += "." + lineType; + rowCssToAdd = ""; + } + if (hasNotes) { + notesContent = nextRow.find(targetContent); + if (notesContent.length) { + replyButton = notesContent.find(".js-discussion-reply-button:visible"); + if (replyButton.length) { + e.target = replyButton[0]; + $.proxy(this.replyToDiscussionNote, replyButton[0], e).call(); + } else { + noteForm = notesContent.find(".js-discussion-note-form"); + if (noteForm.length === 0) { + addForm = true; + } + } + } + } else { + row.after(rowCssToAdd); + addForm = true; + } + if (addForm) { + newForm = this.formClone.clone(); + newForm.appendTo(row.next().find(targetContent)); + return this.setupDiscussionNoteForm($link, newForm); + } + }; + + + /* + Called in response to "cancel" on a diff note form. + + Shows the reply button again. + Removes the form and if necessary it's temporary row. + */ + + Notes.prototype.removeDiscussionNoteForm = function(form) { + var glForm, row; + row = form.closest("tr"); + glForm = form.data('gl-form'); + glForm.destroy(); + form.find(".js-note-text").data("autosave").reset(); + form.prev(".js-discussion-reply-button").show(); + if (row.is(".js-temp-notes-holder")) { + return row.remove(); + } else { + return form.remove(); + } + }; + + Notes.prototype.cancelDiscussionForm = function(e) { + var form; + e.preventDefault(); + form = $(e.target).closest(".js-discussion-note-form"); + return this.removeDiscussionNoteForm(form); + }; + + + /* + Called after an attachment file has been selected. + + Updates the file name for the selected attachment. + */ + + Notes.prototype.updateFormAttachment = function() { + var filename, form; + form = $(this).closest("form"); + filename = $(this).val().replace(/^.*[\\\/]/, ""); + return form.find(".js-attachment-filename").text(filename); + }; + + + /* + Called when the tab visibility changes + */ + + Notes.prototype.visibilityChange = function() { + return this.refresh(); + }; + + Notes.prototype.updateCloseButton = function(e) { + var closebtn, form, textarea; + textarea = $(e.target); + form = textarea.parents('form'); + closebtn = form.find('.js-note-target-close'); + return closebtn.text(closebtn.data('original-text')); + }; + + Notes.prototype.updateTargetButtons = function(e) { + var closebtn, closetext, discardbtn, form, reopenbtn, reopentext, textarea; + textarea = $(e.target); + form = textarea.parents('form'); + reopenbtn = form.find('.js-note-target-reopen'); + closebtn = form.find('.js-note-target-close'); + discardbtn = form.find('.js-note-discard'); + if (textarea.val().trim().length > 0) { + reopentext = reopenbtn.data('alternative-text'); + closetext = closebtn.data('alternative-text'); + if (reopenbtn.text() !== reopentext) { + reopenbtn.text(reopentext); + } + if (closebtn.text() !== closetext) { + closebtn.text(closetext); + } + if (reopenbtn.is(':not(.btn-comment-and-reopen)')) { + reopenbtn.addClass('btn-comment-and-reopen'); + } + if (closebtn.is(':not(.btn-comment-and-close)')) { + closebtn.addClass('btn-comment-and-close'); + } + if (discardbtn.is(':hidden')) { + return discardbtn.show(); + } + } else { + reopentext = reopenbtn.data('original-text'); + closetext = closebtn.data('original-text'); + if (reopenbtn.text() !== reopentext) { + reopenbtn.text(reopentext); + } + if (closebtn.text() !== closetext) { + closebtn.text(closetext); + } + if (reopenbtn.is('.btn-comment-and-reopen')) { + reopenbtn.removeClass('btn-comment-and-reopen'); + } + if (closebtn.is('.btn-comment-and-close')) { + closebtn.removeClass('btn-comment-and-close'); + } + if (discardbtn.is(':visible')) { + return discardbtn.hide(); + } + } + }; + + Notes.prototype.initTaskList = function() { + this.enableTaskList(); + return $(document).on('tasklist:changed', '.note .js-task-list-container', this.updateTaskList); + }; + + Notes.prototype.enableTaskList = function() { + return $('.note .js-task-list-container').taskList('enable'); + }; + + Notes.prototype.updateTaskList = function() { + return $('form', this).submit(); + }; + + Notes.prototype.updateNotesCount = function(updateCount) { + return this.notesCountBadge.text(parseInt(this.notesCountBadge.text()) + updateCount); + }; + + return Notes; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee deleted file mode 100644 index d4de712f88c..00000000000 --- a/app/assets/javascripts/notes.js.coffee +++ /dev/null @@ -1,694 +0,0 @@ -#= require autosave -#= require autosize -#= require dropzone -#= require dropzone_input -#= require gfm_auto_complete -#= require jquery.atwho -#= require task_list - -class @Notes - @interval: null - - constructor: (notes_url, note_ids, last_fetched_at, view) -> - @notes_url = notes_url - @note_ids = note_ids - @last_fetched_at = last_fetched_at - @view = view - @noteable_url = document.URL - @notesCountBadge ||= $(".issuable-details").find(".notes-tab .badge") - @basePollingInterval = 15000 - @maxPollingSteps = 4 - - @cleanBinding() - @addBinding() - @setPollingInterval() - @setupMainTargetNoteForm() - @initTaskList() - - addBinding: -> - # add note to UI after creation - $(document).on "ajax:success", ".js-main-target-form", @addNote - $(document).on "ajax:success", ".js-discussion-note-form", @addDiscussionNote - - # catch note ajax errors - $(document).on "ajax:error", ".js-main-target-form", @addNoteError - - # change note in UI after update - $(document).on "ajax:success", "form.edit-note", @updateNote - - # Edit note link - $(document).on "click", ".js-note-edit", @showEditForm - $(document).on "click", ".note-edit-cancel", @cancelEdit - - # Reopen and close actions for Issue/MR combined with note form submit - $(document).on "click", ".js-comment-button", @updateCloseButton - $(document).on "keyup input", ".js-note-text", @updateTargetButtons - - # remove a note (in general) - $(document).on "click", ".js-note-delete", @removeNote - - # delete note attachment - $(document).on "click", ".js-note-attachment-delete", @removeAttachment - - # reset main target form after submit - $(document).on "ajax:complete", ".js-main-target-form", @reenableTargetFormSubmitButton - $(document).on "ajax:success", ".js-main-target-form", @resetMainTargetForm - - # reset main target form when clicking discard - $(document).on "click", ".js-note-discard", @resetMainTargetForm - - # update the file name when an attachment is selected - $(document).on "change", ".js-note-attachment-input", @updateFormAttachment - - # reply to diff/discussion notes - $(document).on "click", ".js-discussion-reply-button", @replyToDiscussionNote - - # add diff note - $(document).on "click", ".js-add-diff-note-button", @addDiffNote - - # hide diff note form - $(document).on "click", ".js-close-discussion-note-form", @cancelDiscussionForm - - # fetch notes when tab becomes visible - $(document).on "visibilitychange", @visibilityChange - - # when issue status changes, we need to refresh data - $(document).on "issuable:change", @refresh - - # when a key is clicked on the notes - $(document).on "keydown", ".js-note-text", @keydownNoteText - - cleanBinding: -> - $(document).off "ajax:success", ".js-main-target-form" - $(document).off "ajax:success", ".js-discussion-note-form" - $(document).off "ajax:success", "form.edit-note" - $(document).off "click", ".js-note-edit" - $(document).off "click", ".note-edit-cancel" - $(document).off "click", ".js-note-delete" - $(document).off "click", ".js-note-attachment-delete" - $(document).off "ajax:complete", ".js-main-target-form" - $(document).off "ajax:success", ".js-main-target-form" - $(document).off "click", ".js-discussion-reply-button" - $(document).off "click", ".js-add-diff-note-button" - $(document).off "visibilitychange" - $(document).off "keyup", ".js-note-text" - $(document).off "click", ".js-note-target-reopen" - $(document).off "click", ".js-note-target-close" - $(document).off "click", ".js-note-discard" - $(document).off "keydown", ".js-note-text" - - $('.note .js-task-list-container').taskList('disable') - $(document).off 'tasklist:changed', '.note .js-task-list-container' - - keydownNoteText: (e) => - return if isMetaKey e - - $textarea = $(e.target) - - # Edit previous note when UP arrow is hit - switch e.which - when 38 - return unless $textarea.val() is '' - - myLastNote = $("li.note[data-author-id='#{gon.current_user_id}'][data-editable]:last") - if myLastNote.length - myLastNoteEditBtn = myLastNote.find('.js-note-edit') - myLastNoteEditBtn.trigger('click', [true, myLastNote]) - - # Cancel creating diff note or editing any note when ESCAPE is hit - when 27 - discussionNoteForm = $textarea.closest('.js-discussion-note-form') - if discussionNoteForm.length - if $textarea.val() isnt '' - return unless confirm('Are you sure you want to cancel creating this comment?') - - @removeDiscussionNoteForm(discussionNoteForm) - return - - editNote = $textarea.closest('.note') - if editNote.length - originalText = $textarea.closest('form').data('original-note') - newText = $textarea.val() - if originalText isnt newText - return unless confirm('Are you sure you want to cancel editing this comment?') - - @removeNoteEditForm(editNote) - - - isMetaKey = (e) -> - (e.metaKey or e.ctrlKey or e.altKey or e.shiftKey) - - initRefresh: -> - clearInterval(Notes.interval) - Notes.interval = setInterval => - @refresh() - , @pollingInterval - - refresh: => - if not document.hidden and document.URL.indexOf(@noteable_url) is 0 - @getContent() - - getContent: -> - return if @refreshing - - @refreshing = true - - $.ajax - url: @notes_url - data: "last_fetched_at=" + @last_fetched_at - dataType: "json" - success: (data) => - notes = data.notes - @last_fetched_at = data.last_fetched_at - @setPollingInterval(data.notes.length) - $.each notes, (i, note) => - if note.discussion_html? - @renderDiscussionNote(note) - else - @renderNote(note) - .always () => - @refreshing = false - - ### - Increase @pollingInterval up to 120 seconds on every function call, - if `shouldReset` has a truthy value, 'null' or 'undefined' the variable - will reset to @basePollingInterval. - - Note: this function is used to gradually increase the polling interval - if there aren't new notes coming from the server - ### - setPollingInterval: (shouldReset = true) -> - nthInterval = @basePollingInterval * Math.pow(2, @maxPollingSteps - 1) - if shouldReset - @pollingInterval = @basePollingInterval - else if @pollingInterval < nthInterval - @pollingInterval *= 2 - - @initRefresh() - - ### - Render note in main comments area. - - Note: for rendering inline notes use renderDiscussionNote - ### - renderNote: (note) -> - unless note.valid - if note.award - new Flash('You have already awarded this emoji!', 'alert') - return - - if note.award - votesBlock = $('.js-awards-block').eq 0 - gl.awardsHandler.addAwardToEmojiBar votesBlock, note.name - gl.awardsHandler.scrollToAwards() - - # render note if it not present in loaded list - # or skip if rendered - else if @isNewNote(note) - @note_ids.push(note.id) - - $notesList = $('ul.main-notes-list') - - $notesList - .append(note.html) - .syntaxHighlight() - - # Update datetime format on the recent note - gl.utils.localTimeAgo($notesList.find("#note_#{note.id} .js-timeago"), false) - - @initTaskList() - @updateNotesCount(1) - - - ### - Check if note does not exists on page - ### - isNewNote: (note) -> - $.inArray(note.id, @note_ids) == -1 - - isParallelView: -> - @view == 'parallel' - - ### - Render note in discussion area. - - Note: for rendering inline notes use renderDiscussionNote - ### - renderDiscussionNote: (note) -> - return unless @isNewNote(note) - - @note_ids.push(note.id) - form = $("#new-discussion-note-form-#{note.discussion_id}") - if note.original_discussion_id? and form.length is 0 - form = $("#new-discussion-note-form-#{note.original_discussion_id}") - row = form.closest("tr") - note_html = $(note.html) - note_html.syntaxHighlight() - - # is this the first note of discussion? - discussionContainer = $(".notes[data-discussion-id='" + note.discussion_id + "']") - if note.original_discussion_id? and discussionContainer.length is 0 - discussionContainer = $(".notes[data-discussion-id='" + note.original_discussion_id + "']") - if discussionContainer.length is 0 - # insert the note and the reply button after the temp row - row.after note.diff_discussion_html - - # remove the note (will be added again below) - row.next().find(".note").remove() - - # Before that, the container didn't exist - discussionContainer = $(".notes[data-discussion-id='" + note.discussion_id + "']") - - # Add note to 'Changes' page discussions - discussionContainer.append note_html - - # Init discussion on 'Discussion' page if it is merge request page - if $('body').attr('data-page').indexOf('projects:merge_request') is 0 - $('ul.main-notes-list') - .append(note.discussion_html) - .syntaxHighlight() - else - # append new note to all matching discussions - discussionContainer.append note_html - - gl.utils.localTimeAgo($('.js-timeago', note_html), false) - - @updateNotesCount(1) - - ### - Called in response the main target form has been successfully submitted. - - Removes any errors. - Resets text and preview. - Resets buttons. - ### - resetMainTargetForm: (e) => - form = $(".js-main-target-form") - - # remove validation errors - form.find(".js-errors").remove() - - # reset text and preview - form.find(".js-md-write-button").click() - form.find(".js-note-text").val("").trigger "input" - - form.find(".js-note-text").data("autosave").reset() - - @updateTargetButtons(e) - - reenableTargetFormSubmitButton: -> - form = $(".js-main-target-form") - - form.find(".js-note-text").trigger "input" - - ### - Shows the main form and does some setup on it. - - Sets some hidden fields in the form. - ### - setupMainTargetNoteForm: -> - # find the form - form = $(".js-new-note-form") - - # Set a global clone of the form for later cloning - @formClone = form.clone() - - # show the form - @setupNoteForm(form) - - # fix classes - form.removeClass "js-new-note-form" - form.addClass "js-main-target-form" - - form.find("#note_line_code").remove() - form.find("#note_position").remove() - form.find("#note_type").remove() - - @parentTimeline = form.parents('.timeline') - - ### - General note form setup. - - deactivates the submit button when text is empty - hides the preview button when text is empty - setup GFM auto complete - show the form - ### - setupNoteForm: (form) -> - new GLForm form - - textarea = form.find(".js-note-text") - - new Autosave textarea, [ - "Note" - form.find("#note_noteable_type").val() - form.find("#note_noteable_id").val() - form.find("#note_commit_id").val() - form.find("#note_type").val() - form.find("#note_line_code").val() - form.find("#note_position").val() - ] - - ### - Called in response to the new note form being submitted - - Adds new note to list. - ### - addNote: (xhr, note, status) => - @renderNote(note) - - addNoteError: (xhr, note, status) => - new Flash('Your comment could not be submitted! Please check your network connection and try again.', 'alert', @parentTimeline) - - ### - Called in response to the new note form being submitted - - Adds new note to list. - ### - addDiscussionNote: (xhr, note, status) => - @renderDiscussionNote(note) - - # cleanup after successfully creating a diff/discussion note - @removeDiscussionNoteForm($(xhr.target)) - - ### - Called in response to the edit note form being submitted - - Updates the current note field. - ### - updateNote: (_xhr, note, _status) => - # Convert returned HTML to a jQuery object so we can modify it further - $html = $(note.html) - - gl.utils.localTimeAgo($('.js-timeago', $html)) - - $html.syntaxHighlight() - $html.find('.js-task-list-container').taskList('enable') - - # Find the note's `li` element by ID and replace it with the updated HTML - $note_li = $('.note-row-' + note.id) - $note_li.replaceWith($html) - - ### - Called in response to clicking the edit note link - - Replaces the note text with the note edit form - Adds a data attribute to the form with the original content of the note for cancellations - ### - showEditForm: (e, scrollTo, myLastNote) -> - e.preventDefault() - note = $(this).closest(".note") - note.addClass "is-editting" - form = note.find(".note-edit-form") - - form.addClass('current-note-edit-form') - - # Show the attachment delete link - note.find(".js-note-attachment-delete").show() - - done = ($noteText) -> - # Neat little trick to put the cursor at the end - noteTextVal = $noteText.val() - # Store the original note text in a data attribute to retrieve if a user cancels edit. - form.find('form.edit-note').data 'original-note', noteTextVal - $noteText.val('').val(noteTextVal); - - new GLForm form - if scrollTo? and myLastNote? - # scroll to the bottom - # so the open of the last element doesn't make a jump - $('html, body').scrollTop($(document).height()); - $('html, body').animate({ - scrollTop: myLastNote.offset().top - 150 - }, 500, -> - $noteText = form.find(".js-note-text") - $noteText.focus() - done($noteText) - ); - else - $noteText = form.find('.js-note-text') - $noteText.focus() - done($noteText) - - ### - Called in response to clicking the edit note link - - Hides edit form and restores the original note text to the editor textarea. - ### - cancelEdit: (e) => - e.preventDefault() - note = $(e.target).closest('.note') - @removeNoteEditForm(note) - - removeNoteEditForm: (note) -> - form = note.find(".current-note-edit-form") - note.removeClass "is-editting" - form.removeClass("current-note-edit-form") - # Replace markdown textarea text with original note text. - form.find(".js-note-text").val(form.find('form.edit-note').data('original-note')) - - ### - Called in response to deleting a note of any kind. - - Removes the actual note from view. - Removes the whole discussion if the last note is being removed. - ### - removeNote: (e) => - noteId = $(e.currentTarget) - .closest(".note") - .attr("id") - - # A same note appears in the "Discussion" and in the "Changes" tab, we have - # to remove all. Using $(".note[id='noteId']") ensure we get all the notes, - # where $("#noteId") would return only one. - $(".note[id='#{noteId}']").each (i, el) => - note = $(el) - notes = note.closest(".notes") - - # check if this is the last note for this line - if notes.find(".note").length is 1 - - # "Discussions" tab - notes.closest(".timeline-entry").remove() - - # "Changes" tab / commit view - notes.closest("tr").remove() - - note.remove() - - # Decrement the "Discussions" counter only once - @updateNotesCount(-1) - - ### - Called in response to clicking the delete attachment link - - Removes the attachment wrapper view, including image tag if it exists - Resets the note editing form - ### - removeAttachment: -> - note = $(this).closest(".note") - note.find(".note-attachment").remove() - note.find(".note-body > .note-text").show() - note.find(".note-header").show() - note.find(".current-note-edit-form").remove() - - ### - Called when clicking on the "reply" button for a diff line. - - Shows the note form below the notes. - ### - replyToDiscussionNote: (e) => - form = @formClone.clone() - replyLink = $(e.target).closest(".js-discussion-reply-button") - replyLink.hide() - - # insert the form after the button - replyLink.after form - - # show the form - @setupDiscussionNoteForm(replyLink, form) - - ### - Shows the diff or discussion form and does some setup on it. - - Sets some hidden fields in the form. - - Note: dataHolder must have the "discussionId", "lineCode", "noteableType" - and "noteableId" data attributes set. - ### - setupDiscussionNoteForm: (dataHolder, form) => - # setup note target - form.attr 'id', "new-discussion-note-form-#{dataHolder.data("discussionId")}" - form.attr "data-line-code", dataHolder.data("lineCode") - form.find("#note_type").val dataHolder.data("noteType") - form.find("#line_type").val dataHolder.data("lineType") - form.find("#note_commit_id").val dataHolder.data("commitId") - form.find("#note_line_code").val dataHolder.data("lineCode") - form.find("#note_position").val dataHolder.attr("data-position") - form.find("#note_noteable_type").val dataHolder.data("noteableType") - form.find("#note_noteable_id").val dataHolder.data("noteableId") - form.find('.js-note-discard') - .show() - .removeClass('js-note-discard') - .addClass('js-close-discussion-note-form') - .text(form.find('.js-close-discussion-note-form').data('cancel-text')) - @setupNoteForm form - form.find(".js-note-text").focus() - form - .removeClass('js-main-target-form') - .addClass("discussion-form js-discussion-note-form") - - ### - Called when clicking on the "add a comment" button on the side of a diff line. - - Inserts a temporary row for the form below the line. - Sets up the form and shows it. - ### - addDiffNote: (e) => - e.preventDefault() - $link = $(e.currentTarget) - row = $link.closest("tr") - nextRow = row.next() - hasNotes = nextRow.is(".notes_holder") - addForm = false - targetContent = ".notes_content" - rowCssToAdd = "" - - # In parallel view, look inside the correct left/right pane - if @isParallelView() - lineType = $link.data("lineType") - targetContent += "." + lineType - rowCssToAdd = "" - - if hasNotes - notesContent = nextRow.find(targetContent) - if notesContent.length - replyButton = notesContent.find(".js-discussion-reply-button:visible") - if replyButton.length - e.target = replyButton[0] - $.proxy(@replyToDiscussionNote, replyButton[0], e).call() - else - # In parallel view, the form may not be present in one of the panes - noteForm = notesContent.find(".js-discussion-note-form") - if noteForm.length == 0 - addForm = true - else - # add a notes row and insert the form - row.after rowCssToAdd - addForm = true - - if addForm - newForm = @formClone.clone() - newForm.appendTo row.next().find(targetContent) - - # show the form - @setupDiscussionNoteForm $link, newForm - - ### - Called in response to "cancel" on a diff note form. - - Shows the reply button again. - Removes the form and if necessary it's temporary row. - ### - removeDiscussionNoteForm: (form)-> - row = form.closest("tr") - - glForm = form.data 'gl-form' - glForm.destroy() - - form.find(".js-note-text").data("autosave").reset() - - # show the reply button (will only work for replies) - form.prev(".js-discussion-reply-button").show() - if row.is(".js-temp-notes-holder") - # remove temporary row for diff lines - row.remove() - else - # only remove the form - form.remove() - - cancelDiscussionForm: (e) => - e.preventDefault() - form = $(e.target).closest(".js-discussion-note-form") - @removeDiscussionNoteForm(form) - - ### - Called after an attachment file has been selected. - - Updates the file name for the selected attachment. - ### - updateFormAttachment: -> - form = $(this).closest("form") - - # get only the basename - filename = $(this).val().replace(/^.*[\\\/]/, "") - form.find(".js-attachment-filename").text filename - - ### - Called when the tab visibility changes - ### - visibilityChange: => - @refresh() - - updateCloseButton: (e) => - textarea = $(e.target) - form = textarea.parents('form') - closebtn = form.find('.js-note-target-close') - closebtn.text(closebtn.data('original-text')) - - updateTargetButtons: (e) => - textarea = $(e.target) - form = textarea.parents('form') - reopenbtn = form.find('.js-note-target-reopen') - closebtn = form.find('.js-note-target-close') - discardbtn = form.find('.js-note-discard') - - if textarea.val().trim().length > 0 - reopentext = reopenbtn.data('alternative-text') - closetext = closebtn.data('alternative-text') - - if reopenbtn.text() isnt reopentext - reopenbtn.text(reopentext) - - if closebtn.text() isnt closetext - closebtn.text(closetext) - - if reopenbtn.is(':not(.btn-comment-and-reopen)') - reopenbtn.addClass('btn-comment-and-reopen') - - if closebtn.is(':not(.btn-comment-and-close)') - closebtn.addClass('btn-comment-and-close') - - if discardbtn.is(':hidden') - discardbtn.show() - else - reopentext = reopenbtn.data('original-text') - closetext = closebtn.data('original-text') - - if reopenbtn.text() isnt reopentext - reopenbtn.text(reopentext) - - if closebtn.text() isnt closetext - closebtn.text(closetext) - - if reopenbtn.is('.btn-comment-and-reopen') - reopenbtn.removeClass('btn-comment-and-reopen') - - if closebtn.is('.btn-comment-and-close') - closebtn.removeClass('btn-comment-and-close') - - if discardbtn.is(':visible') - discardbtn.hide() - - initTaskList: -> - @enableTaskList() - $(document).on 'tasklist:changed', '.note .js-task-list-container', @updateTaskList - - enableTaskList: -> - $('.note .js-task-list-container').taskList('enable') - - updateTaskList: -> - $('form', this).submit() - - updateNotesCount: (updateCount) -> - @notesCountBadge.text(parseInt(@notesCountBadge.text()) + updateCount) diff --git a/app/assets/javascripts/notifications_dropdown.js b/app/assets/javascripts/notifications_dropdown.js new file mode 100644 index 00000000000..a41e9d3fabe --- /dev/null +++ b/app/assets/javascripts/notifications_dropdown.js @@ -0,0 +1,30 @@ +(function() { + this.NotificationsDropdown = (function() { + function NotificationsDropdown() { + $(document).off('click', '.update-notification').on('click', '.update-notification', function(e) { + var form, label, notificationLevel; + e.preventDefault(); + if ($(this).is('.is-active') && $(this).data('notification-level') === 'custom') { + return; + } + notificationLevel = $(this).data('notification-level'); + label = $(this).data('notification-title'); + form = $(this).parents('.notification-form:first'); + form.find('.js-notification-loading').toggleClass('fa-bell fa-spin fa-spinner'); + form.find('#notification_setting_level').val(notificationLevel); + return form.submit(); + }); + $(document).off('ajax:success', '.notification-form').on('ajax:success', '.notification-form', function(e, data) { + if (data.saved) { + return $(e.currentTarget).closest('.notification-dropdown').replaceWith(data.html); + } else { + return new Flash('Failed to save new settings', 'alert'); + } + }); + } + + return NotificationsDropdown; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/notifications_dropdown.js.coffee b/app/assets/javascripts/notifications_dropdown.js.coffee deleted file mode 100644 index 0bbd082c156..00000000000 --- a/app/assets/javascripts/notifications_dropdown.js.coffee +++ /dev/null @@ -1,25 +0,0 @@ -class @NotificationsDropdown - constructor: -> - $(document) - .off 'click', '.update-notification' - .on 'click', '.update-notification', (e) -> - e.preventDefault() - - return if $(this).is('.is-active') and $(this).data('notification-level') is 'custom' - - notificationLevel = $(@).data 'notification-level' - label = $(@).data 'notification-title' - form = $(this).parents('.notification-form:first') - form.find('.js-notification-loading').toggleClass 'fa-bell fa-spin fa-spinner' - form.find('#notification_setting_level').val(notificationLevel) - form.submit() - - $(document) - .off 'ajax:success', '.notification-form' - .on 'ajax:success', '.notification-form', (e, data) -> - if data.saved - $(e.currentTarget) - .closest('.notification-dropdown') - .replaceWith(data.html) - else - new Flash('Failed to save new settings', 'alert') diff --git a/app/assets/javascripts/notifications_form.js b/app/assets/javascripts/notifications_form.js new file mode 100644 index 00000000000..6b2ef17ef6b --- /dev/null +++ b/app/assets/javascripts/notifications_form.js @@ -0,0 +1,58 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.NotificationsForm = (function() { + function NotificationsForm() { + this.toggleCheckbox = bind(this.toggleCheckbox, this); + this.removeEventListeners(); + this.initEventListeners(); + } + + NotificationsForm.prototype.removeEventListeners = function() { + return $(document).off('change', '.js-custom-notification-event'); + }; + + NotificationsForm.prototype.initEventListeners = function() { + return $(document).on('change', '.js-custom-notification-event', this.toggleCheckbox); + }; + + NotificationsForm.prototype.toggleCheckbox = function(e) { + var $checkbox, $parent; + $checkbox = $(e.currentTarget); + $parent = $checkbox.closest('.checkbox'); + return this.saveEvent($checkbox, $parent); + }; + + NotificationsForm.prototype.showCheckboxLoadingSpinner = function($parent) { + return $parent.addClass('is-loading').find('.custom-notification-event-loading').removeClass('fa-check').addClass('fa-spin fa-spinner').removeClass('is-done'); + }; + + NotificationsForm.prototype.saveEvent = function($checkbox, $parent) { + var form; + form = $parent.parents('form:first'); + return $.ajax({ + url: form.attr('action'), + method: form.attr('method'), + dataType: 'json', + data: form.serialize(), + beforeSend: (function(_this) { + return function() { + return _this.showCheckboxLoadingSpinner($parent); + }; + })(this) + }).done(function(data) { + $checkbox.enable(); + if (data.saved) { + $parent.find('.custom-notification-event-loading').toggleClass('fa-spin fa-spinner fa-check is-done'); + return setTimeout(function() { + return $parent.removeClass('is-loading').find('.custom-notification-event-loading').toggleClass('fa-spin fa-spinner fa-check is-done'); + }, 2000); + } + }); + }; + + return NotificationsForm; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/notifications_form.js.coffee b/app/assets/javascripts/notifications_form.js.coffee deleted file mode 100644 index 3432428702a..00000000000 --- a/app/assets/javascripts/notifications_form.js.coffee +++ /dev/null @@ -1,49 +0,0 @@ -class @NotificationsForm - constructor: -> - @removeEventListeners() - @initEventListeners() - - removeEventListeners: -> - $(document).off 'change', '.js-custom-notification-event' - - initEventListeners: -> - $(document).on 'change', '.js-custom-notification-event', @toggleCheckbox - - toggleCheckbox: (e) => - $checkbox = $(e.currentTarget) - $parent = $checkbox.closest('.checkbox') - @saveEvent($checkbox, $parent) - - showCheckboxLoadingSpinner: ($parent) -> - $parent - .addClass 'is-loading' - .find '.custom-notification-event-loading' - .removeClass 'fa-check' - .addClass 'fa-spin fa-spinner' - .removeClass 'is-done' - - saveEvent: ($checkbox, $parent) -> - form = $parent.parents('form:first') - - $.ajax( - url: form.attr('action') - method: form.attr('method') - dataType: 'json' - data: form.serialize() - - beforeSend: => - @showCheckboxLoadingSpinner($parent) - ).done (data) -> - $checkbox.enable() - - if data.saved - $parent - .find '.custom-notification-event-loading' - .toggleClass 'fa-spin fa-spinner fa-check is-done' - - setTimeout(-> - $parent - .removeClass 'is-loading' - .find '.custom-notification-event-loading' - .toggleClass 'fa-spin fa-spinner fa-check is-done' - , 2000) diff --git a/app/assets/javascripts/pager.js b/app/assets/javascripts/pager.js new file mode 100644 index 00000000000..b81ed50cb48 --- /dev/null +++ b/app/assets/javascripts/pager.js @@ -0,0 +1,63 @@ +(function() { + this.Pager = { + init: function(limit, preload, disable, callback) { + this.limit = limit != null ? limit : 0; + this.disable = disable != null ? disable : false; + this.callback = callback != null ? callback : $.noop; + this.loading = $('.loading').first(); + if (preload) { + this.offset = 0; + this.getOld(); + } else { + this.offset = this.limit; + } + return this.initLoadMore(); + }, + getOld: function() { + this.loading.show(); + return $.ajax({ + type: "GET", + url: $(".content_list").data('href') || location.href, + data: "limit=" + this.limit + "&offset=" + this.offset, + complete: (function(_this) { + return function() { + return _this.loading.hide(); + }; + })(this), + success: function(data) { + Pager.append(data.count, data.html); + return Pager.callback(); + }, + dataType: "json" + }); + }, + append: function(count, html) { + $(".content_list").append(html); + if (count > 0) { + return this.offset += count; + } else { + return this.disable = true; + } + }, + initLoadMore: function() { + $(document).unbind('scroll'); + return $(document).endlessScroll({ + bottomPixels: 400, + fireDelay: 1000, + fireOnce: true, + ceaseFire: function() { + return Pager.disable; + }, + callback: (function(_this) { + return function(i) { + if (!_this.loading.is(':visible')) { + _this.loading.show(); + return Pager.getOld(); + } + }; + })(this) + }); + } + }; + +}).call(this); diff --git a/app/assets/javascripts/pager.js.coffee b/app/assets/javascripts/pager.js.coffee deleted file mode 100644 index 8049c5c30e2..00000000000 --- a/app/assets/javascripts/pager.js.coffee +++ /dev/null @@ -1,44 +0,0 @@ -@Pager = - init: (@limit = 0, preload, @disable = false, @callback = $.noop) -> - @loading = $('.loading').first() - - if preload - @offset = 0 - @getOld() - else - @offset = @limit - @initLoadMore() - - getOld: -> - @loading.show() - $.ajax - type: "GET" - url: $(".content_list").data('href') || location.href - data: "limit=" + @limit + "&offset=" + @offset - complete: => - @loading.hide() - success: (data) -> - Pager.append(data.count, data.html) - Pager.callback() - dataType: "json" - - append: (count, html) -> - $(".content_list").append html - if count > 0 - @offset += count - else - @disable = true - - initLoadMore: -> - $(document).unbind('scroll') - $(document).endlessScroll - bottomPixels: 400 - fireDelay: 1000 - fireOnce: true - ceaseFire: -> - Pager.disable - - callback: (i) => - unless @loading.is(':visible') - @loading.show() - Pager.getOld() diff --git a/app/assets/javascripts/profile/gl_crop.js b/app/assets/javascripts/profile/gl_crop.js new file mode 100644 index 00000000000..a3eea316f67 --- /dev/null +++ b/app/assets/javascripts/profile/gl_crop.js @@ -0,0 +1,169 @@ +(function() { + var GitLabCrop, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + GitLabCrop = (function() { + var FILENAMEREGEX; + + FILENAMEREGEX = /^.*[\\\/]/; + + function GitLabCrop(input, opts) { + var ref, ref1, ref2, ref3, ref4; + if (opts == null) { + opts = {}; + } + this.onUploadImageBtnClick = bind(this.onUploadImageBtnClick, this); + this.onModalHide = bind(this.onModalHide, this); + this.onModalShow = bind(this.onModalShow, this); + this.onPickImageClick = bind(this.onPickImageClick, this); + this.fileInput = $(input); + this.fileInput.attr('name', (this.fileInput.attr('name')) + "-trigger").attr('id', (this.fileInput.attr('id')) + "-trigger"); + this.exportWidth = (ref = opts.exportWidth) != null ? ref : 200, this.exportHeight = (ref1 = opts.exportHeight) != null ? ref1 : 200, this.cropBoxWidth = (ref2 = opts.cropBoxWidth) != null ? ref2 : 200, this.cropBoxHeight = (ref3 = opts.cropBoxHeight) != null ? ref3 : 200, this.form = (ref4 = opts.form) != null ? ref4 : this.fileInput.parents('form'), this.filename = opts.filename, this.previewImage = opts.previewImage, this.modalCrop = opts.modalCrop, this.pickImageEl = opts.pickImageEl, this.uploadImageBtn = opts.uploadImageBtn, this.modalCropImg = opts.modalCropImg; + this.filename = this.getElement(this.filename); + this.previewImage = this.getElement(this.previewImage); + this.pickImageEl = this.getElement(this.pickImageEl); + this.modalCrop = _.isString(this.modalCrop) ? $(this.modalCrop) : this.modalCrop; + this.uploadImageBtn = _.isString(this.uploadImageBtn) ? $(this.uploadImageBtn) : this.uploadImageBtn; + this.modalCropImg = _.isString(this.modalCropImg) ? $(this.modalCropImg) : this.modalCropImg; + this.cropActionsBtn = this.modalCrop.find('[data-method]'); + this.bindEvents(); + } + + GitLabCrop.prototype.getElement = function(selector) { + return $(selector, this.form); + }; + + GitLabCrop.prototype.bindEvents = function() { + var _this; + _this = this; + this.fileInput.on('change', function(e) { + return _this.onFileInputChange(e, this); + }); + this.pickImageEl.on('click', this.onPickImageClick); + this.modalCrop.on('shown.bs.modal', this.onModalShow); + this.modalCrop.on('hidden.bs.modal', this.onModalHide); + this.uploadImageBtn.on('click', this.onUploadImageBtnClick); + this.cropActionsBtn.on('click', function(e) { + var btn; + btn = this; + return _this.onActionBtnClick(btn); + }); + return this.croppedImageBlob = null; + }; + + GitLabCrop.prototype.onPickImageClick = function() { + return this.fileInput.trigger('click'); + }; + + GitLabCrop.prototype.onModalShow = function() { + var _this; + _this = this; + return this.modalCropImg.cropper({ + viewMode: 1, + center: false, + aspectRatio: 1, + modal: true, + scalable: false, + rotatable: false, + zoomable: true, + dragMode: 'move', + guides: false, + zoomOnTouch: false, + zoomOnWheel: false, + cropBoxMovable: false, + cropBoxResizable: false, + toggleDragModeOnDblclick: false, + built: function() { + var $image, container, cropBoxHeight, cropBoxWidth; + $image = $(this); + container = $image.cropper('getContainerData'); + cropBoxWidth = _this.cropBoxWidth; + cropBoxHeight = _this.cropBoxHeight; + return $image.cropper('setCropBoxData', { + width: cropBoxWidth, + height: cropBoxHeight, + left: (container.width - cropBoxWidth) / 2, + top: (container.height - cropBoxHeight) / 2 + }); + } + }); + }; + + GitLabCrop.prototype.onModalHide = function() { + return this.modalCropImg.attr('src', '').cropper('destroy'); + }; + + GitLabCrop.prototype.onUploadImageBtnClick = function(e) { + e.preventDefault(); + this.setBlob(); + this.setPreview(); + this.modalCrop.modal('hide'); + return this.fileInput.val(''); + }; + + GitLabCrop.prototype.onActionBtnClick = function(btn) { + var data, result; + data = $(btn).data(); + if (this.modalCropImg.data('cropper') && data.method) { + return result = this.modalCropImg.cropper(data.method, data.option); + } + }; + + GitLabCrop.prototype.onFileInputChange = function(e, input) { + return this.readFile(input); + }; + + GitLabCrop.prototype.readFile = function(input) { + var _this, reader; + _this = this; + reader = new FileReader; + reader.onload = function() { + _this.modalCropImg.attr('src', reader.result); + return _this.modalCrop.modal('show'); + }; + return reader.readAsDataURL(input.files[0]); + }; + + GitLabCrop.prototype.dataURLtoBlob = function(dataURL) { + var array, binary, i, k, len, v; + binary = atob(dataURL.split(',')[1]); + array = []; + for (k = i = 0, len = binary.length; i < len; k = ++i) { + v = binary[k]; + array.push(binary.charCodeAt(k)); + } + return new Blob([new Uint8Array(array)], { + type: 'image/png' + }); + }; + + GitLabCrop.prototype.setPreview = function() { + var filename; + this.previewImage.attr('src', this.dataURL); + filename = this.fileInput.val().replace(FILENAMEREGEX, ''); + return this.filename.text(filename); + }; + + GitLabCrop.prototype.setBlob = function() { + this.dataURL = this.modalCropImg.cropper('getCroppedCanvas', { + width: 200, + height: 200 + }).toDataURL('image/png'); + return this.croppedImageBlob = this.dataURLtoBlob(this.dataURL); + }; + + GitLabCrop.prototype.getBlob = function() { + return this.croppedImageBlob; + }; + + return GitLabCrop; + + })(); + + $.fn.glCrop = function(opts) { + return this.each(function() { + return $(this).data('glcrop', new GitLabCrop(this, opts)); + }); + }; + +}).call(this); diff --git a/app/assets/javascripts/profile/gl_crop.js.coffee b/app/assets/javascripts/profile/gl_crop.js.coffee deleted file mode 100644 index df9bfdfa6cc..00000000000 --- a/app/assets/javascripts/profile/gl_crop.js.coffee +++ /dev/null @@ -1,152 +0,0 @@ -class GitLabCrop - # Matches everything but the file name - FILENAMEREGEX = /^.*[\\\/]/ - - constructor: (input, opts = {}) -> - @fileInput = $(input) - - # We should rename to avoid spec to fail - # Form will submit the proper input filed with a file using FormData - @fileInput - .attr('name', "#{@fileInput.attr('name')}-trigger") - .attr('id', "#{@fileInput.attr('id')}-trigger") - - # Set defaults - { - @exportWidth = 200 - @exportHeight = 200 - @cropBoxWidth = 200 - @cropBoxHeight = 200 - @form = @fileInput.parents('form') - - # Required params - @filename - @previewImage - @modalCrop - @pickImageEl - @uploadImageBtn - @modalCropImg - } = opts - - # Ensure needed elements are jquery objects - # If selector is provided we will convert them to a jQuery Object - @filename = @getElement(@filename) - @previewImage = @getElement(@previewImage) - @pickImageEl = @getElement(@pickImageEl) - - # Modal elements usually are outside the @form element - @modalCrop = if _.isString(@modalCrop) then $(@modalCrop) else @modalCrop - @uploadImageBtn = if _.isString(@uploadImageBtn) then $(@uploadImageBtn) else @uploadImageBtn - @modalCropImg = if _.isString(@modalCropImg) then $(@modalCropImg) else @modalCropImg - - @cropActionsBtn = @modalCrop.find('[data-method]') - - @bindEvents() - - getElement: (selector) -> - $(selector, @form) - - bindEvents: -> - _this = @ - @fileInput.on 'change', (e) -> - _this.onFileInputChange(e, @) - - @pickImageEl.on 'click', @onPickImageClick - @modalCrop.on 'shown.bs.modal', @onModalShow - @modalCrop.on 'hidden.bs.modal', @onModalHide - @uploadImageBtn.on 'click', @onUploadImageBtnClick - @cropActionsBtn.on 'click', (e) -> - btn = @ - _this.onActionBtnClick(btn) - @croppedImageBlob = null - - onPickImageClick: => - @fileInput.trigger('click') - - onModalShow: => - _this = @ - @modalCropImg.cropper( - viewMode: 1 - center: false - aspectRatio: 1 - modal: true - scalable: false - rotatable: false - zoomable: true - dragMode: 'move' - guides: false - zoomOnTouch: false - zoomOnWheel: false - cropBoxMovable: false - cropBoxResizable: false - toggleDragModeOnDblclick: false - built: -> - $image = $(@) - container = $image.cropper 'getContainerData' - cropBoxWidth = _this.cropBoxWidth; - cropBoxHeight = _this.cropBoxHeight; - - $image.cropper('setCropBoxData', - width: cropBoxWidth, - height: cropBoxHeight, - left: (container.width - cropBoxWidth) / 2, - top: (container.height - cropBoxHeight) / 2 - ) - ) - - - onModalHide: => - @modalCropImg - .attr('src', '') # Remove attached image - .cropper('destroy') # Destroy cropper instance - - onUploadImageBtnClick: (e) => - e.preventDefault() - @setBlob() - @setPreview() - @modalCrop.modal('hide') - @fileInput.val('') - - onActionBtnClick: (btn) -> - data = $(btn).data() - - if @modalCropImg.data('cropper') && data.method - result = @modalCropImg.cropper data.method, data.option - - onFileInputChange: (e, input) -> - @readFile(input) - - readFile: (input) -> - _this = @ - reader = new FileReader - reader.onload = -> - _this.modalCropImg.attr('src', reader.result) - _this.modalCrop.modal('show') - - reader.readAsDataURL(input.files[0]) - - dataURLtoBlob: (dataURL) -> - binary = atob(dataURL.split(',')[1]) - array = [] - for v, k in binary - array.push(binary.charCodeAt(k)) - new Blob([new Uint8Array(array)], type: 'image/png') - - setPreview: -> - @previewImage.attr('src', @dataURL) - filename = @fileInput.val().replace(FILENAMEREGEX, '') - @filename.text(filename) - - setBlob: -> - @dataURL = @modalCropImg.cropper('getCroppedCanvas', - width: 200 - height: 200 - ).toDataURL('image/png') - @croppedImageBlob = @dataURLtoBlob(@dataURL) - - getBlob: -> - @croppedImageBlob - -$.fn.glCrop = (opts) -> - return @.each -> - $(@).data('glcrop', new GitLabCrop(@, opts)) diff --git a/app/assets/javascripts/profile/profile.js b/app/assets/javascripts/profile/profile.js new file mode 100644 index 00000000000..ed1d87abafe --- /dev/null +++ b/app/assets/javascripts/profile/profile.js @@ -0,0 +1,102 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Profile = (function() { + function Profile(opts) { + var cropOpts, ref; + if (opts == null) { + opts = {}; + } + this.onSubmitForm = bind(this.onSubmitForm, this); + this.form = (ref = opts.form) != null ? ref : $('.edit-user'); + $('.js-preferences-form').on('change.preference', 'input[type=radio]', function() { + return $(this).parents('form').submit(); + }); + $('#user_notification_email').on('change', function() { + return $(this).parents('form').submit(); + }); + $('.update-username').on('ajax:before', function() { + $('.loading-username').show(); + $(this).find('.update-success').hide(); + return $(this).find('.update-failed').hide(); + }); + $('.update-username').on('ajax:complete', function() { + $('.loading-username').hide(); + $(this).find('.btn-save').enable(); + return $(this).find('.loading-gif').hide(); + }); + $('.update-notifications').on('ajax:success', function(e, data) { + if (data.saved) { + return new Flash("Notification settings saved", "notice"); + } else { + return new Flash("Failed to save new settings", "alert"); + } + }); + this.bindEvents(); + cropOpts = { + filename: '.js-avatar-filename', + previewImage: '.avatar-image .avatar', + modalCrop: '.modal-profile-crop', + pickImageEl: '.js-choose-user-avatar-button', + uploadImageBtn: '.js-upload-user-avatar', + modalCropImg: '.modal-profile-crop-image' + }; + this.avatarGlCrop = $('.js-user-avatar-input').glCrop(cropOpts).data('glcrop'); + } + + Profile.prototype.bindEvents = function() { + return this.form.on('submit', this.onSubmitForm); + }; + + Profile.prototype.onSubmitForm = function(e) { + e.preventDefault(); + return this.saveForm(); + }; + + Profile.prototype.saveForm = function() { + var avatarBlob, formData, self; + self = this; + formData = new FormData(this.form[0]); + avatarBlob = this.avatarGlCrop.getBlob(); + if (avatarBlob != null) { + formData.append('user[avatar]', avatarBlob, 'avatar.png'); + } + return $.ajax({ + url: this.form.attr('action'), + type: this.form.attr('method'), + data: formData, + dataType: "json", + processData: false, + contentType: false, + success: function(response) { + return new Flash(response.message, 'notice'); + }, + error: function(jqXHR) { + return new Flash(jqXHR.responseJSON.message, 'alert'); + }, + complete: function() { + window.scrollTo(0, 0); + return self.form.find(':input[disabled]').enable(); + } + }); + }; + + return Profile; + + })(); + + $(function() { + $(document).on('focusout.ssh_key', '#key_key', function() { + var $title, comment; + $title = $('#key_title'); + comment = $(this).val().match(/^\S+ \S+ (.+)\n?$/); + if (comment && comment.length > 1 && $title.val() === '') { + return $title.val(comment[1]).change(); + } + }); + if (gl.utils.getPagePath() === 'profiles') { + return new Profile(); + } + }); + +}).call(this); diff --git a/app/assets/javascripts/profile/profile.js.coffee b/app/assets/javascripts/profile/profile.js.coffee deleted file mode 100644 index f3b05f2c646..00000000000 --- a/app/assets/javascripts/profile/profile.js.coffee +++ /dev/null @@ -1,83 +0,0 @@ -class @Profile - constructor: (opts = {}) -> - { - @form = $('.edit-user') - } = opts - - # Automatically submit the Preferences form when any of its radio buttons change - $('.js-preferences-form').on 'change.preference', 'input[type=radio]', -> - $(this).parents('form').submit() - - # Automatically submit email form when it changes - $('#user_notification_email').on 'change', -> - $(this).parents('form').submit() - - $('.update-username').on 'ajax:before', -> - $('.loading-username').show() - $(this).find('.update-success').hide() - $(this).find('.update-failed').hide() - - $('.update-username').on 'ajax:complete', -> - $('.loading-username').hide() - $(this).find('.btn-save').enable() - $(this).find('.loading-gif').hide() - - $('.update-notifications').on 'ajax:success', (e, data) -> - if data.saved - new Flash("Notification settings saved", "notice") - else - new Flash("Failed to save new settings", "alert") - - @bindEvents() - - cropOpts = - filename: '.js-avatar-filename' - previewImage: '.avatar-image .avatar' - modalCrop: '.modal-profile-crop' - pickImageEl: '.js-choose-user-avatar-button' - uploadImageBtn: '.js-upload-user-avatar' - modalCropImg: '.modal-profile-crop-image' - - @avatarGlCrop = $('.js-user-avatar-input').glCrop(cropOpts).data 'glcrop' - - bindEvents: -> - @form.on 'submit', @onSubmitForm - - onSubmitForm: (e) => - e.preventDefault() - @saveForm() - - saveForm: -> - self = @ - formData = new FormData(@form[0]) - - avatarBlob = @avatarGlCrop.getBlob() - formData.append('user[avatar]', avatarBlob, 'avatar.png') if avatarBlob? - - $.ajax - url: @form.attr('action') - type: @form.attr('method') - data: formData - dataType: "json" - processData: false - contentType: false - success: (response) -> - new Flash(response.message, 'notice') - error: (jqXHR) -> - new Flash(jqXHR.responseJSON.message, 'alert') - complete: -> - window.scrollTo 0, 0 - # Enable submit button after requests ends - self.form.find(':input[disabled]').enable() - -$ -> - # Extract the SSH Key title from its comment - $(document).on 'focusout.ssh_key', '#key_key', -> - $title = $('#key_title') - comment = $(@).val().match(/^\S+ \S+ (.+)\n?$/) - - if comment && comment.length > 1 && $title.val() == '' - $title.val(comment[1]).change() - - if gl.utils.getPagePath() == 'profiles' - new Profile() diff --git a/app/assets/javascripts/profile/profile_bundle.js b/app/assets/javascripts/profile/profile_bundle.js new file mode 100644 index 00000000000..b95faadc8e7 --- /dev/null +++ b/app/assets/javascripts/profile/profile_bundle.js @@ -0,0 +1,7 @@ + +/*= require_tree . */ + +(function() { + + +}).call(this); diff --git a/app/assets/javascripts/profile/profile_bundle.js.coffee b/app/assets/javascripts/profile/profile_bundle.js.coffee deleted file mode 100644 index 91cacfece46..00000000000 --- a/app/assets/javascripts/profile/profile_bundle.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -# -#= require_tree . diff --git a/app/assets/javascripts/project.js b/app/assets/javascripts/project.js new file mode 100644 index 00000000000..e6663177161 --- /dev/null +++ b/app/assets/javascripts/project.js @@ -0,0 +1,103 @@ +(function() { + this.Project = (function() { + function Project() { + $('ul.clone-options-dropdown a').click(function() { + var url; + if ($(this).hasClass('active')) { + return; + } + $('.active').not($(this)).removeClass('active'); + $(this).toggleClass('active'); + url = $("#project_clone").val(); + $('#project_clone').val(url); + return $('.clone').text(url); + }); + this.initRefSwitcher(); + $('.project-refs-select').on('change', function() { + return $(this).parents('form').submit(); + }); + $('.hide-no-ssh-message').on('click', function(e) { + var path; + path = '/'; + $.cookie('hide_no_ssh_message', 'false', { + path: path + }); + $(this).parents('.no-ssh-key-message').remove(); + return e.preventDefault(); + }); + $('.hide-no-password-message').on('click', function(e) { + var path; + path = '/'; + $.cookie('hide_no_password_message', 'false', { + path: path + }); + $(this).parents('.no-password-message').remove(); + return e.preventDefault(); + }); + this.projectSelectDropdown(); + } + + Project.prototype.projectSelectDropdown = function() { + new ProjectSelect(); + $('.project-item-select').on('click', (function(_this) { + return function(e) { + return _this.changeProject($(e.currentTarget).val()); + }; + })(this)); + return $('.js-projects-dropdown-toggle').on('click', function(e) { + e.preventDefault(); + return $('.js-projects-dropdown').select2('open'); + }); + }; + + Project.prototype.changeProject = function(url) { + return window.location = url; + }; + + Project.prototype.initRefSwitcher = function() { + return $('.js-project-refs-dropdown').each(function() { + var $dropdown, selected; + $dropdown = $(this); + selected = $dropdown.data('selected'); + return $dropdown.glDropdown({ + data: function(term, callback) { + return $.ajax({ + url: $dropdown.data('refs-url'), + data: { + ref: $dropdown.data('ref') + } + }).done(function(refs) { + return callback(refs); + }); + }, + selectable: true, + filterable: true, + filterByText: true, + fieldName: 'ref', + renderRow: function(ref) { + var link; + if (ref.header != null) { + return $('
              • ').addClass('dropdown-header').text(ref.header); + } else { + link = $('').attr('href', '#').addClass(ref === selected ? 'is-active' : '').text(ref).attr('data-ref', escape(ref)); + return $('
              • ').append(link); + } + }, + id: function(obj, $el) { + return $el.attr('data-ref'); + }, + toggleLabel: function(obj, $el) { + return $el.text().trim(); + }, + clicked: function(e) { + return $dropdown.closest('form').submit(); + } + }); + }); + }; + + return Project; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project.js.coffee b/app/assets/javascripts/project.js.coffee deleted file mode 100644 index 3288c801388..00000000000 --- a/app/assets/javascripts/project.js.coffee +++ /dev/null @@ -1,91 +0,0 @@ -class @Project - constructor: -> - # Git protocol switcher - $('ul.clone-options-dropdown a').click -> - return if $(@).hasClass('active') - - - # Remove the active class for all buttons (ssh, http, kerberos if shown) - $('.active').not($(@)).removeClass('active'); - # Add the active class for the clicked button - $(@).toggleClass('active') - - url = $("#project_clone").val() - - # Update the input field - $('#project_clone').val(url) - - # Update the command line instructions - $('.clone').text(url) - - # Ref switcher - @initRefSwitcher() - $('.project-refs-select').on 'change', -> - $(@).parents('form').submit() - - $('.hide-no-ssh-message').on 'click', (e) -> - path = '/' - $.cookie('hide_no_ssh_message', 'false', { path: path }) - $(@).parents('.no-ssh-key-message').remove() - e.preventDefault() - - $('.hide-no-password-message').on 'click', (e) -> - path = '/' - $.cookie('hide_no_password_message', 'false', { path: path }) - $(@).parents('.no-password-message').remove() - e.preventDefault() - - @projectSelectDropdown() - - projectSelectDropdown: -> - new ProjectSelect() - - $('.project-item-select').on 'click', (e) => - @changeProject $(e.currentTarget).val() - - $('.js-projects-dropdown-toggle').on 'click', (e) -> - e.preventDefault() - - $('.js-projects-dropdown').select2('open') - - changeProject: (url) -> - window.location = url - - initRefSwitcher: -> - $('.js-project-refs-dropdown').each -> - $dropdown = $(@) - selected = $dropdown.data('selected') - - $dropdown.glDropdown( - data: (term, callback) -> - $.ajax( - url: $dropdown.data('refs-url') - data: - ref: $dropdown.data('ref') - ).done (refs) -> - callback(refs) - selectable: true - filterable: true - filterByText: true - fieldName: 'ref' - renderRow: (ref) -> - if ref.header? - $('
              • ') - .addClass('dropdown-header') - .text(ref.header) - else - link = $('') - .attr('href', '#') - .addClass(if ref is selected then 'is-active' else '') - .text(ref) - .attr('data-ref', escape(ref)) - - $('
              • ') - .append(link) - id: (obj, $el) -> - $el.attr('data-ref') - toggleLabel: (obj, $el) -> - $el.text().trim() - clicked: (e) -> - $dropdown.closest('form').submit() - ) diff --git a/app/assets/javascripts/project_avatar.js b/app/assets/javascripts/project_avatar.js new file mode 100644 index 00000000000..277e71523d5 --- /dev/null +++ b/app/assets/javascripts/project_avatar.js @@ -0,0 +1,21 @@ +(function() { + this.ProjectAvatar = (function() { + function ProjectAvatar() { + $('.js-choose-project-avatar-button').bind('click', function() { + var form; + form = $(this).closest('form'); + return form.find('.js-project-avatar-input').click(); + }); + $('.js-project-avatar-input').bind('change', function() { + var filename, form; + form = $(this).closest('form'); + filename = $(this).val().replace(/^.*[\\\/]/, ''); + return form.find('.js-avatar-filename').text(filename); + }); + } + + return ProjectAvatar; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project_avatar.js.coffee b/app/assets/javascripts/project_avatar.js.coffee deleted file mode 100644 index 8bec6e2ccca..00000000000 --- a/app/assets/javascripts/project_avatar.js.coffee +++ /dev/null @@ -1,9 +0,0 @@ -class @ProjectAvatar - constructor: -> - $('.js-choose-project-avatar-button').bind 'click', -> - form = $(this).closest('form') - form.find('.js-project-avatar-input').click() - $('.js-project-avatar-input').bind 'change', -> - form = $(this).closest('form') - filename = $(this).val().replace(/^.*[\\\/]/, '') - form.find('.js-avatar-filename').text(filename) diff --git a/app/assets/javascripts/project_find_file.js b/app/assets/javascripts/project_find_file.js new file mode 100644 index 00000000000..4925f0519f0 --- /dev/null +++ b/app/assets/javascripts/project_find_file.js @@ -0,0 +1,170 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.ProjectFindFile = (function() { + var highlighter; + + function ProjectFindFile(element1, options) { + this.element = element1; + this.options = options; + this.goToBlob = bind(this.goToBlob, this); + this.goToTree = bind(this.goToTree, this); + this.selectRowDown = bind(this.selectRowDown, this); + this.selectRowUp = bind(this.selectRowUp, this); + this.filePaths = {}; + this.inputElement = this.element.find(".file-finder-input"); + this.initEvent(); + this.inputElement.focus(); + this.load(this.options.url); + } + + ProjectFindFile.prototype.initEvent = function() { + this.inputElement.off("keyup"); + this.inputElement.on("keyup", (function(_this) { + return function(event) { + var oldValue, ref, target, value; + target = $(event.target); + value = target.val(); + oldValue = (ref = target.data("oldValue")) != null ? ref : ""; + if (value !== oldValue) { + target.data("oldValue", value); + _this.findFile(); + return _this.element.find("tr.tree-item").eq(0).addClass("selected").focus(); + } + }; + })(this)); + return this.element.find(".tree-content-holder .tree-table").on("click", function(event) { + var path; + if (event.target.nodeName !== "A") { + path = this.element.find(".tree-item-file-name a", this).attr("href"); + if (path) { + return location.href = path; + } + } + }); + }; + + ProjectFindFile.prototype.findFile = function() { + var result, searchText; + searchText = this.inputElement.val(); + result = searchText.length > 0 ? fuzzaldrinPlus.filter(this.filePaths, searchText) : this.filePaths; + return this.renderList(result, searchText); + }; + + ProjectFindFile.prototype.load = function(url) { + return $.ajax({ + url: url, + method: "get", + dataType: "json", + success: (function(_this) { + return function(data) { + _this.element.find(".loading").hide(); + _this.filePaths = data; + _this.findFile(); + return _this.element.find(".files-slider tr.tree-item").eq(0).addClass("selected").focus(); + }; + })(this) + }); + }; + + ProjectFindFile.prototype.renderList = function(filePaths, searchText) { + var blobItemUrl, filePath, html, i, j, len, matches, results; + this.element.find(".tree-table > tbody").empty(); + results = []; + for (i = j = 0, len = filePaths.length; j < len; i = ++j) { + filePath = filePaths[i]; + if (i === 20) { + break; + } + if (searchText) { + matches = fuzzaldrinPlus.match(filePath, searchText); + } + blobItemUrl = this.options.blobUrlTemplate + "/" + filePath; + html = this.makeHtml(filePath, matches, blobItemUrl); + results.push(this.element.find(".tree-table > tbody").append(html)); + } + return results; + }; + + highlighter = function(element, text, matches) { + var highlightText, j, lastIndex, len, matchIndex, matchedChars, unmatched; + lastIndex = 0; + highlightText = ""; + matchedChars = []; + for (j = 0, len = matches.length; j < len; j++) { + matchIndex = matches[j]; + unmatched = text.substring(lastIndex, matchIndex); + if (unmatched) { + if (matchedChars.length) { + element.append(matchedChars.join("").bold()); + } + matchedChars = []; + element.append(document.createTextNode(unmatched)); + } + matchedChars.push(text[matchIndex]); + lastIndex = matchIndex + 1; + } + if (matchedChars.length) { + element.append(matchedChars.join("").bold()); + } + return element.append(document.createTextNode(text.substring(lastIndex))); + }; + + ProjectFindFile.prototype.makeHtml = function(filePath, matches, blobItemUrl) { + var $tr; + $tr = $(""); + if (matches) { + $tr.find("a").replaceWith(highlighter($tr.find("a"), filePath, matches).attr("href", blobItemUrl)); + } else { + $tr.find("a").attr("href", blobItemUrl).text(filePath); + } + return $tr; + }; + + ProjectFindFile.prototype.selectRow = function(type) { + var next, rows, selectedRow; + rows = this.element.find(".files-slider tr.tree-item"); + selectedRow = this.element.find(".files-slider tr.tree-item.selected"); + if (rows && rows.length > 0) { + if (selectedRow && selectedRow.length > 0) { + if (type === "UP") { + next = selectedRow.prev(); + } else if (type === "DOWN") { + next = selectedRow.next(); + } + if (next.length > 0) { + selectedRow.removeClass("selected"); + selectedRow = next; + } + } else { + selectedRow = rows.eq(0); + } + return selectedRow.addClass("selected").focus(); + } + }; + + ProjectFindFile.prototype.selectRowUp = function() { + return this.selectRow("UP"); + }; + + ProjectFindFile.prototype.selectRowDown = function() { + return this.selectRow("DOWN"); + }; + + ProjectFindFile.prototype.goToTree = function() { + return location.href = this.options.treeUrl; + }; + + ProjectFindFile.prototype.goToBlob = function() { + var path; + path = this.element.find(".tree-item.selected .tree-item-file-name a").attr("href"); + if (path) { + return location.href = path; + } + }; + + return ProjectFindFile; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project_find_file.js.coffee b/app/assets/javascripts/project_find_file.js.coffee deleted file mode 100644 index 0dd32352c34..00000000000 --- a/app/assets/javascripts/project_find_file.js.coffee +++ /dev/null @@ -1,125 +0,0 @@ -class @ProjectFindFile - constructor: (@element, @options)-> - @filePaths = {} - @inputElement = @element.find(".file-finder-input") - - # init event - @initEvent() - - # focus text input box - @inputElement.focus() - - # load file list - @load(@options.url) - - # init event - initEvent: -> - @inputElement.off "keyup" - @inputElement.on "keyup", (event) => - target = $(event.target) - value = target.val() - oldValue = target.data("oldValue") ? "" - - if value != oldValue - target.data("oldValue", value) - @findFile() - @element.find("tr.tree-item").eq(0).addClass("selected").focus() - - @element.find(".tree-content-holder .tree-table").on "click", (event) -> - if (event.target.nodeName != "A") - path = @element.find(".tree-item-file-name a", this).attr("href") - location.href = path if path - - # find file - findFile: -> - searchText = @inputElement.val() - result = if searchText.length > 0 then fuzzaldrinPlus.filter(@filePaths, searchText) else @filePaths - @renderList result, searchText - - # files pathes load - load: (url) -> - $.ajax - url: url - method: "get" - dataType: "json" - success: (data) => - @element.find(".loading").hide() - @filePaths = data - @findFile() - @element.find(".files-slider tr.tree-item").eq(0).addClass("selected").focus() - - # render result - renderList: (filePaths, searchText) -> - @element.find(".tree-table > tbody").empty() - - for filePath, i in filePaths - break if i == 20 - - if searchText - matches = fuzzaldrinPlus.match(filePath, searchText) - - blobItemUrl = "#{@options.blobUrlTemplate}/#{filePath}" - - html = @makeHtml filePath, matches, blobItemUrl - @element.find(".tree-table > tbody").append(html) - - # highlight text(awefwbwgtc -> awefwbwgtc ) - highlighter = (element, text, matches) -> - lastIndex = 0 - highlightText = "" - matchedChars = [] - - for matchIndex in matches - unmatched = text.substring(lastIndex, matchIndex) - - if unmatched - element.append(matchedChars.join("").bold()) if matchedChars.length - matchedChars = [] - element.append(document.createTextNode(unmatched)) - - matchedChars.push(text[matchIndex]) - lastIndex = matchIndex + 1 - - element.append(matchedChars.join("").bold()) if matchedChars.length - element.append(document.createTextNode(text.substring(lastIndex))) - - # make tbody row html - makeHtml: (filePath, matches, blobItemUrl) -> - $tr = $("") - if matches - $tr.find("a").replaceWith(highlighter($tr.find("a"), filePath, matches).attr("href", blobItemUrl)) - else - $tr.find("a").attr("href", blobItemUrl).text(filePath) - - return $tr - - selectRow: (type) -> - rows = @element.find(".files-slider tr.tree-item") - selectedRow = @element.find(".files-slider tr.tree-item.selected") - - if rows && rows.length > 0 - if selectedRow && selectedRow.length > 0 - if type == "UP" - next = selectedRow.prev() - else if type == "DOWN" - next = selectedRow.next() - - if next.length > 0 - selectedRow.removeClass "selected" - selectedRow = next - else - selectedRow = rows.eq(0) - selectedRow.addClass("selected").focus() - - selectRowUp: => - @selectRow "UP" - - selectRowDown: => - @selectRow "DOWN" - - goToTree: => - location.href = @options.treeUrl - - goToBlob: => - path = @element.find(".tree-item.selected .tree-item-file-name a").attr("href") - location.href = path if path diff --git a/app/assets/javascripts/project_fork.js b/app/assets/javascripts/project_fork.js new file mode 100644 index 00000000000..d2261c51f35 --- /dev/null +++ b/app/assets/javascripts/project_fork.js @@ -0,0 +1,14 @@ +(function() { + this.ProjectFork = (function() { + function ProjectFork() { + $('.fork-thumbnail a').on('click', function() { + $('.fork-namespaces').hide(); + return $('.save-project-loader').show(); + }); + } + + return ProjectFork; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project_fork.js.coffee b/app/assets/javascripts/project_fork.js.coffee deleted file mode 100644 index e15a1c4ef76..00000000000 --- a/app/assets/javascripts/project_fork.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -class @ProjectFork - constructor: -> - $('.fork-thumbnail a').on 'click', -> - $('.fork-namespaces').hide() - $('.save-project-loader').show() diff --git a/app/assets/javascripts/project_import.js b/app/assets/javascripts/project_import.js new file mode 100644 index 00000000000..c61b0cf2fde --- /dev/null +++ b/app/assets/javascripts/project_import.js @@ -0,0 +1,13 @@ +(function() { + this.ProjectImport = (function() { + function ProjectImport() { + setTimeout(function() { + return Turbolinks.visit(location.href); + }, 5000); + } + + return ProjectImport; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project_import.js.coffee b/app/assets/javascripts/project_import.js.coffee deleted file mode 100644 index 6633564a079..00000000000 --- a/app/assets/javascripts/project_import.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -class @ProjectImport - constructor: -> - setTimeout -> - Turbolinks.visit(location.href) - , 5000 diff --git a/app/assets/javascripts/project_members.js b/app/assets/javascripts/project_members.js new file mode 100644 index 00000000000..f6a796b325a --- /dev/null +++ b/app/assets/javascripts/project_members.js @@ -0,0 +1,13 @@ +(function() { + this.ProjectMembers = (function() { + function ProjectMembers() { + $('li.project_member').bind('ajax:success', function() { + return $(this).fadeOut(); + }); + } + + return ProjectMembers; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project_members.js.coffee b/app/assets/javascripts/project_members.js.coffee deleted file mode 100644 index 896ba7e53ee..00000000000 --- a/app/assets/javascripts/project_members.js.coffee +++ /dev/null @@ -1,4 +0,0 @@ -class @ProjectMembers - constructor: -> - $('li.project_member').bind 'ajax:success', -> - $(this).fadeOut() diff --git a/app/assets/javascripts/project_new.js b/app/assets/javascripts/project_new.js new file mode 100644 index 00000000000..798f15e40a0 --- /dev/null +++ b/app/assets/javascripts/project_new.js @@ -0,0 +1,40 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.ProjectNew = (function() { + function ProjectNew() { + this.toggleSettings = bind(this.toggleSettings, this); + $('.project-edit-container').on('ajax:before', (function(_this) { + return function() { + $('.project-edit-container').hide(); + return $('.save-project-loader').show(); + }; + })(this)); + this.toggleSettings(); + this.toggleSettingsOnclick(); + } + + ProjectNew.prototype.toggleSettings = function() { + this._showOrHide('#project_builds_enabled', '.builds-feature'); + return this._showOrHide('#project_merge_requests_enabled', '.merge-requests-feature'); + }; + + ProjectNew.prototype.toggleSettingsOnclick = function() { + return $('#project_builds_enabled, #project_merge_requests_enabled').on('click', this.toggleSettings); + }; + + ProjectNew.prototype._showOrHide = function(checkElement, container) { + var $container; + $container = $(container); + if ($(checkElement).prop('checked')) { + return $container.show(); + } else { + return $container.hide(); + } + }; + + return ProjectNew; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project_new.js.coffee b/app/assets/javascripts/project_new.js.coffee deleted file mode 100644 index e48343a19b5..00000000000 --- a/app/assets/javascripts/project_new.js.coffee +++ /dev/null @@ -1,23 +0,0 @@ -class @ProjectNew - constructor: -> - $('.project-edit-container').on 'ajax:before', => - $('.project-edit-container').hide() - $('.save-project-loader').show() - @toggleSettings() - @toggleSettingsOnclick() - - - toggleSettings: => - @_showOrHide('#project_builds_enabled', '.builds-feature') - @_showOrHide('#project_merge_requests_enabled', '.merge-requests-feature') - - toggleSettingsOnclick: -> - $('#project_builds_enabled, #project_merge_requests_enabled').on 'click', @toggleSettings - - _showOrHide: (checkElement, container) -> - $container = $(container) - - if $(checkElement).prop('checked') - $container.show() - else - $container.hide() diff --git a/app/assets/javascripts/project_select.js b/app/assets/javascripts/project_select.js new file mode 100644 index 00000000000..20b147500cf --- /dev/null +++ b/app/assets/javascripts/project_select.js @@ -0,0 +1,102 @@ +(function() { + this.ProjectSelect = (function() { + function ProjectSelect() { + $('.js-projects-dropdown-toggle').each(function(i, dropdown) { + var $dropdown; + $dropdown = $(dropdown); + return $dropdown.glDropdown({ + filterable: true, + filterRemote: true, + search: { + fields: ['name_with_namespace'] + }, + data: function(term, callback) { + var finalCallback, projectsCallback; + finalCallback = function(projects) { + return callback(projects); + }; + if (this.includeGroups) { + projectsCallback = function(projects) { + var groupsCallback; + groupsCallback = function(groups) { + var data; + data = groups.concat(projects); + return finalCallback(data); + }; + return Api.groups(term, false, groupsCallback); + }; + } else { + projectsCallback = finalCallback; + } + if (this.groupId) { + return Api.groupProjects(this.groupId, term, projectsCallback); + } else { + return Api.projects(term, this.orderBy, projectsCallback); + } + }, + url: function(project) { + return project.web_url; + }, + text: function(project) { + return project.name_with_namespace; + } + }); + }); + $('.ajax-project-select').each(function(i, select) { + var placeholder; + this.groupId = $(select).data('group-id'); + this.includeGroups = $(select).data('include-groups'); + this.orderBy = $(select).data('order-by') || 'id'; + placeholder = "Search for project"; + if (this.includeGroups) { + placeholder += " or group"; + } + return $(select).select2({ + placeholder: placeholder, + minimumInputLength: 0, + query: (function(_this) { + return function(query) { + var finalCallback, projectsCallback; + finalCallback = function(projects) { + var data; + data = { + results: projects + }; + return query.callback(data); + }; + if (_this.includeGroups) { + projectsCallback = function(projects) { + var groupsCallback; + groupsCallback = function(groups) { + var data; + data = groups.concat(projects); + return finalCallback(data); + }; + return Api.groups(query.term, false, groupsCallback); + }; + } else { + projectsCallback = finalCallback; + } + if (_this.groupId) { + return Api.groupProjects(_this.groupId, query.term, projectsCallback); + } else { + return Api.projects(query.term, _this.orderBy, projectsCallback); + } + }; + })(this), + id: function(project) { + return project.web_url; + }, + text: function(project) { + return project.name_with_namespace || project.name; + }, + dropdownCssClass: "ajax-project-dropdown" + }); + }); + } + + return ProjectSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project_select.js.coffee b/app/assets/javascripts/project_select.js.coffee deleted file mode 100644 index 704bd8dee53..00000000000 --- a/app/assets/javascripts/project_select.js.coffee +++ /dev/null @@ -1,72 +0,0 @@ -class @ProjectSelect - constructor: -> - $('.js-projects-dropdown-toggle').each (i, dropdown) -> - $dropdown = $(dropdown) - - $dropdown.glDropdown( - filterable: true - filterRemote: true - search: - fields: ['name_with_namespace'] - data: (term, callback) -> - finalCallback = (projects) -> - callback projects - - if @includeGroups - projectsCallback = (projects) -> - groupsCallback = (groups) -> - data = groups.concat(projects) - finalCallback(data) - - Api.groups term, false, groupsCallback - else - projectsCallback = finalCallback - - if @groupId - Api.groupProjects @groupId, term, projectsCallback - else - Api.projects term, @orderBy, projectsCallback - url: (project) -> - project.web_url - text: (project) -> - project.name_with_namespace - ) - - $('.ajax-project-select').each (i, select) -> - @groupId = $(select).data('group-id') - @includeGroups = $(select).data('include-groups') - @orderBy = $(select).data('order-by') || 'id' - - placeholder = "Search for project" - placeholder += " or group" if @includeGroups - - $(select).select2 - placeholder: placeholder - minimumInputLength: 0 - query: (query) => - finalCallback = (projects) -> - data = { results: projects } - query.callback(data) - - if @includeGroups - projectsCallback = (projects) -> - groupsCallback = (groups) -> - data = groups.concat(projects) - finalCallback(data) - - Api.groups query.term, false, groupsCallback - else - projectsCallback = finalCallback - - if @groupId - Api.groupProjects @groupId, query.term, projectsCallback - else - Api.projects query.term, @orderBy, projectsCallback - - id: (project) -> - project.web_url - - text: (project) -> - project.name_with_namespace || project.name - - dropdownCssClass: "ajax-project-dropdown" diff --git a/app/assets/javascripts/project_show.js b/app/assets/javascripts/project_show.js new file mode 100644 index 00000000000..8ca4c427912 --- /dev/null +++ b/app/assets/javascripts/project_show.js @@ -0,0 +1,9 @@ +(function() { + this.ProjectShow = (function() { + function ProjectShow() {} + + return ProjectShow; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/project_show.js.coffee b/app/assets/javascripts/project_show.js.coffee deleted file mode 100644 index 1fdf28f2528..00000000000 --- a/app/assets/javascripts/project_show.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -class @ProjectShow - constructor: -> - # I kept class for future diff --git a/app/assets/javascripts/projects_list.js b/app/assets/javascripts/projects_list.js new file mode 100644 index 00000000000..4f415b05dbc --- /dev/null +++ b/app/assets/javascripts/projects_list.js @@ -0,0 +1,48 @@ +(function() { + this.ProjectsList = { + init: function() { + $(".projects-list-filter").off('keyup'); + this.initSearch(); + return this.initPagination(); + }, + initSearch: function() { + var debounceFilter, projectsListFilter; + projectsListFilter = $('.projects-list-filter'); + debounceFilter = _.debounce(ProjectsList.filterResults, 500); + return projectsListFilter.on('keyup', function(e) { + if (projectsListFilter.val() !== '') { + return debounceFilter(); + } + }); + }, + filterResults: function() { + var form, project_filter_url, search; + $('.projects-list-holder').fadeTo(250, 0.5); + form = null; + form = $("form#project-filter-form"); + search = $(".projects-list-filter").val(); + project_filter_url = form.attr('action') + '?' + form.serialize(); + return $.ajax({ + type: "GET", + url: form.attr('action'), + data: form.serialize(), + complete: function() { + return $('.projects-list-holder').fadeTo(250, 1); + }, + success: function(data) { + $('.projects-list-holder').replaceWith(data.html); + return history.replaceState({ + page: project_filter_url + }, document.title, project_filter_url); + }, + dataType: "json" + }); + }, + initPagination: function() { + return $('.projects-list-holder .pagination').on('ajax:success', function(e, data) { + return $('.projects-list-holder').replaceWith(data.html); + }); + } + }; + +}).call(this); diff --git a/app/assets/javascripts/projects_list.js.coffee b/app/assets/javascripts/projects_list.js.coffee deleted file mode 100644 index a7d78d9e461..00000000000 --- a/app/assets/javascripts/projects_list.js.coffee +++ /dev/null @@ -1,36 +0,0 @@ -@ProjectsList = - init: -> - $(".projects-list-filter").off('keyup') - this.initSearch() - this.initPagination() - - initSearch: -> - projectsListFilter = $('.projects-list-filter') - debounceFilter = _.debounce ProjectsList.filterResults, 500 - projectsListFilter.on 'keyup', (e) -> - debounceFilter() if projectsListFilter.val() isnt '' - - filterResults: -> - $('.projects-list-holder').fadeTo(250, 0.5) - - form = null - form = $("form#project-filter-form") - search = $(".projects-list-filter").val() - project_filter_url = form.attr('action') + '?' + form.serialize() - - $.ajax - type: "GET" - url: form.attr('action') - data: form.serialize() - complete: -> - $('.projects-list-holder').fadeTo(250, 1) - success: (data) -> - $('.projects-list-holder').replaceWith(data.html) - # Change url so if user reload a page - search results are saved - history.replaceState {page: project_filter_url}, document.title, project_filter_url - dataType: "json" - - initPagination: -> - $('.projects-list-holder .pagination').on('ajax:success', (e, data) -> - $('.projects-list-holder').replaceWith(data.html) - ) diff --git a/app/assets/javascripts/protected_branch_select.js b/app/assets/javascripts/protected_branch_select.js new file mode 100644 index 00000000000..3a47fc972dc --- /dev/null +++ b/app/assets/javascripts/protected_branch_select.js @@ -0,0 +1,72 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.ProtectedBranchSelect = (function() { + function ProtectedBranchSelect(currentProject) { + this.toggleCreateNewButton = bind(this.toggleCreateNewButton, this); + this.getProtectedBranches = bind(this.getProtectedBranches, this); + $('.dropdown-footer').hide(); + this.dropdown = $('.js-protected-branch-select').glDropdown({ + data: this.getProtectedBranches, + filterable: true, + remote: false, + search: { + fields: ['title'] + }, + selectable: true, + toggleLabel: function(selected) { + if (selected && 'id' in selected) { + return selected.title; + } else { + return 'Protected Branch'; + } + }, + fieldName: 'protected_branch[name]', + text: function(protected_branch) { + return _.escape(protected_branch.title); + }, + id: function(protected_branch) { + return _.escape(protected_branch.id); + }, + onFilter: this.toggleCreateNewButton, + clicked: function() { + return $('.protect-branch-btn').attr('disabled', false); + } + }); + $('.create-new-protected-branch').on('click', (function(_this) { + return function(event) { + _this.dropdown.data('glDropdown').remote.execute(); + return _this.dropdown.data('glDropdown').selectRowAtIndex(event, 0); + }; + })(this)); + } + + ProtectedBranchSelect.prototype.getProtectedBranches = function(term, callback) { + if (this.selectedBranch) { + return callback(gon.open_branches.concat(this.selectedBranch)); + } else { + return callback(gon.open_branches); + } + }; + + ProtectedBranchSelect.prototype.toggleCreateNewButton = function(branchName) { + this.selectedBranch = { + title: branchName, + id: branchName, + text: branchName + }; + if (branchName === '') { + $('.protected-branch-select-footer-list').addClass('hidden'); + return $('.dropdown-footer').hide(); + } else { + $('.create-new-protected-branch').text("Create Protected Branch: " + branchName); + $('.protected-branch-select-footer-list').removeClass('hidden'); + return $('.dropdown-footer').show(); + } + }; + + return ProtectedBranchSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/protected_branch_select.js.coffee b/app/assets/javascripts/protected_branch_select.js.coffee deleted file mode 100644 index 6d45770ace9..00000000000 --- a/app/assets/javascripts/protected_branch_select.js.coffee +++ /dev/null @@ -1,40 +0,0 @@ -class @ProtectedBranchSelect - constructor: (currentProject) -> - $('.dropdown-footer').hide(); - @dropdown = $('.js-protected-branch-select').glDropdown( - data: @getProtectedBranches - filterable: true - remote: false - search: - fields: ['title'] - selectable: true - toggleLabel: (selected) -> if (selected and 'id' of selected) then selected.title else 'Protected Branch' - fieldName: 'protected_branch[name]' - text: (protected_branch) -> _.escape(protected_branch.title) - id: (protected_branch) -> _.escape(protected_branch.id) - onFilter: @toggleCreateNewButton - clicked: () -> $('.protect-branch-btn').attr('disabled', false) - ) - - $('.create-new-protected-branch').on 'click', (event) => - # Refresh the dropdown's data, which ends up calling `getProtectedBranches` - @dropdown.data('glDropdown').remote.execute() - @dropdown.data('glDropdown').selectRowAtIndex(event, 0) - - getProtectedBranches: (term, callback) => - if @selectedBranch - callback(gon.open_branches.concat(@selectedBranch)) - else - callback(gon.open_branches) - - toggleCreateNewButton: (branchName) => - @selectedBranch = { title: branchName, id: branchName, text: branchName } - - if branchName is '' - $('.protected-branch-select-footer-list').addClass('hidden') - $('.dropdown-footer').hide(); - else - $('.create-new-protected-branch').text("Create Protected Branch: #{branchName}") - $('.protected-branch-select-footer-list').removeClass('hidden') - $('.dropdown-footer').show(); - diff --git a/app/assets/javascripts/protected_branches.js b/app/assets/javascripts/protected_branches.js new file mode 100644 index 00000000000..db21a19964d --- /dev/null +++ b/app/assets/javascripts/protected_branches.js @@ -0,0 +1,35 @@ +(function() { + $(function() { + return $(".protected-branches-list :checkbox").change(function(e) { + var can_push, id, name, obj, url; + name = $(this).attr("name"); + if (name === "developers_can_push" || name === "developers_can_merge") { + id = $(this).val(); + can_push = $(this).is(":checked"); + url = $(this).data("url"); + return $.ajax({ + type: "PATCH", + url: url, + dataType: "json", + data: { + id: id, + protected_branch: ( + obj = {}, + obj["" + name] = can_push, + obj + ) + }, + success: function() { + var row; + row = $(e.target); + return row.closest('tr').effect('highlight'); + }, + error: function() { + return new Flash("Failed to update branch!", "alert"); + } + }); + } + }); + }); + +}).call(this); diff --git a/app/assets/javascripts/protected_branches.js.coffee b/app/assets/javascripts/protected_branches.js.coffee deleted file mode 100644 index 14afef2e2ee..00000000000 --- a/app/assets/javascripts/protected_branches.js.coffee +++ /dev/null @@ -1,22 +0,0 @@ -$ -> - $(".protected-branches-list :checkbox").change (e) -> - name = $(this).attr("name") - if name == "developers_can_push" || name == "developers_can_merge" - id = $(this).val() - can_push = $(this).is(":checked") - url = $(this).data("url") - $.ajax - type: "PATCH" - url: url - dataType: "json" - data: - id: id - protected_branch: - "#{name}": can_push - - success: -> - row = $(e.target) - row.closest('tr').effect('highlight') - - error: -> - new Flash("Failed to update branch!", "alert") diff --git a/app/assets/javascripts/right_sidebar.js b/app/assets/javascripts/right_sidebar.js new file mode 100644 index 00000000000..dc4d5113826 --- /dev/null +++ b/app/assets/javascripts/right_sidebar.js @@ -0,0 +1,201 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Sidebar = (function() { + function Sidebar(currentUser) { + this.toggleTodo = bind(this.toggleTodo, this); + this.sidebar = $('aside'); + this.addEventListeners(); + } + + Sidebar.prototype.addEventListeners = function() { + this.sidebar.on('click', '.sidebar-collapsed-icon', this, this.sidebarCollapseClicked); + $('.dropdown').on('hidden.gl.dropdown', this, this.onSidebarDropdownHidden); + $('.dropdown').on('loading.gl.dropdown', this.sidebarDropdownLoading); + $('.dropdown').on('loaded.gl.dropdown', this.sidebarDropdownLoaded); + $(document).off('click', '.js-sidebar-toggle').on('click', '.js-sidebar-toggle', function(e, triggered) { + var $allGutterToggleIcons, $this, $thisIcon; + e.preventDefault(); + $this = $(this); + $thisIcon = $this.find('i'); + $allGutterToggleIcons = $('.js-sidebar-toggle i'); + if ($thisIcon.hasClass('fa-angle-double-right')) { + $allGutterToggleIcons.removeClass('fa-angle-double-right').addClass('fa-angle-double-left'); + $('aside.right-sidebar').removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed'); + $('.page-with-sidebar').removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed'); + } else { + $allGutterToggleIcons.removeClass('fa-angle-double-left').addClass('fa-angle-double-right'); + $('aside.right-sidebar').removeClass('right-sidebar-collapsed').addClass('right-sidebar-expanded'); + $('.page-with-sidebar').removeClass('right-sidebar-collapsed').addClass('right-sidebar-expanded'); + } + if (!triggered) { + return $.cookie("collapsed_gutter", $('.right-sidebar').hasClass('right-sidebar-collapsed'), { + path: '/' + }); + } + }); + return $(document).off('click', '.js-issuable-todo').on('click', '.js-issuable-todo', this.toggleTodo); + }; + + Sidebar.prototype.toggleTodo = function(e) { + var $btnText, $this, $todoLoading, ajaxType, url; + $this = $(e.currentTarget); + $todoLoading = $('.js-issuable-todo-loading'); + $btnText = $('.js-issuable-todo-text', $this); + ajaxType = $this.attr('data-delete-path') ? 'DELETE' : 'POST'; + if ($this.attr('data-delete-path')) { + url = "" + ($this.attr('data-delete-path')); + } else { + url = "" + ($this.data('url')); + } + return $.ajax({ + url: url, + type: ajaxType, + dataType: 'json', + data: { + issuable_id: $this.data('issuable-id'), + issuable_type: $this.data('issuable-type') + }, + beforeSend: (function(_this) { + return function() { + return _this.beforeTodoSend($this, $todoLoading); + }; + })(this) + }).done((function(_this) { + return function(data) { + return _this.todoUpdateDone(data, $this, $btnText, $todoLoading); + }; + })(this)); + }; + + Sidebar.prototype.beforeTodoSend = function($btn, $todoLoading) { + $btn.disable(); + return $todoLoading.removeClass('hidden'); + }; + + Sidebar.prototype.todoUpdateDone = function(data, $btn, $btnText, $todoLoading) { + var $todoPendingCount; + $todoPendingCount = $('.todos-pending-count'); + $todoPendingCount.text(data.count); + $btn.enable(); + $todoLoading.addClass('hidden'); + if (data.count === 0) { + $todoPendingCount.addClass('hidden'); + } else { + $todoPendingCount.removeClass('hidden'); + } + if (data.delete_path != null) { + $btn.attr('aria-label', $btn.data('mark-text')).attr('data-delete-path', data.delete_path); + return $btnText.text($btn.data('mark-text')); + } else { + $btn.attr('aria-label', $btn.data('todo-text')).removeAttr('data-delete-path'); + return $btnText.text($btn.data('todo-text')); + } + }; + + Sidebar.prototype.sidebarDropdownLoading = function(e) { + var $loading, $sidebarCollapsedIcon, i, img; + $sidebarCollapsedIcon = $(this).closest('.block').find('.sidebar-collapsed-icon'); + img = $sidebarCollapsedIcon.find('img'); + i = $sidebarCollapsedIcon.find('i'); + $loading = $(''); + if (img.length) { + img.before($loading); + return img.hide(); + } else if (i.length) { + i.before($loading); + return i.hide(); + } + }; + + Sidebar.prototype.sidebarDropdownLoaded = function(e) { + var $sidebarCollapsedIcon, i, img; + $sidebarCollapsedIcon = $(this).closest('.block').find('.sidebar-collapsed-icon'); + img = $sidebarCollapsedIcon.find('img'); + $sidebarCollapsedIcon.find('i.fa-spin').remove(); + i = $sidebarCollapsedIcon.find('i'); + if (img.length) { + return img.show(); + } else { + return i.show(); + } + }; + + Sidebar.prototype.sidebarCollapseClicked = function(e) { + var $block, sidebar; + if ($(e.currentTarget).hasClass('dont-change-state')) { + return; + } + sidebar = e.data; + e.preventDefault(); + $block = $(this).closest('.block'); + return sidebar.openDropdown($block); + }; + + Sidebar.prototype.openDropdown = function(blockOrName) { + var $block; + $block = _.isString(blockOrName) ? this.getBlock(blockOrName) : blockOrName; + $block.find('.edit-link').trigger('click'); + if (!this.isOpen()) { + this.setCollapseAfterUpdate($block); + return this.toggleSidebar('open'); + } + }; + + Sidebar.prototype.setCollapseAfterUpdate = function($block) { + $block.addClass('collapse-after-update'); + return $('.page-with-sidebar').addClass('with-overlay'); + }; + + Sidebar.prototype.onSidebarDropdownHidden = function(e) { + var $block, sidebar; + sidebar = e.data; + e.preventDefault(); + $block = $(this).closest('.block'); + return sidebar.sidebarDropdownHidden($block); + }; + + Sidebar.prototype.sidebarDropdownHidden = function($block) { + if ($block.hasClass('collapse-after-update')) { + $block.removeClass('collapse-after-update'); + $('.page-with-sidebar').removeClass('with-overlay'); + return this.toggleSidebar('hide'); + } + }; + + Sidebar.prototype.triggerOpenSidebar = function() { + return this.sidebar.find('.js-sidebar-toggle').trigger('click'); + }; + + Sidebar.prototype.toggleSidebar = function(action) { + if (action == null) { + action = 'toggle'; + } + if (action === 'toggle') { + this.triggerOpenSidebar(); + } + if (action === 'open') { + if (!this.isOpen()) { + this.triggerOpenSidebar(); + } + } + if (action === 'hide') { + if (this.isOpen()) { + return this.triggerOpenSidebar(); + } + } + }; + + Sidebar.prototype.isOpen = function() { + return this.sidebar.is('.right-sidebar-expanded'); + }; + + Sidebar.prototype.getBlock = function(name) { + return this.sidebar.find(".block." + name); + }; + + return Sidebar; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/right_sidebar.js.coffee b/app/assets/javascripts/right_sidebar.js.coffee deleted file mode 100644 index 0c95301e380..00000000000 --- a/app/assets/javascripts/right_sidebar.js.coffee +++ /dev/null @@ -1,175 +0,0 @@ -class @Sidebar - constructor: (currentUser) -> - @sidebar = $('aside') - - @addEventListeners() - - addEventListeners: -> - @sidebar.on('click', '.sidebar-collapsed-icon', @, @sidebarCollapseClicked) - $('.dropdown').on('hidden.gl.dropdown', @, @onSidebarDropdownHidden) - $('.dropdown').on('loading.gl.dropdown', @sidebarDropdownLoading) - $('.dropdown').on('loaded.gl.dropdown', @sidebarDropdownLoaded) - - - $(document) - .off 'click', '.js-sidebar-toggle' - .on 'click', '.js-sidebar-toggle', (e, triggered) -> - e.preventDefault() - $this = $(this) - $thisIcon = $this.find 'i' - $allGutterToggleIcons = $('.js-sidebar-toggle i') - if $thisIcon.hasClass('fa-angle-double-right') - $allGutterToggleIcons - .removeClass('fa-angle-double-right') - .addClass('fa-angle-double-left') - $('aside.right-sidebar') - .removeClass('right-sidebar-expanded') - .addClass('right-sidebar-collapsed') - $('.page-with-sidebar') - .removeClass('right-sidebar-expanded') - .addClass('right-sidebar-collapsed') - else - $allGutterToggleIcons - .removeClass('fa-angle-double-left') - .addClass('fa-angle-double-right') - $('aside.right-sidebar') - .removeClass('right-sidebar-collapsed') - .addClass('right-sidebar-expanded') - $('.page-with-sidebar') - .removeClass('right-sidebar-collapsed') - .addClass('right-sidebar-expanded') - if not triggered - $.cookie("collapsed_gutter", - $('.right-sidebar') - .hasClass('right-sidebar-collapsed'), { path: '/' }) - - $(document) - .off 'click', '.js-issuable-todo' - .on 'click', '.js-issuable-todo', @toggleTodo - - toggleTodo: (e) => - $this = $(e.currentTarget) - $todoLoading = $('.js-issuable-todo-loading') - $btnText = $('.js-issuable-todo-text', $this) - ajaxType = if $this.attr('data-delete-path') then 'DELETE' else 'POST' - - if $this.attr('data-delete-path') - url = "#{$this.attr('data-delete-path')}" - else - url = "#{$this.data('url')}" - - $.ajax( - url: url - type: ajaxType - dataType: 'json' - data: - issuable_id: $this.data('issuable-id') - issuable_type: $this.data('issuable-type') - beforeSend: => - @beforeTodoSend($this, $todoLoading) - ).done (data) => - @todoUpdateDone(data, $this, $btnText, $todoLoading) - - beforeTodoSend: ($btn, $todoLoading) -> - $btn.disable() - $todoLoading.removeClass 'hidden' - - todoUpdateDone: (data, $btn, $btnText, $todoLoading) -> - $todoPendingCount = $('.todos-pending-count') - $todoPendingCount.text data.count - - $btn.enable() - $todoLoading.addClass 'hidden' - - if data.count is 0 - $todoPendingCount.addClass 'hidden' - else - $todoPendingCount.removeClass 'hidden' - - if data.delete_path? - $btn - .attr 'aria-label', $btn.data('mark-text') - .attr 'data-delete-path', data.delete_path - $btnText.text $btn.data('mark-text') - else - $btn - .attr 'aria-label', $btn.data('todo-text') - .removeAttr 'data-delete-path' - $btnText.text $btn.data('todo-text') - - sidebarDropdownLoading: (e) -> - $sidebarCollapsedIcon = $(@).closest('.block').find('.sidebar-collapsed-icon') - img = $sidebarCollapsedIcon.find('img') - i = $sidebarCollapsedIcon.find('i') - $loading = $('') - if img.length - img.before($loading) - img.hide() - else if i.length - i.before($loading) - i.hide() - - sidebarDropdownLoaded: (e) -> - $sidebarCollapsedIcon = $(@).closest('.block').find('.sidebar-collapsed-icon') - img = $sidebarCollapsedIcon.find('img') - $sidebarCollapsedIcon.find('i.fa-spin').remove() - i = $sidebarCollapsedIcon.find('i') - if img.length - img.show() - else - i.show() - - sidebarCollapseClicked: (e) -> - - return if $(e.currentTarget).hasClass('dont-change-state') - - sidebar = e.data - e.preventDefault() - $block = $(@).closest('.block') - sidebar.openDropdown($block); - - openDropdown: (blockOrName) -> - $block = if _.isString(blockOrName) then @getBlock(blockOrName) else blockOrName - - $block.find('.edit-link').trigger('click') - - if not @isOpen() - @setCollapseAfterUpdate($block) - @toggleSidebar('open') - - setCollapseAfterUpdate: ($block) -> - $block.addClass('collapse-after-update') - $('.page-with-sidebar').addClass('with-overlay') - - onSidebarDropdownHidden: (e) -> - sidebar = e.data - e.preventDefault() - $block = $(@).closest('.block') - sidebar.sidebarDropdownHidden($block) - - sidebarDropdownHidden: ($block) -> - if $block.hasClass('collapse-after-update') - $block.removeClass('collapse-after-update') - $('.page-with-sidebar').removeClass('with-overlay') - @toggleSidebar('hide') - - triggerOpenSidebar: -> - @sidebar - .find('.js-sidebar-toggle') - .trigger('click') - - toggleSidebar: (action = 'toggle') -> - if action is 'toggle' - @triggerOpenSidebar() - - if action is 'open' - @triggerOpenSidebar() if not @isOpen() - - if action is 'hide' - @triggerOpenSidebar() if @isOpen() - - isOpen: -> - @sidebar.is('.right-sidebar-expanded') - - getBlock: (name) -> - @sidebar.find(".block.#{name}") diff --git a/app/assets/javascripts/search.js b/app/assets/javascripts/search.js new file mode 100644 index 00000000000..d34346f862b --- /dev/null +++ b/app/assets/javascripts/search.js @@ -0,0 +1,93 @@ +(function() { + this.Search = (function() { + function Search() { + var $groupDropdown, $projectDropdown; + $groupDropdown = $('.js-search-group-dropdown'); + $projectDropdown = $('.js-search-project-dropdown'); + this.eventListeners(); + $groupDropdown.glDropdown({ + selectable: true, + filterable: true, + fieldName: 'group_id', + data: function(term, callback) { + return Api.groups(term, null, function(data) { + data.unshift({ + name: 'Any' + }); + data.splice(1, 0, 'divider'); + return callback(data); + }); + }, + id: function(obj) { + return obj.id; + }, + text: function(obj) { + return obj.name; + }, + toggleLabel: function(obj) { + return ($groupDropdown.data('default-label')) + " " + obj.name; + }, + clicked: (function(_this) { + return function() { + return _this.submitSearch(); + }; + })(this) + }); + $projectDropdown.glDropdown({ + selectable: true, + filterable: true, + fieldName: 'project_id', + data: function(term, callback) { + return Api.projects(term, 'id', function(data) { + data.unshift({ + name_with_namespace: 'Any' + }); + data.splice(1, 0, 'divider'); + return callback(data); + }); + }, + id: function(obj) { + return obj.id; + }, + text: function(obj) { + return obj.name_with_namespace; + }, + toggleLabel: function(obj) { + return ($projectDropdown.data('default-label')) + " " + obj.name_with_namespace; + }, + clicked: (function(_this) { + return function() { + return _this.submitSearch(); + }; + })(this) + }); + } + + Search.prototype.eventListeners = function() { + $(document).off('keyup', '.js-search-input').on('keyup', '.js-search-input', this.searchKeyUp); + return $(document).off('click', '.js-search-clear').on('click', '.js-search-clear', this.clearSearchField); + }; + + Search.prototype.submitSearch = function() { + return $('.js-search-form').submit(); + }; + + Search.prototype.searchKeyUp = function() { + var $input; + $input = $(this); + if ($input.val() === '') { + return $('.js-search-clear').addClass('hidden'); + } else { + return $('.js-search-clear').removeClass('hidden'); + } + }; + + Search.prototype.clearSearchField = function() { + return $('.js-search-input').val('').trigger('keyup').focus(); + }; + + return Search; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/search.js.coffee b/app/assets/javascripts/search.js.coffee deleted file mode 100644 index 661e1195f60..00000000000 --- a/app/assets/javascripts/search.js.coffee +++ /dev/null @@ -1,75 +0,0 @@ -class @Search - constructor: -> - $groupDropdown = $('.js-search-group-dropdown') - $projectDropdown = $('.js-search-project-dropdown') - @eventListeners() - - $groupDropdown.glDropdown( - selectable: true - filterable: true - fieldName: 'group_id' - data: (term, callback) -> - Api.groups term, null, (data) -> - data.unshift( - name: 'Any' - ) - data.splice 1, 0, 'divider' - - callback(data) - id: (obj) -> - obj.id - text: (obj) -> - obj.name - toggleLabel: (obj) -> - "#{$groupDropdown.data('default-label')} #{obj.name}" - clicked: => - @submitSearch() - ) - - $projectDropdown.glDropdown( - selectable: true - filterable: true - fieldName: 'project_id' - data: (term, callback) -> - Api.projects term, 'id', (data) -> - data.unshift( - name_with_namespace: 'Any' - ) - data.splice 1, 0, 'divider' - - callback(data) - id: (obj) -> - obj.id - text: (obj) -> - obj.name_with_namespace - toggleLabel: (obj) -> - "#{$projectDropdown.data('default-label')} #{obj.name_with_namespace}" - clicked: => - @submitSearch() - ) - - eventListeners: -> - $(document) - .off 'keyup', '.js-search-input' - .on 'keyup', '.js-search-input', @searchKeyUp - - $(document) - .off 'click', '.js-search-clear' - .on 'click', '.js-search-clear', @clearSearchField - - submitSearch: -> - $('.js-search-form').submit() - - searchKeyUp: -> - $input = $(@) - - if $input.val() is '' - $('.js-search-clear').addClass 'hidden' - else - $('.js-search-clear').removeClass 'hidden' - - clearSearchField: -> - $('.js-search-input') - .val '' - .trigger 'keyup' - .focus() diff --git a/app/assets/javascripts/search_autocomplete.js b/app/assets/javascripts/search_autocomplete.js new file mode 100644 index 00000000000..990f6536eb2 --- /dev/null +++ b/app/assets/javascripts/search_autocomplete.js @@ -0,0 +1,360 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.SearchAutocomplete = (function() { + var KEYCODE; + + KEYCODE = { + ESCAPE: 27, + BACKSPACE: 8, + ENTER: 13 + }; + + function SearchAutocomplete(opts) { + var ref, ref1, ref2, ref3, ref4; + if (opts == null) { + opts = {}; + } + this.onSearchInputBlur = bind(this.onSearchInputBlur, this); + this.onClearInputClick = bind(this.onClearInputClick, this); + this.onSearchInputFocus = bind(this.onSearchInputFocus, this); + this.onSearchInputClick = bind(this.onSearchInputClick, this); + this.onSearchInputKeyUp = bind(this.onSearchInputKeyUp, this); + this.onSearchInputKeyDown = bind(this.onSearchInputKeyDown, this); + this.wrap = (ref = opts.wrap) != null ? ref : $('.search'), this.optsEl = (ref1 = opts.optsEl) != null ? ref1 : this.wrap.find('.search-autocomplete-opts'), this.autocompletePath = (ref2 = opts.autocompletePath) != null ? ref2 : this.optsEl.data('autocomplete-path'), this.projectId = (ref3 = opts.projectId) != null ? ref3 : this.optsEl.data('autocomplete-project-id') || '', this.projectRef = (ref4 = opts.projectRef) != null ? ref4 : this.optsEl.data('autocomplete-project-ref') || ''; + this.dropdown = this.wrap.find('.dropdown'); + this.dropdownContent = this.dropdown.find('.dropdown-content'); + this.locationBadgeEl = this.getElement('.location-badge'); + this.scopeInputEl = this.getElement('#scope'); + this.searchInput = this.getElement('.search-input'); + this.projectInputEl = this.getElement('#search_project_id'); + this.groupInputEl = this.getElement('#group_id'); + this.searchCodeInputEl = this.getElement('#search_code'); + this.repositoryInputEl = this.getElement('#repository_ref'); + this.clearInput = this.getElement('.js-clear-input'); + this.saveOriginalState(); + if (gon.current_user_id) { + this.createAutocomplete(); + } + this.searchInput.addClass('disabled'); + this.saveTextLength(); + this.bindEvents(); + } + + SearchAutocomplete.prototype.getElement = function(selector) { + return this.wrap.find(selector); + }; + + SearchAutocomplete.prototype.saveOriginalState = function() { + return this.originalState = this.serializeState(); + }; + + SearchAutocomplete.prototype.saveTextLength = function() { + return this.lastTextLength = this.searchInput.val().length; + }; + + SearchAutocomplete.prototype.createAutocomplete = function() { + return this.searchInput.glDropdown({ + filterInputBlur: false, + filterable: true, + filterRemote: true, + highlight: true, + enterCallback: false, + filterInput: 'input#search', + search: { + fields: ['text'] + }, + data: this.getData.bind(this), + selectable: true, + clicked: this.onClick.bind(this) + }); + }; + + SearchAutocomplete.prototype.getData = function(term, callback) { + var _this, contents, jqXHR; + _this = this; + if (!term) { + if (contents = this.getCategoryContents()) { + this.searchInput.data('glDropdown').filter.options.callback(contents); + this.enableAutocomplete(); + } + return; + } + if (this.loadingSuggestions) { + return; + } + this.loadingSuggestions = true; + return jqXHR = $.get(this.autocompletePath, { + project_id: this.projectId, + project_ref: this.projectRef, + term: term + }, function(response) { + var data, firstCategory, i, lastCategory, len, suggestion; + if (!response.length) { + _this.disableAutocomplete(); + return; + } + data = []; + firstCategory = true; + for (i = 0, len = response.length; i < len; i++) { + suggestion = response[i]; + if (lastCategory !== suggestion.category) { + if (!firstCategory) { + data.push('separator'); + } + if (firstCategory) { + firstCategory = false; + } + data.push({ + header: suggestion.category + }); + lastCategory = suggestion.category; + } + data.push({ + id: (suggestion.category.toLowerCase()) + "-" + suggestion.id, + category: suggestion.category, + text: suggestion.label, + url: suggestion.url + }); + } + if (data.length) { + data.push('separator'); + data.push({ + text: "Result name contains \"" + term + "\"", + url: "/search?search=" + term + "&project_id=" + (_this.projectInputEl.val()) + "&group_id=" + (_this.groupInputEl.val()) + }); + } + return callback(data); + }).always(function() { + return _this.loadingSuggestions = false; + }); + }; + + SearchAutocomplete.prototype.getCategoryContents = function() { + var dashboardOptions, groupOptions, issuesPath, items, mrPath, name, options, projectOptions, userId, utils; + userId = gon.current_user_id; + utils = gl.utils, projectOptions = gl.projectOptions, groupOptions = gl.groupOptions, dashboardOptions = gl.dashboardOptions; + if (utils.isInGroupsPage() && groupOptions) { + options = groupOptions[utils.getGroupSlug()]; + } else if (utils.isInProjectPage() && projectOptions) { + options = projectOptions[utils.getProjectSlug()]; + } else if (dashboardOptions) { + options = dashboardOptions; + } + issuesPath = options.issuesPath, mrPath = options.mrPath, name = options.name; + items = [ + { + header: "" + name + }, { + text: 'Issues assigned to me', + url: issuesPath + "/?assignee_id=" + userId + }, { + text: "Issues I've created", + url: issuesPath + "/?author_id=" + userId + }, 'separator', { + text: 'Merge requests assigned to me', + url: mrPath + "/?assignee_id=" + userId + }, { + text: "Merge requests I've created", + url: mrPath + "/?author_id=" + userId + } + ]; + if (!name) { + items.splice(0, 1); + } + return items; + }; + + SearchAutocomplete.prototype.serializeState = function() { + return { + search_project_id: this.projectInputEl.val(), + group_id: this.groupInputEl.val(), + search_code: this.searchCodeInputEl.val(), + repository_ref: this.repositoryInputEl.val(), + scope: this.scopeInputEl.val(), + _location: this.locationBadgeEl.text() + }; + }; + + SearchAutocomplete.prototype.bindEvents = function() { + this.searchInput.on('keydown', this.onSearchInputKeyDown); + this.searchInput.on('keyup', this.onSearchInputKeyUp); + this.searchInput.on('click', this.onSearchInputClick); + this.searchInput.on('focus', this.onSearchInputFocus); + this.searchInput.on('blur', this.onSearchInputBlur); + this.clearInput.on('click', this.onClearInputClick); + return this.locationBadgeEl.on('click', (function(_this) { + return function() { + return _this.searchInput.focus(); + }; + })(this)); + }; + + SearchAutocomplete.prototype.enableAutocomplete = function() { + var _this; + if (!gon.current_user_id) { + return; + } + if (!this.dropdown.hasClass('open')) { + _this = this; + this.loadingSuggestions = false; + this.dropdown.addClass('open').trigger('shown.bs.dropdown'); + return this.searchInput.removeClass('disabled'); + } + }; + + SearchAutocomplete.prototype.onSearchInputKeyDown = function() { + return this.saveTextLength(); + }; + + SearchAutocomplete.prototype.onSearchInputKeyUp = function(e) { + switch (e.keyCode) { + case KEYCODE.BACKSPACE: + if (this.lastTextLength === 0 && this.badgePresent()) { + this.removeLocationBadge(); + } + if (this.lastTextLength === 1) { + this.disableAutocomplete(); + } + if (this.lastTextLength > 1) { + this.enableAutocomplete(); + } + break; + case KEYCODE.ESCAPE: + this.restoreOriginalState(); + break; + default: + if (this.searchInput.val() === '') { + this.disableAutocomplete(); + } else { + if (e.keyCode !== KEYCODE.ENTER) { + this.enableAutocomplete(); + } + } + } + this.wrap.toggleClass('has-value', !!e.target.value); + }; + + SearchAutocomplete.prototype.onSearchInputClick = function(e) { + return e.stopImmediatePropagation(); + }; + + SearchAutocomplete.prototype.onSearchInputFocus = function() { + this.isFocused = true; + this.wrap.addClass('search-active'); + if (this.getValue() === '') { + return this.getData(); + } + }; + + SearchAutocomplete.prototype.getValue = function() { + return this.searchInput.val(); + }; + + SearchAutocomplete.prototype.onClearInputClick = function(e) { + e.preventDefault(); + return this.searchInput.val('').focus(); + }; + + SearchAutocomplete.prototype.onSearchInputBlur = function(e) { + this.isFocused = false; + this.wrap.removeClass('search-active'); + if (this.searchInput.val() === '') { + return this.restoreOriginalState(); + } + }; + + SearchAutocomplete.prototype.addLocationBadge = function(item) { + var badgeText, category, value; + category = item.category != null ? item.category + ": " : ''; + value = item.value != null ? item.value : ''; + badgeText = "" + category + value; + this.locationBadgeEl.text(badgeText).show(); + return this.wrap.addClass('has-location-badge'); + }; + + SearchAutocomplete.prototype.hasLocationBadge = function() { + return this.wrap.is('.has-location-badge'); + }; + + SearchAutocomplete.prototype.restoreOriginalState = function() { + var i, input, inputs, len; + inputs = Object.keys(this.originalState); + for (i = 0, len = inputs.length; i < len; i++) { + input = inputs[i]; + this.getElement("#" + input).val(this.originalState[input]); + } + if (this.originalState._location === '') { + return this.locationBadgeEl.hide(); + } else { + return this.addLocationBadge({ + value: this.originalState._location + }); + } + }; + + SearchAutocomplete.prototype.badgePresent = function() { + return this.locationBadgeEl.length; + }; + + SearchAutocomplete.prototype.resetSearchState = function() { + var i, input, inputs, len, results; + inputs = Object.keys(this.originalState); + results = []; + for (i = 0, len = inputs.length; i < len; i++) { + input = inputs[i]; + if (input === '_location') { + break; + } + results.push(this.getElement("#" + input).val('')); + } + return results; + }; + + SearchAutocomplete.prototype.removeLocationBadge = function() { + this.locationBadgeEl.hide(); + this.resetSearchState(); + this.wrap.removeClass('has-location-badge'); + return this.disableAutocomplete(); + }; + + SearchAutocomplete.prototype.disableAutocomplete = function() { + this.searchInput.addClass('disabled'); + this.dropdown.removeClass('open'); + return this.restoreMenu(); + }; + + SearchAutocomplete.prototype.restoreMenu = function() { + var html; + html = ""; + return this.dropdownContent.html(html); + }; + + SearchAutocomplete.prototype.onClick = function(item, $el, e) { + if (location.pathname.indexOf(item.url) !== -1) { + e.preventDefault(); + if (!this.badgePresent) { + if (item.category === 'Projects') { + this.projectInputEl.val(item.id); + this.addLocationBadge({ + value: 'This project' + }); + } + if (item.category === 'Groups') { + this.groupInputEl.val(item.id); + this.addLocationBadge({ + value: 'This group' + }); + } + } + $el.removeClass('is-active'); + this.disableAutocomplete(); + return this.searchInput.val('').focus(); + } + }; + + return SearchAutocomplete; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/search_autocomplete.js.coffee b/app/assets/javascripts/search_autocomplete.js.coffee deleted file mode 100644 index 72b1d3dfb1e..00000000000 --- a/app/assets/javascripts/search_autocomplete.js.coffee +++ /dev/null @@ -1,334 +0,0 @@ -class @SearchAutocomplete - - KEYCODE = - ESCAPE: 27 - BACKSPACE: 8 - ENTER: 13 - - constructor: (opts = {}) -> - { - @wrap = $('.search') - - @optsEl = @wrap.find('.search-autocomplete-opts') - @autocompletePath = @optsEl.data('autocomplete-path') - @projectId = @optsEl.data('autocomplete-project-id') || '' - @projectRef = @optsEl.data('autocomplete-project-ref') || '' - - } = opts - - # Dropdown Element - @dropdown = @wrap.find('.dropdown') - @dropdownContent = @dropdown.find('.dropdown-content') - - @locationBadgeEl = @getElement('.location-badge') - @scopeInputEl = @getElement('#scope') - @searchInput = @getElement('.search-input') - @projectInputEl = @getElement('#search_project_id') - @groupInputEl = @getElement('#group_id') - @searchCodeInputEl = @getElement('#search_code') - @repositoryInputEl = @getElement('#repository_ref') - @clearInput = @getElement('.js-clear-input') - - @saveOriginalState() - - # Only when user is logged in - @createAutocomplete() if gon.current_user_id - - @searchInput.addClass('disabled') - - @saveTextLength() - - @bindEvents() - - # Finds an element inside wrapper element - getElement: (selector) -> - @wrap.find(selector) - - saveOriginalState: -> - @originalState = @serializeState() - - saveTextLength: -> - @lastTextLength = @searchInput.val().length - - createAutocomplete: -> - @searchInput.glDropdown - filterInputBlur: false - filterable: true - filterRemote: true - highlight: true - enterCallback: false - filterInput: 'input#search' - search: - fields: ['text'] - data: @getData.bind(@) - selectable: true - clicked: @onClick.bind(@) - - getData: (term, callback) -> - _this = @ - - unless term - if contents = @getCategoryContents() - @searchInput.data('glDropdown').filter.options.callback contents - @enableAutocomplete() - - return - - # Prevent multiple ajax calls - return if @loadingSuggestions - - @loadingSuggestions = true - - jqXHR = $.get(@autocompletePath, { - project_id: @projectId - project_ref: @projectRef - term: term - }, (response) -> - # Hide dropdown menu if no suggestions returns - if !response.length - _this.disableAutocomplete() - return - - data = [] - - # List results - firstCategory = true - for suggestion in response - - # Add group header before list each group - if lastCategory isnt suggestion.category - data.push 'separator' if !firstCategory - - firstCategory = false if firstCategory - - data.push - header: suggestion.category - - lastCategory = suggestion.category - - data.push - id: "#{suggestion.category.toLowerCase()}-#{suggestion.id}" - category: suggestion.category - text: suggestion.label - url: suggestion.url - - # Add option to proceed with the search - if data.length - data.push('separator') - data.push - text: "Result name contains \"#{term}\"" - url: "/search?\ - search=#{term}\ - &project_id=#{_this.projectInputEl.val()}\ - &group_id=#{_this.groupInputEl.val()}" - - callback(data) - ).always -> - _this.loadingSuggestions = false - - - getCategoryContents: -> - - userId = gon.current_user_id - { utils, projectOptions, groupOptions, dashboardOptions } = gl - - if utils.isInGroupsPage() and groupOptions - options = groupOptions[utils.getGroupSlug()] - - else if utils.isInProjectPage() and projectOptions - options = projectOptions[utils.getProjectSlug()] - - else if dashboardOptions - options = dashboardOptions - - { issuesPath, mrPath, name } = options - - items = [ - { header: "#{name}" } - { text: 'Issues assigned to me', url: "#{issuesPath}/?assignee_id=#{userId}" } - { text: "Issues I've created", url: "#{issuesPath}/?author_id=#{userId}" } - 'separator' - { text: 'Merge requests assigned to me', url: "#{mrPath}/?assignee_id=#{userId}" } - { text: "Merge requests I've created", url: "#{mrPath}/?author_id=#{userId}" } - ] - - items.splice 0, 1 unless name - - return items - - - serializeState: -> - { - # Search Criteria - search_project_id: @projectInputEl.val() - group_id: @groupInputEl.val() - search_code: @searchCodeInputEl.val() - repository_ref: @repositoryInputEl.val() - scope: @scopeInputEl.val() - - # Location badge - _location: @locationBadgeEl.text() - } - - bindEvents: -> - @searchInput.on 'keydown', @onSearchInputKeyDown - @searchInput.on 'keyup', @onSearchInputKeyUp - @searchInput.on 'click', @onSearchInputClick - @searchInput.on 'focus', @onSearchInputFocus - @searchInput.on 'blur', @onSearchInputBlur - @clearInput.on 'click', @onClearInputClick - @locationBadgeEl.on 'click', => - @searchInput.focus() - - enableAutocomplete: -> - # No need to enable anything if user is not logged in - return if !gon.current_user_id - - unless @dropdown.hasClass('open') - _this = @ - @loadingSuggestions = false - - @dropdown - .addClass('open') - .trigger('shown.bs.dropdown') - @searchInput.removeClass('disabled') - - onSearchInputKeyDown: => - # Saves last length of the entered text - @saveTextLength() - - onSearchInputKeyUp: (e) => - switch e.keyCode - when KEYCODE.BACKSPACE - # when trying to remove the location badge - if @lastTextLength is 0 and @badgePresent() - @removeLocationBadge() - - # When removing the last character and no badge is present - if @lastTextLength is 1 - @disableAutocomplete() - - # When removing any character from existin value - if @lastTextLength > 1 - @enableAutocomplete() - - when KEYCODE.ESCAPE - @restoreOriginalState() - - else - # Handle the case when deleting the input value other than backspace - # e.g. Pressing ctrl + backspace or ctrl + x - if @searchInput.val() is '' - @disableAutocomplete() - else - # We should display the menu only when input is not empty - @enableAutocomplete() if e.keyCode isnt KEYCODE.ENTER - - @wrap.toggleClass 'has-value', !!e.target.value - - # Avoid falsy value to be returned - return - - onSearchInputClick: (e) => - # Prevents closing the dropdown menu - e.stopImmediatePropagation() - - onSearchInputFocus: => - @isFocused = true - @wrap.addClass('search-active') - - @getData() if @getValue() is '' - - - getValue: -> return @searchInput.val() - - - onClearInputClick: (e) => - e.preventDefault() - @searchInput.val('').focus() - - onSearchInputBlur: (e) => - @isFocused = false - @wrap.removeClass('search-active') - - # If input is blank then restore state - if @searchInput.val() is '' - @restoreOriginalState() - - addLocationBadge: (item) -> - category = if item.category? then "#{item.category}: " else '' - value = if item.value? then item.value else '' - - badgeText = "#{category}#{value}" - @locationBadgeEl.text(badgeText).show() - @wrap.addClass('has-location-badge') - - - hasLocationBadge: -> return @wrap.is '.has-location-badge' - - - restoreOriginalState: -> - inputs = Object.keys @originalState - - for input in inputs - @getElement("##{input}").val(@originalState[input]) - - if @originalState._location is '' - @locationBadgeEl.hide() - else - @addLocationBadge( - value: @originalState._location - ) - - badgePresent: -> - @locationBadgeEl.length - - resetSearchState: -> - inputs = Object.keys @originalState - - for input in inputs - - # _location isnt a input - break if input is '_location' - - @getElement("##{input}").val('') - - - removeLocationBadge: -> - - @locationBadgeEl.hide() - @resetSearchState() - @wrap.removeClass('has-location-badge') - @disableAutocomplete() - - - disableAutocomplete: -> - @searchInput.addClass('disabled') - @dropdown.removeClass('open') - @restoreMenu() - - restoreMenu: -> - html = "" - @dropdownContent.html(html) - - onClick: (item, $el, e) -> - if location.pathname.indexOf(item.url) isnt -1 - e.preventDefault() - if not @badgePresent - if item.category is 'Projects' - @projectInputEl.val(item.id) - @addLocationBadge( - value: 'This project' - ) - - if item.category is 'Groups' - @groupInputEl.val(item.id) - @addLocationBadge( - value: 'This group' - ) - - $el.removeClass('is-active') - @disableAutocomplete() - @searchInput.val('').focus() diff --git a/app/assets/javascripts/shortcuts.js b/app/assets/javascripts/shortcuts.js new file mode 100644 index 00000000000..3b28332854a --- /dev/null +++ b/app/assets/javascripts/shortcuts.js @@ -0,0 +1,97 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Shortcuts = (function() { + function Shortcuts(skipResetBindings) { + this.onToggleHelp = bind(this.onToggleHelp, this); + this.enabledHelp = []; + if (!skipResetBindings) { + Mousetrap.reset(); + } + Mousetrap.bind('?', this.onToggleHelp); + Mousetrap.bind('s', Shortcuts.focusSearch); + Mousetrap.bind('f', (function(_this) { + return function(e) { + return _this.focusFilter(e); + }; + })(this)); + Mousetrap.bind(['ctrl+shift+p', 'command+shift+p'], this.toggleMarkdownPreview); + if (typeof findFileURL !== "undefined" && findFileURL !== null) { + Mousetrap.bind('t', function() { + return Turbolinks.visit(findFileURL); + }); + } + } + + Shortcuts.prototype.onToggleHelp = function(e) { + e.preventDefault(); + return Shortcuts.toggleHelp(this.enabledHelp); + }; + + Shortcuts.prototype.toggleMarkdownPreview = function(e) { + return $(document).triggerHandler('markdown-preview:toggle', [e]); + }; + + Shortcuts.toggleHelp = function(location) { + var $modal; + $modal = $('#modal-shortcuts'); + if ($modal.length) { + $modal.modal('toggle'); + return; + } + return $.ajax({ + url: gon.shortcuts_path, + dataType: 'script', + success: function(e) { + var i, l, len, results; + if (location && location.length > 0) { + results = []; + for (i = 0, len = location.length; i < len; i++) { + l = location[i]; + results.push($(l).show()); + } + return results; + } else { + $('.hidden-shortcut').show(); + return $('.js-more-help-button').remove(); + } + } + }); + }; + + Shortcuts.prototype.focusFilter = function(e) { + if (this.filterInput == null) { + this.filterInput = $('input[type=search]', '.nav-controls'); + } + this.filterInput.focus(); + return e.preventDefault(); + }; + + Shortcuts.focusSearch = function(e) { + $('#search').focus(); + return e.preventDefault(); + }; + + return Shortcuts; + + })(); + + $(document).on('click.more_help', '.js-more-help-button', function(e) { + $(this).remove(); + $('.hidden-shortcut').show(); + return e.preventDefault(); + }); + + Mousetrap.stopCallback = (function() { + var defaultStopCallback; + defaultStopCallback = Mousetrap.stopCallback; + return function(e, element, combo) { + if (['ctrl+shift+p', 'command+shift+p'].indexOf(combo) !== -1) { + return false; + } else { + return defaultStopCallback.apply(this, arguments); + } + }; + })(); + +}).call(this); diff --git a/app/assets/javascripts/shortcuts.js.coffee b/app/assets/javascripts/shortcuts.js.coffee deleted file mode 100644 index 8c8689bacee..00000000000 --- a/app/assets/javascripts/shortcuts.js.coffee +++ /dev/null @@ -1,60 +0,0 @@ -class @Shortcuts - constructor: (skipResetBindings) -> - @enabledHelp = [] - Mousetrap.reset() if not skipResetBindings - Mousetrap.bind '?', @onToggleHelp - Mousetrap.bind 's', Shortcuts.focusSearch - Mousetrap.bind 'f', (e) => @focusFilter e - Mousetrap.bind ['ctrl+shift+p', 'command+shift+p'], @toggleMarkdownPreview - Mousetrap.bind('t', -> Turbolinks.visit(findFileURL)) if findFileURL? - - onToggleHelp: (e) => - e.preventDefault() - Shortcuts.toggleHelp(@enabledHelp) - - toggleMarkdownPreview: (e) -> - $(document).triggerHandler('markdown-preview:toggle', [e]) - - @toggleHelp: (location) -> - $modal = $('#modal-shortcuts') - - if $modal.length - $modal.modal('toggle') - return - - $.ajax( - url: gon.shortcuts_path, - dataType: 'script', - success: (e) -> - if location and location.length > 0 - $(l).show() for l in location - else - $('.hidden-shortcut').show() - $('.js-more-help-button').remove() - ) - - focusFilter: (e) -> - @filterInput ?= $('input[type=search]', '.nav-controls') - @filterInput.focus() - e.preventDefault() - - @focusSearch: (e) -> - $('#search').focus() - e.preventDefault() - - -$(document).on 'click.more_help', '.js-more-help-button', (e) -> - $(@).remove() - $('.hidden-shortcut').show() - e.preventDefault() - -Mousetrap.stopCallback = (-> - defaultStopCallback = Mousetrap.stopCallback - - return (e, element, combo) -> - # allowed shortcuts if textarea, input, contenteditable are focused - if ['ctrl+shift+p', 'command+shift+p'].indexOf(combo) != -1 - return false - else - return defaultStopCallback.apply(@, arguments) -)() diff --git a/app/assets/javascripts/shortcuts_blob.coffee b/app/assets/javascripts/shortcuts_blob.coffee deleted file mode 100644 index 6d21e5d1150..00000000000 --- a/app/assets/javascripts/shortcuts_blob.coffee +++ /dev/null @@ -1,10 +0,0 @@ -#= require shortcuts - -class @ShortcutsBlob extends Shortcuts - constructor: (skipResetBindings) -> - super skipResetBindings - Mousetrap.bind('y', ShortcutsBlob.copyToClipboard) - - @copyToClipboard: -> - clipboardButton = $('.btn-clipboard') - clipboardButton.click() if clipboardButton diff --git a/app/assets/javascripts/shortcuts_blob.js b/app/assets/javascripts/shortcuts_blob.js new file mode 100644 index 00000000000..b931eab638f --- /dev/null +++ b/app/assets/javascripts/shortcuts_blob.js @@ -0,0 +1,28 @@ + +/*= require shortcuts */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.ShortcutsBlob = (function(superClass) { + extend(ShortcutsBlob, superClass); + + function ShortcutsBlob(skipResetBindings) { + ShortcutsBlob.__super__.constructor.call(this, skipResetBindings); + Mousetrap.bind('y', ShortcutsBlob.copyToClipboard); + } + + ShortcutsBlob.copyToClipboard = function() { + var clipboardButton; + clipboardButton = $('.btn-clipboard'); + if (clipboardButton) { + return clipboardButton.click(); + } + }; + + return ShortcutsBlob; + + })(Shortcuts); + +}).call(this); diff --git a/app/assets/javascripts/shortcuts_dashboard_navigation.js b/app/assets/javascripts/shortcuts_dashboard_navigation.js new file mode 100644 index 00000000000..f7492a2aa5c --- /dev/null +++ b/app/assets/javascripts/shortcuts_dashboard_navigation.js @@ -0,0 +1,39 @@ + +/*= require shortcuts */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.ShortcutsDashboardNavigation = (function(superClass) { + extend(ShortcutsDashboardNavigation, superClass); + + function ShortcutsDashboardNavigation() { + ShortcutsDashboardNavigation.__super__.constructor.call(this); + Mousetrap.bind('g a', function() { + return ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-activity'); + }); + Mousetrap.bind('g i', function() { + return ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-issues'); + }); + Mousetrap.bind('g m', function() { + return ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-merge_requests'); + }); + Mousetrap.bind('g p', function() { + return ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-projects'); + }); + } + + ShortcutsDashboardNavigation.findAndFollowLink = function(selector) { + var link; + link = $(selector).attr('href'); + if (link) { + return window.location = link; + } + }; + + return ShortcutsDashboardNavigation; + + })(Shortcuts); + +}).call(this); diff --git a/app/assets/javascripts/shortcuts_dashboard_navigation.js.coffee b/app/assets/javascripts/shortcuts_dashboard_navigation.js.coffee deleted file mode 100644 index cca2b8a1fcc..00000000000 --- a/app/assets/javascripts/shortcuts_dashboard_navigation.js.coffee +++ /dev/null @@ -1,14 +0,0 @@ -#= require shortcuts - -class @ShortcutsDashboardNavigation extends Shortcuts - constructor: -> - super() - Mousetrap.bind('g a', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-activity')) - Mousetrap.bind('g i', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-issues')) - Mousetrap.bind('g m', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-merge_requests')) - Mousetrap.bind('g p', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-projects')) - - @findAndFollowLink: (selector) -> - link = $(selector).attr('href') - if link - window.location = link diff --git a/app/assets/javascripts/shortcuts_find_file.js b/app/assets/javascripts/shortcuts_find_file.js new file mode 100644 index 00000000000..6c78914d338 --- /dev/null +++ b/app/assets/javascripts/shortcuts_find_file.js @@ -0,0 +1,35 @@ + +/*= require shortcuts_navigation */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.ShortcutsFindFile = (function(superClass) { + extend(ShortcutsFindFile, superClass); + + function ShortcutsFindFile(projectFindFile) { + var _oldStopCallback; + this.projectFindFile = projectFindFile; + ShortcutsFindFile.__super__.constructor.call(this); + _oldStopCallback = Mousetrap.stopCallback; + Mousetrap.stopCallback = (function(_this) { + return function(event, element, combo) { + if (element === _this.projectFindFile.inputElement[0] && (combo === 'up' || combo === 'down' || combo === 'esc' || combo === 'enter')) { + event.preventDefault(); + return false; + } + return _oldStopCallback(event, element, combo); + }; + })(this); + Mousetrap.bind('up', this.projectFindFile.selectRowUp); + Mousetrap.bind('down', this.projectFindFile.selectRowDown); + Mousetrap.bind('esc', this.projectFindFile.goToTree); + Mousetrap.bind('enter', this.projectFindFile.goToBlob); + } + + return ShortcutsFindFile; + + })(ShortcutsNavigation); + +}).call(this); diff --git a/app/assets/javascripts/shortcuts_find_file.js.coffee b/app/assets/javascripts/shortcuts_find_file.js.coffee deleted file mode 100644 index 311e80bae19..00000000000 --- a/app/assets/javascripts/shortcuts_find_file.js.coffee +++ /dev/null @@ -1,19 +0,0 @@ -#= require shortcuts_navigation - -class @ShortcutsFindFile extends ShortcutsNavigation - constructor: (@projectFindFile) -> - super() - _oldStopCallback = Mousetrap.stopCallback - # override to fire shortcuts action when focus in textbox - Mousetrap.stopCallback = (event, element, combo) => - if element == @projectFindFile.inputElement[0] and (combo == 'up' or combo == 'down' or combo == 'esc' or combo == 'enter') - # when press up/down key in textbox, cusor prevent to move to home/end - event.preventDefault() - return false - - return _oldStopCallback(event, element, combo) - - Mousetrap.bind('up', @projectFindFile.selectRowUp) - Mousetrap.bind('down', @projectFindFile.selectRowDown) - Mousetrap.bind('esc', @projectFindFile.goToTree) - Mousetrap.bind('enter', @projectFindFile.goToBlob) diff --git a/app/assets/javascripts/shortcuts_issuable.coffee b/app/assets/javascripts/shortcuts_issuable.coffee deleted file mode 100644 index c93bcf3ceec..00000000000 --- a/app/assets/javascripts/shortcuts_issuable.coffee +++ /dev/null @@ -1,53 +0,0 @@ -#= require mousetrap -#= require shortcuts_navigation - -class @ShortcutsIssuable extends ShortcutsNavigation - constructor: (isMergeRequest) -> - super() - Mousetrap.bind('a', @openSidebarDropdown.bind(@, 'assignee')) - Mousetrap.bind('m', @openSidebarDropdown.bind(@, 'milestone')) - Mousetrap.bind('r', => - @replyWithSelectedText() - return false - ) - Mousetrap.bind('e', => - @editIssue() - return false - ) - Mousetrap.bind('l', @openSidebarDropdown.bind(@, 'labels')) - - if isMergeRequest - @enabledHelp.push('.hidden-shortcut.merge_requests') - else - @enabledHelp.push('.hidden-shortcut.issues') - - replyWithSelectedText: -> - if window.getSelection - selected = window.getSelection().toString() - replyField = $('.js-main-target-form #note_note') - - return if selected.trim() == "" - - # Put a '>' character before each non-empty line in the selection - quote = _.map selected.split("\n"), (val) -> - "> #{val}\n" if val.trim() != '' - - # If replyField already has some content, add a newline before our quote - separator = replyField.val().trim() != "" and "\n" or '' - - replyField.val (_, current) -> - current + separator + quote.join('') + "\n" - - # Trigger autosave for the added text - replyField.trigger('input') - - # Focus the input field - replyField.focus() - - editIssue: -> - $editBtn = $('.issuable-edit') - Turbolinks.visit($editBtn.attr('href')) - - openSidebarDropdown: (name) -> - sidebar.openDropdown(name) - return false diff --git a/app/assets/javascripts/shortcuts_issuable.js b/app/assets/javascripts/shortcuts_issuable.js new file mode 100644 index 00000000000..3f3a8a9dfd9 --- /dev/null +++ b/app/assets/javascripts/shortcuts_issuable.js @@ -0,0 +1,75 @@ + +/*= require mousetrap */ + + +/*= require shortcuts_navigation */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.ShortcutsIssuable = (function(superClass) { + extend(ShortcutsIssuable, superClass); + + function ShortcutsIssuable(isMergeRequest) { + ShortcutsIssuable.__super__.constructor.call(this); + Mousetrap.bind('a', this.openSidebarDropdown.bind(this, 'assignee')); + Mousetrap.bind('m', this.openSidebarDropdown.bind(this, 'milestone')); + Mousetrap.bind('r', (function(_this) { + return function() { + _this.replyWithSelectedText(); + return false; + }; + })(this)); + Mousetrap.bind('e', (function(_this) { + return function() { + _this.editIssue(); + return false; + }; + })(this)); + Mousetrap.bind('l', this.openSidebarDropdown.bind(this, 'labels')); + if (isMergeRequest) { + this.enabledHelp.push('.hidden-shortcut.merge_requests'); + } else { + this.enabledHelp.push('.hidden-shortcut.issues'); + } + } + + ShortcutsIssuable.prototype.replyWithSelectedText = function() { + var quote, replyField, selected, separator; + if (window.getSelection) { + selected = window.getSelection().toString(); + replyField = $('.js-main-target-form #note_note'); + if (selected.trim() === "") { + return; + } + quote = _.map(selected.split("\n"), function(val) { + if (val.trim() !== '') { + return "> " + val + "\n"; + } + }); + separator = replyField.val().trim() !== "" && "\n" || ''; + replyField.val(function(_, current) { + return current + separator + quote.join('') + "\n"; + }); + replyField.trigger('input'); + return replyField.focus(); + } + }; + + ShortcutsIssuable.prototype.editIssue = function() { + var $editBtn; + $editBtn = $('.issuable-edit'); + return Turbolinks.visit($editBtn.attr('href')); + }; + + ShortcutsIssuable.prototype.openSidebarDropdown = function(name) { + sidebar.openDropdown(name); + return false; + }; + + return ShortcutsIssuable; + + })(ShortcutsNavigation); + +}).call(this); diff --git a/app/assets/javascripts/shortcuts_navigation.coffee b/app/assets/javascripts/shortcuts_navigation.coffee deleted file mode 100644 index f39504e0645..00000000000 --- a/app/assets/javascripts/shortcuts_navigation.coffee +++ /dev/null @@ -1,23 +0,0 @@ -#= require shortcuts - -class @ShortcutsNavigation extends Shortcuts - constructor: -> - super() - Mousetrap.bind('g p', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-project')) - Mousetrap.bind('g e', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-project-activity')) - Mousetrap.bind('g f', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-tree')) - Mousetrap.bind('g c', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-commits')) - Mousetrap.bind('g b', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-builds')) - Mousetrap.bind('g n', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-network')) - Mousetrap.bind('g g', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-graphs')) - Mousetrap.bind('g i', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-issues')) - Mousetrap.bind('g m', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-merge_requests')) - Mousetrap.bind('g w', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-wiki')) - Mousetrap.bind('g s', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-snippets')) - Mousetrap.bind('i', -> ShortcutsNavigation.findAndFollowLink('.shortcuts-new-issue')) - @enabledHelp.push('.hidden-shortcut.project') - - @findAndFollowLink: (selector) -> - link = $(selector).attr('href') - if link - window.location = link diff --git a/app/assets/javascripts/shortcuts_navigation.js b/app/assets/javascripts/shortcuts_navigation.js new file mode 100644 index 00000000000..469e25482bb --- /dev/null +++ b/app/assets/javascripts/shortcuts_navigation.js @@ -0,0 +1,64 @@ + +/*= require shortcuts */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.ShortcutsNavigation = (function(superClass) { + extend(ShortcutsNavigation, superClass); + + function ShortcutsNavigation() { + ShortcutsNavigation.__super__.constructor.call(this); + Mousetrap.bind('g p', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-project'); + }); + Mousetrap.bind('g e', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-project-activity'); + }); + Mousetrap.bind('g f', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-tree'); + }); + Mousetrap.bind('g c', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-commits'); + }); + Mousetrap.bind('g b', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-builds'); + }); + Mousetrap.bind('g n', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-network'); + }); + Mousetrap.bind('g g', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-graphs'); + }); + Mousetrap.bind('g i', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-issues'); + }); + Mousetrap.bind('g m', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-merge_requests'); + }); + Mousetrap.bind('g w', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-wiki'); + }); + Mousetrap.bind('g s', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-snippets'); + }); + Mousetrap.bind('i', function() { + return ShortcutsNavigation.findAndFollowLink('.shortcuts-new-issue'); + }); + this.enabledHelp.push('.hidden-shortcut.project'); + } + + ShortcutsNavigation.findAndFollowLink = function(selector) { + var link; + link = $(selector).attr('href'); + if (link) { + return window.location = link; + } + }; + + return ShortcutsNavigation; + + })(Shortcuts); + +}).call(this); diff --git a/app/assets/javascripts/shortcuts_network.js b/app/assets/javascripts/shortcuts_network.js new file mode 100644 index 00000000000..fb2b39e757e --- /dev/null +++ b/app/assets/javascripts/shortcuts_network.js @@ -0,0 +1,27 @@ + +/*= require shortcuts_navigation */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + this.ShortcutsNetwork = (function(superClass) { + extend(ShortcutsNetwork, superClass); + + function ShortcutsNetwork(graph) { + this.graph = graph; + ShortcutsNetwork.__super__.constructor.call(this); + Mousetrap.bind(['left', 'h'], this.graph.scrollLeft); + Mousetrap.bind(['right', 'l'], this.graph.scrollRight); + Mousetrap.bind(['up', 'k'], this.graph.scrollUp); + Mousetrap.bind(['down', 'j'], this.graph.scrollDown); + Mousetrap.bind(['shift+up', 'shift+k'], this.graph.scrollTop); + Mousetrap.bind(['shift+down', 'shift+j'], this.graph.scrollBottom); + this.enabledHelp.push('.hidden-shortcut.network'); + } + + return ShortcutsNetwork; + + })(ShortcutsNavigation); + +}).call(this); diff --git a/app/assets/javascripts/shortcuts_network.js.coffee b/app/assets/javascripts/shortcuts_network.js.coffee deleted file mode 100644 index cc95ad7ebfe..00000000000 --- a/app/assets/javascripts/shortcuts_network.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -#= require shortcuts_navigation - -class @ShortcutsNetwork extends ShortcutsNavigation - constructor: (@graph) -> - super() - Mousetrap.bind(['left', 'h'], @graph.scrollLeft) - Mousetrap.bind(['right', 'l'], @graph.scrollRight) - Mousetrap.bind(['up', 'k'], @graph.scrollUp) - Mousetrap.bind(['down', 'j'], @graph.scrollDown) - Mousetrap.bind(['shift+up', 'shift+k'], @graph.scrollTop) - Mousetrap.bind(['shift+down', 'shift+j'], @graph.scrollBottom) - @enabledHelp.push('.hidden-shortcut.network') diff --git a/app/assets/javascripts/sidebar.js b/app/assets/javascripts/sidebar.js new file mode 100644 index 00000000000..bd0c1194b36 --- /dev/null +++ b/app/assets/javascripts/sidebar.js @@ -0,0 +1,41 @@ +(function() { + var collapsed, expanded, toggleSidebar; + + collapsed = 'page-sidebar-collapsed'; + + expanded = 'page-sidebar-expanded'; + + toggleSidebar = function() { + $('.page-with-sidebar').toggleClass(collapsed + " " + expanded); + $('.navbar-fixed-top').toggleClass("header-collapsed header-expanded"); + if ($.cookie('pin_nav') === 'true') { + $('.navbar-fixed-top').toggleClass('header-pinned-nav'); + $('.page-with-sidebar').toggleClass('page-sidebar-pinned'); + } + return setTimeout((function() { + var niceScrollBars; + niceScrollBars = $('.nav-sidebar').niceScroll(); + return niceScrollBars.updateScrollBar(); + }), 300); + }; + + $(document).off('click', 'body').on('click', 'body', function(e) { + var $nav, $target, $toggle, pageExpanded; + if ($.cookie('pin_nav') !== 'true') { + $target = $(e.target); + $nav = $target.closest('.sidebar-wrapper'); + pageExpanded = $('.page-with-sidebar').hasClass('page-sidebar-expanded'); + $toggle = $target.closest('.toggle-nav-collapse, .side-nav-toggle'); + if ($nav.length === 0 && pageExpanded && $toggle.length === 0) { + $('.page-with-sidebar').toggleClass('page-sidebar-collapsed page-sidebar-expanded'); + return $('.navbar-fixed-top').toggleClass('header-collapsed header-expanded'); + } + } + }); + + $(document).on("click", '.toggle-nav-collapse, .side-nav-toggle', function(e) { + e.preventDefault(); + return toggleSidebar(); + }); + +}).call(this); diff --git a/app/assets/javascripts/sidebar.js.coffee b/app/assets/javascripts/sidebar.js.coffee deleted file mode 100644 index 68009e58645..00000000000 --- a/app/assets/javascripts/sidebar.js.coffee +++ /dev/null @@ -1,37 +0,0 @@ -collapsed = 'page-sidebar-collapsed' -expanded = 'page-sidebar-expanded' - -toggleSidebar = -> - $('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}") - $('.navbar-fixed-top').toggleClass("header-collapsed header-expanded") - - if $.cookie('pin_nav') is 'true' - $('.navbar-fixed-top').toggleClass('header-pinned-nav') - $('.page-with-sidebar').toggleClass('page-sidebar-pinned') - - setTimeout ( -> - niceScrollBars = $('.nav-sidebar').niceScroll(); - niceScrollBars.updateScrollBar(); - ), 300 - -$(document) - .off 'click', 'body' - .on 'click', 'body', (e) -> - unless $.cookie('pin_nav') is 'true' - $target = $(e.target) - $nav = $target.closest('.sidebar-wrapper') - pageExpanded = $('.page-with-sidebar').hasClass('page-sidebar-expanded') - $toggle = $target.closest('.toggle-nav-collapse, .side-nav-toggle') - - if $nav.length is 0 and pageExpanded and $toggle.length is 0 - $('.page-with-sidebar') - .toggleClass('page-sidebar-collapsed page-sidebar-expanded') - - $('.navbar-fixed-top') - .toggleClass('header-collapsed header-expanded') - -$(document).on("click", '.toggle-nav-collapse, .side-nav-toggle', (e) -> - e.preventDefault() - - toggleSidebar() -) diff --git a/app/assets/javascripts/single_file_diff.js b/app/assets/javascripts/single_file_diff.js new file mode 100644 index 00000000000..b9ae497b0e5 --- /dev/null +++ b/app/assets/javascripts/single_file_diff.js @@ -0,0 +1,77 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.SingleFileDiff = (function() { + var COLLAPSED_HTML, ERROR_HTML, LOADING_HTML, WRAPPER; + + WRAPPER = '
                '; + + LOADING_HTML = ''; + + ERROR_HTML = '
                Could not load diff
                '; + + COLLAPSED_HTML = '
                This diff is collapsed. Click to expand it.
                '; + + function SingleFileDiff(file) { + this.file = file; + this.toggleDiff = bind(this.toggleDiff, this); + this.content = $('.diff-content', this.file); + this.diffForPath = this.content.find('[data-diff-for-path]').data('diff-for-path'); + this.isOpen = !this.diffForPath; + if (this.diffForPath) { + this.collapsedContent = this.content; + this.loadingContent = $(WRAPPER).addClass('loading').html(LOADING_HTML).hide(); + this.content = null; + this.collapsedContent.after(this.loadingContent); + } else { + this.collapsedContent = $(WRAPPER).html(COLLAPSED_HTML).hide(); + this.content.after(this.collapsedContent); + } + this.collapsedContent.on('click', this.toggleDiff); + $('.file-title > a', this.file).on('click', this.toggleDiff); + } + + SingleFileDiff.prototype.toggleDiff = function(e) { + this.isOpen = !this.isOpen; + if (!this.isOpen && !this.hasError) { + this.content.hide(); + return this.collapsedContent.show(); + } else if (this.content) { + this.collapsedContent.hide(); + return this.content.show(); + } else { + return this.getContentHTML(); + } + }; + + SingleFileDiff.prototype.getContentHTML = function() { + this.collapsedContent.hide(); + this.loadingContent.show(); + $.get(this.diffForPath, (function(_this) { + return function(data) { + _this.loadingContent.hide(); + if (data.html) { + _this.content = $(data.html); + _this.content.syntaxHighlight(); + } else { + _this.hasError = true; + _this.content = $(ERROR_HTML); + } + return _this.collapsedContent.after(_this.content); + }; + })(this)); + }; + + return SingleFileDiff; + + })(); + + $.fn.singleFileDiff = function() { + return this.each(function() { + if (!$.data(this, 'singleFileDiff')) { + return $.data(this, 'singleFileDiff', new SingleFileDiff(this)); + } + }); + }; + +}).call(this); diff --git a/app/assets/javascripts/single_file_diff.js.coffee b/app/assets/javascripts/single_file_diff.js.coffee deleted file mode 100644 index f3e225c3728..00000000000 --- a/app/assets/javascripts/single_file_diff.js.coffee +++ /dev/null @@ -1,54 +0,0 @@ -class @SingleFileDiff - - WRAPPER = '
                ' - LOADING_HTML = '' - ERROR_HTML = '
                Could not load diff
                ' - COLLAPSED_HTML = '
                This diff is collapsed. Click to expand it.
                ' - - constructor: (@file) -> - @content = $('.diff-content', @file) - @diffForPath = @content.find('[data-diff-for-path]').data 'diff-for-path' - @isOpen = !@diffForPath - - if @diffForPath - @collapsedContent = @content - @loadingContent = $(WRAPPER).addClass('loading').html(LOADING_HTML).hide() - @content = null - @collapsedContent.after(@loadingContent) - else - @collapsedContent = $(WRAPPER).html(COLLAPSED_HTML).hide() - @content.after(@collapsedContent) - - @collapsedContent.on 'click', @toggleDiff - - $('.file-title > a', @file).on 'click', @toggleDiff - - toggleDiff: (e) => - @isOpen = !@isOpen - if not @isOpen and not @hasError - @content.hide() - @collapsedContent.show() - else if @content - @collapsedContent.hide() - @content.show() - else - @getContentHTML() - - getContentHTML: -> - @collapsedContent.hide() - @loadingContent.show() - $.get @diffForPath, (data) => - @loadingContent.hide() - if data.html - @content = $(data.html) - @content.syntaxHighlight() - else - @hasError = true - @content = $(ERROR_HTML) - @collapsedContent.after(@content) - return - -$.fn.singleFileDiff = -> - return @each -> - if not $.data this, 'singleFileDiff' - $.data this, 'singleFileDiff', new SingleFileDiff this diff --git a/app/assets/javascripts/star.js b/app/assets/javascripts/star.js new file mode 100644 index 00000000000..10509313c12 --- /dev/null +++ b/app/assets/javascripts/star.js @@ -0,0 +1,31 @@ +(function() { + this.Star = (function() { + function Star() { + $('.project-home-panel .toggle-star').on('ajax:success', function(e, data, status, xhr) { + var $starIcon, $starSpan, $this, toggleStar; + $this = $(this); + $starSpan = $this.find('span'); + $starIcon = $this.find('i'); + toggleStar = function(isStarred) { + $this.parent().find('.star-count').text(data.star_count); + if (isStarred) { + $starSpan.removeClass('starred').text('Star'); + gl.utils.updateTooltipTitle($this, 'Star project'); + $starIcon.removeClass('fa-star').addClass('fa-star-o'); + } else { + $starSpan.addClass('starred').text('Unstar'); + gl.utils.updateTooltipTitle($this, 'Unstar project'); + $starIcon.removeClass('fa-star-o').addClass('fa-star'); + } + }; + toggleStar($starSpan.hasClass('starred')); + }).on('ajax:error', function(e, xhr, status, error) { + new Flash('Star toggle failed. Try again later.', 'alert'); + }); + } + + return Star; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/star.js.coffee b/app/assets/javascripts/star.js.coffee deleted file mode 100644 index 01b28171f72..00000000000 --- a/app/assets/javascripts/star.js.coffee +++ /dev/null @@ -1,24 +0,0 @@ -class @Star - constructor: -> - $('.project-home-panel .toggle-star').on('ajax:success', (e, data, status, xhr) -> - $this = $(this) - $starSpan = $this.find('span') - $starIcon = $this.find('i') - - toggleStar = (isStarred) -> - $this.parent().find('.star-count').text data.star_count - if isStarred - $starSpan.removeClass('starred').text 'Star' - gl.utils.updateTooltipTitle $this, 'Star project' - $starIcon.removeClass('fa-star').addClass 'fa-star-o' - else - $starSpan.addClass('starred').text 'Unstar' - gl.utils.updateTooltipTitle $this, 'Unstar project' - $starIcon.removeClass('fa-star-o').addClass 'fa-star' - return - - toggleStar $starSpan.hasClass('starred') - return - ).on 'ajax:error', (e, xhr, status, error) -> - new Flash('Star toggle failed. Try again later.', 'alert') - return diff --git a/app/assets/javascripts/subscription.js b/app/assets/javascripts/subscription.js new file mode 100644 index 00000000000..5e3c5983d75 --- /dev/null +++ b/app/assets/javascripts/subscription.js @@ -0,0 +1,41 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Subscription = (function() { + function Subscription(container) { + this.toggleSubscription = bind(this.toggleSubscription, this); + var $container; + $container = $(container); + this.url = $container.attr('data-url'); + this.subscribe_button = $container.find('.js-subscribe-button'); + this.subscription_status = $container.find('.subscription-status'); + this.subscribe_button.unbind('click').click(this.toggleSubscription); + } + + Subscription.prototype.toggleSubscription = function(event) { + var action, btn, current_status; + btn = $(event.currentTarget); + action = btn.find('span').text(); + current_status = this.subscription_status.attr('data-status'); + btn.addClass('disabled'); + return $.post(this.url, (function(_this) { + return function() { + var status; + btn.removeClass('disabled'); + status = current_status === 'subscribed' ? 'unsubscribed' : 'subscribed'; + _this.subscription_status.attr('data-status', status); + action = status === 'subscribed' ? 'Unsubscribe' : 'Subscribe'; + btn.find('span').text(action); + _this.subscription_status.find('>div').toggleClass('hidden'); + if (btn.attr('data-original-title')) { + return btn.tooltip('hide').attr('data-original-title', action).tooltip('fixTitle'); + } + }; + })(this)); + }; + + return Subscription; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/subscription.js.coffee b/app/assets/javascripts/subscription.js.coffee deleted file mode 100644 index 08d494aba9f..00000000000 --- a/app/assets/javascripts/subscription.js.coffee +++ /dev/null @@ -1,26 +0,0 @@ -class @Subscription - constructor: (container) -> - $container = $(container) - @url = $container.attr('data-url') - @subscribe_button = $container.find('.js-subscribe-button') - @subscription_status = $container.find('.subscription-status') - @subscribe_button.unbind('click').click(@toggleSubscription) - - toggleSubscription: (event) => - btn = $(event.currentTarget) - action = btn.find('span').text() - current_status = @subscription_status.attr('data-status') - btn.addClass('disabled') - - $.post @url, => - btn.removeClass('disabled') - status = if current_status == 'subscribed' then 'unsubscribed' else 'subscribed' - @subscription_status.attr('data-status', status) - action = if status == 'subscribed' then 'Unsubscribe' else 'Subscribe' - btn.find('span').text(action) - @subscription_status.find('>div').toggleClass('hidden') - - if btn.attr('data-original-title') - btn.tooltip('hide') - .attr('data-original-title', action) - .tooltip('fixTitle') diff --git a/app/assets/javascripts/subscription_select.js b/app/assets/javascripts/subscription_select.js new file mode 100644 index 00000000000..d6c219603d1 --- /dev/null +++ b/app/assets/javascripts/subscription_select.js @@ -0,0 +1,35 @@ +(function() { + this.SubscriptionSelect = (function() { + function SubscriptionSelect() { + $('.js-subscription-event').each(function(i, el) { + var fieldName; + fieldName = $(el).data("field-name"); + return $(el).glDropdown({ + selectable: true, + fieldName: fieldName, + toggleLabel: (function(_this) { + return function(selected, el, instance) { + var $item, label; + label = 'Subscription'; + $item = instance.dropdown.find('.is-active'); + if ($item.length) { + label = $item.text(); + } + return label; + }; + })(this), + clicked: function(item, $el, e) { + return e.preventDefault(); + }, + id: function(obj, el) { + return $(el).data("id"); + } + }); + }); + } + + return SubscriptionSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/subscription_select.js.coffee b/app/assets/javascripts/subscription_select.js.coffee deleted file mode 100644 index e5eb7a50d80..00000000000 --- a/app/assets/javascripts/subscription_select.js.coffee +++ /dev/null @@ -1,18 +0,0 @@ -class @SubscriptionSelect - constructor: -> - $('.js-subscription-event').each (i, el) -> - fieldName = $(el).data("field-name") - - $(el).glDropdown( - selectable: true - fieldName: fieldName - toggleLabel: (selected, el, instance) => - label = 'Subscription' - $item = instance.dropdown.find('.is-active') - label = $item.text() if $item.length - label - clicked: (item, $el, e)-> - e.preventDefault() - id: (obj, el) -> - $(el).data("id") - ) diff --git a/app/assets/javascripts/syntax_highlight.coffee b/app/assets/javascripts/syntax_highlight.coffee deleted file mode 100644 index 980f0232d10..00000000000 --- a/app/assets/javascripts/syntax_highlight.coffee +++ /dev/null @@ -1,20 +0,0 @@ -# Syntax Highlighter -# -# Applies a syntax highlighting color scheme CSS class to any element with the -# `js-syntax-highlight` class -# -# ### Example Markup -# -#
                -# -$.fn.syntaxHighlight = -> - if $(this).hasClass('js-syntax-highlight') - # Given the element itself, apply highlighting - $(this).addClass(gon.user_color_scheme) - else - # Given a parent element, recurse to any of its applicable children - $children = $(this).find('.js-syntax-highlight') - $children.syntaxHighlight() if $children.length - -$(document).on 'ready page:load', -> - $('.js-syntax-highlight').syntaxHighlight() diff --git a/app/assets/javascripts/syntax_highlight.js b/app/assets/javascripts/syntax_highlight.js new file mode 100644 index 00000000000..dba62638c78 --- /dev/null +++ b/app/assets/javascripts/syntax_highlight.js @@ -0,0 +1,18 @@ +(function() { + $.fn.syntaxHighlight = function() { + var $children; + if ($(this).hasClass('js-syntax-highlight')) { + return $(this).addClass(gon.user_color_scheme); + } else { + $children = $(this).find('.js-syntax-highlight'); + if ($children.length) { + return $children.syntaxHighlight(); + } + } + }; + + $(document).on('ready page:load', function() { + return $('.js-syntax-highlight').syntaxHighlight(); + }); + +}).call(this); diff --git a/app/assets/javascripts/todos.js b/app/assets/javascripts/todos.js new file mode 100644 index 00000000000..6e677fa8cc6 --- /dev/null +++ b/app/assets/javascripts/todos.js @@ -0,0 +1,144 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Todos = (function() { + function Todos(opts) { + var ref; + if (opts == null) { + opts = {}; + } + this.allDoneClicked = bind(this.allDoneClicked, this); + this.doneClicked = bind(this.doneClicked, this); + this.el = (ref = opts.el) != null ? ref : $('.js-todos-options'); + this.perPage = this.el.data('perPage'); + this.clearListeners(); + this.initBtnListeners(); + } + + Todos.prototype.clearListeners = function() { + $('.done-todo').off('click'); + $('.js-todos-mark-all').off('click'); + return $('.todo').off('click'); + }; + + Todos.prototype.initBtnListeners = function() { + $('.done-todo').on('click', this.doneClicked); + $('.js-todos-mark-all').on('click', this.allDoneClicked); + return $('.todo').on('click', this.goToTodoUrl); + }; + + Todos.prototype.doneClicked = function(e) { + var $this; + e.preventDefault(); + e.stopImmediatePropagation(); + $this = $(e.currentTarget); + $this.disable(); + return $.ajax({ + type: 'POST', + url: $this.attr('href'), + dataType: 'json', + data: { + '_method': 'delete' + }, + success: (function(_this) { + return function(data) { + _this.redirectIfNeeded(data.count); + _this.clearDone($this.closest('li')); + return _this.updateBadges(data); + }; + })(this) + }); + }; + + Todos.prototype.allDoneClicked = function(e) { + var $this; + e.preventDefault(); + e.stopImmediatePropagation(); + $this = $(e.currentTarget); + $this.disable(); + return $.ajax({ + type: 'POST', + url: $this.attr('href'), + dataType: 'json', + data: { + '_method': 'delete' + }, + success: (function(_this) { + return function(data) { + $this.remove(); + $('.js-todos-list').remove(); + return _this.updateBadges(data); + }; + })(this) + }); + }; + + Todos.prototype.clearDone = function($row) { + var $ul; + $ul = $row.closest('ul'); + $row.remove(); + if (!$ul.find('li').length) { + return $ul.parents('.panel').remove(); + } + }; + + Todos.prototype.updateBadges = function(data) { + $('.todos-pending .badge, .todos-pending-count').text(data.count); + return $('.todos-done .badge').text(data.done_count); + }; + + Todos.prototype.getTotalPages = function() { + return this.el.data('totalPages'); + }; + + Todos.prototype.getCurrentPage = function() { + return this.el.data('currentPage'); + }; + + Todos.prototype.getTodosPerPage = function() { + return this.el.data('perPage'); + }; + + Todos.prototype.redirectIfNeeded = function(total) { + var currPage, currPages, newPages, pageParams, url; + currPages = this.getTotalPages(); + currPage = this.getCurrentPage(); + if (!total) { + location.reload(); + return; + } + if (!currPages) { + return; + } + newPages = Math.ceil(total / this.getTodosPerPage()); + url = location.href; + if (newPages !== currPages) { + if (currPages > 1 && currPage === currPages) { + pageParams = { + page: currPages - 1 + }; + url = gl.utils.mergeUrlParams(pageParams, url); + } + return Turbolinks.visit(url); + } + }; + + Todos.prototype.goToTodoUrl = function(e) { + var todoLink; + todoLink = $(this).data('url'); + if (!todoLink) { + return; + } + if (e.metaKey || e.which === 2) { + e.preventDefault(); + return window.open(todoLink, '_blank'); + } else { + return Turbolinks.visit(todoLink); + } + }; + + return Todos; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/todos.js.coffee b/app/assets/javascripts/todos.js.coffee deleted file mode 100644 index 10bef96f43d..00000000000 --- a/app/assets/javascripts/todos.js.coffee +++ /dev/null @@ -1,110 +0,0 @@ -class @Todos - constructor: (opts = {}) -> - { - @el = $('.js-todos-options') - } = opts - - @perPage = @el.data('perPage') - - @clearListeners() - @initBtnListeners() - - clearListeners: -> - $('.done-todo').off('click') - $('.js-todos-mark-all').off('click') - $('.todo').off('click') - - initBtnListeners: -> - $('.done-todo').on('click', @doneClicked) - $('.js-todos-mark-all').on('click', @allDoneClicked) - $('.todo').on('click', @goToTodoUrl) - - doneClicked: (e) => - e.preventDefault() - e.stopImmediatePropagation() - - $this = $(e.currentTarget) - $this.disable() - - $.ajax - type: 'POST' - url: $this.attr('href') - dataType: 'json' - data: '_method': 'delete' - success: (data) => - @redirectIfNeeded data.count - @clearDone $this.closest('li') - @updateBadges data - - allDoneClicked: (e) => - e.preventDefault() - e.stopImmediatePropagation() - - $this = $(e.currentTarget) - $this.disable() - - $.ajax - type: 'POST' - url: $this.attr('href') - dataType: 'json' - data: '_method': 'delete' - success: (data) => - $this.remove() - $('.js-todos-list').remove() - @updateBadges data - - clearDone: ($row) -> - $ul = $row.closest('ul') - $row.remove() - - if not $ul.find('li').length - $ul.parents('.panel').remove() - - updateBadges: (data) -> - $('.todos-pending .badge, .todos-pending-count').text data.count - $('.todos-done .badge').text data.done_count - - getTotalPages: -> - @el.data('totalPages') - - getCurrentPage: -> - @el.data('currentPage') - - getTodosPerPage: -> - @el.data('perPage') - - redirectIfNeeded: (total) -> - currPages = @getTotalPages() - currPage = @getCurrentPage() - - # Refresh if no remaining Todos - if not total - location.reload() - return - - # Do nothing if no pagination - return if not currPages - - newPages = Math.ceil(total / @getTodosPerPage()) - url = location.href # Includes query strings - - # If new total of pages is different than we have now - if newPages isnt currPages - # Redirect to previous page if there's one available - if currPages > 1 and currPage is currPages - pageParams = - page: currPages - 1 - url = gl.utils.mergeUrlParams(pageParams, url) - - Turbolinks.visit(url) - - goToTodoUrl: (e)-> - todoLink = $(this).data('url') - return unless todoLink - - # Allow Meta-Click or Mouse3-click to open in a new tab - if e.metaKey or e.which is 2 - e.preventDefault() - window.open(todoLink,'_blank') - else - Turbolinks.visit(todoLink) diff --git a/app/assets/javascripts/tree.js b/app/assets/javascripts/tree.js new file mode 100644 index 00000000000..78e159a7ed9 --- /dev/null +++ b/app/assets/javascripts/tree.js @@ -0,0 +1,65 @@ +(function() { + this.TreeView = (function() { + function TreeView() { + this.initKeyNav(); + $(".tree-content-holder .tree-item").on('click', function(e) { + var $clickedEl, path; + $clickedEl = $(e.target); + path = $('.tree-item-file-name a', this).attr('href'); + if (!$clickedEl.is('a') && !$clickedEl.is('.str-truncated')) { + if (e.metaKey || e.which === 2) { + e.preventDefault(); + return window.open(path, '_blank'); + } else { + return Turbolinks.visit(path); + } + } + }); + $('span.log_loading:first').removeClass('hide'); + } + + TreeView.prototype.initKeyNav = function() { + var li, liSelected; + li = $("tr.tree-item"); + liSelected = null; + return $('body').keydown(function(e) { + var next, path; + if ($("input:focus").length > 0 && (e.which === 38 || e.which === 40)) { + return false; + } + if (e.which === 40) { + if (liSelected) { + next = liSelected.next(); + if (next.length > 0) { + liSelected.removeClass("selected"); + liSelected = next.addClass("selected"); + } + } else { + liSelected = li.eq(0).addClass("selected"); + } + return $(liSelected).focus(); + } else if (e.which === 38) { + if (liSelected) { + next = liSelected.prev(); + if (next.length > 0) { + liSelected.removeClass("selected"); + liSelected = next.addClass("selected"); + } + } else { + liSelected = li.last().addClass("selected"); + } + return $(liSelected).focus(); + } else if (e.which === 13) { + path = $('.tree-item.selected .tree-item-file-name a').attr('href'); + if (path) { + return Turbolinks.visit(path); + } + } + }); + }; + + return TreeView; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/tree.js.coffee b/app/assets/javascripts/tree.js.coffee deleted file mode 100644 index 83de584f2d9..00000000000 --- a/app/assets/javascripts/tree.js.coffee +++ /dev/null @@ -1,50 +0,0 @@ -class @TreeView - constructor: -> - @initKeyNav() - - # Code browser tree slider - # Make the entire tree-item row clickable, but not if clicking another link (like a commit message) - $(".tree-content-holder .tree-item").on 'click', (e) -> - $clickedEl = $(e.target) - path = $('.tree-item-file-name a', this).attr('href') - - if not $clickedEl.is('a') and not $clickedEl.is('.str-truncated') - if e.metaKey or e.which is 2 - e.preventDefault() - window.open path, '_blank' - else - Turbolinks.visit path - - # Show the "Loading commit data" for only the first element - $('span.log_loading:first').removeClass('hide') - - initKeyNav: -> - li = $("tr.tree-item") - liSelected = null - $('body').keydown (e) -> - if $("input:focus").length > 0 && (e.which == 38 || e.which == 40) - return false - - if e.which is 40 - if liSelected - next = liSelected.next() - if next.length > 0 - liSelected.removeClass "selected" - liSelected = next.addClass("selected") - else - liSelected = li.eq(0).addClass("selected") - - $(liSelected).focus() - else if e.which is 38 - if liSelected - next = liSelected.prev() - if next.length > 0 - liSelected.removeClass "selected" - liSelected = next.addClass("selected") - else - liSelected = li.last().addClass("selected") - - $(liSelected).focus() - else if e.which is 13 - path = $('.tree-item.selected .tree-item-file-name a').attr('href') - if path then Turbolinks.visit(path) diff --git a/app/assets/javascripts/u2f/authenticate.js b/app/assets/javascripts/u2f/authenticate.js new file mode 100644 index 00000000000..9ba847fb0c2 --- /dev/null +++ b/app/assets/javascripts/u2f/authenticate.js @@ -0,0 +1,89 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.U2FAuthenticate = (function() { + function U2FAuthenticate(container, u2fParams) { + this.container = container; + this.renderNotSupported = bind(this.renderNotSupported, this); + this.renderAuthenticated = bind(this.renderAuthenticated, this); + this.renderError = bind(this.renderError, this); + this.renderInProgress = bind(this.renderInProgress, this); + this.renderSetup = bind(this.renderSetup, this); + this.renderTemplate = bind(this.renderTemplate, this); + this.authenticate = bind(this.authenticate, this); + this.start = bind(this.start, this); + this.appId = u2fParams.app_id; + this.challenge = u2fParams.challenge; + this.signRequests = u2fParams.sign_requests.map(function(request) { + return _(request).omit('challenge'); + }); + } + + U2FAuthenticate.prototype.start = function() { + if (U2FUtil.isU2FSupported()) { + return this.renderSetup(); + } else { + return this.renderNotSupported(); + } + }; + + U2FAuthenticate.prototype.authenticate = function() { + return u2f.sign(this.appId, this.challenge, this.signRequests, (function(_this) { + return function(response) { + var error; + if (response.errorCode) { + error = new U2FError(response.errorCode); + return _this.renderError(error); + } else { + return _this.renderAuthenticated(JSON.stringify(response)); + } + }; + })(this), 10); + }; + + U2FAuthenticate.prototype.templates = { + "notSupported": "#js-authenticate-u2f-not-supported", + "setup": '#js-authenticate-u2f-setup', + "inProgress": '#js-authenticate-u2f-in-progress', + "error": '#js-authenticate-u2f-error', + "authenticated": '#js-authenticate-u2f-authenticated' + }; + + U2FAuthenticate.prototype.renderTemplate = function(name, params) { + var template, templateString; + templateString = $(this.templates[name]).html(); + template = _.template(templateString); + return this.container.html(template(params)); + }; + + U2FAuthenticate.prototype.renderSetup = function() { + this.renderTemplate('setup'); + return this.container.find('#js-login-u2f-device').on('click', this.renderInProgress); + }; + + U2FAuthenticate.prototype.renderInProgress = function() { + this.renderTemplate('inProgress'); + return this.authenticate(); + }; + + U2FAuthenticate.prototype.renderError = function(error) { + this.renderTemplate('error', { + error_message: error.message() + }); + return this.container.find('#js-u2f-try-again').on('click', this.renderSetup); + }; + + U2FAuthenticate.prototype.renderAuthenticated = function(deviceResponse) { + this.renderTemplate('authenticated'); + return this.container.find("#js-device-response").val(deviceResponse); + }; + + U2FAuthenticate.prototype.renderNotSupported = function() { + return this.renderTemplate('notSupported'); + }; + + return U2FAuthenticate; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/u2f/authenticate.js.coffee b/app/assets/javascripts/u2f/authenticate.js.coffee deleted file mode 100644 index 918c0a560fd..00000000000 --- a/app/assets/javascripts/u2f/authenticate.js.coffee +++ /dev/null @@ -1,75 +0,0 @@ -# Authenticate U2F (universal 2nd factor) devices for users to authenticate with. -# -# State Flow #1: setup -> in_progress -> authenticated -> POST to server -# State Flow #2: setup -> in_progress -> error -> setup - -class @U2FAuthenticate - constructor: (@container, u2fParams) -> - @appId = u2fParams.app_id - @challenge = u2fParams.challenge - - # The U2F Javascript API v1.1 requires a single challenge, with - # _no challenges per-request_. The U2F Javascript API v1.0 requires a - # challenge per-request, which is done by copying the single challenge - # into every request. - # - # In either case, we don't need the per-request challenges that the server - # has generated, so we can remove them. - # - # Note: The server library fixes this behaviour in (unreleased) version 1.0.0. - # This can be removed once we upgrade. - # https://github.com/castle/ruby-u2f/commit/103f428071a81cd3d5f80c2e77d522d5029946a4 - @signRequests = u2fParams.sign_requests.map (request) -> _(request).omit('challenge') - - start: () => - if U2FUtil.isU2FSupported() - @renderSetup() - else - @renderNotSupported() - - authenticate: () => - u2f.sign(@appId, @challenge, @signRequests, (response) => - if response.errorCode - error = new U2FError(response.errorCode) - @renderError(error); - else - @renderAuthenticated(JSON.stringify(response)) - , 10) - - ############# - # Rendering # - ############# - - templates: { - "notSupported": "#js-authenticate-u2f-not-supported", - "setup": '#js-authenticate-u2f-setup', - "inProgress": '#js-authenticate-u2f-in-progress', - "error": '#js-authenticate-u2f-error', - "authenticated": '#js-authenticate-u2f-authenticated' - } - - renderTemplate: (name, params) => - templateString = $(@templates[name]).html() - template = _.template(templateString) - @container.html(template(params)) - - renderSetup: () => - @renderTemplate('setup') - @container.find('#js-login-u2f-device').on('click', @renderInProgress) - - renderInProgress: () => - @renderTemplate('inProgress') - @authenticate() - - renderError: (error) => - @renderTemplate('error', {error_message: error.message()}) - @container.find('#js-u2f-try-again').on('click', @renderSetup) - - renderAuthenticated: (deviceResponse) => - @renderTemplate('authenticated') - # Prefer to do this instead of interpolating using Underscore templates - # because of JSON escaping issues. - @container.find("#js-device-response").val(deviceResponse) - - renderNotSupported: () => - @renderTemplate('notSupported') diff --git a/app/assets/javascripts/u2f/error.js b/app/assets/javascripts/u2f/error.js new file mode 100644 index 00000000000..bc48c67c4f2 --- /dev/null +++ b/app/assets/javascripts/u2f/error.js @@ -0,0 +1,27 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.U2FError = (function() { + function U2FError(errorCode) { + this.errorCode = errorCode; + this.message = bind(this.message, this); + this.httpsDisabled = window.location.protocol !== 'https:'; + console.error("U2F Error Code: " + this.errorCode); + } + + U2FError.prototype.message = function() { + switch (false) { + case !(this.errorCode === u2f.ErrorCodes.BAD_REQUEST && this.httpsDisabled): + return "U2F only works with HTTPS-enabled websites. Contact your administrator for more details."; + case this.errorCode !== u2f.ErrorCodes.DEVICE_INELIGIBLE: + return "This device has already been registered with us."; + default: + return "There was a problem communicating with your device."; + } + }; + + return U2FError; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/u2f/error.js.coffee b/app/assets/javascripts/u2f/error.js.coffee deleted file mode 100644 index 1a2fc3e757f..00000000000 --- a/app/assets/javascripts/u2f/error.js.coffee +++ /dev/null @@ -1,13 +0,0 @@ -class @U2FError - constructor: (@errorCode) -> - @httpsDisabled = (window.location.protocol isnt 'https:') - console.error("U2F Error Code: #{@errorCode}") - - message: () => - switch - when (@errorCode is u2f.ErrorCodes.BAD_REQUEST and @httpsDisabled) - "U2F only works with HTTPS-enabled websites. Contact your administrator for more details." - when @errorCode is u2f.ErrorCodes.DEVICE_INELIGIBLE - "This device has already been registered with us." - else - "There was a problem communicating with your device." diff --git a/app/assets/javascripts/u2f/register.js b/app/assets/javascripts/u2f/register.js new file mode 100644 index 00000000000..c87e0840df3 --- /dev/null +++ b/app/assets/javascripts/u2f/register.js @@ -0,0 +1,87 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.U2FRegister = (function() { + function U2FRegister(container, u2fParams) { + this.container = container; + this.renderNotSupported = bind(this.renderNotSupported, this); + this.renderRegistered = bind(this.renderRegistered, this); + this.renderError = bind(this.renderError, this); + this.renderInProgress = bind(this.renderInProgress, this); + this.renderSetup = bind(this.renderSetup, this); + this.renderTemplate = bind(this.renderTemplate, this); + this.register = bind(this.register, this); + this.start = bind(this.start, this); + this.appId = u2fParams.app_id; + this.registerRequests = u2fParams.register_requests; + this.signRequests = u2fParams.sign_requests; + } + + U2FRegister.prototype.start = function() { + if (U2FUtil.isU2FSupported()) { + return this.renderSetup(); + } else { + return this.renderNotSupported(); + } + }; + + U2FRegister.prototype.register = function() { + return u2f.register(this.appId, this.registerRequests, this.signRequests, (function(_this) { + return function(response) { + var error; + if (response.errorCode) { + error = new U2FError(response.errorCode); + return _this.renderError(error); + } else { + return _this.renderRegistered(JSON.stringify(response)); + } + }; + })(this), 10); + }; + + U2FRegister.prototype.templates = { + "notSupported": "#js-register-u2f-not-supported", + "setup": '#js-register-u2f-setup', + "inProgress": '#js-register-u2f-in-progress', + "error": '#js-register-u2f-error', + "registered": '#js-register-u2f-registered' + }; + + U2FRegister.prototype.renderTemplate = function(name, params) { + var template, templateString; + templateString = $(this.templates[name]).html(); + template = _.template(templateString); + return this.container.html(template(params)); + }; + + U2FRegister.prototype.renderSetup = function() { + this.renderTemplate('setup'); + return this.container.find('#js-setup-u2f-device').on('click', this.renderInProgress); + }; + + U2FRegister.prototype.renderInProgress = function() { + this.renderTemplate('inProgress'); + return this.register(); + }; + + U2FRegister.prototype.renderError = function(error) { + this.renderTemplate('error', { + error_message: error.message() + }); + return this.container.find('#js-u2f-try-again').on('click', this.renderSetup); + }; + + U2FRegister.prototype.renderRegistered = function(deviceResponse) { + this.renderTemplate('registered'); + return this.container.find("#js-device-response").val(deviceResponse); + }; + + U2FRegister.prototype.renderNotSupported = function() { + return this.renderTemplate('notSupported'); + }; + + return U2FRegister; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/u2f/register.js.coffee b/app/assets/javascripts/u2f/register.js.coffee deleted file mode 100644 index 74472cfa120..00000000000 --- a/app/assets/javascripts/u2f/register.js.coffee +++ /dev/null @@ -1,63 +0,0 @@ -# Register U2F (universal 2nd factor) devices for users to authenticate with. -# -# State Flow #1: setup -> in_progress -> registered -> POST to server -# State Flow #2: setup -> in_progress -> error -> setup - -class @U2FRegister - constructor: (@container, u2fParams) -> - @appId = u2fParams.app_id - @registerRequests = u2fParams.register_requests - @signRequests = u2fParams.sign_requests - - start: () => - if U2FUtil.isU2FSupported() - @renderSetup() - else - @renderNotSupported() - - register: () => - u2f.register(@appId, @registerRequests, @signRequests, (response) => - if response.errorCode - error = new U2FError(response.errorCode) - @renderError(error); - else - @renderRegistered(JSON.stringify(response)) - , 10) - - ############# - # Rendering # - ############# - - templates: { - "notSupported": "#js-register-u2f-not-supported", - "setup": '#js-register-u2f-setup', - "inProgress": '#js-register-u2f-in-progress', - "error": '#js-register-u2f-error', - "registered": '#js-register-u2f-registered' - } - - renderTemplate: (name, params) => - templateString = $(@templates[name]).html() - template = _.template(templateString) - @container.html(template(params)) - - renderSetup: () => - @renderTemplate('setup') - @container.find('#js-setup-u2f-device').on('click', @renderInProgress) - - renderInProgress: () => - @renderTemplate('inProgress') - @register() - - renderError: (error) => - @renderTemplate('error', {error_message: error.message()}) - @container.find('#js-u2f-try-again').on('click', @renderSetup) - - renderRegistered: (deviceResponse) => - @renderTemplate('registered') - # Prefer to do this instead of interpolating using Underscore templates - # because of JSON escaping issues. - @container.find("#js-device-response").val(deviceResponse) - - renderNotSupported: () => - @renderTemplate('notSupported') diff --git a/app/assets/javascripts/u2f/util.js b/app/assets/javascripts/u2f/util.js new file mode 100644 index 00000000000..907e640161a --- /dev/null +++ b/app/assets/javascripts/u2f/util.js @@ -0,0 +1,13 @@ +(function() { + this.U2FUtil = (function() { + function U2FUtil() {} + + U2FUtil.isU2FSupported = function() { + return window.u2f; + }; + + return U2FUtil; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/u2f/util.js.coffee b/app/assets/javascripts/u2f/util.js.coffee deleted file mode 100644 index 5ef324f609d..00000000000 --- a/app/assets/javascripts/u2f/util.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -class @U2FUtil - @isU2FSupported: -> - window.u2f diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js new file mode 100644 index 00000000000..b46390ad8f4 --- /dev/null +++ b/app/assets/javascripts/user.js @@ -0,0 +1,31 @@ +(function() { + this.User = (function() { + function User(opts) { + this.opts = opts; + $('.profile-groups-avatars').tooltip({ + "placement": "top" + }); + this.initTabs(); + $('.hide-project-limit-message').on('click', function(e) { + var path; + path = '/'; + $.cookie('hide_project_limit_message', 'false', { + path: path + }); + $(this).parents('.project-limit-message').remove(); + return e.preventDefault(); + }); + } + + User.prototype.initTabs = function() { + return new UserTabs({ + parentEl: '.user-profile', + action: this.opts.action + }); + }; + + return User; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/user.js.coffee b/app/assets/javascripts/user.js.coffee deleted file mode 100644 index 2882a90d118..00000000000 --- a/app/assets/javascripts/user.js.coffee +++ /dev/null @@ -1,17 +0,0 @@ -class @User - constructor: (@opts) -> - $('.profile-groups-avatars').tooltip("placement": "top") - - @initTabs() - - $('.hide-project-limit-message').on 'click', (e) -> - path = '/' - $.cookie('hide_project_limit_message', 'false', { path: path }) - $(@).parents('.project-limit-message').remove() - e.preventDefault() - - initTabs: -> - new UserTabs( - parentEl: '.user-profile' - action: @opts.action - ) diff --git a/app/assets/javascripts/user_tabs.js b/app/assets/javascripts/user_tabs.js new file mode 100644 index 00000000000..e5e75701fee --- /dev/null +++ b/app/assets/javascripts/user_tabs.js @@ -0,0 +1,119 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.UserTabs = (function() { + function UserTabs(opts) { + this.tabShown = bind(this.tabShown, this); + var i, item, len, ref, ref1, ref2, ref3; + this.action = (ref = opts.action) != null ? ref : 'activity', this.defaultAction = (ref1 = opts.defaultAction) != null ? ref1 : 'activity', this.parentEl = (ref2 = opts.parentEl) != null ? ref2 : $(document); + if (typeof this.parentEl === 'string') { + this.parentEl = $(this.parentEl); + } + this._location = location; + this.loaded = {}; + ref3 = this.parentEl.find('.nav-links a'); + for (i = 0, len = ref3.length; i < len; i++) { + item = ref3[i]; + this.loaded[$(item).attr('data-action')] = false; + } + this.actions = Object.keys(this.loaded); + this.bindEvents(); + if (this.action === 'show') { + this.action = this.defaultAction; + } + this.activateTab(this.action); + } + + UserTabs.prototype.bindEvents = function() { + return this.parentEl.off('shown.bs.tab', '.nav-links a[data-toggle="tab"]').on('shown.bs.tab', '.nav-links a[data-toggle="tab"]', this.tabShown); + }; + + UserTabs.prototype.tabShown = function(event) { + var $target, action, source; + $target = $(event.target); + action = $target.data('action'); + source = $target.attr('href'); + this.setTab(source, action); + return this.setCurrentAction(action); + }; + + UserTabs.prototype.activateTab = function(action) { + return this.parentEl.find(".nav-links .js-" + action + "-tab a").tab('show'); + }; + + UserTabs.prototype.setTab = function(source, action) { + if (this.loaded[action] === true) { + return; + } + if (action === 'activity') { + this.loadActivities(source); + } + if (action === 'groups' || action === 'contributed' || action === 'projects' || action === 'snippets') { + return this.loadTab(source, action); + } + }; + + UserTabs.prototype.loadTab = function(source, action) { + return $.ajax({ + beforeSend: (function(_this) { + return function() { + return _this.toggleLoading(true); + }; + })(this), + complete: (function(_this) { + return function() { + return _this.toggleLoading(false); + }; + })(this), + dataType: 'json', + type: 'GET', + url: source + ".json", + success: (function(_this) { + return function(data) { + var tabSelector; + tabSelector = 'div#' + action; + _this.parentEl.find(tabSelector).html(data.html); + _this.loaded[action] = true; + return gl.utils.localTimeAgo($('.js-timeago', tabSelector)); + }; + })(this) + }); + }; + + UserTabs.prototype.loadActivities = function(source) { + var $calendarWrap; + if (this.loaded['activity'] === true) { + return; + } + $calendarWrap = this.parentEl.find('.user-calendar'); + $calendarWrap.load($calendarWrap.data('href')); + new Activities(); + return this.loaded['activity'] = true; + }; + + UserTabs.prototype.toggleLoading = function(status) { + return this.parentEl.find('.loading-status .loading').toggle(status); + }; + + UserTabs.prototype.setCurrentAction = function(action) { + var new_state, regExp; + regExp = new RegExp('\/(' + this.actions.join('|') + ')(\.html)?\/?$'); + new_state = this._location.pathname; + new_state = new_state.replace(/\/+$/, ""); + new_state = new_state.replace(regExp, ''); + if (action !== this.defaultAction) { + new_state += "/" + action; + } + new_state += this._location.search + this._location.hash; + history.replaceState({ + turbolinks: true, + url: new_state + }, document.title, new_state); + return new_state; + }; + + return UserTabs; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/user_tabs.js.coffee b/app/assets/javascripts/user_tabs.js.coffee deleted file mode 100644 index 29dad21faed..00000000000 --- a/app/assets/javascripts/user_tabs.js.coffee +++ /dev/null @@ -1,156 +0,0 @@ -# UserTabs -# -# Handles persisting and restoring the current tab selection and lazily-loading -# content on the Users#show page. -# -# ### Example Markup -# -# -# -#
                -#
                -# Activity Content -#
                -#
                -# Groups Content -#
                -#
                -# Contributed projects content -#
                -#
                -# Projects content -#
                -#
                -# Snippets content -#
                -#
                -# -#
                -#
                -# Loading Animation -#
                -#
                -# -class @UserTabs - constructor: (opts) -> - { - @action = 'activity' - @defaultAction = 'activity' - @parentEl = $(document) - } = opts - - # Make jQuery object if selector is provided - @parentEl = $(@parentEl) if typeof @parentEl is 'string' - - # Store the `location` object, allowing for easier stubbing in tests - @_location = location - - # Set tab states - @loaded = {} - for item in @parentEl.find('.nav-links a') - @loaded[$(item).attr 'data-action'] = false - - # Actions - @actions = Object.keys @loaded - - @bindEvents() - - # Set active tab - @action = @defaultAction if @action is 'show' - @activateTab(@action) - - bindEvents: -> - # Toggle event listeners - @parentEl - .off 'shown.bs.tab', '.nav-links a[data-toggle="tab"]' - .on 'shown.bs.tab', '.nav-links a[data-toggle="tab"]', @tabShown - - tabShown: (event) => - $target = $(event.target) - action = $target.data('action') - source = $target.attr('href') - - @setTab(source, action) - @setCurrentAction(action) - - activateTab: (action) -> - @parentEl.find(".nav-links .js-#{action}-tab a").tab('show') - - setTab: (source, action) -> - return if @loaded[action] is true - - if action is 'activity' - @loadActivities(source) - - if action in ['groups', 'contributed', 'projects', 'snippets'] - @loadTab(source, action) - - loadTab: (source, action) -> - $.ajax - beforeSend: => @toggleLoading(true) - complete: => @toggleLoading(false) - dataType: 'json' - type: 'GET' - url: "#{source}.json" - success: (data) => - tabSelector = 'div#' + action - @parentEl.find(tabSelector).html(data.html) - @loaded[action] = true - - # Fix tooltips - gl.utils.localTimeAgo($('.js-timeago', tabSelector)) - - loadActivities: (source) -> - return if @loaded['activity'] is true - - $calendarWrap = @parentEl.find('.user-calendar') - $calendarWrap.load($calendarWrap.data('href')) - - new Activities() - @loaded['activity'] = true - - toggleLoading: (status) -> - @parentEl.find('.loading-status .loading').toggle(status) - - setCurrentAction: (action) -> - # Remove possible actions from URL - regExp = new RegExp('\/(' + @actions.join('|') + ')(\.html)?\/?$') - new_state = @_location.pathname - new_state = new_state.replace(/\/+$/, "") # remove trailing slashes - new_state = new_state.replace(regExp, '') - - # Append the new action if we're on a tab other than 'activity' - unless action == @defaultAction - new_state += "/#{action}" - - # Ensure parameters and hash come along for the ride - new_state += @_location.search + @_location.hash - - history.replaceState {turbolinks: true, url: new_state}, document.title, new_state - - new_state diff --git a/app/assets/javascripts/users/calendar.js b/app/assets/javascripts/users/calendar.js new file mode 100644 index 00000000000..8b3dbf5f5ae --- /dev/null +++ b/app/assets/javascripts/users/calendar.js @@ -0,0 +1,192 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Calendar = (function() { + function Calendar(timestamps, calendar_activities_path) { + var group, i; + this.calendar_activities_path = calendar_activities_path; + this.clickDay = bind(this.clickDay, this); + this.currentSelectedDate = ''; + this.daySpace = 1; + this.daySize = 15; + this.daySizeWithSpace = this.daySize + (this.daySpace * 2); + this.monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + this.months = []; + this.timestampsTmp = []; + i = 0; + group = 0; + _.each(timestamps, (function(_this) { + return function(count, date) { + var day, innerArray, newDate; + newDate = new Date(parseInt(date) * 1000); + day = newDate.getDay(); + if ((day === 0 && i !== 0) || i === 0) { + _this.timestampsTmp.push([]); + group++; + } + innerArray = _this.timestampsTmp[group - 1]; + innerArray.push({ + count: count, + date: newDate, + day: day + }); + return i++; + }; + })(this)); + this.colorKey = this.initColorKey(); + this.color = this.initColor(); + this.renderSvg(group); + this.renderDays(); + this.renderMonths(); + this.renderDayTitles(); + this.renderKey(); + this.initTooltips(); + } + + Calendar.prototype.renderSvg = function(group) { + return this.svg = d3.select('.js-contrib-calendar').append('svg').attr('width', (group + 1) * this.daySizeWithSpace).attr('height', 167).attr('class', 'contrib-calendar'); + }; + + Calendar.prototype.renderDays = function() { + return this.svg.selectAll('g').data(this.timestampsTmp).enter().append('g').attr('transform', (function(_this) { + return function(group, i) { + _.each(group, function(stamp, a) { + var lastMonth, lastMonthX, month, x; + if (a === 0 && stamp.day === 0) { + month = stamp.date.getMonth(); + x = (_this.daySizeWithSpace * i + 1) + _this.daySizeWithSpace; + lastMonth = _.last(_this.months); + if (lastMonth != null) { + lastMonthX = lastMonth.x; + } + if (lastMonth == null) { + return _this.months.push({ + month: month, + x: x + }); + } else if (month !== lastMonth.month && x - _this.daySizeWithSpace !== lastMonthX) { + return _this.months.push({ + month: month, + x: x + }); + } + } + }); + return "translate(" + ((_this.daySizeWithSpace * i + 1) + _this.daySizeWithSpace) + ", 18)"; + }; + })(this)).selectAll('rect').data(function(stamp) { + return stamp; + }).enter().append('rect').attr('x', '0').attr('y', (function(_this) { + return function(stamp, i) { + return _this.daySizeWithSpace * stamp.day; + }; + })(this)).attr('width', this.daySize).attr('height', this.daySize).attr('title', (function(_this) { + return function(stamp) { + var contribText, date, dateText; + date = new Date(stamp.date); + contribText = 'No contributions'; + if (stamp.count > 0) { + contribText = stamp.count + " contribution" + (stamp.count > 1 ? 's' : ''); + } + dateText = dateFormat(date, 'mmm d, yyyy'); + return contribText + "
                " + (gl.utils.getDayName(date)) + " " + dateText; + }; + })(this)).attr('class', 'user-contrib-cell js-tooltip').attr('fill', (function(_this) { + return function(stamp) { + if (stamp.count !== 0) { + return _this.color(Math.min(stamp.count, 40)); + } else { + return '#ededed'; + } + }; + })(this)).attr('data-container', 'body').on('click', this.clickDay); + }; + + Calendar.prototype.renderDayTitles = function() { + var days; + days = [ + { + text: 'M', + y: 29 + (this.daySizeWithSpace * 1) + }, { + text: 'W', + y: 29 + (this.daySizeWithSpace * 3) + }, { + text: 'F', + y: 29 + (this.daySizeWithSpace * 5) + } + ]; + return this.svg.append('g').selectAll('text').data(days).enter().append('text').attr('text-anchor', 'middle').attr('x', 8).attr('y', function(day) { + return day.y; + }).text(function(day) { + return day.text; + }).attr('class', 'user-contrib-text'); + }; + + Calendar.prototype.renderMonths = function() { + return this.svg.append('g').selectAll('text').data(this.months).enter().append('text').attr('x', function(date) { + return date.x; + }).attr('y', 10).attr('class', 'user-contrib-text').text((function(_this) { + return function(date) { + return _this.monthNames[date.month]; + }; + })(this)); + }; + + Calendar.prototype.renderKey = function() { + var keyColors; + keyColors = ['#ededed', this.colorKey(0), this.colorKey(1), this.colorKey(2), this.colorKey(3)]; + return this.svg.append('g').attr('transform', "translate(18, " + (this.daySizeWithSpace * 8 + 16) + ")").selectAll('rect').data(keyColors).enter().append('rect').attr('width', this.daySize).attr('height', this.daySize).attr('x', (function(_this) { + return function(color, i) { + return _this.daySizeWithSpace * i; + }; + })(this)).attr('y', 0).attr('fill', function(color) { + return color; + }); + }; + + Calendar.prototype.initColor = function() { + var colorRange; + colorRange = ['#ededed', this.colorKey(0), this.colorKey(1), this.colorKey(2), this.colorKey(3)]; + return d3.scale.threshold().domain([0, 10, 20, 30]).range(colorRange); + }; + + Calendar.prototype.initColorKey = function() { + return d3.scale.linear().range(['#acd5f2', '#254e77']).domain([0, 3]); + }; + + Calendar.prototype.clickDay = function(stamp) { + var formatted_date; + if (this.currentSelectedDate !== stamp.date) { + this.currentSelectedDate = stamp.date; + formatted_date = this.currentSelectedDate.getFullYear() + "-" + (this.currentSelectedDate.getMonth() + 1) + "-" + this.currentSelectedDate.getDate(); + return $.ajax({ + url: this.calendar_activities_path, + data: { + date: formatted_date + }, + cache: false, + dataType: 'html', + beforeSend: function() { + return $('.user-calendar-activities').html('
                '); + }, + success: function(data) { + return $('.user-calendar-activities').html(data); + } + }); + } else { + return $('.user-calendar-activities').html(''); + } + }; + + Calendar.prototype.initTooltips = function() { + return $('.js-contrib-calendar .js-tooltip').tooltip({ + html: true + }); + }; + + return Calendar; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/users/calendar.js.coffee b/app/assets/javascripts/users/calendar.js.coffee deleted file mode 100644 index c49ba5186f2..00000000000 --- a/app/assets/javascripts/users/calendar.js.coffee +++ /dev/null @@ -1,194 +0,0 @@ -class @Calendar - constructor: (timestamps, @calendar_activities_path) -> - @currentSelectedDate = '' - @daySpace = 1 - @daySize = 15 - @daySizeWithSpace = @daySize + (@daySpace * 2) - @monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] - @months = [] - - # Loop through the timestamps to create a group of objects - # The group of objects will be grouped based on the day of the week they are - @timestampsTmp = [] - i = 0 - group = 0 - _.each timestamps, (count, date) => - newDate = new Date parseInt(date) * 1000 - day = newDate.getDay() - - # Create a new group array if this is the first day of the week - # or if is first object - if (day is 0 and i isnt 0) or i is 0 - @timestampsTmp.push [] - group++ - - innerArray = @timestampsTmp[group-1] - - # Push to the inner array the values that will be used to render map - innerArray.push - count: count - date: newDate - day: day - - i++ - - # Init color functions - @colorKey = @initColorKey() - @color = @initColor() - - # Init the svg element - @renderSvg(group) - @renderDays() - @renderMonths() - @renderDayTitles() - @renderKey() - - @initTooltips() - - renderSvg: (group) -> - @svg = d3.select '.js-contrib-calendar' - .append 'svg' - .attr 'width', (group + 1) * @daySizeWithSpace - .attr 'height', 167 - .attr 'class', 'contrib-calendar' - - renderDays: -> - @svg.selectAll 'g' - .data @timestampsTmp - .enter() - .append 'g' - .attr 'transform', (group, i) => - _.each group, (stamp, a) => - if a is 0 and stamp.day is 0 - month = stamp.date.getMonth() - x = (@daySizeWithSpace * i + 1) + @daySizeWithSpace - lastMonth = _.last(@months) - if lastMonth? - lastMonthX = lastMonth.x - - if !lastMonth? - @months.push - month: month - x: x - else if month isnt lastMonth.month and x - @daySizeWithSpace isnt lastMonthX - @months.push - month: month - x: x - - "translate(#{(@daySizeWithSpace * i + 1) + @daySizeWithSpace}, 18)" - .selectAll 'rect' - .data (stamp) -> - stamp - .enter() - .append 'rect' - .attr 'x', '0' - .attr 'y', (stamp, i) => - (@daySizeWithSpace * stamp.day) - .attr 'width', @daySize - .attr 'height', @daySize - .attr 'title', (stamp) => - date = new Date(stamp.date) - contribText = 'No contributions' - - if stamp.count > 0 - contribText = "#{stamp.count} contribution#{if stamp.count > 1 then 's' else ''}" - - dateText = dateFormat(date, 'mmm d, yyyy') - - "#{contribText}
                #{gl.utils.getDayName(date)} #{dateText}" - .attr 'class', 'user-contrib-cell js-tooltip' - .attr 'fill', (stamp) => - if stamp.count isnt 0 - @color(Math.min(stamp.count, 40)) - else - '#ededed' - .attr 'data-container', 'body' - .on 'click', @clickDay - - renderDayTitles: -> - days = [{ - text: 'M' - y: 29 + (@daySizeWithSpace * 1) - }, { - text: 'W' - y: 29 + (@daySizeWithSpace * 3) - }, { - text: 'F' - y: 29 + (@daySizeWithSpace * 5) - }] - @svg.append 'g' - .selectAll 'text' - .data days - .enter() - .append 'text' - .attr 'text-anchor', 'middle' - .attr 'x', 8 - .attr 'y', (day) -> - day.y - .text (day) -> - day.text - .attr 'class', 'user-contrib-text' - - renderMonths: -> - @svg.append 'g' - .selectAll 'text' - .data @months - .enter() - .append 'text' - .attr 'x', (date) -> - date.x - .attr 'y', 10 - .attr 'class', 'user-contrib-text' - .text (date) => - @monthNames[date.month] - - renderKey: -> - keyColors = ['#ededed', @colorKey(0), @colorKey(1), @colorKey(2), @colorKey(3)] - @svg.append 'g' - .attr 'transform', "translate(18, #{@daySizeWithSpace * 8 + 16})" - .selectAll 'rect' - .data keyColors - .enter() - .append 'rect' - .attr 'width', @daySize - .attr 'height', @daySize - .attr 'x', (color, i) => - @daySizeWithSpace * i - .attr 'y', 0 - .attr 'fill', (color) -> - color - - initColor: -> - colorRange = ['#ededed', @colorKey(0), @colorKey(1), @colorKey(2), @colorKey(3)] - d3.scale - .threshold() - .domain([0, 10, 20, 30]) - .range(colorRange) - - initColorKey: -> - d3.scale - .linear() - .range(['#acd5f2', '#254e77']) - .domain([0, 3]) - - clickDay: (stamp) => - if @currentSelectedDate isnt stamp.date - @currentSelectedDate = stamp.date - formatted_date = @currentSelectedDate.getFullYear() + "-" + (@currentSelectedDate.getMonth()+1) + "-" + @currentSelectedDate.getDate() - - $.ajax - url: @calendar_activities_path - data: - date: formatted_date - cache: false - dataType: 'html' - beforeSend: -> - $('.user-calendar-activities').html '
                ' - success: (data) -> - $('.user-calendar-activities').html data - else - $('.user-calendar-activities').html '' - - initTooltips: -> - $('.js-contrib-calendar .js-tooltip').tooltip - html: true diff --git a/app/assets/javascripts/users/users_bundle.js b/app/assets/javascripts/users/users_bundle.js new file mode 100644 index 00000000000..b95faadc8e7 --- /dev/null +++ b/app/assets/javascripts/users/users_bundle.js @@ -0,0 +1,7 @@ + +/*= require_tree . */ + +(function() { + + +}).call(this); diff --git a/app/assets/javascripts/users/users_bundle.js.coffee b/app/assets/javascripts/users/users_bundle.js.coffee deleted file mode 100644 index 91cacfece46..00000000000 --- a/app/assets/javascripts/users/users_bundle.js.coffee +++ /dev/null @@ -1,2 +0,0 @@ -# -#= require_tree . diff --git a/app/assets/javascripts/users_select.js b/app/assets/javascripts/users_select.js new file mode 100644 index 00000000000..64a29d36cdf --- /dev/null +++ b/app/assets/javascripts/users_select.js @@ -0,0 +1,342 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + slice = [].slice; + + this.UsersSelect = (function() { + function UsersSelect(currentUser) { + this.users = bind(this.users, this); + this.user = bind(this.user, this); + this.usersPath = "/autocomplete/users.json"; + this.userPath = "/autocomplete/users/:id.json"; + if (currentUser != null) { + this.currentUser = JSON.parse(currentUser); + } + $('.js-user-search').each((function(_this) { + return function(i, dropdown) { + var $block, $collapsedSidebar, $dropdown, $loading, $selectbox, $value, abilityName, assignTo, assigneeTemplate, collapsedAssigneeTemplate, defaultLabel, firstUser, issueURL, selectedId, showAnyUser, showNullUser; + $dropdown = $(dropdown); + _this.projectId = $dropdown.data('project-id'); + _this.showCurrentUser = $dropdown.data('current-user'); + showNullUser = $dropdown.data('null-user'); + showAnyUser = $dropdown.data('any-user'); + firstUser = $dropdown.data('first-user'); + _this.authorId = $dropdown.data('author-id'); + selectedId = $dropdown.data('selected'); + defaultLabel = $dropdown.data('default-label'); + issueURL = $dropdown.data('issueUpdate'); + $selectbox = $dropdown.closest('.selectbox'); + $block = $selectbox.closest('.block'); + abilityName = $dropdown.data('ability-name'); + $value = $block.find('.value'); + $collapsedSidebar = $block.find('.sidebar-collapsed-user'); + $loading = $block.find('.block-loading').fadeOut(); + $block.on('click', '.js-assign-yourself', function(e) { + e.preventDefault(); + return assignTo(_this.currentUser.id); + }); + assignTo = function(selected) { + var data; + data = {}; + data[abilityName] = {}; + data[abilityName].assignee_id = selected != null ? selected : null; + $loading.fadeIn(); + $dropdown.trigger('loading.gl.dropdown'); + return $.ajax({ + type: 'PUT', + dataType: 'json', + url: issueURL, + data: data + }).done(function(data) { + var user; + $dropdown.trigger('loaded.gl.dropdown'); + $loading.fadeOut(); + $selectbox.hide(); + if (data.assignee) { + user = { + name: data.assignee.name, + username: data.assignee.username, + avatar: data.assignee.avatar_url + }; + } else { + user = { + name: 'Unassigned', + username: '', + avatar: '' + }; + } + $value.html(assigneeTemplate(user)); + $collapsedSidebar.attr('title', user.name).tooltip('fixTitle'); + return $collapsedSidebar.html(collapsedAssigneeTemplate(user)); + }); + }; + collapsedAssigneeTemplate = _.template('<% if( avatar ) { %> <% } else { %> <% } %>'); + assigneeTemplate = _.template('<% if (username) { %> <% if( avatar ) { %> <% } %> <%- name %> @<%- username %> <% } else { %> No assignee - assign yourself <% } %>'); + return $dropdown.glDropdown({ + data: function(term, callback) { + var isAuthorFilter; + isAuthorFilter = $('.js-author-search'); + return _this.users(term, function(users) { + var anyUser, index, j, len, name, obj, showDivider; + if (term.length === 0) { + showDivider = 0; + if (firstUser) { + for (index = j = 0, len = users.length; j < len; index = ++j) { + obj = users[index]; + if (obj.username === firstUser) { + users.splice(index, 1); + users.unshift(obj); + break; + } + } + } + if (showNullUser) { + showDivider += 1; + users.unshift({ + beforeDivider: true, + name: 'Unassigned', + id: 0 + }); + } + if (showAnyUser) { + showDivider += 1; + name = showAnyUser; + if (name === true) { + name = 'Any User'; + } + anyUser = { + beforeDivider: true, + name: name, + id: null + }; + users.unshift(anyUser); + } + } + if (showDivider) { + users.splice(showDivider, 0, "divider"); + } + return callback(users); + }); + }, + filterable: true, + filterRemote: true, + search: { + fields: ['name', 'username'] + }, + selectable: true, + fieldName: $dropdown.data('field-name'), + toggleLabel: function(selected) { + if (selected && 'id' in selected) { + if (selected.text) { + return selected.text; + } else { + return selected.name; + } + } else { + return defaultLabel; + } + }, + inputId: 'issue_assignee_id', + hidden: function(e) { + $selectbox.hide(); + return $value.css('display', ''); + }, + clicked: function(user) { + var isIssueIndex, isMRIndex, page, selected; + page = $('body').data('page'); + isIssueIndex = page === 'projects:issues:index'; + isMRIndex = (page === page && page === 'projects:merge_requests:index'); + if ($dropdown.hasClass('js-filter-bulk-update')) { + return; + } + if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) { + selectedId = user.id; + return Issuable.filterResults($dropdown.closest('form')); + } else if ($dropdown.hasClass('js-filter-submit')) { + return $dropdown.closest('form').submit(); + } else { + selected = $dropdown.closest('.selectbox').find("input[name='" + ($dropdown.data('field-name')) + "']").val(); + return assignTo(selected); + } + }, + renderRow: function(user) { + var avatar, img, listClosingTags, listWithName, listWithUserName, selected, username; + username = user.username ? "@" + user.username : ""; + avatar = user.avatar_url ? user.avatar_url : false; + selected = user.id === selectedId ? "is-active" : ""; + img = ""; + if (user.beforeDivider != null) { + "
              • " + user.name + "
              • "; + } else { + if (avatar) { + img = ""; + } + } + listWithName = "
              • " + img + " " + user.name + " "; + listWithUserName = " " + username + " "; + listClosingTags = "
              • "; + if (username === '') { + listWithUserName = ''; + } + return listWithName + listWithUserName + listClosingTags; + } + }); + }; + })(this)); + $('.ajax-users-select').each((function(_this) { + return function(i, select) { + var firstUser, showAnyUser, showEmailUser, showNullUser; + _this.projectId = $(select).data('project-id'); + _this.groupId = $(select).data('group-id'); + _this.showCurrentUser = $(select).data('current-user'); + _this.authorId = $(select).data('author-id'); + showNullUser = $(select).data('null-user'); + showAnyUser = $(select).data('any-user'); + showEmailUser = $(select).data('email-user'); + firstUser = $(select).data('first-user'); + return $(select).select2({ + placeholder: "Search for a user", + multiple: $(select).hasClass('multiselect'), + minimumInputLength: 0, + query: function(query) { + return _this.users(query.term, function(users) { + var anyUser, data, emailUser, index, j, len, name, nullUser, obj, ref; + data = { + results: users + }; + if (query.term.length === 0) { + if (firstUser) { + ref = data.results; + for (index = j = 0, len = ref.length; j < len; index = ++j) { + obj = ref[index]; + if (obj.username === firstUser) { + data.results.splice(index, 1); + data.results.unshift(obj); + break; + } + } + } + if (showNullUser) { + nullUser = { + name: 'Unassigned', + id: 0 + }; + data.results.unshift(nullUser); + } + if (showAnyUser) { + name = showAnyUser; + if (name === true) { + name = 'Any User'; + } + anyUser = { + name: name, + id: null + }; + data.results.unshift(anyUser); + } + } + if (showEmailUser && data.results.length === 0 && query.term.match(/^[^@]+@[^@]+$/)) { + emailUser = { + name: "Invite \"" + query.term + "\"", + username: query.term, + id: query.term + }; + data.results.unshift(emailUser); + } + return query.callback(data); + }); + }, + initSelection: function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return _this.initSelection.apply(_this, args); + }, + formatResult: function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return _this.formatResult.apply(_this, args); + }, + formatSelection: function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + return _this.formatSelection.apply(_this, args); + }, + dropdownCssClass: "ajax-users-dropdown", + escapeMarkup: function(m) { + return m; + } + }); + }; + })(this)); + } + + UsersSelect.prototype.initSelection = function(element, callback) { + var id, nullUser; + id = $(element).val(); + if (id === "0") { + nullUser = { + name: 'Unassigned' + }; + return callback(nullUser); + } else if (id !== "") { + return this.user(id, callback); + } + }; + + UsersSelect.prototype.formatResult = function(user) { + var avatar; + if (user.avatar_url) { + avatar = user.avatar_url; + } else { + avatar = gon.default_avatar_url; + } + return "
                " + user.name + "
                " + (user.username || "") + "
                "; + }; + + UsersSelect.prototype.formatSelection = function(user) { + return user.name; + }; + + UsersSelect.prototype.user = function(user_id, callback) { + var url; + url = this.buildUrl(this.userPath); + url = url.replace(':id', user_id); + return $.ajax({ + url: url, + dataType: "json" + }).done(function(user) { + return callback(user); + }); + }; + + UsersSelect.prototype.users = function(query, callback) { + var url; + url = this.buildUrl(this.usersPath); + return $.ajax({ + url: url, + data: { + search: query, + per_page: 20, + active: true, + project_id: this.projectId, + group_id: this.groupId, + current_user: this.showCurrentUser, + author_id: this.authorId + }, + dataType: "json" + }).done(function(users) { + return callback(users); + }); + }; + + UsersSelect.prototype.buildUrl = function(url) { + if (gon.relative_url_root != null) { + url = gon.relative_url_root.replace(/\/$/, '') + url; + } + return url; + }; + + return UsersSelect; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee deleted file mode 100644 index 344be811e0d..00000000000 --- a/app/assets/javascripts/users_select.js.coffee +++ /dev/null @@ -1,330 +0,0 @@ -class @UsersSelect - constructor: (currentUser) -> - @usersPath = "/autocomplete/users.json" - @userPath = "/autocomplete/users/:id.json" - if currentUser? - @currentUser = JSON.parse(currentUser) - - $('.js-user-search').each (i, dropdown) => - $dropdown = $(dropdown) - @projectId = $dropdown.data('project-id') - @showCurrentUser = $dropdown.data('current-user') - showNullUser = $dropdown.data('null-user') - showAnyUser = $dropdown.data('any-user') - firstUser = $dropdown.data('first-user') - @authorId = $dropdown.data('author-id') - selectedId = $dropdown.data('selected') - defaultLabel = $dropdown.data('default-label') - issueURL = $dropdown.data('issueUpdate') - $selectbox = $dropdown.closest('.selectbox') - $block = $selectbox.closest('.block') - abilityName = $dropdown.data('ability-name') - $value = $block.find('.value') - $collapsedSidebar = $block.find('.sidebar-collapsed-user') - $loading = $block.find('.block-loading').fadeOut() - - $block.on('click', '.js-assign-yourself', (e) => - e.preventDefault() - assignTo(@currentUser.id) - ) - - assignTo = (selected) -> - data = {} - data[abilityName] = {} - data[abilityName].assignee_id = if selected? then selected else null - $loading - .fadeIn() - $dropdown.trigger('loading.gl.dropdown') - $.ajax( - type: 'PUT' - dataType: 'json' - url: issueURL - data: data - ).done (data) -> - $dropdown.trigger('loaded.gl.dropdown') - $loading.fadeOut() - $selectbox.hide() - - if data.assignee - user = - name: data.assignee.name - username: data.assignee.username - avatar: data.assignee.avatar_url - else - user = - name: 'Unassigned' - username: '' - avatar: '' - $value.html(assigneeTemplate(user)) - - $collapsedSidebar - .attr('title', user.name) - .tooltip('fixTitle') - - $collapsedSidebar.html(collapsedAssigneeTemplate(user)) - - - collapsedAssigneeTemplate = _.template( - '<% if( avatar ) { %> - - - - <% } else { %> - - <% } %>' - ) - - assigneeTemplate = _.template( - '<% if (username) { %> - - <% if( avatar ) { %> - - <% } %> - <%- name %> - - @<%- username %> - - - <% } else { %> - - No assignee - - - assign yourself - - - <% } %>' - ) - - $dropdown.glDropdown( - data: (term, callback) => - isAuthorFilter = $('.js-author-search') - - @users term, (users) => - if term.length is 0 - showDivider = 0 - - if firstUser - # Move current user to the front of the list - for obj, index in users - if obj.username == firstUser - users.splice(index, 1) - users.unshift(obj) - break - - if showNullUser - showDivider += 1 - users.unshift( - beforeDivider: true - name: 'Unassigned', - id: 0 - ) - - if showAnyUser - showDivider += 1 - name = showAnyUser - name = 'Any User' if name == true - anyUser = { - beforeDivider: true - name: name, - id: null - } - users.unshift(anyUser) - - if showDivider - users.splice(showDivider, 0, "divider") - - # Send the data back - callback users - filterable: true - filterRemote: true - search: - fields: ['name', 'username'] - selectable: true - fieldName: $dropdown.data('field-name') - - toggleLabel: (selected) -> - if selected && 'id' of selected - if selected.text then selected.text else selected.name - else - defaultLabel - - inputId: 'issue_assignee_id' - - hidden: (e) -> - $selectbox.hide() - # display:block overrides the hide-collapse rule - $value.css('display', '') - - clicked: (user) -> - page = $('body').data 'page' - isIssueIndex = page is 'projects:issues:index' - isMRIndex = page is page is 'projects:merge_requests:index' - if $dropdown.hasClass('js-filter-bulk-update') - return - - if $dropdown.hasClass('js-filter-submit') and (isIssueIndex or isMRIndex) - selectedId = user.id - Issuable.filterResults $dropdown.closest('form') - else if $dropdown.hasClass 'js-filter-submit' - $dropdown.closest('form').submit() - else - selected = $dropdown - .closest('.selectbox') - .find("input[name='#{$dropdown.data('field-name')}']").val() - assignTo(selected) - - renderRow: (user) -> - username = if user.username then "@#{user.username}" else "" - avatar = if user.avatar_url then user.avatar_url else false - selected = if user.id is selectedId then "is-active" else "" - img = "" - - if user.beforeDivider? - "
              • - - #{user.name} - -
              • " - else - if avatar - img = "" - - # split into three parts so we can remove the username section if nessesary - listWithName = "
              • - - #{img} - - #{user.name} - " - - listWithUserName = " - #{username} - " - listClosingTags = " -
              • " - - - if username is '' - listWithUserName = '' - - listWithName + listWithUserName + listClosingTags - ) - - $('.ajax-users-select').each (i, select) => - @projectId = $(select).data('project-id') - @groupId = $(select).data('group-id') - @showCurrentUser = $(select).data('current-user') - @authorId = $(select).data('author-id') - showNullUser = $(select).data('null-user') - showAnyUser = $(select).data('any-user') - showEmailUser = $(select).data('email-user') - firstUser = $(select).data('first-user') - - $(select).select2 - placeholder: "Search for a user" - multiple: $(select).hasClass('multiselect') - minimumInputLength: 0 - query: (query) => - @users query.term, (users) => - data = { results: users } - - if query.term.length == 0 - if firstUser - # Move current user to the front of the list - for obj, index in data.results - if obj.username == firstUser - data.results.splice(index, 1) - data.results.unshift(obj) - break - - if showNullUser - nullUser = { - name: 'Unassigned', - id: 0 - } - data.results.unshift(nullUser) - - if showAnyUser - name = showAnyUser - name = 'Any User' if name == true - anyUser = { - name: name, - id: null - } - data.results.unshift(anyUser) - - if showEmailUser && data.results.length == 0 && query.term.match(/^[^@]+@[^@]+$/) - emailUser = { - name: "Invite \"#{query.term}\"", - username: query.term, - id: query.term - } - data.results.unshift(emailUser) - - query.callback(data) - - initSelection: (args...) => - @initSelection(args...) - formatResult: (args...) => - @formatResult(args...) - formatSelection: (args...) => - @formatSelection(args...) - dropdownCssClass: "ajax-users-dropdown" - escapeMarkup: (m) -> # we do not want to escape markup since we are displaying html in results - m - - initSelection: (element, callback) -> - id = $(element).val() - if id == "0" - nullUser = { name: 'Unassigned' } - callback(nullUser) - else if id != "" - @user(id, callback) - - formatResult: (user) -> - if user.avatar_url - avatar = user.avatar_url - else - avatar = gon.default_avatar_url - - "
                -
                -
                #{user.name}
                -
                #{user.username || ""}
                -
                " - - formatSelection: (user) -> - user.name - - user: (user_id, callback) => - url = @buildUrl(@userPath) - url = url.replace(':id', user_id) - - $.ajax( - url: url - dataType: "json" - ).done (user) -> - callback(user) - - # Return users list. Filtered by query - # Only active users retrieved - users: (query, callback) => - url = @buildUrl(@usersPath) - - $.ajax( - url: url - data: - search: query - per_page: 20 - active: true - project_id: @projectId - group_id: @groupId - current_user: @showCurrentUser - author_id: @authorId - dataType: "json" - ).done (users) -> - callback(users) - - buildUrl: (url) -> - url = gon.relative_url_root.replace(/\/$/, '') + url if gon.relative_url_root? - return url diff --git a/app/assets/javascripts/wikis.js b/app/assets/javascripts/wikis.js new file mode 100644 index 00000000000..35401231fbf --- /dev/null +++ b/app/assets/javascripts/wikis.js @@ -0,0 +1,37 @@ + +/*= require latinise */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.Wikis = (function() { + function Wikis() { + this.slugify = bind(this.slugify, this); + $('.new-wiki-page').on('submit', (function(_this) { + return function(e) { + var field, path, slug; + $('[data-error~=slug]').addClass('hidden'); + field = $('#new_wiki_path'); + slug = _this.slugify(field.val()); + if (slug.length > 0) { + path = field.attr('data-wikis-path'); + location.href = path + '/' + slug; + return e.preventDefault(); + } + }; + })(this)); + } + + Wikis.prototype.dasherize = function(value) { + return value.replace(/[_\s]+/g, '-'); + }; + + Wikis.prototype.slugify = function(value) { + return this.dasherize(value.trim().toLowerCase().latinise()); + }; + + return Wikis; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/wikis.js.coffee b/app/assets/javascripts/wikis.js.coffee deleted file mode 100644 index 1ee827f1fa3..00000000000 --- a/app/assets/javascripts/wikis.js.coffee +++ /dev/null @@ -1,19 +0,0 @@ -#= require latinise - -class @Wikis - constructor: -> - $('.new-wiki-page').on 'submit', (e) => - $('[data-error~=slug]').addClass('hidden') - field = $('#new_wiki_path') - slug = @slugify(field.val()) - - if (slug.length > 0) - path = field.attr('data-wikis-path') - location.href = path + '/' + slug - e.preventDefault() - - dasherize: (value) -> - value.replace(/[_\s]+/g, '-') - - slugify: (value) => - @dasherize(value.trim().toLowerCase().latinise()) diff --git a/app/assets/javascripts/zen_mode.js b/app/assets/javascripts/zen_mode.js new file mode 100644 index 00000000000..71236c6a27d --- /dev/null +++ b/app/assets/javascripts/zen_mode.js @@ -0,0 +1,80 @@ + +/*= provides zen_mode:enter */ + + +/*= provides zen_mode:leave */ + + +/*= require jquery.scrollTo */ + + +/*= require dropzone */ + + +/*= require mousetrap */ + + +/*= require mousetrap/pause */ + +(function() { + this.ZenMode = (function() { + function ZenMode() { + this.active_backdrop = null; + this.active_textarea = null; + $(document).on('click', '.js-zen-enter', function(e) { + e.preventDefault(); + return $(e.currentTarget).trigger('zen_mode:enter'); + }); + $(document).on('click', '.js-zen-leave', function(e) { + e.preventDefault(); + return $(e.currentTarget).trigger('zen_mode:leave'); + }); + $(document).on('zen_mode:enter', (function(_this) { + return function(e) { + return _this.enter($(e.target).closest('.md-area').find('.zen-backdrop')); + }; + })(this)); + $(document).on('zen_mode:leave', (function(_this) { + return function(e) { + return _this.exit(); + }; + })(this)); + $(document).on('keydown', function(e) { + if (e.keyCode === 27) { + e.preventDefault(); + return $(document).trigger('zen_mode:leave'); + } + }); + } + + ZenMode.prototype.enter = function(backdrop) { + Mousetrap.pause(); + this.active_backdrop = $(backdrop); + this.active_backdrop.addClass('fullscreen'); + this.active_textarea = this.active_backdrop.find('textarea'); + this.active_textarea.removeAttr('style'); + return this.active_textarea.focus(); + }; + + ZenMode.prototype.exit = function() { + if (this.active_textarea) { + Mousetrap.unpause(); + this.active_textarea.closest('.zen-backdrop').removeClass('fullscreen'); + this.scrollTo(this.active_textarea); + this.active_textarea = null; + this.active_backdrop = null; + return Dropzone.forElement('.div-dropzone').enable(); + } + }; + + ZenMode.prototype.scrollTo = function(zen_area) { + return $.scrollTo(zen_area, 0, { + offset: -150 + }); + }; + + return ZenMode; + + })(); + +}).call(this); diff --git a/app/assets/javascripts/zen_mode.js.coffee b/app/assets/javascripts/zen_mode.js.coffee deleted file mode 100644 index 99f35ecfb0f..00000000000 --- a/app/assets/javascripts/zen_mode.js.coffee +++ /dev/null @@ -1,80 +0,0 @@ -# Zen Mode (full screen) textarea -# -#= provides zen_mode:enter -#= provides zen_mode:leave -# -#= require jquery.scrollTo -#= require dropzone -#= require mousetrap -#= require mousetrap/pause -# -# ### Events -# -# `zen_mode:enter` -# -# Fired when the "Edit in fullscreen" link is clicked. -# -# **Synchronicity** Sync -# **Bubbles** Yes -# **Cancelable** No -# **Target** a.js-zen-enter -# -# `zen_mode:leave` -# -# Fired when the "Leave Fullscreen" link is clicked. -# -# **Synchronicity** Sync -# **Bubbles** Yes -# **Cancelable** No -# **Target** a.js-zen-leave -# -class @ZenMode - constructor: -> - @active_backdrop = null - @active_textarea = null - - $(document).on 'click', '.js-zen-enter', (e) -> - e.preventDefault() - $(e.currentTarget).trigger('zen_mode:enter') - - $(document).on 'click', '.js-zen-leave', (e) -> - e.preventDefault() - $(e.currentTarget).trigger('zen_mode:leave') - - $(document).on 'zen_mode:enter', (e) => - @enter($(e.target).closest('.md-area').find('.zen-backdrop')) - $(document).on 'zen_mode:leave', (e) => - @exit() - - $(document).on 'keydown', (e) -> - if e.keyCode == 27 # Esc - e.preventDefault() - $(document).trigger('zen_mode:leave') - - enter: (backdrop) -> - Mousetrap.pause() - - @active_backdrop = $(backdrop) - @active_backdrop.addClass('fullscreen') - - @active_textarea = @active_backdrop.find('textarea') - - # Prevent a user-resized textarea from persisting to fullscreen - @active_textarea.removeAttr('style') - @active_textarea.focus() - - exit: -> - if @active_textarea - Mousetrap.unpause() - - @active_textarea.closest('.zen-backdrop').removeClass('fullscreen') - - @scrollTo(@active_textarea) - - @active_textarea = null - @active_backdrop = null - - Dropzone.forElement('.div-dropzone').enable() - - scrollTo: (zen_area) -> - $.scrollTo(zen_area, 0, offset: -150) diff --git a/spec/javascripts/application_spec.js b/spec/javascripts/application_spec.js new file mode 100644 index 00000000000..b48026c3b77 --- /dev/null +++ b/spec/javascripts/application_spec.js @@ -0,0 +1,32 @@ + +/*= require lib/utils/common_utils */ + +(function() { + describe('Application', function() { + return describe('disable buttons', function() { + fixture.preload('application.html'); + beforeEach(function() { + return fixture.load('application.html'); + }); + it('should prevent default action for disabled buttons', function() { + var $button, isClicked; + gl.utils.preventDisabledButtons(); + isClicked = false; + $button = $('#test-button'); + $button.click(function() { + return isClicked = true; + }); + $button.trigger('click'); + return expect(isClicked).toBe(false); + }); + return it('should be on the same page if a disabled link clicked', function() { + var locationBeforeLinkClick; + locationBeforeLinkClick = window.location.href; + gl.utils.preventDisabledButtons(); + $('#test-link').click(); + return expect(window.location.href).toBe(locationBeforeLinkClick); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/application_spec.js.coffee b/spec/javascripts/application_spec.js.coffee deleted file mode 100644 index 4b6a2bb5440..00000000000 --- a/spec/javascripts/application_spec.js.coffee +++ /dev/null @@ -1,30 +0,0 @@ -#= require lib/utils/common_utils - -describe 'Application', -> - describe 'disable buttons', -> - fixture.preload('application.html') - - beforeEach -> - fixture.load('application.html') - - it 'should prevent default action for disabled buttons', -> - - gl.utils.preventDisabledButtons() - - isClicked = false - $button = $ '#test-button' - - $button.click -> isClicked = true - $button.trigger 'click' - - expect(isClicked).toBe false - - - it 'should be on the same page if a disabled link clicked', -> - - locationBeforeLinkClick = window.location.href - gl.utils.preventDisabledButtons() - - $('#test-link').click() - - expect(window.location.href).toBe locationBeforeLinkClick diff --git a/spec/javascripts/awards_handler_spec.js b/spec/javascripts/awards_handler_spec.js new file mode 100644 index 00000000000..3ddc163033e --- /dev/null +++ b/spec/javascripts/awards_handler_spec.js @@ -0,0 +1,187 @@ + +/*= require awards_handler */ + + +/*= require jquery */ + + +/*= require jquery.cookie */ + + +/*= require ./fixtures/emoji_menu */ + +(function() { + var awardsHandler, lazyAssert; + + awardsHandler = null; + + window.gl || (window.gl = {}); + + window.gon || (window.gon = {}); + + gl.emojiAliases = function() { + return { + '+1': 'thumbsup', + '-1': 'thumbsdown' + }; + }; + + gon.award_menu_url = '/emojis'; + + lazyAssert = function(done, assertFn) { + return setTimeout(function() { + assertFn(); + return done(); + }, 333); + }; + + describe('AwardsHandler', function() { + fixture.preload('awards_handler.html'); + beforeEach(function() { + fixture.load('awards_handler.html'); + awardsHandler = new AwardsHandler; + spyOn(awardsHandler, 'postEmoji').and.callFake((function(_this) { + return function(url, emoji, cb) { + return cb(); + }; + })(this)); + return spyOn(jQuery, 'get').and.callFake(function(req, cb) { + return cb(window.emojiMenu); + }); + }); + describe('::showEmojiMenu', function() { + it('should show emoji menu when Add emoji button clicked', function(done) { + $('.js-add-award').eq(0).click(); + return lazyAssert(done, function() { + var $emojiMenu; + $emojiMenu = $('.emoji-menu'); + expect($emojiMenu.length).toBe(1); + expect($emojiMenu.hasClass('is-visible')).toBe(true); + expect($emojiMenu.find('#emoji_search').length).toBe(1); + return expect($('.js-awards-block.current').length).toBe(1); + }); + }); + it('should also show emoji menu for the smiley icon in notes', function(done) { + $('.note-action-button').click(); + return lazyAssert(done, function() { + var $emojiMenu; + $emojiMenu = $('.emoji-menu'); + return expect($emojiMenu.length).toBe(1); + }); + }); + return it('should remove emoji menu when body is clicked', function(done) { + $('.js-add-award').eq(0).click(); + return lazyAssert(done, function() { + var $emojiMenu; + $emojiMenu = $('.emoji-menu'); + $('body').click(); + expect($emojiMenu.length).toBe(1); + expect($emojiMenu.hasClass('is-visible')).toBe(false); + return expect($('.js-awards-block.current').length).toBe(0); + }); + }); + }); + describe('::addAwardToEmojiBar', function() { + it('should add emoji to votes block', function() { + var $emojiButton, $votesBlock; + $votesBlock = $('.js-awards-block').eq(0); + awardsHandler.addAwardToEmojiBar($votesBlock, 'heart', false); + $emojiButton = $votesBlock.find('[data-emoji=heart]'); + expect($emojiButton.length).toBe(1); + expect($emojiButton.next('.js-counter').text()).toBe('1'); + return expect($votesBlock.hasClass('hidden')).toBe(false); + }); + it('should remove the emoji when we click again', function() { + var $emojiButton, $votesBlock; + $votesBlock = $('.js-awards-block').eq(0); + awardsHandler.addAwardToEmojiBar($votesBlock, 'heart', false); + awardsHandler.addAwardToEmojiBar($votesBlock, 'heart', false); + $emojiButton = $votesBlock.find('[data-emoji=heart]'); + return expect($emojiButton.length).toBe(0); + }); + return it('should decrement the emoji counter', function() { + var $emojiButton, $votesBlock; + $votesBlock = $('.js-awards-block').eq(0); + awardsHandler.addAwardToEmojiBar($votesBlock, 'heart', false); + $emojiButton = $votesBlock.find('[data-emoji=heart]'); + $emojiButton.next('.js-counter').text(5); + awardsHandler.addAwardToEmojiBar($votesBlock, 'heart', false); + expect($emojiButton.length).toBe(1); + return expect($emojiButton.next('.js-counter').text()).toBe('4'); + }); + }); + describe('::getAwardUrl', function() { + return it('should return the url for request', function() { + return expect(awardsHandler.getAwardUrl()).toBe('/gitlab-org/gitlab-test/issues/8/toggle_award_emoji'); + }); + }); + describe('::addAward and ::checkMutuality', function() { + return it('should handle :+1: and :-1: mutuality', function() { + var $thumbsDownEmoji, $thumbsUpEmoji, $votesBlock, awardUrl; + awardUrl = awardsHandler.getAwardUrl(); + $votesBlock = $('.js-awards-block').eq(0); + $thumbsUpEmoji = $votesBlock.find('[data-emoji=thumbsup]').parent(); + $thumbsDownEmoji = $votesBlock.find('[data-emoji=thumbsdown]').parent(); + awardsHandler.addAward($votesBlock, awardUrl, 'thumbsup', false); + expect($thumbsUpEmoji.hasClass('active')).toBe(true); + expect($thumbsDownEmoji.hasClass('active')).toBe(false); + $thumbsUpEmoji.tooltip(); + $thumbsDownEmoji.tooltip(); + awardsHandler.addAward($votesBlock, awardUrl, 'thumbsdown', true); + expect($thumbsUpEmoji.hasClass('active')).toBe(false); + return expect($thumbsDownEmoji.hasClass('active')).toBe(true); + }); + }); + describe('::removeEmoji', function() { + return it('should remove emoji', function() { + var $votesBlock, awardUrl; + awardUrl = awardsHandler.getAwardUrl(); + $votesBlock = $('.js-awards-block').eq(0); + awardsHandler.addAward($votesBlock, awardUrl, 'fire', false); + expect($votesBlock.find('[data-emoji=fire]').length).toBe(1); + awardsHandler.removeEmoji($votesBlock.find('[data-emoji=fire]').closest('button')); + return expect($votesBlock.find('[data-emoji=fire]').length).toBe(0); + }); + }); + describe('search', function() { + return it('should filter the emoji', function() { + $('.js-add-award').eq(0).click(); + expect($('[data-emoji=angel]').is(':visible')).toBe(true); + expect($('[data-emoji=anger]').is(':visible')).toBe(true); + $('#emoji_search').val('ali').trigger('keyup'); + expect($('[data-emoji=angel]').is(':visible')).toBe(false); + expect($('[data-emoji=anger]').is(':visible')).toBe(false); + return expect($('[data-emoji=alien]').is(':visible')).toBe(true); + }); + }); + return describe('emoji menu', function() { + var openEmojiMenuAndAddEmoji, selector; + selector = '[data-emoji=sunglasses]'; + openEmojiMenuAndAddEmoji = function() { + var $block, $emoji, $menu; + $('.js-add-award').eq(0).click(); + $menu = $('.emoji-menu'); + $block = $('.js-awards-block'); + $emoji = $menu.find(".emoji-menu-list-item " + selector); + expect($emoji.length).toBe(1); + expect($block.find(selector).length).toBe(0); + $emoji.click(); + expect($menu.hasClass('.is-visible')).toBe(false); + return expect($block.find(selector).length).toBe(1); + }; + it('should add selected emoji to awards block', function() { + return openEmojiMenuAndAddEmoji(); + }); + return it('should remove already selected emoji', function() { + var $block, $emoji; + openEmojiMenuAndAddEmoji(); + $('.js-add-award').eq(0).click(); + $block = $('.js-awards-block'); + $emoji = $('.emoji-menu').find(".emoji-menu-list-item " + selector); + $emoji.click(); + return expect($block.find(selector).length).toBe(0); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/awards_handler_spec.js.coffee b/spec/javascripts/awards_handler_spec.js.coffee deleted file mode 100644 index d7f9c6fc076..00000000000 --- a/spec/javascripts/awards_handler_spec.js.coffee +++ /dev/null @@ -1,200 +0,0 @@ -#= require awards_handler -#= require jquery -#= require jquery.cookie -#= require ./fixtures/emoji_menu - -awardsHandler = null -window.gl or= {} -window.gon or= {} -gl.emojiAliases = -> return { '+1': 'thumbsup', '-1': 'thumbsdown' } -gon.award_menu_url = '/emojis' - - -lazyAssert = (done, assertFn) -> - - setTimeout -> # Maybe jasmine.clock here? - assertFn() - done() - , 333 - - -describe 'AwardsHandler', -> - - fixture.preload 'awards_handler.html' - - beforeEach -> - fixture.load 'awards_handler.html' - awardsHandler = new AwardsHandler - spyOn(awardsHandler, 'postEmoji').and.callFake (url, emoji, cb) => cb() - spyOn(jQuery, 'get').and.callFake (req, cb) -> cb window.emojiMenu - - - describe '::showEmojiMenu', -> - - it 'should show emoji menu when Add emoji button clicked', (done) -> - - $('.js-add-award').eq(0).click() - - lazyAssert done, -> - $emojiMenu = $ '.emoji-menu' - expect($emojiMenu.length).toBe 1 - expect($emojiMenu.hasClass('is-visible')).toBe yes - expect($emojiMenu.find('#emoji_search').length).toBe 1 - expect($('.js-awards-block.current').length).toBe 1 - - - it 'should also show emoji menu for the smiley icon in notes', (done) -> - - $('.note-action-button').click() - - lazyAssert done, -> - $emojiMenu = $ '.emoji-menu' - expect($emojiMenu.length).toBe 1 - - - it 'should remove emoji menu when body is clicked', (done) -> - - $('.js-add-award').eq(0).click() - - lazyAssert done, -> - $emojiMenu = $('.emoji-menu') - $('body').click() - expect($emojiMenu.length).toBe 1 - expect($emojiMenu.hasClass('is-visible')).toBe no - expect($('.js-awards-block.current').length).toBe 0 - - - describe '::addAwardToEmojiBar', -> - - it 'should add emoji to votes block', -> - - $votesBlock = $('.js-awards-block').eq 0 - awardsHandler.addAwardToEmojiBar $votesBlock, 'heart', no - - $emojiButton = $votesBlock.find '[data-emoji=heart]' - - expect($emojiButton.length).toBe 1 - expect($emojiButton.next('.js-counter').text()).toBe '1' - expect($votesBlock.hasClass('hidden')).toBe no - - - it 'should remove the emoji when we click again', -> - - $votesBlock = $('.js-awards-block').eq 0 - awardsHandler.addAwardToEmojiBar $votesBlock, 'heart', no - awardsHandler.addAwardToEmojiBar $votesBlock, 'heart', no - $emojiButton = $votesBlock.find '[data-emoji=heart]' - - expect($emojiButton.length).toBe 0 - - - it 'should decrement the emoji counter', -> - - $votesBlock = $('.js-awards-block').eq 0 - awardsHandler.addAwardToEmojiBar $votesBlock, 'heart', no - - $emojiButton = $votesBlock.find '[data-emoji=heart]' - $emojiButton.next('.js-counter').text 5 - - awardsHandler.addAwardToEmojiBar $votesBlock, 'heart', no - - expect($emojiButton.length).toBe 1 - expect($emojiButton.next('.js-counter').text()).toBe '4' - - - describe '::getAwardUrl', -> - - it 'should return the url for request', -> - - expect(awardsHandler.getAwardUrl()).toBe '/gitlab-org/gitlab-test/issues/8/toggle_award_emoji' - - - describe '::addAward and ::checkMutuality', -> - - it 'should handle :+1: and :-1: mutuality', -> - - awardUrl = awardsHandler.getAwardUrl() - $votesBlock = $('.js-awards-block').eq 0 - $thumbsUpEmoji = $votesBlock.find('[data-emoji=thumbsup]').parent() - $thumbsDownEmoji = $votesBlock.find('[data-emoji=thumbsdown]').parent() - - awardsHandler.addAward $votesBlock, awardUrl, 'thumbsup', no - - expect($thumbsUpEmoji.hasClass('active')).toBe yes - expect($thumbsDownEmoji.hasClass('active')).toBe no - - $thumbsUpEmoji.tooltip() - $thumbsDownEmoji.tooltip() - - awardsHandler.addAward $votesBlock, awardUrl, 'thumbsdown', yes - - expect($thumbsUpEmoji.hasClass('active')).toBe no - expect($thumbsDownEmoji.hasClass('active')).toBe yes - - - describe '::removeEmoji', -> - - it 'should remove emoji', -> - - awardUrl = awardsHandler.getAwardUrl() - $votesBlock = $('.js-awards-block').eq 0 - - awardsHandler.addAward $votesBlock, awardUrl, 'fire', no - expect($votesBlock.find('[data-emoji=fire]').length).toBe 1 - - awardsHandler.removeEmoji $votesBlock.find('[data-emoji=fire]').closest('button') - expect($votesBlock.find('[data-emoji=fire]').length).toBe 0 - - - describe 'search', -> - - it 'should filter the emoji', -> - - $('.js-add-award').eq(0).click() - - expect($('[data-emoji=angel]').is(':visible')).toBe yes - expect($('[data-emoji=anger]').is(':visible')).toBe yes - - $('#emoji_search').val('ali').trigger 'keyup' - - expect($('[data-emoji=angel]').is(':visible')).toBe no - expect($('[data-emoji=anger]').is(':visible')).toBe no - expect($('[data-emoji=alien]').is(':visible')).toBe yes - - - describe 'emoji menu', -> - - selector = '[data-emoji=sunglasses]' - - openEmojiMenuAndAddEmoji = -> - - $('.js-add-award').eq(0).click() - - $menu = $ '.emoji-menu' - $block = $ '.js-awards-block' - $emoji = $menu.find ".emoji-menu-list-item #{selector}" - - expect($emoji.length).toBe 1 - expect($block.find(selector).length).toBe 0 - - $emoji.click() - - expect($menu.hasClass('.is-visible')).toBe no - expect($block.find(selector).length).toBe 1 - - - it 'should add selected emoji to awards block', -> - - openEmojiMenuAndAddEmoji() - - - it 'should remove already selected emoji', -> - - openEmojiMenuAndAddEmoji() - $('.js-add-award').eq(0).click() - - $block = $ '.js-awards-block' - $emoji = $('.emoji-menu').find ".emoji-menu-list-item #{selector}" - - $emoji.click() - expect($block.find(selector).length).toBe 0 diff --git a/spec/javascripts/behaviors/autosize_spec.js b/spec/javascripts/behaviors/autosize_spec.js new file mode 100644 index 00000000000..78795f7654a --- /dev/null +++ b/spec/javascripts/behaviors/autosize_spec.js @@ -0,0 +1,21 @@ + +/*= require behaviors/autosize */ + +(function() { + describe('Autosize behavior', function() { + var load; + beforeEach(function() { + return fixture.set(''); + }); + it('does not overwrite the resize property', function() { + load(); + return expect($('textarea')).toHaveCss({ + resize: 'vertical' + }); + }); + return load = function() { + return $(document).trigger('page:load'); + }; + }); + +}).call(this); diff --git a/spec/javascripts/behaviors/autosize_spec.js.coffee b/spec/javascripts/behaviors/autosize_spec.js.coffee deleted file mode 100644 index 7fc1d19c35f..00000000000 --- a/spec/javascripts/behaviors/autosize_spec.js.coffee +++ /dev/null @@ -1,11 +0,0 @@ -#= require behaviors/autosize - -describe 'Autosize behavior', -> - beforeEach -> - fixture.set('') - - it 'does not overwrite the resize property', -> - load() - expect($('textarea')).toHaveCss(resize: 'vertical') - - load = -> $(document).trigger('page:load') diff --git a/spec/javascripts/behaviors/quick_submit_spec.js b/spec/javascripts/behaviors/quick_submit_spec.js new file mode 100644 index 00000000000..4c52ecd903d --- /dev/null +++ b/spec/javascripts/behaviors/quick_submit_spec.js @@ -0,0 +1,93 @@ + +/*= require behaviors/quick_submit */ + +(function() { + describe('Quick Submit behavior', function() { + var keydownEvent; + fixture.preload('behaviors/quick_submit.html'); + beforeEach(function() { + fixture.load('behaviors/quick_submit.html'); + $('form').submit(function(e) { + return e.preventDefault(); + }); + return this.spies = { + submit: spyOnEvent('form', 'submit') + }; + }); + it('does not respond to other keyCodes', function() { + $('input.quick-submit-input').trigger(keydownEvent({ + keyCode: 32 + })); + return expect(this.spies.submit).not.toHaveBeenTriggered(); + }); + it('does not respond to Enter alone', function() { + $('input.quick-submit-input').trigger(keydownEvent({ + ctrlKey: false, + metaKey: false + })); + return expect(this.spies.submit).not.toHaveBeenTriggered(); + }); + it('does not respond to repeated events', function() { + $('input.quick-submit-input').trigger(keydownEvent({ + repeat: true + })); + return expect(this.spies.submit).not.toHaveBeenTriggered(); + }); + it('disables submit buttons', function() { + $('textarea').trigger(keydownEvent()); + expect($('input[type=submit]')).toBeDisabled(); + return expect($('button[type=submit]')).toBeDisabled(); + }); + if (navigator.userAgent.match(/Macintosh/)) { + it('responds to Meta+Enter', function() { + $('input.quick-submit-input').trigger(keydownEvent()); + return expect(this.spies.submit).toHaveBeenTriggered(); + }); + it('excludes other modifier keys', function() { + $('input.quick-submit-input').trigger(keydownEvent({ + altKey: true + })); + $('input.quick-submit-input').trigger(keydownEvent({ + ctrlKey: true + })); + $('input.quick-submit-input').trigger(keydownEvent({ + shiftKey: true + })); + return expect(this.spies.submit).not.toHaveBeenTriggered(); + }); + } else { + it('responds to Ctrl+Enter', function() { + $('input.quick-submit-input').trigger(keydownEvent()); + return expect(this.spies.submit).toHaveBeenTriggered(); + }); + it('excludes other modifier keys', function() { + $('input.quick-submit-input').trigger(keydownEvent({ + altKey: true + })); + $('input.quick-submit-input').trigger(keydownEvent({ + metaKey: true + })); + $('input.quick-submit-input').trigger(keydownEvent({ + shiftKey: true + })); + return expect(this.spies.submit).not.toHaveBeenTriggered(); + }); + } + return keydownEvent = function(options) { + var defaults; + if (navigator.userAgent.match(/Macintosh/)) { + defaults = { + keyCode: 13, + metaKey: true + }; + } else { + defaults = { + keyCode: 13, + ctrlKey: true + }; + } + return $.Event('keydown', $.extend({}, defaults, options)); + }; + }); + +}).call(this); diff --git a/spec/javascripts/behaviors/quick_submit_spec.js.coffee b/spec/javascripts/behaviors/quick_submit_spec.js.coffee deleted file mode 100644 index d3b003a328a..00000000000 --- a/spec/javascripts/behaviors/quick_submit_spec.js.coffee +++ /dev/null @@ -1,70 +0,0 @@ -#= require behaviors/quick_submit - -describe 'Quick Submit behavior', -> - fixture.preload('behaviors/quick_submit.html') - - beforeEach -> - fixture.load('behaviors/quick_submit.html') - - # Prevent a form submit from moving us off the testing page - $('form').submit (e) -> e.preventDefault() - - @spies = { - submit: spyOnEvent('form', 'submit') - } - - it 'does not respond to other keyCodes', -> - $('input.quick-submit-input').trigger(keydownEvent(keyCode: 32)) - - expect(@spies.submit).not.toHaveBeenTriggered() - - it 'does not respond to Enter alone', -> - $('input.quick-submit-input').trigger(keydownEvent(ctrlKey: false, metaKey: false)) - - expect(@spies.submit).not.toHaveBeenTriggered() - - it 'does not respond to repeated events', -> - $('input.quick-submit-input').trigger(keydownEvent(repeat: true)) - - expect(@spies.submit).not.toHaveBeenTriggered() - - it 'disables submit buttons', -> - $('textarea').trigger(keydownEvent()) - - expect($('input[type=submit]')).toBeDisabled() - expect($('button[type=submit]')).toBeDisabled() - - # We cannot stub `navigator.userAgent` for CI's `rake teaspoon` task, so we'll - # only run the tests that apply to the current platform - if navigator.userAgent.match(/Macintosh/) - it 'responds to Meta+Enter', -> - $('input.quick-submit-input').trigger(keydownEvent()) - - expect(@spies.submit).toHaveBeenTriggered() - - it 'excludes other modifier keys', -> - $('input.quick-submit-input').trigger(keydownEvent(altKey: true)) - $('input.quick-submit-input').trigger(keydownEvent(ctrlKey: true)) - $('input.quick-submit-input').trigger(keydownEvent(shiftKey: true)) - - expect(@spies.submit).not.toHaveBeenTriggered() - else - it 'responds to Ctrl+Enter', -> - $('input.quick-submit-input').trigger(keydownEvent()) - - expect(@spies.submit).toHaveBeenTriggered() - - it 'excludes other modifier keys', -> - $('input.quick-submit-input').trigger(keydownEvent(altKey: true)) - $('input.quick-submit-input').trigger(keydownEvent(metaKey: true)) - $('input.quick-submit-input').trigger(keydownEvent(shiftKey: true)) - - expect(@spies.submit).not.toHaveBeenTriggered() - - keydownEvent = (options) -> - if navigator.userAgent.match(/Macintosh/) - defaults = { keyCode: 13, metaKey: true } - else - defaults = { keyCode: 13, ctrlKey: true } - - $.Event('keydown', $.extend({}, defaults, options)) diff --git a/spec/javascripts/behaviors/requires_input_spec.js b/spec/javascripts/behaviors/requires_input_spec.js new file mode 100644 index 00000000000..724c3baf989 --- /dev/null +++ b/spec/javascripts/behaviors/requires_input_spec.js @@ -0,0 +1,44 @@ + +/*= require behaviors/requires_input */ + +(function() { + describe('requiresInput', function() { + fixture.preload('behaviors/requires_input.html'); + beforeEach(function() { + return fixture.load('behaviors/requires_input.html'); + }); + it('disables submit when any field is required', function() { + $('.js-requires-input').requiresInput(); + return expect($('.submit')).toBeDisabled(); + }); + it('enables submit when no field is required', function() { + $('*[required=required]').removeAttr('required'); + $('.js-requires-input').requiresInput(); + return expect($('.submit')).not.toBeDisabled(); + }); + it('enables submit when all required fields are pre-filled', function() { + $('*[required=required]').remove(); + $('.js-requires-input').requiresInput(); + return expect($('.submit')).not.toBeDisabled(); + }); + it('enables submit when all required fields receive input', function() { + $('.js-requires-input').requiresInput(); + $('#required1').val('input1').change(); + expect($('.submit')).toBeDisabled(); + $('#optional1').val('input1').change(); + expect($('.submit')).toBeDisabled(); + $('#required2').val('input2').change(); + $('#required3').val('input3').change(); + $('#required4').val('input4').change(); + $('#required5').val('1').change(); + return expect($('.submit')).not.toBeDisabled(); + }); + return it('is called on page:load event', function() { + var spy; + spy = spyOn($.fn, 'requiresInput'); + $(document).trigger('page:load'); + return expect(spy).toHaveBeenCalled(); + }); + }); + +}).call(this); diff --git a/spec/javascripts/behaviors/requires_input_spec.js.coffee b/spec/javascripts/behaviors/requires_input_spec.js.coffee deleted file mode 100644 index 61a17632173..00000000000 --- a/spec/javascripts/behaviors/requires_input_spec.js.coffee +++ /dev/null @@ -1,49 +0,0 @@ -#= require behaviors/requires_input - -describe 'requiresInput', -> - fixture.preload('behaviors/requires_input.html') - - beforeEach -> - fixture.load('behaviors/requires_input.html') - - it 'disables submit when any field is required', -> - $('.js-requires-input').requiresInput() - - expect($('.submit')).toBeDisabled() - - it 'enables submit when no field is required', -> - $('*[required=required]').removeAttr('required') - - $('.js-requires-input').requiresInput() - - expect($('.submit')).not.toBeDisabled() - - it 'enables submit when all required fields are pre-filled', -> - $('*[required=required]').remove() - - $('.js-requires-input').requiresInput() - - expect($('.submit')).not.toBeDisabled() - - it 'enables submit when all required fields receive input', -> - $('.js-requires-input').requiresInput() - - $('#required1').val('input1').change() - expect($('.submit')).toBeDisabled() - - $('#optional1').val('input1').change() - expect($('.submit')).toBeDisabled() - - $('#required2').val('input2').change() - $('#required3').val('input3').change() - $('#required4').val('input4').change() - $('#required5').val('1').change() - - expect($('.submit')).not.toBeDisabled() - - it 'is called on page:load event', -> - spy = spyOn($.fn, 'requiresInput') - - $(document).trigger('page:load') - - expect(spy).toHaveBeenCalled() diff --git a/spec/javascripts/extensions/array_spec.js b/spec/javascripts/extensions/array_spec.js new file mode 100644 index 00000000000..eced2f6575d --- /dev/null +++ b/spec/javascripts/extensions/array_spec.js @@ -0,0 +1,22 @@ + +/*= require extensions/array */ + +(function() { + describe('Array extensions', function() { + describe('first', function() { + return it('returns the first item', function() { + var arr; + arr = [0, 1, 2, 3, 4, 5]; + return expect(arr.first()).toBe(0); + }); + }); + return describe('last', function() { + return it('returns the last item', function() { + var arr; + arr = [0, 1, 2, 3, 4, 5]; + return expect(arr.last()).toBe(5); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/extensions/array_spec.js.coffee b/spec/javascripts/extensions/array_spec.js.coffee deleted file mode 100644 index 4ceac619422..00000000000 --- a/spec/javascripts/extensions/array_spec.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -#= require extensions/array - -describe 'Array extensions', -> - describe 'first', -> - it 'returns the first item', -> - arr = [0, 1, 2, 3, 4, 5] - expect(arr.first()).toBe(0) - - describe 'last', -> - it 'returns the last item', -> - arr = [0, 1, 2, 3, 4, 5] - expect(arr.last()).toBe(5) diff --git a/spec/javascripts/extensions/jquery_spec.js b/spec/javascripts/extensions/jquery_spec.js new file mode 100644 index 00000000000..b644344b95a --- /dev/null +++ b/spec/javascripts/extensions/jquery_spec.js @@ -0,0 +1,42 @@ + +/*= require extensions/jquery */ + +(function() { + describe('jQuery extensions', function() { + describe('disable', function() { + beforeEach(function() { + return fixture.set(''); + }); + it('adds the disabled attribute', function() { + var $input; + $input = $('input').first(); + $input.disable(); + return expect($input).toHaveAttr('disabled', 'disabled'); + }); + return it('adds the disabled class', function() { + var $input; + $input = $('input').first(); + $input.disable(); + return expect($input).toHaveClass('disabled'); + }); + }); + return describe('enable', function() { + beforeEach(function() { + return fixture.set(''); + }); + it('removes the disabled attribute', function() { + var $input; + $input = $('input').first(); + $input.enable(); + return expect($input).not.toHaveAttr('disabled'); + }); + return it('removes the disabled class', function() { + var $input; + $input = $('input').first(); + $input.enable(); + return expect($input).not.toHaveClass('disabled'); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/extensions/jquery_spec.js.coffee b/spec/javascripts/extensions/jquery_spec.js.coffee deleted file mode 100644 index b10e16b7d01..00000000000 --- a/spec/javascripts/extensions/jquery_spec.js.coffee +++ /dev/null @@ -1,34 +0,0 @@ -#= require extensions/jquery - -describe 'jQuery extensions', -> - describe 'disable', -> - beforeEach -> - fixture.set '' - - it 'adds the disabled attribute', -> - $input = $('input').first() - - $input.disable() - expect($input).toHaveAttr('disabled', 'disabled') - - it 'adds the disabled class', -> - $input = $('input').first() - - $input.disable() - expect($input).toHaveClass('disabled') - - describe 'enable', -> - beforeEach -> - fixture.set '' - - it 'removes the disabled attribute', -> - $input = $('input').first() - - $input.enable() - expect($input).not.toHaveAttr('disabled') - - it 'removes the disabled class', -> - $input = $('input').first() - - $input.enable() - expect($input).not.toHaveClass('disabled') diff --git a/spec/javascripts/fixtures/emoji_menu.coffee b/spec/javascripts/fixtures/emoji_menu.coffee deleted file mode 100644 index ce1a41390d2..00000000000 --- a/spec/javascripts/fixtures/emoji_menu.coffee +++ /dev/null @@ -1,957 +0,0 @@ -window.emojiMenu = """ -
                - -
                -
                - Emoticons -
                -
                  -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                • - -
                • -
                -
                -
                -""" diff --git a/spec/javascripts/fixtures/emoji_menu.js b/spec/javascripts/fixtures/emoji_menu.js new file mode 100644 index 00000000000..99e3f7247bd --- /dev/null +++ b/spec/javascripts/fixtures/emoji_menu.js @@ -0,0 +1,4 @@ +(function() { + window.emojiMenu = "
                \n \n
                \n
                \n Emoticons\n
                \n
                  \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                • \n \n
                • \n
                \n
                \n
                "; + +}).call(this); diff --git a/spec/javascripts/issue_spec.js b/spec/javascripts/issue_spec.js new file mode 100644 index 00000000000..dc6231ebb38 --- /dev/null +++ b/spec/javascripts/issue_spec.js @@ -0,0 +1,121 @@ + +/*= require lib/utils/text_utility */ + + +/*= require issue */ + +(function() { + describe('Issue', function() { + return describe('task lists', function() { + fixture.preload('issues_show.html'); + beforeEach(function() { + fixture.load('issues_show.html'); + return this.issue = new Issue(); + }); + it('modifies the Markdown field', function() { + spyOn(jQuery, 'ajax').and.stub(); + $('input[type=checkbox]').attr('checked', true).trigger('change'); + return expect($('.js-task-list-field').val()).toBe('- [x] Task List Item'); + }); + return it('submits an ajax request on tasklist:changed', function() { + spyOn(jQuery, 'ajax').and.callFake(function(req) { + expect(req.type).toBe('PATCH'); + expect(req.url).toBe('/foo'); + return expect(req.data.issue.description).not.toBe(null); + }); + return $('.js-task-list-field').trigger('tasklist:changed'); + }); + }); + }); + + describe('reopen/close issue', function() { + fixture.preload('issues_show.html'); + beforeEach(function() { + fixture.load('issues_show.html'); + return this.issue = new Issue(); + }); + it('closes an issue', function() { + var $btnClose, $btnReopen; + spyOn(jQuery, 'ajax').and.callFake(function(req) { + expect(req.type).toBe('PUT'); + expect(req.url).toBe('http://gitlab.com/issues/6/close'); + return req.success({ + id: 34 + }); + }); + $btnClose = $('a.btn-close'); + $btnReopen = $('a.btn-reopen'); + expect($btnReopen).toBeHidden(); + expect($btnClose.text()).toBe('Close'); + expect(typeof $btnClose.prop('disabled')).toBe('undefined'); + $btnClose.trigger('click'); + expect($btnReopen).toBeVisible(); + expect($btnClose).toBeHidden(); + expect($('div.status-box-closed')).toBeVisible(); + return expect($('div.status-box-open')).toBeHidden(); + }); + it('fails to close an issue with success:false', function() { + var $btnClose, $btnReopen; + spyOn(jQuery, 'ajax').and.callFake(function(req) { + expect(req.type).toBe('PUT'); + expect(req.url).toBe('http://goesnowhere.nothing/whereami'); + return req.success({ + saved: false + }); + }); + $btnClose = $('a.btn-close'); + $btnReopen = $('a.btn-reopen'); + $btnClose.attr('href', 'http://goesnowhere.nothing/whereami'); + expect($btnReopen).toBeHidden(); + expect($btnClose.text()).toBe('Close'); + expect(typeof $btnClose.prop('disabled')).toBe('undefined'); + $btnClose.trigger('click'); + expect($btnReopen).toBeHidden(); + expect($btnClose).toBeVisible(); + expect($('div.status-box-closed')).toBeHidden(); + expect($('div.status-box-open')).toBeVisible(); + expect($('div.flash-alert')).toBeVisible(); + return expect($('div.flash-alert').text()).toBe('Unable to update this issue at this time.'); + }); + it('fails to closes an issue with HTTP error', function() { + var $btnClose, $btnReopen; + spyOn(jQuery, 'ajax').and.callFake(function(req) { + expect(req.type).toBe('PUT'); + expect(req.url).toBe('http://goesnowhere.nothing/whereami'); + return req.error(); + }); + $btnClose = $('a.btn-close'); + $btnReopen = $('a.btn-reopen'); + $btnClose.attr('href', 'http://goesnowhere.nothing/whereami'); + expect($btnReopen).toBeHidden(); + expect($btnClose.text()).toBe('Close'); + expect(typeof $btnClose.prop('disabled')).toBe('undefined'); + $btnClose.trigger('click'); + expect($btnReopen).toBeHidden(); + expect($btnClose).toBeVisible(); + expect($('div.status-box-closed')).toBeHidden(); + expect($('div.status-box-open')).toBeVisible(); + expect($('div.flash-alert')).toBeVisible(); + return expect($('div.flash-alert').text()).toBe('Unable to update this issue at this time.'); + }); + return it('reopens an issue', function() { + var $btnClose, $btnReopen; + spyOn(jQuery, 'ajax').and.callFake(function(req) { + expect(req.type).toBe('PUT'); + expect(req.url).toBe('http://gitlab.com/issues/6/reopen'); + return req.success({ + id: 34 + }); + }); + $btnClose = $('a.btn-close'); + $btnReopen = $('a.btn-reopen'); + expect($btnReopen.text()).toBe('Reopen'); + $btnReopen.trigger('click'); + expect($btnReopen).toBeHidden(); + expect($btnClose).toBeVisible(); + expect($('div.status-box-open')).toBeVisible(); + return expect($('div.status-box-closed')).toBeHidden(); + }); + }); + +}).call(this); diff --git a/spec/javascripts/issue_spec.js.coffee b/spec/javascripts/issue_spec.js.coffee deleted file mode 100644 index d84d80f266b..00000000000 --- a/spec/javascripts/issue_spec.js.coffee +++ /dev/null @@ -1,109 +0,0 @@ -#= require lib/utils/text_utility -#= require issue - -describe 'Issue', -> - describe 'task lists', -> - fixture.preload('issues_show.html') - - beforeEach -> - fixture.load('issues_show.html') - @issue = new Issue() - - it 'modifies the Markdown field', -> - spyOn(jQuery, 'ajax').and.stub() - $('input[type=checkbox]').attr('checked', true).trigger('change') - expect($('.js-task-list-field').val()).toBe('- [x] Task List Item') - - it 'submits an ajax request on tasklist:changed', -> - spyOn(jQuery, 'ajax').and.callFake (req) -> - expect(req.type).toBe('PATCH') - expect(req.url).toBe('/foo') - expect(req.data.issue.description).not.toBe(null) - - $('.js-task-list-field').trigger('tasklist:changed') -describe 'reopen/close issue', -> - fixture.preload('issues_show.html') - beforeEach -> - fixture.load('issues_show.html') - @issue = new Issue() - it 'closes an issue', -> - spyOn(jQuery, 'ajax').and.callFake (req) -> - expect(req.type).toBe('PUT') - expect(req.url).toBe('http://gitlab.com/issues/6/close') - req.success id: 34 - - $btnClose = $('a.btn-close') - $btnReopen = $('a.btn-reopen') - expect($btnReopen).toBeHidden() - expect($btnClose.text()).toBe('Close') - expect(typeof $btnClose.prop('disabled')).toBe('undefined') - - $btnClose.trigger('click') - - expect($btnReopen).toBeVisible() - expect($btnClose).toBeHidden() - expect($('div.status-box-closed')).toBeVisible() - expect($('div.status-box-open')).toBeHidden() - - it 'fails to close an issue with success:false', -> - - spyOn(jQuery, 'ajax').and.callFake (req) -> - expect(req.type).toBe('PUT') - expect(req.url).toBe('http://goesnowhere.nothing/whereami') - req.success saved: false - - $btnClose = $('a.btn-close') - $btnReopen = $('a.btn-reopen') - $btnClose.attr('href','http://goesnowhere.nothing/whereami') - expect($btnReopen).toBeHidden() - expect($btnClose.text()).toBe('Close') - expect(typeof $btnClose.prop('disabled')).toBe('undefined') - - $btnClose.trigger('click') - - expect($btnReopen).toBeHidden() - expect($btnClose).toBeVisible() - expect($('div.status-box-closed')).toBeHidden() - expect($('div.status-box-open')).toBeVisible() - expect($('div.flash-alert')).toBeVisible() - expect($('div.flash-alert').text()).toBe('Unable to update this issue at this time.') - - it 'fails to closes an issue with HTTP error', -> - - spyOn(jQuery, 'ajax').and.callFake (req) -> - expect(req.type).toBe('PUT') - expect(req.url).toBe('http://goesnowhere.nothing/whereami') - req.error() - - $btnClose = $('a.btn-close') - $btnReopen = $('a.btn-reopen') - $btnClose.attr('href','http://goesnowhere.nothing/whereami') - expect($btnReopen).toBeHidden() - expect($btnClose.text()).toBe('Close') - expect(typeof $btnClose.prop('disabled')).toBe('undefined') - - $btnClose.trigger('click') - - expect($btnReopen).toBeHidden() - expect($btnClose).toBeVisible() - expect($('div.status-box-closed')).toBeHidden() - expect($('div.status-box-open')).toBeVisible() - expect($('div.flash-alert')).toBeVisible() - expect($('div.flash-alert').text()).toBe('Unable to update this issue at this time.') - - it 'reopens an issue', -> - spyOn(jQuery, 'ajax').and.callFake (req) -> - expect(req.type).toBe('PUT') - expect(req.url).toBe('http://gitlab.com/issues/6/reopen') - req.success id: 34 - - $btnClose = $('a.btn-close') - $btnReopen = $('a.btn-reopen') - expect($btnReopen.text()).toBe('Reopen') - - $btnReopen.trigger('click') - - expect($btnReopen).toBeHidden() - expect($btnClose).toBeVisible() - expect($('div.status-box-open')).toBeVisible() - expect($('div.status-box-closed')).toBeHidden() diff --git a/spec/javascripts/line_highlighter_spec.js b/spec/javascripts/line_highlighter_spec.js new file mode 100644 index 00000000000..e2789571607 --- /dev/null +++ b/spec/javascripts/line_highlighter_spec.js @@ -0,0 +1,229 @@ + +/*= require line_highlighter */ + +(function() { + describe('LineHighlighter', function() { + var clickLine; + fixture.preload('line_highlighter.html'); + clickLine = function(number, eventData) { + var e; + if (eventData == null) { + eventData = {}; + } + if ($.isEmptyObject(eventData)) { + return $("#L" + number).mousedown().click(); + } else { + e = $.Event('mousedown', eventData); + return $("#L" + number).trigger(e).click(); + } + }; + beforeEach(function() { + fixture.load('line_highlighter.html'); + this["class"] = new LineHighlighter(); + this.css = this["class"].highlightClass; + return this.spies = { + __setLocationHash__: spyOn(this["class"], '__setLocationHash__').and.callFake(function() {}) + }; + }); + describe('behavior', function() { + it('highlights one line given in the URL hash', function() { + new LineHighlighter('#L13'); + return expect($('#LC13')).toHaveClass(this.css); + }); + it('highlights a range of lines given in the URL hash', function() { + var i, line, results; + new LineHighlighter('#L5-25'); + expect($("." + this.css).length).toBe(21); + results = []; + for (line = i = 5; i <= 25; line = ++i) { + results.push(expect($("#LC" + line)).toHaveClass(this.css)); + } + return results; + }); + it('scrolls to the first highlighted line on initial load', function() { + var spy; + spy = spyOn($, 'scrollTo'); + new LineHighlighter('#L5-25'); + return expect(spy).toHaveBeenCalledWith('#L5', jasmine.anything()); + }); + it('discards click events', function() { + var spy; + spy = spyOnEvent('a[data-line-number]', 'click'); + clickLine(13); + return expect(spy).toHaveBeenPrevented(); + }); + return it('handles garbage input from the hash', function() { + var func; + func = function() { + return new LineHighlighter('#blob-content-holder'); + }; + return expect(func).not.toThrow(); + }); + }); + describe('#clickHandler', function() { + it('discards the mousedown event', function() { + var spy; + spy = spyOnEvent('a[data-line-number]', 'mousedown'); + clickLine(13); + return expect(spy).toHaveBeenPrevented(); + }); + it('handles clicking on a child icon element', function() { + var spy; + spy = spyOn(this["class"], 'setHash').and.callThrough(); + $('#L13 i').mousedown().click(); + expect(spy).toHaveBeenCalledWith(13); + return expect($('#LC13')).toHaveClass(this.css); + }); + describe('without shiftKey', function() { + it('highlights one line when clicked', function() { + clickLine(13); + return expect($('#LC13')).toHaveClass(this.css); + }); + it('unhighlights previously highlighted lines', function() { + clickLine(13); + clickLine(20); + expect($('#LC13')).not.toHaveClass(this.css); + return expect($('#LC20')).toHaveClass(this.css); + }); + return it('sets the hash', function() { + var spy; + spy = spyOn(this["class"], 'setHash').and.callThrough(); + clickLine(13); + return expect(spy).toHaveBeenCalledWith(13); + }); + }); + return describe('with shiftKey', function() { + it('sets the hash', function() { + var spy; + spy = spyOn(this["class"], 'setHash').and.callThrough(); + clickLine(13); + clickLine(20, { + shiftKey: true + }); + expect(spy).toHaveBeenCalledWith(13); + return expect(spy).toHaveBeenCalledWith(13, 20); + }); + describe('without existing highlight', function() { + it('highlights the clicked line', function() { + clickLine(13, { + shiftKey: true + }); + expect($('#LC13')).toHaveClass(this.css); + return expect($("." + this.css).length).toBe(1); + }); + return it('sets the hash', function() { + var spy; + spy = spyOn(this["class"], 'setHash'); + clickLine(13, { + shiftKey: true + }); + return expect(spy).toHaveBeenCalledWith(13); + }); + }); + describe('with existing single-line highlight', function() { + it('uses existing line as last line when target is lesser', function() { + var i, line, results; + clickLine(20); + clickLine(15, { + shiftKey: true + }); + expect($("." + this.css).length).toBe(6); + results = []; + for (line = i = 15; i <= 20; line = ++i) { + results.push(expect($("#LC" + line)).toHaveClass(this.css)); + } + return results; + }); + return it('uses existing line as first line when target is greater', function() { + var i, line, results; + clickLine(5); + clickLine(10, { + shiftKey: true + }); + expect($("." + this.css).length).toBe(6); + results = []; + for (line = i = 5; i <= 10; line = ++i) { + results.push(expect($("#LC" + line)).toHaveClass(this.css)); + } + return results; + }); + }); + return describe('with existing multi-line highlight', function() { + beforeEach(function() { + clickLine(10, { + shiftKey: true + }); + return clickLine(13, { + shiftKey: true + }); + }); + it('uses target as first line when it is less than existing first line', function() { + var i, line, results; + clickLine(5, { + shiftKey: true + }); + expect($("." + this.css).length).toBe(6); + results = []; + for (line = i = 5; i <= 10; line = ++i) { + results.push(expect($("#LC" + line)).toHaveClass(this.css)); + } + return results; + }); + return it('uses target as last line when it is greater than existing first line', function() { + var i, line, results; + clickLine(15, { + shiftKey: true + }); + expect($("." + this.css).length).toBe(6); + results = []; + for (line = i = 10; i <= 15; line = ++i) { + results.push(expect($("#LC" + line)).toHaveClass(this.css)); + } + return results; + }); + }); + }); + }); + describe('#hashToRange', function() { + beforeEach(function() { + return this.subject = this["class"].hashToRange; + }); + it('extracts a single line number from the hash', function() { + return expect(this.subject('#L5')).toEqual([5, null]); + }); + it('extracts a range of line numbers from the hash', function() { + return expect(this.subject('#L5-15')).toEqual([5, 15]); + }); + return it('returns [null, null] when the hash is not a line number', function() { + return expect(this.subject('#foo')).toEqual([null, null]); + }); + }); + describe('#highlightLine', function() { + beforeEach(function() { + return this.subject = this["class"].highlightLine; + }); + it('highlights the specified line', function() { + this.subject(13); + return expect($('#LC13')).toHaveClass(this.css); + }); + return it('accepts a String-based number', function() { + this.subject('13'); + return expect($('#LC13')).toHaveClass(this.css); + }); + }); + return describe('#setHash', function() { + beforeEach(function() { + return this.subject = this["class"].setHash; + }); + it('sets the location hash for a single line', function() { + this.subject(5); + return expect(this.spies.__setLocationHash__).toHaveBeenCalledWith('#L5'); + }); + return it('sets the location hash for a range', function() { + this.subject(5, 15); + return expect(this.spies.__setLocationHash__).toHaveBeenCalledWith('#L5-15'); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/line_highlighter_spec.js.coffee b/spec/javascripts/line_highlighter_spec.js.coffee deleted file mode 100644 index a073f21e7bc..00000000000 --- a/spec/javascripts/line_highlighter_spec.js.coffee +++ /dev/null @@ -1,158 +0,0 @@ -#= require line_highlighter - -describe 'LineHighlighter', -> - fixture.preload('line_highlighter.html') - - clickLine = (number, eventData = {}) -> - if $.isEmptyObject(eventData) - $("#L#{number}").mousedown().click() - else - e = $.Event 'mousedown', eventData - $("#L#{number}").trigger(e).click() - - beforeEach -> - fixture.load('line_highlighter.html') - @class = new LineHighlighter() - @css = @class.highlightClass - @spies = { - __setLocationHash__: spyOn(@class, '__setLocationHash__').and.callFake -> - } - - describe 'behavior', -> - it 'highlights one line given in the URL hash', -> - new LineHighlighter('#L13') - expect($('#LC13')).toHaveClass(@css) - - it 'highlights a range of lines given in the URL hash', -> - new LineHighlighter('#L5-25') - expect($(".#{@css}").length).toBe(21) - expect($("#LC#{line}")).toHaveClass(@css) for line in [5..25] - - it 'scrolls to the first highlighted line on initial load', -> - spy = spyOn($, 'scrollTo') - new LineHighlighter('#L5-25') - expect(spy).toHaveBeenCalledWith('#L5', jasmine.anything()) - - it 'discards click events', -> - spy = spyOnEvent('a[data-line-number]', 'click') - clickLine(13) - expect(spy).toHaveBeenPrevented() - - it 'handles garbage input from the hash', -> - func = -> new LineHighlighter('#blob-content-holder') - expect(func).not.toThrow() - - describe '#clickHandler', -> - it 'discards the mousedown event', -> - spy = spyOnEvent('a[data-line-number]', 'mousedown') - clickLine(13) - expect(spy).toHaveBeenPrevented() - - it 'handles clicking on a child icon element', -> - spy = spyOn(@class, 'setHash').and.callThrough() - - $('#L13 i').mousedown().click() - - expect(spy).toHaveBeenCalledWith(13) - expect($('#LC13')).toHaveClass(@css) - - describe 'without shiftKey', -> - it 'highlights one line when clicked', -> - clickLine(13) - expect($('#LC13')).toHaveClass(@css) - - it 'unhighlights previously highlighted lines', -> - clickLine(13) - clickLine(20) - - expect($('#LC13')).not.toHaveClass(@css) - expect($('#LC20')).toHaveClass(@css) - - it 'sets the hash', -> - spy = spyOn(@class, 'setHash').and.callThrough() - clickLine(13) - expect(spy).toHaveBeenCalledWith(13) - - describe 'with shiftKey', -> - it 'sets the hash', -> - spy = spyOn(@class, 'setHash').and.callThrough() - clickLine(13) - clickLine(20, shiftKey: true) - expect(spy).toHaveBeenCalledWith(13) - expect(spy).toHaveBeenCalledWith(13, 20) - - describe 'without existing highlight', -> - it 'highlights the clicked line', -> - clickLine(13, shiftKey: true) - expect($('#LC13')).toHaveClass(@css) - expect($(".#{@css}").length).toBe(1) - - it 'sets the hash', -> - spy = spyOn(@class, 'setHash') - clickLine(13, shiftKey: true) - expect(spy).toHaveBeenCalledWith(13) - - describe 'with existing single-line highlight', -> - it 'uses existing line as last line when target is lesser', -> - clickLine(20) - clickLine(15, shiftKey: true) - expect($(".#{@css}").length).toBe(6) - expect($("#LC#{line}")).toHaveClass(@css) for line in [15..20] - - it 'uses existing line as first line when target is greater', -> - clickLine(5) - clickLine(10, shiftKey: true) - expect($(".#{@css}").length).toBe(6) - expect($("#LC#{line}")).toHaveClass(@css) for line in [5..10] - - describe 'with existing multi-line highlight', -> - beforeEach -> - clickLine(10, shiftKey: true) - clickLine(13, shiftKey: true) - - it 'uses target as first line when it is less than existing first line', -> - clickLine(5, shiftKey: true) - expect($(".#{@css}").length).toBe(6) - expect($("#LC#{line}")).toHaveClass(@css) for line in [5..10] - - it 'uses target as last line when it is greater than existing first line', -> - clickLine(15, shiftKey: true) - expect($(".#{@css}").length).toBe(6) - expect($("#LC#{line}")).toHaveClass(@css) for line in [10..15] - - describe '#hashToRange', -> - beforeEach -> - @subject = @class.hashToRange - - it 'extracts a single line number from the hash', -> - expect(@subject('#L5')).toEqual([5, null]) - - it 'extracts a range of line numbers from the hash', -> - expect(@subject('#L5-15')).toEqual([5, 15]) - - it 'returns [null, null] when the hash is not a line number', -> - expect(@subject('#foo')).toEqual([null, null]) - - describe '#highlightLine', -> - beforeEach -> - @subject = @class.highlightLine - - it 'highlights the specified line', -> - @subject(13) - expect($('#LC13')).toHaveClass(@css) - - it 'accepts a String-based number', -> - @subject('13') - expect($('#LC13')).toHaveClass(@css) - - describe '#setHash', -> - beforeEach -> - @subject = @class.setHash - - it 'sets the location hash for a single line', -> - @subject(5) - expect(@spies.__setLocationHash__).toHaveBeenCalledWith('#L5') - - it 'sets the location hash for a range', -> - @subject(5, 15) - expect(@spies.__setLocationHash__).toHaveBeenCalledWith('#L5-15') diff --git a/spec/javascripts/merge_request_spec.js b/spec/javascripts/merge_request_spec.js new file mode 100644 index 00000000000..61830d267a9 --- /dev/null +++ b/spec/javascripts/merge_request_spec.js @@ -0,0 +1,28 @@ + +/*= require merge_request */ + +(function() { + describe('MergeRequest', function() { + return describe('task lists', function() { + fixture.preload('merge_requests_show.html'); + beforeEach(function() { + fixture.load('merge_requests_show.html'); + return this.merge = new MergeRequest(); + }); + it('modifies the Markdown field', function() { + spyOn(jQuery, 'ajax').and.stub(); + $('input[type=checkbox]').attr('checked', true).trigger('change'); + return expect($('.js-task-list-field').val()).toBe('- [x] Task List Item'); + }); + return it('submits an ajax request on tasklist:changed', function() { + spyOn(jQuery, 'ajax').and.callFake(function(req) { + expect(req.type).toBe('PATCH'); + expect(req.url).toBe('/foo'); + return expect(req.data.merge_request.description).not.toBe(null); + }); + return $('.js-task-list-field').trigger('tasklist:changed'); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/merge_request_spec.js.coffee b/spec/javascripts/merge_request_spec.js.coffee deleted file mode 100644 index 3cb67d51c85..00000000000 --- a/spec/javascripts/merge_request_spec.js.coffee +++ /dev/null @@ -1,23 +0,0 @@ -#= require merge_request - -describe 'MergeRequest', -> - describe 'task lists', -> - fixture.preload('merge_requests_show.html') - - beforeEach -> - fixture.load('merge_requests_show.html') - @merge = new MergeRequest() - - it 'modifies the Markdown field', -> - spyOn(jQuery, 'ajax').and.stub() - - $('input[type=checkbox]').attr('checked', true).trigger('change') - expect($('.js-task-list-field').val()).toBe('- [x] Task List Item') - - it 'submits an ajax request on tasklist:changed', -> - spyOn(jQuery, 'ajax').and.callFake (req) -> - expect(req.type).toBe('PATCH') - expect(req.url).toBe('/foo') - expect(req.data.merge_request.description).not.toBe(null) - - $('.js-task-list-field').trigger('tasklist:changed') diff --git a/spec/javascripts/merge_request_tabs_spec.js b/spec/javascripts/merge_request_tabs_spec.js new file mode 100644 index 00000000000..395032a7416 --- /dev/null +++ b/spec/javascripts/merge_request_tabs_spec.js @@ -0,0 +1,106 @@ + +/*= require merge_request_tabs */ + +(function() { + describe('MergeRequestTabs', function() { + var stubLocation; + stubLocation = function(stubs) { + var defaults; + defaults = { + pathname: '', + search: '', + hash: '' + }; + return $.extend(defaults, stubs); + }; + fixture.preload('merge_request_tabs.html'); + beforeEach(function() { + this["class"] = new MergeRequestTabs(); + return this.spies = { + ajax: spyOn($, 'ajax').and.callFake(function() {}), + history: spyOn(history, 'replaceState').and.callFake(function() {}) + }; + }); + describe('#activateTab', function() { + beforeEach(function() { + fixture.load('merge_request_tabs.html'); + return this.subject = this["class"].activateTab; + }); + it('shows the first tab when action is show', function() { + this.subject('show'); + return expect($('#notes')).toHaveClass('active'); + }); + it('shows the notes tab when action is notes', function() { + this.subject('notes'); + return expect($('#notes')).toHaveClass('active'); + }); + it('shows the commits tab when action is commits', function() { + this.subject('commits'); + return expect($('#commits')).toHaveClass('active'); + }); + return it('shows the diffs tab when action is diffs', function() { + this.subject('diffs'); + return expect($('#diffs')).toHaveClass('active'); + }); + }); + return describe('#setCurrentAction', function() { + beforeEach(function() { + return this.subject = this["class"].setCurrentAction; + }); + it('changes from commits', function() { + this["class"]._location = stubLocation({ + pathname: '/foo/bar/merge_requests/1/commits' + }); + expect(this.subject('notes')).toBe('/foo/bar/merge_requests/1'); + return expect(this.subject('diffs')).toBe('/foo/bar/merge_requests/1/diffs'); + }); + it('changes from diffs', function() { + this["class"]._location = stubLocation({ + pathname: '/foo/bar/merge_requests/1/diffs' + }); + expect(this.subject('notes')).toBe('/foo/bar/merge_requests/1'); + return expect(this.subject('commits')).toBe('/foo/bar/merge_requests/1/commits'); + }); + it('changes from diffs.html', function() { + this["class"]._location = stubLocation({ + pathname: '/foo/bar/merge_requests/1/diffs.html' + }); + expect(this.subject('notes')).toBe('/foo/bar/merge_requests/1'); + return expect(this.subject('commits')).toBe('/foo/bar/merge_requests/1/commits'); + }); + it('changes from notes', function() { + this["class"]._location = stubLocation({ + pathname: '/foo/bar/merge_requests/1' + }); + expect(this.subject('diffs')).toBe('/foo/bar/merge_requests/1/diffs'); + return expect(this.subject('commits')).toBe('/foo/bar/merge_requests/1/commits'); + }); + it('includes search parameters and hash string', function() { + this["class"]._location = stubLocation({ + pathname: '/foo/bar/merge_requests/1/diffs', + search: '?view=parallel', + hash: '#L15-35' + }); + return expect(this.subject('show')).toBe('/foo/bar/merge_requests/1?view=parallel#L15-35'); + }); + it('replaces the current history state', function() { + var new_state; + this["class"]._location = stubLocation({ + pathname: '/foo/bar/merge_requests/1' + }); + new_state = this.subject('commits'); + return expect(this.spies.history).toHaveBeenCalledWith({ + turbolinks: true, + url: new_state + }, document.title, new_state); + }); + return it('treats "show" like "notes"', function() { + this["class"]._location = stubLocation({ + pathname: '/foo/bar/merge_requests/1/commits' + }); + return expect(this.subject('show')).toBe('/foo/bar/merge_requests/1'); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/merge_request_tabs_spec.js.coffee b/spec/javascripts/merge_request_tabs_spec.js.coffee deleted file mode 100644 index a0cfba455ea..00000000000 --- a/spec/javascripts/merge_request_tabs_spec.js.coffee +++ /dev/null @@ -1,88 +0,0 @@ -#= require merge_request_tabs - -describe 'MergeRequestTabs', -> - stubLocation = (stubs) -> - defaults = {pathname: '', search: '', hash: ''} - $.extend(defaults, stubs) - - fixture.preload('merge_request_tabs.html') - - beforeEach -> - @class = new MergeRequestTabs() - @spies = { - ajax: spyOn($, 'ajax').and.callFake -> - history: spyOn(history, 'replaceState').and.callFake -> - } - - describe '#activateTab', -> - beforeEach -> - fixture.load('merge_request_tabs.html') - @subject = @class.activateTab - - it 'shows the first tab when action is show', -> - @subject('show') - expect($('#notes')).toHaveClass('active') - - it 'shows the notes tab when action is notes', -> - @subject('notes') - expect($('#notes')).toHaveClass('active') - - it 'shows the commits tab when action is commits', -> - @subject('commits') - expect($('#commits')).toHaveClass('active') - - it 'shows the diffs tab when action is diffs', -> - @subject('diffs') - expect($('#diffs')).toHaveClass('active') - - describe '#setCurrentAction', -> - beforeEach -> - @subject = @class.setCurrentAction - - it 'changes from commits', -> - @class._location = stubLocation(pathname: '/foo/bar/merge_requests/1/commits') - - expect(@subject('notes')).toBe('/foo/bar/merge_requests/1') - expect(@subject('diffs')).toBe('/foo/bar/merge_requests/1/diffs') - - it 'changes from diffs', -> - @class._location = stubLocation(pathname: '/foo/bar/merge_requests/1/diffs') - - expect(@subject('notes')).toBe('/foo/bar/merge_requests/1') - expect(@subject('commits')).toBe('/foo/bar/merge_requests/1/commits') - - it 'changes from diffs.html', -> - @class._location = stubLocation(pathname: '/foo/bar/merge_requests/1/diffs.html') - - expect(@subject('notes')).toBe('/foo/bar/merge_requests/1') - expect(@subject('commits')).toBe('/foo/bar/merge_requests/1/commits') - - it 'changes from notes', -> - @class._location = stubLocation(pathname: '/foo/bar/merge_requests/1') - - expect(@subject('diffs')).toBe('/foo/bar/merge_requests/1/diffs') - expect(@subject('commits')).toBe('/foo/bar/merge_requests/1/commits') - - it 'includes search parameters and hash string', -> - @class._location = stubLocation({ - pathname: '/foo/bar/merge_requests/1/diffs' - search: '?view=parallel' - hash: '#L15-35' - }) - - expect(@subject('show')).toBe('/foo/bar/merge_requests/1?view=parallel#L15-35') - - it 'replaces the current history state', -> - @class._location = stubLocation(pathname: '/foo/bar/merge_requests/1') - new_state = @subject('commits') - - expect(@spies.history).toHaveBeenCalledWith( - {turbolinks: true, url: new_state}, - document.title, - new_state - ) - - it 'treats "show" like "notes"', -> - @class._location = stubLocation(pathname: '/foo/bar/merge_requests/1/commits') - - expect(@subject('show')).toBe('/foo/bar/merge_requests/1') diff --git a/spec/javascripts/merge_request_widget_spec.js b/spec/javascripts/merge_request_widget_spec.js new file mode 100644 index 00000000000..17b32914ec3 --- /dev/null +++ b/spec/javascripts/merge_request_widget_spec.js @@ -0,0 +1,74 @@ + +/*= require merge_request_widget */ + +(function() { + describe('MergeRequestWidget', function() { + beforeEach(function() { + window.notifyPermissions = function() {}; + window.notify = function() {}; + this.opts = { + ci_status_url: "http://sampledomain.local/ci/getstatus", + ci_status: "", + ci_message: { + normal: "Build {{status}} for \"{{title}}\"", + preparing: "{{status}} build for \"{{title}}\"" + }, + ci_title: { + preparing: "{{status}} build", + normal: "Build {{status}}" + }, + gitlab_icon: "gitlab_logo.png", + builds_path: "http://sampledomain.local/sampleBuildsPath" + }; + this["class"] = new MergeRequestWidget(this.opts); + return this.ciStatusData = { + "title": "Sample MR title", + "sha": "12a34bc5", + "status": "success", + "coverage": 98 + }; + }); + return describe('getCIStatus', function() { + beforeEach(function() { + return spyOn(jQuery, 'getJSON').and.callFake((function(_this) { + return function(req, cb) { + return cb(_this.ciStatusData); + }; + })(this)); + }); + it('should call showCIStatus even if a notification should not be displayed', function() { + var spy; + spy = spyOn(this["class"], 'showCIStatus').and.stub(); + this["class"].getCIStatus(false); + return expect(spy).toHaveBeenCalledWith(this.ciStatusData.status); + }); + it('should call showCIStatus when a notification should be displayed', function() { + var spy; + spy = spyOn(this["class"], 'showCIStatus').and.stub(); + this["class"].getCIStatus(true); + return expect(spy).toHaveBeenCalledWith(this.ciStatusData.status); + }); + it('should call showCICoverage when the coverage rate is set', function() { + var spy; + spy = spyOn(this["class"], 'showCICoverage').and.stub(); + this["class"].getCIStatus(false); + return expect(spy).toHaveBeenCalledWith(this.ciStatusData.coverage); + }); + it('should not call showCICoverage when the coverage rate is not set', function() { + var spy; + this.ciStatusData.coverage = null; + spy = spyOn(this["class"], 'showCICoverage').and.stub(); + this["class"].getCIStatus(false); + return expect(spy).not.toHaveBeenCalled(); + }); + return it('should not display a notification on the first check after the widget has been created', function() { + var spy; + spy = spyOn(window, 'notify'); + this["class"] = new MergeRequestWidget(this.opts); + this["class"].getCIStatus(true); + return expect(spy).not.toHaveBeenCalled(); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/merge_request_widget_spec.js.coffee b/spec/javascripts/merge_request_widget_spec.js.coffee deleted file mode 100644 index 92b7eeb1116..00000000000 --- a/spec/javascripts/merge_request_widget_spec.js.coffee +++ /dev/null @@ -1,55 +0,0 @@ -#= require merge_request_widget - -describe 'MergeRequestWidget', -> - - beforeEach -> - window.notifyPermissions = () -> - window.notify = () -> - @opts = { - ci_status_url:"http://sampledomain.local/ci/getstatus", - ci_status:"", - ci_message: { - normal: "Build {{status}} for \"{{title}}\"", - preparing: "{{status}} build for \"{{title}}\"" - }, - ci_title: { - preparing: "{{status}} build", - normal: "Build {{status}}" - }, - gitlab_icon:"gitlab_logo.png", - builds_path:"http://sampledomain.local/sampleBuildsPath" - } - @class = new MergeRequestWidget(@opts) - @ciStatusData = {"title":"Sample MR title","sha":"12a34bc5","status":"success","coverage":98} - - describe 'getCIStatus', -> - beforeEach -> - spyOn(jQuery, 'getJSON').and.callFake (req, cb) => - cb(@ciStatusData) - - it 'should call showCIStatus even if a notification should not be displayed', -> - spy = spyOn(@class, 'showCIStatus').and.stub() - @class.getCIStatus(false) - expect(spy).toHaveBeenCalledWith(@ciStatusData.status) - - it 'should call showCIStatus when a notification should be displayed', -> - spy = spyOn(@class, 'showCIStatus').and.stub() - @class.getCIStatus(true) - expect(spy).toHaveBeenCalledWith(@ciStatusData.status) - - it 'should call showCICoverage when the coverage rate is set', -> - spy = spyOn(@class, 'showCICoverage').and.stub() - @class.getCIStatus(false) - expect(spy).toHaveBeenCalledWith(@ciStatusData.coverage) - - it 'should not call showCICoverage when the coverage rate is not set', -> - @ciStatusData.coverage = null - spy = spyOn(@class, 'showCICoverage').and.stub() - @class.getCIStatus(false) - expect(spy).not.toHaveBeenCalled() - - it 'should not display a notification on the first check after the widget has been created', -> - spy = spyOn(window, 'notify') - @class = new MergeRequestWidget(@opts) - @class.getCIStatus(true) - expect(spy).not.toHaveBeenCalled() diff --git a/spec/javascripts/new_branch_spec.js b/spec/javascripts/new_branch_spec.js new file mode 100644 index 00000000000..25d3f5b6c04 --- /dev/null +++ b/spec/javascripts/new_branch_spec.js @@ -0,0 +1,170 @@ + +/*= require jquery-ui/autocomplete */ + + +/*= require new_branch_form */ + +(function() { + describe('Branch', function() { + return describe('create a new branch', function() { + var expectToHaveError, fillNameWith; + fixture.preload('new_branch.html'); + fillNameWith = function(value) { + return $('.js-branch-name').val(value).trigger('blur'); + }; + expectToHaveError = function(error) { + return expect($('.js-branch-name-error span').text()).toEqual(error); + }; + beforeEach(function() { + fixture.load('new_branch.html'); + $('form').on('submit', function(e) { + return e.preventDefault(); + }); + return this.form = new NewBranchForm($('.js-create-branch-form'), []); + }); + it("can't start with a dot", function() { + fillNameWith('.foo'); + return expectToHaveError("can't start with '.'"); + }); + it("can't start with a slash", function() { + fillNameWith('/foo'); + return expectToHaveError("can't start with '/'"); + }); + it("can't have two consecutive dots", function() { + fillNameWith('foo..bar'); + return expectToHaveError("can't contain '..'"); + }); + it("can't have spaces anywhere", function() { + fillNameWith(' foo'); + expectToHaveError("can't contain spaces"); + fillNameWith('foo bar'); + expectToHaveError("can't contain spaces"); + fillNameWith('foo '); + return expectToHaveError("can't contain spaces"); + }); + it("can't have ~ anywhere", function() { + fillNameWith('~foo'); + expectToHaveError("can't contain '~'"); + fillNameWith('foo~bar'); + expectToHaveError("can't contain '~'"); + fillNameWith('foo~'); + return expectToHaveError("can't contain '~'"); + }); + it("can't have tilde anwhere", function() { + fillNameWith('~foo'); + expectToHaveError("can't contain '~'"); + fillNameWith('foo~bar'); + expectToHaveError("can't contain '~'"); + fillNameWith('foo~'); + return expectToHaveError("can't contain '~'"); + }); + it("can't have caret anywhere", function() { + fillNameWith('^foo'); + expectToHaveError("can't contain '^'"); + fillNameWith('foo^bar'); + expectToHaveError("can't contain '^'"); + fillNameWith('foo^'); + return expectToHaveError("can't contain '^'"); + }); + it("can't have : anywhere", function() { + fillNameWith(':foo'); + expectToHaveError("can't contain ':'"); + fillNameWith('foo:bar'); + expectToHaveError("can't contain ':'"); + fillNameWith(':foo'); + return expectToHaveError("can't contain ':'"); + }); + it("can't have question mark anywhere", function() { + fillNameWith('?foo'); + expectToHaveError("can't contain '?'"); + fillNameWith('foo?bar'); + expectToHaveError("can't contain '?'"); + fillNameWith('foo?'); + return expectToHaveError("can't contain '?'"); + }); + it("can't have asterisk anywhere", function() { + fillNameWith('*foo'); + expectToHaveError("can't contain '*'"); + fillNameWith('foo*bar'); + expectToHaveError("can't contain '*'"); + fillNameWith('foo*'); + return expectToHaveError("can't contain '*'"); + }); + it("can't have open bracket anywhere", function() { + fillNameWith('[foo'); + expectToHaveError("can't contain '['"); + fillNameWith('foo[bar'); + expectToHaveError("can't contain '['"); + fillNameWith('foo['); + return expectToHaveError("can't contain '['"); + }); + it("can't have a backslash anywhere", function() { + fillNameWith('\\foo'); + expectToHaveError("can't contain '\\'"); + fillNameWith('foo\\bar'); + expectToHaveError("can't contain '\\'"); + fillNameWith('foo\\'); + return expectToHaveError("can't contain '\\'"); + }); + it("can't contain a sequence @{ anywhere", function() { + fillNameWith('@{foo'); + expectToHaveError("can't contain '@{'"); + fillNameWith('foo@{bar'); + expectToHaveError("can't contain '@{'"); + fillNameWith('foo@{'); + return expectToHaveError("can't contain '@{'"); + }); + it("can't have consecutive slashes", function() { + fillNameWith('foo//bar'); + return expectToHaveError("can't contain consecutive slashes"); + }); + it("can't end with a slash", function() { + fillNameWith('foo/'); + return expectToHaveError("can't end in '/'"); + }); + it("can't end with a dot", function() { + fillNameWith('foo.'); + return expectToHaveError("can't end in '.'"); + }); + it("can't end with .lock", function() { + fillNameWith('foo.lock'); + return expectToHaveError("can't end in '.lock'"); + }); + it("can't be the single character @", function() { + fillNameWith('@'); + return expectToHaveError("can't be '@'"); + }); + it("concatenates all error messages", function() { + fillNameWith('/foo bar?~.'); + return expectToHaveError("can't start with '/', can't contain spaces, '?', '~', can't end in '.'"); + }); + it("doesn't duplicate error messages", function() { + fillNameWith('?foo?bar?zoo?'); + return expectToHaveError("can't contain '?'"); + }); + it("removes the error message when is a valid name", function() { + fillNameWith('foo?bar'); + expect($('.js-branch-name-error span').length).toEqual(1); + fillNameWith('foobar'); + return expect($('.js-branch-name-error span').length).toEqual(0); + }); + it("can have dashes anywhere", function() { + fillNameWith('-foo-bar-zoo-'); + return expect($('.js-branch-name-error span').length).toEqual(0); + }); + it("can have underscores anywhere", function() { + fillNameWith('_foo_bar_zoo_'); + return expect($('.js-branch-name-error span').length).toEqual(0); + }); + it("can have numbers anywhere", function() { + fillNameWith('1foo2bar3zoo4'); + return expect($('.js-branch-name-error span').length).toEqual(0); + }); + return it("can be only letters", function() { + fillNameWith('foo'); + return expect($('.js-branch-name-error span').length).toEqual(0); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/new_branch_spec.js.coffee b/spec/javascripts/new_branch_spec.js.coffee deleted file mode 100644 index ce773793817..00000000000 --- a/spec/javascripts/new_branch_spec.js.coffee +++ /dev/null @@ -1,160 +0,0 @@ -#= require jquery-ui/autocomplete -#= require new_branch_form - -describe 'Branch', -> - describe 'create a new branch', -> - fixture.preload('new_branch.html') - - fillNameWith = (value) -> - $('.js-branch-name').val(value).trigger('blur') - - expectToHaveError = (error) -> - expect($('.js-branch-name-error span').text()).toEqual(error) - - beforeEach -> - fixture.load('new_branch.html') - $('form').on 'submit', (e) -> e.preventDefault() - - @form = new NewBranchForm($('.js-create-branch-form'), []) - - it "can't start with a dot", -> - fillNameWith '.foo' - expectToHaveError "can't start with '.'" - - it "can't start with a slash", -> - fillNameWith '/foo' - expectToHaveError "can't start with '/'" - - it "can't have two consecutive dots", -> - fillNameWith 'foo..bar' - expectToHaveError "can't contain '..'" - - it "can't have spaces anywhere", -> - fillNameWith ' foo' - expectToHaveError "can't contain spaces" - fillNameWith 'foo bar' - expectToHaveError "can't contain spaces" - fillNameWith 'foo ' - expectToHaveError "can't contain spaces" - - it "can't have ~ anywhere", -> - fillNameWith '~foo' - expectToHaveError "can't contain '~'" - fillNameWith 'foo~bar' - expectToHaveError "can't contain '~'" - fillNameWith 'foo~' - expectToHaveError "can't contain '~'" - - it "can't have tilde anwhere", -> - fillNameWith '~foo' - expectToHaveError "can't contain '~'" - fillNameWith 'foo~bar' - expectToHaveError "can't contain '~'" - fillNameWith 'foo~' - expectToHaveError "can't contain '~'" - - it "can't have caret anywhere", -> - fillNameWith '^foo' - expectToHaveError "can't contain '^'" - fillNameWith 'foo^bar' - expectToHaveError "can't contain '^'" - fillNameWith 'foo^' - expectToHaveError "can't contain '^'" - - it "can't have : anywhere", -> - fillNameWith ':foo' - expectToHaveError "can't contain ':'" - fillNameWith 'foo:bar' - expectToHaveError "can't contain ':'" - fillNameWith ':foo' - expectToHaveError "can't contain ':'" - - it "can't have question mark anywhere", -> - fillNameWith '?foo' - expectToHaveError "can't contain '?'" - fillNameWith 'foo?bar' - expectToHaveError "can't contain '?'" - fillNameWith 'foo?' - expectToHaveError "can't contain '?'" - - it "can't have asterisk anywhere", -> - fillNameWith '*foo' - expectToHaveError "can't contain '*'" - fillNameWith 'foo*bar' - expectToHaveError "can't contain '*'" - fillNameWith 'foo*' - expectToHaveError "can't contain '*'" - - it "can't have open bracket anywhere", -> - fillNameWith '[foo' - expectToHaveError "can't contain '['" - fillNameWith 'foo[bar' - expectToHaveError "can't contain '['" - fillNameWith 'foo[' - expectToHaveError "can't contain '['" - - it "can't have a backslash anywhere", -> - fillNameWith '\\foo' - expectToHaveError "can't contain '\\'" - fillNameWith 'foo\\bar' - expectToHaveError "can't contain '\\'" - fillNameWith 'foo\\' - expectToHaveError "can't contain '\\'" - - it "can't contain a sequence @{ anywhere", -> - fillNameWith '@{foo' - expectToHaveError "can't contain '@{'" - fillNameWith 'foo@{bar' - expectToHaveError "can't contain '@{'" - fillNameWith 'foo@{' - expectToHaveError "can't contain '@{'" - - it "can't have consecutive slashes", -> - fillNameWith 'foo//bar' - expectToHaveError "can't contain consecutive slashes" - - it "can't end with a slash", -> - fillNameWith 'foo/' - expectToHaveError "can't end in '/'" - - it "can't end with a dot", -> - fillNameWith 'foo.' - expectToHaveError "can't end in '.'" - - it "can't end with .lock", -> - fillNameWith 'foo.lock' - expectToHaveError "can't end in '.lock'" - - it "can't be the single character @", -> - fillNameWith '@' - expectToHaveError "can't be '@'" - - it "concatenates all error messages", -> - fillNameWith '/foo bar?~.' - expectToHaveError "can't start with '/', can't contain spaces, '?', '~', can't end in '.'" - - it "doesn't duplicate error messages", -> - fillNameWith '?foo?bar?zoo?' - expectToHaveError "can't contain '?'" - - it "removes the error message when is a valid name", -> - fillNameWith 'foo?bar' - expect($('.js-branch-name-error span').length).toEqual(1) - fillNameWith 'foobar' - expect($('.js-branch-name-error span').length).toEqual(0) - - it "can have dashes anywhere", -> - fillNameWith '-foo-bar-zoo-' - expect($('.js-branch-name-error span').length).toEqual(0) - - it "can have underscores anywhere", -> - fillNameWith '_foo_bar_zoo_' - expect($('.js-branch-name-error span').length).toEqual(0) - - it "can have numbers anywhere", -> - fillNameWith '1foo2bar3zoo4' - expect($('.js-branch-name-error span').length).toEqual(0) - - it "can be only letters", -> - fillNameWith 'foo' - expect($('.js-branch-name-error span').length).toEqual(0) diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js new file mode 100644 index 00000000000..14dc6bfdfde --- /dev/null +++ b/spec/javascripts/notes_spec.js @@ -0,0 +1,41 @@ + +/*= require notes */ + + +/*= require gl_form */ + +(function() { + window.gon || (window.gon = {}); + + window.disableButtonIfEmptyField = function() { + return null; + }; + + describe('Notes', function() { + return describe('task lists', function() { + fixture.preload('issue_note.html'); + beforeEach(function() { + fixture.load('issue_note.html'); + $('form').on('submit', function(e) { + return e.preventDefault(); + }); + return this.notes = new Notes(); + }); + it('modifies the Markdown field', function() { + $('input[type=checkbox]').attr('checked', true).trigger('change'); + return expect($('.js-task-list-field').val()).toBe('- [x] Task List Item'); + }); + return it('submits the form on tasklist:changed', function() { + var submitted; + submitted = false; + $('form').on('submit', function(e) { + submitted = true; + return e.preventDefault(); + }); + $('.js-task-list-field').trigger('tasklist:changed'); + return expect(submitted).toBe(true); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/notes_spec.js.coffee b/spec/javascripts/notes_spec.js.coffee deleted file mode 100644 index 3a3c8d63e82..00000000000 --- a/spec/javascripts/notes_spec.js.coffee +++ /dev/null @@ -1,26 +0,0 @@ -#= require notes -#= require gl_form - -window.gon or= {} -window.disableButtonIfEmptyField = -> null - -describe 'Notes', -> - describe 'task lists', -> - fixture.preload('issue_note.html') - - beforeEach -> - fixture.load('issue_note.html') - $('form').on 'submit', (e) -> e.preventDefault() - - @notes = new Notes() - - it 'modifies the Markdown field', -> - $('input[type=checkbox]').attr('checked', true).trigger('change') - expect($('.js-task-list-field').val()).toBe('- [x] Task List Item') - - it 'submits the form on tasklist:changed', -> - submitted = false - $('form').on 'submit', (e) -> submitted = true; e.preventDefault() - - $('.js-task-list-field').trigger('tasklist:changed') - expect(submitted).toBe(true) diff --git a/spec/javascripts/project_title_spec.js b/spec/javascripts/project_title_spec.js new file mode 100644 index 00000000000..ffe49828492 --- /dev/null +++ b/spec/javascripts/project_title_spec.js @@ -0,0 +1,60 @@ + +/*= require bootstrap */ + + +/*= require select2 */ + + +/*= require lib/utils/type_utility */ + + +/*= require gl_dropdown */ + + +/*= require api */ + + +/*= require project_select */ + + +/*= require project */ + +(function() { + window.gon || (window.gon = {}); + + window.gon.api_version = 'v3'; + + describe('Project Title', function() { + fixture.preload('project_title.html'); + fixture.preload('projects.json'); + beforeEach(function() { + fixture.load('project_title.html'); + return this.project = new Project(); + }); + return describe('project list', function() { + beforeEach((function(_this) { + return function() { + _this.projects_data = fixture.load('projects.json')[0]; + return spyOn(jQuery, 'ajax').and.callFake(function(req) { + var d; + expect(req.url).toBe('/api/v3/projects.json?simple=true'); + d = $.Deferred(); + d.resolve(_this.projects_data); + return d.promise(); + }); + }; + })(this)); + it('to show on toggle click', (function(_this) { + return function() { + $('.js-projects-dropdown-toggle').click(); + return expect($('.header-content').hasClass('open')).toBe(true); + }; + })(this)); + return it('hide dropdown', function() { + $(".dropdown-menu-close-icon").click(); + return expect($('.header-content').hasClass('open')).toBe(false); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/project_title_spec.js.coffee b/spec/javascripts/project_title_spec.js.coffee deleted file mode 100644 index 0244119fa0e..00000000000 --- a/spec/javascripts/project_title_spec.js.coffee +++ /dev/null @@ -1,37 +0,0 @@ -#= require bootstrap -#= require select2 -#= require lib/utils/type_utility -#= require gl_dropdown -#= require api -#= require project_select -#= require project - -window.gon or= {} -window.gon.api_version = 'v3' - -describe 'Project Title', -> - fixture.preload('project_title.html') - fixture.preload('projects.json') - - beforeEach -> - fixture.load('project_title.html') - @project = new Project() - - describe 'project list', -> - beforeEach => - @projects_data = fixture.load('projects.json')[0] - - spyOn(jQuery, 'ajax').and.callFake (req) => - expect(req.url).toBe('/api/v3/projects.json?simple=true') - d = $.Deferred() - d.resolve @projects_data - d.promise() - - it 'to show on toggle click', => - $('.js-projects-dropdown-toggle').click() - expect($('.header-content').hasClass('open')).toBe(true) - - it 'hide dropdown', -> - $(".dropdown-menu-close-icon").click() - - expect($('.header-content').hasClass('open')).toBe(false) diff --git a/spec/javascripts/right_sidebar_spec.js b/spec/javascripts/right_sidebar_spec.js new file mode 100644 index 00000000000..38b3b2653ec --- /dev/null +++ b/spec/javascripts/right_sidebar_spec.js @@ -0,0 +1,70 @@ + +/*= require right_sidebar */ + + +/*= require jquery */ + + +/*= require jquery.cookie */ + +(function() { + var $aside, $icon, $labelsIcon, $page, $toggle, assertSidebarState; + + this.sidebar = null; + + $aside = null; + + $toggle = null; + + $icon = null; + + $page = null; + + $labelsIcon = null; + + assertSidebarState = function(state) { + var shouldBeCollapsed, shouldBeExpanded; + shouldBeExpanded = state === 'expanded'; + shouldBeCollapsed = state === 'collapsed'; + expect($aside.hasClass('right-sidebar-expanded')).toBe(shouldBeExpanded); + expect($page.hasClass('right-sidebar-expanded')).toBe(shouldBeExpanded); + expect($icon.hasClass('fa-angle-double-right')).toBe(shouldBeExpanded); + expect($aside.hasClass('right-sidebar-collapsed')).toBe(shouldBeCollapsed); + expect($page.hasClass('right-sidebar-collapsed')).toBe(shouldBeCollapsed); + return expect($icon.hasClass('fa-angle-double-left')).toBe(shouldBeCollapsed); + }; + + describe('RightSidebar', function() { + fixture.preload('right_sidebar.html'); + beforeEach(function() { + fixture.load('right_sidebar.html'); + this.sidebar = new Sidebar; + $aside = $('.right-sidebar'); + $page = $('.page-with-sidebar'); + $icon = $aside.find('i'); + $toggle = $aside.find('.js-sidebar-toggle'); + return $labelsIcon = $aside.find('.sidebar-collapsed-icon'); + }); + it('should expand the sidebar when arrow is clicked', function() { + $toggle.click(); + return assertSidebarState('expanded'); + }); + it('should collapse the sidebar when arrow is clicked', function() { + $toggle.click(); + assertSidebarState('expanded'); + $toggle.click(); + return assertSidebarState('collapsed'); + }); + it('should float over the page and when sidebar icons clicked', function() { + $labelsIcon.click(); + return assertSidebarState('expanded'); + }); + return it('should collapse when the icon arrow clicked while it is floating on page', function() { + $labelsIcon.click(); + assertSidebarState('expanded'); + $toggle.click(); + return assertSidebarState('collapsed'); + }); + }); + +}).call(this); diff --git a/spec/javascripts/right_sidebar_spec.js.coffee b/spec/javascripts/right_sidebar_spec.js.coffee deleted file mode 100644 index 2075cacdb67..00000000000 --- a/spec/javascripts/right_sidebar_spec.js.coffee +++ /dev/null @@ -1,69 +0,0 @@ -#= require right_sidebar -#= require jquery -#= require jquery.cookie - -@sidebar = null -$aside = null -$toggle = null -$icon = null -$page = null -$labelsIcon = null - - -assertSidebarState = (state) -> - - shouldBeExpanded = state is 'expanded' - shouldBeCollapsed = state is 'collapsed' - - expect($aside.hasClass('right-sidebar-expanded')).toBe shouldBeExpanded - expect($page.hasClass('right-sidebar-expanded')).toBe shouldBeExpanded - expect($icon.hasClass('fa-angle-double-right')).toBe shouldBeExpanded - - expect($aside.hasClass('right-sidebar-collapsed')).toBe shouldBeCollapsed - expect($page.hasClass('right-sidebar-collapsed')).toBe shouldBeCollapsed - expect($icon.hasClass('fa-angle-double-left')).toBe shouldBeCollapsed - - -describe 'RightSidebar', -> - - fixture.preload 'right_sidebar.html' - - beforeEach -> - fixture.load 'right_sidebar.html' - - @sidebar = new Sidebar - $aside = $ '.right-sidebar' - $page = $ '.page-with-sidebar' - $icon = $aside.find 'i' - $toggle = $aside.find '.js-sidebar-toggle' - $labelsIcon = $aside.find '.sidebar-collapsed-icon' - - - it 'should expand the sidebar when arrow is clicked', -> - - $toggle.click() - assertSidebarState 'expanded' - - - it 'should collapse the sidebar when arrow is clicked', -> - - $toggle.click() - assertSidebarState 'expanded' - - $toggle.click() - assertSidebarState 'collapsed' - - - it 'should float over the page and when sidebar icons clicked', -> - - $labelsIcon.click() - assertSidebarState 'expanded' - - - it 'should collapse when the icon arrow clicked while it is floating on page', -> - - $labelsIcon.click() - assertSidebarState 'expanded' - - $toggle.click() - assertSidebarState 'collapsed' diff --git a/spec/javascripts/search_autocomplete_spec.js b/spec/javascripts/search_autocomplete_spec.js new file mode 100644 index 00000000000..68d64483d67 --- /dev/null +++ b/spec/javascripts/search_autocomplete_spec.js @@ -0,0 +1,159 @@ + +/*= require gl_dropdown */ + + +/*= require search_autocomplete */ + + +/*= require jquery */ + + +/*= require lib/utils/common_utils */ + + +/*= require lib/utils/type_utility */ + + +/*= require fuzzaldrin-plus */ + +(function() { + var addBodyAttributes, assertLinks, dashboardIssuesPath, dashboardMRsPath, groupIssuesPath, groupMRsPath, groupName, mockDashboardOptions, mockGroupOptions, mockProjectOptions, projectIssuesPath, projectMRsPath, projectName, userId, widget; + + widget = null; + + userId = 1; + + window.gon || (window.gon = {}); + + window.gon.current_user_id = userId; + + dashboardIssuesPath = '/dashboard/issues'; + + dashboardMRsPath = '/dashboard/merge_requests'; + + projectIssuesPath = '/gitlab-org/gitlab-ce/issues'; + + projectMRsPath = '/gitlab-org/gitlab-ce/merge_requests'; + + groupIssuesPath = '/groups/gitlab-org/issues'; + + groupMRsPath = '/groups/gitlab-org/merge_requests'; + + projectName = 'GitLab Community Edition'; + + groupName = 'Gitlab Org'; + + addBodyAttributes = function(section) { + var $body; + if (section == null) { + section = 'dashboard'; + } + $body = $('body'); + $body.removeAttr('data-page'); + $body.removeAttr('data-project'); + $body.removeAttr('data-group'); + switch (section) { + case 'dashboard': + return $body.data('page', 'root:index'); + case 'group': + $body.data('page', 'groups:show'); + return $body.data('group', 'gitlab-org'); + case 'project': + $body.data('page', 'projects:show'); + return $body.data('project', 'gitlab-ce'); + } + }; + + mockDashboardOptions = function() { + window.gl || (window.gl = {}); + return window.gl.dashboardOptions = { + issuesPath: dashboardIssuesPath, + mrPath: dashboardMRsPath + }; + }; + + mockProjectOptions = function() { + window.gl || (window.gl = {}); + return window.gl.projectOptions = { + 'gitlab-ce': { + issuesPath: projectIssuesPath, + mrPath: projectMRsPath, + projectName: projectName + } + }; + }; + + mockGroupOptions = function() { + window.gl || (window.gl = {}); + return window.gl.groupOptions = { + 'gitlab-org': { + issuesPath: groupIssuesPath, + mrPath: groupMRsPath, + projectName: groupName + } + }; + }; + + assertLinks = function(list, issuesPath, mrsPath) { + var a1, a2, a3, a4, issuesAssignedToMeLink, issuesIHaveCreatedLink, mrsAssignedToMeLink, mrsIHaveCreatedLink; + issuesAssignedToMeLink = issuesPath + "/?assignee_id=" + userId; + issuesIHaveCreatedLink = issuesPath + "/?author_id=" + userId; + mrsAssignedToMeLink = mrsPath + "/?assignee_id=" + userId; + mrsIHaveCreatedLink = mrsPath + "/?author_id=" + userId; + a1 = "a[href='" + issuesAssignedToMeLink + "']"; + a2 = "a[href='" + issuesIHaveCreatedLink + "']"; + a3 = "a[href='" + mrsAssignedToMeLink + "']"; + a4 = "a[href='" + mrsIHaveCreatedLink + "']"; + expect(list.find(a1).length).toBe(1); + expect(list.find(a1).text()).toBe(' Issues assigned to me '); + expect(list.find(a2).length).toBe(1); + expect(list.find(a2).text()).toBe(" Issues I've created "); + expect(list.find(a3).length).toBe(1); + expect(list.find(a3).text()).toBe(' Merge requests assigned to me '); + expect(list.find(a4).length).toBe(1); + return expect(list.find(a4).text()).toBe(" Merge requests I've created "); + }; + + describe('Search autocomplete dropdown', function() { + fixture.preload('search_autocomplete.html'); + beforeEach(function() { + fixture.load('search_autocomplete.html'); + return widget = new SearchAutocomplete; + }); + it('should show Dashboard specific dropdown menu', function() { + var list; + addBodyAttributes(); + mockDashboardOptions(); + widget.searchInput.focus(); + list = widget.wrap.find('.dropdown-menu').find('ul'); + return assertLinks(list, dashboardIssuesPath, dashboardMRsPath); + }); + it('should show Group specific dropdown menu', function() { + var list; + addBodyAttributes('group'); + mockGroupOptions(); + widget.searchInput.focus(); + list = widget.wrap.find('.dropdown-menu').find('ul'); + return assertLinks(list, groupIssuesPath, groupMRsPath); + }); + it('should show Project specific dropdown menu', function() { + var list; + addBodyAttributes('project'); + mockProjectOptions(); + widget.searchInput.focus(); + list = widget.wrap.find('.dropdown-menu').find('ul'); + return assertLinks(list, projectIssuesPath, projectMRsPath); + }); + return it('should not show category related menu if there is text in the input', function() { + var link, list; + addBodyAttributes('project'); + mockProjectOptions(); + widget.searchInput.val('help'); + widget.searchInput.focus(); + list = widget.wrap.find('.dropdown-menu').find('ul'); + link = "a[href='" + projectIssuesPath + "/?assignee_id=" + userId + "']"; + return expect(list.find(link).length).toBe(0); + }); + }); + +}).call(this); diff --git a/spec/javascripts/search_autocomplete_spec.js.coffee b/spec/javascripts/search_autocomplete_spec.js.coffee deleted file mode 100644 index 1c1faca3333..00000000000 --- a/spec/javascripts/search_autocomplete_spec.js.coffee +++ /dev/null @@ -1,149 +0,0 @@ -#= require gl_dropdown -#= require search_autocomplete -#= require jquery -#= require lib/utils/common_utils -#= require lib/utils/type_utility -#= require fuzzaldrin-plus - - -widget = null -userId = 1 -window.gon or= {} -window.gon.current_user_id = userId - -dashboardIssuesPath = '/dashboard/issues' -dashboardMRsPath = '/dashboard/merge_requests' -projectIssuesPath = '/gitlab-org/gitlab-ce/issues' -projectMRsPath = '/gitlab-org/gitlab-ce/merge_requests' -groupIssuesPath = '/groups/gitlab-org/issues' -groupMRsPath = '/groups/gitlab-org/merge_requests' -projectName = 'GitLab Community Edition' -groupName = 'Gitlab Org' - - -# Add required attributes to body before starting the test. -# section would be dashboard|group|project -addBodyAttributes = (section = 'dashboard') -> - - $body = $ 'body' - - $body.removeAttr 'data-page' - $body.removeAttr 'data-project' - $body.removeAttr 'data-group' - - switch section - when 'dashboard' - $body.data 'page', 'root:index' - when 'group' - $body.data 'page', 'groups:show' - $body.data 'group', 'gitlab-org' - when 'project' - $body.data 'page', 'projects:show' - $body.data 'project', 'gitlab-ce' - - -# Mock `gl` object in window for dashboard specific page. App code will need it. -mockDashboardOptions = -> - - window.gl or= {} - window.gl.dashboardOptions = - issuesPath: dashboardIssuesPath - mrPath : dashboardMRsPath - - -# Mock `gl` object in window for project specific page. App code will need it. -mockProjectOptions = -> - - window.gl or= {} - window.gl.projectOptions = - 'gitlab-ce' : - issuesPath : projectIssuesPath - mrPath : projectMRsPath - projectName : projectName - - -mockGroupOptions = -> - - window.gl or= {} - window.gl.groupOptions = - 'gitlab-org' : - issuesPath : groupIssuesPath - mrPath : groupMRsPath - projectName : groupName - - -assertLinks = (list, issuesPath, mrsPath) -> - - issuesAssignedToMeLink = "#{issuesPath}/?assignee_id=#{userId}" - issuesIHaveCreatedLink = "#{issuesPath}/?author_id=#{userId}" - mrsAssignedToMeLink = "#{mrsPath}/?assignee_id=#{userId}" - mrsIHaveCreatedLink = "#{mrsPath}/?author_id=#{userId}" - - a1 = "a[href='#{issuesAssignedToMeLink}']" - a2 = "a[href='#{issuesIHaveCreatedLink}']" - a3 = "a[href='#{mrsAssignedToMeLink}']" - a4 = "a[href='#{mrsIHaveCreatedLink}']" - - expect(list.find(a1).length).toBe 1 - expect(list.find(a1).text()).toBe ' Issues assigned to me ' - - expect(list.find(a2).length).toBe 1 - expect(list.find(a2).text()).toBe " Issues I've created " - - expect(list.find(a3).length).toBe 1 - expect(list.find(a3).text()).toBe ' Merge requests assigned to me ' - - expect(list.find(a4).length).toBe 1 - expect(list.find(a4).text()).toBe " Merge requests I've created " - - -describe 'Search autocomplete dropdown', -> - - fixture.preload 'search_autocomplete.html' - - beforeEach -> - - fixture.load 'search_autocomplete.html' - widget = new SearchAutocomplete - - - it 'should show Dashboard specific dropdown menu', -> - - addBodyAttributes() - mockDashboardOptions() - widget.searchInput.focus() - - list = widget.wrap.find('.dropdown-menu').find 'ul' - assertLinks list, dashboardIssuesPath, dashboardMRsPath - - - it 'should show Group specific dropdown menu', -> - - addBodyAttributes 'group' - mockGroupOptions() - widget.searchInput.focus() - - list = widget.wrap.find('.dropdown-menu').find 'ul' - assertLinks list, groupIssuesPath, groupMRsPath - - - it 'should show Project specific dropdown menu', -> - - addBodyAttributes 'project' - mockProjectOptions() - widget.searchInput.focus() - - list = widget.wrap.find('.dropdown-menu').find 'ul' - assertLinks list, projectIssuesPath, projectMRsPath - - - it 'should not show category related menu if there is text in the input', -> - - addBodyAttributes 'project' - mockProjectOptions() - widget.searchInput.val 'help' - widget.searchInput.focus() - - list = widget.wrap.find('.dropdown-menu').find 'ul' - link = "a[href='#{projectIssuesPath}/?assignee_id=#{userId}']" - expect(list.find(link).length).toBe 0 diff --git a/spec/javascripts/shortcuts_issuable_spec.js b/spec/javascripts/shortcuts_issuable_spec.js new file mode 100644 index 00000000000..7b6b55fe545 --- /dev/null +++ b/spec/javascripts/shortcuts_issuable_spec.js @@ -0,0 +1,74 @@ + +/*= require shortcuts_issuable */ + +(function() { + describe('ShortcutsIssuable', function() { + fixture.preload('issuable.html'); + beforeEach(function() { + fixture.load('issuable.html'); + return this.shortcut = new ShortcutsIssuable(); + }); + return describe('#replyWithSelectedText', function() { + var stubSelection; + stubSelection = function(text) { + return window.getSelection = function() { + return text; + }; + }; + beforeEach(function() { + return this.selector = 'form.js-main-target-form textarea#note_note'; + }); + describe('with empty selection', function() { + return it('does nothing', function() { + stubSelection(''); + this.shortcut.replyWithSelectedText(); + return expect($(this.selector).val()).toBe(''); + }); + }); + describe('with any selection', function() { + beforeEach(function() { + return stubSelection('Selected text.'); + }); + it('leaves existing input intact', function() { + $(this.selector).val('This text was already here.'); + expect($(this.selector).val()).toBe('This text was already here.'); + this.shortcut.replyWithSelectedText(); + return expect($(this.selector).val()).toBe("This text was already here.\n> Selected text.\n\n"); + }); + it('triggers `input`', function() { + var triggered; + triggered = false; + $(this.selector).on('input', function() { + return triggered = true; + }); + this.shortcut.replyWithSelectedText(); + return expect(triggered).toBe(true); + }); + return it('triggers `focus`', function() { + var focused; + focused = false; + $(this.selector).on('focus', function() { + return focused = true; + }); + this.shortcut.replyWithSelectedText(); + return expect(focused).toBe(true); + }); + }); + describe('with a one-line selection', function() { + return it('quotes the selection', function() { + stubSelection('This text has been selected.'); + this.shortcut.replyWithSelectedText(); + return expect($(this.selector).val()).toBe("> This text has been selected.\n\n"); + }); + }); + return describe('with a multi-line selection', function() { + return it('quotes the selected lines as a group', function() { + stubSelection("Selected line one.\n\nSelected line two.\nSelected line three.\n"); + this.shortcut.replyWithSelectedText(); + return expect($(this.selector).val()).toBe("> Selected line one.\n> Selected line two.\n> Selected line three.\n\n"); + }); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/shortcuts_issuable_spec.js.coffee b/spec/javascripts/shortcuts_issuable_spec.js.coffee deleted file mode 100644 index a01ad7140dd..00000000000 --- a/spec/javascripts/shortcuts_issuable_spec.js.coffee +++ /dev/null @@ -1,82 +0,0 @@ -#= require shortcuts_issuable - -describe 'ShortcutsIssuable', -> - fixture.preload('issuable.html') - - beforeEach -> - fixture.load('issuable.html') - @shortcut = new ShortcutsIssuable() - - describe '#replyWithSelectedText', -> - # Stub window.getSelection to return the provided String. - stubSelection = (text) -> - window.getSelection = -> text - - beforeEach -> - @selector = 'form.js-main-target-form textarea#note_note' - - describe 'with empty selection', -> - it 'does nothing', -> - stubSelection('') - @shortcut.replyWithSelectedText() - expect($(@selector).val()).toBe('') - - describe 'with any selection', -> - beforeEach -> - stubSelection('Selected text.') - - it 'leaves existing input intact', -> - $(@selector).val('This text was already here.') - expect($(@selector).val()).toBe('This text was already here.') - - @shortcut.replyWithSelectedText() - expect($(@selector).val()). - toBe("This text was already here.\n> Selected text.\n\n") - - it 'triggers `input`', -> - triggered = false - $(@selector).on 'input', -> triggered = true - @shortcut.replyWithSelectedText() - - expect(triggered).toBe(true) - - it 'triggers `focus`', -> - focused = false - $(@selector).on 'focus', -> focused = true - @shortcut.replyWithSelectedText() - - expect(focused).toBe(true) - - describe 'with a one-line selection', -> - it 'quotes the selection', -> - stubSelection('This text has been selected.') - - @shortcut.replyWithSelectedText() - - expect($(@selector).val()). - toBe("> This text has been selected.\n\n") - - describe 'with a multi-line selection', -> - it 'quotes the selected lines as a group', -> - stubSelection( - """ - Selected line one. - - Selected line two. - Selected line three. - - """ - ) - - @shortcut.replyWithSelectedText() - - expect($(@selector).val()). - toBe( - """ - > Selected line one. - > Selected line two. - > Selected line three. - - - """ - ) diff --git a/spec/javascripts/spec_helper.coffee b/spec/javascripts/spec_helper.coffee deleted file mode 100644 index 90b02a6aec5..00000000000 --- a/spec/javascripts/spec_helper.coffee +++ /dev/null @@ -1,47 +0,0 @@ -# PhantomJS (Teaspoons default driver) doesn't have support for -# Function.prototype.bind, which has caused confusion. Use this polyfill to -# avoid the confusion. - -#= require support/bind-poly - -# You can require your own javascript files here. By default this will include -# everything in application, however you may get better load performance if you -# require the specific files that are being used in the spec that tests them. - -#= require jquery -#= require jquery.turbolinks -#= require bootstrap -#= require underscore - -# Teaspoon includes some support files, but you can use anything from your own -# support path too. - -# require support/jasmine-jquery-1.7.0 -# require support/jasmine-jquery-2.0.0 -#= require support/jasmine-jquery-2.1.0 -# require support/sinon -# require support/your-support-file - -# Deferring execution - -# If you're using CommonJS, RequireJS or some other asynchronous library you can -# defer execution. Call Teaspoon.execute() after everything has been loaded. -# Simple example of a timeout: - -# Teaspoon.defer = true -# setTimeout(Teaspoon.execute, 1000) - -# Matching files - -# By default Teaspoon will look for files that match -# _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your spec path -# and it'll be included in the default suite automatically. If you want to -# customize suites, check out the configuration in teaspoon_env.rb - -# Manifest - -# If you'd rather require your spec files manually (to control order for -# instance) you can disable the suite matcher in the configuration and use this -# file as a manifest. - -# For more information: http://github.com/modeset/teaspoon diff --git a/spec/javascripts/spec_helper.js b/spec/javascripts/spec_helper.js new file mode 100644 index 00000000000..7d91ed0f855 --- /dev/null +++ b/spec/javascripts/spec_helper.js @@ -0,0 +1,22 @@ + +/*= require support/bind-poly */ + + +/*= require jquery */ + + +/*= require jquery.turbolinks */ + + +/*= require bootstrap */ + + +/*= require underscore */ + + +/*= require support/jasmine-jquery-2.1.0 */ + +(function() { + + +}).call(this); diff --git a/spec/javascripts/syntax_highlight_spec.js b/spec/javascripts/syntax_highlight_spec.js new file mode 100644 index 00000000000..4e5dd1e59bf --- /dev/null +++ b/spec/javascripts/syntax_highlight_spec.js @@ -0,0 +1,44 @@ + +/*= require syntax_highlight */ + +(function() { + describe('Syntax Highlighter', function() { + var stubUserColorScheme; + stubUserColorScheme = function(value) { + if (window.gon == null) { + window.gon = {}; + } + return window.gon.user_color_scheme = value; + }; + describe('on a js-syntax-highlight element', function() { + beforeEach(function() { + return fixture.set('
                '); + }); + return it('applies syntax highlighting', function() { + stubUserColorScheme('monokai'); + $('.js-syntax-highlight').syntaxHighlight(); + return expect($('.js-syntax-highlight')).toHaveClass('monokai'); + }); + }); + return describe('on a parent element', function() { + beforeEach(function() { + return fixture.set("
                \n
                \n
                \n
                \n
                "); + }); + it('applies highlighting to all applicable children', function() { + stubUserColorScheme('monokai'); + $('.parent').syntaxHighlight(); + expect($('.parent, .foo')).not.toHaveClass('monokai'); + return expect($('.monokai').length).toBe(2); + }); + return it('prevents an infinite loop when no matches exist', function() { + var highlight; + fixture.set('
                '); + highlight = function() { + return $('div').syntaxHighlight(); + }; + return expect(highlight).not.toThrow(); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/syntax_highlight_spec.js.coffee b/spec/javascripts/syntax_highlight_spec.js.coffee deleted file mode 100644 index 6a73b6bf32c..00000000000 --- a/spec/javascripts/syntax_highlight_spec.js.coffee +++ /dev/null @@ -1,42 +0,0 @@ -#= require syntax_highlight - -describe 'Syntax Highlighter', -> - stubUserColorScheme = (value) -> - window.gon ?= {} - window.gon.user_color_scheme = value - - describe 'on a js-syntax-highlight element', -> - beforeEach -> - fixture.set('
                ') - - it 'applies syntax highlighting', -> - stubUserColorScheme('monokai') - - $('.js-syntax-highlight').syntaxHighlight() - - expect($('.js-syntax-highlight')).toHaveClass('monokai') - - describe 'on a parent element', -> - beforeEach -> - fixture.set """ -
                -
                -
                -
                -
                - """ - - it 'applies highlighting to all applicable children', -> - stubUserColorScheme('monokai') - - $('.parent').syntaxHighlight() - - expect($('.parent, .foo')).not.toHaveClass('monokai') - expect($('.monokai').length).toBe(2) - - it 'prevents an infinite loop when no matches exist', -> - fixture.set('
                ') - - highlight = -> $('div').syntaxHighlight() - - expect(highlight).not.toThrow() diff --git a/spec/javascripts/u2f/authenticate_spec.coffee b/spec/javascripts/u2f/authenticate_spec.coffee deleted file mode 100644 index 8ffeda11704..00000000000 --- a/spec/javascripts/u2f/authenticate_spec.coffee +++ /dev/null @@ -1,51 +0,0 @@ -#= require u2f/authenticate -#= require u2f/util -#= require u2f/error -#= require u2f -#= require ./mock_u2f_device - -describe 'U2FAuthenticate', -> - fixture.load('u2f/authenticate') - - beforeEach -> - @u2fDevice = new MockU2FDevice - @container = $("#js-authenticate-u2f") - @component = new U2FAuthenticate(@container, {sign_requests: []}, "token") - @component.start() - - it 'allows authenticating via a U2F device', -> - setupButton = @container.find("#js-login-u2f-device") - setupMessage = @container.find("p") - expect(setupMessage.text()).toContain('Insert your security key') - expect(setupButton.text()).toBe('Login Via U2F Device') - setupButton.trigger('click') - - inProgressMessage = @container.find("p") - expect(inProgressMessage.text()).toContain("Trying to communicate with your device") - - @u2fDevice.respondToAuthenticateRequest({deviceData: "this is data from the device"}) - authenticatedMessage = @container.find("p") - deviceResponse = @container.find('#js-device-response') - expect(authenticatedMessage.text()).toContain("Click this button to authenticate with the GitLab server") - expect(deviceResponse.val()).toBe('{"deviceData":"this is data from the device"}') - - describe "errors", -> - it "displays an error message", -> - setupButton = @container.find("#js-login-u2f-device") - setupButton.trigger('click') - @u2fDevice.respondToAuthenticateRequest({errorCode: "error!"}) - errorMessage = @container.find("p") - expect(errorMessage.text()).toContain("There was a problem communicating with your device") - - it "allows retrying authentication after an error", -> - setupButton = @container.find("#js-login-u2f-device") - setupButton.trigger('click') - @u2fDevice.respondToAuthenticateRequest({errorCode: "error!"}) - retryButton = @container.find("#js-u2f-try-again") - retryButton.trigger('click') - - setupButton = @container.find("#js-login-u2f-device") - setupButton.trigger('click') - @u2fDevice.respondToAuthenticateRequest({deviceData: "this is data from the device"}) - authenticatedMessage = @container.find("p") - expect(authenticatedMessage.text()).toContain("Click this button to authenticate with the GitLab server") diff --git a/spec/javascripts/u2f/authenticate_spec.js b/spec/javascripts/u2f/authenticate_spec.js new file mode 100644 index 00000000000..e008ce956ad --- /dev/null +++ b/spec/javascripts/u2f/authenticate_spec.js @@ -0,0 +1,75 @@ + +/*= require u2f/authenticate */ + + +/*= require u2f/util */ + + +/*= require u2f/error */ + + +/*= require u2f */ + + +/*= require ./mock_u2f_device */ + +(function() { + describe('U2FAuthenticate', function() { + fixture.load('u2f/authenticate'); + beforeEach(function() { + this.u2fDevice = new MockU2FDevice; + this.container = $("#js-authenticate-u2f"); + this.component = new U2FAuthenticate(this.container, { + sign_requests: [] + }, "token"); + return this.component.start(); + }); + it('allows authenticating via a U2F device', function() { + var authenticatedMessage, deviceResponse, inProgressMessage, setupButton, setupMessage; + setupButton = this.container.find("#js-login-u2f-device"); + setupMessage = this.container.find("p"); + expect(setupMessage.text()).toContain('Insert your security key'); + expect(setupButton.text()).toBe('Login Via U2F Device'); + setupButton.trigger('click'); + inProgressMessage = this.container.find("p"); + expect(inProgressMessage.text()).toContain("Trying to communicate with your device"); + this.u2fDevice.respondToAuthenticateRequest({ + deviceData: "this is data from the device" + }); + authenticatedMessage = this.container.find("p"); + deviceResponse = this.container.find('#js-device-response'); + expect(authenticatedMessage.text()).toContain("Click this button to authenticate with the GitLab server"); + return expect(deviceResponse.val()).toBe('{"deviceData":"this is data from the device"}'); + }); + return describe("errors", function() { + it("displays an error message", function() { + var errorMessage, setupButton; + setupButton = this.container.find("#js-login-u2f-device"); + setupButton.trigger('click'); + this.u2fDevice.respondToAuthenticateRequest({ + errorCode: "error!" + }); + errorMessage = this.container.find("p"); + return expect(errorMessage.text()).toContain("There was a problem communicating with your device"); + }); + return it("allows retrying authentication after an error", function() { + var authenticatedMessage, retryButton, setupButton; + setupButton = this.container.find("#js-login-u2f-device"); + setupButton.trigger('click'); + this.u2fDevice.respondToAuthenticateRequest({ + errorCode: "error!" + }); + retryButton = this.container.find("#js-u2f-try-again"); + retryButton.trigger('click'); + setupButton = this.container.find("#js-login-u2f-device"); + setupButton.trigger('click'); + this.u2fDevice.respondToAuthenticateRequest({ + deviceData: "this is data from the device" + }); + authenticatedMessage = this.container.find("p"); + return expect(authenticatedMessage.text()).toContain("Click this button to authenticate with the GitLab server"); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/u2f/mock_u2f_device.js b/spec/javascripts/u2f/mock_u2f_device.js new file mode 100644 index 00000000000..ca91a716ba3 --- /dev/null +++ b/spec/javascripts/u2f/mock_u2f_device.js @@ -0,0 +1,33 @@ +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + this.MockU2FDevice = (function() { + function MockU2FDevice() { + this.respondToAuthenticateRequest = bind(this.respondToAuthenticateRequest, this); + this.respondToRegisterRequest = bind(this.respondToRegisterRequest, this); + window.u2f || (window.u2f = {}); + window.u2f.register = (function(_this) { + return function(appId, registerRequests, signRequests, callback) { + return _this.registerCallback = callback; + }; + })(this); + window.u2f.sign = (function(_this) { + return function(appId, challenges, signRequests, callback) { + return _this.authenticateCallback = callback; + }; + })(this); + } + + MockU2FDevice.prototype.respondToRegisterRequest = function(params) { + return this.registerCallback(params); + }; + + MockU2FDevice.prototype.respondToAuthenticateRequest = function(params) { + return this.authenticateCallback(params); + }; + + return MockU2FDevice; + + })(); + +}).call(this); diff --git a/spec/javascripts/u2f/mock_u2f_device.js.coffee b/spec/javascripts/u2f/mock_u2f_device.js.coffee deleted file mode 100644 index 97ed0e83a0e..00000000000 --- a/spec/javascripts/u2f/mock_u2f_device.js.coffee +++ /dev/null @@ -1,15 +0,0 @@ -class @MockU2FDevice - constructor: () -> - window.u2f ||= {} - - window.u2f.register = (appId, registerRequests, signRequests, callback) => - @registerCallback = callback - - window.u2f.sign = (appId, challenges, signRequests, callback) => - @authenticateCallback = callback - - respondToRegisterRequest: (params) => - @registerCallback(params) - - respondToAuthenticateRequest: (params) => - @authenticateCallback(params) diff --git a/spec/javascripts/u2f/register_spec.js b/spec/javascripts/u2f/register_spec.js new file mode 100644 index 00000000000..21c5266c60e --- /dev/null +++ b/spec/javascripts/u2f/register_spec.js @@ -0,0 +1,81 @@ + +/*= require u2f/register */ + + +/*= require u2f/util */ + + +/*= require u2f/error */ + + +/*= require u2f */ + + +/*= require ./mock_u2f_device */ + +(function() { + describe('U2FRegister', function() { + fixture.load('u2f/register'); + beforeEach(function() { + this.u2fDevice = new MockU2FDevice; + this.container = $("#js-register-u2f"); + this.component = new U2FRegister(this.container, $("#js-register-u2f-templates"), {}, "token"); + return this.component.start(); + }); + it('allows registering a U2F device', function() { + var deviceResponse, inProgressMessage, registeredMessage, setupButton; + setupButton = this.container.find("#js-setup-u2f-device"); + expect(setupButton.text()).toBe('Setup New U2F Device'); + setupButton.trigger('click'); + inProgressMessage = this.container.children("p"); + expect(inProgressMessage.text()).toContain("Trying to communicate with your device"); + this.u2fDevice.respondToRegisterRequest({ + deviceData: "this is data from the device" + }); + registeredMessage = this.container.find('p'); + deviceResponse = this.container.find('#js-device-response'); + expect(registeredMessage.text()).toContain("Your device was successfully set up!"); + return expect(deviceResponse.val()).toBe('{"deviceData":"this is data from the device"}'); + }); + return describe("errors", function() { + it("doesn't allow the same device to be registered twice (for the same user", function() { + var errorMessage, setupButton; + setupButton = this.container.find("#js-setup-u2f-device"); + setupButton.trigger('click'); + this.u2fDevice.respondToRegisterRequest({ + errorCode: 4 + }); + errorMessage = this.container.find("p"); + return expect(errorMessage.text()).toContain("already been registered with us"); + }); + it("displays an error message for other errors", function() { + var errorMessage, setupButton; + setupButton = this.container.find("#js-setup-u2f-device"); + setupButton.trigger('click'); + this.u2fDevice.respondToRegisterRequest({ + errorCode: "error!" + }); + errorMessage = this.container.find("p"); + return expect(errorMessage.text()).toContain("There was a problem communicating with your device"); + }); + return it("allows retrying registration after an error", function() { + var registeredMessage, retryButton, setupButton; + setupButton = this.container.find("#js-setup-u2f-device"); + setupButton.trigger('click'); + this.u2fDevice.respondToRegisterRequest({ + errorCode: "error!" + }); + retryButton = this.container.find("#U2FTryAgain"); + retryButton.trigger('click'); + setupButton = this.container.find("#js-setup-u2f-device"); + setupButton.trigger('click'); + this.u2fDevice.respondToRegisterRequest({ + deviceData: "this is data from the device" + }); + registeredMessage = this.container.find("p"); + return expect(registeredMessage.text()).toContain("Your device was successfully set up!"); + }); + }); + }); + +}).call(this); diff --git a/spec/javascripts/u2f/register_spec.js.coffee b/spec/javascripts/u2f/register_spec.js.coffee deleted file mode 100644 index 87dc769792b..00000000000 --- a/spec/javascripts/u2f/register_spec.js.coffee +++ /dev/null @@ -1,56 +0,0 @@ -#= require u2f/register -#= require u2f/util -#= require u2f/error -#= require u2f -#= require ./mock_u2f_device - -describe 'U2FRegister', -> - fixture.load('u2f/register') - - beforeEach -> - @u2fDevice = new MockU2FDevice - @container = $("#js-register-u2f") - @component = new U2FRegister(@container, $("#js-register-u2f-templates"), {}, "token") - @component.start() - - it 'allows registering a U2F device', -> - setupButton = @container.find("#js-setup-u2f-device") - expect(setupButton.text()).toBe('Setup New U2F Device') - setupButton.trigger('click') - - inProgressMessage = @container.children("p") - expect(inProgressMessage.text()).toContain("Trying to communicate with your device") - - @u2fDevice.respondToRegisterRequest({deviceData: "this is data from the device"}) - registeredMessage = @container.find('p') - deviceResponse = @container.find('#js-device-response') - expect(registeredMessage.text()).toContain("Your device was successfully set up!") - expect(deviceResponse.val()).toBe('{"deviceData":"this is data from the device"}') - - describe "errors", -> - it "doesn't allow the same device to be registered twice (for the same user", -> - setupButton = @container.find("#js-setup-u2f-device") - setupButton.trigger('click') - @u2fDevice.respondToRegisterRequest({errorCode: 4}) - errorMessage = @container.find("p") - expect(errorMessage.text()).toContain("already been registered with us") - - it "displays an error message for other errors", -> - setupButton = @container.find("#js-setup-u2f-device") - setupButton.trigger('click') - @u2fDevice.respondToRegisterRequest({errorCode: "error!"}) - errorMessage = @container.find("p") - expect(errorMessage.text()).toContain("There was a problem communicating with your device") - - it "allows retrying registration after an error", -> - setupButton = @container.find("#js-setup-u2f-device") - setupButton.trigger('click') - @u2fDevice.respondToRegisterRequest({errorCode: "error!"}) - retryButton = @container.find("#U2FTryAgain") - retryButton.trigger('click') - - setupButton = @container.find("#js-setup-u2f-device") - setupButton.trigger('click') - @u2fDevice.respondToRegisterRequest({deviceData: "this is data from the device"}) - registeredMessage = @container.find("p") - expect(registeredMessage.text()).toContain("Your device was successfully set up!") diff --git a/spec/javascripts/zen_mode_spec.js b/spec/javascripts/zen_mode_spec.js new file mode 100644 index 00000000000..3d680ec8ea3 --- /dev/null +++ b/spec/javascripts/zen_mode_spec.js @@ -0,0 +1,73 @@ + +/*= require zen_mode */ + +(function() { + var enterZen, escapeKeydown, exitZen; + + describe('ZenMode', function() { + fixture.preload('zen_mode.html'); + beforeEach(function() { + fixture.load('zen_mode.html'); + spyOn(Dropzone, 'forElement').and.callFake(function() { + return { + enable: function() { + return true; + } + }; + }); + this.zen = new ZenMode(); + return this.zen.scroll_position = 456; + }); + describe('on enter', function() { + it('pauses Mousetrap', function() { + spyOn(Mousetrap, 'pause'); + enterZen(); + return expect(Mousetrap.pause).toHaveBeenCalled(); + }); + return it('removes textarea styling', function() { + $('textarea').attr('style', 'height: 400px'); + enterZen(); + return expect('textarea').not.toHaveAttr('style'); + }); + }); + describe('in use', function() { + beforeEach(function() { + return enterZen(); + }); + return it('exits on Escape', function() { + escapeKeydown(); + return expect($('.zen-backdrop')).not.toHaveClass('fullscreen'); + }); + }); + return describe('on exit', function() { + beforeEach(function() { + return enterZen(); + }); + it('unpauses Mousetrap', function() { + spyOn(Mousetrap, 'unpause'); + exitZen(); + return expect(Mousetrap.unpause).toHaveBeenCalled(); + }); + return it('restores the scroll position', function() { + spyOn(this.zen, 'scrollTo'); + exitZen(); + return expect(this.zen.scrollTo).toHaveBeenCalled(); + }); + }); + }); + + enterZen = function() { + return $('a.js-zen-enter').click(); + }; + + exitZen = function() { + return $('a.js-zen-leave').click(); + }; + + escapeKeydown = function() { + return $('textarea').trigger($.Event('keydown', { + keyCode: 27 + })); + }; + +}).call(this); diff --git a/spec/javascripts/zen_mode_spec.js.coffee b/spec/javascripts/zen_mode_spec.js.coffee deleted file mode 100644 index b790fce01ed..00000000000 --- a/spec/javascripts/zen_mode_spec.js.coffee +++ /dev/null @@ -1,51 +0,0 @@ -#= require zen_mode - -describe 'ZenMode', -> - fixture.preload('zen_mode.html') - - beforeEach -> - fixture.load('zen_mode.html') - - # Stub Dropzone.forElement(...).enable() - spyOn(Dropzone, 'forElement').and.callFake -> - enable: -> true - - @zen = new ZenMode() - - # Set this manually because we can't actually scroll the window - @zen.scroll_position = 456 - - describe 'on enter', -> - it 'pauses Mousetrap', -> - spyOn(Mousetrap, 'pause') - enterZen() - expect(Mousetrap.pause).toHaveBeenCalled() - - it 'removes textarea styling', -> - $('textarea').attr('style', 'height: 400px') - enterZen() - expect('textarea').not.toHaveAttr('style') - - describe 'in use', -> - beforeEach -> enterZen() - - it 'exits on Escape', -> - escapeKeydown() - expect($('.zen-backdrop')).not.toHaveClass('fullscreen') - - describe 'on exit', -> - beforeEach -> enterZen() - - it 'unpauses Mousetrap', -> - spyOn(Mousetrap, 'unpause') - exitZen() - expect(Mousetrap.unpause).toHaveBeenCalled() - - it 'restores the scroll position', -> - spyOn(@zen, 'scrollTo') - exitZen() - expect(@zen.scrollTo).toHaveBeenCalled() - -enterZen = -> $('a.js-zen-enter').click() # Ohmmmmmmm -exitZen = -> $('a.js-zen-leave').click() -escapeKeydown = -> $('textarea').trigger($.Event('keydown', {keyCode: 27})) diff --git a/vendor/assets/javascripts/task_list.js b/vendor/assets/javascripts/task_list.js new file mode 100644 index 00000000000..bc451506b6a --- /dev/null +++ b/vendor/assets/javascripts/task_list.js @@ -0,0 +1,119 @@ + +/*= provides tasklist:enabled */ + + +/*= provides tasklist:disabled */ + + +/*= provides tasklist:change */ + + +/*= provides tasklist:changed */ + +(function() { + var codeFencesPattern, complete, completePattern, disableTaskList, disableTaskLists, enableTaskList, enableTaskLists, escapePattern, incomplete, incompletePattern, itemPattern, itemsInParasPattern, updateTaskList, updateTaskListItem, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + incomplete = "[ ]"; + + complete = "[x]"; + + escapePattern = function(str) { + return str.replace(/([\[\]])/g, "\\$1").replace(/\s/, "\\s").replace("x", "[xX]"); + }; + + incompletePattern = RegExp("" + (escapePattern(incomplete))); + + completePattern = RegExp("" + (escapePattern(complete))); + + itemPattern = RegExp("^(?:\\s*(?:>\\s*)*(?:[-+*]|(?:\\d+\\.)))\\s*(" + (escapePattern(complete)) + "|" + (escapePattern(incomplete)) + ")\\s+(?!\\(.*?\\))(?=(?:\\[.*?\\]\\s*(?:\\[.*?\\]|\\(.*?\\))\\s*)*(?:[^\\[]|$))"); + + codeFencesPattern = /^`{3}(?:\s*\w+)?[\S\s].*[\S\s]^`{3}$/mg; + + itemsInParasPattern = RegExp("^(" + (escapePattern(complete)) + "|" + (escapePattern(incomplete)) + ").+$", "g"); + + updateTaskListItem = function(source, itemIndex, checked) { + var clean, index, line, result; + clean = source.replace(/\r/g, '').replace(codeFencesPattern, '').replace(itemsInParasPattern, '').split("\n"); + index = 0; + result = (function() { + var i, len, ref, results; + ref = source.split("\n"); + results = []; + for (i = 0, len = ref.length; i < len; i++) { + line = ref[i]; + if (indexOf.call(clean, line) >= 0 && line.match(itemPattern)) { + index += 1; + if (index === itemIndex) { + line = checked ? line.replace(incompletePattern, complete) : line.replace(completePattern, incomplete); + } + } + results.push(line); + } + return results; + })(); + return result.join("\n"); + }; + + updateTaskList = function($item) { + var $container, $field, checked, event, index; + $container = $item.closest('.js-task-list-container'); + $field = $container.find('.js-task-list-field'); + index = 1 + $container.find('.task-list-item-checkbox').index($item); + checked = $item.prop('checked'); + event = $.Event('tasklist:change'); + $field.trigger(event, [index, checked]); + if (!event.isDefaultPrevented()) { + $field.val(updateTaskListItem($field.val(), index, checked)); + $field.trigger('change'); + return $field.trigger('tasklist:changed', [index, checked]); + } + }; + + $(document).on('change', '.task-list-item-checkbox', function() { + return updateTaskList($(this)); + }); + + enableTaskList = function($container) { + if ($container.find('.js-task-list-field').length > 0) { + $container.find('.task-list-item').addClass('enabled').find('.task-list-item-checkbox').attr('disabled', null); + return $container.addClass('is-task-list-enabled').trigger('tasklist:enabled'); + } + }; + + enableTaskLists = function($containers) { + var container, i, len, results; + results = []; + for (i = 0, len = $containers.length; i < len; i++) { + container = $containers[i]; + results.push(enableTaskList($(container))); + } + return results; + }; + + disableTaskList = function($container) { + $container.find('.task-list-item').removeClass('enabled').find('.task-list-item-checkbox').attr('disabled', 'disabled'); + return $container.removeClass('is-task-list-enabled').trigger('tasklist:disabled'); + }; + + disableTaskLists = function($containers) { + var container, i, len, results; + results = []; + for (i = 0, len = $containers.length; i < len; i++) { + container = $containers[i]; + results.push(disableTaskList($(container))); + } + return results; + }; + + $.fn.taskList = function(method) { + var $container, methods; + $container = $(this).closest('.js-task-list-container'); + methods = { + enable: enableTaskLists, + disable: disableTaskLists + }; + return methods[method || 'enable']($container); + }; + +}).call(this); diff --git a/vendor/assets/javascripts/task_list.js.coffee b/vendor/assets/javascripts/task_list.js.coffee deleted file mode 100644 index 584751af8ea..00000000000 --- a/vendor/assets/javascripts/task_list.js.coffee +++ /dev/null @@ -1,258 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2014 GitHub, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -# TaskList Behavior -# -#= provides tasklist:enabled -#= provides tasklist:disabled -#= provides tasklist:change -#= provides tasklist:changed -# -# -# Enables Task List update behavior. -# -# ### Example Markup -# -#
                -#
                  -#
                • -# -# text -#
                • -#
                -#
                -# -#
                -#
                -# -# ### Specification -# -# TaskLists MUST be contained in a `(div).js-task-list-container`. -# -# TaskList Items SHOULD be an a list (`UL`/`OL`) element. -# -# Task list items MUST match `(input).task-list-item-checkbox` and MUST be -# `disabled` by default. -# -# TaskLists MUST have a `(textarea).js-task-list-field` form element whose -# `value` attribute is the source (Markdown) to be udpated. The source MUST -# follow the syntax guidelines. -# -# TaskList updates trigger `tasklist:change` events. If the change is -# successful, `tasklist:changed` is fired. The change can be canceled. -# -# jQuery is required. -# -# ### Methods -# -# `.taskList('enable')` or `.taskList()` -# -# Enables TaskList updates for the container. -# -# `.taskList('disable')` -# -# Disables TaskList updates for the container. -# -## ### Events -# -# `tasklist:enabled` -# -# Fired when the TaskList is enabled. -# -# * **Synchronicity** Sync -# * **Bubbles** Yes -# * **Cancelable** No -# * **Target** `.js-task-list-container` -# -# `tasklist:disabled` -# -# Fired when the TaskList is disabled. -# -# * **Synchronicity** Sync -# * **Bubbles** Yes -# * **Cancelable** No -# * **Target** `.js-task-list-container` -# -# `tasklist:change` -# -# Fired before the TaskList item change takes affect. -# -# * **Synchronicity** Sync -# * **Bubbles** Yes -# * **Cancelable** Yes -# * **Target** `.js-task-list-field` -# -# `tasklist:changed` -# -# Fired once the TaskList item change has taken affect. -# -# * **Synchronicity** Sync -# * **Bubbles** Yes -# * **Cancelable** No -# * **Target** `.js-task-list-field` -# -# ### NOTE -# -# Task list checkboxes are rendered as disabled by default because rendered -# user content is cached without regard for the viewer. - -incomplete = "[ ]" -complete = "[x]" - -# Escapes the String for regular expression matching. -escapePattern = (str) -> - str. - replace(/([\[\]])/g, "\\$1"). # escape square brackets - replace(/\s/, "\\s"). # match all white space - replace("x", "[xX]") # match all cases - -incompletePattern = /// - #{escapePattern(incomplete)} -/// -completePattern = /// - #{escapePattern(complete)} -/// - -# Pattern used to identify all task list items. -# Useful when you need iterate over all items. -itemPattern = /// - ^ - (?: # prefix, consisting of - \s* # optional leading whitespace - (?:>\s*)* # zero or more blockquotes - (?:[-+*]|(?:\d+\.)) # list item indicator - ) - \s* # optional whitespace prefix - ( # checkbox - #{escapePattern(complete)}| - #{escapePattern(incomplete)} - ) - \s+ # is followed by whitespace - (?! - \(.*?\) # is not part of a [foo](url) link - ) - (?= # and is followed by zero or more links - (?:\[.*?\]\s*(?:\[.*?\]|\(.*?\))\s*)* - (?:[^\[]|$) # and either a non-link or the end of the string - ) -/// - -# Used to filter out code fences from the source for comparison only. -# http://rubular.com/r/x5EwZVrloI -# Modified slightly due to issues with JS -codeFencesPattern = /// - ^`{3} # ``` - (?:\s*\w+)? # followed by optional language - [\S\s] # whitespace - .* # code - [\S\s] # whitespace - ^`{3}$ # ``` -///mg - -# Used to filter out potential mismatches (items not in lists). -# http://rubular.com/r/OInl6CiePy -itemsInParasPattern = /// - ^ - ( - #{escapePattern(complete)}| - #{escapePattern(incomplete)} - ) - .+ - $ -///g - -# Given the source text, updates the appropriate task list item to match the -# given checked value. -# -# Returns the updated String text. -updateTaskListItem = (source, itemIndex, checked) -> - clean = source.replace(/\r/g, '').replace(codeFencesPattern, ''). - replace(itemsInParasPattern, '').split("\n") - index = 0 - result = for line in source.split("\n") - if line in clean && line.match(itemPattern) - index += 1 - if index == itemIndex - line = - if checked - line.replace(incompletePattern, complete) - else - line.replace(completePattern, incomplete) - line - result.join("\n") - -# Updates the $field value to reflect the state of $item. -# Triggers the `tasklist:change` event before the value has changed, and fires -# a `tasklist:changed` event once the value has changed. -updateTaskList = ($item) -> - $container = $item.closest '.js-task-list-container' - $field = $container.find '.js-task-list-field' - index = 1 + $container.find('.task-list-item-checkbox').index($item) - checked = $item.prop 'checked' - - event = $.Event 'tasklist:change' - $field.trigger event, [index, checked] - - unless event.isDefaultPrevented() - $field.val updateTaskListItem($field.val(), index, checked) - $field.trigger 'change' - $field.trigger 'tasklist:changed', [index, checked] - -# When the task list item checkbox is updated, submit the change -$(document).on 'change', '.task-list-item-checkbox', -> - updateTaskList $(this) - -# Enables TaskList item changes. -enableTaskList = ($container) -> - if $container.find('.js-task-list-field').length > 0 - $container. - find('.task-list-item').addClass('enabled'). - find('.task-list-item-checkbox').attr('disabled', null) - $container.addClass('is-task-list-enabled'). - trigger 'tasklist:enabled' - -# Enables a collection of TaskList containers. -enableTaskLists = ($containers) -> - for container in $containers - enableTaskList $(container) - -# Disable TaskList item changes. -disableTaskList = ($container) -> - $container. - find('.task-list-item').removeClass('enabled'). - find('.task-list-item-checkbox').attr('disabled', 'disabled') - $container.removeClass('is-task-list-enabled'). - trigger 'tasklist:disabled' - -# Disables a collection of TaskList containers. -disableTaskLists = ($containers) -> - for container in $containers - disableTaskList $(container) - -$.fn.taskList = (method) -> - $container = $(this).closest('.js-task-list-container') - - methods = - enable: enableTaskLists - disable: disableTaskLists - - methods[method || 'enable']($container) -- cgit v1.2.1 From 42a00f740b04555d9150f900145b4dd685000aaf Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Mon, 25 Jul 2016 08:37:46 +0530 Subject: `WikiPage` should have a slug even when not persisted. 1. So we can build the markdown preview URL for it. 2. We can't skip the slug in this case, because the slug is used to construct relative markdown URLs. 3. Add rspec feature tests to cover creating wiki pages with spaces/hyphens in the name. 4. Add rspec feature tests for markdown preview URL rewriting, which was only covered by unit tests up to this point. --- app/models/wiki_page.rb | 6 +- app/views/layouts/project.html.haml | 2 +- .../projects/wiki/markdown_preview_spec.rb | 140 +++++++++++++++++++++ .../projects/wiki/user_creates_wiki_page_spec.rb | 48 +++++-- 4 files changed, 185 insertions(+), 11 deletions(-) create mode 100644 spec/features/projects/wiki/markdown_preview_spec.rb diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 3d5fd9d3ee9..c3de278f5b7 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -44,7 +44,11 @@ class WikiPage # The escaped URL path of this page. def slug - @attributes[:slug] + if @attributes[:slug].present? + @attributes[:slug] + else + wiki.wiki.preview_page(title, '', format).url_path + end end alias_method :to_param, :slug diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 28cb6c56650..ee9c0366f2b 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -5,7 +5,7 @@ - content_for :scripts_body_top do - project = @target_project || @project - - if @project_wiki && @page && @page.slug.present? + - if @project_wiki && @page - markdown_preview_path = namespace_project_wiki_markdown_preview_path(project.namespace, project, @page.slug) - else - markdown_preview_path = markdown_preview_namespace_project_path(project.namespace, project) diff --git a/spec/features/projects/wiki/markdown_preview_spec.rb b/spec/features/projects/wiki/markdown_preview_spec.rb new file mode 100644 index 00000000000..a1c386ddc18 --- /dev/null +++ b/spec/features/projects/wiki/markdown_preview_spec.rb @@ -0,0 +1,140 @@ +require 'spec_helper' + +feature 'Projects > Wiki > User previews markdown changes', feature: true, js: true do + let(:user) { create(:user) } + let(:project) { create(:project, namespace: user.namespace) } + let(:wiki_content) do + <<-HEREDOC +[regular link](regular) +[relative link 1](../relative) +[relative link 2](./relative) +[relative link 3](./e/f/relative) + HEREDOC + end + + background do + project.team << [user, :master] + login_as(user) + + visit namespace_project_path(project.namespace, project) + click_link 'Wiki' + WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute + end + + context "while creating a new wiki page" do + context "when there are no spaces or hyphens in the page name" do + it "rewrites relative links as expected" do + click_link 'New Page' + fill_in :new_wiki_path, with: 'a/b/c/d' + click_button 'Create Page' + + fill_in :wiki_content, with: wiki_content + click_on "Preview" + + expect(page).to have_content("regular link") + + expect(page.html).to include("regular link") + expect(page.html).to include("relative link 1") + expect(page.html).to include("relative link 2") + expect(page.html).to include("relative link 3") + end + end + + context "when there are spaces in the page name" do + it "rewrites relative links as expected" do + click_link 'New Page' + fill_in :new_wiki_path, with: 'a page/b page/c page/d page' + click_button 'Create Page' + + fill_in :wiki_content, with: wiki_content + click_on "Preview" + + expect(page).to have_content("regular link") + + expect(page.html).to include("regular link") + expect(page.html).to include("relative link 1") + expect(page.html).to include("relative link 2") + expect(page.html).to include("relative link 3") + end + end + + context "when there are hyphens in the page name" do + it "rewrites relative links as expected" do + click_link 'New Page' + fill_in :new_wiki_path, with: 'a-page/b-page/c-page/d-page' + click_button 'Create Page' + + fill_in :wiki_content, with: wiki_content + click_on "Preview" + + expect(page).to have_content("regular link") + + expect(page.html).to include("regular link") + expect(page.html).to include("relative link 1") + expect(page.html).to include("relative link 2") + expect(page.html).to include("relative link 3") + end + end + end + + context "while editing a wiki page" do + def create_wiki_page(path) + click_link 'New Page' + fill_in :new_wiki_path, with: path + click_button 'Create Page' + fill_in :wiki_content, with: 'content' + click_on "Create page" + end + + context "when there are no spaces or hyphens in the page name" do + it "rewrites relative links as expected" do + create_wiki_page 'a/b/c/d' + click_link 'Edit' + + fill_in :wiki_content, with: wiki_content + click_on "Preview" + + expect(page).to have_content("regular link") + + expect(page.html).to include("regular link") + expect(page.html).to include("relative link 1") + expect(page.html).to include("relative link 2") + expect(page.html).to include("relative link 3") + end + end + + context "when there are spaces in the page name" do + it "rewrites relative links as expected" do + create_wiki_page 'a page/b page/c page/d page' + click_link 'Edit' + + fill_in :wiki_content, with: wiki_content + click_on "Preview" + + expect(page).to have_content("regular link") + + expect(page.html).to include("regular link") + expect(page.html).to include("relative link 1") + expect(page.html).to include("relative link 2") + expect(page.html).to include("relative link 3") + end + end + + context "when there are hyphens in the page name" do + it "rewrites relative links as expected" do + create_wiki_page 'a-page/b-page/c-page/d-page' + click_link 'Edit' + + fill_in :wiki_content, with: wiki_content + click_on "Preview" + + expect(page).to have_content("regular link") + + expect(page.html).to include("regular link") + expect(page.html).to include("relative link 1") + expect(page.html).to include("relative link 2") + expect(page.html).to include("relative link 3") + end + end + end +end diff --git a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb index 7e6eef65873..7afd83b7250 100644 --- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb @@ -30,18 +30,48 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute end - scenario 'via the "new wiki page" page', js: true do - click_link 'New Page' + context 'via the "new wiki page" page' do + scenario 'when the wiki page has a single word name', js: true do + click_link 'New Page' - fill_in :new_wiki_path, with: 'foo' - click_button 'Create Page' + fill_in :new_wiki_path, with: 'foo' + click_button 'Create Page' - fill_in :wiki_content, with: 'My awesome wiki!' - click_button 'Create page' + fill_in :wiki_content, with: 'My awesome wiki!' + click_button 'Create page' - expect(page).to have_content('Foo') - expect(page).to have_content("last edited by #{user.name}") - expect(page).to have_content('My awesome wiki!') + expect(page).to have_content('Foo') + expect(page).to have_content("last edited by #{user.name}") + expect(page).to have_content('My awesome wiki!') + end + + scenario 'when the wiki page has spaces in the name', js: true do + click_link 'New Page' + + fill_in :new_wiki_path, with: 'Spaces in the name' + click_button 'Create Page' + + fill_in :wiki_content, with: 'My awesome wiki!' + click_button 'Create page' + + expect(page).to have_content('Spaces in the name') + expect(page).to have_content("last edited by #{user.name}") + expect(page).to have_content('My awesome wiki!') + end + + scenario 'when the wiki page has hyphens in the name', js: true do + click_link 'New Page' + + fill_in :new_wiki_path, with: 'hyphens-in-the-name' + click_button 'Create Page' + + fill_in :wiki_content, with: 'My awesome wiki!' + click_button 'Create page' + + expect(page).to have_content('Hyphens in the name') + expect(page).to have_content("last edited by #{user.name}") + expect(page).to have_content('My awesome wiki!') + end end end end -- cgit v1.2.1 From af4a74cbef300dbe98891d2b1c70bdaa9c381418 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Mon, 25 Jul 2016 13:38:01 +0200 Subject: Add iid to MR API response --- doc/api/merge_requests.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index a8c3b068d22..e00882e6d5d 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -276,6 +276,7 @@ Parameters: ```json { "id": 1, + "iid": 1, "target_branch": "master", "source_branch": "test1", "project_id": 3, @@ -350,6 +351,7 @@ Parameters: ```json { "id": 1, + "iid": 1, "target_branch": "master", "project_id": 3, "title": "test1", @@ -449,6 +451,7 @@ Parameters: ```json { "id": 1, + "iid": 1, "target_branch": "master", "source_branch": "test1", "project_id": 3, @@ -517,6 +520,7 @@ Parameters: ```json { "id": 1, + "iid": 1, "target_branch": "master", "source_branch": "test1", "project_id": 3, -- cgit v1.2.1 From 3618796e15d542293aaa721045ff943d360d963a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 24 Jul 2016 10:39:28 -0700 Subject: Use project ID in repository cache to prevent stale data from persisting across projects We have a number of bugs caused by cache keys not being flushed properly during deletion of a project. Add the project ID to ensure this never happens. Closes #20027 --- CHANGELOG | 3 +++ app/models/repository.rb | 2 +- lib/repository_cache.rb | 7 ++++--- spec/lib/repository_cache_spec.rb | 13 +++++++------ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 698fbf6a160..e9d5f503615 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,9 @@ v 8.11.0 (unreleased) - Load project invited groups and members eagerly in ProjectTeam#fetch_members - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) +v 8.10.2 (unreleased) + - Use project ID in repository cache to prevent stale data from persisting across projects + v 8.10.1 (unreleased) - Fix Error 500 when creating Wiki pages with hyphens or spaces - Ignore invalid trusted proxies in X-Forwarded-For header diff --git a/app/models/repository.rb b/app/models/repository.rb index 793b1cf4989..053e2a9555b 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1031,7 +1031,7 @@ class Repository private def cache - @cache ||= RepositoryCache.new(path_with_namespace) + @cache ||= RepositoryCache.new(path_with_namespace, @project.id) end def head_exists? diff --git a/lib/repository_cache.rb b/lib/repository_cache.rb index 8ddc3511293..068a95790c0 100644 --- a/lib/repository_cache.rb +++ b/lib/repository_cache.rb @@ -1,14 +1,15 @@ # Interface to the Redis-backed cache store used by the Repository model class RepositoryCache - attr_reader :namespace, :backend + attr_reader :namespace, :backend, :project_id - def initialize(namespace, backend = Rails.cache) + def initialize(namespace, project_id, backend = Rails.cache) @namespace = namespace @backend = backend + @project_id = project_id end def cache_key(type) - "#{type}:#{namespace}" + "#{type}:#{namespace}:#{project_id}" end def expire(key) diff --git a/spec/lib/repository_cache_spec.rb b/spec/lib/repository_cache_spec.rb index 63b5292b098..f227926f39c 100644 --- a/spec/lib/repository_cache_spec.rb +++ b/spec/lib/repository_cache_spec.rb @@ -1,33 +1,34 @@ -require_relative '../../lib/repository_cache' +require 'spec_helper' describe RepositoryCache, lib: true do + let(:project) { create(:project) } let(:backend) { double('backend').as_null_object } - let(:cache) { RepositoryCache.new('example', backend) } + let(:cache) { RepositoryCache.new('example', project.id, backend) } describe '#cache_key' do it 'includes the namespace' do - expect(cache.cache_key(:foo)).to eq 'foo:example' + expect(cache.cache_key(:foo)).to eq "foo:example:#{project.id}" end end describe '#expire' do it 'expires the given key from the cache' do cache.expire(:foo) - expect(backend).to have_received(:delete).with('foo:example') + expect(backend).to have_received(:delete).with("foo:example:#{project.id}") end end describe '#fetch' do it 'fetches the given key from the cache' do cache.fetch(:bar) - expect(backend).to have_received(:fetch).with('bar:example') + expect(backend).to have_received(:fetch).with("bar:example:#{project.id}") end it 'accepts a block' do p = -> {} cache.fetch(:baz, &p) - expect(backend).to have_received(:fetch).with('baz:example', &p) + expect(backend).to have_received(:fetch).with("baz:example:#{project.id}", &p) end end end -- cgit v1.2.1 From c6ff77d4b892c41c9fdbd8a8fbaec9ed611e10a4 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 24 Jul 2016 04:56:27 -0700 Subject: Fix backup restore Set permissions of backup dir to g+s Closes #20188 --- CHANGELOG | 1 + lib/backup/repository.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2f9b6e0da24..d8dd4451224 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ v 8.11.0 (unreleased) v 8.10.2 (unreleased) - Use project ID in repository cache to prevent stale data from persisting across projects + - Fix backup restore v 8.10.1 (unreleased) - Fix Error 500 when creating Wiki pages with hyphens or spaces diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb index b9773f98d75..1f5917b8127 100644 --- a/lib/backup/repository.rb +++ b/lib/backup/repository.rb @@ -54,10 +54,10 @@ module Backup # Move repos dir to 'repositories.old' dir bk_repos_path = File.join(path, '..', 'repositories.old.' + Time.now.to_i.to_s) FileUtils.mv(path, bk_repos_path) + # This is expected from gitlab:check + FileUtils.mkdir_p(path, mode: 2770) end - FileUtils.mkdir_p(repos_path) - Project.find_each(batch_size: 1000) do |project| $progress.print " * #{project.path_with_namespace} ... " -- cgit v1.2.1 From 67012f4ae0c914473162d3d84d62e96dad2b3fc4 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 25 Jul 2016 15:45:04 +0200 Subject: Instrument Nokogiri parsing methods This allows us to see how much time is being spent in just parsing HTML/XML documents. --- CHANGELOG | 1 + config/initializers/metrics.rb | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 2f9b6e0da24..e741dbf374b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ v 8.11.0 (unreleased) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check - Retrieve rendered HTML from cache in one request + - Nokogiri's various parsing methods are now instrumented - Make fork counter always clickable !5463 (winniehell) - Load project invited groups and members eagerly in ProjectTeam#fetch_members - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) diff --git a/config/initializers/metrics.rb b/config/initializers/metrics.rb index c4266ab8ba5..f3cddac5b36 100644 --- a/config/initializers/metrics.rb +++ b/config/initializers/metrics.rb @@ -136,6 +136,13 @@ if Gitlab::Metrics.enabled? config.instrument_instance_methods(Rouge::Plugins::Redcarpet) config.instrument_instance_methods(Rouge::Formatters::HTMLGitlab) + [:XML, :HTML].each do |namespace| + namespace_mod = Nokogiri.const_get(namespace) + + config.instrument_methods(namespace_mod) + config.instrument_methods(namespace_mod::Document) + end + config.instrument_methods(Rinku) end -- cgit v1.2.1 From 3f8f1871b49a41b0770d27a4a254f98d6a8b0370 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Mon, 25 Jul 2016 10:59:41 -0400 Subject: Add es6 gem --- Gemfile | 1 + Gemfile.lock | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Gemfile b/Gemfile index 92e666c1bb7..f2ac74a5976 100644 --- a/Gemfile +++ b/Gemfile @@ -9,6 +9,7 @@ gem 'responders', '~> 2.0' # Specify a sprockets version due to increased performance # See https://gitlab.com/gitlab-org/gitlab-ce/issues/6069 gem 'sprockets', '~> 3.6.0' +gem 'sprockets-es6' # Default values for AR models gem 'default_value_for', '~> 3.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index e2b3d55ee0c..bfa7e38da85 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,6 +85,10 @@ GEM faraday (~> 0.9) faraday_middleware (~> 0.10) nokogiri (~> 1.6) + babel-source (5.8.35) + babel-transpiler (0.7.0) + babel-source (>= 4.0, < 6) + execjs (~> 2.0) babosa (1.0.2) base32 (0.3.2) bcrypt (3.1.11) @@ -700,6 +704,10 @@ GEM sprockets (3.6.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) + sprockets-es6 (0.9.0) + babel-source (>= 5.8.11) + babel-transpiler + sprockets (>= 3.0.0) sprockets-rails (3.1.1) actionpack (>= 4.0) activesupport (>= 4.0) @@ -963,6 +971,7 @@ DEPENDENCIES spring-commands-spinach (~> 1.1.0) spring-commands-teaspoon (~> 0.0.2) sprockets (~> 3.6.0) + sprockets-es6 state_machines-activerecord (~> 0.4.0) sys-filesystem (~> 1.1.6) task_list (~> 1.0.2) -- cgit v1.2.1 From 5300c5af362d4f237e887bb427d7a6280ae80207 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Mon, 25 Jul 2016 11:07:13 -0400 Subject: Add CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index e741dbf374b..dbaa9dcf631 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ v 8.11.0 (unreleased) - Make fork counter always clickable !5463 (winniehell) - Load project invited groups and members eagerly in ProjectTeam#fetch_members - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) + - Add ES6 gem v 8.10.2 (unreleased) - Use project ID in repository cache to prevent stale data from persisting across projects -- cgit v1.2.1 From bd6a938e52d238d069a1e9467888f049f19cc201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 25 Jul 2016 17:16:49 +0200 Subject: Update CHANGELOG after 8.10.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- CHANGELOG | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ffe5766a638..2b750cb03fc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,16 +11,19 @@ v 8.11.0 (unreleased) - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska) v 8.10.2 (unreleased) - - Use project ID in repository cache to prevent stale data from persisting across projects - - Fix backup restore + - User can now search branches by name. !5144 + - Fix backup restore. !5459 + - Use project ID in repository cache to prevent stale data from persisting across projects. !5460 + +v 8.10.1 + - Refactor repository storages documentation. !5428 + - Gracefully handle case when keep-around references are corrupted or exist already. !5430 + - Add detailed info on storage path mountpoints. !5437 + - Fix Error 500 when creating Wiki pages with hyphens or spaces. !5444 + - Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page. !5446 + - Ignore invalid trusted proxies in X-Forwarded-For header. !5454 + - Add links to the real markdown.md file for all GFM examples. !5458 -v 8.10.1 (unreleased) - - Fix Error 500 when creating Wiki pages with hyphens or spaces - - Ignore invalid trusted proxies in X-Forwarded-For header - - Fix bug where replies to commit notes displayed in the MR discussion tab wouldn't show up on the commit page - -v 8.10.0 (unreleased) - - User can now search branches by name. !5144 (tiagonbotelho) v 8.10.0 - Fix profile activity heatmap to show correct day name (eanplatter) - Speed up ExternalWikiHelper#get_project_wiki_path -- cgit v1.2.1 From aa3c13491d3d4a20beadc5ff76da35665a6903a6 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Thu, 21 Jul 2016 15:55:21 -0500 Subject: Fix CI status icon link underline --- CHANGELOG | 1 + app/assets/stylesheets/pages/merge_requests.scss | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ca4014461f0..d25f61a3096 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.11.0 (unreleased) - Remove magic comments (`# encoding: UTF-8`) from Ruby files !5456 (winniehell) + - Fix CI status icon link underline (ClemMakesApps) - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' - Limit git rev-list output count to one in forced push check - Add green outline to New Branch button !5447 (winniehell) diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index db295935b00..0a661e529f0 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -216,6 +216,11 @@ position: relative; top: 3px; } + + &:hover, + &:focus { + text-decoration: none; + } } } } -- cgit v1.2.1 From c36d1b162c2a02ae61a4b7b62b6e96df6cb7e9e0 Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Tue, 26 Jul 2016 00:55:00 +0100 Subject: Added '*.js.es6 gitlab-language=javascript' to .gitattributes --- .gitattributes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 7e800609e6c..17cbaa5eef5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ -CHANGELOG merge=union \ No newline at end of file +CHANGELOG merge=union +*.js.es6 gitlab-language=javascript -- cgit v1.2.1