diff --git a/.codacy.yml b/.codacy.yml
index 237a0687d9f..6ed7ebac67a 100644
--- a/.codacy.yml
+++ b/.codacy.yml
@@ -1,4 +1,6 @@
---
+reviews:
+ high_level_summary: true
engines:
duplication:
enabled: true
@@ -19,16 +21,18 @@ languages:
extensions:
- '.md'
exclude_paths:
+ - '.venv/**'
+ - 'allure-report/**'
+ - 'allure-results/**'
+ - 'deprecated/**'
- 'docs/**'
- 'allure-report/**'
- 'img/**'
- '.circleci/**'
- '.circleci/**'
- '.github/**'
- - '*__init__.py'
- - 'rocro.yml'
+ - '**__init__.py'
- 'requirements.txt'
- 'pytest.ini'
- - '.travis.yml'
- '.gitignore'
- '.gitattributes'
diff --git a/.codeclimate.yml b/.codeclimate.yml
index b5c9c42e4a6..54e72ecaf46 100644
--- a/.codeclimate.yml
+++ b/.codeclimate.yml
@@ -17,3 +17,19 @@ checks:
plugins:
duplication:
enabled: false
+exclude_patterns:
+ - ".circleci/"
+ - ".github/"
+ - ".venv/"
+ - "docs/"
+ - "deprecated/"
+ - "img/"
+ - "**/node_modules/"
+ - "script/"
+ - "**/spec/"
+ - "**/vendor/"
+ - "**/*_test.go"
+ - "**/*.d.ts"
+ - "allure-report/"
+ - "allure-results/"
+ - "*.txt"
diff --git a/.coveragerc b/.coveragerc
index a86a94f27ab..256b6072425 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -2,6 +2,7 @@
# include = */src/*
# omit anything in a virtualenv directory anywhere
omit =
+ deprecated/*
/home/travis/virtualenv/*
*.yml
/home/travis/img/*
@@ -13,6 +14,11 @@ omit =
*.html
/tests/*
test_*
+ allure-report/*
+ allure-results/*
+ .circleci/*
+ .github/*
+ img/*
[report]
; Regexes for lines to exclude from consideration
diff --git a/.github/workflows/codacy-coverage-reporter.yaml b/.github/workflows/codacy-coverage-reporter.yaml
new file mode 100644
index 00000000000..db54249152f
--- /dev/null
+++ b/.github/workflows/codacy-coverage-reporter.yaml
@@ -0,0 +1,46 @@
+---
+name: Codacy Coverage Reporter
+
+# Source:
+# https://github.com/codacy/codacy-coverage-reporter-action
+on: # yamllint disable-line rule:truthy
+ push:
+ branches:
+ - 'master'
+ workflow_call:
+
+jobs:
+ codacy-coverage-reporter:
+ runs-on: ubuntu-latest
+ name: codacy-coverage-reporter
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup Python
+ uses: actions/setup-python@main
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install prerequisites
+ run: |
+ python -m pip install --upgrade pip setuptools wheel
+ pip install -r requirements.txt
+ - name: Install pytest, pytest-cov
+ run: |
+ pip install pytest
+ pip install pytest-cov
+ - name: Generate coverage report
+ # You must now upload using a token.
+ # https://app.codecov.io/gh/iKostanOrg/codewars/tests/new
+ # yamllint disable rule:line-length
+ run: |
+ python -c "import os; print(os.getcwd())"
+ python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
+ # yamllint enable rule:line-length
+ - name: Run codacy-coverage-reporter
+ run: |
+ export CODACY_ORGANIZATION_PROVIDER=gh \
+ export CODACY_USERNAME=iKostanOrg \
+ export CODACY_PROJECT_NAME=codewars
+ bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
+ --api-token ${{ secrets.CODACY_API_TOKEN }} \
+ --language Python \
+ --coverage-reports /home/runner/work/codewars/codewars/coverage.xml
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
index 72dc8b80a8d..e6095faa26c 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/codecov.yml
@@ -36,15 +36,15 @@ jobs:
pip install pytest
pip install pytest-cov
- name: Generate coverage report
+ # You must now upload using a token.
+ # https://app.codecov.io/gh/iKostanOrg/codewars/tests/new
# yamllint disable rule:line-length
run: |
python -c "import os; print(os.getcwd())"
- python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
+ python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./ --junitxml=junit.xml -o junit_family=legacy --debug
# yamllint enable rule:line-length
- - name: Upload coverage to Codecov
- uses: codecov/codecov-action@v5.1.1
+ - name: Upload test results to Codecov
+ if: ${{ !cancelled() }}
+ uses: codecov/test-results-action@v1
with:
token: ${{ secrets.codecov_token }}
- files: coverage.xml
- fail_ci_if_error: true # optional (default = false)
- verbose: true # optional (default = false)
diff --git a/.github/workflows/flake8_kyu7.yml b/.github/workflows/flake8_kyu7.yml
new file mode 100644
index 00000000000..f6c3ad57586
--- /dev/null
+++ b/.github/workflows/flake8_kyu7.yml
@@ -0,0 +1,47 @@
+---
+name: Flake8 for kyu7
+
+on: # yamllint disable-line rule:truthy
+ push:
+ branches:
+ - 'kyu7'
+
+permissions:
+ contents: read
+ pull-requests: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.x"]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ # This is the version of the action for setting up Python,
+ # not the Python version.
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ # You can test your matrix by printing the current
+ # Python version
+ - name: Display Python version
+ run: python -c "import sys; print(sys.version)"
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools wheel
+ pip install -r requirements.txt
+ pip install flake8
+ - name: Check to make sure that the module is in your Python path
+ run: |
+ echo $PYTHONPATH
+ - name: Lint with flake8
+ # yamllint disable rule:line-length
+ # stop the build if there are Python syntax errors or undefined names
+ # exit-zero treats all errors as warnings.
+ # The GitHub editor is 127 chars wide
+ run: |
+ flake8 --count --select=E9,F63,F7,F82 --doctests --show-source --statistics ./kyu_7
+ flake8 --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics ./kyu_7
+ # yamllint enable rule:line-length
diff --git a/.github/workflows/flake8_kyu8.yml b/.github/workflows/flake8_kyu8.yml
new file mode 100644
index 00000000000..1685c7f2aee
--- /dev/null
+++ b/.github/workflows/flake8_kyu8.yml
@@ -0,0 +1,47 @@
+---
+name: Flake8 for kyu8
+
+on: # yamllint disable-line rule:truthy
+ push:
+ branches:
+ - 'kyu8'
+
+permissions:
+ contents: read
+ pull-requests: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.x"]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ # This is the version of the action for setting up Python,
+ # not the Python version.
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ # You can test your matrix by printing the current
+ # Python version
+ - name: Display Python version
+ run: python -c "import sys; print(sys.version)"
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools wheel
+ pip install -r requirements.txt
+ pip install flake8
+ - name: Check to make sure that the module is in your Python path
+ run: |
+ echo $PYTHONPATH
+ - name: Lint with flake8
+ # yamllint disable rule:line-length
+ # stop the build if there are Python syntax errors or undefined names
+ # exit-zero treats all errors as warnings.
+ # The GitHub editor is 127 chars wide
+ run: |
+ flake8 --count --select=E9,F63,F7,F82 --doctests --show-source --statistics ./kyu_8
+ flake8 --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics ./kyu_8
+ # yamllint enable rule:line-length
diff --git a/.github/workflows/lint_test_build_pipeline.yml b/.github/workflows/lint_test_build_pipeline.yml
index 28eaad4cef4..8208a76196f 100644
--- a/.github/workflows/lint_test_build_pipeline.yml
+++ b/.github/workflows/lint_test_build_pipeline.yml
@@ -22,6 +22,9 @@ jobs:
yamllint:
name: YAML Lint
uses: iKostanOrg/codewars/.github/workflows/yamllint.yml@master
+ pydocstyle:
+ name: PyDocStyle Lint
+ uses: iKostanOrg/codewars/.github/workflows/pydocstyle.yml@master
pytest:
name: Unitest with pytest
needs:
@@ -30,6 +33,7 @@ jobs:
- markdown
- mypy
- yamllint
+ - pydocstyle
uses: iKostanOrg/codewars/.github/workflows/pytest.yml@master
codecov:
name: Codecov GitHub Action
diff --git a/.github/workflows/markdown_lint.yml b/.github/workflows/markdown_lint.yml
index 64a623ac2da..6486940931c 100644
--- a/.github/workflows/markdown_lint.yml
+++ b/.github/workflows/markdown_lint.yml
@@ -1,5 +1,5 @@
---
-name: 'Markdown Lint'
+name: Markdown Lint
on: # yamllint disable-line rule:truthy
push:
@@ -18,7 +18,7 @@ jobs:
- name: Checkout v4
uses: actions/checkout@v4
- name: markdownlint-cli2-action v16
- uses: DavidAnson/markdownlint-cli2-action@v18
+ uses: DavidAnson/markdownlint-cli2-action@v19
with:
config: '.markdownlint-cli2.yaml'
fix: true
diff --git a/.github/workflows/pydocstyle.yml b/.github/workflows/pydocstyle.yml
new file mode 100644
index 00000000000..83134517527
--- /dev/null
+++ b/.github/workflows/pydocstyle.yml
@@ -0,0 +1,66 @@
+---
+name: pydocstyle
+
+on: # yamllint disable-line rule:truthy
+ push:
+ branches:
+ - 'utils'
+ - 'none'
+ workflow_call:
+
+permissions:
+ contents: read
+ pull-requests: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.x"]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ # This is the version of the action for setting up Python,
+ # not the Python version.
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ # You can test your matrix by printing the current Python version
+ - name: Display Python version
+ run: python -c "import sys; print(sys.version)"
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools wheel
+ pip install -r requirements.txt
+ pip install pydocstyle
+ pip install types-requests
+ - name: Check to make sure that the module is in your Python path
+ run: |
+ echo $PYTHONPATH
+ - name: Check pydocstyle version
+ run: |
+ pydocstyle --version
+ # Pydocstyle testing (Guide)
+ # https://www.pydocstyle.org/en/stable/usage.html#cli-usage
+ - name: Doc style checking with pydocstyle for kyu_2
+ run: |
+ pydocstyle --verbose --explain --count kyu_2
+ - name: Doc style checking with pydocstyle for kyu_3
+ run: |
+ pydocstyle --verbose --explain --count kyu_3
+ - name: Doc style checking with pydocstyle for kyu_4
+ run: |
+ pydocstyle --verbose --explain --count kyu_4
+ - name: Doc style checking with pydocstyle for kyu_5
+ run: |
+ pydocstyle --verbose --explain --count kyu_5
+ - name: Doc style checking with pydocstyle for kyu_6
+ run: |
+ pydocstyle --verbose --explain --count kyu_6
+ - name: Doc style checking with pydocstyle for kyu_7
+ run: |
+ pydocstyle --verbose --explain --count kyu_7
+ - name: Doc style checking with pydocstyle for kyu_8
+ run: |
+ pydocstyle --verbose --explain --count kyu_8
diff --git a/.github/workflows/pydocstyle_kyu7.yml b/.github/workflows/pydocstyle_kyu7.yml
new file mode 100644
index 00000000000..7f722ee07ed
--- /dev/null
+++ b/.github/workflows/pydocstyle_kyu7.yml
@@ -0,0 +1,46 @@
+---
+name: pydocstyle for kyu7
+
+on: # yamllint disable-line rule:truthy
+ push:
+ branches:
+ - 'kyu7'
+
+permissions:
+ contents: read
+ pull-requests: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.x"]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ # This is the version of the action for setting up Python,
+ # not the Python version.
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ # You can test your matrix by printing the current Python version
+ - name: Display Python version
+ run: python -c "import sys; print(sys.version)"
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools wheel
+ pip install -r requirements.txt
+ pip install pydocstyle
+ pip install types-requests
+ - name: Check to make sure that the module is in your Python path
+ run: |
+ echo $PYTHONPATH
+ - name: Check pydocstyle version
+ run: |
+ pydocstyle --version
+ - name: Doc style checking with pydocstyle
+ # Pydocstyle testing (Guide)
+ # https://www.pydocstyle.org/en/stable/usage.html#cli-usage
+ run: |
+ pydocstyle --verbose --explain --count kyu_7
diff --git a/.github/workflows/pydocstyle_kyu8.yml b/.github/workflows/pydocstyle_kyu8.yml
new file mode 100644
index 00000000000..0757b0c333b
--- /dev/null
+++ b/.github/workflows/pydocstyle_kyu8.yml
@@ -0,0 +1,46 @@
+---
+name: pydocstyle for kyu8
+
+on: # yamllint disable-line rule:truthy
+ push:
+ branches:
+ - 'kyu8'
+
+permissions:
+ contents: read
+ pull-requests: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.x"]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ # This is the version of the action for setting up Python,
+ # not the Python version.
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ # You can test your matrix by printing the current Python version
+ - name: Display Python version
+ run: python -c "import sys; print(sys.version)"
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools wheel
+ pip install -r requirements.txt
+ pip install pydocstyle
+ pip install types-requests
+ - name: Check to make sure that the module is in your Python path
+ run: |
+ echo $PYTHONPATH
+ - name: Check pydocstyle version
+ run: |
+ pydocstyle --version
+ - name: Doc style checking with pydocstyle
+ # Pydocstyle testing (Guide)
+ # https://www.pydocstyle.org/en/stable/usage.html#cli-usage
+ run: |
+ pydocstyle --verbose --explain --count kyu_8
diff --git a/.yamllint.yaml b/.yamllint.yaml
index 0fc474edf2b..e17753bd80c 100644
--- a/.yamllint.yaml
+++ b/.yamllint.yaml
@@ -7,7 +7,7 @@ yaml-files:
- '.yamllint'
ignore: |
- depricated/
+ deprecated/
rules:
anchors: enable
diff --git a/README.md b/README.md
index e7b1fc12747..cd51307fdee 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@
[![codecov](https://codecov.io/gh/iKostanOrg/codewars/branch/master/graph/badge.svg)](https://codecov.io/gh/iKostanOrg/codewars)
[![CodeFactor](https://www.codefactor.io/repository/github/ikostanorg/codewars/badge)](https://www.codefactor.io/repository/github/ikostanorg/codewars)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/647e16e648f748a28fce36b4895f7729)](https://www.codacy.com/gh/iKostanOrg/codewars?utm_source=github.com&utm_medium=referral&utm_content=iKostanOrg/codewars&utm_campaign=Badge_Grade)
+[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/647e16e648f748a28fce36b4895f7729)](https://app.codacy.com/gh/iKostanOrg/codewars/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/c22e4214ebb0b0626b83/maintainability)](https://codeclimate.com/github/iKostanOrg/codewars/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c22e4214ebb0b0626b83/test_coverage)](https://codeclimate.com/github/iKostanOrg/codewars/test_coverage)
![Maintenance](https://img.shields.io/maintenance/yes/2024)
@@ -64,6 +65,12 @@ moderate the content and community.
### Python Packages
+
+| No. | Package | Description | Link |
+|-----|:-------------------------------------------------------------:|-------------|:----:|
+| 1 | | | |
+
+
Full list of dependencies see [here.](https://github.com/iKostanOrg/codewars/blob/master/requirements.txt)
### Online Documentation
@@ -93,7 +100,7 @@ for CI or a build tool.
## Tech Issues and Problem Solving
-
+
Changing the project interpreter in the PyCharm project settings
@@ -230,6 +237,34 @@ git commit -m "fixed untracked files"
```
+
+ Scoop: a command-line installer for Windows
+
+Installation instructions:
+
+Open a PowerShell terminal (version 5.1 or later) and from the PS C:\> prompt:
+
+1. Set the execution policy:
+```bash
+Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
+
+[Source](https://scoop.sh/#/)
+
+
+
+ Install Allure Report for Windows
+
+Install from [Scoop](https://scoop.sh/#/):
+
+1. Make sure Scoop is installed. See [the installation instructions on GitHub](https://github.com/ScoopInstaller/Install#readme).
+2. Make sure `Java version 8 or higher` installed, and its directory is specified
+ in the `JAVA_HOME` environment variable.
+3. In a terminal, run this command: `scoop install allure`
+4. Run this command to see if it reports the latest version: `allure --version`
+
+[Source](https://allurereport.org/docs/install-for-windows/)
+
+
How to generate Allure report with history trends (Windows OS)
@@ -350,4 +385,62 @@ the environment for every build, see comment from Grimmy below).
[Source](https://intellipaat.com/community/31672/how-to-use-requirements-txt-to-install-all-dependencies-in-a-python-project)
-
+
+
+ERROR: The term 'make' is not recognized as the name of a cmdlet
+
+The error "'make' is not recognized as an internal or external command, operable program or
+batch file" occurs when we run the make command on Windows without having make installed.
+To solve the error, install make using Chocolatey.
+
+```bash
+make clean
+make : The term 'make' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
+was included, verify that the path is correct and try again.
+At line:1 char:1
++ make clean
++ ~~~~
+ + CategoryInfo : ObjectNotFound: (make:String) [], CommandNotFoundException
+ + FullyQualifiedErrorId : CommandNotFoundException
+
+
+Suggestion [3,General]: The command make was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\make". See "get-help about_Command_Precedence" for more details.
+```
+
+To install Chocolatey:
+
+1. Open PowerShell as an administrator.
+2. Run the following command:
+ ```bash
+ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
+ ```
+3. Wait for the command to complete.
+4. Type choco to make sure Chocolatey is installed:
+ ```bash
+ PS C:\WINDOWS\system32> choco
+ Chocolatey v2.4.1
+ Please run 'choco -?' or 'choco -?' for help menu.
+ ```
+5. Now that you have Chocolatey installed, run the following command to install make:
+ ```bash
+ PS C:\WINDOWS\system32> choco install make -y
+ Chocolatey v2.4.1
+ Installing the following packages:
+ make
+ By installing, you accept licenses for the packages.
+ Downloading package from source 'https://community.chocolatey.org/api/v2/'
+ Progress: Downloading make 4.4.1... 100%
+
+ make v4.4.1 [Approved]
+ make package files install completed. Performing other installation steps.
+ ShimGen has successfully created a shim for make.exe
+ The install of make was successful.
+ Deployed to 'C:\ProgramData\chocolatey\lib\make'
+
+ Chocolatey installed 1/1 packages.
+ See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
+ ```
+
+[Source](https://bobbyhadz.com/blog/make-is-not-recognized-as-internal-or-external-command)
+
+
diff --git a/allure-report/app.js b/allure-report/app.js
index 382459def7f..e84c8eaa96f 100644
--- a/allure-report/app.js
+++ b/allure-report/app.js
@@ -1,2 +1,2 @@
/*! For license information please see app.js.LICENSE.txt */
-!function(){var t={306:function(t){!function(e,n){"use strict";t.exports=function(){function t(e){if(!(this instanceof t))return n(e);e=e||{},this.tailSpace=e.tailSpace||"",this.elementSeparator=e.elementSeparator||"__",this.modSeparator=e.modSeparator||"_",this.modValueSeparator=e.modValueSeparator||"_",this.classSeparator=e.classSeparator||" ",this.isFullModifier=void 0===e.isFullModifier||e.isFullModifier,this.isFullBoolValue=void 0!==e.isFullBoolValue&&e.isFullBoolValue}function e(t,e,n){return this.bind.apply(this,[null].concat(Array.prototype.slice.call(arguments)))}function n(n){var r=new t(n),o=r.stringify.bind(r);return o.with=o.lock=e,o}t.prototype={_stringifyModifier:function(t,e,n){var r="";return void 0===n?r:this.isFullBoolValue||!1!==n?(r+=this.classSeparator+t+this.modSeparator+e,(this.isFullBoolValue||!0!==n)&&(r+=this.modValueSeparator+String(n)),r):r},_stringifyModifiers:function(t,e){var n="";for(var r in this.isFullModifier||(t=""),e)e.hasOwnProperty(r)&&(n+=this._stringifyModifier(t,r,e[r]));return n},stringify:function(t,e,n){var r=String(t);return e&&"object"==typeof e&&void 0===n&&(n=e,e=null),e&&(r+=this.elementSeparator+String(e)),n&&(r+=this._stringifyModifiers(r,n)),r+this.tailSpace}};var r=n();return r.B=t,r}()}()},4755:function(t,e,n){"use strict";n.d(e,{qw:function(){return ut},mX:function(){return lt},nZ:function(){return st}});var r={};n.r(r),n.d(r,{ClipboardBehavior:function(){return O},DownloadBehavior:function(){return T},GaBehavior:function(){return B},LoadBehavior:function(){return F},TooltipBehavior:function(){return W}});var o,i,a,s,l=n(1391),u=n(8603),c=n(3029),h=n(2901),f=n(388),p=n(3954),d=n(5361),m=n(793),g=n(3678),v=n(2854),y=n(9237),b=n(2415),w=n.n(b);function _(t,e,n){return e=(0,p.A)(e),(0,f.A)(t,x()?Reflect.construct(e,n||[],(0,p.A)(t).constructor):e.apply(t,n))}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}var k,A,O=(o=(0,v.on)("mouseenter [data-copy]"),i=(0,v.on)("mouseleave [data-copy]"),a=(0,v.on)("click [data-copy]"),s=function(t){function e(){return(0,c.A)(this,e),_(this,e,arguments)}return(0,d.A)(e,t),(0,h.A)(e,[{key:"initialize",value:function(){this.tooltip=new g.A({position:"left"})}},{key:"onTipHover",value:function(t){var e=this.$(t.currentTarget);this.tooltip.show((0,y.default)("controls.clipboard"),e)}},{key:"onTipLeave",value:function(){this.tooltip.hide()}},{key:"onCopyableClick",value:function(t){var e=this.$(t.currentTarget);w()(e.data("copy"))?this.tooltip.show((0,y.default)("controls.clipboardSuccess"),e):this.tooltip.show((0,y.default)("controls.clipboardError"),e)}}])}(u.Behavior),(0,m.A)(s.prototype,"onTipHover",[o],Object.getOwnPropertyDescriptor(s.prototype,"onTipHover"),s.prototype),(0,m.A)(s.prototype,"onTipLeave",[i],Object.getOwnPropertyDescriptor(s.prototype,"onTipLeave"),s.prototype),(0,m.A)(s.prototype,"onCopyableClick",[a],Object.getOwnPropertyDescriptor(s.prototype,"onCopyableClick"),s.prototype),s),E=n(5193);function C(t,e,n){return e=(0,p.A)(e),(0,f.A)(t,S()?Reflect.construct(e,n||[],(0,p.A)(t).constructor):e.apply(t,n))}function S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(S=function(){return!!t})()}var P,j,T=(k=(0,v.on)("click [data-download]"),A=function(t){function e(){return(0,c.A)(this,e),C(this,e,arguments)}return(0,d.A)(e,t),(0,h.A)(e,[{key:"initialize",value:function(){this.tooltip=new g.A({position:"left"})}},{key:"onDownloadableClick",value:function(t){var e=this;t.preventDefault(),t.stopPropagation();var n=this.$(t.currentTarget),r=n.data("download");if(r){var o=n.data("download-type")||"application/octet-stream",i="_blank"===n.data("download-target");(0,E._)("".concat(r),o).then((function(t){var e=document.createElement("a");e.setAttribute("href",t),e.setAttribute("download",r),i&&e.setAttribute("target","_blank"),document.body.appendChild(e),e.click(),document.body.removeChild(e)})).catch((function(t){e.tooltip.show("Download error: ".concat(t),n)}))}}}])}(u.Behavior),(0,m.A)(A.prototype,"onDownloadableClick",[k],Object.getOwnPropertyDescriptor(A.prototype,"onDownloadableClick"),A.prototype),A),R=n(4467),M=n(9922);function N(t,e,n){return e=(0,p.A)(e),(0,f.A)(t,D()?Reflect.construct(e,n||[],(0,p.A)(t).constructor):e.apply(t,n))}function D(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(D=function(){return!!t})()}var B=(P=(0,v.on)("click [data-ga4-event]"),j=function(t){function e(){return(0,c.A)(this,e),N(this,e,arguments)}return(0,d.A)(e,t),(0,h.A)(e,[{key:"initialize",value:function(){}},{key:"onDataEventClick",value:function(t){var e=this.$(t.currentTarget),n=e.data("ga4-event"),r=e.data(),o=Object.keys(r).filter((function(t){return t.startsWith("ga4Param")})).map((function(t){var e=r[t],n=t.substring(8).split(/\.?(?=[A-Z])/).join("_").toLowerCase();return(0,R.A)({},n,e)})).reduce((function(t,e){return Object.assign(t,e)}),{});(0,M.A)(n,o)}}])}(u.Behavior),(0,m.A)(j.prototype,"onDataEventClick",[P],Object.getOwnPropertyDescriptor(j.prototype,"onDataEventClick"),j.prototype),j);function V(t,e,n){return e=(0,p.A)(e),(0,f.A)(t,I()?Reflect.construct(e,n||[],(0,p.A)(t).constructor):e.apply(t,n))}function I(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(I=function(){return!!t})()}var L,z,$,F=function(t){function e(){return(0,c.A)(this,e),V(this,e,arguments)}return(0,d.A)(e,t),(0,h.A)(e,[{key:"initialize",value:function(){var t=this,e=this.view.render.bind(this.view);this.loaded=!1,this.view.render=function(){t.loaded?e():t.view.loadData().then((function(){t.loaded=!0,e()}))}}}])}(u.Behavior),U=n(3633);function H(t,e,n){return e=(0,p.A)(e),(0,f.A)(t,q()?Reflect.construct(e,n||[],(0,p.A)(t).constructor):e.apply(t,n))}function q(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(q=function(){return!!t})()}var W=(L=(0,v.on)("mouseenter [data-tooltip]"),z=(0,v.on)("mouseleave [data-tooltip]"),$=function(t){function e(){return(0,c.A)(this,e),H(this,e,arguments)}return(0,d.A)(e,t),(0,h.A)(e,[{key:"initialize",value:function(){this.tooltip=new g.A(this.options)}},{key:"onDestroy",value:function(){this.tooltip.hide()}},{key:"onTipHover",value:function(t){var e=this.$(t.currentTarget);this.tooltip.show((0,U.escapeExpression)(e.data("tooltip")),e)}},{key:"onTipLeave",value:function(){this.tooltip.hide()}}])}(u.Behavior),(0,m.A)($.prototype,"onTipHover",[L],Object.getOwnPropertyDescriptor($.prototype,"onTipHover"),$.prototype),(0,m.A)($.prototype,"onTipLeave",[z],Object.getOwnPropertyDescriptor($.prototype,"onTipLeave"),$.prototype),$),G=n(2319),K=n(8563);function X(t,e,n){return e=(0,p.A)(e),(0,f.A)(t,Y()?Reflect.construct(e,n||[],(0,p.A)(t).constructor):e.apply(t,n))}function Y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Y=function(){return!!t})()}var J=function(t){function e(){return(0,c.A)(this,e),X(this,e,arguments)}return(0,d.A)(e,t),(0,h.A)(e,[{key:"getContentView",value:function(){var t=this.options,e=t.code,n=t.message;return new G.A({code:e,message:n})}}])}(K.A),Z=n(991),Q=n(1450),tt=n(8262),et=n(734);function nt(t,e,n){return e=(0,p.A)(e),(0,f.A)(t,rt()?Reflect.construct(e,n||[],(0,p.A)(t).constructor):e.apply(t,n))}function rt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rt=function(){return!!t})()}var ot=function(t){function e(){return(0,c.A)(this,e),nt(this,e,arguments)}return(0,d.A)(e,t),(0,h.A)(e,[{key:"initialize",value:function(t){var n=t.uid;(0,Z.A)((0,p.A)(e.prototype),"initialize",this).call(this),this.uid=n,this.model=new tt.A({uid:n}),this.routeState=new l.Model}},{key:"loadData",value:function(){return this.model.fetch()}},{key:"getContentView",value:function(){var t="#testresult/".concat(this.uid);return new Q.A({baseUrl:t,model:this.model,routeState:this.routeState})}},{key:"onViewReady",value:function(){var t=this.options,e=t.uid,n=t.tabName;this.onRouteUpdate(e,n)}},{key:"onRouteUpdate",value:function(t,e){this.routeState.set("testResultTab",e);var n=et.A.getUrlParams().attachment;n?this.routeState.set("attachment",n):this.routeState.unset("attachment")}},{key:"shouldKeepState",value:function(t){return this.uid===t}}])}(K.A),it=n(566);"function"==typeof window.requestAnimationFrame&&(window.requestAnimationFrame=window.requestAnimationFrame.bind(window)),u.Behaviors.behaviorsLookup=r;var at=function(t){return t.split("/")[0]},st=function(t){return function(){var e=ut.getView();e&&e.onRouteUpdate&&e.shouldKeepState&&at(et.A.getCurrentUrl())===at(et.A.currentUrl)&&e.shouldKeepState.apply(e,arguments)?e.onRouteUpdate.apply(e,arguments):ut.showView(t.apply(void 0,arguments))}},lt=function(){return new J({code:401,message:(0,y.default)("errors.notFound")})},ut=new u.Application({region:"#content"});ut.on("start",(function(){(0,it.vM)().then((function(){l.history.start(),document.dir=it.Ay.dir(),it.Ay.on("languageChanged",(function(){ut.getRegion().reset(),et.A.reload(),document.dir=it.Ay.dir()}))})),et.A.on("route:notFound",st(lt)),et.A.on("route:testresultPage",st((function(t,e){return new ot({uid:t,tabName:e})})))}))},2319:function(t,e,n){"use strict";var r,o=n(3029),i=n(2901),a=n(388),s=n(3954),l=n(5361),u=n(4467),c=n(8603),h=n(2854),f=n(365),p=n.n(f);function d(t,e,n){return e=(0,s.A)(e),(0,a.A)(t,m()?Reflect.construct(e,n||[],(0,s.A)(t).constructor):e.apply(t,n))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}var g=(0,h.s7)("error-splash")(r=function(t){function e(){var t;(0,o.A)(this,e);for(var n=arguments.length,r=new Array(n),i=0;i0,before:t,test:e,after:n,baseUrl:this.options.baseUrl}}},{key:"onStepClick",value:function(t){this.$(t.currentTarget).parent().toggleClass("step_expanded")}},{key:"onAttachmentClick",value:function(t){var e=Q()(t.currentTarget).data("uid"),n="attachment__".concat(e);Q()(t.currentTarget).hasClass("attachment-row_selected")&&this.getRegion(n)?this.getRegion(n).destroy():(this.addRegion(n,{el:this.$(".".concat(n))}),this.getRegion(n).show(new Y({attachment:this.model.getAttachment(e)}))),this.$(t.currentTarget).toggleClass("attachment-row_selected")}},{key:"onAttachmnetFullScrennClick",value:function(t){var e=Q()(t.currentTarget).closest(".attachment-row").data("uid");v.A.setSearch({attachment:e}),t.stopPropagation()}},{key:"onParameterClick",value:function(t){this.$(t.target).siblings().addBack().toggleClass("line-ellipsis")}}])}(c.View),(0,u.A)(ct.prototype,"onStepClick",[it],Object.getOwnPropertyDescriptor(ct.prototype,"onStepClick"),ct.prototype),(0,u.A)(ct.prototype,"onAttachmentClick",[at],Object.getOwnPropertyDescriptor(ct.prototype,"onAttachmentClick"),ct.prototype),(0,u.A)(ct.prototype,"onAttachmnetFullScrennClick",[st],Object.getOwnPropertyDescriptor(ct.prototype,"onAttachmnetFullScrennClick"),ct.prototype),(0,u.A)(ct.prototype,"onParameterClick",[lt],Object.getOwnPropertyDescriptor(ct.prototype,"onParameterClick"),ct.prototype),ut=ct))||ut),wt=bt,_t=n(4175),xt=n.n(_t);function kt(t,e,n){return e=(0,a.A)(e),(0,i.A)(t,At()?Reflect.construct(e,n||[],(0,a.A)(t).constructor):e.apply(t,n))}function At(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(At=function(){return!!t})()}var Ot,Et,Ct,St,Pt,jt,Tt,Rt=(0,f.s7)("test-result-overview")(yt=(0,f.Ei)({execution:".test-result-overview__execution"})(yt=function(t){function e(){var t;(0,r.A)(this,e);for(var n=arguments.length,o=new Array(n),i=0;i1&&void 0!==o[1]?o[1]:"application/octet-stream",!window.reportData){t.next=6;break}return t.next=4,a(e);case 4:return r=t.sent,t.abrupt("return","data:".concat(n,";base64,").concat(r));case 6:return t.abrupt("return",e);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,l,"next",t)}function l(t){r(a,o,i,s,l,"throw",t)}s(void 0)}))});return function(t){return e.apply(this,arguments)}}()},8262:function(t,e,n){"use strict";n.d(e,{A:function(){return b}});var r=n(4467),o=n(3029),i=n(2901),a=n(388),s=n(991),l=n(3954),u=n(5361),c=n(1391),h=n(4523),f=n(3963),p=n(5193);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};return function(n){n.prototype.behaviors=Object.assign((0,r.A)({},t,e),n.prototype.behaviors)}}function u(t){return function(e){e.prototype.className=t}}function c(t){return function(e){e.prototype.regions=Object.assign(t,e.regions)}}function h(t){return function(e){e.prototype.options=Object.assign(t,e.options)}}},3570:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return a}});var r=n(3633),o=n(9237),i={flaky:{className:"fa fa-bomb",tooltip:"marks.flaky"},newFailed:{className:"fa fa-times-circle",tooltip:"marks.newFailed"},newBroken:{className:"fa fa-exclamation-circle",tooltip:"marks.newBroken"},newPassed:{className:"fa fa-check-circle",tooltip:"marks.newPassed"},retriesStatusChange:{className:"fa fa-refresh",tooltip:"marks.retriesStatusChange"},failed:{className:"fa fa-times-circle fa-fw text_status_failed",tooltip:"status.failed"},broken:{className:"fa fa-exclamation-circle fa-fw text_status_broken",tooltip:"status.broken"},passed:{className:"fa fa-check-circle fa-fw text_status_passed",tooltip:"status.passed"},skipped:{className:"fa fa-minus-circle fa-fw text_status_skipped",tooltip:"status.skipped"},unknown:{className:"fa fa-question-circle fa-fw text_status_unknown",tooltip:"status.unknown"}};function a(t,e){var n=e.hash,a=n.extraClasses,s=void 0===a?"":a,l=n.noTooltip,u=void 0!==l&&l,c=i[t];return c?new r.SafeString('")):""}},4354:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return o}});var r=n(3633);function o(){return new r.SafeString('')}},6308:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return o}});var r=n(3633);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unknown";return new r.SafeString(''))}},3735:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var r=n(306),o=n.n(r);function i(){for(var t=arguments.length,e=new Array(t),n=0;n0,(e.value>0||n&&"ms"!==e.suffix)&&r.push(e),{hasValue:n,out:r}}),{hasValue:!1,out:[]}).out.map((function(t,e){return(0===e?t.value:i()(t.value,t.pad||2,"0"))+t.suffix})).slice(0,e).join(" ")}},7243:function(t,e,n){"use strict";function r(t,e){return t===e}n.r(e),n.d(e,{default:function(){return r}})},3198:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return o}});var r=n(5381);function o(t){return(0,r.A)(t).icon}},9735:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return C}});const r="array",o="bit",i="bits",a="byte",s="bytes",l="",u="exponent",c="function",h="iec",f="Invalid number",p="Invalid rounding method",d="jedec",m="object",g=".",v="round",y="s",b="si",w="kbit",_="kB",x=" ",k="string",A="0",O={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function E(t,{bits:e=!1,pad:n=!1,base:E=-1,round:C=2,locale:S=l,localeOptions:P={},separator:j=l,spacer:T=x,symbols:R={},standard:M=l,output:N=k,fullform:D=!1,fullforms:B=[],exponent:V=-1,roundingMethod:I=v,precision:L=0}={}){let z=V,$=Number(t),F=[],U=0,H=l;M===b?(E=10,M=d):M===h||M===d?E=2:2===E?M=h:(E=10,M=d);const q=10===E?1e3:1024,W=!0===D,G=$<0,K=Math[I];if("bigint"!=typeof t&&isNaN(t))throw new TypeError(f);if(typeof K!==c)throw new TypeError(p);if(G&&($=-$),(-1===z||isNaN(z))&&(z=Math.floor(Math.log($)/Math.log(q)),z<0&&(z=0)),z>8&&(L>0&&(L+=8-z),z=8),N===u)return z;if(0===$)F[0]=0,H=F[1]=O.symbol[M][e?i:s][z];else{U=$/(2===E?Math.pow(2,10*z):Math.pow(1e3,z)),e&&(U*=8,U>=q&&z<8&&(U/=q,z++));const t=Math.pow(10,z>0?C:0);F[0]=K(U*t)/t,F[0]===q&&z<8&&-1===V&&(F[0]=1,z++),H=F[1]=10===E&&1===z?e?w:_:O.symbol[M][e?i:s][z]}if(G&&(F[0]=-F[0]),L>0&&(F[0]=F[0].toPrecision(L)),F[1]=R[F[1]]||F[1],!0===S?F[0]=F[0].toLocaleString():S.length>0?F[0]=F[0].toLocaleString(S,P):j.length>0&&(F[0]=F[0].toString().replace(g,j)),n&&!1===Number.isInteger(F[0])&&C>0){const t=j||g,e=F[0].toString().split(t),n=e[1]||l,r=n.length,o=C-r;F[0]=`${e[0]}${t}${n.padEnd(r+o,A)}`}return W&&(F[1]=B[z]?B[z]:O.fullform[M][z]+(e?o:a)+(1===F[0]?l:y)),N===r?F:N===m?{value:F[0],symbol:F[1],exponent:z,unit:H}:F.join(T)}function C(t){return E(t,{base:2,round:1})}},279:function(t,e,n){"use strict";function r(t){return t||"number"==typeof t}n.r(e),n.d(e,{default:function(){return r}})},2458:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var r=n(3633),o=/^(\w)+:\/\/.*/;function i(t){return o.test(t)?new r.SafeString('').concat(t,"")):t}},180:function(t,e,n){"use strict";function r(t,e){return!(!t&&!e)}n.r(e),n.d(e,{default:function(){return r}})},1747:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var r=n(3633),o=n(5731);function i(t){var e=o.z.map((function(e){var n=t&&void 0!==t[e]?t[e]:0;return 0===n?"":'').concat(n," ")})).join("");return new r.SafeString("".concat(e))}},4883:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var r=n(3633),o=n(5731);function i(t){var e=o.z.map((function(e){var n=void 0===t[e]?0:t[e];return 0===n?"":'
').concat(n,"
")})).join("");return new r.SafeString('
'.concat(e,"
"))}},9237:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return o}});var r=n(566);function o(t,e){return r.Ay.t(t,e?e.hash:{})}},6827:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return a}});var r=n(3633),o=/((?:(https?:\/\/|ftp:\/\/|mailto:)|www\.)\S+?)(\s|"|'|\)|]|}|>|$)/gm,i=function(t){return t.replace(/[\u00A0-\u9999<>&]/gim,(function(t){return"".concat(t.charCodeAt(0),";")}))};function a(t){return void 0!==t&&t.match(o)?new r.SafeString(i(t).replace(o,(function(t,e,n,r){return'').concat(e,"").concat(r," ")}))):t}},4336:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return i}});var r=n(7777),o=n.n(r);function i(t,e){return t?(t instanceof Date||(t=new Date(t)),"boolean"!=typeof e&&(e=!1),[t.getHours(),o()(t.getMinutes(),2,"0"),o()(t.getSeconds(),2,"0")+(e?".".concat(t.getMilliseconds()):"")].join(":")):"unknown"}},8563:function(t,e,n){"use strict";n.d(e,{A:function(){return et}});var r,o,i,a,s=n(3029),l=n(2901),u=n(388),c=n(3954),h=n(5361),f=n(4467),p=n(8603),d=n(2319),m=n(793),g=n(3633),v=n(4523),y=n(2854),b=n(734),w=n(8681),_=n(1248),x=n(566),k=n(991),A=n(4838),O=n(9922),E=n(4692),C=n.n(E),S=n(4965),P=n.n(S);function j(t,e,n){return e=(0,c.A)(e),(0,u.A)(t,T()?Reflect.construct(e,n||[],(0,c.A)(t).constructor):e.apply(t,n))}function T(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(T=function(){return!!t})()}var R,M,N,D,B,V,I,L,z=(r=(0,y.s7)("language-select popover"),o=(0,y.on)("click .language-select__item"),r((a=function(t){function e(){return(0,s.A)(this,e),j(this,e,arguments)}return(0,h.A)(e,t),(0,l.A)(e,[{key:"initialize",value:function(){(0,k.A)((0,c.A)(e.prototype),"initialize",this).call(this,{position:"top-right"})}},{key:"setContent",value:function(){this.$el.html(P()({languages:x.Yj,currentLang:_.A.getLanguage()}))}},{key:"show",value:function(t){var n=this;(0,k.A)((0,c.A)(e.prototype),"show",this).call(this,null,t),this.delegateEvents(),setTimeout((function(){C()(document).one("click",(function(){return n.hide()}))}))}},{key:"onLanguageClick",value:function(t){var e=this.$(t.currentTarget).data("id");_.A.setLanguage(e),x.Ay.changeLanguage(e),(0,O.A)("language_change",{language:e})}}])}(A.A),(0,m.A)(a.prototype,"onLanguageClick",[o],Object.getOwnPropertyDescriptor(a.prototype,"onLanguageClick"),a.prototype),i=a))||i),$=z,F=n(3678),U=n(9409),H=n.n(U);function q(t,e,n){return e=(0,c.A)(e),(0,u.A)(t,W()?Reflect.construct(e,n||[],(0,c.A)(t).constructor):e.apply(t,n))}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(W=function(){return!!t})()}var G,K=(R=(0,y.s7)("side-nav"),M=(0,y.on)("mouseenter [data-tooltip]"),N=(0,y.on)("mouseleave [data-tooltip]"),D=(0,y.on)("click .side-nav__collapse"),B=(0,y.on)("click .side-nav__language"),V=(0,y.on)("click .side-nav__language-small"),R((L=function(t){function e(){var t;(0,s.A)(this,e);for(var n=arguments.length,r=new Array(n),o=0;o9999?"+"+l(e,6):l(e,4))+"-"+l(t.getUTCMonth()+1,2)+"-"+l(t.getUTCDate(),2)+(i?"T"+l(n,2)+":"+l(r,2)+":"+l(o,2)+"."+l(i,3)+"Z":o?"T"+l(n,2)+":"+l(r,2)+":"+l(o,2)+"Z":r||n?"T"+l(n,2)+":"+l(r,2)+"Z":"")}function c(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,a=[],s=t.length,l=0,u=0,c=s<=0,h=!1;function f(){if(c)return i;if(h)return h=!1,o;var e,r,a=l;if(34===t.charCodeAt(a)){for(;l++=s?c=!0:10===(r=t.charCodeAt(l++))?h=!0:13===r&&(h=!0,10===t.charCodeAt(l)&&++l),t.slice(a+1,e-1).replace(/""/g,'"')}for(;l0})).map((function(t){return{comment:0===t.indexOf("#"),text:t}}))}};case"application/x-tar":case"application/x-gtar":case"application/x-bzip2":case"application/gzip":case"application/zip":return{type:"archive",icon:"fa fa-file-archive-o"};default:return{type:null,icon:"fa fa-file-o"}}}},2415:function(t){"use strict";t.exports=function(t){var e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.contain="strict",e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="12pt";var n=getSelection(),r=!1;n.rangeCount>0&&(r=n.getRangeAt(0)),document.body.appendChild(e),e.select();var o=!1;try{o=document.execCommand("copy")}catch(t){}return document.body.removeChild(e),r&&(n.removeAllRanges(),n.addRange(r)),o}},9922:function(t,e,n){"use strict";function r(t,e){!function(){window.dataLayer=Array.isArray(window.dataLayer)?window.dataLayer:[],window.dataLayer.push(arguments)}("event",t,e)}n.d(e,{A:function(){return r}})},8681:function(t,e,n){"use strict";n.d(e,{A:function(){return x}});var r=n(3029),o=n(2901),i=n(4467),a=n(4755),s=n(388),l=n(991),u=n(3954),c=n(5361),h=n(1391),f=n(5193);function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=e.title,r=e.icon,o=e.route,i=e.onEnter,s=void 0===i?a.mX:i;n=n||t,this.tabs.push({tabName:t,title:n,icon:r}),b.A.route(o,t),b.A.on("route:".concat(t),(0,a.nZ)(s))}},{key:"addWidget",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:v;this.widgets[t]||(this.widgets[t]={}),this.widgets[t][e]={widget:n,model:r}}},{key:"addTranslation",value:function(t,e){(0,w.XY)(t,e)}},{key:"translate",value:function(t,e){return(0,y.default)(t,e)}},{key:"addTestResultBlock",value:function(t,e){var n=e.position;this.testResultBlocks[n].push(t)}},{key:"addAttachmentViewer",value:function(t,e){var n=e.View,r=e.icon,o=void 0===r?"fa fa-file-o":r;this.attachmentViews[t]={View:n,icon:o}}},{key:"addTestResultTab",value:function(t,e,n){this.testResultTabs.push({id:t,name:e,View:n})}}])}(),x=new _},1248:function(t,e,n){"use strict";var r=(0,n(1109).fv)();e.A=r},1109:function(t,e,n){"use strict";n.d(e,{fv:function(){return v},gU:function(){return y},O$:function(){return w},gW:function(){return b}});var r=n(4467),o=n(3029),i=n(2901),a=n(388),s=n(3954),l=n(5361);function u(t,e,n){return e=(0,s.A)(e),(0,a.A)(t,c()?Reflect.construct(e,n||[],(0,s.A)(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}var h=function(t){function e(){return(0,o.A)(this,e),u(this,e,arguments)}return(0,l.A)(e,t),(0,i.A)(e,[{key:"storageKey",value:function(){return"ALLURE_REPORT_SETTINGS"}},{key:"fetch",value:function(){var t=this;return new Promise((function(e){var n=window.localStorage.getItem(t.storageKey());n&&t.set(JSON.parse(n)),e()}))}},{key:"save",value:function(t,e){this.set(t,e);var n=this.toJSON();window.localStorage.setItem(this.storageKey(),JSON.stringify(n))}}])}(n(1391).Model);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=new(h.extend({storageKey:function(){return"ALLURE_REPORT_SETTINGS_".concat(t.toUpperCase())},defaults:function(){return e}}));return n.fetch(),n}function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,n=new(h.extend({storageKey:function(){return"ALLURE_REPORT_SETTINGS_".concat(t.toUpperCase())},defaults:function(){return e},getWidgetsArrangement:function(){return this.get("widgets")},setWidgetsArrangement:function(t){this.save("widgets",t)}}));return n.fetch(),n}function w(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m,n=new(h.extend({storageKey:function(){return"ALLURE_REPORT_SETTINGS_".concat(t.toUpperCase())},defaults:function(){return e},getVisibleStatuses:function(){return this.get("visibleStatuses")},setVisibleStatuses:function(t){return this.save("visibleStatuses",t)},getVisibleMarks:function(){return this.get("visibleMarks")},setVisibleMarks:function(t){return this.save("visibleMarks",t)},getTreeSorting:function(){return this.get("treeSorting")},setTreeSorting:function(t){this.save("treeSorting",t)},isShowGroupInfo:function(){return this.get("showGroupInfo")},setShowGroupInfo:function(t){this.save("showGroupInfo",t)}}));return n.fetch(),n}},5731:function(t,e,n){"use strict";n.d(e,{z:function(){return r}});var r=["failed","broken","passed","skipped","unknown"]},566:function(t,e,n){"use strict";n.d(e,{Yj:function(){return rt},XY:function(){return it},Ay:function(){return at},vM:function(){return ot}});var r=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init(e,n)}return t.prototype.init=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||o,this.options=e,this.debug=e.debug},t.prototype.setDebug=function(t){this.debug=t},t.prototype.log=function(){for(var t=arguments.length,e=Array(t),n=0;n-1&&n.observers[t].splice(r,1)}else delete n.observers[t]}))},t.prototype.emit=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!t[a]&&n&&(t[a]=new n),t=t[a]}return o()?{}:{obj:t,k:r(i.shift())}}function h(t,e,n){var r=c(t,e,Object);r.obj[r.k]=n}function f(t,e){var n=c(t,e),r=n.obj,o=n.k;if(r)return r[o]}function p(t,e,n){for(var r in e)r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof e[r]||e[r]instanceof String?n&&(t[r]=e[r]):p(t[r],e[r],n):t[r]=e[r];return t}function d(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var m={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function g(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(function(t){return m[t]})):t}var v=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return o.data=n,o.options=r,o}return y(e,t),e.prototype.addNamespaces=function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)},e.prototype.removeNamespaces=function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)},e.prototype.getResource=function(t,e,n){var r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).keySeparator||this.options.keySeparator;void 0===r&&(r=".");var o=[t,e];return n&&"string"!=typeof n&&(o=o.concat(n)),n&&"string"==typeof n&&(o=o.concat(r?n.split(r):n)),t.indexOf(".")>-1&&(o=t.split(".")),f(this.data,o)},e.prototype.addResource=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[t,e];n&&(a=a.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(r=e,e=(a=t.split("."))[1]),this.addNamespaces(e),h(this.data,a,r),o.silent||this.emit("added",t,e,n,r)},e.prototype.addResources=function(t,e,n){for(var r in n)"string"==typeof n[r]&&this.addResource(t,e,r,n[r],{silent:!0});this.emit("added",t,e,n)},e.prototype.addResourceBundle=function(t,e,n,r,o){var i=[t,e];t.indexOf(".")>-1&&(r=n,n=e,e=(i=t.split("."))[1]),this.addNamespaces(e);var a=f(this.data,i)||{};r?p(a,n,o):a=v({},a,n),h(this.data,i,a),this.emit("added",t,e,n)},e.prototype.removeResourceBundle=function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)},e.prototype.hasResourceBundle=function(t,e){return void 0!==this.getResource(t,e)},e.prototype.getResourceBundle=function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?v({},this.getResource(t,e)):this.getResource(t,e)},e.prototype.toJSON=function(){return this.data},e}(l),w=b,_={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,o){var i=this;return t.forEach((function(t){i.processors[t]&&(e=i.processors[t].process(e,n,r,o))})),e}};function x(t){return t.interpolation={unescapeSuffix:"HTML"},t.interpolation.prefix=t.interpolationPrefix||"__",t.interpolation.suffix=t.interpolationSuffix||"__",t.interpolation.escapeValue=t.escapeInterpolation||!1,t.interpolation.nestingPrefix=t.reusePrefix||"$t(",t.interpolation.nestingSuffix=t.reuseSuffix||")",t}function k(t){return(t.interpolationPrefix||t.interpolationSuffix||void 0!==t.escapeInterpolation)&&(t=x(t)),t.nsSeparator=t.nsseparator,t.keySeparator=t.keyseparator,t.returnObjects=t.returnObjectTrees,t}var A=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return function(t,e,n){t.forEach((function(t){e[t]&&(n[t]=e[t])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector"],n,o),o.options=r,o.logger=a.create("translator"),o}return E(e,t),e.prototype.changeLanguage=function(t){t&&(this.language=t)},e.prototype.exists=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};return"v1"===this.options.compatibilityAPI&&(e=k(e)),void 0!==this.resolve(t,e)},e.prototype.extractFromKey=function(t,e){var n=e.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var r=e.keySeparator||this.options.keySeparator||".",o=e.ns||this.options.defaultNS;if(n&&t.indexOf(n)>-1){var i=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(r)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}},e.prototype.translate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==(void 0===e?"undefined":O(e))?e=this.options.overloadTranslationOptionHandler(arguments):"v1"===this.options.compatibilityAPI&&(e=k(e)),null==t||""===t)return"";"number"==typeof t&&(t=String(t)),"string"==typeof t&&(t=[t]);var n=e.keySeparator||this.options.keySeparator||".",r=this.extractFromKey(t[t.length-1],e),o=r.key,i=r.namespaces,a=i[i.length-1],s=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase())return l?a+(e.nsSeparator||this.options.nsSeparator)+o:o;var u=this.resolve(t,e),c=Object.prototype.toString.apply(u),h=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays;if(u&&"string"!=typeof u&&["[object Number]","[object Function]","[object RegExp]"].indexOf(c)<0&&(!h||"[object Array]"!==c)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(o,u,e):"key '"+o+" ("+this.language+")' returned an object instead of string.";if(e.keySeparator||this.options.keySeparator){var f="[object Array]"===c?[]:{};for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&(f[p]=this.translate(""+o+n+p,A({},e,{joinArrays:!1,ns:i})));u=f}}else if(h&&"[object Array]"===c)(u=u.join(h))&&(u=this.extendTranslation(u,o,e));else{var d=!1,m=!1;if(this.isValidLookup(u)||void 0===e.defaultValue||(d=!0,u=e.defaultValue),this.isValidLookup(u)||(m=!0,u=o),m||d){this.logger.log("missingKey",s,a,o,u);var g=[],v=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&v&&v[0])for(var y=0;y1&&void 0!==arguments[1]?arguments[1]:{},r=void 0;return"string"==typeof t&&(t=[t]),t.forEach((function(t){if(!e.isValidLookup(r)){var o=e.extractFromKey(t,n),i=o.key,a=o.namespaces;e.options.fallbackNS&&(a=a.concat(e.options.fallbackNS));var s=void 0!==n.count&&"string"!=typeof n.count,l=void 0!==n.context&&"string"==typeof n.context&&""!==n.context,u=n.lngs?n.lngs:e.languageUtils.toResolveHierarchy(n.lng||e.language);a.forEach((function(t){e.isValidLookup(r)||u.forEach((function(o){if(!e.isValidLookup(r)){var a=i,u=[a],c=void 0;s&&(c=e.pluralResolver.getSuffix(o,n.count)),s&&l&&u.push(a+c),l&&u.push(a+=""+e.options.contextSeparator+n.context),s&&u.push(a+=c);for(var h=void 0;h=u.pop();)e.isValidLookup(r)||(r=e.getResource(o,t,h,n))}}))}))}})),r},e.prototype.isValidLookup=function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)},e.prototype.getResource=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.resourceStore.getResource(t,e,n,r)},e}(l),S=C;function P(t){return t.charAt(0).toUpperCase()+t.slice(1)}var j=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=a.create("languageUtils")}return t.prototype.getScriptPartFromCode=function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))},t.prototype.getLanguagePartFromCode=function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])},t.prototype.formatLanguageCode=function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map((function(t){return t.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=P(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t},t.prototype.isWhitelisted=function(t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1},t.prototype.getFallbackCodes=function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t.default),n||[]},t.prototype.toResolveHierarchy=function(t,e){var n=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),o=[],i=function(t){t&&(n.isWhitelisted(t)?o.push(t):n.logger.warn("rejecting non-whitelisted language code: "+t))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),r.forEach((function(t){o.indexOf(t)<0&&i(n.formatLanguageCode(t))})),o},t}();var T=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","es_ar","et","eu","fi","fo","fur","fy","gl","gu","ha","he","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt","pt_br","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21}],R={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)}};var M=function(){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.languageUtils=e,this.options=r,this.logger=a.create("pluralResolver"),this.rules=(n={},T.forEach((function(t){t.lngs.forEach((function(e){n[e]={numbers:t.nr,plurals:R[t.fc]}}))})),n)}return t.prototype.addRule=function(t,e){this.rules[t]=e},t.prototype.getRule=function(t){return this.rules[this.languageUtils.getLanguagePartFromCode(t)]},t.prototype.needsPlural=function(t){var e=this.getRule(t);return e&&e.numbers.length>1},t.prototype.getSuffix=function(t,e){var n=this,r=this.getRule(t);if(r){if(1===r.numbers.length)return"";var o=r.noAbs?r.plurals(e):r.plurals(Math.abs(e)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_"+i.toString():a():"v2"===this.options.compatibilityJSON||2===r.numbers.length&&1===r.numbers[0]||2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: "+t),""},t}(),N=M,D=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.logger=a.create("interpolator"),this.init(e,!0)}return t.prototype.init=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};arguments[1]&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t},this.escape=t.interpolation&&t.interpolation.escape||g),t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.prefix=e.prefix?d(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?d(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?d(e.nestingPrefix):e.nestingPrefixEscaped||d("$t("),this.nestingSuffix=e.nestingSuffix?d(e.nestingSuffix):e.nestingSuffixEscaped||d(")"),this.resetRegExp()},t.prototype.reset=function(){this.options&&this.init(this.options)},t.prototype.resetRegExp=function(){var t=this.prefix+"(.+?)"+this.suffix;this.regexp=new RegExp(t,"g");var e=""+this.prefix+this.unescapePrefix+"(.+?)"+this.unescapeSuffix+this.suffix;this.regexpUnescape=new RegExp(e,"g");var n=this.nestingPrefix+"(.+?)"+this.nestingSuffix;this.nestingRegexp=new RegExp(n,"g")},t.prototype.interpolate=function(t,e,n){var r=this,o=void 0,i=void 0;function a(t){return t.replace(/\$/g,"$$$$")}var s=function(t){if(t.indexOf(r.formatSeparator)<0)return f(e,t);var o=t.split(r.formatSeparator),i=o.shift().trim(),a=o.join(r.formatSeparator).trim();return r.format(f(e,i),a,n)};for(this.resetRegExp();o=this.regexpUnescape.exec(t);)i=s(o[1].trim()),t=t.replace(o[0],i),this.regexpUnescape.lastIndex=0;for(;o=this.regexp.exec(t);)"string"!=typeof(i=s(o[1].trim()))&&(i=u(i)),i||(this.logger.warn("missed to pass in variable "+o[1]+" for interpolating "+t),i=""),i=this.escapeValue?a(this.escape(i)):a(i),t=t.replace(o[0],i),this.regexp.lastIndex=0;return t},t.prototype.nest=function(t,e){var n=void 0,r=void 0,o=D({},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});function i(t){if(t.indexOf(",")<0)return t;var e=t.split(",");t=e.shift();var n=e.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n)}catch(e){this.logger.error("failed parsing options string in nesting for key "+t,e)}return t}for(o.applyPostProcessor=!1;n=this.nestingRegexp.exec(t);){if((r=e(i.call(this,n[1].trim()),o))&&n[0]===t&&"string"!=typeof r)return r;"string"!=typeof r&&(r=u(r)),r||(this.logger.warn("missed to resolve "+n[1]+" for nesting "+t),r=""),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t},t}(),V=B,I=Object.assign||function(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return s.backend=n,s.store=r,s.services=o,s.options=i,s.logger=a.create("backendConnector"),s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(o,i.backend,i),s}return z(e,t),e.prototype.queueLoad=function(t,e,n){var r=this,o=[],i=[],a=[],s=[];return t.forEach((function(t){var n=!0;e.forEach((function(e){var a=t+"|"+e;r.store.hasResourceBundle(t,e)?r.state[a]=2:r.state[a]<0||(1===r.state[a]?i.indexOf(a)<0&&i.push(a):(r.state[a]=1,n=!1,i.indexOf(a)<0&&i.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(e)<0&&s.push(e)))})),n||a.push(t)})),(o.length||i.length)&&this.queue.push({pending:i,loaded:{},errors:[],callback:n}),{toLoad:o,pending:i,toLoadLanguages:a,toLoadNamespaces:s}},e.prototype.loaded=function(t,e,n){var r=this,o=t.split("|"),i=L(o,2),a=i[0],s=i[1];e&&this.emit("failedLoading",a,s,e),n&&this.store.addResourceBundle(a,s,n),this.state[t]=e?-1:2,this.queue.forEach((function(n){var o,i,l,u,h,f;o=n.loaded,i=s,u=c(o,[a],Object),h=u.obj,f=u.k,h[f]=h[f]||[],l&&(h[f]=h[f].concat(i)),l||h[f].push(i),function(t,e){for(var n=t.indexOf(e);-1!==n;)t.splice(n,1),n=t.indexOf(e)}(n.pending,t),e&&n.errors.push(e),0!==n.pending.length||n.done||(r.emit("loaded",n.loaded),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.queue=this.queue.filter((function(t){return!t.done}))},e.prototype.read=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,a=arguments[5];return t.length?this.backend[n](t,e,(function(s,l){s&&l&&r<5?setTimeout((function(){o.read.call(o,t,e,n,r+1,2*i,a)}),i):a(s,l)})):a(null,{})},e.prototype.load=function(t,e,n){var r=this;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();var o=I({},this.backend.options,this.options.backend);"string"==typeof t&&(t=this.services.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,n);if(!i.toLoad.length)return i.pending.length||n(),null;o.allowMultiLoading&&this.backend.readMulti?this.read(i.toLoadLanguages,i.toLoadNamespaces,"readMulti",null,null,(function(t,e){t&&r.logger.warn("loading namespaces "+i.toLoadNamespaces.join(", ")+" for languages "+i.toLoadLanguages.join(", ")+" via multiloading failed",t),!t&&e&&r.logger.log("successfully loaded namespaces "+i.toLoadNamespaces.join(", ")+" for languages "+i.toLoadLanguages.join(", ")+" via multiloading",e),i.toLoad.forEach((function(n){var o=n.split("|"),i=L(o,2),a=i[0],s=i[1],l=f(e,[a,s]);if(l)r.loaded(n,t,l);else{var u="loading namespace "+s+" for language "+a+" via multiloading failed";r.loaded(n,u),r.logger.error(u)}}))})):i.toLoad.forEach((function(t){r.loadOne(t)}))},e.prototype.reload=function(t,e){var n=this;this.backend||this.logger.warn("No backend was added via i18next.use. Will not load resources.");var r=I({},this.backend.options,this.options.backend);"string"==typeof t&&(t=this.services.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]),r.allowMultiLoading&&this.backend.readMulti?this.read(t,e,"readMulti",null,null,(function(r,o){r&&n.logger.warn("reloading namespaces "+e.join(", ")+" for languages "+t.join(", ")+" via multiloading failed",r),!r&&o&&n.logger.log("successfully reloaded namespaces "+e.join(", ")+" for languages "+t.join(", ")+" via multiloading",o),t.forEach((function(t){e.forEach((function(e){var i=f(o,[t,e]);if(i)n.loaded(t+"|"+e,r,i);else{var a="reloading namespace "+e+" for language "+t+" via multiloading failed";n.loaded(t+"|"+e,a),n.logger.error(a)}}))}))})):t.forEach((function(t){e.forEach((function(e){n.loadOne(t+"|"+e,"re")}))}))},e.prototype.loadOne=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),o=L(r,2),i=o[0],a=o[1];this.read(i,a,"read",null,null,(function(r,o){r&&e.logger.warn(n+"loading namespace "+a+" for language "+i+" failed",r),!r&&o&&e.logger.log(n+"loaded namespace "+a+" for language "+i,o),e.loaded(t,r,o)}))},e.prototype.saveMissing=function(t,e,n,r){this.backend&&this.backend.create&&this.backend.create(t,e,n,r),t&&t[0]&&this.store.addResource(t[0],e,n,r)},e}(l),F=$,U=Object.assign||function(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return s.cache=n,s.store=r,s.services=o,s.options=i,s.logger=a.create("cacheConnector"),s.cache&&s.cache.init&&s.cache.init(o,i.cache,i),s}return H(e,t),e.prototype.load=function(t,e,n){var r=this;if(!this.cache)return n&&n();var o=U({},this.cache.options,this.options.cache),i="string"==typeof t?this.services.languageUtils.toResolveHierarchy(t):t;o.enabled?this.cache.load(i,(function(t,e){if(t&&r.logger.error("loading languages "+i.join(", ")+" from cache failed",t),e)for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o))for(var a in e[o])if(Object.prototype.hasOwnProperty.call(e[o],a)&&"i18nStamp"!==a){var s=e[o][a];s&&r.store.addResourceBundle(o,a,s)}n&&n()})):n&&n()},e.prototype.save=function(){this.cache&&this.options.cache&&this.options.cache.enabled&&this.cache.save(this.store.data)},e}(l),W=q;function G(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&t.whitelist.push("cimode"),t}var K=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=X(this,t.call(this));if(o.options=G(n),o.services={},o.logger=a,o.modules={external:[]},r&&!o.isInitialized&&!n.isClone){var i;if(!o.options.initImmediate)return i=o.init(n,r),X(o,i);setTimeout((function(){o.init(n,r)}),0)}return o}return Y(e,t),e.prototype.init=function(t,e){var n=this;function r(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof t&&(e=t,t={}),t||(t={}),"v1"===t.compatibilityAPI?this.options=K({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",saveMissing:!1,saveMissingTo:"fallback",missingKeyHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){return{defaultValue:t[1]}},interpolation:{escapeValue:!0,format:function(t,e,n){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",defaultVariables:void 0}},G(function(t){return t.resStore&&(t.resources=t.resStore),t.ns&&t.ns.defaultNs?(t.defaultNS=t.ns.defaultNs,t.ns=t.ns.namespaces):t.defaultNS=t.ns||"translation",t.fallbackToDefaultNS&&t.defaultNS&&(t.fallbackNS=t.defaultNS),t.saveMissing=t.sendMissing,t.saveMissingTo=t.sendMissingTo||"current",t.returnNull=!t.fallbackOnNull,t.returnEmptyString=!t.fallbackOnEmpty,t.returnObjects=t.returnObjectTrees,t.joinArrays="\n",t.returnedObjectHandler=t.objectTreeKeyHandler,t.parseMissingKeyHandler=t.parseMissingKey,t.appendNamespaceToMissingKey=!0,t.nsSeparator=t.nsseparator||":",t.keySeparator=t.keyseparator||".","sprintf"===t.shortcutFunction&&(t.overloadTranslationOptionHandler=function(t){for(var e=[],n=1;n1?e-1:0),o=1;o1?e-1:0),o=1;o1?e-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:J;if(this.options.resources)e(null);else{if(this.language&&"cimode"===this.language.toLowerCase())return e();var n=[],r=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(t){n.indexOf(t)<0&&n.push(t)}))};if(this.language)r(this.language);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(t){return r(t)}));this.options.preload&&this.options.preload.forEach((function(t){return r(t)})),this.services.cacheConnector.load(n,this.options.ns,(function(){t.services.backendConnector.load(n,t.options.ns,e)}))}},e.prototype.reloadResources=function(t,e){t||(t=this.languages),e||(e=this.options.ns),this.services.backendConnector.reload(t,e)},e.prototype.use=function(t){return"backend"===t.type&&(this.modules.backend=t),"cache"===t.type&&(this.modules.cache=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"postProcessor"===t.type&&_.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this},e.prototype.changeLanguage=function(t,e){var n=this,r=function(t){t&&(n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t),n.translator.changeLanguage(t),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(t)),n.loadResources((function(r){!function(t,r){r&&(n.emit("languageChanged",r),n.logger.log("languageChanged",r)),e&&e(t,(function(){return n.t.apply(n,arguments)}))}(r,t)}))};t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(r):r(t):r(this.services.languageDetector.detect())},e.prototype.getFixedT=function(t,e){var n=this,r=function t(e){var r=K({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return r.lng=r.lng||t.lng,r.lngs=r.lngs||t.lngs,r.ns=r.ns||t.ns,n.t(e,r)};return"string"==typeof t?r.lng=t:r.lngs=t,r.ns=e,r},e.prototype.t=function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)},e.prototype.exists=function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)},e.prototype.setDefaultNamespace=function(t){this.options.defaultNS=t},e.prototype.loadNamespaces=function(t,e){var n=this;if(!this.options.ns)return e&&e();"string"==typeof t&&(t=[t]),t.forEach((function(t){n.options.ns.indexOf(t)<0&&n.options.ns.push(t)})),this.loadResources(e)},e.prototype.loadLanguages=function(t,e){"string"==typeof t&&(t=[t]);var n=this.options.preload||[],r=t.filter((function(t){return n.indexOf(t)<0}));if(!r.length)return e();this.options.preload=n.concat(r),this.loadResources(e)},e.prototype.dir=function(t){if(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"},e.prototype.createInstance=function(){return new e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments[1])},e.prototype.cloneInstance=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,o=K({},this.options,n,{isClone:!0}),i=new e(o,r);return["store","services","language"].forEach((function(e){i[e]=t[e]})),i.translator=new S(i.services,i.options),i.translator.on("*",(function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o1&&a("Multiple handlers for a single event are deprecated. If needed, use a single handler to call multiple methods."),e.each(s,(function(e){var o=t[e];if(!o)throw new T('Method "'+e+'" was configured as an event handler, but does not exist.');t[i](n,r,o)}))}function M(t,n,r,o){if(!e.isObject(r))throw new T({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindevents"});e.each(r,(function(r,i){e.isString(r)?R(t,n,i,r,o):t[o](n,i,r)}))}function N(t,e){return t&&e?(M(this,t,e,"listenTo"),this):this}function D(t,e){return t?e?(M(this,t,e,"stopListening"),this):(this.stopListening(t),this):this}function B(t,n,r,o){if(!e.isObject(r))throw new T({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindrequests"});var i=c.call(t,r);n[o](i,t)}function V(t,e){return t&&e?(B(this,t,e,"reply"),this):this}function I(t,e){return t?e?(B(this,t,e,"stopReplying"),this):(t.stopReplying(null,null,this),this):this}T.extend=i;var L={normalizeMethods:c,_setOptions:function(t){this.options=e.extend({},e.result(this,"options"),t)},mergeOptions:l,getOption:u,bindEvents:N,unbindEvents:D},z={_initRadio:function(){var t=e.result(this,"channelName");if(t){if(!n)throw new T({name:"BackboneRadioMissing",message:'The dependency "backbone.radio" is missing.'});var r=this._channel=n.channel(t),o=e.result(this,"radioEvents");this.bindEvents(r,o);var i=e.result(this,"radioRequests");this.bindRequests(r,i),this.on("destroy",this._destroyRadio)}},_destroyRadio:function(){this._channel.stopReplying(null,null,this)},getChannel:function(){return this._channel},bindEvents:N,unbindEvents:D,bindRequests:V,unbindRequests:I},$=["channelName","radioEvents","radioRequests"],F=function(t){this.hasOwnProperty("options")||this._setOptions(t),this.mergeOptions(t,$),this._setCid(),this._initRadio(),this.initialize.apply(this,arguments)};F.extend=i,e.extend(F.prototype,t.Events,L,z,{cidPrefix:"mno",_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},initialize:function(){},_setCid:function(){this.cid||(this.cid=e.uniqueId(this.cidPrefix))},destroy:function(){if(this._isDestroyed)return this;for(var t=arguments.length,e=Array(t),n=0;n0)for(t=0;t2&&void 0!==arguments[2]?arguments[2]:at(t)).find(e)},hasEl:function(t,e){return t.contains(e&&e.parentNode)},detachEl:function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:at(t)).detach()},replaceEl:function(t,e){if(t!==e){var n=e.parentNode;n&&n.replaceChild(t,e)}},swapEl:function(t,e){if(t!==e){var n=t.parentNode,r=e.parentNode;if(n&&r){var o=t.nextSibling,i=e.nextSibling;n.insertBefore(e,o),r.insertBefore(t,i)}}},setContents:function(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:at(t)).html(e)},appendContents:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n._$el,o=void 0===r?at(t):r,i=n._$contents,a=void 0===i?at(e):i;o.append(a)},hasContents:function(t){return!!t&&t.hasChildNodes()},detachContents:function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:at(t)).contents().detach()}},ut={Dom:lt,supportsRenderLifecycle:!0,supportsDestroyLifecycle:!0,_isDestroyed:!1,isDestroyed:function(){return!!this._isDestroyed},_isRendered:!1,isRendered:function(){return!!this._isRendered},_isAttached:!1,isAttached:function(){return!!this._isAttached},delegateEvents:function(n){this._proxyBehaviorViewProperties(),this._buildEventProxies();var r=this._getEvents(n);void 0===n&&(this.events=r);var o=e.extend({},this._getBehaviorEvents(),r,this._getBehaviorTriggers(),this.getTriggers());return t.View.prototype.delegateEvents.call(this,o),this},_getEvents:function(t){var n=t||this.events;return e.isFunction(n)?this.normalizeUIKeys(n.call(this)):this.normalizeUIKeys(n)},getTriggers:function(){if(this.triggers){var t=this.normalizeUIKeys(e.result(this,"triggers"));return this._getViewTriggers(this,t)}},delegateEntityEvents:function(){return this._delegateEntityEvents(this.model,this.collection),this._delegateBehaviorEntityEvents(),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.model,this.collection),this._undelegateBehaviorEntityEvents(),this},destroy:function(){if(this._isDestroyed)return this;for(var t=this._isAttached&&!this._shouldDisableEvents,e=arguments.length,n=Array(e),r=0;r1?r-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{},r=!t._isAttached&&s(this.el)&&!this._shouldDisableMonitoring(),o=void 0===n.replaceElement?!!e.result(this,"replaceElement"):!!n.replaceElement;r&&m(t,"before:attach",t),o?this._replaceEl(t):this.attachHtml(t),r&&(t._isAttached=!0,m(t,"attach",t))},_ensureElement:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0],this.$el=this.Dom.getEl(this.el)),!this.$el||0===this.$el.length){if(void 0===t.allowMissingEl?e.result(this,"allowMissingEl"):t.allowMissingEl)return!1;throw new T('An "el" must exist in DOM for this region '+this.cid)}return!0},_getView:function(e){if(!e)throw new T({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(e._isDestroyed)throw new T({name:"ViewDestroyedError",message:'View (cid: "'+e.cid+'") has already been destroyed and cannot be used.'});if(e instanceof t.View)return e;var n=this._getViewOptions(e);return new wt(n)},_getViewOptions:function(t){return e.isFunction(t)?{template:t}:e.isObject(t)?t:{template:function(){return t}}},getEl:function(t){var n=e.result(this,"parentEl");return n&&e.isString(t)?this.Dom.findEl(n,t):this.Dom.getEl(t)},_replaceEl:function(t){this._restoreEl(),t.on("before:destroy",this._restoreEl,this),this.Dom.replaceEl(t.el,this.el),this._isReplaced=!0},_restoreEl:function(){if(this._isReplaced){var t=this.currentView;t&&(this._detachView(t),this._isReplaced=!1)}},isReplaced:function(){return!!this._isReplaced},isSwappingView:function(){return!!this._isSwappingView},attachHtml:function(t){this.Dom.appendContents(this.el,t.el,{_$el:this.$el,_$contents:t.$el})},empty:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowMissingEl:!0},e=this.currentView;if(!e)return this._ensureElement(t)&&this.detachHtml(),this;var n=!t.preventDestroy;return n||a("The preventDestroy option is deprecated. Use Region#detachView"),this._empty(e,n),this},_empty:function(t,e){t.off("destroy",this._empty,this),this.triggerMethod("before:empty",this,t),this._restoreEl(),delete this.currentView,t._isDestroyed||(e?this.removeView(t):this._detachView(t),this._stopChildViewEvents(t)),this.triggerMethod("empty",this,t)},_stopChildViewEvents:function(t){this._parentView&&this._parentView.stopListening(t)},destroyView:function(t){return t._isDestroyed||(t._shouldDisableEvents=this._shouldDisableMonitoring(),ht(t)),t},removeView:function(t){this.destroyView(t)},detachView:function(){var t=this.currentView;if(t)return this._empty(t),t},_detachView:function(t){var e=t._isAttached&&!this._shouldDisableMonitoring(),n=this._isReplaced;e&&m(t,"before:detach",t),n?this.Dom.replaceEl(this.el,t.el):this.detachHtml(),e&&(t._isAttached=!1,m(t,"detach",t))},detachHtml:function(){this.Dom.detachContents(this.el,this.$el)},hasView:function(){return!!this.currentView},reset:function(t){return this.empty(t),this.$el&&(this.el=this._initEl),delete this.$el,this},destroy:function(t){return this._isDestroyed?this:(this.reset(t),this._name&&this._parentView._removeReferences(this._name),delete this._parentView,delete this._name,F.prototype.destroy.apply(this,arguments))}},{setDomApi:st}),dt=function(t,e){return t instanceof pt?t:mt(t,e)};function mt(t,n){var r=e.extend({},n);if(e.isString(t))return e.extend(r,{el:t}),gt(r);if(e.isFunction(t))return e.extend(r,{regionClass:t}),gt(r);if(e.isObject(t))return t.selector&&a("The selector option on a Region definition object is deprecated. Use el to pass a selector string"),e.extend(r,{el:t.selector},t),gt(r);throw new T({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})}function gt(t){return new(0,t.regionClass)(e.omit(t,"regionClass"))}var vt={regionClass:pt,_initRegions:function(){this.regions=this.regions||{},this._regions={},this.addRegions(e.result(this,"regions"))},_reInitRegions:function(){H(this._regions,"reset")},addRegion:function(t,e){var n={};return n[t]=e,this.addRegions(n)[t]},addRegions:function(t){if(!e.isEmpty(t))return t=this.normalizeUIValues(t,["selector","el"]),this.regions=e.extend({},this.regions,t),this._addRegions(t)},_addRegions:function(t){var n=this,r={regionClass:this.regionClass,parentEl:e.partial(e.result,this,"el")};return e.reduce(t,(function(t,e,o){return t[o]=dt(e,r),n._addRegion(t[o],o),t}),{})},_addRegion:function(t,e){this.triggerMethod("before:add:region",this,e,t),t._parentView=this,t._name=e,this._regions[e]=t,this.triggerMethod("add:region",this,e,t)},removeRegion:function(t){var e=this._regions[t];return this._removeRegion(e,t),e},removeRegions:function(){var t=this._getRegions();return e.each(this._regions,e.bind(this._removeRegion,this)),t},_removeRegion:function(t,e){this.triggerMethod("before:remove:region",this,e,t),t.destroy(),this.triggerMethod("remove:region",this,e,t)},_removeReferences:function(t){delete this.regions[t],delete this._regions[t]},emptyRegions:function(){var t=this.getRegions();return H(t,"empty"),t},hasRegion:function(t){return!!this.getRegion(t)},getRegion:function(t){return this._isRendered||this.render(),this._regions[t]},_getRegions:function(){return e.clone(this._regions)},getRegions:function(){return this._isRendered||this.render(),this._getRegions()},showChildView:function(t,e){for(var n=this.getRegion(t),r=arguments.length,o=Array(r>2?r-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:{},n=e.result(this,"templateContext");return e.extend(t,n)},attachElContent:function(t){return this.Dom.setContents(this.el,t,this.$el),this},_removeChildren:function(){this.removeRegions()},_getImmediateChildren:function(){return e.chain(this._getRegions()).map("currentView").compact().value()}},{setRenderer:function(t){return this.prototype._renderHtml=t,this},setDomApi:st});e.extend(wt.prototype,ut,vt);var _t=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce","partition"],xt=function(t,n){e.each(_t,(function(r){t[r]=function(){var t=e.result(this,n),o=Array.prototype.slice.call(arguments);return e[r].apply(e,[t].concat(o))}}))},kt=function(t){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),e.each(t,e.bind(this.add,this))};xt(kt.prototype,"_getViews"),e.extend(kt.prototype,{_getViews:function(){return e.values(this._views)},add:function(t,e){return this._add(t,e)._updateLength()},_add:function(t,e){var n=t.cid;return this._views[n]=t,t.model&&(this._indexByModel[t.model.cid]=n),e&&(this._indexByCustom[e]=n),this},findByModel:function(t){return this.findByModelCid(t.cid)},findByModelCid:function(t){var e=this._indexByModel[t];return this.findByCid(e)},findByCustom:function(t){var e=this._indexByCustom[t];return this.findByCid(e)},findByIndex:function(t){return e.values(this._views)[t]},findByCid:function(t){return this._views[t]},remove:function(t){return this._remove(t)._updateLength()},_remove:function(t){var n=t.cid;return t.model&&delete this._indexByModel[t.model.cid],e.some(this._indexByCustom,e.bind((function(t,e){if(t===n)return delete this._indexByCustom[e],!0}),this)),delete this._views[n],this},_updateLength:function(){return this.length=e.size(this._views),this}});var At=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","events","filter","emptyView","emptyViewOptions","modelEvents","reorderOnSort","sort","triggers","ui","viewComparator"],Ot=t.View.extend({sort:!0,constructor:function(n){this.render=e.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,At),P(this),this._initBehaviors(),this.once("render",this._initialEvents),this._initChildViewStorage(),this._bufferedChildren=[];var r=Array.prototype.slice.call(arguments);r[0]=this.options,t.View.prototype.constructor.apply(this,r),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},_startBuffering:function(){this._isBuffering=!0},_endBuffering:function(){var t=this._isAttached&&!1!==this.monitorViewEvents?this._getImmediateChildren():[];this._isBuffering=!1,e.each(t,(function(t){m(t,"before:attach",t)})),this.attachBuffer(this,this._createBuffer()),e.each(t,(function(t){t._isAttached=!0,m(t,"attach",t)})),this._bufferedChildren=[]},_getImmediateChildren:function(){return e.values(this.children._views)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"update",this._onCollectionUpdate),this.listenTo(this.collection,"reset",this.render),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(t,n,r){var o=void 0!==r.at&&(r.index||n.indexOf(t));(this.filter||!1===o)&&(o=e.indexOf(this._filteredSortedModels(o),t)),this._shouldAddChild(t,o)&&(this._destroyEmptyView(),this._addChild(t,o))},_onCollectionUpdate:function(t,e){var n=e.changes;this._removeChildModels(n.removed)},_removeChildModels:function(t){var e=this._getRemovedViews(t);e.length&&(this.children._updateLength(),this._updateIndices(e,!1),this.isEmpty()&&this._showEmptyView())},_getRemovedViews:function(t){var n=this;return e.reduce(t,(function(t,e){var r=e&&n.children.findByModel(e);return!r||r._isDestroyed||(n._removeChildView(r),t.push(r)),t}),[])},_removeChildView:function(t){this.triggerMethod("before:remove:child",this,t),this.children._remove(t),t._shouldDisableEvents=!1===this.monitorViewEvents,ht(t),this.stopListening(t),this.triggerMethod("remove:child",this,t)},setElement:function(){return t.View.prototype.setElement.apply(this,arguments),this._isAttached=s(this.el),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._renderChildren(),this._isRendered=!0,this.triggerMethod("render",this)),this},setFilter:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,n=this._isRendered&&!this._isDestroyed,r=this.filter!==t;if(n&&r&&!e){var o=this._filteredSortedModels();this.filter=t;var i=this._filteredSortedModels();this._applyModelDeltas(i,o)}else this.filter=t;return this},removeFilter:function(t){return this.setFilter(null,t)},_applyModelDeltas:function(t,n){var r=this,o={};e.each(t,(function(t,e){!r.children.findByModel(t)&&r._onCollectionAdd(t,r.collection,{at:e}),o[t.cid]=!0}));var i=e.filter(n,(function(t){return!o[t.cid]&&r.children.findByModel(t)}));this._removeChildModels(i)},reorder:function(){var t=this,n=this.children,r=this._filteredSortedModels();if(!r.length&&this._showingEmptyView)return this;if(e.some(r,(function(t){return!n.findByModel(t)})))this.render();else{var o=[],i=e.reduce(this.children._views,(function(t,n){var i=e.indexOf(r,n.model);return-1===i?(o.push(n.model),t):(n._index=i,t[i]=n.el,t)}),new Array(r.length));this.triggerMethod("before:reorder",this);var a=this.Dom.createBuffer();e.each(i,(function(e){t.Dom.appendContents(a,e)})),this._appendReorderedChildren(a),this._removeChildModels(o),this.triggerMethod("reorder",this)}return this},resortView:function(){return this.reorderOnSort?this.reorder():this._renderChildren(),this},_sortViews:function(){var t=this,n=this._filteredSortedModels();e.find(n,(function(e,n){var r=t.children.findByModel(e);return!r||r._index!==n}))&&this.resortView()},_emptyViewIndex:-1,_appendReorderedChildren:function(t){this.Dom.appendContents(this.el,t,{_$el:this.$el})},_renderChildren:function(){this._isRendered&&(this._destroyEmptyView(),this._destroyChildren());var t=this._filteredSortedModels();this.isEmpty({processedModels:t})?this._showEmptyView():(this.triggerMethod("before:render:children",this),this._startBuffering(),this._showCollection(t),this._endBuffering(),this.triggerMethod("render:children",this))},_createView:function(t,e){var n=this._getChildView(t),r=this._getChildViewOptions(t,e);return this.buildChildView(t,n,r)},_setupChildView:function(t,e){P(t),this._proxyChildViewEvents(t),this.sort&&(t._index=e)},_showCollection:function(t){e.each(t,e.bind(this._addChild,this)),this.children._updateLength()},_filteredSortedModels:function(t){if(!this.collection||!this.collection.length)return[];var e=this.getViewComparator(),n=this.collection.models;if(t=Math.min(Math.max(t,0),n.length-1),e){var r=void 0;t&&(r=n[t],n=n.slice(0,t).concat(n.slice(t+1))),n=this._sortModelsBy(n,e),r&&n.splice(t,0,r)}return n=this._filterModels(n)},getViewComparator:function(){return this.viewComparator},_filterModels:function(t){var n=this;return this.filter&&(t=e.filter(t,(function(t,e){return n._shouldAddChild(t,e)}))),t},_sortModelsBy:function(t,n){return"string"==typeof n?e.sortBy(t,(function(t){return t.get(n)})):1===n.length?e.sortBy(t,e.bind(n,this)):e.clone(t).sort(e.bind(n,this))},_showEmptyView:function(){var n=this._getEmptyView();if(n&&!this._showingEmptyView){this._showingEmptyView=!0;var r=new t.Model,o=this.emptyViewOptions||this.childViewOptions;e.isFunction(o)&&(o=o.call(this,r,this._emptyViewIndex));var i=this.buildChildView(r,n,o);this.triggerMethod("before:render:empty",this,i),this.addChildView(i,0),this.triggerMethod("render:empty",this,i)}},_destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty",this),this._destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty",this))},_getEmptyView:function(){var t=this.emptyView;if(t)return this._getView(t)},_getChildView:function(t){var e=this.childView;if(!e)throw new T({name:"NoChildViewError",message:'A "childView" must be specified'});if(!(e=this._getView(e,t)))throw new T({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return e},_getView:function(n,r){return n.prototype instanceof t.View||n===t.View?n:e.isFunction(n)?n.call(this,r):void 0},_addChild:function(t,e){var n=this._createView(t,e);return this.addChildView(n,e),n},_getChildViewOptions:function(t,n){return e.isFunction(this.childViewOptions)?this.childViewOptions(t,n):this.childViewOptions},addChildView:function(t,e){return this.triggerMethod("before:add:child",this,t),this._setupChildView(t,e),this._isBuffering?this.children._add(t):(this._updateIndices(t,!0),this.children.add(t)),ct(t),this._attachView(t,e),this.triggerMethod("add:child",this,t),t},_updateIndices:function(t,n){if(this.sort)if(n){var r=e.isArray(t)?e.max(t,"_index"):t;e.isObject(r)&&e.each(this.children._views,(function(t){t._index>=r._index&&(t._index+=1)}))}else e.each(e.sortBy(this.children._views,"_index"),(function(t,e){t._index=e}))},_attachView:function(t,e){var n=!t._isAttached&&!this._isBuffering&&this._isAttached&&!1!==this.monitorViewEvents;n&&m(t,"before:attach",t),this.attachHtml(this,t,e),n&&(t._isAttached=!0,m(t,"attach",t))},buildChildView:function(t,n,r){return new n(e.extend({model:t},r))},removeChildView:function(t){return!t||t._isDestroyed||(this._removeChildView(t),this.children._updateLength(),this._updateIndices(t,!1)),t},isEmpty:function(t){var n=void 0;return e.result(t,"processedModels")?n=t.processedModels:(n=this.collection?this.collection.models:[],n=this._filterModels(n)),0===n.length},attachBuffer:function(t,e){this.Dom.appendContents(t.el,e,{_$el:t.$el})},_createBuffer:function(){var t=this,n=this.Dom.createBuffer();return e.each(this._bufferedChildren,(function(e){t.Dom.appendContents(n,e.el,{_$contents:e.$el})})),n},attachHtml:function(t,e,n){t._isBuffering?t._bufferedChildren.splice(n,0,e):t._insertBefore(e,n)||t._insertAfter(e)},_insertBefore:function(t,n){var r=void 0;return this.sort&&n1&&void 0!==arguments[1]?arguments[1]:this._views.length,n=t.cid;this._viewsByCid[n]=t,t.model&&(this._indexByModel[t.model.cid]=n),this._views.splice(e,0,t),this._updateLength()},_sort:function(t,n){return"string"==typeof t?(t=e.partial(Ct,t),this._sortBy(t)):1===t.length?this._sortBy(e.bind(t,n)):this._views.sort(e.bind(t,n))},_sortBy:function(t){var n=e.sortBy(this._views,t);return this._set(n),n},_set:function(t){this._views.length=0,this._views.push.apply(this._views,t.slice(0)),this._updateLength()},_swap:function(t,e){var n=this.findIndexByView(t),r=this.findIndexByView(e);if(-1!==n&&-1!==r){var o=this._views[n];this._views[n]=this._views[r],this._views[r]=o}},findByModel:function(t){return this.findByModelCid(t.cid)},findByModelCid:function(t){var e=this._indexByModel[t];return this.findByCid(e)},findByIndex:function(t){return this._views[t]},findIndexByView:function(t){return this._views.indexOf(t)},findByCid:function(t){return this._viewsByCid[t]},hasView:function(t){return!!this.findByCid(t.cid)},_remove:function(t){if(this._viewsByCid[t.cid]){t.model&&delete this._indexByModel[t.model.cid],delete this._viewsByCid[t.cid];var e=this.findIndexByView(t);this._views.splice(e,1),this._updateLength()}},_updateLength:function(){this.length=this._views.length}});var St=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","emptyView","emptyViewOptions","events","modelEvents","sortWithCollection","triggers","ui","viewComparator","viewFilter"],Pt=t.View.extend({sortWithCollection:!0,constructor:function(e){this._setOptions(e),this.mergeOptions(e,St),P(this),this.once("render",this._initialEvents),this._initChildViewStorage(),this._initBehaviors();var n=Array.prototype.slice.call(arguments);n[0]=this.options,t.View.prototype.constructor.apply(this,n),this.getEmptyRegion(),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},_initChildViewStorage:function(){this.children=new Et},getEmptyRegion:function(){return this._emptyRegion&&!this._emptyRegion.isDestroyed()||(this._emptyRegion=new pt({el:this.el,replaceElement:!1}),this._emptyRegion._parentView=this),this._emptyRegion},_initialEvents:function(){this.listenTo(this.collection,{sort:this._onCollectionSort,reset:this._onCollectionReset,update:this._onCollectionUpdate})},_onCollectionSort:function(t,e){var n=e.add,r=e.merge,o=e.remove;this.sortWithCollection&&!1!==this.viewComparator&&(n||o||r||this.sort())},_onCollectionReset:function(){this.render()},_onCollectionUpdate:function(t,e){var n=e.changes,r=n.removed.length&&this._removeChildModels(n.removed);this._addedViews=n.added.length&&this._addChildModels(n.added),this._detachChildren(r),this._showChildren(),this._removeChildViews(r)},_removeChildModels:function(t){var n=this;return e.reduce(t,(function(t,e){var r=n._removeChildModel(e);return r&&t.push(r),t}),[])},_removeChildModel:function(t){var e=this.children.findByModel(t);return e&&this._removeChild(e),e},_removeChild:function(t){this.triggerMethod("before:remove:child",this,t),this.children._remove(t),this.triggerMethod("remove:child",this,t)},_addChildModels:function(t){return e.map(t,e.bind(this._addChildModel,this))},_addChildModel:function(t){var e=this._createChildView(t);return this._addChild(e),e},_createChildView:function(t){var e=this._getChildView(t),n=this._getChildViewOptions(t);return this.buildChildView(t,e,n)},_addChild:function(t,e){this.triggerMethod("before:add:child",this,t),this._setupChildView(t),this.children._add(t,e),this.triggerMethod("add:child",this,t)},_getChildView:function(t){var e=this.childView;if(!e)throw new T({name:"NoChildViewError",message:'A "childView" must be specified'});if(!(e=this._getView(e,t)))throw new T({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return e},_getView:function(n,r){return n.prototype instanceof t.View||n===t.View?n:e.isFunction(n)?n.call(this,r):void 0},_getChildViewOptions:function(t){return e.isFunction(this.childViewOptions)?this.childViewOptions(t):this.childViewOptions},buildChildView:function(t,n,r){return new n(e.extend({model:t},r))},_setupChildView:function(t){P(t),t.on("destroy",this.removeChildView,this),this._proxyChildViewEvents(t)},_getImmediateChildren:function(){return this.children._views},setElement:function(){return t.View.prototype.setElement.apply(this,arguments),this._isAttached=s(this.el),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._destroyChildren(),this.children._init(),this.collection&&this._addChildModels(this.collection.models),this._showChildren(),this._isRendered=!0,this.triggerMethod("render",this)),this},sort:function(){return this._isDestroyed?this:this.children.length?(this._showChildren(),this):this},_showChildren:function(){this.isEmpty()?this._showEmptyView():(this._sortChildren(),this.filter())},isEmpty:function(t){return t||!this.children.length},_showEmptyView:function(){var t=this._getEmptyView();if(t){var e=this._getEmptyViewOptions();this.getEmptyRegion().show(new t(e))}},_getEmptyView:function(){var t=this.emptyView;if(t)return this._getView(t)},_destroyEmptyView:function(){var t=this.getEmptyRegion();t.hasView()&&t.empty()},_getEmptyViewOptions:function(){var t=this.emptyViewOptions||this.childViewOptions;return e.isFunction(t)?t.call(this):t},_sortChildren:function(){var t=this.getComparator();t&&(delete this._addedViews,this.triggerMethod("before:sort",this),this.children._sort(t,this),this.triggerMethod("sort",this))},setComparator:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,n=this.viewComparator!==t&&!e;return this.viewComparator=t,n&&this.sort(),this},removeComparator:function(t){return this.setComparator(null,t)},getComparator:function(){return this.viewComparator?this.viewComparator:!(!this.sortWithCollection||!1===this.viewComparator||!this.collection)&&this._viewComparator},_viewComparator:function(t){return this.collection.indexOf(t.model)},filter:function(){if(this._isDestroyed)return this;if(!this.children.length)return this;var t=this._filterChildren();return this._renderChildren(t),this},_filterChildren:function(){var t=this,n=this._getFilter(),r=this._addedViews;if(delete this._addedViews,!n)return r||this.children._views;this.triggerMethod("before:filter",this);var o=[],i=[];return e.each(this.children._views,(function(e,r,a){(n.call(t,e,r,a)?o:i).push(e)})),this._detachChildren(i),this.triggerMethod("filter",this,o,i),o},_getFilter:function(){var t=this.getFilter();if(!t)return!1;if(e.isFunction(t))return t;if(e.isObject(t)){var n=e.matches(t);return function(t){return n(t.model&&t.model.attributes)}}if(e.isString(t))return function(e){return e.model&&e.model.get(t)};throw new T({name:"InvalidViewFilterError",message:'"viewFilter" must be a function, predicate object literal, a string indicating a model attribute, or falsy'})},getFilter:function(){return this.viewFilter},setFilter:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).preventRender,n=this.viewFilter!==t&&!e;return this.viewFilter=t,n&&this.filter(),this},removeFilter:function(t){return this.setFilter(null,t)},_detachChildren:function(t){e.each(t,e.bind(this._detachChildView,this))},_detachChildView:function(t){var e=t._isAttached&&!1!==this.monitorViewEvents;e&&m(t,"before:detach",t),this.detachHtml(t),e&&(t._isAttached=!1,m(t,"detach",t))},detachHtml:function(t){this.Dom.detachEl(t.el,t.$el)},_renderChildren:function(t){if(this.isEmpty(!t.length))this._showEmptyView();else{this._destroyEmptyView(),this.triggerMethod("before:render:children",this,t);var e=this._getBuffer(t);this._attachChildren(e,t),this.triggerMethod("render:children",this,t)}},_attachChildren:function(t,n){n=this._isAttached&&!1!==this.monitorViewEvents?n:[],e.each(n,(function(t){t._isAttached||m(t,"before:attach",t)})),this.attachHtml(t),e.each(n,(function(t){t._isAttached||(t._isAttached=!0,m(t,"attach",t))}))},_getBuffer:function(t){var n=this,r=this.Dom.createBuffer();return e.each(t,(function(t){ct(t),n.Dom.appendContents(r,t.el,{_$contents:t.$el})})),r},attachHtml:function(t){this.Dom.appendContents(this.el,t,{_$el:this.$el})},swapChildViews:function(t,e){if(!this.children.hasView(t)||!this.children.hasView(e))throw new T({name:"ChildSwapError",message:"Both views must be children of the collection view"});return this.children._swap(t,e),this.Dom.swapEl(t.el,e.el),this.Dom.hasEl(this.el,t.el)!==this.Dom.hasEl(this.el,e.el)&&this.filter(),this},addChildView:function(t,e){return!t||t._isDestroyed||((!e||e>=this.children.length)&&(this._addedViews=[t]),this._addChild(t,e),this._showChildren()),t},detachChildView:function(t){return this.removeChildView(t,{shouldDetach:!0}),t},removeChildView:function(t,e){return t?(this._removeChildView(t,e),this._removeChild(t),this.isEmpty()&&this._showEmptyView(),t):t},_removeChildViews:function(t){e.each(t,e.bind(this._removeChildView,this))},_removeChildView:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shouldDetach;t.off("destroy",this.removeChildView,this),e?this._detachChildView(t):this._destroyChildView(t),this.stopListening(t)},_destroyChildView:function(t){t._isDestroyed||(t._shouldDisableEvents=!1===this.monitorViewEvents,ht(t))},_removeChildren:function(){this._destroyChildren(),this.getEmptyRegion().destroy(),delete this._addedViews},_destroyChildren:function(){this.children&&this.children.length&&(this.triggerMethod("before:destroy:children",this),!1===this.monitorViewEvents&&this.Dom.detachContents(this.el,this.$el),e.each(this.children._views,e.bind(this._removeChildView,this)),this.triggerMethod("destroy:children",this))}},{setDomApi:st});e.extend(Pt.prototype,ut);var jt=["childViewContainer","template","templateContext"],Tt=Ot.extend({constructor:function(t){a("CompositeView is deprecated. Convert to View at your earliest convenience"),this.mergeOptions(t,jt),Ot.prototype.constructor.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"update",this._onCollectionUpdate),this.listenTo(this.collection,"reset",this.renderChildren),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_getChildView:function(t){var e=this.childView;if(!e)return this.constructor;if(!(e=this._getView(e,t)))throw new T({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return e},serializeData:function(){return this.serializeModel()},render:function(){return this._isDestroyed||(this._isRendering=!0,this.resetChildViewContainer(),this.triggerMethod("before:render",this),this._renderTemplate(),this.bindUIElements(),this.renderChildren(),this._isRendering=!1,this._isRendered=!0,this.triggerMethod("render",this)),this},renderChildren:function(){(this._isRendered||this._isRendering)&&Ot.prototype._renderChildren.call(this)},attachBuffer:function(t,e){var n=this.getChildViewContainer(t);this.Dom.appendContents(n[0],e,{_$el:n})},_insertAfter:function(t){var e=this.getChildViewContainer(this,t);this.Dom.appendContents(e[0],t.el,{_$el:e,_$contents:t.$el})},_appendReorderedChildren:function(t){var e=this.getChildViewContainer(this);this.Dom.appendContents(e[0],t,{_$el:e})},getChildViewContainer:function(t,n){if(t.$childViewContainer)return t.$childViewContainer;var r=void 0;if(t.childViewContainer){var o=e.result(t,"childViewContainer");if((r="@"===o.charAt(0)&&t.ui?t.ui[o.substr(4)]:this.$(o)).length<=0)throw new T({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+t.childViewContainer})}else r=t.$el;return t.$childViewContainer=r,r},resetChildViewContainer:function(){this.$childViewContainer&&(this.$childViewContainer=void 0)}}),Rt=e.pick(wt.prototype,"serializeModel","getTemplate","_renderTemplate","_renderHtml","mixinTemplateContext","attachElContent");e.extend(Tt.prototype,Rt);var Mt=["collectionEvents","events","modelEvents","triggers","ui"],Nt=F.extend({cidPrefix:"mnb",constructor:function(t,n){this.view=n,this.defaults&&a("Behavior defaults are deprecated. For similar functionality set options on the Behavior class."),this.defaults=e.clone(e.result(this,"defaults",{})),this._setOptions(e.extend({},this.defaults,t)),this.mergeOptions(this.options,Mt),this.ui=e.extend({},e.result(this,"ui"),e.result(n,"ui")),F.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this.view._removeBehavior(this),this},proxyViewProperties:function(){return this.$el=this.view.$el,this.el=this.view.el,this},bindUIElements:function(){return this._bindUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this},getUI:function(t){return this._getUI(t)},delegateEntityEvents:function(){return this._delegateEntityEvents(this.view.model,this.view.collection),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.view.model,this.view.collection),this},getEvents:function(){var t=this,n=this.normalizeUIKeys(e.result(this,"events"));return e.reduce(n,(function(n,r,o){return e.isFunction(r)||(r=t[r]),r?(n[o=Y(o,t.cid)]=e.bind(r,t),n):n}),{})},getTriggers:function(){if(this.triggers){var t=this.normalizeUIKeys(e.result(this,"triggers"));return this._getViewTriggers(this.view,t)}}});e.extend(Nt.prototype,K,et,it);var Dt=["region","regionClass"],Bt=F.extend({cidPrefix:"mna",constructor:function(t){this._setOptions(t),this.mergeOptions(t,Dt),this._initRegion(),F.prototype.constructor.apply(this,arguments)},regionClass:pt,_initRegion:function(){var t=this.region;if(t){var e={regionClass:this.regionClass};this._region=dt(t,e)}},getRegion:function(){return this._region},showView:function(t){for(var e=this.getRegion(),n=arguments.length,r=Array(n>1?n-1:0),o=1;othis.length&&(o=this.length),o<0&&(o+=this.length+1);var i,a,s=[],l=[],u=[],c=[],h={},f=e.add,p=e.merge,d=e.remove,m=!1,g=this.comparator&&null==o&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(a=0;a0&&!e.silent&&delete e.index,n},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes,t.idAttribute);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes,t.idAttribute);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if(e){if(("add"===t||"remove"===t)&&n!==this)return;if("destroy"===t&&this.remove(e,r),"changeId"===t){var o=this.modelId(e.previousAttributes(),e.idAttribute),i=this.modelId(e.attributes,e.idAttribute);null!=o&&delete this._byId[o],null!=i&&(this._byId[i]=e)}}this.trigger.apply(this,arguments)},_forwardPristineError:function(t,e,n){this.has(t)||this._onModelEvent("error",t,e,n)}});var x="function"==typeof Symbol&&Symbol.iterator;x&&(y.prototype[x]=y.prototype.values);var k=function(t,e){this._collection=t,this._kind=e,this._index=0},A=1,O=2,E=3;x&&(k.prototype[x]=function(){return this}),k.prototype.next=function(){if(this._collection){if(this._index7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(H,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,o=r.insertBefore(this.iframe,r.firstChild).contentWindow;o.document.open(),o.document.close(),o.location.hash="#"+this.fragment}var i=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?i("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?i("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),F.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!this.matchRoot()&&this.notfound();this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0}))||this.notfound()):this.notfound()},notfound:function(){return this.trigger("notfound"),!1},navigate:function(t,e){if(!F.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;this._trailingSlash||""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+t;t=t.replace(q,"");var o=this.decodeFragment(t);if(this.fragment!==o){if(this.fragment=o,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new F;var W=function(t,e){var r,o=this;return r=t&&n.has(t,"constructor")?t.constructor:function(){return o.apply(this,arguments)},n.extend(r,o,e),r.prototype=n.create(o.prototype,t),r.prototype.constructor=r,r.__super__=o.prototype,r};v.extend=y.extend=V.extend=C.extend=F.extend=W;var G=function(){throw new Error('A "url" property or function must be specified')},K=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e._debug=function(){return{root:t,_:n}},e}(i,n,t,e)}.apply(e,r),void 0===o||(t.exports=o)},8075:function(t,e,n){"use strict";var r=n(453),o=n(487),i=o(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&i(t,".prototype.")>-1?o(n):n}},487:function(t,e,n){"use strict";var r=n(6743),o=n(453),i=n(6897),a=n(9675),s=o("%Function.prototype.apply%"),l=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||r.call(l,s),c=n(655),h=o("%Math.max%");t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=u(r,l,arguments);return i(e,1+h(0,t.length-(arguments.length-1)),!0)};var f=function(){return u(r,s,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f},41:function(t,e,n){"use strict";var r=n(655),o=n(8068),i=n(9675),a=n(5795);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],h=!!a&&a(t,e);if(r)r(t,e,{configurable:null===u&&h?h.configurable:!u,enumerable:null===s&&h?h.enumerable:!s,value:n,writable:null===l&&h?h.writable:!l});else{if(!c&&(s||l||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},655:function(t,e,n){"use strict";var r=n(453)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(t){r=!1}t.exports=r},1237:function(t){"use strict";t.exports=EvalError},9383:function(t){"use strict";t.exports=Error},9290:function(t){"use strict";t.exports=RangeError},9538:function(t){"use strict";t.exports=ReferenceError},8068:function(t){"use strict";t.exports=SyntaxError},9675:function(t){"use strict";t.exports=TypeError},5345:function(t){"use strict";t.exports=URIError},9353:function(t){"use strict";var e=Object.prototype.toString,n=Math.max,r=function(t,e){for(var n=[],r=0;r1&&"boolean"!=typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=j(t,0,1),n=j(t,-1);if("%"===e&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var r=[];return P(t,R,(function(t,e,n,o){r[r.length]=n?P(o,M,"$1"):e||t})),r}(t),r=n.length>0?n[0]:"",o=N("%"+r+"%",e),i=o.name,a=o.value,s=!1,c=o.alias;c&&(r=c[0],S(n,C([0,1],c)));for(var h=1,f=!0;h=n.length){var v=p(a,d);a=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[d]}else f=E(a,d),a=a[d];f&&!s&&(_[i]=a)}}return a}},5795:function(t,e,n){"use strict";var r=n(453)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(t){r=null}t.exports=r},2417:function(t,e,n){var r=n(3633);function o(t){return t&&(t.__esModule?t.default:t)}t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+t.escapeExpression(t.lambda(null!=e?i(e,"name"):e,e))+"\n"},3:function(t,e,n,r,o){var i=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+t.escapeExpression(t.lambda(null!=e?i(e,"source"):e,e))+"\n"},compiler:[8,">= 4.3.0"],main:function(t,e,r,i,a){var s,l=t.lambda,u=t.escapeExpression,c=null!=e?e:t.nullContext||{},h=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'