[
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: ci\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\n  schedule:\n    - cron: '00 12 * * 1' # Runs every Monday at 8:00 AM EST\n\njobs:\n  Test:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        python-version: ['3.8', '3.9', '3.10']\n        os: [ubuntu-latest, macos-latest, windows-latest]\n      fail-fast: false\n    steps:\n      - uses: actions/checkout@v2\n      - name: Set up Python ${{ matrix.python-version }}\n        uses: actions/setup-python@v2\n        with:\n          python-version: ${{ matrix.python-version }}\n\n      - name: Check\n        shell: bash\n        run: |\n          python3 -m pip install --upgrade pip\n          pip install -e .\n          python3 -m unittest discover -v tests\n          python3 setup.py install\n"
  },
  {
    "path": ".gitignore",
    "content": "# Pycharm cache files\n.cache/*\n.idea/*\n.pytest_cache/*\ntests/__pycache__/*\nmab2rec/__pycache__/*\ndist/*\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n*.swp\n\n# Jupyter Notebook\n.ipynb_checkpoints\n#*.ipynb\n\n# IPython\nprofile_default/\nipython_config.py\n\n# Compiled python modules.\n*.pyc\n\n# Python egg metadata, regenerated from source files by setuptools.\n/*.egg-info\n\n# Dev and data folders on working branch\ndev/*\ndata/*\nnotebooks/*\n\n# Metadata\n.DS_Store\n\n# Build folder\nbuild/*\neggs/\n.eggs/\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n.hypothesis/\n.pytest_cache/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Documentation\ndocsrc/_build/\n"
  },
  {
    "path": "CHANGELOG.txt",
    "content": "=========\nCHANGELOG\n=========\n\n-------------------------------------------------------------------------------\nSeptember, 03, 2024 1.3.1\n-------------------------------------------------------------------------------\nMinor:\n- Updated requirements to use mabwiser>=2.7.4 to reflect change from np.Inf to np.inf in mabwiser.\n- Fixed default KMeans n_init parameters in tests instead of using 'auto' used in scikit-learn>=1.4\n\n-------------------------------------------------------------------------------\nFebruary, 22, 2024 1.3.0\n-------------------------------------------------------------------------------\n\nMajor:\n- Added optional `apply_sigmoid` argument to recommend() method, to\n  control whether sigmoid transformation is applied to scores or not.\nMinor:\n- Fixed bug when recommending single context.\n\n\n-------------------------------------------------------------------------------\nFebruary, 05, 2024 1.2.1\n-------------------------------------------------------------------------------\n\nMinor:\n- Replaced NoReturn type hinting with None - thank you @SaraEkmanSVT\n\n-------------------------------------------------------------------------------\nAugust, 16, 2023 1.2.0\n-------------------------------------------------------------------------------\n\nMajor:\n- Removed spock-config dependency and train/test scripts using Spock\n- Updated tests and documentation to reflect Python 3.8+ support\n\n-------------------------------------------------------------------------------\nFebruary, 23, 2023 1.1.0\n-------------------------------------------------------------------------------\n\nMajor:\n- Updated requirements to use mabwiser>=2.7 to benefit from enhancements,\n  including vectorized predict for Linear policies and tracking of arm status.\n- Fixed tests due to changes in random seeding for Linear policies.\nMinor:\n- Added Diversity metrics to available MAB evaluation metrics.\n\n-------------------------------------------------------------------------------\nAugust, 16, 2022 1.0.3\n-------------------------------------------------------------------------------\n\nMinor:\n- Fixed bug with inconsistency between scored and eligible items.\n\n-------------------------------------------------------------------------------\nJuly, 5, 2022 1.0.2\n-------------------------------------------------------------------------------\n\nMinor:\n- Fixed bug with arguments not being passed correctly to load_response_data.\n\n-------------------------------------------------------------------------------\nMay, 12, 2022 1.0.1\n-------------------------------------------------------------------------------\n\nMinor:\n- Add encodings generation to Seq2Pat section in feature_engineering notebook.\n- Explicitly claim Mab2Rec requires Python 3.7+ for Installation in README.\n- Library source scripts are not updated, thus the pypi version is not changed.\n\n-------------------------------------------------------------------------------\nApril, 15, 2022 1.0.1\n-------------------------------------------------------------------------------\n\nMinor:\n- Fix missing top-k recommendations when top messages are excluded - thanks @nateewall!\n\n-------------------------------------------------------------------------------\nMarch, 18, 2022 1.0.0\n-------------------------------------------------------------------------------\n\n- Initial public release.\n"
  },
  {
    "path": "CODEOWNERS",
    "content": "# These owners will be the default owners for everything in the repo.\n*       @bkleyn @skadio\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to Mab2Rec\n\nThank you for contributing to Mab2Rec! This guide will help you get started and know what to expect. All contributions and project spaces are subject to our [Code of Conduct](https://github.com/fidelity/.github/blob/main/CODE_OF_CONDUCT.md).\n\nWe welcome all types of contributions, including:\n\n* Code contributions\n* Bug reports\n* Responsibly disclosed security concerns\n* Documentation fixes\n* Feature requests and user stories (although we can't guarantee we'll get to all requests, it's helpful to know where we can improve)\n\nIf you end up using our library in a project, give us a star on GitHub!\n\nPlease note that we periodically fork upstream repos to stage contributions from Fidelity. We do not accept contributions against these forked repos, and request you make contributions against upstream projects directly.\n\nIf you have any questions, please contact [opensource@fmr.com](mailto:opensource@fmr.com).\n\n## How to report a bug\n\nPlease [open an issue](https://github.com/fidelity/mab2rec/issues) **unless** you are making a significant security disclosure.\n\nWhen reporting a bug, please start from a fresh pull of the default branch and document how you encountered the issue. Reports with insufficient detail and which we can't reproduce may be closed without action.\n\nWhile bugs can be frustrating, we ask participants to contribute positively and professionally to the discourse. While we commit to take the contents of the report seriously, abusive behavior be will not be tolerated.\n\n## How to disclose security concerns responsibly\n\nPlease follow the instructions in our [security policy](https://github.com/fidelity/.github/blob/main/SECURITY.md) (also visible in the Security tab on the project's repo).\n\n## How to contribute documentation fixes\n\nMinor documentation fixes can be submitted directly as a pull request without filing an issue in advance. More significant changes (e.g., refactoring to support a new documentation format, major reorganizations of content, etc.) should first be discussed in an issue to ensure everyone's time is used effectively.\n\nWhen opening a PR or issue with a documentation change, please add a `documentation` label.\n\n## How to request features or submit a user story\n\nTo request a feature please open an issue and tag it as `feature enhancement`. If you already have an implementation, please [link the pull request to the issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).\n\nPlease include as much information and context as you can. Understanding how the feature solves a specific problem will help us prioritize the request. Please understand that we will not be able to provide an implementation timeline on all requests, although requests that include an implementation are more likely to land sooner.\n\nIf you won't do the work yourself, please also add a `good first issue` or `help wanted` label. These are special issue tags which are intended to help new and existing contributors get involved in a meaningful and accessible way.\n\n* `good first issue` - Small changes that are suitable for a beginner\n* `help wanted` - More involved changes This will help match your request with others who are looking for a way to get involved.\n\n## Code contributions\n\nCode contributions are welcome in all of our projects as long as you follow a few rules:\n* With any piece of code, please adhere to PEP-8 standards.\n* If you're fixing an issue with an existing piece of code, please make sure all the tests pass, and there is no change in functionality.\n* If you want to add a new feature, please open up an issue first.\n* When adding a new feature, make sure you have relevant test coverage.\n* Any changes to the public API should conform to the current standards, be properly documented, typed, and be intuitive.\n* Your contribution must be received under the project's open source license.\n* You must have permission to make the contribution. We strongly recommend including a Signed-off-by line to indicate your adherence to the [Developer Certificate of Origin](https://developercertificate.org/).\n* All code contributions must be made via PR, and all checks must pass before merging.\n\nWhile not strictly necessary, we encourage you to open an issue prior to your pull request to let the project know to expect your code. This helps the team plan for the next release and may result in your feature being a higher priority, and also decreases the likelihood of two independent contributions that do the same thing.\n\n## Documentation contributions\n\n* Make sure you follow the standards set by the rest of the repo.\n* Be concise, but do not omit details. Verbose documentation is preferred to incomplete documentation.\n\n## Getting started (and helping others find their footing)\n\nAnyone may open an issue and apply a `good first issue` or `help wanted` label for others to work on. We only ask that when someone else picks up your issue and decides to work on it that you be responsive to their questions.\n\n## Getting help\n\nIf you have other questions about this project, please [open an issue](https://github.com/fidelity/mab2rec/issues). To reach the Fidelity OSPO directly, please email [opensource@fmr.com](mailto:opensource@fmr.com).\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "README.md",
    "content": "[![ci](https://github.com/fidelity/mab2rec/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fidelity/mab2rec/actions/workflows/ci.yml) [![PyPI version fury.io](https://badge.fury.io/py/mab2rec.svg)](https://pypi.python.org/pypi/mab2rec/) [![PyPI license](https://img.shields.io/pypi/l/mab2rec.svg)](https://pypi.python.org/pypi/mab2rec/) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Downloads](https://static.pepy.tech/personalized-badge/mab2rec?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pepy.tech/project/mab2rec)\n\n# Mab2Rec: Multi-Armed Bandits Recommender \n\nMab2Rec ([AAAI'24](https://ojs.aaai.org/index.php/AAAI/article/view/30341)) is a Python library for building bandit-based recommendation algorithms. It supports **context-free**, **parametric** and **non-parametric** **contextual** bandit models powered by [MABWiser](https://github.com/fidelity/mabwiser) and fairness and recommenders evaluations powered by [Jurity](https://github.com/fidelity/jurity).\nThe library is designed with rapid experimentation in mind, follows the [PEP-8 standards](https://www.python.org/dev/peps/pep-0008/), and is tested heavily.\n\nMab2Rec is built on top of several other open-source software developed at the AI Center at Fidelity:\n\n* [MABWiser](https://github.com/fidelity/mabwiser) to create multi-armed bandit recommendation algorithms ([Bridge@AAAI'24](http://osullivan.ucc.ie/CPML2024/papers/06.pdf), [TMLR'22](https://openreview.net/pdf?id=sX9d3gfwtE), [IJAIT'21](https://www.worldscientific.com/doi/abs/10.1142/S0218213021500214), [ICTAI'19](https://ieeexplore.ieee.org/document/8995418)).\n* [TextWiser](https://github.com/fidelity/textwiser) to create item representations via text featurization ([AAAI'21](https://ojs.aaai.org/index.php/AAAI/article/view/17814)).\n* [Selective](https://github.com/fidelity/selective) to create user representations via feature selection ([AMAI'24](https://link.springer.com/article/10.1007/s10472-024-09941-x), [CPAIOR'21](https://link.springer.com/chapter/10.1007/978-3-030-78230-6_27), [DSO@IJCAI'21](https://arxiv.org/abs/2112.03105)).\n* [Seq2Pat](https://github.com/fidelity/seq2pat) to create user representations via sequential pattern mining ([AI Magazine'23](https://onlinelibrary.wiley.com/doi/epdf/10.1002/aaai.12081), [AAAI'22](https://ojs.aaai.org/index.php/AAAI/article/view/21542), [Bridge@AAAI'23](http://osullivan.ucc.ie/CPML2023/submissions/09.pdf), [Frontiers'22](https://www.frontiersin.org/articles/10.3389/frai.2022.868085/full), [KDF@AAAI'22](https://arxiv.org/abs/2201.09178), [CMU Blog Post](https://www.cmu.edu/tepper/news/stories/2023/may/fidelity-ai.html))\n* [Jurity](https://github.com/fidelity/jurity) to evaluate recommendations including fairness metrics ([ACM'24](https://dl.acm.org/doi/10.1145/3700145), [LION'23](https://link.springer.com/chapter/10.1007/978-3-031-44505-7_29), [CIKM'22](https://ceur-ws.org/Vol-3318/short6.pdf), [ICMLA'21](https://ieeexplore.ieee.org/abstract/document/9680169)).\n\nAn introduction to **content- and context-aware** recommender systems and an overview of the building blocks of the library is presented at [AAAI 2024](https://underline.io/lecture/91479-building-higher-order-abstractions-from-the-components-of-recommender-systems) and [All Things Open 2021](https://www.youtube.com/watch?v=54d_YUalvOA). There is a corresponding [blogpost](https://2022.allthingsopen.org/introducing-mab2rec-a-multi-armed-bandit-recommender-library/) to serve as a starting point for practioners to build and deploy bandit-based recommenders using Mab2Rec.\n\nDocumentation is available at [fidelity.github.io/mab2rec](https://fidelity.github.io/mab2rec).\n\n## Usage Patterns\n\nMab2Rec supports prototyping with a **single** bandit algorithm or benchmarking with **multiple** bandit algorithms. \nIf you are new user, the best place to start is to experiment with multiple bandits using the [tutorial notebooks](notebooks).\n\n## Quick Start\n\n### Single Recommender\n\n```python\n# Example of how to train an singler recommender to generate top-4 recommendations\n\n# Import \nfrom mab2rec import BanditRecommender, LearningPolicy\nfrom mab2rec.pipeline import train, score\n\n# LinGreedy recommender to select top-4 items with 10% random exploration \nrec = BanditRecommender(LearningPolicy.LinGreedy(epsilon=0.1), top_k=4)\n\n# Train on (user, item, response) interactions in train data using user features \ntrain(rec, data='data/data_train.csv', \n      user_features='data/features_user.csv')\n\n# Score recommendations for users in test data. The output df holds \n# user_id, item_id, score columns for every test user for top-k items \ndf = score(rec, data='data/data_test.csv', \n           user_features='data/features_user.csv')\n```\n\n### Multiple Recommenders\n\n```python\n# Example of how to benchmark multiple recommenders to generate top-4 recommendations\n\nfrom mab2rec import BanditRecommender, LearningPolicy\nfrom mab2rec.pipeline import benchmark\nfrom jurity.recommenders import BinaryRecoMetrics, RankingRecoMetrics\n\n# Recommenders (many more available)\nrecommenders = {\"Random\": BanditRecommender(LearningPolicy.Random()),\n                \"Popularity\": BanditRecommender(LearningPolicy.Popularity()),\n                \"LinGreedy\": BanditRecommender(LearningPolicy.LinGreedy(epsilon=0.1))}\n\n# Column names for the response, user, and item id columns\nmetric_params = {'click_column': 'score', 'user_id_column': 'user_id', 'item_id_column':'item_id'}\n\n# Performance metrics for benchmarking (many more available)\nmetrics = []\nfor top_k in [3, 5, 10]:\n    metrics.append(BinaryRecoMetrics.CTR(**metric_params, k=top_k))\n    metrics.append(RankingRecoMetrics.NDCG(**metric_params, k=top_k))\n\n# Benchmarking with a collection of recommenders and metrics \n# This returns two dictionaries; \n# reco_to_results: recommendations for each algorithm on cross-validation data\n# reco_to_metrics: evaluation metrics for each algorithm\nreco_to_results, reco_to_metrics = benchmark(recommenders,\n                                             metrics=metrics,\n                                             train_data=\"data/data_train.csv\",\n                                             cv=5,\n                                             user_features=\"data/features_user.csv\")\n```\n\n## Usage Examples\n\nWe provide extensive tutorials in the [notebooks](notebooks) folder with guidelines on building recommenders, performing model selection, and evaluating performance.\n\n1. [Data Overview:](https://github.com/fidelity/mab2rec/tree/master/notebooks/1_data_overview.ipynb) Overview of data required to train recommender.\n2. [Feature Engineering:](https://github.com/fidelity/mab2rec/tree/master/notebooks/2_feature_engineering.ipynb) Creating user and item features from structured, unstructured, and sequential data.\n3. [Model Selection:](https://github.com/fidelity/mab2rec/tree/master/notebooks/3_model_selection.ipynb) Model selection by benchmarking recommenders using cross-validation.\n4. [Evaluation:](https://github.com/fidelity/mab2rec/tree/master/notebooks/4_evaluation.ipynb) Benchmarking of selected recommenders and baselines on test data with detailed evaluation.\n5. [Advanced:](https://github.com/fidelity/mab2rec/tree/master/notebooks/5_advanced.ipynb) Demonstration of advanced functionality such as persistency, eligibility, item availability, and memory efficiency.\n\n## Installation\n\nMab2Rec requires **Python 3.8+** and can be installed from PyPI using ``pip install mab2rec`` or by building from source as shown in [installation instructions](https://fidelity.github.io/mab2rec/installation.html).\n\n## Citation\n\nIf you use Mab2Rec in a publication, please cite it as:\n\n```bibtex\n    @inproceedings{DBLP:conf/aaai/KadiogluK24,\n      author       = {Serdar Kadioglu and Bernard Kleynhans},\n      title        = {Building Higher-Order Abstractions from the Components of Recommender Systems},\n      booktitle    = {Thirty-Eighth {AAAI} Conference on Artificial Intelligence, {AAAI} 2024, Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence, {IAAI} 2024, Fourteenth Symposium on Educational Advances in Artificial Intelligence, {EAAI} 2014, February 20-27, 2024, Vancouver, Canada},\n      pages        = {22998--23004},\n      publisher    = {{AAAI} Press},\n      year         = {2024},\n      url          = {https://doi.org/10.1609/aaai.v38i21.30341},\n      doi          = {10.1609/AAAI.V38I21.30341}\n    }\n```\n\n## Support\n\nPlease submit bug reports and feature requests as [Issues](https://github.com/fidelity/mab2rec/issues).\n\n## License\n\nMab2Rec is licensed under the [Apache License 2.0](LICENSE).\n\n<br>\n"
  },
  {
    "path": "docs/.buildinfo",
    "content": "# Sphinx build info version 1\n# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.\nconfig: 8217e7f6830b05122d0f67cec6a6b522\ntags: 645f666f9bcd5a90fca523b33c5a78b7\n"
  },
  {
    "path": "docs/.nojekyll",
    "content": ""
  },
  {
    "path": "docs/_sources/api.rst.txt",
    "content": ".. _Mab2Rec API:\n\nMab2Rec Public API\n==================\n\n.. automodule:: mab2rec\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nBanditRecommender\n^^^^^^^^^^^^^^^^^\n\n.. autoclass:: mab2rec.BanditRecommender\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nLearningPolicy\n^^^^^^^^^^^^^^\n\n.. autoclass:: mab2rec.LearningPolicy\n    :members:\n    :undoc-members:\n\nNeighborhoodPolicy\n^^^^^^^^^^^^^^^^^^\n\n.. autoclass:: mab2rec.NeighborhoodPolicy\n    :members:\n    :undoc-members:\n\nPipeline\n^^^^^^^^\n\n.. automodule:: mab2rec.pipeline\n    :members:\n    :undoc-members:\n\nVisualization\n^^^^^^^^^^^^^\n\n.. automodule:: mab2rec.visualization\n    :members:\n    :undoc-members:\n"
  },
  {
    "path": "docs/_sources/contributing.rst.txt",
    "content": ".. _contributing:\n\nContributing\n============\n\nWe welcome contributions of all from everybody, and we will make an effort\nto respond to any questions and requests. Code is not the only way to make\na contribution!\n\nIf you end up using our library in a project, give us a star on GitHub!\n\nCode Contributions\n^^^^^^^^^^^^^^^^^^\n\n- With any piece of code, please adhere to PEP-8 standards.\n- If you're fixing an issue with an existing piece of code, please make sure all the tests pass, and there is no change in functionality.\n- If you want to add a new feature, please open up an issue first.\n- When adding a new feature, make sure you have relevant test coverage.\n- Any changes to the public API should conform to the current standards, be properly documented, typed, and be intuitive.\n\nDocumentation Contributions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Make sure you follow the standards set by the rest of the repo.\n- Be concise, but do not omit details. Verbose documentation is preferred to incomplete documentation.\n"
  },
  {
    "path": "docs/_sources/examples.rst.txt",
    "content": ".. _examples:\n\nUsage Examples\n==============\n\nWe provide extensive tutorials in Jupyter notebooks under the :repo:`notebooks </tree/main/notebooks>` folder for guidelines on building recommenders, performing model selection, and evaluating performance:\n\n- :repo:`Data Overview </tree/main/notebooks/1_data_overview.ipynb>` provides an overview of data required to train recommender.\n- :repo:`Feature Engineering </tree/main/notebooks/2_feature_engineering.ipynb>` gives an overview of methods to create user and item features from structured, unstructured, and sequential data.\n- :repo:`Model Selection </tree/main/notebooks/3_model_selection.ipynb>` shows to do model selection by benchmarking recommenders using cross-validation.\n- :repo:`Evaluation </tree/main/notebooks/4_evaluation.ipynb>` benchmarks selected recommenders and baselines on test data with detailed evaluations.\n- :repo:`Advanced </tree/main/notebooks/5_advanced.ipynb>` demonstrates some advanced functionality.\n"
  },
  {
    "path": "docs/_sources/index.rst.txt",
    "content": "Mab2Rec: Multi-Armed Bandits Recommender\n========================================\n\nMab2Rec is a Python library for building bandit-based recommendation algorithms. It supports **context-free**, **parametric**\nand **non-parametric** **contextual** bandit models powered by `MABWiser <https://github.com/fidelity/mabwiser>`_ and\nfairness and recommenders evaluations powered by `Jurity <https://github.com/fidelity/jurity>`_.\nIt supports `all bandit policies available in MABWiser <https://github.com/fidelity/mabwiser#available-bandit-policies>`_.\nThe library is designed with rapid experimentation in mind, follows the `PEP-8 standards <https://www.python.org/dev/peps/pep-0008>`_ and is tested heavily.\n\nMab2Rec and several of the open-source software it is built on is developed by the Artificial Intelligence Center at Fidelity Investments, including:\n\n* `MABWiser <https://github.com/fidelity/mabwiser>`_ to create multi-armed bandit recommendation algorithms (`IJAIT'21 <https://www.worldscientific.com/doi/abs/10.1142/S0218213021500214>`_, `ICTAI'19 <https://ieeexplore.ieee.org/document/8995418>`_).\n* `TextWiser <https://github.com/fidelity/textwiser>`_ to create item representations via text featurization (`AAAI'21 <https://ojs.aaai.org/index.php/AAAI/article/view/17814>`_).\n* `Selective <https://github.com/fidelity/selective>`_ to create user representations via feature selection.\n* `Seq2Pat <https://github.com/fidelity/seq2pat>`_ to enhance users representations via sequential pattern mining (`AAAI'22 <https://aaai.org/Conferences/AAAI-22/>`_).\n* `Jurity <https://github.com/fidelity/jurity>`_ to evaluate recommendations including fairness metrics (`ICMLA'21 <https://ieeexplore.ieee.org/abstract/document/9680169>`_).\n\nAn introduction to **content- and context-aware** recommender systems and an overview of the building blocks of the library is `presented at All Things Open 2021 <https://www.youtube.com/watch?v=54d_YUalvOA>`_.\n\n.. include:: quick.rst\n\nSource Code\n===========\nThe source code is hosted on :repo:`GitHub <>`.\n\n.. sidebar:: Contents\n\n   .. toctree::\n    :maxdepth: 2\n\n    installation\n    quick\n    examples\n    contributing\n    api\n\n\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n"
  },
  {
    "path": "docs/_sources/installation.rst.txt",
    "content": ".. _installation:\n\nInstallation\n============\n\n.. admonition:: Installation Options\n\n\tThere are two options to install the library:\n\n\t1. Install from PyPI using the prebuilt wheel package (``pip install mab2rec``)\n\t2. Build from the source code\n\nRequirements\n------------\n\nThe library requires Python **3.7+**. The ``requirements.txt`` lists the necessary\npackages.\n\nSource Code\n-----------\n\nYou can build a wheel package on your platform from scratch using the source code:\n\n.. code-block:: python\n\n\tgit clone https://github.com/fidelity/mab2rec.git\n\tcd mab2rec\n\tpip install setuptools wheel # if wheel is not installed\n\tpython setup.py sdist bdist_wheel\n\tpip install dist/mab2rec-X.X.X-py3-none-any.whl\n\nTest Your Setup\n---------------\n\nTo confirm that cloning was successful, run the tests included in the project.\n\nAll tests should pass.\n\n.. code-block:: python\n\n\tgit clone https://github.com/fidelity/mab2rec.git\n\tcd mab2rec\n\tpython -m unittest discover tests\n\nUpgrade the Library\n-------------------\n\nTo upgrade to the latest version of the library, run ``pip install --upgrade mab2rec``.\n\nIf you installed from the source code:\n\n.. code-block:: python\n\n\tgit pull origin master\n\tpython setup.py sdist bdist_wheel\n\tpip install --upgrade --no-cache-dir dist/mab2rec-X.X.X-py3-none-any.whl\n"
  },
  {
    "path": "docs/_sources/quick.rst.txt",
    "content": ".. _quick:\n\nQuick Start\n===========\n\nIndividual Recommender\n----------------------\n\n.. code-block:: python\n\n    # Example of how to train an individual recommender to generate top-4 recommendations\n\n    # Import\n    from mab2rec import BanditRecommender, LearningPolicy\n    from mab2rec.pipeline import train, score\n\n    # LinGreedy recommender to select top-4 items with 10% random exploration\n    rec = BanditRecommender(LearningPolicy.LinGreedy(epsilon=0.1), top_k=4)\n\n    # Train on (user, item, response) interactions in train data using user features\n    train(rec, data='data/data_train.csv',\n          user_features='data/features_user.csv')\n\n    # Score recommendations for users in test data. The output df holds\n    # user_id, item_id, score columns for every test user for top-k items\n    df = score(rec, data='data/data_test.csv',\n               user_features='data/features_user.csv')\n\nMultiple Recommenders\n---------------------\n\n.. code-block:: python\n\n    # Example of how to benchmark multiple bandit algorithms to generate top-4 recommendations\n\n    from mab2rec import BanditRecommender, LearningPolicy\n    from mab2rec.pipeline import benchmark\n    from jurity.recommenders import BinaryRecoMetrics, RankingRecoMetrics\n\n    # Recommenders (many more available)\n    recommenders = {\"Random\": BanditRecommender(LearningPolicy.Random()),\n                    \"Popularity\": BanditRecommender(LearningPolicy.Popularity()),\n                    \"LinGreedy\": BanditRecommender(LearningPolicy.LinGreedy(epsilon=0.1))}\n\n    # Column names for the response, user, and item id columns\n    metric_params = {'click_column': 'score', 'user_id_column': 'user_id', 'item_id_column':'item_id'}\n\n    # Performance metrics for benchmarking (many more available)\n    metrics = []\n    for top_k in [3, 5, 10]:\n        metrics.append(BinaryRecoMetrics.CTR(**metric_params, k=top_k))\n        metrics.append(RankingRecoMetrics.NDCG(**metric_params, k=top_k))\n\n    # Benchmarking with a collection of recommenders and metrics\n    # This returns two dictionaries;\n    # reco_to_results: recommendations for each algorithm on cross-validation data\n    # reco_to_metrics: evaluation metrics for each algorithm\n    reco_to_results, reco_to_metrics = benchmark(recommenders,\n                                                 metrics=metrics,\n                                                 train_data=\"data/data_train.csv\",\n                                                 cv=5,\n                                                 user_features=\"data/features_user.csv\")\n\n"
  },
  {
    "path": "docs/_static/basic.css",
    "content": "/*\n * basic.css\n * ~~~~~~~~~\n *\n * Sphinx stylesheet -- basic theme.\n *\n * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n/* -- main layout ----------------------------------------------------------- */\n\ndiv.clearer {\n    clear: both;\n}\n\ndiv.section::after {\n    display: block;\n    content: '';\n    clear: left;\n}\n\n/* -- relbar ---------------------------------------------------------------- */\n\ndiv.related {\n    width: 100%;\n    font-size: 90%;\n}\n\ndiv.related h3 {\n    display: none;\n}\n\ndiv.related ul {\n    margin: 0;\n    padding: 0 0 0 10px;\n    list-style: none;\n}\n\ndiv.related li {\n    display: inline;\n}\n\ndiv.related li.right {\n    float: right;\n    margin-right: 5px;\n}\n\n/* -- sidebar --------------------------------------------------------------- */\n\ndiv.sphinxsidebarwrapper {\n    padding: 10px 5px 0 10px;\n}\n\ndiv.sphinxsidebar {\n    float: left;\n    width: 230px;\n    margin-left: -100%;\n    font-size: 90%;\n    word-wrap: break-word;\n    overflow-wrap : break-word;\n}\n\ndiv.sphinxsidebar ul {\n    list-style: none;\n}\n\ndiv.sphinxsidebar ul ul,\ndiv.sphinxsidebar ul.want-points {\n    margin-left: 20px;\n    list-style: square;\n}\n\ndiv.sphinxsidebar ul ul {\n    margin-top: 0;\n    margin-bottom: 0;\n}\n\ndiv.sphinxsidebar form {\n    margin-top: 10px;\n}\n\ndiv.sphinxsidebar input {\n    border: 1px solid #98dbcc;\n    font-family: sans-serif;\n    font-size: 1em;\n}\n\ndiv.sphinxsidebar #searchbox form.search {\n    overflow: hidden;\n}\n\ndiv.sphinxsidebar #searchbox input[type=\"text\"] {\n    float: left;\n    width: 80%;\n    padding: 0.25em;\n    box-sizing: border-box;\n}\n\ndiv.sphinxsidebar #searchbox input[type=\"submit\"] {\n    float: left;\n    width: 20%;\n    border-left: none;\n    padding: 0.25em;\n    box-sizing: border-box;\n}\n\n\nimg {\n    border: 0;\n    max-width: 100%;\n}\n\n/* -- search page ----------------------------------------------------------- */\n\nul.search {\n    margin: 10px 0 0 20px;\n    padding: 0;\n}\n\nul.search li {\n    padding: 5px 0 5px 20px;\n    background-image: url(file.png);\n    background-repeat: no-repeat;\n    background-position: 0 7px;\n}\n\nul.search li a {\n    font-weight: bold;\n}\n\nul.search li p.context {\n    color: #888;\n    margin: 2px 0 0 30px;\n    text-align: left;\n}\n\nul.keywordmatches li.goodmatch a {\n    font-weight: bold;\n}\n\n/* -- index page ------------------------------------------------------------ */\n\ntable.contentstable {\n    width: 90%;\n    margin-left: auto;\n    margin-right: auto;\n}\n\ntable.contentstable p.biglink {\n    line-height: 150%;\n}\n\na.biglink {\n    font-size: 1.3em;\n}\n\nspan.linkdescr {\n    font-style: italic;\n    padding-top: 5px;\n    font-size: 90%;\n}\n\n/* -- general index --------------------------------------------------------- */\n\ntable.indextable {\n    width: 100%;\n}\n\ntable.indextable td {\n    text-align: left;\n    vertical-align: top;\n}\n\ntable.indextable ul {\n    margin-top: 0;\n    margin-bottom: 0;\n    list-style-type: none;\n}\n\ntable.indextable > tbody > tr > td > ul {\n    padding-left: 0em;\n}\n\ntable.indextable tr.pcap {\n    height: 10px;\n}\n\ntable.indextable tr.cap {\n    margin-top: 10px;\n    background-color: #f2f2f2;\n}\n\nimg.toggler {\n    margin-right: 3px;\n    margin-top: 3px;\n    cursor: pointer;\n}\n\ndiv.modindex-jumpbox {\n    border-top: 1px solid #ddd;\n    border-bottom: 1px solid #ddd;\n    margin: 1em 0 1em 0;\n    padding: 0.4em;\n}\n\ndiv.genindex-jumpbox {\n    border-top: 1px solid #ddd;\n    border-bottom: 1px solid #ddd;\n    margin: 1em 0 1em 0;\n    padding: 0.4em;\n}\n\n/* -- domain module index --------------------------------------------------- */\n\ntable.modindextable td {\n    padding: 2px;\n    border-collapse: collapse;\n}\n\n/* -- general body styles --------------------------------------------------- */\n\ndiv.body {\n    min-width: 450px;\n    max-width: 800px;\n}\n\ndiv.body p, div.body dd, div.body li, div.body blockquote {\n    -moz-hyphens: auto;\n    -ms-hyphens: auto;\n    -webkit-hyphens: auto;\n    hyphens: auto;\n}\n\na.headerlink {\n    visibility: hidden;\n}\n\na.brackets:before,\nspan.brackets > a:before{\n    content: \"[\";\n}\n\na.brackets:after,\nspan.brackets > a:after {\n    content: \"]\";\n}\n\nh1:hover > a.headerlink,\nh2:hover > a.headerlink,\nh3:hover > a.headerlink,\nh4:hover > a.headerlink,\nh5:hover > a.headerlink,\nh6:hover > a.headerlink,\ndt:hover > a.headerlink,\ncaption:hover > a.headerlink,\np.caption:hover > a.headerlink,\ndiv.code-block-caption:hover > a.headerlink {\n    visibility: visible;\n}\n\ndiv.body p.caption {\n    text-align: inherit;\n}\n\ndiv.body td {\n    text-align: left;\n}\n\n.first {\n    margin-top: 0 !important;\n}\n\np.rubric {\n    margin-top: 30px;\n    font-weight: bold;\n}\n\nimg.align-left, figure.align-left, .figure.align-left, object.align-left {\n    clear: left;\n    float: left;\n    margin-right: 1em;\n}\n\nimg.align-right, figure.align-right, .figure.align-right, object.align-right {\n    clear: right;\n    float: right;\n    margin-left: 1em;\n}\n\nimg.align-center, figure.align-center, .figure.align-center, object.align-center {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n\nimg.align-default, figure.align-default, .figure.align-default {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n\n.align-left {\n    text-align: left;\n}\n\n.align-center {\n    text-align: center;\n}\n\n.align-default {\n    text-align: center;\n}\n\n.align-right {\n    text-align: right;\n}\n\n/* -- sidebars -------------------------------------------------------------- */\n\ndiv.sidebar,\naside.sidebar {\n    margin: 0 0 0.5em 1em;\n    border: 1px solid #ddb;\n    padding: 7px;\n    background-color: #ffe;\n    width: 40%;\n    float: right;\n    clear: right;\n    overflow-x: auto;\n}\n\np.sidebar-title {\n    font-weight: bold;\n}\n\ndiv.admonition, div.topic, blockquote {\n    clear: left;\n}\n\n/* -- topics ---------------------------------------------------------------- */\n\ndiv.topic {\n    border: 1px solid #ccc;\n    padding: 7px;\n    margin: 10px 0 10px 0;\n}\n\np.topic-title {\n    font-size: 1.1em;\n    font-weight: bold;\n    margin-top: 10px;\n}\n\n/* -- admonitions ----------------------------------------------------------- */\n\ndiv.admonition {\n    margin-top: 10px;\n    margin-bottom: 10px;\n    padding: 7px;\n}\n\ndiv.admonition dt {\n    font-weight: bold;\n}\n\np.admonition-title {\n    margin: 0px 10px 5px 0px;\n    font-weight: bold;\n}\n\ndiv.body p.centered {\n    text-align: center;\n    margin-top: 25px;\n}\n\n/* -- content of sidebars/topics/admonitions -------------------------------- */\n\ndiv.sidebar > :last-child,\naside.sidebar > :last-child,\ndiv.topic > :last-child,\ndiv.admonition > :last-child {\n    margin-bottom: 0;\n}\n\ndiv.sidebar::after,\naside.sidebar::after,\ndiv.topic::after,\ndiv.admonition::after,\nblockquote::after {\n    display: block;\n    content: '';\n    clear: both;\n}\n\n/* -- tables ---------------------------------------------------------------- */\n\ntable.docutils {\n    margin-top: 10px;\n    margin-bottom: 10px;\n    border: 0;\n    border-collapse: collapse;\n}\n\ntable.align-center {\n    margin-left: auto;\n    margin-right: auto;\n}\n\ntable.align-default {\n    margin-left: auto;\n    margin-right: auto;\n}\n\ntable caption span.caption-number {\n    font-style: italic;\n}\n\ntable caption span.caption-text {\n}\n\ntable.docutils td, table.docutils th {\n    padding: 1px 8px 1px 5px;\n    border-top: 0;\n    border-left: 0;\n    border-right: 0;\n    border-bottom: 1px solid #aaa;\n}\n\ntable.footnote td, table.footnote th {\n    border: 0 !important;\n}\n\nth {\n    text-align: left;\n    padding-right: 5px;\n}\n\ntable.citation {\n    border-left: solid 1px gray;\n    margin-left: 1px;\n}\n\ntable.citation td {\n    border-bottom: none;\n}\n\nth > :first-child,\ntd > :first-child {\n    margin-top: 0px;\n}\n\nth > :last-child,\ntd > :last-child {\n    margin-bottom: 0px;\n}\n\n/* -- figures --------------------------------------------------------------- */\n\ndiv.figure, figure {\n    margin: 0.5em;\n    padding: 0.5em;\n}\n\ndiv.figure p.caption, figcaption {\n    padding: 0.3em;\n}\n\ndiv.figure p.caption span.caption-number,\nfigcaption span.caption-number {\n    font-style: italic;\n}\n\ndiv.figure p.caption span.caption-text,\nfigcaption span.caption-text {\n}\n\n/* -- field list styles ----------------------------------------------------- */\n\ntable.field-list td, table.field-list th {\n    border: 0 !important;\n}\n\n.field-list ul {\n    margin: 0;\n    padding-left: 1em;\n}\n\n.field-list p {\n    margin: 0;\n}\n\n.field-name {\n    -moz-hyphens: manual;\n    -ms-hyphens: manual;\n    -webkit-hyphens: manual;\n    hyphens: manual;\n}\n\n/* -- hlist styles ---------------------------------------------------------- */\n\ntable.hlist {\n    margin: 1em 0;\n}\n\ntable.hlist td {\n    vertical-align: top;\n}\n\n/* -- object description styles --------------------------------------------- */\n\n.sig {\n\tfont-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;\n}\n\n.sig-name, code.descname {\n    background-color: transparent;\n    font-weight: bold;\n}\n\n.sig-name {\n\tfont-size: 1.1em;\n}\n\ncode.descname {\n    font-size: 1.2em;\n}\n\n.sig-prename, code.descclassname {\n    background-color: transparent;\n}\n\n.optional {\n    font-size: 1.3em;\n}\n\n.sig-paren {\n    font-size: larger;\n}\n\n.sig-param.n {\n\tfont-style: italic;\n}\n\n/* C++ specific styling */\n\n.sig-inline.c-texpr,\n.sig-inline.cpp-texpr {\n\tfont-family: unset;\n}\n\n.sig.c   .k, .sig.c   .kt,\n.sig.cpp .k, .sig.cpp .kt {\n\tcolor: #0033B3;\n}\n\n.sig.c   .m,\n.sig.cpp .m {\n\tcolor: #1750EB;\n}\n\n.sig.c   .s, .sig.c   .sc,\n.sig.cpp .s, .sig.cpp .sc {\n\tcolor: #067D17;\n}\n\n\n/* -- other body styles ----------------------------------------------------- */\n\nol.arabic {\n    list-style: decimal;\n}\n\nol.loweralpha {\n    list-style: lower-alpha;\n}\n\nol.upperalpha {\n    list-style: upper-alpha;\n}\n\nol.lowerroman {\n    list-style: lower-roman;\n}\n\nol.upperroman {\n    list-style: upper-roman;\n}\n\n:not(li) > ol > li:first-child > :first-child,\n:not(li) > ul > li:first-child > :first-child {\n    margin-top: 0px;\n}\n\n:not(li) > ol > li:last-child > :last-child,\n:not(li) > ul > li:last-child > :last-child {\n    margin-bottom: 0px;\n}\n\nol.simple ol p,\nol.simple ul p,\nul.simple ol p,\nul.simple ul p {\n    margin-top: 0;\n}\n\nol.simple > li:not(:first-child) > p,\nul.simple > li:not(:first-child) > p {\n    margin-top: 0;\n}\n\nol.simple p,\nul.simple p {\n    margin-bottom: 0;\n}\n\ndl.footnote > dt,\ndl.citation > dt {\n    float: left;\n    margin-right: 0.5em;\n}\n\ndl.footnote > dd,\ndl.citation > dd {\n    margin-bottom: 0em;\n}\n\ndl.footnote > dd:after,\ndl.citation > dd:after {\n    content: \"\";\n    clear: both;\n}\n\ndl.field-list {\n    display: grid;\n    grid-template-columns: fit-content(30%) auto;\n}\n\ndl.field-list > dt {\n    font-weight: bold;\n    word-break: break-word;\n    padding-left: 0.5em;\n    padding-right: 5px;\n}\n\ndl.field-list > dt:after {\n    content: \":\";\n}\n\ndl.field-list > dd {\n    padding-left: 0.5em;\n    margin-top: 0em;\n    margin-left: 0em;\n    margin-bottom: 0em;\n}\n\ndl {\n    margin-bottom: 15px;\n}\n\ndd > :first-child {\n    margin-top: 0px;\n}\n\ndd ul, dd table {\n    margin-bottom: 10px;\n}\n\ndd {\n    margin-top: 3px;\n    margin-bottom: 10px;\n    margin-left: 30px;\n}\n\ndl > dd:last-child,\ndl > dd:last-child > :last-child {\n    margin-bottom: 0;\n}\n\ndt:target, span.highlighted {\n    background-color: #fbe54e;\n}\n\nrect.highlighted {\n    fill: #fbe54e;\n}\n\ndl.glossary dt {\n    font-weight: bold;\n    font-size: 1.1em;\n}\n\n.versionmodified {\n    font-style: italic;\n}\n\n.system-message {\n    background-color: #fda;\n    padding: 5px;\n    border: 3px solid red;\n}\n\n.footnote:target  {\n    background-color: #ffa;\n}\n\n.line-block {\n    display: block;\n    margin-top: 1em;\n    margin-bottom: 1em;\n}\n\n.line-block .line-block {\n    margin-top: 0;\n    margin-bottom: 0;\n    margin-left: 1.5em;\n}\n\n.guilabel, .menuselection {\n    font-family: sans-serif;\n}\n\n.accelerator {\n    text-decoration: underline;\n}\n\n.classifier {\n    font-style: oblique;\n}\n\n.classifier:before {\n    font-style: normal;\n    margin: 0 0.5em;\n    content: \":\";\n    display: inline-block;\n}\n\nabbr, acronym {\n    border-bottom: dotted 1px;\n    cursor: help;\n}\n\n/* -- code displays --------------------------------------------------------- */\n\npre {\n    overflow: auto;\n    overflow-y: hidden;  /* fixes display issues on Chrome browsers */\n}\n\npre, div[class*=\"highlight-\"] {\n    clear: both;\n}\n\nspan.pre {\n    -moz-hyphens: none;\n    -ms-hyphens: none;\n    -webkit-hyphens: none;\n    hyphens: none;\n    white-space: nowrap;\n}\n\ndiv[class*=\"highlight-\"] {\n    margin: 1em 0;\n}\n\ntd.linenos pre {\n    border: 0;\n    background-color: transparent;\n    color: #aaa;\n}\n\ntable.highlighttable {\n    display: block;\n}\n\ntable.highlighttable tbody {\n    display: block;\n}\n\ntable.highlighttable tr {\n    display: flex;\n}\n\ntable.highlighttable td {\n    margin: 0;\n    padding: 0;\n}\n\ntable.highlighttable td.linenos {\n    padding-right: 0.5em;\n}\n\ntable.highlighttable td.code {\n    flex: 1;\n    overflow: hidden;\n}\n\n.highlight .hll {\n    display: block;\n}\n\ndiv.highlight pre,\ntable.highlighttable pre {\n    margin: 0;\n}\n\ndiv.code-block-caption + div {\n    margin-top: 0;\n}\n\ndiv.code-block-caption {\n    margin-top: 1em;\n    padding: 2px 5px;\n    font-size: small;\n}\n\ndiv.code-block-caption code {\n    background-color: transparent;\n}\n\ntable.highlighttable td.linenos,\nspan.linenos,\ndiv.highlight span.gp {  /* gp: Generic.Prompt */\n  user-select: none;\n  -webkit-user-select: text; /* Safari fallback only */\n  -webkit-user-select: none; /* Chrome/Safari */\n  -moz-user-select: none; /* Firefox */\n  -ms-user-select: none; /* IE10+ */\n}\n\ndiv.code-block-caption span.caption-number {\n    padding: 0.1em 0.3em;\n    font-style: italic;\n}\n\ndiv.code-block-caption span.caption-text {\n}\n\ndiv.literal-block-wrapper {\n    margin: 1em 0;\n}\n\ncode.xref, a code {\n    background-color: transparent;\n    font-weight: bold;\n}\n\nh1 code, h2 code, h3 code, h4 code, h5 code, h6 code {\n    background-color: transparent;\n}\n\n.viewcode-link {\n    float: right;\n}\n\n.viewcode-back {\n    float: right;\n    font-family: sans-serif;\n}\n\ndiv.viewcode-block:target {\n    margin: -1px -10px;\n    padding: 0 10px;\n}\n\n/* -- math display ---------------------------------------------------------- */\n\nimg.math {\n    vertical-align: middle;\n}\n\ndiv.body div.math p {\n    text-align: center;\n}\n\nspan.eqno {\n    float: right;\n}\n\nspan.eqno a.headerlink {\n    position: absolute;\n    z-index: 1;\n}\n\ndiv.math:hover a.headerlink {\n    visibility: visible;\n}\n\n/* -- printout stylesheet --------------------------------------------------- */\n\n@media print {\n    div.document,\n    div.documentwrapper,\n    div.bodywrapper {\n        margin: 0 !important;\n        width: 100%;\n    }\n\n    div.sphinxsidebar,\n    div.related,\n    div.footer,\n    #top-link {\n        display: none;\n    }\n}"
  },
  {
    "path": "docs/_static/css/badge_only.css",
    "content": ".fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:\"\"}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format(\"embedded-opentype\"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format(\"woff2\"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format(\"woff\"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format(\"truetype\"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format(\"svg\")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:\"\\f02d\"}.fa-caret-down:before,.icon-caret-down:before{content:\"\\f0d7\"}.fa-caret-up:before,.icon-caret-up:before{content:\"\\f0d8\"}.fa-caret-left:before,.icon-caret-left:before{content:\"\\f0d9\"}.fa-caret-right:before,.icon-caret-right:before{content:\"\\f0da\"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:\"\";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}"
  },
  {
    "path": "docs/_static/css/theme.css",
    "content": "html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:\"\";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^=\"#\"]:after,a[href^=\"javascript:\"]:after{content:\"\"}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,.wy-nav-top a,.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:\"\"}.clearfix:after{clear:both}/*!\n *  Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome\n *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format(\"embedded-opentype\"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format(\"woff2\"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format(\"woff\"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format(\"truetype\"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format(\"svg\");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:\"\"}.fa-music:before{content:\"\"}.fa-search:before,.icon-search:before{content:\"\"}.fa-envelope-o:before{content:\"\"}.fa-heart:before{content:\"\"}.fa-star:before{content:\"\"}.fa-star-o:before{content:\"\"}.fa-user:before{content:\"\"}.fa-film:before{content:\"\"}.fa-th-large:before{content:\"\"}.fa-th:before{content:\"\"}.fa-th-list:before{content:\"\"}.fa-check:before{content:\"\"}.fa-close:before,.fa-remove:before,.fa-times:before{content:\"\"}.fa-search-plus:before{content:\"\"}.fa-search-minus:before{content:\"\"}.fa-power-off:before{content:\"\"}.fa-signal:before{content:\"\"}.fa-cog:before,.fa-gear:before{content:\"\"}.fa-trash-o:before{content:\"\"}.fa-home:before,.icon-home:before{content:\"\"}.fa-file-o:before{content:\"\"}.fa-clock-o:before{content:\"\"}.fa-road:before{content:\"\"}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:\"\"}.fa-arrow-circle-o-down:before{content:\"\"}.fa-arrow-circle-o-up:before{content:\"\"}.fa-inbox:before{content:\"\"}.fa-play-circle-o:before{content:\"\"}.fa-repeat:before,.fa-rotate-right:before{content:\"\"}.fa-refresh:before{content:\"\"}.fa-list-alt:before{content:\"\"}.fa-lock:before{content:\"\"}.fa-flag:before{content:\"\"}.fa-headphones:before{content:\"\"}.fa-volume-off:before{content:\"\"}.fa-volume-down:before{content:\"\"}.fa-volume-up:before{content:\"\"}.fa-qrcode:before{content:\"\"}.fa-barcode:before{content:\"\"}.fa-tag:before{content:\"\"}.fa-tags:before{content:\"\"}.fa-book:before,.icon-book:before{content:\"\"}.fa-bookmark:before{content:\"\"}.fa-print:before{content:\"\"}.fa-camera:before{content:\"\"}.fa-font:before{content:\"\"}.fa-bold:before{content:\"\"}.fa-italic:before{content:\"\"}.fa-text-height:before{content:\"\"}.fa-text-width:before{content:\"\"}.fa-align-left:before{content:\"\"}.fa-align-center:before{content:\"\"}.fa-align-right:before{content:\"\"}.fa-align-justify:before{content:\"\"}.fa-list:before{content:\"\"}.fa-dedent:before,.fa-outdent:before{content:\"\"}.fa-indent:before{content:\"\"}.fa-video-camera:before{content:\"\"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:\"\"}.fa-pencil:before{content:\"\"}.fa-map-marker:before{content:\"\"}.fa-adjust:before{content:\"\"}.fa-tint:before{content:\"\"}.fa-edit:before,.fa-pencil-square-o:before{content:\"\"}.fa-share-square-o:before{content:\"\"}.fa-check-square-o:before{content:\"\"}.fa-arrows:before{content:\"\"}.fa-step-backward:before{content:\"\"}.fa-fast-backward:before{content:\"\"}.fa-backward:before{content:\"\"}.fa-play:before{content:\"\"}.fa-pause:before{content:\"\"}.fa-stop:before{content:\"\"}.fa-forward:before{content:\"\"}.fa-fast-forward:before{content:\"\"}.fa-step-forward:before{content:\"\"}.fa-eject:before{content:\"\"}.fa-chevron-left:before{content:\"\"}.fa-chevron-right:before{content:\"\"}.fa-plus-circle:before{content:\"\"}.fa-minus-circle:before{content:\"\"}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:\"\"}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:\"\"}.fa-question-circle:before{content:\"\"}.fa-info-circle:before{content:\"\"}.fa-crosshairs:before{content:\"\"}.fa-times-circle-o:before{content:\"\"}.fa-check-circle-o:before{content:\"\"}.fa-ban:before{content:\"\"}.fa-arrow-left:before{content:\"\"}.fa-arrow-right:before{content:\"\"}.fa-arrow-up:before{content:\"\"}.fa-arrow-down:before{content:\"\"}.fa-mail-forward:before,.fa-share:before{content:\"\"}.fa-expand:before{content:\"\"}.fa-compress:before{content:\"\"}.fa-plus:before{content:\"\"}.fa-minus:before{content:\"\"}.fa-asterisk:before{content:\"\"}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:\"\"}.fa-gift:before{content:\"\"}.fa-leaf:before{content:\"\"}.fa-fire:before,.icon-fire:before{content:\"\"}.fa-eye:before{content:\"\"}.fa-eye-slash:before{content:\"\"}.fa-exclamation-triangle:before,.fa-warning:before{content:\"\"}.fa-plane:before{content:\"\"}.fa-calendar:before{content:\"\"}.fa-random:before{content:\"\"}.fa-comment:before{content:\"\"}.fa-magnet:before{content:\"\"}.fa-chevron-up:before{content:\"\"}.fa-chevron-down:before{content:\"\"}.fa-retweet:before{content:\"\"}.fa-shopping-cart:before{content:\"\"}.fa-folder:before{content:\"\"}.fa-folder-open:before{content:\"\"}.fa-arrows-v:before{content:\"\"}.fa-arrows-h:before{content:\"\"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:\"\"}.fa-twitter-square:before{content:\"\"}.fa-facebook-square:before{content:\"\"}.fa-camera-retro:before{content:\"\"}.fa-key:before{content:\"\"}.fa-cogs:before,.fa-gears:before{content:\"\"}.fa-comments:before{content:\"\"}.fa-thumbs-o-up:before{content:\"\"}.fa-thumbs-o-down:before{content:\"\"}.fa-star-half:before{content:\"\"}.fa-heart-o:before{content:\"\"}.fa-sign-out:before{content:\"\"}.fa-linkedin-square:before{content:\"\"}.fa-thumb-tack:before{content:\"\"}.fa-external-link:before{content:\"\"}.fa-sign-in:before{content:\"\"}.fa-trophy:before{content:\"\"}.fa-github-square:before{content:\"\"}.fa-upload:before{content:\"\"}.fa-lemon-o:before{content:\"\"}.fa-phone:before{content:\"\"}.fa-square-o:before{content:\"\"}.fa-bookmark-o:before{content:\"\"}.fa-phone-square:before{content:\"\"}.fa-twitter:before{content:\"\"}.fa-facebook-f:before,.fa-facebook:before{content:\"\"}.fa-github:before,.icon-github:before{content:\"\"}.fa-unlock:before{content:\"\"}.fa-credit-card:before{content:\"\"}.fa-feed:before,.fa-rss:before{content:\"\"}.fa-hdd-o:before{content:\"\"}.fa-bullhorn:before{content:\"\"}.fa-bell:before{content:\"\"}.fa-certificate:before{content:\"\"}.fa-hand-o-right:before{content:\"\"}.fa-hand-o-left:before{content:\"\"}.fa-hand-o-up:before{content:\"\"}.fa-hand-o-down:before{content:\"\"}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:\"\"}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:\"\"}.fa-arrow-circle-up:before{content:\"\"}.fa-arrow-circle-down:before{content:\"\"}.fa-globe:before{content:\"\"}.fa-wrench:before{content:\"\"}.fa-tasks:before{content:\"\"}.fa-filter:before{content:\"\"}.fa-briefcase:before{content:\"\"}.fa-arrows-alt:before{content:\"\"}.fa-group:before,.fa-users:before{content:\"\"}.fa-chain:before,.fa-link:before,.icon-link:before{content:\"\"}.fa-cloud:before{content:\"\"}.fa-flask:before{content:\"\"}.fa-cut:before,.fa-scissors:before{content:\"\"}.fa-copy:before,.fa-files-o:before{content:\"\"}.fa-paperclip:before{content:\"\"}.fa-floppy-o:before,.fa-save:before{content:\"\"}.fa-square:before{content:\"\"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:\"\"}.fa-list-ul:before{content:\"\"}.fa-list-ol:before{content:\"\"}.fa-strikethrough:before{content:\"\"}.fa-underline:before{content:\"\"}.fa-table:before{content:\"\"}.fa-magic:before{content:\"\"}.fa-truck:before{content:\"\"}.fa-pinterest:before{content:\"\"}.fa-pinterest-square:before{content:\"\"}.fa-google-plus-square:before{content:\"\"}.fa-google-plus:before{content:\"\"}.fa-money:before{content:\"\"}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:\"\"}.fa-caret-up:before{content:\"\"}.fa-caret-left:before{content:\"\"}.fa-caret-right:before{content:\"\"}.fa-columns:before{content:\"\"}.fa-sort:before,.fa-unsorted:before{content:\"\"}.fa-sort-desc:before,.fa-sort-down:before{content:\"\"}.fa-sort-asc:before,.fa-sort-up:before{content:\"\"}.fa-envelope:before{content:\"\"}.fa-linkedin:before{content:\"\"}.fa-rotate-left:before,.fa-undo:before{content:\"\"}.fa-gavel:before,.fa-legal:before{content:\"\"}.fa-dashboard:before,.fa-tachometer:before{content:\"\"}.fa-comment-o:before{content:\"\"}.fa-comments-o:before{content:\"\"}.fa-bolt:before,.fa-flash:before{content:\"\"}.fa-sitemap:before{content:\"\"}.fa-umbrella:before{content:\"\"}.fa-clipboard:before,.fa-paste:before{content:\"\"}.fa-lightbulb-o:before{content:\"\"}.fa-exchange:before{content:\"\"}.fa-cloud-download:before{content:\"\"}.fa-cloud-upload:before{content:\"\"}.fa-user-md:before{content:\"\"}.fa-stethoscope:before{content:\"\"}.fa-suitcase:before{content:\"\"}.fa-bell-o:before{content:\"\"}.fa-coffee:before{content:\"\"}.fa-cutlery:before{content:\"\"}.fa-file-text-o:before{content:\"\"}.fa-building-o:before{content:\"\"}.fa-hospital-o:before{content:\"\"}.fa-ambulance:before{content:\"\"}.fa-medkit:before{content:\"\"}.fa-fighter-jet:before{content:\"\"}.fa-beer:before{content:\"\"}.fa-h-square:before{content:\"\"}.fa-plus-square:before{content:\"\"}.fa-angle-double-left:before{content:\"\"}.fa-angle-double-right:before{content:\"\"}.fa-angle-double-up:before{content:\"\"}.fa-angle-double-down:before{content:\"\"}.fa-angle-left:before{content:\"\"}.fa-angle-right:before{content:\"\"}.fa-angle-up:before{content:\"\"}.fa-angle-down:before{content:\"\"}.fa-desktop:before{content:\"\"}.fa-laptop:before{content:\"\"}.fa-tablet:before{content:\"\"}.fa-mobile-phone:before,.fa-mobile:before{content:\"\"}.fa-circle-o:before{content:\"\"}.fa-quote-left:before{content:\"\"}.fa-quote-right:before{content:\"\"}.fa-spinner:before{content:\"\"}.fa-circle:before{content:\"\"}.fa-mail-reply:before,.fa-reply:before{content:\"\"}.fa-github-alt:before{content:\"\"}.fa-folder-o:before{content:\"\"}.fa-folder-open-o:before{content:\"\"}.fa-smile-o:before{content:\"\"}.fa-frown-o:before{content:\"\"}.fa-meh-o:before{content:\"\"}.fa-gamepad:before{content:\"\"}.fa-keyboard-o:before{content:\"\"}.fa-flag-o:before{content:\"\"}.fa-flag-checkered:before{content:\"\"}.fa-terminal:before{content:\"\"}.fa-code:before{content:\"\"}.fa-mail-reply-all:before,.fa-reply-all:before{content:\"\"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:\"\"}.fa-location-arrow:before{content:\"\"}.fa-crop:before{content:\"\"}.fa-code-fork:before{content:\"\"}.fa-chain-broken:before,.fa-unlink:before{content:\"\"}.fa-question:before{content:\"\"}.fa-info:before{content:\"\"}.fa-exclamation:before{content:\"\"}.fa-superscript:before{content:\"\"}.fa-subscript:before{content:\"\"}.fa-eraser:before{content:\"\"}.fa-puzzle-piece:before{content:\"\"}.fa-microphone:before{content:\"\"}.fa-microphone-slash:before{content:\"\"}.fa-shield:before{content:\"\"}.fa-calendar-o:before{content:\"\"}.fa-fire-extinguisher:before{content:\"\"}.fa-rocket:before{content:\"\"}.fa-maxcdn:before{content:\"\"}.fa-chevron-circle-left:before{content:\"\"}.fa-chevron-circle-right:before{content:\"\"}.fa-chevron-circle-up:before{content:\"\"}.fa-chevron-circle-down:before{content:\"\"}.fa-html5:before{content:\"\"}.fa-css3:before{content:\"\"}.fa-anchor:before{content:\"\"}.fa-unlock-alt:before{content:\"\"}.fa-bullseye:before{content:\"\"}.fa-ellipsis-h:before{content:\"\"}.fa-ellipsis-v:before{content:\"\"}.fa-rss-square:before{content:\"\"}.fa-play-circle:before{content:\"\"}.fa-ticket:before{content:\"\"}.fa-minus-square:before{content:\"\"}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:\"\"}.fa-level-up:before{content:\"\"}.fa-level-down:before{content:\"\"}.fa-check-square:before{content:\"\"}.fa-pencil-square:before{content:\"\"}.fa-external-link-square:before{content:\"\"}.fa-share-square:before{content:\"\"}.fa-compass:before{content:\"\"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:\"\"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:\"\"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:\"\"}.fa-eur:before,.fa-euro:before{content:\"\"}.fa-gbp:before{content:\"\"}.fa-dollar:before,.fa-usd:before{content:\"\"}.fa-inr:before,.fa-rupee:before{content:\"\"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:\"\"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:\"\"}.fa-krw:before,.fa-won:before{content:\"\"}.fa-bitcoin:before,.fa-btc:before{content:\"\"}.fa-file:before{content:\"\"}.fa-file-text:before{content:\"\"}.fa-sort-alpha-asc:before{content:\"\"}.fa-sort-alpha-desc:before{content:\"\"}.fa-sort-amount-asc:before{content:\"\"}.fa-sort-amount-desc:before{content:\"\"}.fa-sort-numeric-asc:before{content:\"\"}.fa-sort-numeric-desc:before{content:\"\"}.fa-thumbs-up:before{content:\"\"}.fa-thumbs-down:before{content:\"\"}.fa-youtube-square:before{content:\"\"}.fa-youtube:before{content:\"\"}.fa-xing:before{content:\"\"}.fa-xing-square:before{content:\"\"}.fa-youtube-play:before{content:\"\"}.fa-dropbox:before{content:\"\"}.fa-stack-overflow:before{content:\"\"}.fa-instagram:before{content:\"\"}.fa-flickr:before{content:\"\"}.fa-adn:before{content:\"\"}.fa-bitbucket:before,.icon-bitbucket:before{content:\"\"}.fa-bitbucket-square:before{content:\"\"}.fa-tumblr:before{content:\"\"}.fa-tumblr-square:before{content:\"\"}.fa-long-arrow-down:before{content:\"\"}.fa-long-arrow-up:before{content:\"\"}.fa-long-arrow-left:before{content:\"\"}.fa-long-arrow-right:before{content:\"\"}.fa-apple:before{content:\"\"}.fa-windows:before{content:\"\"}.fa-android:before{content:\"\"}.fa-linux:before{content:\"\"}.fa-dribbble:before{content:\"\"}.fa-skype:before{content:\"\"}.fa-foursquare:before{content:\"\"}.fa-trello:before{content:\"\"}.fa-female:before{content:\"\"}.fa-male:before{content:\"\"}.fa-gittip:before,.fa-gratipay:before{content:\"\"}.fa-sun-o:before{content:\"\"}.fa-moon-o:before{content:\"\"}.fa-archive:before{content:\"\"}.fa-bug:before{content:\"\"}.fa-vk:before{content:\"\"}.fa-weibo:before{content:\"\"}.fa-renren:before{content:\"\"}.fa-pagelines:before{content:\"\"}.fa-stack-exchange:before{content:\"\"}.fa-arrow-circle-o-right:before{content:\"\"}.fa-arrow-circle-o-left:before{content:\"\"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:\"\"}.fa-dot-circle-o:before{content:\"\"}.fa-wheelchair:before{content:\"\"}.fa-vimeo-square:before{content:\"\"}.fa-try:before,.fa-turkish-lira:before{content:\"\"}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:\"\"}.fa-space-shuttle:before{content:\"\"}.fa-slack:before{content:\"\"}.fa-envelope-square:before{content:\"\"}.fa-wordpress:before{content:\"\"}.fa-openid:before{content:\"\"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:\"\"}.fa-graduation-cap:before,.fa-mortar-board:before{content:\"\"}.fa-yahoo:before{content:\"\"}.fa-google:before{content:\"\"}.fa-reddit:before{content:\"\"}.fa-reddit-square:before{content:\"\"}.fa-stumbleupon-circle:before{content:\"\"}.fa-stumbleupon:before{content:\"\"}.fa-delicious:before{content:\"\"}.fa-digg:before{content:\"\"}.fa-pied-piper-pp:before{content:\"\"}.fa-pied-piper-alt:before{content:\"\"}.fa-drupal:before{content:\"\"}.fa-joomla:before{content:\"\"}.fa-language:before{content:\"\"}.fa-fax:before{content:\"\"}.fa-building:before{content:\"\"}.fa-child:before{content:\"\"}.fa-paw:before{content:\"\"}.fa-spoon:before{content:\"\"}.fa-cube:before{content:\"\"}.fa-cubes:before{content:\"\"}.fa-behance:before{content:\"\"}.fa-behance-square:before{content:\"\"}.fa-steam:before{content:\"\"}.fa-steam-square:before{content:\"\"}.fa-recycle:before{content:\"\"}.fa-automobile:before,.fa-car:before{content:\"\"}.fa-cab:before,.fa-taxi:before{content:\"\"}.fa-tree:before{content:\"\"}.fa-spotify:before{content:\"\"}.fa-deviantart:before{content:\"\"}.fa-soundcloud:before{content:\"\"}.fa-database:before{content:\"\"}.fa-file-pdf-o:before{content:\"\"}.fa-file-word-o:before{content:\"\"}.fa-file-excel-o:before{content:\"\"}.fa-file-powerpoint-o:before{content:\"\"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:\"\"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:\"\"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:\"\"}.fa-file-movie-o:before,.fa-file-video-o:before{content:\"\"}.fa-file-code-o:before{content:\"\"}.fa-vine:before{content:\"\"}.fa-codepen:before{content:\"\"}.fa-jsfiddle:before{content:\"\"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:\"\"}.fa-circle-o-notch:before{content:\"\"}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:\"\"}.fa-empire:before,.fa-ge:before{content:\"\"}.fa-git-square:before{content:\"\"}.fa-git:before{content:\"\"}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:\"\"}.fa-tencent-weibo:before{content:\"\"}.fa-qq:before{content:\"\"}.fa-wechat:before,.fa-weixin:before{content:\"\"}.fa-paper-plane:before,.fa-send:before{content:\"\"}.fa-paper-plane-o:before,.fa-send-o:before{content:\"\"}.fa-history:before{content:\"\"}.fa-circle-thin:before{content:\"\"}.fa-header:before{content:\"\"}.fa-paragraph:before{content:\"\"}.fa-sliders:before{content:\"\"}.fa-share-alt:before{content:\"\"}.fa-share-alt-square:before{content:\"\"}.fa-bomb:before{content:\"\"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:\"\"}.fa-tty:before{content:\"\"}.fa-binoculars:before{content:\"\"}.fa-plug:before{content:\"\"}.fa-slideshare:before{content:\"\"}.fa-twitch:before{content:\"\"}.fa-yelp:before{content:\"\"}.fa-newspaper-o:before{content:\"\"}.fa-wifi:before{content:\"\"}.fa-calculator:before{content:\"\"}.fa-paypal:before{content:\"\"}.fa-google-wallet:before{content:\"\"}.fa-cc-visa:before{content:\"\"}.fa-cc-mastercard:before{content:\"\"}.fa-cc-discover:before{content:\"\"}.fa-cc-amex:before{content:\"\"}.fa-cc-paypal:before{content:\"\"}.fa-cc-stripe:before{content:\"\"}.fa-bell-slash:before{content:\"\"}.fa-bell-slash-o:before{content:\"\"}.fa-trash:before{content:\"\"}.fa-copyright:before{content:\"\"}.fa-at:before{content:\"\"}.fa-eyedropper:before{content:\"\"}.fa-paint-brush:before{content:\"\"}.fa-birthday-cake:before{content:\"\"}.fa-area-chart:before{content:\"\"}.fa-pie-chart:before{content:\"\"}.fa-line-chart:before{content:\"\"}.fa-lastfm:before{content:\"\"}.fa-lastfm-square:before{content:\"\"}.fa-toggle-off:before{content:\"\"}.fa-toggle-on:before{content:\"\"}.fa-bicycle:before{content:\"\"}.fa-bus:before{content:\"\"}.fa-ioxhost:before{content:\"\"}.fa-angellist:before{content:\"\"}.fa-cc:before{content:\"\"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:\"\"}.fa-meanpath:before{content:\"\"}.fa-buysellads:before{content:\"\"}.fa-connectdevelop:before{content:\"\"}.fa-dashcube:before{content:\"\"}.fa-forumbee:before{content:\"\"}.fa-leanpub:before{content:\"\"}.fa-sellsy:before{content:\"\"}.fa-shirtsinbulk:before{content:\"\"}.fa-simplybuilt:before{content:\"\"}.fa-skyatlas:before{content:\"\"}.fa-cart-plus:before{content:\"\"}.fa-cart-arrow-down:before{content:\"\"}.fa-diamond:before{content:\"\"}.fa-ship:before{content:\"\"}.fa-user-secret:before{content:\"\"}.fa-motorcycle:before{content:\"\"}.fa-street-view:before{content:\"\"}.fa-heartbeat:before{content:\"\"}.fa-venus:before{content:\"\"}.fa-mars:before{content:\"\"}.fa-mercury:before{content:\"\"}.fa-intersex:before,.fa-transgender:before{content:\"\"}.fa-transgender-alt:before{content:\"\"}.fa-venus-double:before{content:\"\"}.fa-mars-double:before{content:\"\"}.fa-venus-mars:before{content:\"\"}.fa-mars-stroke:before{content:\"\"}.fa-mars-stroke-v:before{content:\"\"}.fa-mars-stroke-h:before{content:\"\"}.fa-neuter:before{content:\"\"}.fa-genderless:before{content:\"\"}.fa-facebook-official:before{content:\"\"}.fa-pinterest-p:before{content:\"\"}.fa-whatsapp:before{content:\"\"}.fa-server:before{content:\"\"}.fa-user-plus:before{content:\"\"}.fa-user-times:before{content:\"\"}.fa-bed:before,.fa-hotel:before{content:\"\"}.fa-viacoin:before{content:\"\"}.fa-train:before{content:\"\"}.fa-subway:before{content:\"\"}.fa-medium:before{content:\"\"}.fa-y-combinator:before,.fa-yc:before{content:\"\"}.fa-optin-monster:before{content:\"\"}.fa-opencart:before{content:\"\"}.fa-expeditedssl:before{content:\"\"}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:\"\"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:\"\"}.fa-battery-2:before,.fa-battery-half:before{content:\"\"}.fa-battery-1:before,.fa-battery-quarter:before{content:\"\"}.fa-battery-0:before,.fa-battery-empty:before{content:\"\"}.fa-mouse-pointer:before{content:\"\"}.fa-i-cursor:before{content:\"\"}.fa-object-group:before{content:\"\"}.fa-object-ungroup:before{content:\"\"}.fa-sticky-note:before{content:\"\"}.fa-sticky-note-o:before{content:\"\"}.fa-cc-jcb:before{content:\"\"}.fa-cc-diners-club:before{content:\"\"}.fa-clone:before{content:\"\"}.fa-balance-scale:before{content:\"\"}.fa-hourglass-o:before{content:\"\"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:\"\"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:\"\"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:\"\"}.fa-hourglass:before{content:\"\"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:\"\"}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:\"\"}.fa-hand-scissors-o:before{content:\"\"}.fa-hand-lizard-o:before{content:\"\"}.fa-hand-spock-o:before{content:\"\"}.fa-hand-pointer-o:before{content:\"\"}.fa-hand-peace-o:before{content:\"\"}.fa-trademark:before{content:\"\"}.fa-registered:before{content:\"\"}.fa-creative-commons:before{content:\"\"}.fa-gg:before{content:\"\"}.fa-gg-circle:before{content:\"\"}.fa-tripadvisor:before{content:\"\"}.fa-odnoklassniki:before{content:\"\"}.fa-odnoklassniki-square:before{content:\"\"}.fa-get-pocket:before{content:\"\"}.fa-wikipedia-w:before{content:\"\"}.fa-safari:before{content:\"\"}.fa-chrome:before{content:\"\"}.fa-firefox:before{content:\"\"}.fa-opera:before{content:\"\"}.fa-internet-explorer:before{content:\"\"}.fa-television:before,.fa-tv:before{content:\"\"}.fa-contao:before{content:\"\"}.fa-500px:before{content:\"\"}.fa-amazon:before{content:\"\"}.fa-calendar-plus-o:before{content:\"\"}.fa-calendar-minus-o:before{content:\"\"}.fa-calendar-times-o:before{content:\"\"}.fa-calendar-check-o:before{content:\"\"}.fa-industry:before{content:\"\"}.fa-map-pin:before{content:\"\"}.fa-map-signs:before{content:\"\"}.fa-map-o:before{content:\"\"}.fa-map:before{content:\"\"}.fa-commenting:before{content:\"\"}.fa-commenting-o:before{content:\"\"}.fa-houzz:before{content:\"\"}.fa-vimeo:before{content:\"\"}.fa-black-tie:before{content:\"\"}.fa-fonticons:before{content:\"\"}.fa-reddit-alien:before{content:\"\"}.fa-edge:before{content:\"\"}.fa-credit-card-alt:before{content:\"\"}.fa-codiepie:before{content:\"\"}.fa-modx:before{content:\"\"}.fa-fort-awesome:before{content:\"\"}.fa-usb:before{content:\"\"}.fa-product-hunt:before{content:\"\"}.fa-mixcloud:before{content:\"\"}.fa-scribd:before{content:\"\"}.fa-pause-circle:before{content:\"\"}.fa-pause-circle-o:before{content:\"\"}.fa-stop-circle:before{content:\"\"}.fa-stop-circle-o:before{content:\"\"}.fa-shopping-bag:before{content:\"\"}.fa-shopping-basket:before{content:\"\"}.fa-hashtag:before{content:\"\"}.fa-bluetooth:before{content:\"\"}.fa-bluetooth-b:before{content:\"\"}.fa-percent:before{content:\"\"}.fa-gitlab:before,.icon-gitlab:before{content:\"\"}.fa-wpbeginner:before{content:\"\"}.fa-wpforms:before{content:\"\"}.fa-envira:before{content:\"\"}.fa-universal-access:before{content:\"\"}.fa-wheelchair-alt:before{content:\"\"}.fa-question-circle-o:before{content:\"\"}.fa-blind:before{content:\"\"}.fa-audio-description:before{content:\"\"}.fa-volume-control-phone:before{content:\"\"}.fa-braille:before{content:\"\"}.fa-assistive-listening-systems:before{content:\"\"}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:\"\"}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:\"\"}.fa-glide:before{content:\"\"}.fa-glide-g:before{content:\"\"}.fa-sign-language:before,.fa-signing:before{content:\"\"}.fa-low-vision:before{content:\"\"}.fa-viadeo:before{content:\"\"}.fa-viadeo-square:before{content:\"\"}.fa-snapchat:before{content:\"\"}.fa-snapchat-ghost:before{content:\"\"}.fa-snapchat-square:before{content:\"\"}.fa-pied-piper:before{content:\"\"}.fa-first-order:before{content:\"\"}.fa-yoast:before{content:\"\"}.fa-themeisle:before{content:\"\"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:\"\"}.fa-fa:before,.fa-font-awesome:before{content:\"\"}.fa-handshake-o:before{content:\"\"}.fa-envelope-open:before{content:\"\"}.fa-envelope-open-o:before{content:\"\"}.fa-linode:before{content:\"\"}.fa-address-book:before{content:\"\"}.fa-address-book-o:before{content:\"\"}.fa-address-card:before,.fa-vcard:before{content:\"\"}.fa-address-card-o:before,.fa-vcard-o:before{content:\"\"}.fa-user-circle:before{content:\"\"}.fa-user-circle-o:before{content:\"\"}.fa-user-o:before{content:\"\"}.fa-id-badge:before{content:\"\"}.fa-drivers-license:before,.fa-id-card:before{content:\"\"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:\"\"}.fa-quora:before{content:\"\"}.fa-free-code-camp:before{content:\"\"}.fa-telegram:before{content:\"\"}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:\"\"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:\"\"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:\"\"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:\"\"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:\"\"}.fa-shower:before{content:\"\"}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:\"\"}.fa-podcast:before{content:\"\"}.fa-window-maximize:before{content:\"\"}.fa-window-minimize:before{content:\"\"}.fa-window-restore:before{content:\"\"}.fa-times-rectangle:before,.fa-window-close:before{content:\"\"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:\"\"}.fa-bandcamp:before{content:\"\"}.fa-grav:before{content:\"\"}.fa-etsy:before{content:\"\"}.fa-imdb:before{content:\"\"}.fa-ravelry:before{content:\"\"}.fa-eercast:before{content:\"\"}.fa-microchip:before{content:\"\"}.fa-snowflake-o:before{content:\"\"}.fa-superpowers:before{content:\"\"}.fa-wpexplorer:before{content:\"\"}.fa-meetup:before{content:\"\"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:\"\"}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:\" \";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:\"\"}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:\" *\";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:\"\";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:\"\"}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs li{display:inline-block}.wy-breadcrumbs li.wy-breadcrumbs-aside{float:right}.wy-breadcrumbs li a{display:inline-block;padding:5px}.wy-breadcrumbs li a:first-child{padding-left:0}.rst-content .wy-breadcrumbs li tt,.wy-breadcrumbs li .rst-content tt,.wy-breadcrumbs li code{padding:5px;border:none;background:none}.rst-content .wy-breadcrumbs li tt.literal,.wy-breadcrumbs li .rst-content tt.literal,.wy-breadcrumbs li code.literal{color:#404040}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:\"\"}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:\"\"}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:\"\"}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:\"\"}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:\"\"}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:\"\\f08e\";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:\" : \"}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.field-list>dt:after,html.writer-html5 .rst-content dl.footnote>dt:after{content:\":\"}html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.footnote>dt>span.brackets{margin-right:.5rem}html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:\"[\"}html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:\"]\"}html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{font-style:italic}html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.footnote>dd p,html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{font-size:inherit;line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format(\"woff2\"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format(\"woff\");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format(\"woff2\"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format(\"woff\");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format(\"woff2\"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format(\"woff\");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format(\"woff2\"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format(\"woff\");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format(\"woff2\"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format(\"woff\");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format(\"woff2\"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format(\"woff\");font-display:block}"
  },
  {
    "path": "docs/_static/doctools.js",
    "content": "/*\n * doctools.js\n * ~~~~~~~~~~~\n *\n * Sphinx JavaScript utilities for all documentation.\n *\n * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n/**\n * select a different prefix for underscore\n */\n$u = _.noConflict();\n\n/**\n * make the code below compatible with browsers without\n * an installed firebug like debugger\nif (!window.console || !console.firebug) {\n  var names = [\"log\", \"debug\", \"info\", \"warn\", \"error\", \"assert\", \"dir\",\n    \"dirxml\", \"group\", \"groupEnd\", \"time\", \"timeEnd\", \"count\", \"trace\",\n    \"profile\", \"profileEnd\"];\n  window.console = {};\n  for (var i = 0; i < names.length; ++i)\n    window.console[names[i]] = function() {};\n}\n */\n\n/**\n * small helper function to urldecode strings\n *\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL\n */\njQuery.urldecode = function(x) {\n  if (!x) {\n    return x\n  }\n  return decodeURIComponent(x.replace(/\\+/g, ' '));\n};\n\n/**\n * small helper function to urlencode strings\n */\njQuery.urlencode = encodeURIComponent;\n\n/**\n * This function returns the parsed url parameters of the\n * current request. Multiple values per key are supported,\n * it will always return arrays of strings for the value parts.\n */\njQuery.getQueryParameters = function(s) {\n  if (typeof s === 'undefined')\n    s = document.location.search;\n  var parts = s.substr(s.indexOf('?') + 1).split('&');\n  var result = {};\n  for (var i = 0; i < parts.length; i++) {\n    var tmp = parts[i].split('=', 2);\n    var key = jQuery.urldecode(tmp[0]);\n    var value = jQuery.urldecode(tmp[1]);\n    if (key in result)\n      result[key].push(value);\n    else\n      result[key] = [value];\n  }\n  return result;\n};\n\n/**\n * highlight a given string on a jquery object by wrapping it in\n * span elements with the given class name.\n */\njQuery.fn.highlightText = function(text, className) {\n  function highlight(node, addItems) {\n    if (node.nodeType === 3) {\n      var val = node.nodeValue;\n      var pos = val.toLowerCase().indexOf(text);\n      if (pos >= 0 &&\n          !jQuery(node.parentNode).hasClass(className) &&\n          !jQuery(node.parentNode).hasClass(\"nohighlight\")) {\n        var span;\n        var isInSVG = jQuery(node).closest(\"body, svg, foreignObject\").is(\"svg\");\n        if (isInSVG) {\n          span = document.createElementNS(\"http://www.w3.org/2000/svg\", \"tspan\");\n        } else {\n          span = document.createElement(\"span\");\n          span.className = className;\n        }\n        span.appendChild(document.createTextNode(val.substr(pos, text.length)));\n        node.parentNode.insertBefore(span, node.parentNode.insertBefore(\n          document.createTextNode(val.substr(pos + text.length)),\n          node.nextSibling));\n        node.nodeValue = val.substr(0, pos);\n        if (isInSVG) {\n          var rect = document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n          var bbox = node.parentElement.getBBox();\n          rect.x.baseVal.value = bbox.x;\n          rect.y.baseVal.value = bbox.y;\n          rect.width.baseVal.value = bbox.width;\n          rect.height.baseVal.value = bbox.height;\n          rect.setAttribute('class', className);\n          addItems.push({\n              \"parent\": node.parentNode,\n              \"target\": rect});\n        }\n      }\n    }\n    else if (!jQuery(node).is(\"button, select, textarea\")) {\n      jQuery.each(node.childNodes, function() {\n        highlight(this, addItems);\n      });\n    }\n  }\n  var addItems = [];\n  var result = this.each(function() {\n    highlight(this, addItems);\n  });\n  for (var i = 0; i < addItems.length; ++i) {\n    jQuery(addItems[i].parent).before(addItems[i].target);\n  }\n  return result;\n};\n\n/*\n * backward compatibility for jQuery.browser\n * This will be supported until firefox bug is fixed.\n */\nif (!jQuery.browser) {\n  jQuery.uaMatch = function(ua) {\n    ua = ua.toLowerCase();\n\n    var match = /(chrome)[ \\/]([\\w.]+)/.exec(ua) ||\n      /(webkit)[ \\/]([\\w.]+)/.exec(ua) ||\n      /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(ua) ||\n      /(msie) ([\\w.]+)/.exec(ua) ||\n      ua.indexOf(\"compatible\") < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) ||\n      [];\n\n    return {\n      browser: match[ 1 ] || \"\",\n      version: match[ 2 ] || \"0\"\n    };\n  };\n  jQuery.browser = {};\n  jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;\n}\n\n/**\n * Small JavaScript module for the documentation.\n */\nvar Documentation = {\n\n  init : function() {\n    this.fixFirefoxAnchorBug();\n    this.highlightSearchWords();\n    this.initIndexTable();\n    if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {\n      this.initOnKeyListeners();\n    }\n  },\n\n  /**\n   * i18n support\n   */\n  TRANSLATIONS : {},\n  PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },\n  LOCALE : 'unknown',\n\n  // gettext and ngettext don't access this so that the functions\n  // can safely bound to a different name (_ = Documentation.gettext)\n  gettext : function(string) {\n    var translated = Documentation.TRANSLATIONS[string];\n    if (typeof translated === 'undefined')\n      return string;\n    return (typeof translated === 'string') ? translated : translated[0];\n  },\n\n  ngettext : function(singular, plural, n) {\n    var translated = Documentation.TRANSLATIONS[singular];\n    if (typeof translated === 'undefined')\n      return (n == 1) ? singular : plural;\n    return translated[Documentation.PLURALEXPR(n)];\n  },\n\n  addTranslations : function(catalog) {\n    for (var key in catalog.messages)\n      this.TRANSLATIONS[key] = catalog.messages[key];\n    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');\n    this.LOCALE = catalog.locale;\n  },\n\n  /**\n   * add context elements like header anchor links\n   */\n  addContextElements : function() {\n    $('div[id] > :header:first').each(function() {\n      $('<a class=\"headerlink\">\\u00B6</a>').\n      attr('href', '#' + this.id).\n      attr('title', _('Permalink to this headline')).\n      appendTo(this);\n    });\n    $('dt[id]').each(function() {\n      $('<a class=\"headerlink\">\\u00B6</a>').\n      attr('href', '#' + this.id).\n      attr('title', _('Permalink to this definition')).\n      appendTo(this);\n    });\n  },\n\n  /**\n   * workaround a firefox stupidity\n   * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075\n   */\n  fixFirefoxAnchorBug : function() {\n    if (document.location.hash && $.browser.mozilla)\n      window.setTimeout(function() {\n        document.location.href += '';\n      }, 10);\n  },\n\n  /**\n   * highlight the search words provided in the url in the text\n   */\n  highlightSearchWords : function() {\n    var params = $.getQueryParameters();\n    var terms = (params.highlight) ? params.highlight[0].split(/\\s+/) : [];\n    if (terms.length) {\n      var body = $('div.body');\n      if (!body.length) {\n        body = $('body');\n      }\n      window.setTimeout(function() {\n        $.each(terms, function() {\n          body.highlightText(this.toLowerCase(), 'highlighted');\n        });\n      }, 10);\n      $('<p class=\"highlight-link\"><a href=\"javascript:Documentation.' +\n        'hideSearchWords()\">' + _('Hide Search Matches') + '</a></p>')\n          .appendTo($('#searchbox'));\n    }\n  },\n\n  /**\n   * init the domain index toggle buttons\n   */\n  initIndexTable : function() {\n    var togglers = $('img.toggler').click(function() {\n      var src = $(this).attr('src');\n      var idnum = $(this).attr('id').substr(7);\n      $('tr.cg-' + idnum).toggle();\n      if (src.substr(-9) === 'minus.png')\n        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');\n      else\n        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');\n    }).css('display', '');\n    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {\n        togglers.click();\n    }\n  },\n\n  /**\n   * helper function to hide the search marks again\n   */\n  hideSearchWords : function() {\n    $('#searchbox .highlight-link').fadeOut(300);\n    $('span.highlighted').removeClass('highlighted');\n    var url = new URL(window.location);\n    url.searchParams.delete('highlight');\n    window.history.replaceState({}, '', url);\n  },\n\n  /**\n   * make the url absolute\n   */\n  makeURL : function(relativeURL) {\n    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;\n  },\n\n  /**\n   * get the current relative url\n   */\n  getCurrentURL : function() {\n    var path = document.location.pathname;\n    var parts = path.split(/\\//);\n    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\\//), function() {\n      if (this === '..')\n        parts.pop();\n    });\n    var url = parts.join('/');\n    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);\n  },\n\n  initOnKeyListeners: function() {\n    $(document).keydown(function(event) {\n      var activeElementType = document.activeElement.tagName;\n      // don't navigate when in search box, textarea, dropdown or button\n      if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'\n          && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey\n          && !event.shiftKey) {\n        switch (event.keyCode) {\n          case 37: // left\n            var prevHref = $('link[rel=\"prev\"]').prop('href');\n            if (prevHref) {\n              window.location.href = prevHref;\n              return false;\n            }\n            break;\n          case 39: // right\n            var nextHref = $('link[rel=\"next\"]').prop('href');\n            if (nextHref) {\n              window.location.href = nextHref;\n              return false;\n            }\n            break;\n        }\n      }\n    });\n  }\n};\n\n// quick alias for translations\n_ = Documentation.gettext;\n\n$(document).ready(function() {\n  Documentation.init();\n});\n"
  },
  {
    "path": "docs/_static/documentation_options.js",
    "content": "var DOCUMENTATION_OPTIONS = {\n    URL_ROOT: document.getElementById(\"documentation_options\").getAttribute('data-url_root'),\n    VERSION: '1.2.0',\n    LANGUAGE: 'None',\n    COLLAPSE_INDEX: false,\n    BUILDER: 'html',\n    FILE_SUFFIX: '.html',\n    LINK_SUFFIX: '.html',\n    HAS_SOURCE: true,\n    SOURCELINK_SUFFIX: '.txt',\n    NAVIGATION_WITH_KEYS: false\n};"
  },
  {
    "path": "docs/_static/jquery-3.5.1.js",
    "content": "/*!\n * jQuery JavaScript Library v3.5.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2020-05-04T22:49Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n      // Support: Chrome <=57, Firefox <=52\n      // In some browsers, typeof returns \"function\" for HTML <object> elements\n      // (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n      // We don't want to classify *any* DOM node as a function.\n      return typeof obj === \"function\" && typeof obj.nodeType !== \"number\";\n  };\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.5.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( _i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.5\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2020-03-14\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem.namespaceURI,\n\t\tdocElem = ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a == document || a.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b == document || b.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" ) );\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr[ \"CHILD\" ].test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"odd\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"gt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos[ \"nth\" ] = Expr.pseudos[ \"eq\" ];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rcombinators.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[ \"TAG\" ]( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[ \"needsContext\" ].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n  return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n};\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the master Deferred\n\t\t\tmaster = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tmaster.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( master.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn master.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), master.reject );\n\t\t}\n\n\t\treturn master.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (#9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (#504, #13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\n\twhich: function( event ) {\n\t\tvar button = event.button;\n\n\t\t// Add which for key events\n\t\tif ( event.which == null && rkeyEvent.test( event.type ) ) {\n\t\t\treturn event.charCode != null ? event.charCode : event.keyCode;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\tif ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {\n\t\t\tif ( button & 1 ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif ( button & 2 ) {\n\t\t\t\treturn 3;\n\t\t\t}\n\n\t\t\tif ( button & 4 ) {\n\t\t\t\treturn 2;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn event.which;\n\t}\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px\";\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = parseInt( trStyle.height ) > 3;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, #12537)\n\t//   .css('--customProperty) (#3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trcustomProp = /^--/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = classesToArray( value );\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = (\n\t\t\t\t\tdataPriv.get( cur, \"events\" ) || Object.create( null )\n\t\t\t\t)[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\toriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script\n\t\t\tif ( !isSuccess && jQuery.inArray( \"script\", s.dataTypes ) > -1 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tif ( typeof props.top === \"number\" ) {\n\t\t\t\tprops.top += \"px\";\n\t\t\t}\n\t\t\tif ( typeof props.left === \"number\" ) {\n\t\t\t\tprops.left += \"px\";\n\t\t\t}\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\t\tfunction( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each( ( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t} );\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n"
  },
  {
    "path": "docs/_static/jquery.js",
    "content": "/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */\n!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error(\"jQuery requires a window with a document\");return t(e)}:t(e)}(\"undefined\"!=typeof window?window:this,function(C,e){\"use strict\";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return\"function\"==typeof e&&\"number\"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement(\"script\");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+\"\":\"object\"==typeof e||\"function\"==typeof e?n[o.call(e)]||\"object\":typeof e}var f=\"3.5.1\",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&\"length\"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&(\"array\"===n||0===t||\"number\"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for(\"boolean\"==typeof a&&(l=a,a=arguments[s]||{},s++),\"object\"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],\"__proto__\"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:\"jQuery\"+(f+Math.random()).replace(/\\D/g,\"\"),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||\"[object Object]\"!==o.call(e))&&(!(t=r(e))||\"function\"==typeof(n=v.call(t,\"constructor\")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,\"string\"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),\"function\"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each(\"Boolean Number String Function Array Date RegExp Object Error Symbol\".split(\" \"),function(e,t){n[\"[object \"+t+\"]\"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S=\"sizzle\"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",M=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",I=\"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\"+M+\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",W=\"\\\\[\"+M+\"*(\"+I+\")(?:\"+M+\"*([*^$|!~]?=)\"+M+\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+I+\"))|)\"+M+\"*\\\\]\",F=\":(\"+I+\")(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+W+\")*)|.*)\\\\)|)\",B=new RegExp(M+\"+\",\"g\"),$=new RegExp(\"^\"+M+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+M+\"+$\",\"g\"),_=new RegExp(\"^\"+M+\"*,\"+M+\"*\"),z=new RegExp(\"^\"+M+\"*([>+~]|\"+M+\")\"+M+\"*\"),U=new RegExp(M+\"|>\"),X=new RegExp(F),V=new RegExp(\"^\"+I+\"$\"),G={ID:new RegExp(\"^#(\"+I+\")\"),CLASS:new RegExp(\"^\\\\.(\"+I+\")\"),TAG:new RegExp(\"^(\"+I+\"|[*])\"),ATTR:new RegExp(\"^\"+W),PSEUDO:new RegExp(\"^\"+F),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+M+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+M+\"*(?:([+-]|)\"+M+\"*(\\\\d+)|))\"+M+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+R+\")$\",\"i\"),needsContext:new RegExp(\"^\"+M+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+M+\"*((?:-\\\\d)?\\\\d*)\"+M+\"*\\\\)|)(?=[^-]|$)\",\"i\")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\\d$/i,K=/^[^{]+\\{\\s*\\[native \\w/,Z=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ee=/[+~]/,te=new RegExp(\"\\\\\\\\[\\\\da-fA-F]{1,6}\"+M+\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\",\"g\"),ne=function(e,t){var n=\"0x\"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,ie=function(e,t){return t?\"\\0\"===e?\"\\ufffd\":e.slice(0,-1)+\"\\\\\"+e.charCodeAt(e.length-1).toString(16)+\" \":\"\\\\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&\"fieldset\"===e.nodeName.toLowerCase()},{dir:\"parentNode\",next:\"legend\"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],\"string\"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+\" \"]&&(!v||!v.test(t))&&(1!==p||\"object\"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute(\"id\"))?s=s.replace(re,ie):e.setAttribute(\"id\",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?\"#\"+s:\":scope\")+\" \"+xe(l[o]);c=l.join(\",\")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute(\"id\")}}}return g(t.replace($,\"$1\"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+\" \")>b.cacheLength&&delete e[r.shift()],e[t+\" \"]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement(\"fieldset\");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split(\"|\"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return\"input\"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return(\"input\"===t||\"button\"===t)&&e.type===n}}function ge(t){return function(e){return\"form\"in e?e.parentNode&&!1===e.disabled?\"label\"in e?\"label\"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:\"label\"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&\"undefined\"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||\"HTML\")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener(\"unload\",oe,!1):n.attachEvent&&n.attachEvent(\"onunload\",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement(\"div\")),\"undefined\"!=typeof e.querySelectorAll&&!e.querySelectorAll(\":scope fieldset div\").length}),d.attributes=ce(function(e){return e.className=\"i\",!e.getAttribute(\"className\")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute(\"id\")===t}},b.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t=\"undefined\"!=typeof e.getAttributeNode&&e.getAttributeNode(\"id\");return t&&t.value===n}},b.find.ID=function(e,t){if(\"undefined\"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode(\"id\"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode(\"id\"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return\"undefined\"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if(\"*\"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(\"undefined\"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML=\"<a id='\"+S+\"'></a><select id='\"+S+\"-\\r\\\\' msallowcapture=''><option selected=''></option></select>\",e.querySelectorAll(\"[msallowcapture^='']\").length&&v.push(\"[*^$]=\"+M+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\"[selected]\").length||v.push(\"\\\\[\"+M+\"*(?:value|\"+R+\")\"),e.querySelectorAll(\"[id~=\"+S+\"-]\").length||v.push(\"~=\"),(t=C.createElement(\"input\")).setAttribute(\"name\",\"\"),e.appendChild(t),e.querySelectorAll(\"[name='']\").length||v.push(\"\\\\[\"+M+\"*name\"+M+\"*=\"+M+\"*(?:''|\\\"\\\")\"),e.querySelectorAll(\":checked\").length||v.push(\":checked\"),e.querySelectorAll(\"a#\"+S+\"+*\").length||v.push(\".#.+[+~]\"),e.querySelectorAll(\"\\\\\\f\"),v.push(\"[\\\\r\\\\n\\\\f]\")}),ce(function(e){e.innerHTML=\"<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>\";var t=C.createElement(\"input\");t.setAttribute(\"type\",\"hidden\"),e.appendChild(t).setAttribute(\"name\",\"D\"),e.querySelectorAll(\"[name=d]\").length&&v.push(\"name\"+M+\"*[*^$|!~]?=\"),2!==e.querySelectorAll(\":enabled\").length&&v.push(\":enabled\",\":disabled\"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(\":disabled\").length&&v.push(\":enabled\",\":disabled\"),e.querySelectorAll(\"*,:x\"),v.push(\",.*:\")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,\"*\"),c.call(e,\"[s!='']:x\"),s.push(\"!=\",F)}),v=v.length&&new RegExp(v.join(\"|\")),s=s.length&&new RegExp(s.join(\"|\")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+\" \"]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+\"\").replace(re,ie)},se.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n=\"\",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||\"\").replace(te,ne),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(\"even\"===e[3]||\"odd\"===e[3])),e[5]=+(e[7]+e[8]||\"odd\"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||\"\":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(\")\",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return\"*\"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+\" \"];return t||(t=new RegExp(\"(^|\"+M+\")\"+e+\"(\"+M+\"|$)\"))&&m(e,function(e){return t.test(\"string\"==typeof e.className&&e.className||\"undefined\"!=typeof e.getAttribute&&e.getAttribute(\"class\")||\"\")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?\"!=\"===r:!r||(t+=\"\",\"=\"===r?t===i:\"!=\"===r?t!==i:\"^=\"===r?i&&0===t.indexOf(i):\"*=\"===r?i&&-1<t.indexOf(i):\"$=\"===r?i&&t.slice(-i.length)===i:\"~=\"===r?-1<(\" \"+t.replace(B,\" \")+\" \").indexOf(i):\"|=\"===r&&(t===i||t.slice(0,i.length+1)===i+\"-\"))}},CHILD:function(h,e,t,g,v){var y=\"nth\"!==h.slice(0,3),m=\"last\"!==h.slice(-4),x=\"of-type\"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?\"nextSibling\":\"previousSibling\",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l=\"only\"===h&&!u&&\"nextSibling\"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error(\"unsupported pseudo: \"+e);return a[S]?a(o):1<a.length?(t=[e,e,\"\",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,\"$1\"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||\"\")||se.error(\"unsupported lang: \"+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute(\"xml:lang\")||e.getAttribute(\"lang\"))return(t=t.toLowerCase())===n||0===t.indexOf(n+\"-\")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&\"button\"===e.type||\"button\"===t},text:function(e){var t;return\"input\"===e.nodeName.toLowerCase()&&\"text\"===e.type&&(null==(t=e.getAttribute(\"type\"))||\"text\"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r=\"\";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&\"parentNode\"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||\"*\",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[\" \"],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:\" \"===e[s-2].type?\"*\":\"\"})).replace($,\"$1\"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+\" \"];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($,\" \")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+\" \"];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l=\"0\",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG(\"*\",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l=\"function\"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&\"ID\"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split(\"\").sort(D).join(\"\")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement(\"fieldset\"))}),ce(function(e){return e.innerHTML=\"<a href='#'></a>\",\"#\"===e.firstChild.getAttribute(\"href\")})||fe(\"type|href|height|width\",function(e,t,n){if(!n)return e.getAttribute(t,\"type\"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML=\"<input/>\",e.firstChild.setAttribute(\"value\",\"\"),\"\"===e.firstChild.getAttribute(\"value\")})||fe(\"value\",function(e,t,n){if(!n&&\"input\"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute(\"disabled\")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[\":\"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):\"string\"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=\":not(\"+e+\")\"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if(\"string\"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,\"string\"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,\"string\"==typeof e){if(!(r=\"<\"===e[0]&&\">\"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a=\"string\"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?\"string\"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,\"parentNode\")},parentsUntil:function(e,t,n){return h(e,\"parentNode\",n)},next:function(e){return O(e,\"nextSibling\")},prev:function(e){return O(e,\"previousSibling\")},nextAll:function(e){return h(e,\"nextSibling\")},prevAll:function(e){return h(e,\"previousSibling\")},nextUntil:function(e,t,n){return h(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return h(e,\"previousSibling\",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,\"template\")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return\"Until\"!==r.slice(-5)&&(t=e),t&&\"string\"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\\x20\\t\\r\\n\\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r=\"string\"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:\"\")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&\"string\"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t=\"\",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=\"\"),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[[\"notify\",\"progress\",S.Callbacks(\"memory\"),S.Callbacks(\"memory\"),2],[\"resolve\",\"done\",S.Callbacks(\"once memory\"),S.Callbacks(\"once memory\"),0,\"resolved\"],[\"reject\",\"fail\",S.Callbacks(\"once memory\"),S.Callbacks(\"once memory\"),1,\"rejected\"]],i=\"pending\",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},\"catch\":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+\"With\"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError(\"Thenable self-resolution\");t=e&&(\"object\"==typeof e||\"function\"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+\"With\"](this===s?void 0:this,arguments),this},s[t[0]+\"With\"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),\"pending\"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn(\"jQuery.Deferred exception: \"+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener(\"DOMContentLoaded\",B),C.removeEventListener(\"load\",B),S.ready()}S.fn.ready=function(e){return F.then(e)[\"catch\"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,\"complete\"===E.readyState||\"loading\"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener(\"DOMContentLoaded\",B),C.addEventListener(\"load\",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if(\"object\"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,\"ms-\").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if(\"string\"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&\"string\"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r=\"data-\"+t.replace(K,\"-$&\").toLowerCase(),\"string\"==typeof(n=e.getAttribute(r))){try{n=\"true\"===(i=n)||\"false\"!==i&&(\"null\"===i?null:i===+i+\"\"?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,\"hasDataAttrs\"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf(\"data-\")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,\"hasDataAttrs\",!0)}return i}return\"object\"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||\"fx\")+\"queue\",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||\"fx\";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);\"inprogress\"===i&&(i=n.shift(),r--),i&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks(\"once memory\").add(function(){Y.remove(e,[t+\"queue\",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return\"string\"!=typeof t&&(n=t,t=\"fx\",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),\"fx\"===t&&\"inprogress\"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||\"fx\",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};\"string\"!=typeof e&&(t=e,e=void 0),e=e||\"fx\";while(a--)(n=Y.get(o[a],e+\"queueHooks\"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,te=new RegExp(\"^(?:([+-])=|)(\"+ee+\")([a-z%]*)$\",\"i\"),ne=[\"Top\",\"Right\",\"Bottom\",\"Left\"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return\"none\"===(e=t||e).style.display||\"\"===e.style.display&&ie(e)&&\"none\"===S.css(e,\"display\")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,\"\")},u=s(),l=n&&n[3]||(S.cssNumber[t]?\"\":\"px\"),c=e.nodeType&&(S.cssNumber[t]||\"px\"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?(\"none\"===n&&(l[c]=Y.get(r,\"display\")||null,l[c]||(r.style.display=\"\")),\"\"===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,\"display\"),o.parentNode.removeChild(o),\"none\"===u&&(u=\"block\"),ue[s]=u)))):\"none\"!==n&&(l[c]=\"none\",Y.set(r,\"display\",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return\"boolean\"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i,he=/^$|^module$|\\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement(\"div\")),(fe=E.createElement(\"input\")).setAttribute(\"type\",\"radio\"),fe.setAttribute(\"checked\",\"checked\"),fe.setAttribute(\"name\",\"t\"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML=\"<textarea>x</textarea>\",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML=\"<option></option>\",y.option=!!ce.lastChild;var ge={thead:[1,\"<table>\",\"</table>\"],col:[2,\"<table><colgroup>\",\"</colgroup></table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],_default:[0,\"\",\"\"]};function ve(e,t){var n;return n=\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(t||\"*\"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],\"globalEval\",!t||Y.get(t[n],\"globalEval\"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,\"<select multiple='multiple'>\",\"</select>\"]);var me=/<|&#?\\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if(\"object\"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement(\"div\")),s=(de.exec(o)||[\"\",\"\"])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=\"\"}else p.push(t.createTextNode(o));f.textContent=\"\",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),\"script\"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||\"\")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==(\"focus\"===t)}function ke(e,t,n,r,i,o){var a,s;if(\"object\"==typeof t){for(s in\"string\"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&(\"string\"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return\"undefined\"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||\"\").match(P)||[\"\"]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||\"\").split(\".\").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(\".\")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||\"\").match(P)||[\"\"]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||\"\").split(\".\").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&(\"**\"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,\"handle events\")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,\"events\")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!(\"click\"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(\"click\"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+\" \"]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,\"input\")&&Ae(t,\"click\",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,\"input\")&&Ae(t,\"click\"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,\"input\")&&Y.get(t,\"click\")||A(t,\"a\")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,\"char\":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",pointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+\".\"+r.namespace:r.origType,r.selector,r.handler),this;if(\"object\"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&\"function\"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\\s*(?:[^=]|=\\s*.checked.)/i,je=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;function qe(e,t){return A(e,\"table\")&&A(11!==t.nodeType?t:t.firstChild,\"tr\")&&S(e).children(\"tbody\")[0]||e}function Le(e){return e.type=(null!==e.getAttribute(\"type\"))+\"/\"+e.type,e}function He(e){return\"true/\"===(e.type||\"\").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute(\"type\"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,\"handle events\"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&\"string\"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,\"script\"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,\"script\"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||\"\")&&!Y.access(u,\"globalEval\")&&S.contains(l,u)&&(u.src&&\"module\"!==(u.type||\"\").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute(\"nonce\")},l):b(u.textContent.replace(je,\"\"),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,\"script\")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,\"input\"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:\"input\"!==l&&\"textarea\"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,\"script\")).length&&ye(a,!f&&ve(e,\"script\")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent=\"\");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if(\"string\"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||[\"\",\"\"])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp(\"^(\"+ee+\")(?!px)[a-z%]+$\",\"i\"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join(\"|\"),\"i\");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(\"\"!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+\"\":a}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText=\"position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0\",l.style.cssText=\"position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%\",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n=\"1%\"!==e.top,s=12===t(e.marginLeft),l.style.right=\"60%\",o=36===t(e.right),r=36===t(e.width),l.style.position=\"absolute\",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement(\"div\"),l=E.createElement(\"div\");l.style&&(l.style.backgroundClip=\"content-box\",l.cloneNode(!0).style.backgroundClip=\"\",y.clearCloneStyle=\"content-box\"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement(\"table\"),t=E.createElement(\"tr\"),n=E.createElement(\"div\"),e.style.cssText=\"position:absolute;left:-11111px\",t.style.height=\"1px\",n.style.height=\"9px\",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=[\"Webkit\",\"Moz\",\"ms\"],ze=E.createElement(\"div\").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Qe={letterSpacing:\"0\",fontWeight:\"400\"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||\"px\"):t}function Ke(e,t,n,r,i,o){var a=\"width\"===t?1:0,s=0,u=0;if(n===(r?\"border\":\"content\"))return 0;for(;a<4;a+=2)\"margin\"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?(\"content\"===n&&(u-=S.css(e,\"padding\"+ne[a],!0,i)),\"margin\"!==n&&(u-=S.css(e,\"border\"+ne[a]+\"Width\",!0,i))):(u+=S.css(e,\"padding\"+ne[a],!0,i),\"padding\"!==n?u+=S.css(e,\"border\"+ne[a]+\"Width\",!0,i):s+=S.css(e,\"border\"+ne[a]+\"Width\",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e[\"offset\"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&\"border-box\"===S.css(e,\"boxSizing\",!1,r),o=i,a=Be(e,t,r),s=\"offset\"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a=\"auto\"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,\"tr\")||\"auto\"===a||!parseFloat(a)&&\"inline\"===S.css(e,\"display\",!1,r))&&e.getClientRects().length&&(i=\"border-box\"===S.css(e,\"boxSizing\",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?\"border\":\"content\"),o,r,a)+\"px\"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&\"get\"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];\"string\"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o=\"number\"),null!=n&&n==n&&(\"number\"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?\"\":\"px\")),y.clearCloneStyle||\"\"!==n||0!==t.indexOf(\"background\")||(l[t]=\"inherit\"),a&&\"set\"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&\"get\"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),\"normal\"===i&&t in Qe&&(i=Qe[t]),\"\"===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each([\"height\",\"width\"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,\"display\"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&\"absolute\"===i.position,a=(o||n)&&\"border-box\"===S.css(e,\"boxSizing\",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e[\"offset\"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,\"border\",!1,i)-.5)),s&&(r=te.exec(t))&&\"px\"!==(r[3]||\"px\")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,\"marginLeft\"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+\"px\"}),S.each({margin:\"\",padding:\"\",border:\"Width\"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r=\"string\"==typeof e?e.split(\" \"):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},\"margin\"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?\"\":\"px\")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,\"\"))&&\"auto\"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:\"swing\"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i[\"margin\"+(n=ne[r])]=i[\"padding\"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners[\"*\"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&\"expand\"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{\"*\":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=[\"*\"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f=\"width\"in t||\"height\"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,\"fxshow\");for(r in n.queue||(null==(a=S._queueHooks(e,\"fx\")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,\"fx\").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||\"toggle\"===i,i===(g?\"hide\":\"show\")){if(\"show\"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,\"display\")),\"none\"===(c=S.css(e,\"display\"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,\"display\"),le([e]))),(\"inline\"===c||\"inline-block\"===c&&null!=l)&&\"none\"===S.css(e,\"float\")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l=\"none\"===c?\"\":c)),h.display=\"inline-block\")),n.overflow&&(h.overflow=\"hidden\",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?\"hidden\"in v&&(g=v.hidden):v=Y.access(e,\"fxshow\",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,\"fxshow\"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&\"object\"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:\"number\"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue=\"fx\"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css(\"opacity\",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,\"finish\"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return\"string\"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||\"fx\",[]),this.each(function(){var e=!0,t=null!=i&&i+\"queueHooks\",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||\"fx\"),this.each(function(){var e,t=Y.get(this),n=t[a+\"queue\"],r=t[a+\"queueHooks\"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each([\"toggle\",\"show\",\"hide\"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||\"boolean\"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt(\"show\"),slideUp:lt(\"hide\"),slideToggle:lt(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||\"fx\",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement(\"input\"),it=E.createElement(\"select\").appendChild(E.createElement(\"option\")),rt.type=\"checkbox\",y.checkOn=\"\"!==rt.value,y.optSelected=it.selected,(rt=E.createElement(\"input\")).value=\"t\",rt.type=\"radio\",y.radioValue=\"t\"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return\"undefined\"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+\"\"),n):i&&\"get\"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&\"radio\"===t&&A(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(\" \")}function yt(e){return e.getAttribute&&e.getAttribute(\"class\")||\"\"}function mt(e){return Array.isArray(e)?e:\"string\"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&\"set\"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&\"get\"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,\"tabindex\");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{\"for\":\"htmlFor\",\"class\":\"className\"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&\" \"+vt(i)+\" \"){a=0;while(o=e[a++])r.indexOf(\" \"+o+\" \")<0&&(r+=o+\" \");i!==(s=vt(r))&&n.setAttribute(\"class\",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr(\"class\",\"\");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&\" \"+vt(i)+\" \"){a=0;while(o=e[a++])while(-1<r.indexOf(\" \"+o+\" \"))r=r.replace(\" \"+o+\" \",\" \");i!==(s=vt(r))&&n.setAttribute(\"class\",s)}return this},toggleClass:function(i,t){var o=typeof i,a=\"string\"===o||Array.isArray(i);return\"boolean\"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&\"boolean\"!==o||((e=yt(this))&&Y.set(this,\"__className__\",e),this.setAttribute&&this.setAttribute(\"class\",e||!1===i?\"\":Y.get(this,\"__className__\")||\"\"))})},hasClass:function(e){var t,n,r=0;t=\" \"+e+\" \";while(n=this[r++])if(1===n.nodeType&&-1<(\" \"+vt(yt(n))+\" \").indexOf(t))return!0;return!1}});var xt=/\\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t=\"\":\"number\"==typeof t?t+=\"\":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?\"\":e+\"\"})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&\"set\"in r&&void 0!==r.set(this,t,\"value\")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&\"get\"in r&&void 0!==(e=r.get(t,\"value\"))?e:\"string\"==typeof(e=t.value)?e.replace(xt,\"\"):null==e?\"\":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,\"value\");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a=\"select-one\"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,\"optgroup\"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each([\"radio\",\"checkbox\"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute(\"value\")?\"on\":e.value})}),y.focusin=\"onfocusin\"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,\"type\")?e.type:e,h=v.call(e,\"namespace\")?e.namespace.split(\".\"):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(\".\")&&(d=(h=d.split(\".\")).shift(),h.sort()),u=d.indexOf(\":\")<0&&\"on\"+d,(e=e[S.expando]?e:new S.Event(d,\"object\"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join(\".\"),e.rnamespace=e.namespace?new RegExp(\"(^|\\\\.)\"+h.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,\"events\")||Object.create(null))[e.type]&&Y.get(o,\"handle\"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:\"focusin\",blur:\"focusout\"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\\?/;S.parseXML=function(e){var t;if(!e||\"string\"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,\"text/xml\")}catch(e){t=void 0}return t&&!t.getElementsByTagName(\"parsererror\").length||S.error(\"Invalid XML: \"+e),t};var St=/\\[\\]$/,kt=/\\r?\\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+\"[\"+(\"object\"==typeof t&&null!=t?e:\"\")+\"]\",t,r,i)});else if(r||\"object\"!==w(e))i(n,e);else for(t in e)Dt(n+\"[\"+t+\"]\",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(null==n?\"\":n)};if(null==e)return\"\";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join(\"&\")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,\"elements\");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(\":disabled\")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,\"\\r\\n\")}}):{name:t.name,value:n.replace(kt,\"\\r\\n\")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\\/\\//,Rt={},Mt={},It=\"*/\".concat(\"*\"),Wt=E.createElement(\"a\");function Ft(o){return function(e,t){\"string\"!=typeof e&&(t=e,e=\"*\");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])\"+\"===n[0]?(n=n.slice(1)||\"*\",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return\"string\"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s[\"*\"]&&l(\"*\")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:\"GET\",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":It,text:\"text/plain\",html:\"text/html\",xml:\"application/xml, text/xml\",json:\"application/json, text/javascript\"},contents:{xml:/\\bxml\\b/,html:/\\bhtml/,json:/\\bjson\\b/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":JSON.parse,\"text xml\":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){\"object\"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks(\"once memory\"),w=v.statusCode||{},a={},s={},u=\"canceled\",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+\" \"]=(n[t[1].toLowerCase()+\" \"]||[]).concat(t[2])}t=n[e.toLowerCase()+\" \"]}return null==t?null:t.join(\", \")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+\"\").replace(Pt,Tt.protocol+\"//\"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||\"*\").toLowerCase().match(P)||[\"\"],null==v.crossDomain){r=E.createElement(\"a\");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+\"//\"+Wt.host!=r.protocol+\"//\"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&\"string\"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger(\"ajaxStart\"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,\"\"),v.hasContent?v.data&&v.processData&&0===(v.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&(v.data=v.data.replace(jt,\"+\")):(o=v.url.slice(f.length),v.data&&(v.processData||\"string\"==typeof v.data)&&(f+=(Et.test(f)?\"&\":\"?\")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,\"$1\"),o=(Et.test(f)?\"&\":\"?\")+\"_=\"+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader(\"If-Modified-Since\",S.lastModified[f]),S.etag[f]&&T.setRequestHeader(\"If-None-Match\",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader(\"Content-Type\",v.contentType),T.setRequestHeader(\"Accept\",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+(\"*\"!==v.dataTypes[0]?\", \"+It+\"; q=0.01\":\"\"):v.accepts[\"*\"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u=\"abort\",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger(\"ajaxSend\",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort(\"timeout\")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,\"No Transport\");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||\"\",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while(\"*\"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader(\"Content-Type\"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+\" \"+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray(\"script\",v.dataTypes)&&(v.converters[\"text script\"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if(\"*\"===o)o=u;else if(\"*\"!==u&&u!==o){if(!(a=l[u+\" \"+o]||l[\"* \"+o]))for(i in l)if((s=i.split(\" \"))[1]===o&&(a=l[u+\" \"+s[0]]||l[\"* \"+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e[\"throws\"])t=a(t);else try{t=a(t)}catch(e){return{state:\"parsererror\",error:a?e:\"No conversion from \"+u+\" to \"+o}}}return{state:\"success\",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader(\"Last-Modified\"))&&(S.lastModified[f]=u),(u=T.getResponseHeader(\"etag\"))&&(S.etag[f]=u)),204===e||\"HEAD\"===v.type?l=\"nocontent\":304===e?l=\"notmodified\":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l=\"error\",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+\"\",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?\"ajaxSuccess\":\"ajaxError\",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger(\"ajaxComplete\",[T,v]),--S.active||S.event.trigger(\"ajaxStop\")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,\"json\")},getScript:function(e,t){return S.get(e,void 0,t,\"script\")}}),S.each([\"get\",\"post\"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)\"content-type\"===t.toLowerCase()&&(e.contentType=e.headers[t]||\"\")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:\"GET\",dataType:\"script\",cache:!0,async:!1,global:!1,converters:{\"text script\":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not(\"body\").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&\"withCredentials\"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e[\"X-Requested-With\"]||(e[\"X-Requested-With\"]=\"XMLHttpRequest\"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,\"abort\"===e?r.abort():\"error\"===e?\"number\"!=typeof r.status?t(0,\"error\"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,\"text\"!==(r.responseType||\"text\")||\"string\"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o(\"error\"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o(\"abort\");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/\\b(?:java|ecma)script\\b/},converters:{\"text script\":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter(\"script\",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\")}),S.ajaxTransport(\"script\",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S(\"<script>\").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on(\"load error\",i=function(e){r.remove(),i=null,e&&t(\"error\"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\\?(?=&|$)|\\?\\?/;S.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=Xt.pop()||S.expando+\"_\"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter(\"json jsonp\",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?\"url\":\"string\"==typeof e.data&&0===(e.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&Vt.test(e.data)&&\"data\");if(a||\"jsonp\"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,\"$1\"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?\"&\":\"?\")+e.jsonp+\"=\"+r),e.converters[\"script json\"]=function(){return o||S.error(r+\" was not called\"),o[0]},e.dataTypes[0]=\"json\",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),\"script\"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument(\"\").body).innerHTML=\"<form></form><form></form>\",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return\"string\"!=typeof e?[]:(\"boolean\"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument(\"\")).createElement(\"base\")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(\" \");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&\"object\"==typeof t&&(i=\"POST\"),0<a.length&&S.ajax({url:e,type:i||\"GET\",dataType:\"html\",data:t}).done(function(e){o=arguments,a.html(r?S(\"<div>\").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,\"position\"),c=S(e),f={};\"static\"===l&&(e.style.position=\"relative\"),s=c.offset(),o=S.css(e,\"top\"),u=S.css(e,\"left\"),(\"absolute\"===l||\"fixed\"===l)&&-1<(o+u).indexOf(\"auto\")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),\"using\"in t?t.using.call(e,f):(\"number\"==typeof f.top&&(f.top+=\"px\"),\"number\"==typeof f.left&&(f.left+=\"px\"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if(\"fixed\"===S.css(r,\"position\"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&\"static\"===S.css(e,\"position\"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,\"borderTopWidth\",!0),i.left+=S.css(e,\"borderLeftWidth\",!0))}return{top:t.top-i.top-S.css(r,\"marginTop\",!0),left:t.left-i.left-S.css(r,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&\"static\"===S.css(e,\"position\"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(t,i){var o=\"pageYOffset\"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each([\"top\",\"left\"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+\"px\":t})}),S.each({Height:\"height\",Width:\"width\"},function(a,s){S.each({padding:\"inner\"+a,content:s,\"\":\"outer\"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||\"boolean\"!=typeof e),i=r||(!0===e||!0===t?\"margin\":\"border\");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf(\"outer\")?e[\"inner\"+a]:e.document.documentElement[\"client\"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body[\"scroll\"+a],r[\"scroll\"+a],e.body[\"offset\"+a],r[\"offset\"+a],r[\"client\"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,\"**\"):this.off(t,e||\"**\",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each(\"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu\".split(\" \"),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if(\"string\"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return(\"number\"===t||\"string\"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?\"\":(e+\"\").replace(Gt,\"\")},\"function\"==typeof define&&define.amd&&define(\"jquery\",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},\"undefined\"==typeof e&&(C.jQuery=C.$=S),S});\n"
  },
  {
    "path": "docs/_static/js/badge_only.js",
    "content": "!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=4)}({4:function(e,t,r){}});"
  },
  {
    "path": "docs/_static/js/theme.js",
    "content": "!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(n,\"__esModule\",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&\"object\"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,\"default\",{enumerable:!0,value:n}),2&e&&\"string\"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,\"a\",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p=\"\",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e=\"undefined\"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on(\"hashchange\",t.reset),n&&t.win.on(\"scroll\",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on(\"resize\",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n(\"div.wy-side-scroll:first\"),this.win=n(window),n(document).on(\"click\",\"[data-toggle='wy-nav-top']\",(function(){n(\"[data-toggle='wy-nav-shift']\").toggleClass(\"shift\"),n(\"[data-toggle='rst-versions']\").toggleClass(\"shift\")})).on(\"click\",\".wy-menu-vertical .current ul li a\",(function(){var t=n(this);n(\"[data-toggle='wy-nav-shift']\").removeClass(\"shift\"),n(\"[data-toggle='rst-versions']\").toggleClass(\"shift\"),e.toggleCurrent(t),e.hashChange()})).on(\"click\",\"[data-toggle='rst-current-version']\",(function(){n(\"[data-toggle='rst-versions']\").toggleClass(\"shift-up\")})),n(\"table.docutils:not(.field-list,.footnote,.citation)\").wrap(\"<div class='wy-table-responsive'></div>\"),n(\"table.docutils.footnote\").wrap(\"<div class='wy-table-responsive footnote'></div>\"),n(\"table.docutils.citation\").wrap(\"<div class='wy-table-responsive citation'></div>\"),n(\".wy-menu-vertical ul\").not(\".simple\").siblings(\"a\").each((function(){var t=n(this);expand=n('<button class=\"toctree-expand\" title=\"Open/close menu\"></button>'),expand.on(\"click\",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||\"#\";try{var e=$(\".wy-menu-vertical\"),t=e.find('[href=\"'+n+'\"]');if(0===t.length){var i=$('.document [id=\"'+n.substring(1)+'\"]').closest(\"div.section\");0===(t=e.find('[href=\"#'+i.attr(\"id\")+'\"]')).length&&(t=e.find('[href=\"#\"]'))}if(t.length>0){$(\".wy-menu-vertical .current\").removeClass(\"current\").attr(\"aria-expanded\",\"false\"),t.addClass(\"current\").attr(\"aria-expanded\",\"true\"),t.closest(\"li.toctree-l1\").parent().addClass(\"current\").attr(\"aria-expanded\",\"true\");for(let n=1;n<=10;n++)t.closest(\"li.toctree-l\"+n).addClass(\"current\").attr(\"aria-expanded\",\"true\");t[0].scrollIntoView()}}catch(n){console.log(\"Error expanding nav for anchor\",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one(\"hashchange\",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest(\"li\");e.siblings(\"li.current\").removeClass(\"current\").attr(\"aria-expanded\",\"false\"),e.siblings().find(\"li.current\").removeClass(\"current\").attr(\"aria-expanded\",\"false\");var t=e.find(\"> ul li\");t.length&&(t.removeClass(\"current\").attr(\"aria-expanded\",\"false\"),e.toggleClass(\"current\").attr(\"aria-expanded\",(function(n,e){return\"true\"==e?\"false\":\"true\"})))}},\"undefined\"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=[\"ms\",\"moz\",\"webkit\",\"o\"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+\"RequestAnimationFrame\"],window.cancelAnimationFrame=window[e[t]+\"CancelAnimationFrame\"]||window[e[t]+\"CancelRequestAnimationFrame\"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),r=window.setTimeout((function(){e(i+o)}),o);return n=i+o,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()}).call(window)},function(n,e){n.exports=jQuery},function(n,e,t){}]);"
  },
  {
    "path": "docs/_static/language_data.js",
    "content": "/*\n * language_data.js\n * ~~~~~~~~~~~~~~~~\n *\n * This script contains the language-specific data used by searchtools.js,\n * namely the list of stopwords, stemmer, scorer and splitter.\n *\n * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\nvar stopwords = [\"a\",\"and\",\"are\",\"as\",\"at\",\"be\",\"but\",\"by\",\"for\",\"if\",\"in\",\"into\",\"is\",\"it\",\"near\",\"no\",\"not\",\"of\",\"on\",\"or\",\"such\",\"that\",\"the\",\"their\",\"then\",\"there\",\"these\",\"they\",\"this\",\"to\",\"was\",\"will\",\"with\"];\n\n\n/* Non-minified version is copied as a separate JS file, is available */\n\n/**\n * Porter Stemmer\n */\nvar Stemmer = function() {\n\n  var step2list = {\n    ational: 'ate',\n    tional: 'tion',\n    enci: 'ence',\n    anci: 'ance',\n    izer: 'ize',\n    bli: 'ble',\n    alli: 'al',\n    entli: 'ent',\n    eli: 'e',\n    ousli: 'ous',\n    ization: 'ize',\n    ation: 'ate',\n    ator: 'ate',\n    alism: 'al',\n    iveness: 'ive',\n    fulness: 'ful',\n    ousness: 'ous',\n    aliti: 'al',\n    iviti: 'ive',\n    biliti: 'ble',\n    logi: 'log'\n  };\n\n  var step3list = {\n    icate: 'ic',\n    ative: '',\n    alize: 'al',\n    iciti: 'ic',\n    ical: 'ic',\n    ful: '',\n    ness: ''\n  };\n\n  var c = \"[^aeiou]\";          // consonant\n  var v = \"[aeiouy]\";          // vowel\n  var C = c + \"[^aeiouy]*\";    // consonant sequence\n  var V = v + \"[aeiou]*\";      // vowel sequence\n\n  var mgr0 = \"^(\" + C + \")?\" + V + C;                      // [C]VC... is m>0\n  var meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\";    // [C]VC[V] is m=1\n  var mgr1 = \"^(\" + C + \")?\" + V + C + V + C;              // [C]VCVC... is m>1\n  var s_v   = \"^(\" + C + \")?\" + v;                         // vowel in stem\n\n  this.stemWord = function (w) {\n    var stem;\n    var suffix;\n    var firstch;\n    var origword = w;\n\n    if (w.length < 3)\n      return w;\n\n    var re;\n    var re2;\n    var re3;\n    var re4;\n\n    firstch = w.substr(0,1);\n    if (firstch == \"y\")\n      w = firstch.toUpperCase() + w.substr(1);\n\n    // Step 1a\n    re = /^(.+?)(ss|i)es$/;\n    re2 = /^(.+?)([^s])s$/;\n\n    if (re.test(w))\n      w = w.replace(re,\"$1$2\");\n    else if (re2.test(w))\n      w = w.replace(re2,\"$1$2\");\n\n    // Step 1b\n    re = /^(.+?)eed$/;\n    re2 = /^(.+?)(ed|ing)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      re = new RegExp(mgr0);\n      if (re.test(fp[1])) {\n        re = /.$/;\n        w = w.replace(re,\"\");\n      }\n    }\n    else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1];\n      re2 = new RegExp(s_v);\n      if (re2.test(stem)) {\n        w = stem;\n        re2 = /(at|bl|iz)$/;\n        re3 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n        re4 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n        if (re2.test(w))\n          w = w + \"e\";\n        else if (re3.test(w)) {\n          re = /.$/;\n          w = w.replace(re,\"\");\n        }\n        else if (re4.test(w))\n          w = w + \"e\";\n      }\n    }\n\n    // Step 1c\n    re = /^(.+?)y$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(s_v);\n      if (re.test(stem))\n        w = stem + \"i\";\n    }\n\n    // Step 2\n    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = new RegExp(mgr0);\n      if (re.test(stem))\n        w = stem + step2list[suffix];\n    }\n\n    // Step 3\n    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = new RegExp(mgr0);\n      if (re.test(stem))\n        w = stem + step3list[suffix];\n    }\n\n    // Step 4\n    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n    re2 = /^(.+?)(s|t)(ion)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(mgr1);\n      if (re.test(stem))\n        w = stem;\n    }\n    else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1] + fp[2];\n      re2 = new RegExp(mgr1);\n      if (re2.test(stem))\n        w = stem;\n    }\n\n    // Step 5\n    re = /^(.+?)e$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(mgr1);\n      re2 = new RegExp(meq1);\n      re3 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))\n        w = stem;\n    }\n    re = /ll$/;\n    re2 = new RegExp(mgr1);\n    if (re.test(w) && re2.test(w)) {\n      re = /.$/;\n      w = w.replace(re,\"\");\n    }\n\n    // and turn initial Y back to y\n    if (firstch == \"y\")\n      w = firstch.toLowerCase() + w.substr(1);\n    return w;\n  }\n}\n\n\n\n\nvar splitChars = (function() {\n    var result = {};\n    var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,\n         1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,\n         2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,\n         2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,\n         3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,\n         3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,\n         4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,\n         8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,\n         11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,\n         43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];\n    var i, j, start, end;\n    for (i = 0; i < singles.length; i++) {\n        result[singles[i]] = true;\n    }\n    var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],\n         [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],\n         [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],\n         [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],\n         [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],\n         [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],\n         [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],\n         [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],\n         [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],\n         [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],\n         [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],\n         [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],\n         [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],\n         [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],\n         [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],\n         [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],\n         [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],\n         [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],\n         [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],\n         [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],\n         [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],\n         [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],\n         [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],\n         [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],\n         [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],\n         [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],\n         [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],\n         [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],\n         [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],\n         [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],\n         [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],\n         [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],\n         [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],\n         [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],\n         [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],\n         [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],\n         [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],\n         [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],\n         [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],\n         [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],\n         [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],\n         [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],\n         [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],\n         [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],\n         [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],\n         [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],\n         [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],\n         [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],\n         [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];\n    for (i = 0; i < ranges.length; i++) {\n        start = ranges[i][0];\n        end = ranges[i][1];\n        for (j = start; j <= end; j++) {\n            result[j] = true;\n        }\n    }\n    return result;\n})();\n\nfunction splitQuery(query) {\n    var result = [];\n    var start = -1;\n    for (var i = 0; i < query.length; i++) {\n        if (splitChars[query.charCodeAt(i)]) {\n            if (start !== -1) {\n                result.push(query.slice(start, i));\n                start = -1;\n            }\n        } else if (start === -1) {\n            start = i;\n        }\n    }\n    if (start !== -1) {\n        result.push(query.slice(start));\n    }\n    return result;\n}\n\n\n"
  },
  {
    "path": "docs/_static/pygments.css",
    "content": "pre { line-height: 125%; }\ntd.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\nspan.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\ntd.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\nspan.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n.highlight .hll { background-color: #ffffcc }\n.highlight { background: #f8f8f8; }\n.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */\n.highlight .err { border: 1px solid #FF0000 } /* Error */\n.highlight .k { color: #008000; font-weight: bold } /* Keyword */\n.highlight .o { color: #666666 } /* Operator */\n.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */\n.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */\n.highlight .cp { color: #9C6500 } /* Comment.Preproc */\n.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */\n.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */\n.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */\n.highlight .gd { color: #A00000 } /* Generic.Deleted */\n.highlight .ge { font-style: italic } /* Generic.Emph */\n.highlight .gr { color: #E40000 } /* Generic.Error */\n.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n.highlight .gi { color: #008400 } /* Generic.Inserted */\n.highlight .go { color: #717171 } /* Generic.Output */\n.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\n.highlight .gs { font-weight: bold } /* Generic.Strong */\n.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n.highlight .gt { color: #0044DD } /* Generic.Traceback */\n.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\n.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\n.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\n.highlight .kp { color: #008000 } /* Keyword.Pseudo */\n.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\n.highlight .kt { color: #B00040 } /* Keyword.Type */\n.highlight .m { color: #666666 } /* Literal.Number */\n.highlight .s { color: #BA2121 } /* Literal.String */\n.highlight .na { color: #687822 } /* Name.Attribute */\n.highlight .nb { color: #008000 } /* Name.Builtin */\n.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */\n.highlight .no { color: #880000 } /* Name.Constant */\n.highlight .nd { color: #AA22FF } /* Name.Decorator */\n.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */\n.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */\n.highlight .nf { color: #0000FF } /* Name.Function */\n.highlight .nl { color: #767600 } /* Name.Label */\n.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\n.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */\n.highlight .nv { color: #19177C } /* Name.Variable */\n.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\n.highlight .w { color: #bbbbbb } /* Text.Whitespace */\n.highlight .mb { color: #666666 } /* Literal.Number.Bin */\n.highlight .mf { color: #666666 } /* Literal.Number.Float */\n.highlight .mh { color: #666666 } /* Literal.Number.Hex */\n.highlight .mi { color: #666666 } /* Literal.Number.Integer */\n.highlight .mo { color: #666666 } /* Literal.Number.Oct */\n.highlight .sa { color: #BA2121 } /* Literal.String.Affix */\n.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */\n.highlight .sc { color: #BA2121 } /* Literal.String.Char */\n.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */\n.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\n.highlight .s2 { color: #BA2121 } /* Literal.String.Double */\n.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */\n.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */\n.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */\n.highlight .sx { color: #008000 } /* Literal.String.Other */\n.highlight .sr { color: #A45A77 } /* Literal.String.Regex */\n.highlight .s1 { color: #BA2121 } /* Literal.String.Single */\n.highlight .ss { color: #19177C } /* Literal.String.Symbol */\n.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */\n.highlight .fm { color: #0000FF } /* Name.Function.Magic */\n.highlight .vc { color: #19177C } /* Name.Variable.Class */\n.highlight .vg { color: #19177C } /* Name.Variable.Global */\n.highlight .vi { color: #19177C } /* Name.Variable.Instance */\n.highlight .vm { color: #19177C } /* Name.Variable.Magic */\n.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */"
  },
  {
    "path": "docs/_static/searchtools.js",
    "content": "/*\n * searchtools.js\n * ~~~~~~~~~~~~~~~~\n *\n * Sphinx JavaScript utilities for the full-text search.\n *\n * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\nif (!Scorer) {\n  /**\n   * Simple result scoring code.\n   */\n  var Scorer = {\n    // Implement the following function to further tweak the score for each result\n    // The function takes a result array [filename, title, anchor, descr, score]\n    // and returns the new score.\n    /*\n    score: function(result) {\n      return result[4];\n    },\n    */\n\n    // query matches the full name of an object\n    objNameMatch: 11,\n    // or matches in the last dotted part of the object name\n    objPartialMatch: 6,\n    // Additive scores depending on the priority of the object\n    objPrio: {0:  15,   // used to be importantResults\n              1:  5,   // used to be objectResults\n              2: -5},  // used to be unimportantResults\n    //  Used when the priority is not in the mapping.\n    objPrioDefault: 0,\n\n    // query found in title\n    title: 15,\n    partialTitle: 7,\n    // query found in terms\n    term: 5,\n    partialTerm: 2\n  };\n}\n\nif (!splitQuery) {\n  function splitQuery(query) {\n    return query.split(/\\s+/);\n  }\n}\n\n/**\n * Search Module\n */\nvar Search = {\n\n  _index : null,\n  _queued_query : null,\n  _pulse_status : -1,\n\n  htmlToText : function(htmlString) {\n      var virtualDocument = document.implementation.createHTMLDocument('virtual');\n      var htmlElement = $(htmlString, virtualDocument);\n      htmlElement.find('.headerlink').remove();\n      docContent = htmlElement.find('[role=main]')[0];\n      if(docContent === undefined) {\n          console.warn(\"Content block not found. Sphinx search tries to obtain it \" +\n                       \"via '[role=main]'. Could you check your theme or template.\");\n          return \"\";\n      }\n      return docContent.textContent || docContent.innerText;\n  },\n\n  init : function() {\n      var params = $.getQueryParameters();\n      if (params.q) {\n          var query = params.q[0];\n          $('input[name=\"q\"]')[0].value = query;\n          this.performSearch(query);\n      }\n  },\n\n  loadIndex : function(url) {\n    $.ajax({type: \"GET\", url: url, data: null,\n            dataType: \"script\", cache: true,\n            complete: function(jqxhr, textstatus) {\n              if (textstatus != \"success\") {\n                document.getElementById(\"searchindexloader\").src = url;\n              }\n            }});\n  },\n\n  setIndex : function(index) {\n    var q;\n    this._index = index;\n    if ((q = this._queued_query) !== null) {\n      this._queued_query = null;\n      Search.query(q);\n    }\n  },\n\n  hasIndex : function() {\n      return this._index !== null;\n  },\n\n  deferQuery : function(query) {\n      this._queued_query = query;\n  },\n\n  stopPulse : function() {\n      this._pulse_status = 0;\n  },\n\n  startPulse : function() {\n    if (this._pulse_status >= 0)\n        return;\n    function pulse() {\n      var i;\n      Search._pulse_status = (Search._pulse_status + 1) % 4;\n      var dotString = '';\n      for (i = 0; i < Search._pulse_status; i++)\n        dotString += '.';\n      Search.dots.text(dotString);\n      if (Search._pulse_status > -1)\n        window.setTimeout(pulse, 500);\n    }\n    pulse();\n  },\n\n  /**\n   * perform a search for something (or wait until index is loaded)\n   */\n  performSearch : function(query) {\n    // create the required interface elements\n    this.out = $('#search-results');\n    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);\n    this.dots = $('<span></span>').appendTo(this.title);\n    this.status = $('<p class=\"search-summary\">&nbsp;</p>').appendTo(this.out);\n    this.output = $('<ul class=\"search\"/>').appendTo(this.out);\n\n    $('#search-progress').text(_('Preparing search...'));\n    this.startPulse();\n\n    // index already loaded, the browser was quick!\n    if (this.hasIndex())\n      this.query(query);\n    else\n      this.deferQuery(query);\n  },\n\n  /**\n   * execute search (requires search index to be loaded)\n   */\n  query : function(query) {\n    var i;\n\n    // stem the searchterms and add them to the correct list\n    var stemmer = new Stemmer();\n    var searchterms = [];\n    var excluded = [];\n    var hlterms = [];\n    var tmp = splitQuery(query);\n    var objectterms = [];\n    for (i = 0; i < tmp.length; i++) {\n      if (tmp[i] !== \"\") {\n          objectterms.push(tmp[i].toLowerCase());\n      }\n\n      if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === \"\") {\n        // skip this \"word\"\n        continue;\n      }\n      // stem the word\n      var word = stemmer.stemWord(tmp[i].toLowerCase());\n      // prevent stemmer from cutting word smaller than two chars\n      if(word.length < 3 && tmp[i].length >= 3) {\n        word = tmp[i];\n      }\n      var toAppend;\n      // select the correct list\n      if (word[0] == '-') {\n        toAppend = excluded;\n        word = word.substr(1);\n      }\n      else {\n        toAppend = searchterms;\n        hlterms.push(tmp[i].toLowerCase());\n      }\n      // only add if not already in the list\n      if (!$u.contains(toAppend, word))\n        toAppend.push(word);\n    }\n    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(\" \"));\n\n    // console.debug('SEARCH: searching for:');\n    // console.info('required: ', searchterms);\n    // console.info('excluded: ', excluded);\n\n    // prepare search\n    var terms = this._index.terms;\n    var titleterms = this._index.titleterms;\n\n    // array of [filename, title, anchor, descr, score]\n    var results = [];\n    $('#search-progress').empty();\n\n    // lookup as object\n    for (i = 0; i < objectterms.length; i++) {\n      var others = [].concat(objectterms.slice(0, i),\n                             objectterms.slice(i+1, objectterms.length));\n      results = results.concat(this.performObjectSearch(objectterms[i], others));\n    }\n\n    // lookup as search terms in fulltext\n    results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));\n\n    // let the scorer override scores with a custom scoring function\n    if (Scorer.score) {\n      for (i = 0; i < results.length; i++)\n        results[i][4] = Scorer.score(results[i]);\n    }\n\n    // now sort the results by score (in opposite order of appearance, since the\n    // display function below uses pop() to retrieve items) and then\n    // alphabetically\n    results.sort(function(a, b) {\n      var left = a[4];\n      var right = b[4];\n      if (left > right) {\n        return 1;\n      } else if (left < right) {\n        return -1;\n      } else {\n        // same score: sort alphabetically\n        left = a[1].toLowerCase();\n        right = b[1].toLowerCase();\n        return (left > right) ? -1 : ((left < right) ? 1 : 0);\n      }\n    });\n\n    // for debugging\n    //Search.lastresults = results.slice();  // a copy\n    //console.info('search results:', Search.lastresults);\n\n    // print the results\n    var resultCount = results.length;\n    function displayNextItem() {\n      // results left, load the summary and display it\n      if (results.length) {\n        var item = results.pop();\n        var listItem = $('<li></li>');\n        var requestUrl = \"\";\n        var linkUrl = \"\";\n        if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {\n          // dirhtml builder\n          var dirname = item[0] + '/';\n          if (dirname.match(/\\/index\\/$/)) {\n            dirname = dirname.substring(0, dirname.length-6);\n          } else if (dirname == 'index/') {\n            dirname = '';\n          }\n          requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;\n          linkUrl = requestUrl;\n\n        } else {\n          // normal html builders\n          requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;\n          linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;\n        }\n        listItem.append($('<a/>').attr('href',\n            linkUrl +\n            highlightstring + item[2]).html(item[1]));\n        if (item[3]) {\n          listItem.append($('<span> (' + item[3] + ')</span>'));\n          Search.output.append(listItem);\n          setTimeout(function() {\n            displayNextItem();\n          }, 5);\n        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {\n          $.ajax({url: requestUrl,\n                  dataType: \"text\",\n                  complete: function(jqxhr, textstatus) {\n                    var data = jqxhr.responseText;\n                    if (data !== '' && data !== undefined) {\n                      var summary = Search.makeSearchSummary(data, searchterms, hlterms);\n                      if (summary) {\n                        listItem.append(summary);\n                      }\n                    }\n                    Search.output.append(listItem);\n                    setTimeout(function() {\n                      displayNextItem();\n                    }, 5);\n                  }});\n        } else {\n          // no source available, just display title\n          Search.output.append(listItem);\n          setTimeout(function() {\n            displayNextItem();\n          }, 5);\n        }\n      }\n      // search finished, update title and status message\n      else {\n        Search.stopPulse();\n        Search.title.text(_('Search Results'));\n        if (!resultCount)\n          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\\'ve selected enough categories.'));\n        else\n            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));\n        Search.status.fadeIn(500);\n      }\n    }\n    displayNextItem();\n  },\n\n  /**\n   * search for object names\n   */\n  performObjectSearch : function(object, otherterms) {\n    var filenames = this._index.filenames;\n    var docnames = this._index.docnames;\n    var objects = this._index.objects;\n    var objnames = this._index.objnames;\n    var titles = this._index.titles;\n\n    var i;\n    var results = [];\n\n    for (var prefix in objects) {\n      for (var iMatch = 0; iMatch != objects[prefix].length; ++iMatch) {\n        var match = objects[prefix][iMatch];\n        var name = match[4];\n        var fullname = (prefix ? prefix + '.' : '') + name;\n        var fullnameLower = fullname.toLowerCase()\n        if (fullnameLower.indexOf(object) > -1) {\n          var score = 0;\n          var parts = fullnameLower.split('.');\n          // check for different match types: exact matches of full name or\n          // \"last name\" (i.e. last dotted part)\n          if (fullnameLower == object || parts[parts.length - 1] == object) {\n            score += Scorer.objNameMatch;\n          // matches in last name\n          } else if (parts[parts.length - 1].indexOf(object) > -1) {\n            score += Scorer.objPartialMatch;\n          }\n          var objname = objnames[match[1]][2];\n          var title = titles[match[0]];\n          // If more than one term searched for, we require other words to be\n          // found in the name/title/description\n          if (otherterms.length > 0) {\n            var haystack = (prefix + ' ' + name + ' ' +\n                            objname + ' ' + title).toLowerCase();\n            var allfound = true;\n            for (i = 0; i < otherterms.length; i++) {\n              if (haystack.indexOf(otherterms[i]) == -1) {\n                allfound = false;\n                break;\n              }\n            }\n            if (!allfound) {\n              continue;\n            }\n          }\n          var descr = objname + _(', in ') + title;\n\n          var anchor = match[3];\n          if (anchor === '')\n            anchor = fullname;\n          else if (anchor == '-')\n            anchor = objnames[match[1]][1] + '-' + fullname;\n          // add custom score for some objects according to scorer\n          if (Scorer.objPrio.hasOwnProperty(match[2])) {\n            score += Scorer.objPrio[match[2]];\n          } else {\n            score += Scorer.objPrioDefault;\n          }\n          results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);\n        }\n      }\n    }\n\n    return results;\n  },\n\n  /**\n   * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n   */\n  escapeRegExp : function(string) {\n    return string.replace(/[.*+\\-?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n  },\n\n  /**\n   * search for full-text terms in the index\n   */\n  performTermsSearch : function(searchterms, excluded, terms, titleterms) {\n    var docnames = this._index.docnames;\n    var filenames = this._index.filenames;\n    var titles = this._index.titles;\n\n    var i, j, file;\n    var fileMap = {};\n    var scoreMap = {};\n    var results = [];\n\n    // perform the search on the required terms\n    for (i = 0; i < searchterms.length; i++) {\n      var word = searchterms[i];\n      var files = [];\n      var _o = [\n        {files: terms[word], score: Scorer.term},\n        {files: titleterms[word], score: Scorer.title}\n      ];\n      // add support for partial matches\n      if (word.length > 2) {\n        var word_regex = this.escapeRegExp(word);\n        for (var w in terms) {\n          if (w.match(word_regex) && !terms[word]) {\n            _o.push({files: terms[w], score: Scorer.partialTerm})\n          }\n        }\n        for (var w in titleterms) {\n          if (w.match(word_regex) && !titleterms[word]) {\n              _o.push({files: titleterms[w], score: Scorer.partialTitle})\n          }\n        }\n      }\n\n      // no match but word was a required one\n      if ($u.every(_o, function(o){return o.files === undefined;})) {\n        break;\n      }\n      // found search word in contents\n      $u.each(_o, function(o) {\n        var _files = o.files;\n        if (_files === undefined)\n          return\n\n        if (_files.length === undefined)\n          _files = [_files];\n        files = files.concat(_files);\n\n        // set score for the word in each file to Scorer.term\n        for (j = 0; j < _files.length; j++) {\n          file = _files[j];\n          if (!(file in scoreMap))\n            scoreMap[file] = {};\n          scoreMap[file][word] = o.score;\n        }\n      });\n\n      // create the mapping\n      for (j = 0; j < files.length; j++) {\n        file = files[j];\n        if (file in fileMap && fileMap[file].indexOf(word) === -1)\n          fileMap[file].push(word);\n        else\n          fileMap[file] = [word];\n      }\n    }\n\n    // now check if the files don't contain excluded terms\n    for (file in fileMap) {\n      var valid = true;\n\n      // check if all requirements are matched\n      var filteredTermCount = // as search terms with length < 3 are discarded: ignore\n        searchterms.filter(function(term){return term.length > 2}).length\n      if (\n        fileMap[file].length != searchterms.length &&\n        fileMap[file].length != filteredTermCount\n      ) continue;\n\n      // ensure that none of the excluded terms is in the search result\n      for (i = 0; i < excluded.length; i++) {\n        if (terms[excluded[i]] == file ||\n            titleterms[excluded[i]] == file ||\n            $u.contains(terms[excluded[i]] || [], file) ||\n            $u.contains(titleterms[excluded[i]] || [], file)) {\n          valid = false;\n          break;\n        }\n      }\n\n      // if we have still a valid result we can add it to the result list\n      if (valid) {\n        // select one (max) score for the file.\n        // for better ranking, we should calculate ranking by using words statistics like basic tf-idf...\n        var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));\n        results.push([docnames[file], titles[file], '', null, score, filenames[file]]);\n      }\n    }\n    return results;\n  },\n\n  /**\n   * helper function to return a node containing the\n   * search summary for a given text. keywords is a list\n   * of stemmed words, hlwords is the list of normal, unstemmed\n   * words. the first one is used to find the occurrence, the\n   * latter for highlighting it.\n   */\n  makeSearchSummary : function(htmlText, keywords, hlwords) {\n    var text = Search.htmlToText(htmlText);\n    if (text == \"\") {\n      return null;\n    }\n    var textLower = text.toLowerCase();\n    var start = 0;\n    $.each(keywords, function() {\n      var i = textLower.indexOf(this.toLowerCase());\n      if (i > -1)\n        start = i;\n    });\n    start = Math.max(start - 120, 0);\n    var excerpt = ((start > 0) ? '...' : '') +\n      $.trim(text.substr(start, 240)) +\n      ((start + 240 - text.length) ? '...' : '');\n    var rv = $('<p class=\"context\"></p>').text(excerpt);\n    $.each(hlwords, function() {\n      rv = rv.highlightText(this, 'highlighted');\n    });\n    return rv;\n  }\n};\n\n$(document).ready(function() {\n  Search.init();\n});\n"
  },
  {
    "path": "docs/_static/underscore-1.13.1.js",
    "content": "(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define('underscore', factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {\n    var current = global._;\n    var exports = global._ = factory();\n    exports.noConflict = function () { global._ = current; return exports; };\n  }()));\n}(this, (function () {\n  //     Underscore.js 1.13.1\n  //     https://underscorejs.org\n  //     (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors\n  //     Underscore may be freely distributed under the MIT license.\n\n  // Current version.\n  var VERSION = '1.13.1';\n\n  // Establish the root object, `window` (`self`) in the browser, `global`\n  // on the server, or `this` in some virtual machines. We use `self`\n  // instead of `window` for `WebWorker` support.\n  var root = typeof self == 'object' && self.self === self && self ||\n            typeof global == 'object' && global.global === global && global ||\n            Function('return this')() ||\n            {};\n\n  // Save bytes in the minified (but not gzipped) version:\n  var ArrayProto = Array.prototype, ObjProto = Object.prototype;\n  var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n  // Create quick reference variables for speed access to core prototypes.\n  var push = ArrayProto.push,\n      slice = ArrayProto.slice,\n      toString = ObjProto.toString,\n      hasOwnProperty = ObjProto.hasOwnProperty;\n\n  // Modern feature detection.\n  var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',\n      supportsDataView = typeof DataView !== 'undefined';\n\n  // All **ECMAScript 5+** native function implementations that we hope to use\n  // are declared here.\n  var nativeIsArray = Array.isArray,\n      nativeKeys = Object.keys,\n      nativeCreate = Object.create,\n      nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;\n\n  // Create references to these builtin functions because we override them.\n  var _isNaN = isNaN,\n      _isFinite = isFinite;\n\n  // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n  var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n  var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n    'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n  // The largest integer that can be represented exactly.\n  var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n\n  // Some functions take a variable number of arguments, or a few expected\n  // arguments at the beginning and then a variable number of values to operate\n  // on. This helper accumulates all remaining arguments past the function’s\n  // argument length (or an explicit `startIndex`), into an array that becomes\n  // the last argument. Similar to ES6’s \"rest parameter\".\n  function restArguments(func, startIndex) {\n    startIndex = startIndex == null ? func.length - 1 : +startIndex;\n    return function() {\n      var length = Math.max(arguments.length - startIndex, 0),\n          rest = Array(length),\n          index = 0;\n      for (; index < length; index++) {\n        rest[index] = arguments[index + startIndex];\n      }\n      switch (startIndex) {\n        case 0: return func.call(this, rest);\n        case 1: return func.call(this, arguments[0], rest);\n        case 2: return func.call(this, arguments[0], arguments[1], rest);\n      }\n      var args = Array(startIndex + 1);\n      for (index = 0; index < startIndex; index++) {\n        args[index] = arguments[index];\n      }\n      args[startIndex] = rest;\n      return func.apply(this, args);\n    };\n  }\n\n  // Is a given variable an object?\n  function isObject(obj) {\n    var type = typeof obj;\n    return type === 'function' || type === 'object' && !!obj;\n  }\n\n  // Is a given value equal to null?\n  function isNull(obj) {\n    return obj === null;\n  }\n\n  // Is a given variable undefined?\n  function isUndefined(obj) {\n    return obj === void 0;\n  }\n\n  // Is a given value a boolean?\n  function isBoolean(obj) {\n    return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n  }\n\n  // Is a given value a DOM element?\n  function isElement(obj) {\n    return !!(obj && obj.nodeType === 1);\n  }\n\n  // Internal function for creating a `toString`-based type tester.\n  function tagTester(name) {\n    var tag = '[object ' + name + ']';\n    return function(obj) {\n      return toString.call(obj) === tag;\n    };\n  }\n\n  var isString = tagTester('String');\n\n  var isNumber = tagTester('Number');\n\n  var isDate = tagTester('Date');\n\n  var isRegExp = tagTester('RegExp');\n\n  var isError = tagTester('Error');\n\n  var isSymbol = tagTester('Symbol');\n\n  var isArrayBuffer = tagTester('ArrayBuffer');\n\n  var isFunction = tagTester('Function');\n\n  // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old\n  // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\n  var nodelist = root.document && root.document.childNodes;\n  if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n    isFunction = function(obj) {\n      return typeof obj == 'function' || false;\n    };\n  }\n\n  var isFunction$1 = isFunction;\n\n  var hasObjectTag = tagTester('Object');\n\n  // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.\n  // In IE 11, the most common among them, this problem also applies to\n  // `Map`, `WeakMap` and `Set`.\n  var hasStringTagBug = (\n        supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))\n      ),\n      isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));\n\n  var isDataView = tagTester('DataView');\n\n  // In IE 10 - Edge 13, we need a different heuristic\n  // to determine whether an object is a `DataView`.\n  function ie10IsDataView(obj) {\n    return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);\n  }\n\n  var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);\n\n  // Is a given value an array?\n  // Delegates to ECMA5's native `Array.isArray`.\n  var isArray = nativeIsArray || tagTester('Array');\n\n  // Internal function to check whether `key` is an own property name of `obj`.\n  function has$1(obj, key) {\n    return obj != null && hasOwnProperty.call(obj, key);\n  }\n\n  var isArguments = tagTester('Arguments');\n\n  // Define a fallback version of the method in browsers (ahem, IE < 9), where\n  // there isn't any inspectable \"Arguments\" type.\n  (function() {\n    if (!isArguments(arguments)) {\n      isArguments = function(obj) {\n        return has$1(obj, 'callee');\n      };\n    }\n  }());\n\n  var isArguments$1 = isArguments;\n\n  // Is a given object a finite number?\n  function isFinite$1(obj) {\n    return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));\n  }\n\n  // Is the given value `NaN`?\n  function isNaN$1(obj) {\n    return isNumber(obj) && _isNaN(obj);\n  }\n\n  // Predicate-generating function. Often useful outside of Underscore.\n  function constant(value) {\n    return function() {\n      return value;\n    };\n  }\n\n  // Common internal logic for `isArrayLike` and `isBufferLike`.\n  function createSizePropertyCheck(getSizeProperty) {\n    return function(collection) {\n      var sizeProperty = getSizeProperty(collection);\n      return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n    }\n  }\n\n  // Internal helper to generate a function to obtain property `key` from `obj`.\n  function shallowProperty(key) {\n    return function(obj) {\n      return obj == null ? void 0 : obj[key];\n    };\n  }\n\n  // Internal helper to obtain the `byteLength` property of an object.\n  var getByteLength = shallowProperty('byteLength');\n\n  // Internal helper to determine whether we should spend extensive checks against\n  // `ArrayBuffer` et al.\n  var isBufferLike = createSizePropertyCheck(getByteLength);\n\n  // Is a given value a typed array?\n  var typedArrayPattern = /\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;\n  function isTypedArray(obj) {\n    // `ArrayBuffer.isView` is the most future-proof, so use it when available.\n    // Otherwise, fall back on the above regular expression.\n    return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :\n                  isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));\n  }\n\n  var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);\n\n  // Internal helper to obtain the `length` property of an object.\n  var getLength = shallowProperty('length');\n\n  // Internal helper to create a simple lookup structure.\n  // `collectNonEnumProps` used to depend on `_.contains`, but this led to\n  // circular imports. `emulatedSet` is a one-off solution that only works for\n  // arrays of strings.\n  function emulatedSet(keys) {\n    var hash = {};\n    for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;\n    return {\n      contains: function(key) { return hash[key]; },\n      push: function(key) {\n        hash[key] = true;\n        return keys.push(key);\n      }\n    };\n  }\n\n  // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't\n  // be iterated by `for key in ...` and thus missed. Extends `keys` in place if\n  // needed.\n  function collectNonEnumProps(obj, keys) {\n    keys = emulatedSet(keys);\n    var nonEnumIdx = nonEnumerableProps.length;\n    var constructor = obj.constructor;\n    var proto = isFunction$1(constructor) && constructor.prototype || ObjProto;\n\n    // Constructor is a special case.\n    var prop = 'constructor';\n    if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);\n\n    while (nonEnumIdx--) {\n      prop = nonEnumerableProps[nonEnumIdx];\n      if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {\n        keys.push(prop);\n      }\n    }\n  }\n\n  // Retrieve the names of an object's own properties.\n  // Delegates to **ECMAScript 5**'s native `Object.keys`.\n  function keys(obj) {\n    if (!isObject(obj)) return [];\n    if (nativeKeys) return nativeKeys(obj);\n    var keys = [];\n    for (var key in obj) if (has$1(obj, key)) keys.push(key);\n    // Ahem, IE < 9.\n    if (hasEnumBug) collectNonEnumProps(obj, keys);\n    return keys;\n  }\n\n  // Is a given array, string, or object empty?\n  // An \"empty\" object has no enumerable own-properties.\n  function isEmpty(obj) {\n    if (obj == null) return true;\n    // Skip the more expensive `toString`-based type checks if `obj` has no\n    // `.length`.\n    var length = getLength(obj);\n    if (typeof length == 'number' && (\n      isArray(obj) || isString(obj) || isArguments$1(obj)\n    )) return length === 0;\n    return getLength(keys(obj)) === 0;\n  }\n\n  // Returns whether an object has a given set of `key:value` pairs.\n  function isMatch(object, attrs) {\n    var _keys = keys(attrs), length = _keys.length;\n    if (object == null) return !length;\n    var obj = Object(object);\n    for (var i = 0; i < length; i++) {\n      var key = _keys[i];\n      if (attrs[key] !== obj[key] || !(key in obj)) return false;\n    }\n    return true;\n  }\n\n  // If Underscore is called as a function, it returns a wrapped object that can\n  // be used OO-style. This wrapper holds altered versions of all functions added\n  // through `_.mixin`. Wrapped objects may be chained.\n  function _$1(obj) {\n    if (obj instanceof _$1) return obj;\n    if (!(this instanceof _$1)) return new _$1(obj);\n    this._wrapped = obj;\n  }\n\n  _$1.VERSION = VERSION;\n\n  // Extracts the result from a wrapped and chained object.\n  _$1.prototype.value = function() {\n    return this._wrapped;\n  };\n\n  // Provide unwrapping proxies for some methods used in engine operations\n  // such as arithmetic and JSON stringification.\n  _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;\n\n  _$1.prototype.toString = function() {\n    return String(this._wrapped);\n  };\n\n  // Internal function to wrap or shallow-copy an ArrayBuffer,\n  // typed array or DataView to a new view, reusing the buffer.\n  function toBufferView(bufferSource) {\n    return new Uint8Array(\n      bufferSource.buffer || bufferSource,\n      bufferSource.byteOffset || 0,\n      getByteLength(bufferSource)\n    );\n  }\n\n  // We use this string twice, so give it a name for minification.\n  var tagDataView = '[object DataView]';\n\n  // Internal recursive comparison function for `_.isEqual`.\n  function eq(a, b, aStack, bStack) {\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n    if (a === b) return a !== 0 || 1 / a === 1 / b;\n    // `null` or `undefined` only equal to itself (strict comparison).\n    if (a == null || b == null) return false;\n    // `NaN`s are equivalent, but non-reflexive.\n    if (a !== a) return b !== b;\n    // Exhaust primitive checks\n    var type = typeof a;\n    if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n    return deepEq(a, b, aStack, bStack);\n  }\n\n  // Internal recursive comparison function for `_.isEqual`.\n  function deepEq(a, b, aStack, bStack) {\n    // Unwrap any wrapped objects.\n    if (a instanceof _$1) a = a._wrapped;\n    if (b instanceof _$1) b = b._wrapped;\n    // Compare `[[Class]]` names.\n    var className = toString.call(a);\n    if (className !== toString.call(b)) return false;\n    // Work around a bug in IE 10 - Edge 13.\n    if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {\n      if (!isDataView$1(b)) return false;\n      className = tagDataView;\n    }\n    switch (className) {\n      // These types are compared by value.\n      case '[object RegExp]':\n        // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n      case '[object String]':\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n        // equivalent to `new String(\"5\")`.\n        return '' + a === '' + b;\n      case '[object Number]':\n        // `NaN`s are equivalent, but non-reflexive.\n        // Object(NaN) is equivalent to NaN.\n        if (+a !== +a) return +b !== +b;\n        // An `egal` comparison is performed for other numeric values.\n        return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n      case '[object Date]':\n      case '[object Boolean]':\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n        // millisecond representations. Note that invalid dates with millisecond representations\n        // of `NaN` are not equivalent.\n        return +a === +b;\n      case '[object Symbol]':\n        return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n      case '[object ArrayBuffer]':\n      case tagDataView:\n        // Coerce to typed array so we can fall through.\n        return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);\n    }\n\n    var areArrays = className === '[object Array]';\n    if (!areArrays && isTypedArray$1(a)) {\n        var byteLength = getByteLength(a);\n        if (byteLength !== getByteLength(b)) return false;\n        if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;\n        areArrays = true;\n    }\n    if (!areArrays) {\n      if (typeof a != 'object' || typeof b != 'object') return false;\n\n      // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n      // from different frames are.\n      var aCtor = a.constructor, bCtor = b.constructor;\n      if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&\n                               isFunction$1(bCtor) && bCtor instanceof bCtor)\n                          && ('constructor' in a && 'constructor' in b)) {\n        return false;\n      }\n    }\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n    // Initializing stack of traversed objects.\n    // It's done here since we only need them for objects and arrays comparison.\n    aStack = aStack || [];\n    bStack = bStack || [];\n    var length = aStack.length;\n    while (length--) {\n      // Linear search. Performance is inversely proportional to the number of\n      // unique nested structures.\n      if (aStack[length] === a) return bStack[length] === b;\n    }\n\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a);\n    bStack.push(b);\n\n    // Recursively compare objects and arrays.\n    if (areArrays) {\n      // Compare array lengths to determine if a deep comparison is necessary.\n      length = a.length;\n      if (length !== b.length) return false;\n      // Deep compare the contents, ignoring non-numeric properties.\n      while (length--) {\n        if (!eq(a[length], b[length], aStack, bStack)) return false;\n      }\n    } else {\n      // Deep compare objects.\n      var _keys = keys(a), key;\n      length = _keys.length;\n      // Ensure that both objects contain the same number of properties before comparing deep equality.\n      if (keys(b).length !== length) return false;\n      while (length--) {\n        // Deep compare each member\n        key = _keys[length];\n        if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n      }\n    }\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop();\n    bStack.pop();\n    return true;\n  }\n\n  // Perform a deep comparison to check if two objects are equal.\n  function isEqual(a, b) {\n    return eq(a, b);\n  }\n\n  // Retrieve all the enumerable property names of an object.\n  function allKeys(obj) {\n    if (!isObject(obj)) return [];\n    var keys = [];\n    for (var key in obj) keys.push(key);\n    // Ahem, IE < 9.\n    if (hasEnumBug) collectNonEnumProps(obj, keys);\n    return keys;\n  }\n\n  // Since the regular `Object.prototype.toString` type tests don't work for\n  // some types in IE 11, we use a fingerprinting heuristic instead, based\n  // on the methods. It's not great, but it's the best we got.\n  // The fingerprint method lists are defined below.\n  function ie11fingerprint(methods) {\n    var length = getLength(methods);\n    return function(obj) {\n      if (obj == null) return false;\n      // `Map`, `WeakMap` and `Set` have no enumerable keys.\n      var keys = allKeys(obj);\n      if (getLength(keys)) return false;\n      for (var i = 0; i < length; i++) {\n        if (!isFunction$1(obj[methods[i]])) return false;\n      }\n      // If we are testing against `WeakMap`, we need to ensure that\n      // `obj` doesn't have a `forEach` method in order to distinguish\n      // it from a regular `Map`.\n      return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);\n    };\n  }\n\n  // In the interest of compact minification, we write\n  // each string in the fingerprints only once.\n  var forEachName = 'forEach',\n      hasName = 'has',\n      commonInit = ['clear', 'delete'],\n      mapTail = ['get', hasName, 'set'];\n\n  // `Map`, `WeakMap` and `Set` each have slightly different\n  // combinations of the above sublists.\n  var mapMethods = commonInit.concat(forEachName, mapTail),\n      weakMapMethods = commonInit.concat(mapTail),\n      setMethods = ['add'].concat(commonInit, forEachName, hasName);\n\n  var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');\n\n  var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');\n\n  var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');\n\n  var isWeakSet = tagTester('WeakSet');\n\n  // Retrieve the values of an object's properties.\n  function values(obj) {\n    var _keys = keys(obj);\n    var length = _keys.length;\n    var values = Array(length);\n    for (var i = 0; i < length; i++) {\n      values[i] = obj[_keys[i]];\n    }\n    return values;\n  }\n\n  // Convert an object into a list of `[key, value]` pairs.\n  // The opposite of `_.object` with one argument.\n  function pairs(obj) {\n    var _keys = keys(obj);\n    var length = _keys.length;\n    var pairs = Array(length);\n    for (var i = 0; i < length; i++) {\n      pairs[i] = [_keys[i], obj[_keys[i]]];\n    }\n    return pairs;\n  }\n\n  // Invert the keys and values of an object. The values must be serializable.\n  function invert(obj) {\n    var result = {};\n    var _keys = keys(obj);\n    for (var i = 0, length = _keys.length; i < length; i++) {\n      result[obj[_keys[i]]] = _keys[i];\n    }\n    return result;\n  }\n\n  // Return a sorted list of the function names available on the object.\n  function functions(obj) {\n    var names = [];\n    for (var key in obj) {\n      if (isFunction$1(obj[key])) names.push(key);\n    }\n    return names.sort();\n  }\n\n  // An internal function for creating assigner functions.\n  function createAssigner(keysFunc, defaults) {\n    return function(obj) {\n      var length = arguments.length;\n      if (defaults) obj = Object(obj);\n      if (length < 2 || obj == null) return obj;\n      for (var index = 1; index < length; index++) {\n        var source = arguments[index],\n            keys = keysFunc(source),\n            l = keys.length;\n        for (var i = 0; i < l; i++) {\n          var key = keys[i];\n          if (!defaults || obj[key] === void 0) obj[key] = source[key];\n        }\n      }\n      return obj;\n    };\n  }\n\n  // Extend a given object with all the properties in passed-in object(s).\n  var extend = createAssigner(allKeys);\n\n  // Assigns a given object with all the own properties in the passed-in\n  // object(s).\n  // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n  var extendOwn = createAssigner(keys);\n\n  // Fill in a given object with default properties.\n  var defaults = createAssigner(allKeys, true);\n\n  // Create a naked function reference for surrogate-prototype-swapping.\n  function ctor() {\n    return function(){};\n  }\n\n  // An internal function for creating a new object that inherits from another.\n  function baseCreate(prototype) {\n    if (!isObject(prototype)) return {};\n    if (nativeCreate) return nativeCreate(prototype);\n    var Ctor = ctor();\n    Ctor.prototype = prototype;\n    var result = new Ctor;\n    Ctor.prototype = null;\n    return result;\n  }\n\n  // Creates an object that inherits from the given prototype object.\n  // If additional properties are provided then they will be added to the\n  // created object.\n  function create(prototype, props) {\n    var result = baseCreate(prototype);\n    if (props) extendOwn(result, props);\n    return result;\n  }\n\n  // Create a (shallow-cloned) duplicate of an object.\n  function clone(obj) {\n    if (!isObject(obj)) return obj;\n    return isArray(obj) ? obj.slice() : extend({}, obj);\n  }\n\n  // Invokes `interceptor` with the `obj` and then returns `obj`.\n  // The primary purpose of this method is to \"tap into\" a method chain, in\n  // order to perform operations on intermediate results within the chain.\n  function tap(obj, interceptor) {\n    interceptor(obj);\n    return obj;\n  }\n\n  // Normalize a (deep) property `path` to array.\n  // Like `_.iteratee`, this function can be customized.\n  function toPath$1(path) {\n    return isArray(path) ? path : [path];\n  }\n  _$1.toPath = toPath$1;\n\n  // Internal wrapper for `_.toPath` to enable minification.\n  // Similar to `cb` for `_.iteratee`.\n  function toPath(path) {\n    return _$1.toPath(path);\n  }\n\n  // Internal function to obtain a nested property in `obj` along `path`.\n  function deepGet(obj, path) {\n    var length = path.length;\n    for (var i = 0; i < length; i++) {\n      if (obj == null) return void 0;\n      obj = obj[path[i]];\n    }\n    return length ? obj : void 0;\n  }\n\n  // Get the value of the (deep) property on `path` from `object`.\n  // If any property in `path` does not exist or if the value is\n  // `undefined`, return `defaultValue` instead.\n  // The `path` is normalized through `_.toPath`.\n  function get(object, path, defaultValue) {\n    var value = deepGet(object, toPath(path));\n    return isUndefined(value) ? defaultValue : value;\n  }\n\n  // Shortcut function for checking if an object has a given property directly on\n  // itself (in other words, not on a prototype). Unlike the internal `has`\n  // function, this public version can also traverse nested properties.\n  function has(obj, path) {\n    path = toPath(path);\n    var length = path.length;\n    for (var i = 0; i < length; i++) {\n      var key = path[i];\n      if (!has$1(obj, key)) return false;\n      obj = obj[key];\n    }\n    return !!length;\n  }\n\n  // Keep the identity function around for default iteratees.\n  function identity(value) {\n    return value;\n  }\n\n  // Returns a predicate for checking whether an object has a given set of\n  // `key:value` pairs.\n  function matcher(attrs) {\n    attrs = extendOwn({}, attrs);\n    return function(obj) {\n      return isMatch(obj, attrs);\n    };\n  }\n\n  // Creates a function that, when passed an object, will traverse that object’s\n  // properties down the given `path`, specified as an array of keys or indices.\n  function property(path) {\n    path = toPath(path);\n    return function(obj) {\n      return deepGet(obj, path);\n    };\n  }\n\n  // Internal function that returns an efficient (for current engines) version\n  // of the passed-in callback, to be repeatedly applied in other Underscore\n  // functions.\n  function optimizeCb(func, context, argCount) {\n    if (context === void 0) return func;\n    switch (argCount == null ? 3 : argCount) {\n      case 1: return function(value) {\n        return func.call(context, value);\n      };\n      // The 2-argument case is omitted because we’re not using it.\n      case 3: return function(value, index, collection) {\n        return func.call(context, value, index, collection);\n      };\n      case 4: return function(accumulator, value, index, collection) {\n        return func.call(context, accumulator, value, index, collection);\n      };\n    }\n    return function() {\n      return func.apply(context, arguments);\n    };\n  }\n\n  // An internal function to generate callbacks that can be applied to each\n  // element in a collection, returning the desired result — either `_.identity`,\n  // an arbitrary callback, a property matcher, or a property accessor.\n  function baseIteratee(value, context, argCount) {\n    if (value == null) return identity;\n    if (isFunction$1(value)) return optimizeCb(value, context, argCount);\n    if (isObject(value) && !isArray(value)) return matcher(value);\n    return property(value);\n  }\n\n  // External wrapper for our callback generator. Users may customize\n  // `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n  // This abstraction hides the internal-only `argCount` argument.\n  function iteratee(value, context) {\n    return baseIteratee(value, context, Infinity);\n  }\n  _$1.iteratee = iteratee;\n\n  // The function we call internally to generate a callback. It invokes\n  // `_.iteratee` if overridden, otherwise `baseIteratee`.\n  function cb(value, context, argCount) {\n    if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);\n    return baseIteratee(value, context, argCount);\n  }\n\n  // Returns the results of applying the `iteratee` to each element of `obj`.\n  // In contrast to `_.map` it returns an object.\n  function mapObject(obj, iteratee, context) {\n    iteratee = cb(iteratee, context);\n    var _keys = keys(obj),\n        length = _keys.length,\n        results = {};\n    for (var index = 0; index < length; index++) {\n      var currentKey = _keys[index];\n      results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n    }\n    return results;\n  }\n\n  // Predicate-generating function. Often useful outside of Underscore.\n  function noop(){}\n\n  // Generates a function for a given object that returns a given property.\n  function propertyOf(obj) {\n    if (obj == null) return noop;\n    return function(path) {\n      return get(obj, path);\n    };\n  }\n\n  // Run a function **n** times.\n  function times(n, iteratee, context) {\n    var accum = Array(Math.max(0, n));\n    iteratee = optimizeCb(iteratee, context, 1);\n    for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n    return accum;\n  }\n\n  // Return a random integer between `min` and `max` (inclusive).\n  function random(min, max) {\n    if (max == null) {\n      max = min;\n      min = 0;\n    }\n    return min + Math.floor(Math.random() * (max - min + 1));\n  }\n\n  // A (possibly faster) way to get the current timestamp as an integer.\n  var now = Date.now || function() {\n    return new Date().getTime();\n  };\n\n  // Internal helper to generate functions for escaping and unescaping strings\n  // to/from HTML interpolation.\n  function createEscaper(map) {\n    var escaper = function(match) {\n      return map[match];\n    };\n    // Regexes for identifying a key that needs to be escaped.\n    var source = '(?:' + keys(map).join('|') + ')';\n    var testRegexp = RegExp(source);\n    var replaceRegexp = RegExp(source, 'g');\n    return function(string) {\n      string = string == null ? '' : '' + string;\n      return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n    };\n  }\n\n  // Internal list of HTML entities for escaping.\n  var escapeMap = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#x27;',\n    '`': '&#x60;'\n  };\n\n  // Function for escaping strings to HTML interpolation.\n  var _escape = createEscaper(escapeMap);\n\n  // Internal list of HTML entities for unescaping.\n  var unescapeMap = invert(escapeMap);\n\n  // Function for unescaping strings from HTML interpolation.\n  var _unescape = createEscaper(unescapeMap);\n\n  // By default, Underscore uses ERB-style template delimiters. Change the\n  // following template settings to use alternative delimiters.\n  var templateSettings = _$1.templateSettings = {\n    evaluate: /<%([\\s\\S]+?)%>/g,\n    interpolate: /<%=([\\s\\S]+?)%>/g,\n    escape: /<%-([\\s\\S]+?)%>/g\n  };\n\n  // When customizing `_.templateSettings`, if you don't want to define an\n  // interpolation, evaluation or escaping regex, we need one that is\n  // guaranteed not to match.\n  var noMatch = /(.)^/;\n\n  // Certain characters need to be escaped so that they can be put into a\n  // string literal.\n  var escapes = {\n    \"'\": \"'\",\n    '\\\\': '\\\\',\n    '\\r': 'r',\n    '\\n': 'n',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  var escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n  function escapeChar(match) {\n    return '\\\\' + escapes[match];\n  }\n\n  // In order to prevent third-party code injection through\n  // `_.templateSettings.variable`, we test it against the following regular\n  // expression. It is intentionally a bit more liberal than just matching valid\n  // identifiers, but still prevents possible loopholes through defaults or\n  // destructuring assignment.\n  var bareIdentifier = /^\\s*(\\w|\\$)+\\s*$/;\n\n  // JavaScript micro-templating, similar to John Resig's implementation.\n  // Underscore templating handles arbitrary delimiters, preserves whitespace,\n  // and correctly escapes quotes within interpolated code.\n  // NB: `oldSettings` only exists for backwards compatibility.\n  function template(text, settings, oldSettings) {\n    if (!settings && oldSettings) settings = oldSettings;\n    settings = defaults({}, settings, _$1.templateSettings);\n\n    // Combine delimiters into one regular expression via alternation.\n    var matcher = RegExp([\n      (settings.escape || noMatch).source,\n      (settings.interpolate || noMatch).source,\n      (settings.evaluate || noMatch).source\n    ].join('|') + '|$', 'g');\n\n    // Compile the template source, escaping string literals appropriately.\n    var index = 0;\n    var source = \"__p+='\";\n    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n      source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n      index = offset + match.length;\n\n      if (escape) {\n        source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n      } else if (interpolate) {\n        source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n      } else if (evaluate) {\n        source += \"';\\n\" + evaluate + \"\\n__p+='\";\n      }\n\n      // Adobe VMs need the match returned to produce the correct offset.\n      return match;\n    });\n    source += \"';\\n\";\n\n    var argument = settings.variable;\n    if (argument) {\n      // Insure against third-party code injection. (CVE-2021-23358)\n      if (!bareIdentifier.test(argument)) throw new Error(\n        'variable is not a bare identifier: ' + argument\n      );\n    } else {\n      // If a variable is not specified, place data values in local scope.\n      source = 'with(obj||{}){\\n' + source + '}\\n';\n      argument = 'obj';\n    }\n\n    source = \"var __t,__p='',__j=Array.prototype.join,\" +\n      \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n      source + 'return __p;\\n';\n\n    var render;\n    try {\n      render = new Function(argument, '_', source);\n    } catch (e) {\n      e.source = source;\n      throw e;\n    }\n\n    var template = function(data) {\n      return render.call(this, data, _$1);\n    };\n\n    // Provide the compiled source as a convenience for precompilation.\n    template.source = 'function(' + argument + '){\\n' + source + '}';\n\n    return template;\n  }\n\n  // Traverses the children of `obj` along `path`. If a child is a function, it\n  // is invoked with its parent as context. Returns the value of the final\n  // child, or `fallback` if any child is undefined.\n  function result(obj, path, fallback) {\n    path = toPath(path);\n    var length = path.length;\n    if (!length) {\n      return isFunction$1(fallback) ? fallback.call(obj) : fallback;\n    }\n    for (var i = 0; i < length; i++) {\n      var prop = obj == null ? void 0 : obj[path[i]];\n      if (prop === void 0) {\n        prop = fallback;\n        i = length; // Ensure we don't continue iterating.\n      }\n      obj = isFunction$1(prop) ? prop.call(obj) : prop;\n    }\n    return obj;\n  }\n\n  // Generate a unique integer id (unique within the entire client session).\n  // Useful for temporary DOM ids.\n  var idCounter = 0;\n  function uniqueId(prefix) {\n    var id = ++idCounter + '';\n    return prefix ? prefix + id : id;\n  }\n\n  // Start chaining a wrapped Underscore object.\n  function chain(obj) {\n    var instance = _$1(obj);\n    instance._chain = true;\n    return instance;\n  }\n\n  // Internal function to execute `sourceFunc` bound to `context` with optional\n  // `args`. Determines whether to execute a function as a constructor or as a\n  // normal function.\n  function executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n    if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n    var self = baseCreate(sourceFunc.prototype);\n    var result = sourceFunc.apply(self, args);\n    if (isObject(result)) return result;\n    return self;\n  }\n\n  // Partially apply a function by creating a version that has had some of its\n  // arguments pre-filled, without changing its dynamic `this` context. `_` acts\n  // as a placeholder by default, allowing any combination of arguments to be\n  // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\n  var partial = restArguments(function(func, boundArgs) {\n    var placeholder = partial.placeholder;\n    var bound = function() {\n      var position = 0, length = boundArgs.length;\n      var args = Array(length);\n      for (var i = 0; i < length; i++) {\n        args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n      }\n      while (position < arguments.length) args.push(arguments[position++]);\n      return executeBound(func, bound, this, this, args);\n    };\n    return bound;\n  });\n\n  partial.placeholder = _$1;\n\n  // Create a function bound to a given object (assigning `this`, and arguments,\n  // optionally).\n  var bind = restArguments(function(func, context, args) {\n    if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');\n    var bound = restArguments(function(callArgs) {\n      return executeBound(func, bound, context, this, args.concat(callArgs));\n    });\n    return bound;\n  });\n\n  // Internal helper for collection methods to determine whether a collection\n  // should be iterated as an array or as an object.\n  // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n  // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n  var isArrayLike = createSizePropertyCheck(getLength);\n\n  // Internal implementation of a recursive `flatten` function.\n  function flatten$1(input, depth, strict, output) {\n    output = output || [];\n    if (!depth && depth !== 0) {\n      depth = Infinity;\n    } else if (depth <= 0) {\n      return output.concat(input);\n    }\n    var idx = output.length;\n    for (var i = 0, length = getLength(input); i < length; i++) {\n      var value = input[i];\n      if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {\n        // Flatten current level of array or arguments object.\n        if (depth > 1) {\n          flatten$1(value, depth - 1, strict, output);\n          idx = output.length;\n        } else {\n          var j = 0, len = value.length;\n          while (j < len) output[idx++] = value[j++];\n        }\n      } else if (!strict) {\n        output[idx++] = value;\n      }\n    }\n    return output;\n  }\n\n  // Bind a number of an object's methods to that object. Remaining arguments\n  // are the method names to be bound. Useful for ensuring that all callbacks\n  // defined on an object belong to it.\n  var bindAll = restArguments(function(obj, keys) {\n    keys = flatten$1(keys, false, false);\n    var index = keys.length;\n    if (index < 1) throw new Error('bindAll must be passed function names');\n    while (index--) {\n      var key = keys[index];\n      obj[key] = bind(obj[key], obj);\n    }\n    return obj;\n  });\n\n  // Memoize an expensive function by storing its results.\n  function memoize(func, hasher) {\n    var memoize = function(key) {\n      var cache = memoize.cache;\n      var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n      if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);\n      return cache[address];\n    };\n    memoize.cache = {};\n    return memoize;\n  }\n\n  // Delays a function for the given number of milliseconds, and then calls\n  // it with the arguments supplied.\n  var delay = restArguments(function(func, wait, args) {\n    return setTimeout(function() {\n      return func.apply(null, args);\n    }, wait);\n  });\n\n  // Defers a function, scheduling it to run after the current call stack has\n  // cleared.\n  var defer = partial(delay, _$1, 1);\n\n  // Returns a function, that, when invoked, will only be triggered at most once\n  // during a given window of time. Normally, the throttled function will run\n  // as much as it can, without ever going more than once per `wait` duration;\n  // but if you'd like to disable the execution on the leading edge, pass\n  // `{leading: false}`. To disable execution on the trailing edge, ditto.\n  function throttle(func, wait, options) {\n    var timeout, context, args, result;\n    var previous = 0;\n    if (!options) options = {};\n\n    var later = function() {\n      previous = options.leading === false ? 0 : now();\n      timeout = null;\n      result = func.apply(context, args);\n      if (!timeout) context = args = null;\n    };\n\n    var throttled = function() {\n      var _now = now();\n      if (!previous && options.leading === false) previous = _now;\n      var remaining = wait - (_now - previous);\n      context = this;\n      args = arguments;\n      if (remaining <= 0 || remaining > wait) {\n        if (timeout) {\n          clearTimeout(timeout);\n          timeout = null;\n        }\n        previous = _now;\n        result = func.apply(context, args);\n        if (!timeout) context = args = null;\n      } else if (!timeout && options.trailing !== false) {\n        timeout = setTimeout(later, remaining);\n      }\n      return result;\n    };\n\n    throttled.cancel = function() {\n      clearTimeout(timeout);\n      previous = 0;\n      timeout = context = args = null;\n    };\n\n    return throttled;\n  }\n\n  // When a sequence of calls of the returned function ends, the argument\n  // function is triggered. The end of a sequence is defined by the `wait`\n  // parameter. If `immediate` is passed, the argument function will be\n  // triggered at the beginning of the sequence instead of at the end.\n  function debounce(func, wait, immediate) {\n    var timeout, previous, args, result, context;\n\n    var later = function() {\n      var passed = now() - previous;\n      if (wait > passed) {\n        timeout = setTimeout(later, wait - passed);\n      } else {\n        timeout = null;\n        if (!immediate) result = func.apply(context, args);\n        // This check is needed because `func` can recursively invoke `debounced`.\n        if (!timeout) args = context = null;\n      }\n    };\n\n    var debounced = restArguments(function(_args) {\n      context = this;\n      args = _args;\n      previous = now();\n      if (!timeout) {\n        timeout = setTimeout(later, wait);\n        if (immediate) result = func.apply(context, args);\n      }\n      return result;\n    });\n\n    debounced.cancel = function() {\n      clearTimeout(timeout);\n      timeout = args = context = null;\n    };\n\n    return debounced;\n  }\n\n  // Returns the first function passed as an argument to the second,\n  // allowing you to adjust arguments, run code before and after, and\n  // conditionally execute the original function.\n  function wrap(func, wrapper) {\n    return partial(wrapper, func);\n  }\n\n  // Returns a negated version of the passed-in predicate.\n  function negate(predicate) {\n    return function() {\n      return !predicate.apply(this, arguments);\n    };\n  }\n\n  // Returns a function that is the composition of a list of functions, each\n  // consuming the return value of the function that follows.\n  function compose() {\n    var args = arguments;\n    var start = args.length - 1;\n    return function() {\n      var i = start;\n      var result = args[start].apply(this, arguments);\n      while (i--) result = args[i].call(this, result);\n      return result;\n    };\n  }\n\n  // Returns a function that will only be executed on and after the Nth call.\n  function after(times, func) {\n    return function() {\n      if (--times < 1) {\n        return func.apply(this, arguments);\n      }\n    };\n  }\n\n  // Returns a function that will only be executed up to (but not including) the\n  // Nth call.\n  function before(times, func) {\n    var memo;\n    return function() {\n      if (--times > 0) {\n        memo = func.apply(this, arguments);\n      }\n      if (times <= 1) func = null;\n      return memo;\n    };\n  }\n\n  // Returns a function that will be executed at most one time, no matter how\n  // often you call it. Useful for lazy initialization.\n  var once = partial(before, 2);\n\n  // Returns the first key on an object that passes a truth test.\n  function findKey(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var _keys = keys(obj), key;\n    for (var i = 0, length = _keys.length; i < length; i++) {\n      key = _keys[i];\n      if (predicate(obj[key], key, obj)) return key;\n    }\n  }\n\n  // Internal function to generate `_.findIndex` and `_.findLastIndex`.\n  function createPredicateIndexFinder(dir) {\n    return function(array, predicate, context) {\n      predicate = cb(predicate, context);\n      var length = getLength(array);\n      var index = dir > 0 ? 0 : length - 1;\n      for (; index >= 0 && index < length; index += dir) {\n        if (predicate(array[index], index, array)) return index;\n      }\n      return -1;\n    };\n  }\n\n  // Returns the first index on an array-like that passes a truth test.\n  var findIndex = createPredicateIndexFinder(1);\n\n  // Returns the last index on an array-like that passes a truth test.\n  var findLastIndex = createPredicateIndexFinder(-1);\n\n  // Use a comparator function to figure out the smallest index at which\n  // an object should be inserted so as to maintain order. Uses binary search.\n  function sortedIndex(array, obj, iteratee, context) {\n    iteratee = cb(iteratee, context, 1);\n    var value = iteratee(obj);\n    var low = 0, high = getLength(array);\n    while (low < high) {\n      var mid = Math.floor((low + high) / 2);\n      if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n    }\n    return low;\n  }\n\n  // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.\n  function createIndexFinder(dir, predicateFind, sortedIndex) {\n    return function(array, item, idx) {\n      var i = 0, length = getLength(array);\n      if (typeof idx == 'number') {\n        if (dir > 0) {\n          i = idx >= 0 ? idx : Math.max(idx + length, i);\n        } else {\n          length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n        }\n      } else if (sortedIndex && idx && length) {\n        idx = sortedIndex(array, item);\n        return array[idx] === item ? idx : -1;\n      }\n      if (item !== item) {\n        idx = predicateFind(slice.call(array, i, length), isNaN$1);\n        return idx >= 0 ? idx + i : -1;\n      }\n      for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n        if (array[idx] === item) return idx;\n      }\n      return -1;\n    };\n  }\n\n  // Return the position of the first occurrence of an item in an array,\n  // or -1 if the item is not included in the array.\n  // If the array is large and already in sort order, pass `true`\n  // for **isSorted** to use binary search.\n  var indexOf = createIndexFinder(1, findIndex, sortedIndex);\n\n  // Return the position of the last occurrence of an item in an array,\n  // or -1 if the item is not included in the array.\n  var lastIndexOf = createIndexFinder(-1, findLastIndex);\n\n  // Return the first value which passes a truth test.\n  function find(obj, predicate, context) {\n    var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n    var key = keyFinder(obj, predicate, context);\n    if (key !== void 0 && key !== -1) return obj[key];\n  }\n\n  // Convenience version of a common use case of `_.find`: getting the first\n  // object containing specific `key:value` pairs.\n  function findWhere(obj, attrs) {\n    return find(obj, matcher(attrs));\n  }\n\n  // The cornerstone for collection functions, an `each`\n  // implementation, aka `forEach`.\n  // Handles raw objects in addition to array-likes. Treats all\n  // sparse array-likes as if they were dense.\n  function each(obj, iteratee, context) {\n    iteratee = optimizeCb(iteratee, context);\n    var i, length;\n    if (isArrayLike(obj)) {\n      for (i = 0, length = obj.length; i < length; i++) {\n        iteratee(obj[i], i, obj);\n      }\n    } else {\n      var _keys = keys(obj);\n      for (i = 0, length = _keys.length; i < length; i++) {\n        iteratee(obj[_keys[i]], _keys[i], obj);\n      }\n    }\n    return obj;\n  }\n\n  // Return the results of applying the iteratee to each element.\n  function map(obj, iteratee, context) {\n    iteratee = cb(iteratee, context);\n    var _keys = !isArrayLike(obj) && keys(obj),\n        length = (_keys || obj).length,\n        results = Array(length);\n    for (var index = 0; index < length; index++) {\n      var currentKey = _keys ? _keys[index] : index;\n      results[index] = iteratee(obj[currentKey], currentKey, obj);\n    }\n    return results;\n  }\n\n  // Internal helper to create a reducing function, iterating left or right.\n  function createReduce(dir) {\n    // Wrap code that reassigns argument variables in a separate function than\n    // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n    var reducer = function(obj, iteratee, memo, initial) {\n      var _keys = !isArrayLike(obj) && keys(obj),\n          length = (_keys || obj).length,\n          index = dir > 0 ? 0 : length - 1;\n      if (!initial) {\n        memo = obj[_keys ? _keys[index] : index];\n        index += dir;\n      }\n      for (; index >= 0 && index < length; index += dir) {\n        var currentKey = _keys ? _keys[index] : index;\n        memo = iteratee(memo, obj[currentKey], currentKey, obj);\n      }\n      return memo;\n    };\n\n    return function(obj, iteratee, memo, context) {\n      var initial = arguments.length >= 3;\n      return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n    };\n  }\n\n  // **Reduce** builds up a single result from a list of values, aka `inject`,\n  // or `foldl`.\n  var reduce = createReduce(1);\n\n  // The right-associative version of reduce, also known as `foldr`.\n  var reduceRight = createReduce(-1);\n\n  // Return all the elements that pass a truth test.\n  function filter(obj, predicate, context) {\n    var results = [];\n    predicate = cb(predicate, context);\n    each(obj, function(value, index, list) {\n      if (predicate(value, index, list)) results.push(value);\n    });\n    return results;\n  }\n\n  // Return all the elements for which a truth test fails.\n  function reject(obj, predicate, context) {\n    return filter(obj, negate(cb(predicate)), context);\n  }\n\n  // Determine whether all of the elements pass a truth test.\n  function every(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var _keys = !isArrayLike(obj) && keys(obj),\n        length = (_keys || obj).length;\n    for (var index = 0; index < length; index++) {\n      var currentKey = _keys ? _keys[index] : index;\n      if (!predicate(obj[currentKey], currentKey, obj)) return false;\n    }\n    return true;\n  }\n\n  // Determine if at least one element in the object passes a truth test.\n  function some(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var _keys = !isArrayLike(obj) && keys(obj),\n        length = (_keys || obj).length;\n    for (var index = 0; index < length; index++) {\n      var currentKey = _keys ? _keys[index] : index;\n      if (predicate(obj[currentKey], currentKey, obj)) return true;\n    }\n    return false;\n  }\n\n  // Determine if the array or object contains a given item (using `===`).\n  function contains(obj, item, fromIndex, guard) {\n    if (!isArrayLike(obj)) obj = values(obj);\n    if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n    return indexOf(obj, item, fromIndex) >= 0;\n  }\n\n  // Invoke a method (with arguments) on every item in a collection.\n  var invoke = restArguments(function(obj, path, args) {\n    var contextPath, func;\n    if (isFunction$1(path)) {\n      func = path;\n    } else {\n      path = toPath(path);\n      contextPath = path.slice(0, -1);\n      path = path[path.length - 1];\n    }\n    return map(obj, function(context) {\n      var method = func;\n      if (!method) {\n        if (contextPath && contextPath.length) {\n          context = deepGet(context, contextPath);\n        }\n        if (context == null) return void 0;\n        method = context[path];\n      }\n      return method == null ? method : method.apply(context, args);\n    });\n  });\n\n  // Convenience version of a common use case of `_.map`: fetching a property.\n  function pluck(obj, key) {\n    return map(obj, property(key));\n  }\n\n  // Convenience version of a common use case of `_.filter`: selecting only\n  // objects containing specific `key:value` pairs.\n  function where(obj, attrs) {\n    return filter(obj, matcher(attrs));\n  }\n\n  // Return the maximum element (or element-based computation).\n  function max(obj, iteratee, context) {\n    var result = -Infinity, lastComputed = -Infinity,\n        value, computed;\n    if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n      obj = isArrayLike(obj) ? obj : values(obj);\n      for (var i = 0, length = obj.length; i < length; i++) {\n        value = obj[i];\n        if (value != null && value > result) {\n          result = value;\n        }\n      }\n    } else {\n      iteratee = cb(iteratee, context);\n      each(obj, function(v, index, list) {\n        computed = iteratee(v, index, list);\n        if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n          result = v;\n          lastComputed = computed;\n        }\n      });\n    }\n    return result;\n  }\n\n  // Return the minimum element (or element-based computation).\n  function min(obj, iteratee, context) {\n    var result = Infinity, lastComputed = Infinity,\n        value, computed;\n    if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n      obj = isArrayLike(obj) ? obj : values(obj);\n      for (var i = 0, length = obj.length; i < length; i++) {\n        value = obj[i];\n        if (value != null && value < result) {\n          result = value;\n        }\n      }\n    } else {\n      iteratee = cb(iteratee, context);\n      each(obj, function(v, index, list) {\n        computed = iteratee(v, index, list);\n        if (computed < lastComputed || computed === Infinity && result === Infinity) {\n          result = v;\n          lastComputed = computed;\n        }\n      });\n    }\n    return result;\n  }\n\n  // Sample **n** random values from a collection using the modern version of the\n  // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n  // If **n** is not specified, returns a single random element.\n  // The internal `guard` argument allows it to work with `_.map`.\n  function sample(obj, n, guard) {\n    if (n == null || guard) {\n      if (!isArrayLike(obj)) obj = values(obj);\n      return obj[random(obj.length - 1)];\n    }\n    var sample = isArrayLike(obj) ? clone(obj) : values(obj);\n    var length = getLength(sample);\n    n = Math.max(Math.min(n, length), 0);\n    var last = length - 1;\n    for (var index = 0; index < n; index++) {\n      var rand = random(index, last);\n      var temp = sample[index];\n      sample[index] = sample[rand];\n      sample[rand] = temp;\n    }\n    return sample.slice(0, n);\n  }\n\n  // Shuffle a collection.\n  function shuffle(obj) {\n    return sample(obj, Infinity);\n  }\n\n  // Sort the object's values by a criterion produced by an iteratee.\n  function sortBy(obj, iteratee, context) {\n    var index = 0;\n    iteratee = cb(iteratee, context);\n    return pluck(map(obj, function(value, key, list) {\n      return {\n        value: value,\n        index: index++,\n        criteria: iteratee(value, key, list)\n      };\n    }).sort(function(left, right) {\n      var a = left.criteria;\n      var b = right.criteria;\n      if (a !== b) {\n        if (a > b || a === void 0) return 1;\n        if (a < b || b === void 0) return -1;\n      }\n      return left.index - right.index;\n    }), 'value');\n  }\n\n  // An internal function used for aggregate \"group by\" operations.\n  function group(behavior, partition) {\n    return function(obj, iteratee, context) {\n      var result = partition ? [[], []] : {};\n      iteratee = cb(iteratee, context);\n      each(obj, function(value, index) {\n        var key = iteratee(value, index, obj);\n        behavior(result, value, key);\n      });\n      return result;\n    };\n  }\n\n  // Groups the object's values by a criterion. Pass either a string attribute\n  // to group by, or a function that returns the criterion.\n  var groupBy = group(function(result, value, key) {\n    if (has$1(result, key)) result[key].push(value); else result[key] = [value];\n  });\n\n  // Indexes the object's values by a criterion, similar to `_.groupBy`, but for\n  // when you know that your index values will be unique.\n  var indexBy = group(function(result, value, key) {\n    result[key] = value;\n  });\n\n  // Counts instances of an object that group by a certain criterion. Pass\n  // either a string attribute to count by, or a function that returns the\n  // criterion.\n  var countBy = group(function(result, value, key) {\n    if (has$1(result, key)) result[key]++; else result[key] = 1;\n  });\n\n  // Split a collection into two arrays: one whose elements all pass the given\n  // truth test, and one whose elements all do not pass the truth test.\n  var partition = group(function(result, value, pass) {\n    result[pass ? 0 : 1].push(value);\n  }, true);\n\n  // Safely create a real, live array from anything iterable.\n  var reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\n  function toArray(obj) {\n    if (!obj) return [];\n    if (isArray(obj)) return slice.call(obj);\n    if (isString(obj)) {\n      // Keep surrogate pair characters together.\n      return obj.match(reStrSymbol);\n    }\n    if (isArrayLike(obj)) return map(obj, identity);\n    return values(obj);\n  }\n\n  // Return the number of elements in a collection.\n  function size(obj) {\n    if (obj == null) return 0;\n    return isArrayLike(obj) ? obj.length : keys(obj).length;\n  }\n\n  // Internal `_.pick` helper function to determine whether `key` is an enumerable\n  // property name of `obj`.\n  function keyInObj(value, key, obj) {\n    return key in obj;\n  }\n\n  // Return a copy of the object only containing the allowed properties.\n  var pick = restArguments(function(obj, keys) {\n    var result = {}, iteratee = keys[0];\n    if (obj == null) return result;\n    if (isFunction$1(iteratee)) {\n      if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n      keys = allKeys(obj);\n    } else {\n      iteratee = keyInObj;\n      keys = flatten$1(keys, false, false);\n      obj = Object(obj);\n    }\n    for (var i = 0, length = keys.length; i < length; i++) {\n      var key = keys[i];\n      var value = obj[key];\n      if (iteratee(value, key, obj)) result[key] = value;\n    }\n    return result;\n  });\n\n  // Return a copy of the object without the disallowed properties.\n  var omit = restArguments(function(obj, keys) {\n    var iteratee = keys[0], context;\n    if (isFunction$1(iteratee)) {\n      iteratee = negate(iteratee);\n      if (keys.length > 1) context = keys[1];\n    } else {\n      keys = map(flatten$1(keys, false, false), String);\n      iteratee = function(value, key) {\n        return !contains(keys, key);\n      };\n    }\n    return pick(obj, iteratee, context);\n  });\n\n  // Returns everything but the last entry of the array. Especially useful on\n  // the arguments object. Passing **n** will return all the values in\n  // the array, excluding the last N.\n  function initial(array, n, guard) {\n    return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n  }\n\n  // Get the first element of an array. Passing **n** will return the first N\n  // values in the array. The **guard** check allows it to work with `_.map`.\n  function first(array, n, guard) {\n    if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n    if (n == null || guard) return array[0];\n    return initial(array, array.length - n);\n  }\n\n  // Returns everything but the first entry of the `array`. Especially useful on\n  // the `arguments` object. Passing an **n** will return the rest N values in the\n  // `array`.\n  function rest(array, n, guard) {\n    return slice.call(array, n == null || guard ? 1 : n);\n  }\n\n  // Get the last element of an array. Passing **n** will return the last N\n  // values in the array.\n  function last(array, n, guard) {\n    if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n    if (n == null || guard) return array[array.length - 1];\n    return rest(array, Math.max(0, array.length - n));\n  }\n\n  // Trim out all falsy values from an array.\n  function compact(array) {\n    return filter(array, Boolean);\n  }\n\n  // Flatten out an array, either recursively (by default), or up to `depth`.\n  // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.\n  function flatten(array, depth) {\n    return flatten$1(array, depth, false);\n  }\n\n  // Take the difference between one array and a number of other arrays.\n  // Only the elements present in just the first array will remain.\n  var difference = restArguments(function(array, rest) {\n    rest = flatten$1(rest, true, true);\n    return filter(array, function(value){\n      return !contains(rest, value);\n    });\n  });\n\n  // Return a version of the array that does not contain the specified value(s).\n  var without = restArguments(function(array, otherArrays) {\n    return difference(array, otherArrays);\n  });\n\n  // Produce a duplicate-free version of the array. If the array has already\n  // been sorted, you have the option of using a faster algorithm.\n  // The faster algorithm will not work with an iteratee if the iteratee\n  // is not a one-to-one function, so providing an iteratee will disable\n  // the faster algorithm.\n  function uniq(array, isSorted, iteratee, context) {\n    if (!isBoolean(isSorted)) {\n      context = iteratee;\n      iteratee = isSorted;\n      isSorted = false;\n    }\n    if (iteratee != null) iteratee = cb(iteratee, context);\n    var result = [];\n    var seen = [];\n    for (var i = 0, length = getLength(array); i < length; i++) {\n      var value = array[i],\n          computed = iteratee ? iteratee(value, i, array) : value;\n      if (isSorted && !iteratee) {\n        if (!i || seen !== computed) result.push(value);\n        seen = computed;\n      } else if (iteratee) {\n        if (!contains(seen, computed)) {\n          seen.push(computed);\n          result.push(value);\n        }\n      } else if (!contains(result, value)) {\n        result.push(value);\n      }\n    }\n    return result;\n  }\n\n  // Produce an array that contains the union: each distinct element from all of\n  // the passed-in arrays.\n  var union = restArguments(function(arrays) {\n    return uniq(flatten$1(arrays, true, true));\n  });\n\n  // Produce an array that contains every item shared between all the\n  // passed-in arrays.\n  function intersection(array) {\n    var result = [];\n    var argsLength = arguments.length;\n    for (var i = 0, length = getLength(array); i < length; i++) {\n      var item = array[i];\n      if (contains(result, item)) continue;\n      var j;\n      for (j = 1; j < argsLength; j++) {\n        if (!contains(arguments[j], item)) break;\n      }\n      if (j === argsLength) result.push(item);\n    }\n    return result;\n  }\n\n  // Complement of zip. Unzip accepts an array of arrays and groups\n  // each array's elements on shared indices.\n  function unzip(array) {\n    var length = array && max(array, getLength).length || 0;\n    var result = Array(length);\n\n    for (var index = 0; index < length; index++) {\n      result[index] = pluck(array, index);\n    }\n    return result;\n  }\n\n  // Zip together multiple lists into a single array -- elements that share\n  // an index go together.\n  var zip = restArguments(unzip);\n\n  // Converts lists into objects. Pass either a single array of `[key, value]`\n  // pairs, or two parallel arrays of the same length -- one of keys, and one of\n  // the corresponding values. Passing by pairs is the reverse of `_.pairs`.\n  function object(list, values) {\n    var result = {};\n    for (var i = 0, length = getLength(list); i < length; i++) {\n      if (values) {\n        result[list[i]] = values[i];\n      } else {\n        result[list[i][0]] = list[i][1];\n      }\n    }\n    return result;\n  }\n\n  // Generate an integer Array containing an arithmetic progression. A port of\n  // the native Python `range()` function. See\n  // [the Python documentation](https://docs.python.org/library/functions.html#range).\n  function range(start, stop, step) {\n    if (stop == null) {\n      stop = start || 0;\n      start = 0;\n    }\n    if (!step) {\n      step = stop < start ? -1 : 1;\n    }\n\n    var length = Math.max(Math.ceil((stop - start) / step), 0);\n    var range = Array(length);\n\n    for (var idx = 0; idx < length; idx++, start += step) {\n      range[idx] = start;\n    }\n\n    return range;\n  }\n\n  // Chunk a single array into multiple arrays, each containing `count` or fewer\n  // items.\n  function chunk(array, count) {\n    if (count == null || count < 1) return [];\n    var result = [];\n    var i = 0, length = array.length;\n    while (i < length) {\n      result.push(slice.call(array, i, i += count));\n    }\n    return result;\n  }\n\n  // Helper function to continue chaining intermediate results.\n  function chainResult(instance, obj) {\n    return instance._chain ? _$1(obj).chain() : obj;\n  }\n\n  // Add your own custom functions to the Underscore object.\n  function mixin(obj) {\n    each(functions(obj), function(name) {\n      var func = _$1[name] = obj[name];\n      _$1.prototype[name] = function() {\n        var args = [this._wrapped];\n        push.apply(args, arguments);\n        return chainResult(this, func.apply(_$1, args));\n      };\n    });\n    return _$1;\n  }\n\n  // Add all mutator `Array` functions to the wrapper.\n  each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n    var method = ArrayProto[name];\n    _$1.prototype[name] = function() {\n      var obj = this._wrapped;\n      if (obj != null) {\n        method.apply(obj, arguments);\n        if ((name === 'shift' || name === 'splice') && obj.length === 0) {\n          delete obj[0];\n        }\n      }\n      return chainResult(this, obj);\n    };\n  });\n\n  // Add all accessor `Array` functions to the wrapper.\n  each(['concat', 'join', 'slice'], function(name) {\n    var method = ArrayProto[name];\n    _$1.prototype[name] = function() {\n      var obj = this._wrapped;\n      if (obj != null) obj = method.apply(obj, arguments);\n      return chainResult(this, obj);\n    };\n  });\n\n  // Named Exports\n\n  var allExports = {\n    __proto__: null,\n    VERSION: VERSION,\n    restArguments: restArguments,\n    isObject: isObject,\n    isNull: isNull,\n    isUndefined: isUndefined,\n    isBoolean: isBoolean,\n    isElement: isElement,\n    isString: isString,\n    isNumber: isNumber,\n    isDate: isDate,\n    isRegExp: isRegExp,\n    isError: isError,\n    isSymbol: isSymbol,\n    isArrayBuffer: isArrayBuffer,\n    isDataView: isDataView$1,\n    isArray: isArray,\n    isFunction: isFunction$1,\n    isArguments: isArguments$1,\n    isFinite: isFinite$1,\n    isNaN: isNaN$1,\n    isTypedArray: isTypedArray$1,\n    isEmpty: isEmpty,\n    isMatch: isMatch,\n    isEqual: isEqual,\n    isMap: isMap,\n    isWeakMap: isWeakMap,\n    isSet: isSet,\n    isWeakSet: isWeakSet,\n    keys: keys,\n    allKeys: allKeys,\n    values: values,\n    pairs: pairs,\n    invert: invert,\n    functions: functions,\n    methods: functions,\n    extend: extend,\n    extendOwn: extendOwn,\n    assign: extendOwn,\n    defaults: defaults,\n    create: create,\n    clone: clone,\n    tap: tap,\n    get: get,\n    has: has,\n    mapObject: mapObject,\n    identity: identity,\n    constant: constant,\n    noop: noop,\n    toPath: toPath$1,\n    property: property,\n    propertyOf: propertyOf,\n    matcher: matcher,\n    matches: matcher,\n    times: times,\n    random: random,\n    now: now,\n    escape: _escape,\n    unescape: _unescape,\n    templateSettings: templateSettings,\n    template: template,\n    result: result,\n    uniqueId: uniqueId,\n    chain: chain,\n    iteratee: iteratee,\n    partial: partial,\n    bind: bind,\n    bindAll: bindAll,\n    memoize: memoize,\n    delay: delay,\n    defer: defer,\n    throttle: throttle,\n    debounce: debounce,\n    wrap: wrap,\n    negate: negate,\n    compose: compose,\n    after: after,\n    before: before,\n    once: once,\n    findKey: findKey,\n    findIndex: findIndex,\n    findLastIndex: findLastIndex,\n    sortedIndex: sortedIndex,\n    indexOf: indexOf,\n    lastIndexOf: lastIndexOf,\n    find: find,\n    detect: find,\n    findWhere: findWhere,\n    each: each,\n    forEach: each,\n    map: map,\n    collect: map,\n    reduce: reduce,\n    foldl: reduce,\n    inject: reduce,\n    reduceRight: reduceRight,\n    foldr: reduceRight,\n    filter: filter,\n    select: filter,\n    reject: reject,\n    every: every,\n    all: every,\n    some: some,\n    any: some,\n    contains: contains,\n    includes: contains,\n    include: contains,\n    invoke: invoke,\n    pluck: pluck,\n    where: where,\n    max: max,\n    min: min,\n    shuffle: shuffle,\n    sample: sample,\n    sortBy: sortBy,\n    groupBy: groupBy,\n    indexBy: indexBy,\n    countBy: countBy,\n    partition: partition,\n    toArray: toArray,\n    size: size,\n    pick: pick,\n    omit: omit,\n    first: first,\n    head: first,\n    take: first,\n    initial: initial,\n    last: last,\n    rest: rest,\n    tail: rest,\n    drop: rest,\n    compact: compact,\n    flatten: flatten,\n    without: without,\n    uniq: uniq,\n    unique: uniq,\n    union: union,\n    intersection: intersection,\n    difference: difference,\n    unzip: unzip,\n    transpose: unzip,\n    zip: zip,\n    object: object,\n    range: range,\n    chunk: chunk,\n    mixin: mixin,\n    'default': _$1\n  };\n\n  // Default Export\n\n  // Add all of the Underscore functions to the wrapper object.\n  var _ = mixin(allExports);\n  // Legacy Node.js API.\n  _._ = _;\n\n  return _;\n\n})));\n//# sourceMappingURL=underscore-umd.js.map\n"
  },
  {
    "path": "docs/_static/underscore.js",
    "content": "!function(n,r){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=r():\"function\"==typeof define&&define.amd?define(\"underscore\",r):(n=\"undefined\"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){\n//     Underscore.js 1.13.1\n//     https://underscorejs.org\n//     (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors\n//     Underscore may be freely distributed under the MIT license.\nvar n=\"1.13.1\",r=\"object\"==typeof self&&self.self===self&&self||\"object\"==typeof global&&global.global===global&&global||Function(\"return this\")()||{},t=Array.prototype,e=Object.prototype,u=\"undefined\"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c=\"undefined\"!=typeof ArrayBuffer,l=\"undefined\"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable(\"toString\"),b=[\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return\"function\"===r||\"object\"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||\"[object Boolean]\"===a.call(n)}function x(n){var r=\"[object \"+n+\"]\";return function(n){return a.call(n)===r}}var S=x(\"String\"),O=x(\"Number\"),M=x(\"Date\"),E=x(\"RegExp\"),B=x(\"Error\"),N=x(\"Symbol\"),I=x(\"ArrayBuffer\"),T=x(\"Function\"),k=r.document&&r.document.childNodes;\"function\"!=typeof/./&&\"object\"!=typeof Int8Array&&\"function\"!=typeof k&&(T=function(n){return\"function\"==typeof n||!1});var D=T,R=x(\"Object\"),F=l&&R(new DataView(new ArrayBuffer(8))),V=\"undefined\"!=typeof Map&&R(new Map),P=x(\"DataView\");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x(\"Array\");function W(n,r){return null!=n&&f.call(n,r)}var z=x(\"Arguments\");!function(){z(arguments)||(z=function(n){return W(n,\"callee\")})}();var L=z;function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){var t=n(r);return\"number\"==typeof t&&t>=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J(\"byteLength\"),H=K(G),Q=/\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J(\"length\");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i=\"constructor\";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un=\"[object DataView]\";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return(\"function\"===o||\"object\"===o||\"object\"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&\"[object Object]\"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case\"[object RegExp]\":case\"[object String]\":return\"\"+r==\"\"+t;case\"[object Number]\":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case\"[object Date]\":case\"[object Boolean]\":return+r==+t;case\"[object Symbol]\":return u.valueOf.call(r)===u.valueOf.call(t);case\"[object ArrayBuffer]\":case un:return n(en(r),en(t),e,o)}var f=\"[object Array]\"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if(\"object\"!=typeof r||\"object\"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&\"constructor\"in r&&\"constructor\"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return g&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn=\"forEach\",ln=\"has\",sn=[\"clear\",\"delete\"],pn=[\"get\",ln,\"set\"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=[\"add\"].concat(sn,cn,ln),dn=V?fn(vn):x(\"Map\"),gn=V?fn(hn):x(\"WeakMap\"),bn=V?fn(yn):x(\"Set\"),mn=x(\"WeakSet\");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function _n(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var o=arguments[u],i=n(o),a=i.length,f=0;f<a;f++){var c=i[f];r&&void 0!==t[c]||(t[c]=o[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!_(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return _(n)?U(n)?n.slice():xn({},n):n}function Bn(n){return U(n)?n:[n]}function Nn(n){return tn.toPath(n)}function In(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function Tn(n,r,t){var e=In(n,Nn(r));return w(e)?t:e}function kn(n){return n}function Dn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Rn(n){return n=Nn(n),function(r){return In(r,n)}}function Fn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return function(){return n.apply(r,arguments)}}function Vn(n,r,t){return null==n?kn:D(n)?Fn(n,r,t):_(n)&&!U(n)?Dn(n):Rn(n)}function Pn(n,r){return Vn(n,r,1/0)}function qn(n,r,t){return tn.iteratee!==Pn?tn.iteratee(n,r):Vn(n,r,t)}function Un(){}function Wn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=Bn,tn.iteratee=Pn;var zn=Date.now||function(){return(new Date).getTime()};function Ln(n){var r=function(r){return n[r]},t=\"(?:\"+nn(n).join(\"|\")+\")\",e=RegExp(t),u=RegExp(t,\"g\");return function(n){return n=null==n?\"\":\"\"+n,e.test(n)?n.replace(u,r):n}}var $n={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#x27;\",\"`\":\"&#x60;\"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},Gn=/(.)^/,Hn={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},Qn=/\\\\|'|\\r|\\n|\\u2028|\\u2029/g;function Xn(n){return\"\\\\\"+Hn[n]}var Yn=/^\\s*(\\w|\\$)+\\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a<o;a++)i[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)i.push(arguments[u++]);return nr(n,e,this,this,i)};return e}));rr.placeholder=tn;var tr=j((function(n,r,t){if(!D(n))throw new TypeError(\"Bind must be called on a function\");var e=j((function(u){return nr(n,e,r,this,t.concat(u))}));return e})),er=K(Y);function ur(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=Y(n);o<i;o++){var a=n[o];if(er(a)&&(U(a)||L(a)))if(r>1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var or=j((function(n,r){var t=(r=ur(r,!1,!1)).length;if(t<1)throw new Error(\"bindAll must be passed function names\");for(;t--;){var e=r[t];n[e]=tr(n[e],n)}return n}));var ir=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),ar=rr(ir,tn,1);function fr(n){return function(){return!n.apply(this,arguments)}}function cr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function pr(n){return function(r,t,e){t=qn(t,e);for(var u=Y(r),o=n>0?0:u-1;o>=0&&o<u;o+=n)if(t(r[o],o,r))return o;return-1}}var vr=pr(1),hr=pr(-1);function yr(n,r,t,e){for(var u=(t=qn(t,e,1))(r),o=0,i=Y(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function dr(n,r,t){return function(e,u,o){var a=0,f=Y(e);if(\"number\"==typeof o)n>0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o<f;o+=n)if(e[o]===u)return o;return-1}}var gr=dr(1,vr,yr),br=dr(-1,hr);function mr(n,r,t){var e=(er(n)?vr:sr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function jr(n,r,t){var e,u;if(r=Fn(r,t),er(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var o=nn(n);for(e=0,u=o.length;e<u;e++)r(n[o[e]],o[e],n)}return n}function _r(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function wr(n){var r=function(r,t,e,u){var o=!er(r)&&nn(r),i=(o||r).length,a=n>0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a<i;a+=n){var f=o?o[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var o=arguments.length>=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!r(n[i],i,n))return!1}return!0}function Mr(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function Er(n,r,t,e){return er(n)||(n=jn(n)),(\"number\"!=typeof t||e)&&(t=0),gr(n,r,t)>=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||\"number\"==typeof r&&\"object\"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>o&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i<r;i++){var a=Wn(i,o),f=e[i];e[i]=e[a],e[a]=f}return e.slice(0,r)}function kr(n,r){return function(t,e,u){var o=r?[[],[]]:{};return e=qn(e,u),jr(t,(function(r,u){var i=e(r,u,t);n(o,r,i)})),o}}var Dr=kr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Rr=kr((function(n,r,t){n[t]=r})),Fr=kr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Vr=kr((function(n,r,t){n[t?0:1].push(r)}),!0),Pr=/[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;function qr(n,r,t){return r in t}var Ur=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}return t})),Wr=j((function(n,r){var t,e=r[0];return D(e)?(e=fr(e),r.length>1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?Er(o,c)||(o.push(c),u.push(f)):Er(u,f)||u.push(f)}return u}var Gr=j((function(n){return Jr(ur(n,!0,!0))}));function Hr(n){for(var r=n&&Ir(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Nr(n,e);return t}var Qr=j(Hr);function Xr(n,r){return n._chain?tn(r).chain():r}function Yr(n){return jr(wn(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return o.apply(n,arguments),Xr(this,t.apply(tn,n))}})),tn}jr([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),\"shift\"!==n&&\"splice\"!==n||0!==t.length||delete t[0]),Xr(this,t)}})),jr([\"concat\",\"join\",\"slice\"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Xr(this,n)}}));var Zr=Yr({__proto__:null,VERSION:n,restArguments:j,isObject:_,isNull:function(n){return null===n},isUndefined:w,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&d(n)&&!isNaN(parseFloat(n))},isNaN:$,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return\"number\"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:dn,isWeakMap:gn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:_n,functions:wn,methods:wn,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:En,tap:function(n,r){return r(n),n},get:Tn,has:function(n,r){for(var t=(r=Nn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=qn(r,t);for(var e=nn(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:kn,constant:C,noop:Un,toPath:Bn,property:Rn,propertyOf:function(n){return null==n?Un:function(r){return Tn(n,r)}},matcher:Dn,matches:Dn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Fn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Wn,now:zn,escape:Cn,unescape:Kn,templateSettings:Jn,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e=RegExp([(r.escape||Gn).source,(r.interpolate||Gn).source,(r.evaluate||Gn).source].join(\"|\")+\"|$\",\"g\"),u=0,o=\"__p+='\";n.replace(e,(function(r,t,e,i,a){return o+=n.slice(u,a).replace(Qn,Xn),u=a+r.length,t?o+=\"'+\\n((__t=(\"+t+\"))==null?'':_.escape(__t))+\\n'\":e?o+=\"'+\\n((__t=(\"+e+\"))==null?'':__t)+\\n'\":i&&(o+=\"';\\n\"+i+\"\\n__p+='\"),r})),o+=\"';\\n\";var i,a=r.variable;if(a){if(!Yn.test(a))throw new Error(\"variable is not a bare identifier: \"+a)}else o=\"with(obj||{}){\\n\"+o+\"}\\n\",a=\"obj\";o=\"var __t,__p='',__j=Array.prototype.join,\"+\"print=function(){__p+=__j.call(arguments,'');};\\n\"+o+\"return __p;\\n\";try{i=new Function(a,\"_\",o)}catch(n){throw n.source=o,n}var f=function(n){return i.call(this,n,tn)};return f.source=\"function(\"+a+\"){\\n\"+o+\"}\",f},result:function(n,r,t){var e=(r=Nn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=D(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Zn+\"\";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Pn,partial:rr,bind:tr,bindAll:or,memoize:function(n,r){var t=function(e){var u=t.cache,o=\"\"+(r?r.apply(this,arguments):e);return W(u,o)||(u[o]=n.apply(this,arguments)),u[o]};return t.cache={},t},delay:ir,defer:ar,throttle:function(n,r,t){var e,u,o,i,a=0;t||(t={});var f=function(){a=!1===t.leading?0:zn(),e=null,i=n.apply(u,o),e||(u=o=null)},c=function(){var c=zn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,o=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||\"number\"==typeof r&&\"object\"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<o&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))<i||u===1/0&&o===1/0)&&(o=n,i=u)}));return o},shuffle:function(n){return Tr(n,1/0)},sample:Tr,sortBy:function(n,r,t){var e=0;return r=qn(r,t),Nr(_r(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),\"value\")},groupBy:Dr,indexBy:Rr,countBy:Fr,partition:Vr,toArray:function(n){return n?U(n)?i.call(n):S(n)?n.match(Pr):er(n)?_r(n,kn):jn(n):[]},size:function(n){return null==n?0:er(n)?n.length:nn(n).length},pick:Ur,omit:Wr,first:Lr,head:Lr,take:Lr,initial:zr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:$r(n,Math.max(0,n.length-r))},rest:$r,tail:$r,drop:$r,compact:function(n){return Sr(n,Boolean)},flatten:function(n,r){return ur(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:Gr,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var o=n[e];if(!Er(r,o)){var i;for(i=1;i<t&&Er(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Cr,unzip:Hr,transpose:Hr,zip:Qr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(i.call(n,e,e+=r));return t},mixin:Yr,default:tn});return Zr._=Zr,Zr}));"
  },
  {
    "path": "docs/api.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" /><meta name=\"generator\" content=\"Docutils 0.17.1: http://docutils.sourceforge.net/\" />\n\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Mab2Rec Public API &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n        <script async=\"async\" src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n    <link rel=\"prev\" title=\"Contributing\" href=\"contributing.html\" /> \n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"index.html\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul class=\"current\">\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a></li>\n<li class=\"toctree-l1 current\"><a class=\"current reference internal\" href=\"#\">Mab2Rec Public API</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#banditrecommender\">BanditRecommender</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#learningpolicy\">LearningPolicy</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#neighborhoodpolicy\">NeighborhoodPolicy</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#module-mab2rec.pipeline\">Pipeline</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#module-mab2rec.visualization\">Visualization</a></li>\n</ul>\n</li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"index.html\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"index.html\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Mab2Rec Public API</li>\n      <li class=\"wy-breadcrumbs-aside\">\n            <a href=\"_sources/api.rst.txt\" rel=\"nofollow\"> View page source</a>\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n  <section id=\"module-mab2rec\">\n<span id=\"mab2rec-public-api\"></span><span id=\"mab2rec-api\"></span><h1>Mab2Rec Public API<a class=\"headerlink\" href=\"#module-mab2rec\" title=\"Permalink to this headline\"></a></h1>\n<section id=\"banditrecommender\">\n<h2>BanditRecommender<a class=\"headerlink\" href=\"#banditrecommender\" title=\"Permalink to this headline\"></a></h2>\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.</span></span><span class=\"sig-name descname\"><span class=\"pre\">BanditRecommender</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">learning_policy</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.EpsilonGreedy\" title=\"mabwiser.mab.LearningPolicy.EpsilonGreedy\"><span class=\"pre\">mabwiser.mab.LearningPolicy.EpsilonGreedy</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.Popularity\" title=\"mabwiser.mab.LearningPolicy.Popularity\"><span class=\"pre\">mabwiser.mab.LearningPolicy.Popularity</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.Random\" title=\"mabwiser.mab.LearningPolicy.Random\"><span class=\"pre\">mabwiser.mab.LearningPolicy.Random</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.Softmax\" title=\"mabwiser.mab.LearningPolicy.Softmax\"><span class=\"pre\">mabwiser.mab.LearningPolicy.Softmax</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.ThompsonSampling\" title=\"mabwiser.mab.LearningPolicy.ThompsonSampling\"><span class=\"pre\">mabwiser.mab.LearningPolicy.ThompsonSampling</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.UCB1\" title=\"mabwiser.mab.LearningPolicy.UCB1\"><span class=\"pre\">mabwiser.mab.LearningPolicy.UCB1</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.LinGreedy\" title=\"mabwiser.mab.LearningPolicy.LinGreedy\"><span class=\"pre\">mabwiser.mab.LearningPolicy.LinGreedy</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.LinTS\" title=\"mabwiser.mab.LearningPolicy.LinTS\"><span class=\"pre\">mabwiser.mab.LearningPolicy.LinTS</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.LearningPolicy.LinUCB\" title=\"mabwiser.mab.LearningPolicy.LinUCB\"><span class=\"pre\">mabwiser.mab.LearningPolicy.LinUCB</span></a><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">neighborhood_policy</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">None</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.NeighborhoodPolicy.LSHNearest\" title=\"mabwiser.mab.NeighborhoodPolicy.LSHNearest\"><span class=\"pre\">mabwiser.mab.NeighborhoodPolicy.LSHNearest</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.NeighborhoodPolicy.Clusters\" title=\"mabwiser.mab.NeighborhoodPolicy.Clusters\"><span class=\"pre\">mabwiser.mab.NeighborhoodPolicy.Clusters</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.NeighborhoodPolicy.KNearest\" title=\"mabwiser.mab.NeighborhoodPolicy.KNearest\"><span class=\"pre\">mabwiser.mab.NeighborhoodPolicy.KNearest</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.NeighborhoodPolicy.Radius\" title=\"mabwiser.mab.NeighborhoodPolicy.Radius\"><span class=\"pre\">mabwiser.mab.NeighborhoodPolicy.Radius</span></a><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.NeighborhoodPolicy.TreeBandit\" title=\"mabwiser.mab.NeighborhoodPolicy.TreeBandit\"><span class=\"pre\">mabwiser.mab.NeighborhoodPolicy.TreeBandit</span></a><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">top_k</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">10</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">seed</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">12345</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">n_jobs</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">backend</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Bases: <code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">object</span></code></p>\n<p><strong>Mab2Rec: Multi-Armed Bandit Recommender</strong></p>\n<p>Mab2Rec is a library to support prototyping and building of bandit-based recommendation algorithms. It is powered\nby MABWiser which supports <strong>context-free</strong>, <strong>parametric</strong> and <strong>non-parametric</strong> <strong>contextual</strong> bandit models.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.learning_policy\">\n<span class=\"sig-name descname\"><span class=\"pre\">learning_policy</span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.learning_policy\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The learning policy.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>MABWiser LearningPolicy</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.neighborhood_policy\">\n<span class=\"sig-name descname\"><span class=\"pre\">neighborhood_policy</span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.neighborhood_policy\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The neighborhood policy.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>MABWiser NeighborhoodPolicy</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.top_k\">\n<span class=\"sig-name descname\"><span class=\"pre\">top_k</span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.top_k\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The number of items to recommend.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>int, default=10</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.seed\">\n<span class=\"sig-name descname\"><span class=\"pre\">seed</span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.seed\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The random seed to initialize the internal random number generator.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>int, Constants.default_seed</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.n_jobs\">\n<span class=\"sig-name descname\"><span class=\"pre\">n_jobs</span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.n_jobs\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>This is used to specify how many concurrent processes/threads should be used for parallelized routines.\nDefault value is set to 1.\nIf set to -1, all CPUs are used.\nIf set to -2, all CPUs but one are used, and so on.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>int</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.backend\">\n<span class=\"sig-name descname\"><span class=\"pre\">backend</span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.backend\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Specify a parallelization backend implementation supported in the joblib library. Supported options are:\n- “loky” used by default, can induce some communication and memory overhead when exchanging input and</p>\n<blockquote>\n<div><p>output data with the worker Python processes.</p>\n</div></blockquote>\n<ul class=\"simple\">\n<li><p>“multiprocessing” previous process-based backend based on multiprocessing.Pool. Less robust than loky.</p></li>\n<li><p>“threading” is a very low-overhead backend but it suffers from the Python Global Interpreter Lock if the\ncalled function relies a lot on Python objects.</p></li>\n</ul>\n<p>Default value is None. In this case the default backend selected by joblib will be used.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>str, optional</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.mab\">\n<span class=\"sig-name descname\"><span class=\"pre\">mab</span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.mab\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The multi-armed bandit.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>MAB</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Examples</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mab2rec</span> <span class=\"kn\">import</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm3&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm3&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span> <span class=\"o\">=</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">EpsilonGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mf\">0.25</span><span class=\"p\">),</span> <span class=\"n\">top_k</span><span class=\"o\">=</span><span class=\"mi\">2</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">recommend</span><span class=\"p\">()</span>\n<span class=\"go\">[&#39;Arm2&#39;, &#39;Arm1&#39;]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">add_arm</span><span class=\"p\">(</span><span class=\"s1\">&#39;Arm4&#39;</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">partial_fit</span><span class=\"p\">([</span><span class=\"s1\">&#39;Arm4&#39;</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">])</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">recommend</span><span class=\"p\">()[</span><span class=\"mi\">0</span><span class=\"p\">]</span>\n<span class=\"go\">[&#39;Arm2&#39;, &#39;Arm4&#39;]</span>\n</pre></div>\n</div>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mab2rec</span> <span class=\"kn\">import</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"p\">,</span> <span class=\"n\">NeighborhoodPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm3&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm3&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span> <span class=\"o\">=</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">EpsilonGreedy</span><span class=\"p\">(),</span> <span class=\"n\">NeighborhoodPolicy</span><span class=\"o\">.</span><span class=\"n\">KNearest</span><span class=\"p\">(</span><span class=\"n\">k</span><span class=\"o\">=</span><span class=\"mi\">3</span><span class=\"p\">),</span> <span class=\"n\">top_k</span><span class=\"o\">=</span><span class=\"mi\">2</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">recommend</span><span class=\"p\">([[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]])</span>\n<span class=\"go\">[[&#39;Arm2&#39;, &#39;Arm3&#39;], [&#39;Arm3&#39;, &#39;Arm2&#39;], [&#39;Arm3&#39;, &#39;Arm2&#39;]]</span>\n</pre></div>\n</div>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mab2rec</span> <span class=\"kn\">import</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm3&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm3&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span> <span class=\"o\">=</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">LinGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mf\">0.1</span><span class=\"p\">),</span> <span class=\"n\">top_k</span><span class=\"o\">=</span><span class=\"mi\">2</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">recommend</span><span class=\"p\">([[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]])</span>\n<span class=\"go\">[[&#39;Arm2&#39;, &#39;Arm1&#39;], [&#39;Arm2&#39;, &#39;Arm1&#39;], [&#39;Arm2&#39;, &#39;Arm3&#39;]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">arm_to_features</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">:</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">:</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"s1\">&#39;Arm3&#39;</span><span class=\"p\">:</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"s1\">&#39;Arm4&#39;</span><span class=\"p\">:</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]}</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">add_arm</span><span class=\"p\">(</span><span class=\"s1\">&#39;Arm4&#39;</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">warm_start</span><span class=\"p\">(</span><span class=\"n\">arm_to_features</span><span class=\"p\">,</span> <span class=\"n\">distance_quantile</span><span class=\"o\">=</span><span class=\"mf\">0.75</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rec</span><span class=\"o\">.</span><span class=\"n\">recommend</span><span class=\"p\">([[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]])</span>\n<span class=\"go\">[[&#39;Arm2&#39;, &#39;Arm4&#39;], [&#39;Arm2&#39;, &#39;Arm4&#39;], [&#39;Arm2&#39;, &#39;Arm3&#39;]]</span>\n</pre></div>\n</div>\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.add_arm\">\n<span class=\"sig-name descname\"><span class=\"pre\">add_arm</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">arm</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Arm</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">binarizer</span></span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">None</span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.add_arm\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Adds an _arm_ to the list of arms.</p>\n<p>Incorporates the arm into the learning and neighborhood policies with no training data.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>arm</strong> (<em>Arm</em>) – The new arm to be added.</p></li>\n<li><p><strong>binarizer</strong> (<em>Callable</em><em>, </em><em>default=None</em>) – The new binarizer function for Thompson Sampling.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>Returns nothing.</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.fit\">\n<span class=\"sig-name descname\"><span class=\"pre\">fit</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">decisions</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">rewards</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">contexts</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">None</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">None</span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.fit\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Fits the recommender the given <em>decisions</em>, their corresponding <em>rewards</em> and <em>contexts</em>, if any.\nIf the recommender arms has not been initialized using the <cite>set_arms</cite>, the recommender arms will be set\nto the list of arms in <em>decisions</em>.</p>\n<p>Validates arguments and raises exceptions in case there are violations.</p>\n<dl class=\"simple\">\n<dt>This function makes the following assumptions:</dt><dd><ul class=\"simple\">\n<li><p>each decision corresponds to an arm of the bandit.</p></li>\n<li><p>there are no <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">Nan</span></code>, or <code class=\"docutils literal notranslate\"><span class=\"pre\">Infinity</span></code> values in the contexts.</p></li>\n</ul>\n</dd>\n</dl>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>decisions</strong> (<em>Union</em><em>[</em><em>List</em><em>[</em><em>Arm</em><em>]</em><em>, </em><em>np.ndarray</em><em>, </em><em>pd.Series</em><em>]</em>) – The decisions that are made.</p></li>\n<li><p><strong>rewards</strong> (<em>Union</em><em>[</em><em>List</em><em>[</em><em>Num</em><em>]</em><em>, </em><em>np.ndarray</em><em>, </em><em>pd.Series</em><em>]</em>) – The rewards that are received corresponding to the decisions.</p></li>\n<li><p><strong>contexts</strong> (<em>Union</em><em>[</em><em>None</em><em>, </em><em>List</em><em>[</em><em>List</em><em>[</em><em>Num</em><em>]</em><em>]</em><em>, </em><em>np.ndarray</em><em>, </em><em>pd.Series</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – The context under which each decision is made.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>Returns nothing.</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.partial_fit\">\n<span class=\"sig-name descname\"><span class=\"pre\">partial_fit</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">decisions</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">rewards</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">contexts</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">None</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">None</span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.partial_fit\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Updates the recommender with the given <em>decisions</em>, their corresponding <em>rewards</em> and <em>contexts</em>, if any.</p>\n<p>Validates arguments and raises exceptions in case there are violations.</p>\n<dl class=\"simple\">\n<dt>This function makes the following assumptions:</dt><dd><ul class=\"simple\">\n<li><p>each decision corresponds to an arm of the bandit.</p></li>\n<li><p>there are no <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code>, <code class=\"docutils literal notranslate\"><span class=\"pre\">Nan</span></code>, or <code class=\"docutils literal notranslate\"><span class=\"pre\">Infinity</span></code> values in the contexts.</p></li>\n</ul>\n</dd>\n</dl>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>decisions</strong> (<em>Union</em><em>[</em><em>List</em><em>[</em><em>Arm</em><em>]</em><em>, </em><em>np.ndarray</em><em>, </em><em>pd.Series</em><em>]</em>) – The decisions that are made.</p></li>\n<li><p><strong>rewards</strong> (<em>Union</em><em>[</em><em>List</em><em>[</em><em>Num</em><em>]</em><em>, </em><em>np.ndarray</em><em>, </em><em>pd.Series</em><em>]</em>) – The rewards that are received corresponding to the decisions.</p></li>\n<li><p><strong>contexts</strong> (<em>Union</em><em>[</em><em>None</em><em>, </em><em>List</em><em>[</em><em>List</em><em>[</em><em>Num</em><em>]</em><em>]</em><em>, </em><em>np.ndarray</em><em>, </em><em>pd.Series</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – The context under which each decision is made.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>Returns nothing.</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.predict\">\n<span class=\"sig-name descname\"><span class=\"pre\">predict</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">contexts</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">None</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.predict\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Returns the “best” arm (or arms list if multiple contexts are given) based on the expected reward.</p>\n<p>The definition of the <em>best</em> depends on the specified learning policy.\nContextual learning policies and neighborhood policies require contexts data in training.\nIn testing, they return the best arm given new context(s).</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><p><strong>contexts</strong> (<em>Union</em><em>[</em><em>None</em><em>, </em><em>List</em><em>[</em><em>List</em><em>[</em><em>Num</em><em>]</em><em>]</em><em>, </em><em>np.ndarray</em><em>, </em><em>pd.Series</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – The context under which each decision is made.\nIf contexts is not <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for context-free bandits, the predictions returned will be a\nlist of the same length as contexts.</p>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>The recommended arm or recommended arms list.</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.predict_expectations\">\n<span class=\"sig-name descname\"><span class=\"pre\">predict_expectations</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">contexts</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">None</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.predict_expectations\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Returns a dictionary of arms (key) to their expected rewards (value).</p>\n<p>Contextual learning policies and neighborhood policies require contexts data for expected rewards.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><p><strong>contexts</strong> (<em>Union</em><em>[</em><em>None</em><em>, </em><em>List</em><em>[</em><em>Num</em><em>]</em><em>, </em><em>List</em><em>[</em><em>List</em><em>[</em><em>Num</em><em>]</em><em>]</em><em>, </em><em>np.ndarray</em><em>, </em><em>pd.Series</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – The context for the expected rewards.\nIf contexts is not <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for context-free bandits, the predicted expectations returned will be a\nlist of the same length as contexts.</p>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>The dictionary of arms (key) to their expected rewards (value), or a list of such dictionaries.</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.recommend\">\n<span class=\"sig-name descname\"><span class=\"pre\">recommend</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">contexts</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">None</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">numpy.ndarray</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.series.Series</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">excluded_arms</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">return_scores</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Tuple</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Tuple</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.recommend\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Generate _top-<a href=\"#id26\"><span class=\"problematic\" id=\"id27\">k_</span></a> recommendations based on the expected reward.</p>\n<p>Recommend up to k arms with the highest predicted expectations.\nFor contextual bandits, only items not included in the excluded arms can be recommended.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>contexts</strong> (<em>np.ndarray</em><em>, </em><em>default=None</em>) – The context under which each decision is made.\nIf contexts is not <code class=\"docutils literal notranslate\"><span class=\"pre\">None</span></code> for context-free bandits, the recommendations returned will be a\nlist of the same length as contexts.</p></li>\n<li><p><strong>excluded_arms</strong> (<em>List</em><em>[</em><em>List</em><em>[</em><em>Arm</em><em>]</em><em>]</em><em>, </em><em>default=None</em>) – List of list of arms to exclude from recommended arms.</p></li>\n<li><p><strong>return_scores</strong> (<em>bool</em><em>, </em><em>default=False</em>) – Return score for each recommended item.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>List of tuples of the form ([arm_1, arm_2, …, arm_k], [score_1, score_2, …, score_k])</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.remove_arm\">\n<span class=\"sig-name descname\"><span class=\"pre\">remove_arm</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">arm</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Arm</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">None</span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.remove_arm\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Removes an _arm_ from the list of arms.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><p><strong>arm</strong> (<em>Arm</em>) – The existing arm to be removed.</p>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>Returns nothing.</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.set_arms\">\n<span class=\"sig-name descname\"><span class=\"pre\">set_arms</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">arms</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">binarizer</span></span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">None</span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.set_arms\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Initializes the recommender and sets the recommender with given list of arms.\nExisting arms not in the given list of arms are removed and new arms are incorporated into the learning and\nneighborhood policies with no training data.\nIf the recommender has already been initialized it will not be re-initialized.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>arms</strong> (<em>List</em><em>[</em><em>Arm</em><em>]</em>) – The new arm to be added.</p></li>\n<li><p><strong>binarizer</strong> (<em>Callable</em><em>, </em><em>default=None</em>) – The new binarizer function for Thompson Sampling.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>Returns nothing.</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py method\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.BanditRecommender.warm_start\">\n<span class=\"sig-name descname\"><span class=\"pre\">warm_start</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">arm_to_features</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">distance_quantile</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">None</span></span></span><a class=\"headerlink\" href=\"#mab2rec.BanditRecommender.warm_start\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Warm-start untrained (cold) arms of the multi-armed bandit.</p>\n<p>Validates arguments and raises exceptions in case there are violations.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>arm_to_features</strong> (<em>Dict</em><em>[</em><em>Arm</em><em>, </em><em>List</em><em>[</em><em>Num</em><em>]</em><em>]</em>) – Numeric representation for each arm.</p></li>\n<li><p><strong>distance_quantile</strong> (<em>float</em><em>, </em><em>default=None</em>) – Value between 0 and 1 used to determine if an item can be warm started or not using closest item.\nAll cold items will be warm started if 1 and none will be warm started if 0.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>Returns nothing.</p>\n</dd>\n</dl>\n</dd></dl>\n\n</dd></dl>\n\n</section>\n<section id=\"learningpolicy\">\n<h2>LearningPolicy<a class=\"headerlink\" href=\"#learningpolicy\" title=\"Permalink to this headline\"></a></h2>\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.</span></span><span class=\"sig-name descname\"><span class=\"pre\">LearningPolicy</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy\" title=\"Permalink to this definition\"></a></dt>\n<dd><dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.EpsilonGreedy\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">EpsilonGreedy</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">epsilon</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">0.1</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.EpsilonGreedy\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Epsilon Greedy Learning Policy.</p>\n<p>This policy selects the arm with the highest expected reward with probability 1 - <span class=\"math notranslate nohighlight\">\\(\\epsilon\\)</span>,\nand with probability <span class=\"math notranslate nohighlight\">\\(\\epsilon\\)</span> it selects an arm at random for exploration.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.EpsilonGreedy.epsilon\">\n<span class=\"sig-name descname\"><span class=\"pre\">epsilon</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.EpsilonGreedy.epsilon\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The probability of selecting a random arm for exploration.\nInteger or float. Must be between 0 and 1.\nDefault value is 0.1.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">EpsilonGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mf\">0.25</span><span class=\"p\">),</span> <span class=\"n\">seed</span><span class=\"o\">=</span><span class=\"mi\">123456</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">()</span>\n<span class=\"go\">&#39;Arm1&#39;</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id0\">\n<span class=\"sig-name descname\"><span class=\"pre\">epsilon</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id0\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinGreedy\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">LinGreedy</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">epsilon</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">0.1</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">l2_lambda</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1.0</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">scale</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinGreedy\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>LinGreedy Learning Policy.</p>\n<p>This policy trains a ridge regression for each arm.\nThen, given a given context, it predicts a regression value.\nThis policy selects the arm with the highest regression value with probability 1 - <span class=\"math notranslate nohighlight\">\\(\\epsilon\\)</span>,\nand with probability <span class=\"math notranslate nohighlight\">\\(\\epsilon\\)</span> it selects an arm at random for exploration.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinGreedy.epsilon\">\n<span class=\"sig-name descname\"><span class=\"pre\">epsilon</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinGreedy.epsilon\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The probability of selecting a random arm for exploration.\nInteger or float. Must be between 0 and 1.\nDefault value is 0.1.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinGreedy.l2_lambda\">\n<span class=\"sig-name descname\"><span class=\"pre\">l2_lambda</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinGreedy.l2_lambda\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The regularization strength.\nInteger or float. Cannot be negative.\nDefault value is 1.0.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinGreedy.scale\">\n<span class=\"sig-name descname\"><span class=\"pre\">scale</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinGreedy.scale\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Whether to scale features to have zero mean and unit variance.\nUses StandardScaler in sklearn.preprocessing.\nDefault value is False.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>bool</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">LinGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mf\">0.5</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">([[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]])</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id1\">\n<span class=\"sig-name descname\"><span class=\"pre\">epsilon</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id1\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id2\">\n<span class=\"sig-name descname\"><span class=\"pre\">l2_lambda</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id2\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 1</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id3\">\n<span class=\"sig-name descname\"><span class=\"pre\">scale</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">bool</span></em><a class=\"headerlink\" href=\"#id3\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 2</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinTS\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">LinTS</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">alpha</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1.0</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">l2_lambda</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1.0</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">scale</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinTS\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>LinTS Learning Policy</p>\n<p>For each arm LinTS trains a ridge regression and\ncreates a multivariate normal distribution for the coefficients using the\ncalculated coefficients as the mean and the covariance as:</p>\n<div class=\"math notranslate nohighlight\">\n\\[\\alpha^{2} (x_i^{T}x_i + \\lambda * I_d)^{-1}\\]</div>\n<p>The normal distribution is randomly sampled to obtain\nexpected coefficients for the ridge regression for each\nprediction.</p>\n<p><span class=\"math notranslate nohighlight\">\\(\\alpha\\)</span> is a factor used to adjust how conservative the estimate is.\nHigher <span class=\"math notranslate nohighlight\">\\(\\alpha\\)</span> values promote more exploration.</p>\n<p>The multivariate normal distribution uses Cholesky decomposition to guarantee deterministic behavior.\nThis method requires that the covariance is a positive definite matrix.\nTo ensure this is the case, alpha and l2_lambda are required to be greater than zero.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinTS.alpha\">\n<span class=\"sig-name descname\"><span class=\"pre\">alpha</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinTS.alpha\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The multiplier to determine the degree of exploration.\nInteger or float. Must be greater than zero.\nDefault value is 1.0.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinTS.l2_lambda\">\n<span class=\"sig-name descname\"><span class=\"pre\">l2_lambda</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinTS.l2_lambda\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The regularization strength.\nInteger or float. Must be greater than zero.\nDefault value is 1.0.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinTS.scale\">\n<span class=\"sig-name descname\"><span class=\"pre\">scale</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinTS.scale\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Whether to scale features to have zero mean and unit variance.\nUses StandardScaler in sklearn.preprocessing.\nDefault value is False.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>bool</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">LinTS</span><span class=\"p\">(</span><span class=\"n\">alpha</span><span class=\"o\">=</span><span class=\"mf\">0.25</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">([[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]])</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id4\">\n<span class=\"sig-name descname\"><span class=\"pre\">alpha</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id4\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id5\">\n<span class=\"sig-name descname\"><span class=\"pre\">l2_lambda</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id5\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 1</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id6\">\n<span class=\"sig-name descname\"><span class=\"pre\">scale</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">bool</span></em><a class=\"headerlink\" href=\"#id6\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 2</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinUCB\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">LinUCB</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">alpha</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1.0</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">l2_lambda</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1.0</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">scale</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinUCB\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>LinUCB Learning Policy.</p>\n<p>This policy trains a ridge regression for each arm.\nThen, given a given context, it predicts a regression value\nand calculates the upper confidence bound of that prediction.\nThe arm with the highest highest upper bound is selected.</p>\n<p>The UCB for each arm is calculated as:</p>\n<div class=\"math notranslate nohighlight\">\n\\[UCB = x_i \\beta + \\alpha \\sqrt{(x_i^{T}x_i + \\lambda * I_d)^{-1}x_i}\\]</div>\n<p>Where <span class=\"math notranslate nohighlight\">\\(\\beta\\)</span> is the matrix of the ridge regression coefficients, <span class=\"math notranslate nohighlight\">\\(\\lambda\\)</span> is the regularization\nstrength, and I_d is a dxd identity matrix where d is the number of features in the context data.</p>\n<p><span class=\"math notranslate nohighlight\">\\(\\alpha\\)</span> is a factor used to adjust how conservative the estimate is.\nHigher <span class=\"math notranslate nohighlight\">\\(\\alpha\\)</span> values promote more exploration.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinUCB.alpha\">\n<span class=\"sig-name descname\"><span class=\"pre\">alpha</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinUCB.alpha\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The parameter to control the exploration.\nInteger or float. Cannot be negative.\nDefault value is 1.0.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinUCB.l2_lambda\">\n<span class=\"sig-name descname\"><span class=\"pre\">l2_lambda</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinUCB.l2_lambda\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The regularization strength.\nInteger or float. Cannot be negative.\nDefault value is 1.0.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.LinUCB.scale\">\n<span class=\"sig-name descname\"><span class=\"pre\">scale</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.LinUCB.scale\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Whether to scale features to have zero mean and unit variance.\nUses StandardScaler in sklearn.preprocessing.\nDefault value is False.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>bool</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">LinUCB</span><span class=\"p\">(</span><span class=\"n\">alpha</span><span class=\"o\">=</span><span class=\"mf\">1.25</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">([[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]])</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id7\">\n<span class=\"sig-name descname\"><span class=\"pre\">alpha</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id7\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id8\">\n<span class=\"sig-name descname\"><span class=\"pre\">l2_lambda</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id8\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 1</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id9\">\n<span class=\"sig-name descname\"><span class=\"pre\">scale</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">bool</span></em><a class=\"headerlink\" href=\"#id9\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 2</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.Popularity\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">Popularity</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.Popularity\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Randomized Popularity Learning Policy.</p>\n<p>Returns a randomized popular arm for each prediction.\nThe probability of selection for each arm is weighted by their mean reward.\nIt assumes that the rewards are non-negative.</p>\n<p>The probability of selection is calculated as:</p>\n<div class=\"math notranslate nohighlight\">\n\\[P(arm) = \\frac{ \\mu_i } { \\Sigma{ \\mu }  }\\]</div>\n<p>where <span class=\"math notranslate nohighlight\">\\(\\mu_i\\)</span> is the mean reward for that arm.</p>\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">Popularity</span><span class=\"p\">())</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">()</span>\n<span class=\"go\">&#39;Arm1&#39;</span>\n</pre></div>\n</div>\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.Random\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">Random</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.Random\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Random Learning Policy.</p>\n<p>Returns a random arm for each prediction.\nThe probability of selection for each arm is uniformly at random.</p>\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">Random</span><span class=\"p\">())</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">()</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.Softmax\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">Softmax</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">tau</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.Softmax\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Softmax Learning Policy.</p>\n<p>This policy selects each arm with a probability proportionate to its average reward.\nThe average reward is calculated as a logistic function with each probability as:</p>\n<div class=\"math notranslate nohighlight\">\n\\[P(arm) = \\frac{ e ^  \\frac{\\mu_i - \\max{\\mu}}{ \\tau } }\n{ \\Sigma{e ^  \\frac{\\mu - \\max{\\mu}}{ \\tau }}  }\\]</div>\n<p>where <span class=\"math notranslate nohighlight\">\\(\\mu_i\\)</span> is the mean reward for that arm and <span class=\"math notranslate nohighlight\">\\(\\tau\\)</span> is the “temperature” to determine\nthe degree of exploration.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.Softmax.tau\">\n<span class=\"sig-name descname\"><span class=\"pre\">tau</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.Softmax.tau\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The temperature to control the exploration.\nInteger or float. Must be greater than zero.\nDefault value is 1.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">Softmax</span><span class=\"p\">(</span><span class=\"n\">tau</span><span class=\"o\">=</span><span class=\"mi\">1</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">()</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id10\">\n<span class=\"sig-name descname\"><span class=\"pre\">tau</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id10\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.ThompsonSampling\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">ThompsonSampling</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">binarizer</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Callable</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.ThompsonSampling\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Thompson Sampling Learning Policy.</p>\n<p>This policy creates a beta distribution for each arm and\nthen randomly samples from these distributions.\nThe arm with the highest sample value is selected.</p>\n<p>Notice that rewards must be binary to create beta distributions.\nIf rewards are not binary, see the <code class=\"docutils literal notranslate\"><span class=\"pre\">binarizer</span></code> function.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.ThompsonSampling.binarizer\">\n<span class=\"sig-name descname\"><span class=\"pre\">binarizer</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.ThompsonSampling.binarizer\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>If rewards are not binary, a binarizer function is required.\nGiven an arm decision and its corresponding reward, the binarizer function\nreturns <cite>True/False</cite> or <cite>0/1</cite> to denote whether the decision counts\nas a success, i.e., <cite>True/1</cite> based on the reward or <cite>False/0</cite> otherwise.</p>\n<p>The function signature of the binarizer is:</p>\n<p><code class=\"docutils literal notranslate\"><span class=\"pre\">binarize(arm:</span> <span class=\"pre\">Arm,</span> <span class=\"pre\">reward:</span> <span class=\"pre\">Num)</span> <span class=\"pre\">-&gt;</span> <span class=\"pre\">True/False</span> <span class=\"pre\">or</span> <span class=\"pre\">0/1</span></code></p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Callable</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">ThompsonSampling</span><span class=\"p\">())</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">()</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">arm_to_threshold</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">:</span><span class=\"mi\">10</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">:</span><span class=\"mi\">10</span><span class=\"p\">}</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">10</span><span class=\"p\">,</span> <span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">15</span><span class=\"p\">,</span> <span class=\"mi\">7</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"k\">def</span> <span class=\"nf\">binarize</span><span class=\"p\">(</span><span class=\"n\">arm</span><span class=\"p\">,</span> <span class=\"n\">reward</span><span class=\"p\">):</span> <span class=\"k\">return</span> <span class=\"n\">reward</span> <span class=\"o\">&gt;</span> <span class=\"n\">arm_to_threshold</span><span class=\"p\">[</span><span class=\"n\">arm</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">ThompsonSampling</span><span class=\"p\">(</span><span class=\"n\">binarizer</span><span class=\"o\">=</span><span class=\"n\">binarize</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">()</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id11\">\n<span class=\"sig-name descname\"><span class=\"pre\">binarizer</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Callable</span></em><a class=\"headerlink\" href=\"#id11\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.UCB1\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">UCB1</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">alpha</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.UCB1\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Upper Confidence Bound1 Learning Policy.</p>\n<p>This policy calculates an upper confidence bound for the mean reward of each arm.\nIt greedily selects the arm with the highest upper confidence bound.</p>\n<p>The UCB for each arm is calculated as:</p>\n<div class=\"math notranslate nohighlight\">\n\\[UCB = \\mu_i + \\alpha \\times \\sqrt[]{\\frac{2 \\times log(N)}{n_i}}\\]</div>\n<p>Where <span class=\"math notranslate nohighlight\">\\(\\mu_i\\)</span> is the mean for that arm,\n<span class=\"math notranslate nohighlight\">\\(N\\)</span> is the total number of trials, and\n<span class=\"math notranslate nohighlight\">\\(n_i\\)</span> is the number of times the arm has been selected.</p>\n<p><span class=\"math notranslate nohighlight\">\\(\\alpha\\)</span> is a factor used to adjust how conservative the estimate is.\nHigher <span class=\"math notranslate nohighlight\">\\(\\alpha\\)</span> values promote more exploration.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.LearningPolicy.UCB1.alpha\">\n<span class=\"sig-name descname\"><span class=\"pre\">alpha</span></span><a class=\"headerlink\" href=\"#mab2rec.LearningPolicy.UCB1.alpha\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The parameter to control the exploration.\nInteger of float. Cannot be negative.\nDefault value is 1.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">UCB1</span><span class=\"p\">(</span><span class=\"n\">alpha</span><span class=\"o\">=</span><span class=\"mf\">1.25</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">()</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id12\">\n<span class=\"sig-name descname\"><span class=\"pre\">alpha</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id12\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n</dd></dl>\n\n</dd></dl>\n\n</section>\n<section id=\"neighborhoodpolicy\">\n<h2>NeighborhoodPolicy<a class=\"headerlink\" href=\"#neighborhoodpolicy\" title=\"Permalink to this headline\"></a></h2>\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.</span></span><span class=\"sig-name descname\"><span class=\"pre\">NeighborhoodPolicy</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy\" title=\"Permalink to this definition\"></a></dt>\n<dd><dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.Clusters\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">Clusters</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">n_clusters</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">2</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">is_minibatch</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.Clusters\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Clusters Neighborhood Policy.</p>\n<p>Clusters is a k-means clustering approach that uses the observations\nfrom the closest <em>cluster</em> with a learning policy.\nSupports <code class=\"docutils literal notranslate\"><span class=\"pre\">KMeans</span></code> and <code class=\"docutils literal notranslate\"><span class=\"pre\">MiniBatchKMeans</span></code>.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.Clusters.n_clusters\">\n<span class=\"sig-name descname\"><span class=\"pre\">n_clusters</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.Clusters.n_clusters\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The number of clusters. Integer. Must be at least 2. Default value is 2.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.Clusters.is_minibatch\">\n<span class=\"sig-name descname\"><span class=\"pre\">is_minibatch</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.Clusters.is_minibatch\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Boolean flag to use <code class=\"docutils literal notranslate\"><span class=\"pre\">MiniBatchKMeans</span></code> or not. Default value is False.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>bool</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"p\">,</span> <span class=\"n\">NeighborhoodPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span>                             <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">EpsilonGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mi\">0</span><span class=\"p\">),</span> <span class=\"n\">NeighborhoodPolicy</span><span class=\"o\">.</span><span class=\"n\">Clusters</span><span class=\"p\">(</span><span class=\"mi\">3</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">([[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]])</span>\n<span class=\"go\">[3, 1]</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id13\">\n<span class=\"sig-name descname\"><span class=\"pre\">is_minibatch</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">bool</span></em><a class=\"headerlink\" href=\"#id13\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 1</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id14\">\n<span class=\"sig-name descname\"><span class=\"pre\">n_clusters</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id14\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.KNearest\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">KNearest</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">k</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">metric</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'euclidean'</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.KNearest\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>KNearest Neighborhood Policy.</p>\n<p>KNearest is a nearest neighbors approach that selects the <em>k-nearest</em> observations\nto be used with a learning policy.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.KNearest.k\">\n<span class=\"sig-name descname\"><span class=\"pre\">k</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.KNearest.k\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The number of neighbors to select.\nInteger value. Must be greater than zero.\nDefault value is 1.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>int</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.KNearest.metric\">\n<span class=\"sig-name descname\"><span class=\"pre\">metric</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.KNearest.metric\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The metric used to calculate distance.\nAccepts any of the metrics supported by <code class=\"docutils literal notranslate\"><span class=\"pre\">scipy.spatial.distance.cdist</span></code>.\nDefault value is Euclidean distance.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>str</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"p\">,</span> <span class=\"n\">NeighborhoodPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span>                             <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">EpsilonGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mi\">0</span><span class=\"p\">),</span>                           <span class=\"n\">NeighborhoodPolicy</span><span class=\"o\">.</span><span class=\"n\">KNearest</span><span class=\"p\">(</span><span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"s2\">&quot;euclidean&quot;</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">([[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]])</span>\n<span class=\"go\">[1, 1]</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id15\">\n<span class=\"sig-name descname\"><span class=\"pre\">k</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">int</span></em><a class=\"headerlink\" href=\"#id15\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id16\">\n<span class=\"sig-name descname\"><span class=\"pre\">metric</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">str</span></em><a class=\"headerlink\" href=\"#id16\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 1</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.LSHNearest\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">LSHNearest</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">n_dimensions</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">5</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">n_tables</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">3</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">no_nhood_prob_of_arm</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.LSHNearest\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Locality-Sensitive Hashing Approximate Nearest Neighbors Policy.</p>\n<p>LSHNearest is a nearest neighbors approach that uses locality sensitive hashing with a simhash to\nselect observations to be used with a learning policy.</p>\n<p>For the simhash, contexts are projected onto a hyperplane of n_context_cols x n_dimensions and each\ncolumn of the hyperplane is evaluated for its sign, giving an ordered array of binary values.\nThis is converted to a base 10 integer used as the hash code to assign the context to a hash table. This\nprocess is repeated for a specified number of hash tables, where each has a unique, randomly-generated\nhyperplane. To select the neighbors for a context, the hash code is calculated for each hash table and any\ncontexts with the same hashes are selected as the neighbors.</p>\n<p>As with the radius or k value for other nearest neighbors algorithms, selecting the best number of dimensions\nand tables requires tuning. For the dimensions, a good starting point is to use the log of the square root of\nthe number of rows in the training data. This will give you sqrt(n_rows) number of hashes.</p>\n<p>The number of dimensions and number of tables have inverse effects from each other on the number of empty\nneighborhoods and average neighborhood size. Increasing the dimensionality decreases the number of collisions,\nwhich increases the precision of the approximate neighborhood but also potentially increases the number of empty\nneighborhoods. Increasing the number of hash tables increases the likelihood of capturing neighbors the\nother random hyperplanes miss and increases the average neighborhood size. It should be noted that the fit\noperation is O(2**n_dimensions).</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.LSHNearest.n_dimensions\">\n<span class=\"sig-name descname\"><span class=\"pre\">n_dimensions</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.LSHNearest.n_dimensions\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The number of dimensions to use for the hyperplane.\nInteger value. Must be greater than zero.\nDefault value is 5.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>int</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.LSHNearest.n_tables\">\n<span class=\"sig-name descname\"><span class=\"pre\">n_tables</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.LSHNearest.n_tables\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The number of hash tables.\nInteger value. Must be greater than zero.\nDefault value is 3.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>int</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.LSHNearest.no_nhood_prob_of_arm\">\n<span class=\"sig-name descname\"><span class=\"pre\">no_nhood_prob_of_arm</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.LSHNearest.no_nhood_prob_of_arm\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The probabilities associated with each arm. Used to select random arm if context has no neighbors.\nIf not given, a uniform random distribution over all arms is assumed.\nThe probabilities should sum up to 1.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>None or List</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"p\">,</span> <span class=\"n\">NeighborhoodPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span>                             <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">EpsilonGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mi\">0</span><span class=\"p\">),</span>                           <span class=\"n\">NeighborhoodPolicy</span><span class=\"o\">.</span><span class=\"n\">LSHNearest</span><span class=\"p\">(</span><span class=\"mi\">5</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">([[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]])</span>\n<span class=\"go\">[3, 1]</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id17\">\n<span class=\"sig-name descname\"><span class=\"pre\">n_dimensions</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">int</span></em><a class=\"headerlink\" href=\"#id17\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id18\">\n<span class=\"sig-name descname\"><span class=\"pre\">n_tables</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">int</span></em><a class=\"headerlink\" href=\"#id18\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 1</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id19\">\n<span class=\"sig-name descname\"><span class=\"pre\">no_nhood_prob_of_arm</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id19\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 2</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.Radius\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">Radius</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">radius</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">0.05</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">metric</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'euclidean'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">no_nhood_prob_of_arm</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.Radius\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Radius Neighborhood Policy.</p>\n<p>Radius is a nearest neighborhood approach that selects the observations\nwithin a given <em>radius</em> to be used with a learning policy.</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.Radius.radius\">\n<span class=\"sig-name descname\"><span class=\"pre\">radius</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.Radius.radius\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The maximum distance within which to select observations.\nInteger or Float. Must be greater than zero.\nDefault value is 1.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Num</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.Radius.metric\">\n<span class=\"sig-name descname\"><span class=\"pre\">metric</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.Radius.metric\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The metric used to calculate distance.\nAccepts any of the metrics supported by scipy.spatial.distance.cdist.\nDefault value is Euclidean distance.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>str</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.Radius.no_nhood_prob_of_arm\">\n<span class=\"sig-name descname\"><span class=\"pre\">no_nhood_prob_of_arm</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.Radius.no_nhood_prob_of_arm\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>The probabilities associated with each arm. Used to select random arm if context has no neighbors.\nIf not given, a uniform random distribution over all arms is assumed.\nThe probabilities should sum up to 1.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>None or List</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"p\">,</span> <span class=\"n\">NeighborhoodPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">],</span>                             <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">4</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">EpsilonGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mi\">0</span><span class=\"p\">),</span>                           <span class=\"n\">NeighborhoodPolicy</span><span class=\"o\">.</span><span class=\"n\">Radius</span><span class=\"p\">(</span><span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"s2\">&quot;euclidean&quot;</span><span class=\"p\">))</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">([[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]])</span>\n<span class=\"go\">[3, 1]</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id20\">\n<span class=\"sig-name descname\"><span class=\"pre\">metric</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">str</span></em><a class=\"headerlink\" href=\"#id20\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 1</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id21\">\n<span class=\"sig-name descname\"><span class=\"pre\">no_nhood_prob_of_arm</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id21\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 2</p>\n</dd></dl>\n\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id22\">\n<span class=\"sig-name descname\"><span class=\"pre\">radius</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></em><a class=\"headerlink\" href=\"#id22\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n</dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.TreeBandit\">\n<em class=\"property\"><span class=\"pre\">class</span><span class=\"w\"> </span></em><span class=\"sig-name descname\"><span class=\"pre\">TreeBandit</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">tree_parameters</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Dict</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">{}</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.TreeBandit\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>TreeBandit Neighborhood Policy.</p>\n<p>This policy fits a decision tree for each arm using context history.\nIt uses the leaves of these trees to partition the context space into regions\nand keeps a list of rewards for each leaf.\nTo predict, it receives a context vector and goes to the corresponding\nleaf at each arm’s tree and applies the given context-free MAB learning policy\nto predict expectations and choose an arm.</p>\n<p>The TreeBandit neighborhood policy is compatible with the following\ncontext-free learning policies only: EpsilonGreedy, ThompsonSampling and UCB1.</p>\n<p>The TreeBandit neighborhood policy is a modified version of\nthe TreeHeuristic algorithm presented in:\nAdam N. Elmachtoub, Ryan McNellis, Sechan Oh, Marek Petrik\nA Practical Method for Solving Contextual Bandit Problems Using Decision Trees, UAI 2017</p>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.NeighborhoodPolicy.TreeBandit.tree_parameters\">\n<span class=\"sig-name descname\"><span class=\"pre\">tree_parameters</span></span><a class=\"headerlink\" href=\"#mab2rec.NeighborhoodPolicy.TreeBandit.tree_parameters\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Parameters of the decision tree.\nThe keys must match the parameters of sklearn.tree.DecisionTreeRegressor.\nWhen a parameter is not given, the default parameters from\nsklearn.tree.DecisionTreeRegressor will be chosen.\nDefault value is an empty dictionary.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Type</dt>\n<dd class=\"field-odd\"><p>Dict, <a href=\"#id23\"><span class=\"problematic\" id=\"id24\">**</span></a>kwarg</p>\n</dd>\n</dl>\n</dd></dl>\n\n<p class=\"rubric\">Example</p>\n<div class=\"doctest highlight-default notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"gp\">&gt;&gt;&gt; </span><span class=\"kn\">from</span> <span class=\"nn\">mabwiser.mab</span> <span class=\"kn\">import</span> <span class=\"n\">MAB</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"p\">,</span> <span class=\"n\">NeighborhoodPolicy</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">list_of_arms</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">decisions</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm2&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;Arm1&#39;</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">rewards</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"mi\">20</span><span class=\"p\">,</span> <span class=\"mi\">17</span><span class=\"p\">,</span> <span class=\"mi\">25</span><span class=\"p\">,</span> <span class=\"mi\">9</span><span class=\"p\">]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">contexts</span> <span class=\"o\">=</span> <span class=\"p\">[[</span><span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">],</span> <span class=\"p\">[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">]]</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span> <span class=\"o\">=</span> <span class=\"n\">MAB</span><span class=\"p\">(</span><span class=\"n\">list_of_arms</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">EpsilonGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mi\">0</span><span class=\"p\">),</span> <span class=\"n\">NeighborhoodPolicy</span><span class=\"o\">.</span><span class=\"n\">TreeBandit</span><span class=\"p\">())</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">fit</span><span class=\"p\">(</span><span class=\"n\">decisions</span><span class=\"p\">,</span> <span class=\"n\">rewards</span><span class=\"p\">,</span> <span class=\"n\">contexts</span><span class=\"p\">)</span>\n<span class=\"gp\">&gt;&gt;&gt; </span><span class=\"n\">mab</span><span class=\"o\">.</span><span class=\"n\">predict</span><span class=\"p\">([[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">2</span><span class=\"p\">,</span> <span class=\"mi\">0</span><span class=\"p\">,</span> <span class=\"mi\">1</span><span class=\"p\">]])</span>\n<span class=\"go\">&#39;Arm2&#39;</span>\n</pre></div>\n</div>\n<dl class=\"py attribute\">\n<dt class=\"sig sig-object py\" id=\"id25\">\n<span class=\"sig-name descname\"><span class=\"pre\">tree_parameters</span></span><em class=\"property\"><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span></em><a class=\"headerlink\" href=\"#id25\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Alias for field number 0</p>\n</dd></dl>\n\n</dd></dl>\n\n</dd></dl>\n\n</section>\n<section id=\"module-mab2rec.pipeline\">\n<span id=\"pipeline\"></span><h2>Pipeline<a class=\"headerlink\" href=\"#module-mab2rec.pipeline\" title=\"Permalink to this headline\"></a></h2>\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.pipeline.benchmark\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.pipeline.</span></span><span class=\"sig-name descname\"><span class=\"pre\">benchmark</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommenders</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.BanditRecommender\" title=\"mab2rec.rec.BanditRecommender\"><span class=\"pre\">mab2rec.rec.BanditRecommender</span></a><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">metrics</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">jurity.recommenders.BinaryRecoMetrics</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">jurity.recommenders.RankingRecoMetrics</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">train_data</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">test_data</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">cv</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features_list</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features_dtypes</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_features</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_list</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_eligibility</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">warm_start</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">warm_start_distance</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'item_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">response_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'response'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">batch_size</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">100000</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">verbose</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Tuple</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Tuple</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></span><a class=\"headerlink\" href=\"#mab2rec.pipeline.benchmark\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Benchmark Recommenders.</p>\n<p>Benchmark a given set of recommender algorithms by training, scoring and evaluating each algorithm\nIf using cross-validation (cv) it benchmarks the algorithms on cv-many folds from the train data,\notherwise it trains on the train data and evaluates on the test data.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommenders</strong> (<em>Dict</em><em>[</em><em>str</em><em>, </em><a class=\"reference internal\" href=\"#mab2rec.BanditRecommender\" title=\"mab2rec.BanditRecommender\"><em>BanditRecommender</em></a><em>]</em>) – The recommender algorithms to be benchmarked.\nDictionary with names (key) and recommender algorithms (value).</p></li>\n<li><p><strong>metrics</strong> (<em>List</em><em>[</em><em>Union</em><em>[</em><em>BinaryRecoMetrics</em><em>, </em><em>RankingRecoMetrics</em><em>]</em><em>]</em>) – List of metrics used to evaluate recommendations.</p></li>\n<li><p><strong>train_data</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em>) – Training data used to train recommenders.\nData should have a row for each training sample (user_id, item_id, response).\nColumn names should be consistent with user_id_col, item_id_col and response_col arguments.\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>test_data</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em>) – Test data used to generate recommendations.\nData should have a row for each training sample (user_id, item_id, response).\nColumn names should be consistent with user_id_col, item_id_col and response_col arguments.\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>cv</strong> (<em>int</em><em>, </em><em>default=None</em>) – Number of folds in the train data to use for cross-fold validation.\nA grouped K-fold iterator is used to ensure that the same user is not contained in different folds.\nTest data must be None when using cv.</p></li>\n<li><p><strong>user_features</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – User features containing features for each user_id.\nEach row should include user_id and list of features (user_id, u_1, u_2, …, u_p).\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>user_features_list</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>List</em><em>[</em><em>str</em><em>]</em><em>]</em><em>, </em><em>default=None</em>) – List of user features to use.\nMust be a subset of features in (u_1, u_2, … u_p).\nIf None, all the features in user_features are used.\nCSV format with file header or List.</p></li>\n<li><p><strong>user_features_dtypes</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>Dict</em><em>]</em><em>, </em><em>default=None</em>) – Data type for each user feature.\nMaps each user feature name to valid data type.\nIf none, no data type casting is done upon load and data types or inferred by Pandas library.\nJSON format or Dictionary.</p></li>\n<li><p><strong>item_features</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – Item features file containing features for each item_id.\nEach row should include item_id and list of features (item_id, i_1, i_2, …. i_q).\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>item_list</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>List</em><em>[</em><em>Arm</em><em>]</em><em>]</em><em>, </em><em>default=None</em>) – List of items to train.\nIf None, all the items in data are used.\nCSV format with file header or List.</p></li>\n<li><p><strong>item_eligibility</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – Items each user is eligible for.\nUsed to generate excluded_arms lists.\nIf None, all the items can be evaluated for recommendation for each user.\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>warm_start</strong> (<em>bool</em><em>, </em><em>default=False</em>) – Whether to warm start untrained (cold) arms after training or not.</p></li>\n<li><p><strong>warm_start_distance</strong> (<em>float</em><em>, </em><em>default=None</em>) – Warm start distance quantile.\nValue between 0 and 1 used to determine if an item can be warm started or not using closest item.\nAll cold items will be warm started if 1 and none will be warm started if 0.\nMust be specified if warm_start=True.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.user_id</em>) – User id column name.</p></li>\n<li><p><strong>item_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.item_id</em>) – Item id column name.</p></li>\n<li><p><strong>response_col</strong> (<em>str</em><em>, </em><em>default=Constants.response</em>) – Response column name.</p></li>\n<li><p><strong>batch_size</strong> (<em>str</em><em>, </em><em>default=100000</em>) – Batch size used for chunking data.</p></li>\n<li><p><strong>verbose</strong> (<em>bool</em><em>, </em><em>default=False</em>) – Whether to print progress status or not.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Returns</dt>\n<dd class=\"field-even\"><p><ul class=\"simple\">\n<li><p><em>Tuple with recommendations and evaluation metrics for each algorithm.</em></p></li>\n<li><p><em>The tuple values are lists of dictionaries if cross-validation is used, representing the results on each fold,</em></p></li>\n<li><p><em>and individual dictionaries otherwise.</em></p></li>\n</ul>\n</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.pipeline.score\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.pipeline.</span></span><span class=\"sig-name descname\"><span class=\"pre\">score</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommender</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><a class=\"reference internal\" href=\"#mab2rec.BanditRecommender\" title=\"mab2rec.rec.BanditRecommender\"><span class=\"pre\">mab2rec.rec.BanditRecommender</span></a><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">data</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features_list</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features_dtypes</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_features</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_list</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_eligibility</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">warm_start</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">warm_start_distance</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'item_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">response_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'response'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">batch_size</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">100000</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">save_file</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">bool</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">pandas.core.frame.DataFrame</span></span></span><a class=\"headerlink\" href=\"#mab2rec.pipeline.score\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Score Recommender.</p>\n<p>Generates top-k recommendations for users in given data.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommender</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><a class=\"reference internal\" href=\"#mab2rec.BanditRecommender\" title=\"mab2rec.BanditRecommender\"><em>BanditRecommender</em></a><em>]</em>) – The recommender algorithm to be scored.\nCould be an instantiated BanditRecommender or file path of serialized recommender in pickle file.</p></li>\n<li><p><strong>data</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em>) – Training data.\nData should have a row for each training sample (user_id, item_id, response).\nColumn names should be consistent with user_id_col, item_id_col and response_col arguments.\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>user_features</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – User features containing features for each user_id.\nEach row should include user_id and list of features (user_id, u_1, u_2, …, u_p).\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>user_features_list</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>List</em><em>[</em><em>str</em><em>]</em><em>]</em><em>, </em><em>default=None</em>) – List of user features to use.\nMust be a subset of features in (u_1, u_2, … u_p).\nIf None, all the features in user_features are used.\nCSV format with file header or List.</p></li>\n<li><p><strong>user_features_dtypes</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>Dict</em><em>]</em><em>, </em><em>default=None</em>) – Data type for each user feature.\nMaps each user feature name to valid data type.\nIf none, no data type casting is done upon load and data types or inferred by Pandas library.\nJSON format or Dictionary.</p></li>\n<li><p><strong>item_features</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – Item features file containing features for each item_id.\nEach row should include item_id and list of features (item_id, i_1, i_2, …. i_q).\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>item_list</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>List</em><em>[</em><em>Arm</em><em>]</em><em>]</em><em>, </em><em>default=None</em>) – List of items to train.\nIf None, all the items in data are used.\nCSV format with file header or List.</p></li>\n<li><p><strong>item_eligibility</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – Items each user is eligible for.\nUsed to generate excluded_arms lists.\nIf None, all the items can be evaluated for recommendation for each user.\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>warm_start</strong> (<em>bool</em><em>, </em><em>default=False</em>) – Whether to warm start untrained (cold) arms after training or not.</p></li>\n<li><p><strong>warm_start_distance</strong> (<em>float</em><em>, </em><em>default=None</em>) – Warm start distance quantile.\nValue between 0 and 1 used to determine if an item can be warm started or not using closest item.\nAll cold items will be warm started if 1 and none will be warm started if 0.\nMust be specified if warm_start=True.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.user_id</em>) – User id column name.</p></li>\n<li><p><strong>item_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.item_id</em>) – Item id column name.</p></li>\n<li><p><strong>response_col</strong> (<em>str</em><em>, </em><em>default=Constants.response</em>) – Response column name.</p></li>\n<li><p><strong>batch_size</strong> (<em>str</em><em>, </em><em>default=100000</em>) – Batch size used for chunking data.</p></li>\n<li><p><strong>save_file</strong> (<em>str</em><em>, </em><em>default=None</em>) – File name to save recommender pickle.\nIf None, recommender is not saved to file.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>Scored recommendations.</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.pipeline.train\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.pipeline.</span></span><span class=\"sig-name descname\"><span class=\"pre\">train</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommender</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><a class=\"reference internal\" href=\"#mab2rec.BanditRecommender\" title=\"mab2rec.rec.BanditRecommender\"><span class=\"pre\">mab2rec.rec.BanditRecommender</span></a></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">data</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features_list</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_features_dtypes</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_features</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_list</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Arm</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_eligibility</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">warm_start</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">warm_start_distance</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'item_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">response_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'response'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">batch_size</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">100000</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">save_file</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">bool</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em><span class=\"sig-paren\">)</span> <span class=\"sig-return\"><span class=\"sig-return-icon\">&#x2192;</span> <span class=\"sig-return-typehint\"><span class=\"pre\">None</span></span></span><a class=\"headerlink\" href=\"#mab2rec.pipeline.train\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Trains Recommender.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommender</strong> (<a class=\"reference internal\" href=\"#mab2rec.BanditRecommender\" title=\"mab2rec.BanditRecommender\"><em>BanditRecommender</em></a>) – The recommender algorithm to be trained.\nThe recommender object is updated in-place.</p></li>\n<li><p><strong>data</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em>) – Training data.\nData should have a row for each training sample (user_id, item_id, response).\nColumn names should be consistent with user_id_col, item_id_col and response_col arguments.\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>user_features</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – User features containing features for each user_id.\nEach row should include user_id and list of features (user_id, u_1, u_2, …, u_p).\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>user_features_list</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>List</em><em>[</em><em>str</em><em>]</em><em>]</em><em>, </em><em>default=None</em>) – List of user features to use.\nMust be a subset of features in (u_1, u_2, … u_p).\nIf None, all the features in user_features are used.\nCSV format with file header or List.</p></li>\n<li><p><strong>user_features_dtypes</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>Dict</em><em>]</em><em>, </em><em>default=None</em>) – Data type for each user feature.\nMaps each user feature name to valid data type.\nIf none, no data type casting is done upon load and data types or inferred by Pandas library.\nJSON format or Dictionary.</p></li>\n<li><p><strong>item_features</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – Item features file containing features for each item_id.\nEach row should include item_id and list of features (item_id, i_1, i_2, …. i_q).\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>item_list</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>List</em><em>[</em><em>Arm</em><em>]</em><em>]</em><em>, </em><em>default=None</em>) – List of items to train.\nIf None, all the items in data are used.\nCSV format with file header or List.</p></li>\n<li><p><strong>item_eligibility</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>default=None</em>) – Items each user is eligible for.\nNot used during training.\nCSV format with file header or Data Frame.</p></li>\n<li><p><strong>warm_start</strong> (<em>bool</em><em>, </em><em>default=False</em>) – Whether to warm start untrained (cold) arms after training or not.</p></li>\n<li><p><strong>warm_start_distance</strong> (<em>float</em><em>, </em><em>default=None</em>) – Warm start distance quantile.\nValue between 0 and 1 used to determine if an item can be warm started or not using closest item.\nAll cold items will be warm started if 1 and none will be warm started if 0.\nMust be specified if warm_start=True.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.user_id</em>) – User id column name.</p></li>\n<li><p><strong>item_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.item_id</em>) – Item id column name.</p></li>\n<li><p><strong>response_col</strong> (<em>str</em><em>, </em><em>default=Constants.response</em>) – Response column name.</p></li>\n<li><p><strong>batch_size</strong> (<em>str</em><em>, </em><em>default=100000</em>) – Batch size used for chunking data.</p></li>\n<li><p><strong>save_file</strong> (<em>Union</em><em>[</em><em>str</em><em>, </em><em>bool</em><em>]</em><em>, </em><em>default=None</em>) – File name to save recommender pickle.\nIf None, recommender is not saved to file.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Return type</dt>\n<dd class=\"field-even\"><p>Returns nothing.</p>\n</dd>\n</dl>\n</dd></dl>\n\n</section>\n<section id=\"module-mab2rec.visualization\">\n<span id=\"visualization\"></span><h2>Visualization<a class=\"headerlink\" href=\"#module-mab2rec.visualization\" title=\"Permalink to this headline\"></a></h2>\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.visualization.plot_inter_diversity_at_k\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.visualization.</span></span><span class=\"sig-name descname\"><span class=\"pre\">plot_inter_diversity_at_k</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommendation_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">k_list</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'item_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">score_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'score'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">sample_size</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">seed</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">12345</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">num_runs</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">10</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">n_jobs</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">working_memory</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"o\"><span class=\"pre\">**</span></span><span class=\"n\"><span class=\"pre\">kwargs</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.visualization.plot_inter_diversity_at_k\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Plots recommendation metric values (y-axis) for different values of k (x-axis)\nfor each of the benchmark algorithms.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommendation_results</strong> (<em>Union</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>List</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>]</em><em>]</em>) – Dictionary or list of dictionaries with recommendation results returned by benchmark function.</p></li>\n<li><p><strong>k_list</strong> (<em>List</em><em>[</em><em>int</em><em>]</em>) – List of top-k values to evaluate.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.user_id</em>) – User id column name.</p></li>\n<li><p><strong>item_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.item_id</em>) – Item id column name.</p></li>\n<li><p><strong>score_col</strong> (<em>str</em><em>, </em><em>default=Constants.score</em>) – Recommendation score column name.</p></li>\n<li><p><strong>sample_size</strong> (<em>float</em><em>, </em><em>default=None</em>) – Proportion of users to randomly sample for evaluation.\nIf None, no sampling is performed.</p></li>\n<li><p><strong>seed</strong> (<em>int</em><em>, </em><em>default=Constants.default_seed</em>) – The seed used to create random state.</p></li>\n<li><p><strong>num_runs</strong> (<em>int</em>) – num_runs is used to report the approximation of Inter-List Diversity over multiple runs on smaller\nsamples of users, default=10, for a speed-up on evaluations. The sampling size is defined by\nuser_sample_size. The final result is averaged over the multiple runs.</p></li>\n<li><p><strong>n_jobs</strong> (<em>int</em>) – Number of jobs to use for computation in parallel, leveraged by sklearn.metrics.pairwise_distances_chunked.\n-1 means using all processors. Default=1.</p></li>\n<li><p><strong>working_memory</strong> (<em>Union</em><em>[</em><em>int</em><em>, </em><em>None</em><em>]</em>) – Maximum memory for temporary distance matrix chunks, leveraged by sklearn.metrics.pairwise_distances_chunked.\nWhen None (default), the value of sklearn.get_config()[‘working_memory’], i.e. 1024M, is used.</p></li>\n<li><p><strong>**kwargs</strong> – Other parameters passed to <code class=\"docutils literal notranslate\"><span class=\"pre\">sns.catplot</span></code>.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Returns</dt>\n<dd class=\"field-even\"><p><strong>ax</strong> – The plot with metric values.</p>\n</dd>\n<dt class=\"field-odd\">Return type</dt>\n<dd class=\"field-odd\"><p>matplotlib.axes.Axes</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.visualization.plot_intra_diversity_at_k\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.visualization.</span></span><span class=\"sig-name descname\"><span class=\"pre\">plot_intra_diversity_at_k</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommendation_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_features</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">pandas.core.frame.DataFrame</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">k_list</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'item_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">score_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'score'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">sample_size</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">seed</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">12345</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">n_jobs</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">1</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">num_runs</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">10</span></span></em>, <em class=\"sig-param\"><span class=\"o\"><span class=\"pre\">**</span></span><span class=\"n\"><span class=\"pre\">kwargs</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.visualization.plot_intra_diversity_at_k\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Plots recommendation metric values (y-axis) for different values of k (x-axis)\nfor each of the benchmark algorithms.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommendation_results</strong> (<em>Union</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>List</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>]</em><em>]</em>) – Dictionary or list of dictionaries with recommendation results returned by benchmark function.</p></li>\n<li><p><strong>item_features</strong> (<em>pd.DataFrame</em>) – Data frame with features for each item_id.</p></li>\n<li><p><strong>k_list</strong> (<em>List</em><em>[</em><em>int</em><em>]</em>) – List of top-k values to evaluate.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.user_id</em>) – User id column name.</p></li>\n<li><p><strong>item_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.item_id</em>) – Item id column name.</p></li>\n<li><p><strong>score_col</strong> (<em>str</em><em>, </em><em>default=Constants.score</em>) – Recommendation score column name.</p></li>\n<li><p><strong>sample_size</strong> (<em>float</em><em>, </em><em>default=None</em>) – Proportion of users to randomly sample for evaluation.\nIf None, no sampling is performed.</p></li>\n<li><p><strong>seed</strong> (<em>int</em><em>, </em><em>default=Constants.default_seed</em>) – The seed used to create random state.</p></li>\n<li><p><strong>num_runs</strong> (<em>int</em>) – num_runs is used to report the approximation of Intra-List Diversity over multiple runs on smaller\nsamples of users, default=10, for a speed-up on evaluations. The sampling size is defined by\nuser_sample_size. The final result is averaged over the multiple runs.</p></li>\n<li><p><strong>n_jobs</strong> (<em>int</em>) – Number of jobs to use for computation in parallel, leveraged by sklearn.metrics.pairwise_distances.\n-1 means using all processors. Default=1.</p></li>\n<li><p><strong>**kwargs</strong> – Other parameters passed to <code class=\"docutils literal notranslate\"><span class=\"pre\">sns.catplot</span></code>.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Returns</dt>\n<dd class=\"field-even\"><p><strong>ax</strong> – The plot with metric values.</p>\n</dd>\n<dt class=\"field-odd\">Return type</dt>\n<dd class=\"field-odd\"><p>matplotlib.axes.Axes</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.visualization.plot_metrics_at_k\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.visualization.</span></span><span class=\"sig-name descname\"><span class=\"pre\">plot_metrics_at_k</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">metric_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">float</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"o\"><span class=\"pre\">**</span></span><span class=\"n\"><span class=\"pre\">kwargs</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.visualization.plot_metrics_at_k\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Plots recommendation metric values (y-axis) for different values of k (x-axis)\nfor each of the benchmark algorithms.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>metric_results</strong> (<em>Union</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>float</em><em>]</em><em>]</em><em>, </em><em>List</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>float</em><em>]</em><em>]</em><em>]</em><em>]</em>) – Nested-dictionary or list of dictionaries with evaluation results returned by benchmark function.</p></li>\n<li><p><strong>**kwargs</strong> – Other parameters passed to <code class=\"docutils literal notranslate\"><span class=\"pre\">sns.catplot</span></code>.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Returns</dt>\n<dd class=\"field-even\"><p><strong>ax</strong> – The plot with metric values.</p>\n</dd>\n<dt class=\"field-odd\">Return type</dt>\n<dd class=\"field-odd\"><p>matplotlib.axes.Axes</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.visualization.plot_num_items_per_recommendation\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.visualization.</span></span><span class=\"sig-name descname\"><span class=\"pre\">plot_num_items_per_recommendation</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommendation_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">actual_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">pandas.core.frame.DataFrame</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">normalize</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"o\"><span class=\"pre\">**</span></span><span class=\"n\"><span class=\"pre\">kwargs</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.visualization.plot_num_items_per_recommendation\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Plots recommendation counts (y-axis) versus actual counts or average responses (x-axis) for each item.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommendation_results</strong> (<em>Union</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>List</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>]</em><em>]</em>) – Dictionary or list of dictionaries with recommendation results returned by benchmark function.</p></li>\n<li><p><strong>actual_results</strong> (<em>pd.DataFrame</em>) – Test data frame used to generate recommendations.\nData should have a row for each sample (user_id, item_id, response).</p></li>\n<li><p><strong>normalize</strong> (<em>bool</em><em>, </em><em>default=False</em>) – Whether to normalize the number of items to be proportions such that they add to 1.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em>) – User id column name.\nDefault value is set to Constants.user_id</p></li>\n<li><p><strong>**kwargs</strong> – Other parameters passed to <code class=\"docutils literal notranslate\"><span class=\"pre\">sns.catplot</span></code>.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Returns</dt>\n<dd class=\"field-even\"><p><strong>ax</strong> – The plot with counts or proportions for\ndifferent number of items per recommendation.</p>\n</dd>\n<dt class=\"field-odd\">Return type</dt>\n<dd class=\"field-odd\"><p>matplotlib.axes.Axes</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.visualization.plot_personalization_heatmap\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.visualization.</span></span><span class=\"sig-name descname\"><span class=\"pre\">plot_personalization_heatmap</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommendation_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_to_cluster</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">k</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'item_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">figsize</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Tuple</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"o\"><span class=\"pre\">**</span></span><span class=\"n\"><span class=\"pre\">kwargs</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.visualization.plot_personalization_heatmap\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Plot heatmaps to visualize level of personalization, by calculating the distribution of recommendations\nby item within different user clusters.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommendation_results</strong> (<em>Union</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>List</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>]</em><em>]</em>) – Dictionary or list of dictionaries with recommendation results returned by benchmark function.</p></li>\n<li><p><strong>user_to_cluster</strong> (<em>Dict</em><em>[</em><em>Union</em><em>[</em><em>int</em><em>, </em><em>str</em><em>]</em><em>, </em><em>int</em><em>]</em>) – Mapping from user_id to cluster.\nClusters could be derived from clustering algorithm such as KMeans or\ndefined based on specific user features (e.g. age bands)</p></li>\n<li><p><strong>k</strong> (<em>int</em>) – Top-k recommendations to evaluate.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.user_id</em>) – User id column name.</p></li>\n<li><p><strong>item_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.item_id</em>) – Item id column name.</p></li>\n<li><p><strong>figsize</strong> (<em>Tuple</em><em>[</em><em>int</em><em>, </em><em>int</em><em>]</em><em>, </em><em>default=None</em>) – Figure size of heatmap set using plt.figure()</p></li>\n<li><p><strong>**kwargs</strong> – Other parameters passed to <code class=\"docutils literal notranslate\"><span class=\"pre\">sns.catplot</span></code>.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Returns</dt>\n<dd class=\"field-even\"><p><strong>ax</strong> – The plot with counts or proportions for\ndifferent number of items per recommendation.</p>\n</dd>\n<dt class=\"field-odd\">Return type</dt>\n<dd class=\"field-odd\"><p>matplotlib.axes.Axes</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.visualization.plot_recommended_counts\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.visualization.</span></span><span class=\"sig-name descname\"><span class=\"pre\">plot_recommended_counts</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommendation_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">actual_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">pandas.core.frame.DataFrame</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">k</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">average_response</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'item_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">response_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'response'</span></span></em>, <em class=\"sig-param\"><span class=\"o\"><span class=\"pre\">**</span></span><span class=\"n\"><span class=\"pre\">kwargs</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.visualization.plot_recommended_counts\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Plots recommendation counts (y-axis) versus actual counts or average responses (x-axis) for each item.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommendation_results</strong> (<em>Union</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>List</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>]</em><em>]</em>) – Dictionary or list of dictionaries with recommendation results returned by benchmark function.</p></li>\n<li><p><strong>actual_results</strong> (<em>pd.DataFrame</em>) – Test data frame used to generate recommendations.\nData should have a row for each sample (user_id, item_id, response).</p></li>\n<li><p><strong>k</strong> (<em>int</em>) – Top-k recommendations to evaluate.</p></li>\n<li><p><strong>average_response</strong> (<em>bool</em><em>, </em><em>default=False</em>) – Whether to plot the average response/reward or not.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.user_id</em>) – User id column name.</p></li>\n<li><p><strong>item_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.item_id</em>) – Item id column name.</p></li>\n<li><p><strong>response_col</strong> (<em>str</em><em>, </em><em>default=Constants.response</em>) – Response column name.</p></li>\n<li><p><strong>**kwargs</strong> – Other parameters passed to <code class=\"docutils literal notranslate\"><span class=\"pre\">sns.relplot</span></code>.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Returns</dt>\n<dd class=\"field-even\"><p><strong>ax</strong> – The plot with recommended counts.</p>\n</dd>\n<dt class=\"field-odd\">Return type</dt>\n<dd class=\"field-odd\"><p>matplotlib.axes.Axes</p>\n</dd>\n</dl>\n</dd></dl>\n\n<dl class=\"py function\">\n<dt class=\"sig sig-object py\" id=\"mab2rec.visualization.plot_recommended_counts_by_item\">\n<span class=\"sig-prename descclassname\"><span class=\"pre\">mab2rec.visualization.</span></span><span class=\"sig-name descname\"><span class=\"pre\">plot_recommended_counts_by_item</span></span><span class=\"sig-paren\">(</span><em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">recommendation_results</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Union</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">List</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">Dict</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">str</span><span class=\"p\"><span class=\"pre\">,</span></span><span class=\"w\"> </span><span class=\"pre\">pandas.core.frame.DataFrame</span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span><span class=\"p\"><span class=\"pre\">]</span></span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">k</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">int</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">top_n_items</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">Optional</span><span class=\"p\"><span class=\"pre\">[</span></span><span class=\"pre\">int</span><span class=\"p\"><span class=\"pre\">]</span></span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">None</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">normalize</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">bool</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">False</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">user_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'user_id'</span></span></em>, <em class=\"sig-param\"><span class=\"n\"><span class=\"pre\">item_id_col</span></span><span class=\"p\"><span class=\"pre\">:</span></span><span class=\"w\"> </span><span class=\"n\"><span class=\"pre\">str</span></span><span class=\"w\"> </span><span class=\"o\"><span class=\"pre\">=</span></span><span class=\"w\"> </span><span class=\"default_value\"><span class=\"pre\">'item_id'</span></span></em>, <em class=\"sig-param\"><span class=\"o\"><span class=\"pre\">**</span></span><span class=\"n\"><span class=\"pre\">kwargs</span></span></em><span class=\"sig-paren\">)</span><a class=\"headerlink\" href=\"#mab2rec.visualization.plot_recommended_counts_by_item\" title=\"Permalink to this definition\"></a></dt>\n<dd><p>Plots recommendation counts (y-axis) for different items (x-axis) for each of the benchmark algorithms. Only the\ntop_n_items with the most recommendations for each algorithm are shown.</p>\n<dl class=\"field-list simple\">\n<dt class=\"field-odd\">Parameters</dt>\n<dd class=\"field-odd\"><ul class=\"simple\">\n<li><p><strong>recommendation_results</strong> (<em>Union</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>, </em><em>List</em><em>[</em><em>Dict</em><em>[</em><em>str</em><em>, </em><em>pd.DataFrame</em><em>]</em><em>]</em><em>]</em>) – Dictionary or list of dictionaries with recommendation results returned by benchmark function.</p></li>\n<li><p><strong>k</strong> (<em>int</em>) – Top-k recommendations to evaluate.</p></li>\n<li><p><strong>top_n_items</strong> (<em>int</em><em>, </em><em>default=None</em>) – Top-n number of items based on number of recommendations to plot.</p></li>\n<li><p><strong>normalize</strong> (<em>bool</em><em>, </em><em>default=False</em>) – Whether to normalize the counts per item to be proportions such that they add to 1.</p></li>\n<li><p><strong>user_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.user_id</em>) – User id column name.</p></li>\n<li><p><strong>item_id_col</strong> (<em>str</em><em>, </em><em>default=Constants.item_id</em>) – Item id column name.</p></li>\n<li><p><strong>**kwargs</strong> – Other parameters passed to <code class=\"docutils literal notranslate\"><span class=\"pre\">sns.catplot</span></code>.</p></li>\n</ul>\n</dd>\n<dt class=\"field-even\">Returns</dt>\n<dd class=\"field-even\"><p><strong>ax</strong> – The plot with recommended counts by item.</p>\n</dd>\n<dt class=\"field-odd\">Return type</dt>\n<dd class=\"field-odd\"><p>matplotlib.axes.Axes</p>\n</dd>\n</dl>\n</dd></dl>\n\n</section>\n</section>\n\n\n           </div>\n          </div>\n          <footer><div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"Footer\">\n        <a href=\"contributing.html\" class=\"btn btn-neutral float-left\" title=\"Contributing\" accesskey=\"p\" rel=\"prev\"><span class=\"fa fa-arrow-circle-left\" aria-hidden=\"true\"></span> Previous</a>\n    </div>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script> \n\n</body>\n</html>"
  },
  {
    "path": "docs/contributing.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" /><meta name=\"generator\" content=\"Docutils 0.17.1: http://docutils.sourceforge.net/\" />\n\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Contributing &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n    <link rel=\"next\" title=\"Mab2Rec Public API\" href=\"api.html\" />\n    <link rel=\"prev\" title=\"Usage Examples\" href=\"examples.html\" /> \n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"index.html\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul class=\"current\">\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1 current\"><a class=\"current reference internal\" href=\"#\">Contributing</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#code-contributions\">Code Contributions</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#documentation-contributions\">Documentation Contributions</a></li>\n</ul>\n</li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a></li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"index.html\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"index.html\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Contributing</li>\n      <li class=\"wy-breadcrumbs-aside\">\n            <a href=\"_sources/contributing.rst.txt\" rel=\"nofollow\"> View page source</a>\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n  <section id=\"contributing\">\n<span id=\"id1\"></span><h1>Contributing<a class=\"headerlink\" href=\"#contributing\" title=\"Permalink to this headline\"></a></h1>\n<p>We welcome contributions of all from everybody, and we will make an effort\nto respond to any questions and requests. Code is not the only way to make\na contribution!</p>\n<p>If you end up using our library in a project, give us a star on GitHub!</p>\n<section id=\"code-contributions\">\n<h2>Code Contributions<a class=\"headerlink\" href=\"#code-contributions\" title=\"Permalink to this headline\"></a></h2>\n<ul class=\"simple\">\n<li><p>With any piece of code, please adhere to PEP-8 standards.</p></li>\n<li><p>If you’re fixing an issue with an existing piece of code, please make sure all the tests pass, and there is no change in functionality.</p></li>\n<li><p>If you want to add a new feature, please open up an issue first.</p></li>\n<li><p>When adding a new feature, make sure you have relevant test coverage.</p></li>\n<li><p>Any changes to the public API should conform to the current standards, be properly documented, typed, and be intuitive.</p></li>\n</ul>\n</section>\n<section id=\"documentation-contributions\">\n<h2>Documentation Contributions<a class=\"headerlink\" href=\"#documentation-contributions\" title=\"Permalink to this headline\"></a></h2>\n<ul class=\"simple\">\n<li><p>Make sure you follow the standards set by the rest of the repo.</p></li>\n<li><p>Be concise, but do not omit details. Verbose documentation is preferred to incomplete documentation.</p></li>\n</ul>\n</section>\n</section>\n\n\n           </div>\n          </div>\n          <footer><div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"Footer\">\n        <a href=\"examples.html\" class=\"btn btn-neutral float-left\" title=\"Usage Examples\" accesskey=\"p\" rel=\"prev\"><span class=\"fa fa-arrow-circle-left\" aria-hidden=\"true\"></span> Previous</a>\n        <a href=\"api.html\" class=\"btn btn-neutral float-right\" title=\"Mab2Rec Public API\" accesskey=\"n\" rel=\"next\">Next <span class=\"fa fa-arrow-circle-right\" aria-hidden=\"true\"></span></a>\n    </div>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script> \n\n</body>\n</html>"
  },
  {
    "path": "docs/examples.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" /><meta name=\"generator\" content=\"Docutils 0.17.1: http://docutils.sourceforge.net/\" />\n\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Usage Examples &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n    <link rel=\"next\" title=\"Contributing\" href=\"contributing.html\" />\n    <link rel=\"prev\" title=\"Quick Start\" href=\"quick.html\" /> \n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"index.html\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul class=\"current\">\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a></li>\n<li class=\"toctree-l1 current\"><a class=\"current reference internal\" href=\"#\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a></li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"index.html\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"index.html\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Usage Examples</li>\n      <li class=\"wy-breadcrumbs-aside\">\n            <a href=\"_sources/examples.rst.txt\" rel=\"nofollow\"> View page source</a>\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n  <section id=\"usage-examples\">\n<span id=\"examples\"></span><h1>Usage Examples<a class=\"headerlink\" href=\"#usage-examples\" title=\"Permalink to this headline\"></a></h1>\n<p>We provide extensive tutorials in Jupyter notebooks under the <a class=\"reference external\" href=\"https://github.com/fidelity/mab2rec/tree/main/notebooks\">notebooks</a> folder for guidelines on building recommenders, performing model selection, and evaluating performance:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/mab2rec/tree/main/notebooks/1_data_overview.ipynb\">Data Overview</a> provides an overview of data required to train recommender.</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/mab2rec/tree/main/notebooks/2_feature_engineering.ipynb\">Feature Engineering</a> gives an overview of methods to create user and item features from structured, unstructured, and sequential data.</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/mab2rec/tree/main/notebooks/3_model_selection.ipynb\">Model Selection</a> shows to do model selection by benchmarking recommenders using cross-validation.</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/mab2rec/tree/main/notebooks/4_evaluation.ipynb\">Evaluation</a> benchmarks selected recommenders and baselines on test data with detailed evaluations.</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/mab2rec/tree/main/notebooks/5_advanced.ipynb\">Advanced</a> demonstrates some advanced functionality.</p></li>\n</ul>\n</section>\n\n\n           </div>\n          </div>\n          <footer><div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"Footer\">\n        <a href=\"quick.html\" class=\"btn btn-neutral float-left\" title=\"Quick Start\" accesskey=\"p\" rel=\"prev\"><span class=\"fa fa-arrow-circle-left\" aria-hidden=\"true\"></span> Previous</a>\n        <a href=\"contributing.html\" class=\"btn btn-neutral float-right\" title=\"Contributing\" accesskey=\"n\" rel=\"next\">Next <span class=\"fa fa-arrow-circle-right\" aria-hidden=\"true\"></span></a>\n    </div>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script> \n\n</body>\n</html>"
  },
  {
    "path": "docs/genindex.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Index &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"#\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" /> \n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"index.html\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a></li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"index.html\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"index.html\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Index</li>\n      <li class=\"wy-breadcrumbs-aside\">\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n\n<h1 id=\"index\">Index</h1>\n\n<div class=\"genindex-jumpbox\">\n <a href=\"#A\"><strong>A</strong></a>\n | <a href=\"#B\"><strong>B</strong></a>\n | <a href=\"#E\"><strong>E</strong></a>\n | <a href=\"#F\"><strong>F</strong></a>\n | <a href=\"#I\"><strong>I</strong></a>\n | <a href=\"#K\"><strong>K</strong></a>\n | <a href=\"#L\"><strong>L</strong></a>\n | <a href=\"#M\"><strong>M</strong></a>\n | <a href=\"#N\"><strong>N</strong></a>\n | <a href=\"#P\"><strong>P</strong></a>\n | <a href=\"#R\"><strong>R</strong></a>\n | <a href=\"#S\"><strong>S</strong></a>\n | <a href=\"#T\"><strong>T</strong></a>\n | <a href=\"#W\"><strong>W</strong></a>\n \n</div>\n<h2 id=\"A\">A</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.add_arm\">add_arm() (mab2rec.BanditRecommender method)</a>\n</li>\n      <li><a href=\"api.html#id4\">alpha (mab2rec.LearningPolicy.LinTS attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinTS.alpha\">[1]</a>\n\n      <ul>\n        <li><a href=\"api.html#id7\">(mab2rec.LearningPolicy.LinUCB attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinUCB.alpha\">[1]</a>\n</li>\n        <li><a href=\"api.html#id12\">(mab2rec.LearningPolicy.UCB1 attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.UCB1.alpha\">[1]</a>\n</li>\n      </ul></li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"B\">B</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.backend\">backend (mab2rec.BanditRecommender attribute)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender\">BanditRecommender (class in mab2rec)</a>\n</li>\n  </ul></td>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.pipeline.benchmark\">benchmark() (in module mab2rec.pipeline)</a>\n</li>\n      <li><a href=\"api.html#id11\">binarizer (mab2rec.LearningPolicy.ThompsonSampling attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.ThompsonSampling.binarizer\">[1]</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"E\">E</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id0\">epsilon (mab2rec.LearningPolicy.EpsilonGreedy attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.EpsilonGreedy.epsilon\">[1]</a>\n\n      <ul>\n        <li><a href=\"api.html#id1\">(mab2rec.LearningPolicy.LinGreedy attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinGreedy.epsilon\">[1]</a>\n</li>\n      </ul></li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"F\">F</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.fit\">fit() (mab2rec.BanditRecommender method)</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"I\">I</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id13\">is_minibatch (mab2rec.NeighborhoodPolicy.Clusters attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.Clusters.is_minibatch\">[1]</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"K\">K</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id15\">k (mab2rec.NeighborhoodPolicy.KNearest attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.KNearest.k\">[1]</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"L\">L</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id2\">l2_lambda (mab2rec.LearningPolicy.LinGreedy attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinGreedy.l2_lambda\">[1]</a>\n\n      <ul>\n        <li><a href=\"api.html#id5\">(mab2rec.LearningPolicy.LinTS attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinTS.l2_lambda\">[1]</a>\n</li>\n        <li><a href=\"api.html#id8\">(mab2rec.LearningPolicy.LinUCB attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinUCB.l2_lambda\">[1]</a>\n</li>\n      </ul></li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.learning_policy\">learning_policy (mab2rec.BanditRecommender attribute)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy\">LearningPolicy (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.EpsilonGreedy\">LearningPolicy.EpsilonGreedy (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.LinGreedy\">LearningPolicy.LinGreedy (class in mab2rec)</a>\n</li>\n  </ul></td>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.LinTS\">LearningPolicy.LinTS (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.LinUCB\">LearningPolicy.LinUCB (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.Popularity\">LearningPolicy.Popularity (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.Random\">LearningPolicy.Random (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.Softmax\">LearningPolicy.Softmax (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.ThompsonSampling\">LearningPolicy.ThompsonSampling (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.LearningPolicy.UCB1\">LearningPolicy.UCB1 (class in mab2rec)</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"M\">M</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.mab\">mab (mab2rec.BanditRecommender attribute)</a>\n</li>\n      <li>\n    mab2rec\n\n      <ul>\n        <li><a href=\"api.html#module-mab2rec\">module</a>\n</li>\n      </ul></li>\n      <li>\n    mab2rec.pipeline\n\n      <ul>\n        <li><a href=\"api.html#module-mab2rec.pipeline\">module</a>\n</li>\n      </ul></li>\n      <li>\n    mab2rec.visualization\n\n      <ul>\n        <li><a href=\"api.html#module-mab2rec.visualization\">module</a>\n</li>\n      </ul></li>\n  </ul></td>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id16\">metric (mab2rec.NeighborhoodPolicy.KNearest attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.KNearest.metric\">[1]</a>\n\n      <ul>\n        <li><a href=\"api.html#id20\">(mab2rec.NeighborhoodPolicy.Radius attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.Radius.metric\">[1]</a>\n</li>\n      </ul></li>\n      <li>\n    module\n\n      <ul>\n        <li><a href=\"api.html#module-mab2rec\">mab2rec</a>\n</li>\n        <li><a href=\"api.html#module-mab2rec.pipeline\">mab2rec.pipeline</a>\n</li>\n        <li><a href=\"api.html#module-mab2rec.visualization\">mab2rec.visualization</a>\n</li>\n      </ul></li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"N\">N</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id14\">n_clusters (mab2rec.NeighborhoodPolicy.Clusters attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.Clusters.n_clusters\">[1]</a>\n</li>\n      <li><a href=\"api.html#id17\">n_dimensions (mab2rec.NeighborhoodPolicy.LSHNearest attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.LSHNearest.n_dimensions\">[1]</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.n_jobs\">n_jobs (mab2rec.BanditRecommender attribute)</a>\n</li>\n      <li><a href=\"api.html#id18\">n_tables (mab2rec.NeighborhoodPolicy.LSHNearest attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.LSHNearest.n_tables\">[1]</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.neighborhood_policy\">neighborhood_policy (mab2rec.BanditRecommender attribute)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.NeighborhoodPolicy\">NeighborhoodPolicy (class in mab2rec)</a>\n</li>\n  </ul></td>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.NeighborhoodPolicy.Clusters\">NeighborhoodPolicy.Clusters (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.NeighborhoodPolicy.KNearest\">NeighborhoodPolicy.KNearest (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.NeighborhoodPolicy.LSHNearest\">NeighborhoodPolicy.LSHNearest (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.NeighborhoodPolicy.Radius\">NeighborhoodPolicy.Radius (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.NeighborhoodPolicy.TreeBandit\">NeighborhoodPolicy.TreeBandit (class in mab2rec)</a>\n</li>\n      <li><a href=\"api.html#id19\">no_nhood_prob_of_arm (mab2rec.NeighborhoodPolicy.LSHNearest attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.LSHNearest.no_nhood_prob_of_arm\">[1]</a>\n\n      <ul>\n        <li><a href=\"api.html#id21\">(mab2rec.NeighborhoodPolicy.Radius attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.Radius.no_nhood_prob_of_arm\">[1]</a>\n</li>\n      </ul></li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"P\">P</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.partial_fit\">partial_fit() (mab2rec.BanditRecommender method)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.visualization.plot_inter_diversity_at_k\">plot_inter_diversity_at_k() (in module mab2rec.visualization)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.visualization.plot_intra_diversity_at_k\">plot_intra_diversity_at_k() (in module mab2rec.visualization)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.visualization.plot_metrics_at_k\">plot_metrics_at_k() (in module mab2rec.visualization)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.visualization.plot_num_items_per_recommendation\">plot_num_items_per_recommendation() (in module mab2rec.visualization)</a>\n</li>\n  </ul></td>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.visualization.plot_personalization_heatmap\">plot_personalization_heatmap() (in module mab2rec.visualization)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.visualization.plot_recommended_counts\">plot_recommended_counts() (in module mab2rec.visualization)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.visualization.plot_recommended_counts_by_item\">plot_recommended_counts_by_item() (in module mab2rec.visualization)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.predict\">predict() (mab2rec.BanditRecommender method)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.predict_expectations\">predict_expectations() (mab2rec.BanditRecommender method)</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"R\">R</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id22\">radius (mab2rec.NeighborhoodPolicy.Radius attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.Radius.radius\">[1]</a>\n</li>\n  </ul></td>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.recommend\">recommend() (mab2rec.BanditRecommender method)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.remove_arm\">remove_arm() (mab2rec.BanditRecommender method)</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"S\">S</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id3\">scale (mab2rec.LearningPolicy.LinGreedy attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinGreedy.scale\">[1]</a>\n\n      <ul>\n        <li><a href=\"api.html#id6\">(mab2rec.LearningPolicy.LinTS attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinTS.scale\">[1]</a>\n</li>\n        <li><a href=\"api.html#id9\">(mab2rec.LearningPolicy.LinUCB attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.LinUCB.scale\">[1]</a>\n</li>\n      </ul></li>\n  </ul></td>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.pipeline.score\">score() (in module mab2rec.pipeline)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.seed\">seed (mab2rec.BanditRecommender attribute)</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.set_arms\">set_arms() (mab2rec.BanditRecommender method)</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"T\">T</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#id10\">tau (mab2rec.LearningPolicy.Softmax attribute)</a>, <a href=\"api.html#mab2rec.LearningPolicy.Softmax.tau\">[1]</a>\n</li>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.top_k\">top_k (mab2rec.BanditRecommender attribute)</a>\n</li>\n  </ul></td>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.pipeline.train\">train() (in module mab2rec.pipeline)</a>\n</li>\n      <li><a href=\"api.html#id25\">tree_parameters (mab2rec.NeighborhoodPolicy.TreeBandit attribute)</a>, <a href=\"api.html#mab2rec.NeighborhoodPolicy.TreeBandit.tree_parameters\">[1]</a>\n</li>\n  </ul></td>\n</tr></table>\n\n<h2 id=\"W\">W</h2>\n<table style=\"width: 100%\" class=\"indextable genindextable\"><tr>\n  <td style=\"width: 33%; vertical-align: top;\"><ul>\n      <li><a href=\"api.html#mab2rec.BanditRecommender.warm_start\">warm_start() (mab2rec.BanditRecommender method)</a>\n</li>\n  </ul></td>\n</tr></table>\n\n\n\n           </div>\n          </div>\n          <footer>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script> \n\n</body>\n</html>"
  },
  {
    "path": "docs/index.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" /><meta name=\"generator\" content=\"Docutils 0.17.1: http://docutils.sourceforge.net/\" />\n\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Mab2Rec: Multi-Armed Bandits Recommender &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n    <link rel=\"next\" title=\"Installation\" href=\"installation.html\" /> \n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"#\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a></li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"#\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"#\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Mab2Rec: Multi-Armed Bandits Recommender</li>\n      <li class=\"wy-breadcrumbs-aside\">\n            <a href=\"_sources/index.rst.txt\" rel=\"nofollow\"> View page source</a>\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n  <section id=\"mab2rec-multi-armed-bandits-recommender\">\n<h1>Mab2Rec: Multi-Armed Bandits Recommender<a class=\"headerlink\" href=\"#mab2rec-multi-armed-bandits-recommender\" title=\"Permalink to this headline\"></a></h1>\n<p>Mab2Rec is a Python library for building bandit-based recommendation algorithms. It supports <strong>context-free</strong>, <strong>parametric</strong>\nand <strong>non-parametric</strong> <strong>contextual</strong> bandit models powered by <a class=\"reference external\" href=\"https://github.com/fidelity/mabwiser\">MABWiser</a> and\nfairness and recommenders evaluations powered by <a class=\"reference external\" href=\"https://github.com/fidelity/jurity\">Jurity</a>.\nIt supports <a class=\"reference external\" href=\"https://github.com/fidelity/mabwiser#available-bandit-policies\">all bandit policies available in MABWiser</a>.\nThe library is designed with rapid experimentation in mind, follows the <a class=\"reference external\" href=\"https://www.python.org/dev/peps/pep-0008\">PEP-8 standards</a> and is tested heavily.</p>\n<p>Mab2Rec and several of the open-source software it is built on is developed by the Artificial Intelligence Center at Fidelity Investments, including:</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/mabwiser\">MABWiser</a> to create multi-armed bandit recommendation algorithms (<a class=\"reference external\" href=\"https://www.worldscientific.com/doi/abs/10.1142/S0218213021500214\">IJAIT’21</a>, <a class=\"reference external\" href=\"https://ieeexplore.ieee.org/document/8995418\">ICTAI’19</a>).</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/textwiser\">TextWiser</a> to create item representations via text featurization (<a class=\"reference external\" href=\"https://ojs.aaai.org/index.php/AAAI/article/view/17814\">AAAI’21</a>).</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/selective\">Selective</a> to create user representations via feature selection.</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/seq2pat\">Seq2Pat</a> to enhance users representations via sequential pattern mining (<a class=\"reference external\" href=\"https://aaai.org/Conferences/AAAI-22/\">AAAI’22</a>).</p></li>\n<li><p><a class=\"reference external\" href=\"https://github.com/fidelity/jurity\">Jurity</a> to evaluate recommendations including fairness metrics (<a class=\"reference external\" href=\"https://ieeexplore.ieee.org/abstract/document/9680169\">ICMLA’21</a>).</p></li>\n</ul>\n<p>An introduction to <strong>content- and context-aware</strong> recommender systems and an overview of the building blocks of the library is <a class=\"reference external\" href=\"https://www.youtube.com/watch?v=54d_YUalvOA\">presented at All Things Open 2021</a>.</p>\n</section>\n<section id=\"quick-start\">\n<span id=\"quick\"></span><h1>Quick Start<a class=\"headerlink\" href=\"#quick-start\" title=\"Permalink to this headline\"></a></h1>\n<section id=\"individual-recommender\">\n<h2>Individual Recommender<a class=\"headerlink\" href=\"#individual-recommender\" title=\"Permalink to this headline\"></a></h2>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"c1\"># Example of how to train an individual recommender to generate top-4 recommendations</span>\n\n<span class=\"c1\"># Import</span>\n<span class=\"kn\">from</span> <span class=\"nn\">mab2rec</span> <span class=\"kn\">import</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"kn\">from</span> <span class=\"nn\">mab2rec.pipeline</span> <span class=\"kn\">import</span> <span class=\"n\">train</span><span class=\"p\">,</span> <span class=\"n\">score</span>\n\n<span class=\"c1\"># LinGreedy recommender to select top-4 items with 10% random exploration</span>\n<span class=\"n\">rec</span> <span class=\"o\">=</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">LinGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mf\">0.1</span><span class=\"p\">),</span> <span class=\"n\">top_k</span><span class=\"o\">=</span><span class=\"mi\">4</span><span class=\"p\">)</span>\n\n<span class=\"c1\"># Train on (user, item, response) interactions in train data using user features</span>\n<span class=\"n\">train</span><span class=\"p\">(</span><span class=\"n\">rec</span><span class=\"p\">,</span> <span class=\"n\">data</span><span class=\"o\">=</span><span class=\"s1\">&#39;data/data_train.csv&#39;</span><span class=\"p\">,</span>\n      <span class=\"n\">user_features</span><span class=\"o\">=</span><span class=\"s1\">&#39;data/features_user.csv&#39;</span><span class=\"p\">)</span>\n\n<span class=\"c1\"># Score recommendations for users in test data. The output df holds</span>\n<span class=\"c1\"># user_id, item_id, score columns for every test user for top-k items</span>\n<span class=\"n\">df</span> <span class=\"o\">=</span> <span class=\"n\">score</span><span class=\"p\">(</span><span class=\"n\">rec</span><span class=\"p\">,</span> <span class=\"n\">data</span><span class=\"o\">=</span><span class=\"s1\">&#39;data/data_test.csv&#39;</span><span class=\"p\">,</span>\n           <span class=\"n\">user_features</span><span class=\"o\">=</span><span class=\"s1\">&#39;data/features_user.csv&#39;</span><span class=\"p\">)</span>\n</pre></div>\n</div>\n</section>\n<section id=\"multiple-recommenders\">\n<h2>Multiple Recommenders<a class=\"headerlink\" href=\"#multiple-recommenders\" title=\"Permalink to this headline\"></a></h2>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"c1\"># Example of how to benchmark multiple bandit algorithms to generate top-4 recommendations</span>\n\n<span class=\"kn\">from</span> <span class=\"nn\">mab2rec</span> <span class=\"kn\">import</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"kn\">from</span> <span class=\"nn\">mab2rec.pipeline</span> <span class=\"kn\">import</span> <span class=\"n\">benchmark</span>\n<span class=\"kn\">from</span> <span class=\"nn\">jurity.recommenders</span> <span class=\"kn\">import</span> <span class=\"n\">BinaryRecoMetrics</span><span class=\"p\">,</span> <span class=\"n\">RankingRecoMetrics</span>\n\n<span class=\"c1\"># Recommenders (many more available)</span>\n<span class=\"n\">recommenders</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"s2\">&quot;Random&quot;</span><span class=\"p\">:</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">Random</span><span class=\"p\">()),</span>\n                <span class=\"s2\">&quot;Popularity&quot;</span><span class=\"p\">:</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">Popularity</span><span class=\"p\">()),</span>\n                <span class=\"s2\">&quot;LinGreedy&quot;</span><span class=\"p\">:</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">LinGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mf\">0.1</span><span class=\"p\">))}</span>\n\n<span class=\"c1\"># Column names for the response, user, and item id columns</span>\n<span class=\"n\">metric_params</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"s1\">&#39;click_column&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;score&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;user_id_column&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;user_id&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;item_id_column&#39;</span><span class=\"p\">:</span><span class=\"s1\">&#39;item_id&#39;</span><span class=\"p\">}</span>\n\n<span class=\"c1\"># Performance metrics for benchmarking (many more available)</span>\n<span class=\"n\">metrics</span> <span class=\"o\">=</span> <span class=\"p\">[]</span>\n<span class=\"k\">for</span> <span class=\"n\">top_k</span> <span class=\"ow\">in</span> <span class=\"p\">[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">,</span> <span class=\"mi\">10</span><span class=\"p\">]:</span>\n    <span class=\"n\">metrics</span><span class=\"o\">.</span><span class=\"n\">append</span><span class=\"p\">(</span><span class=\"n\">BinaryRecoMetrics</span><span class=\"o\">.</span><span class=\"n\">CTR</span><span class=\"p\">(</span><span class=\"o\">**</span><span class=\"n\">metric_params</span><span class=\"p\">,</span> <span class=\"n\">k</span><span class=\"o\">=</span><span class=\"n\">top_k</span><span class=\"p\">))</span>\n    <span class=\"n\">metrics</span><span class=\"o\">.</span><span class=\"n\">append</span><span class=\"p\">(</span><span class=\"n\">RankingRecoMetrics</span><span class=\"o\">.</span><span class=\"n\">NDCG</span><span class=\"p\">(</span><span class=\"o\">**</span><span class=\"n\">metric_params</span><span class=\"p\">,</span> <span class=\"n\">k</span><span class=\"o\">=</span><span class=\"n\">top_k</span><span class=\"p\">))</span>\n\n<span class=\"c1\"># Benchmarking with a collection of recommenders and metrics</span>\n<span class=\"c1\"># This returns two dictionaries;</span>\n<span class=\"c1\"># reco_to_results: recommendations for each algorithm on cross-validation data</span>\n<span class=\"c1\"># reco_to_metrics: evaluation metrics for each algorithm</span>\n<span class=\"n\">reco_to_results</span><span class=\"p\">,</span> <span class=\"n\">reco_to_metrics</span> <span class=\"o\">=</span> <span class=\"n\">benchmark</span><span class=\"p\">(</span><span class=\"n\">recommenders</span><span class=\"p\">,</span>\n                                             <span class=\"n\">metrics</span><span class=\"o\">=</span><span class=\"n\">metrics</span><span class=\"p\">,</span>\n                                             <span class=\"n\">train_data</span><span class=\"o\">=</span><span class=\"s2\">&quot;data/data_train.csv&quot;</span><span class=\"p\">,</span>\n                                             <span class=\"n\">cv</span><span class=\"o\">=</span><span class=\"mi\">5</span><span class=\"p\">,</span>\n                                             <span class=\"n\">user_features</span><span class=\"o\">=</span><span class=\"s2\">&quot;data/features_user.csv&quot;</span><span class=\"p\">)</span>\n</pre></div>\n</div>\n</section>\n</section>\n<section id=\"source-code\">\n<h1>Source Code<a class=\"headerlink\" href=\"#source-code\" title=\"Permalink to this headline\"></a></h1>\n<p>The source code is hosted on <a class=\"reference external\" href=\"https://github.com/fidelity/mab2rec\">GitHub</a>.</p>\n<aside class=\"sidebar\">\n<p class=\"sidebar-title\">Contents</p>\n<div class=\"toctree-wrapper compound\">\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"installation.html#requirements\">Requirements</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"installation.html#source-code\">Source Code</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"installation.html#test-your-setup\">Test Your Setup</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"installation.html#upgrade-the-library\">Upgrade the Library</a></li>\n</ul>\n</li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"quick.html#individual-recommender\">Individual Recommender</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"quick.html#multiple-recommenders\">Multiple Recommenders</a></li>\n</ul>\n</li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"contributing.html#code-contributions\">Code Contributions</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"contributing.html#documentation-contributions\">Documentation Contributions</a></li>\n</ul>\n</li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"api.html#banditrecommender\">BanditRecommender</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"api.html#learningpolicy\">LearningPolicy</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"api.html#neighborhoodpolicy\">NeighborhoodPolicy</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"api.html#module-mab2rec.pipeline\">Pipeline</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"api.html#module-mab2rec.visualization\">Visualization</a></li>\n</ul>\n</li>\n</ul>\n</div>\n</aside>\n</section>\n<section id=\"indices-and-tables\">\n<h1>Indices and tables<a class=\"headerlink\" href=\"#indices-and-tables\" title=\"Permalink to this headline\"></a></h1>\n<ul class=\"simple\">\n<li><p><a class=\"reference internal\" href=\"genindex.html\"><span class=\"std std-ref\">Index</span></a></p></li>\n<li><p><a class=\"reference internal\" href=\"py-modindex.html\"><span class=\"std std-ref\">Module Index</span></a></p></li>\n</ul>\n</section>\n\n\n           </div>\n          </div>\n          <footer><div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"Footer\">\n        <a href=\"installation.html\" class=\"btn btn-neutral float-right\" title=\"Installation\" accesskey=\"n\" rel=\"next\">Next <span class=\"fa fa-arrow-circle-right\" aria-hidden=\"true\"></span></a>\n    </div>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script> \n\n</body>\n</html>"
  },
  {
    "path": "docs/installation.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" /><meta name=\"generator\" content=\"Docutils 0.17.1: http://docutils.sourceforge.net/\" />\n\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Installation &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n    <link rel=\"next\" title=\"Quick Start\" href=\"quick.html\" />\n    <link rel=\"prev\" title=\"Mab2Rec: Multi-Armed Bandits Recommender\" href=\"index.html\" /> \n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"index.html\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul class=\"current\">\n<li class=\"toctree-l1 current\"><a class=\"current reference internal\" href=\"#\">Installation</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#requirements\">Requirements</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#source-code\">Source Code</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#test-your-setup\">Test Your Setup</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#upgrade-the-library\">Upgrade the Library</a></li>\n</ul>\n</li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a></li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"index.html\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"index.html\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Installation</li>\n      <li class=\"wy-breadcrumbs-aside\">\n            <a href=\"_sources/installation.rst.txt\" rel=\"nofollow\"> View page source</a>\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n  <section id=\"installation\">\n<span id=\"id1\"></span><h1>Installation<a class=\"headerlink\" href=\"#installation\" title=\"Permalink to this headline\"></a></h1>\n<div class=\"admonition-installation-options admonition\">\n<p class=\"admonition-title\">Installation Options</p>\n<p>There are two options to install the library:</p>\n<ol class=\"arabic simple\">\n<li><p>Install from PyPI using the prebuilt wheel package (<code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span> <span class=\"pre\">install</span> <span class=\"pre\">mab2rec</span></code>)</p></li>\n<li><p>Build from the source code</p></li>\n</ol>\n</div>\n<section id=\"requirements\">\n<h2>Requirements<a class=\"headerlink\" href=\"#requirements\" title=\"Permalink to this headline\"></a></h2>\n<p>The library requires Python <strong>3.7+</strong>. The <code class=\"docutils literal notranslate\"><span class=\"pre\">requirements.txt</span></code> lists the necessary\npackages.</p>\n</section>\n<section id=\"source-code\">\n<h2>Source Code<a class=\"headerlink\" href=\"#source-code\" title=\"Permalink to this headline\"></a></h2>\n<p>You can build a wheel package on your platform from scratch using the source code:</p>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"n\">git</span> <span class=\"n\">clone</span> <span class=\"n\">https</span><span class=\"p\">:</span><span class=\"o\">//</span><span class=\"n\">github</span><span class=\"o\">.</span><span class=\"n\">com</span><span class=\"o\">/</span><span class=\"n\">fidelity</span><span class=\"o\">/</span><span class=\"n\">mab2rec</span><span class=\"o\">.</span><span class=\"n\">git</span>\n<span class=\"n\">cd</span> <span class=\"n\">mab2rec</span>\n<span class=\"n\">pip</span> <span class=\"n\">install</span> <span class=\"n\">setuptools</span> <span class=\"n\">wheel</span> <span class=\"c1\"># if wheel is not installed</span>\n<span class=\"n\">python</span> <span class=\"n\">setup</span><span class=\"o\">.</span><span class=\"n\">py</span> <span class=\"n\">sdist</span> <span class=\"n\">bdist_wheel</span>\n<span class=\"n\">pip</span> <span class=\"n\">install</span> <span class=\"n\">dist</span><span class=\"o\">/</span><span class=\"n\">mab2rec</span><span class=\"o\">-</span><span class=\"n\">X</span><span class=\"o\">.</span><span class=\"n\">X</span><span class=\"o\">.</span><span class=\"n\">X</span><span class=\"o\">-</span><span class=\"n\">py3</span><span class=\"o\">-</span><span class=\"n\">none</span><span class=\"o\">-</span><span class=\"nb\">any</span><span class=\"o\">.</span><span class=\"n\">whl</span>\n</pre></div>\n</div>\n</section>\n<section id=\"test-your-setup\">\n<h2>Test Your Setup<a class=\"headerlink\" href=\"#test-your-setup\" title=\"Permalink to this headline\"></a></h2>\n<p>To confirm that cloning was successful, run the tests included in the project.</p>\n<p>All tests should pass.</p>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"n\">git</span> <span class=\"n\">clone</span> <span class=\"n\">https</span><span class=\"p\">:</span><span class=\"o\">//</span><span class=\"n\">github</span><span class=\"o\">.</span><span class=\"n\">com</span><span class=\"o\">/</span><span class=\"n\">fidelity</span><span class=\"o\">/</span><span class=\"n\">mab2rec</span><span class=\"o\">.</span><span class=\"n\">git</span>\n<span class=\"n\">cd</span> <span class=\"n\">mab2rec</span>\n<span class=\"n\">python</span> <span class=\"o\">-</span><span class=\"n\">m</span> <span class=\"n\">unittest</span> <span class=\"n\">discover</span> <span class=\"n\">tests</span>\n</pre></div>\n</div>\n</section>\n<section id=\"upgrade-the-library\">\n<h2>Upgrade the Library<a class=\"headerlink\" href=\"#upgrade-the-library\" title=\"Permalink to this headline\"></a></h2>\n<p>To upgrade to the latest version of the library, run <code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span> <span class=\"pre\">install</span> <span class=\"pre\">--upgrade</span> <span class=\"pre\">mab2rec</span></code>.</p>\n<p>If you installed from the source code:</p>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"n\">git</span> <span class=\"n\">pull</span> <span class=\"n\">origin</span> <span class=\"n\">master</span>\n<span class=\"n\">python</span> <span class=\"n\">setup</span><span class=\"o\">.</span><span class=\"n\">py</span> <span class=\"n\">sdist</span> <span class=\"n\">bdist_wheel</span>\n<span class=\"n\">pip</span> <span class=\"n\">install</span> <span class=\"o\">--</span><span class=\"n\">upgrade</span> <span class=\"o\">--</span><span class=\"n\">no</span><span class=\"o\">-</span><span class=\"n\">cache</span><span class=\"o\">-</span><span class=\"nb\">dir</span> <span class=\"n\">dist</span><span class=\"o\">/</span><span class=\"n\">mab2rec</span><span class=\"o\">-</span><span class=\"n\">X</span><span class=\"o\">.</span><span class=\"n\">X</span><span class=\"o\">.</span><span class=\"n\">X</span><span class=\"o\">-</span><span class=\"n\">py3</span><span class=\"o\">-</span><span class=\"n\">none</span><span class=\"o\">-</span><span class=\"nb\">any</span><span class=\"o\">.</span><span class=\"n\">whl</span>\n</pre></div>\n</div>\n</section>\n</section>\n\n\n           </div>\n          </div>\n          <footer><div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"Footer\">\n        <a href=\"index.html\" class=\"btn btn-neutral float-left\" title=\"Mab2Rec: Multi-Armed Bandits Recommender\" accesskey=\"p\" rel=\"prev\"><span class=\"fa fa-arrow-circle-left\" aria-hidden=\"true\"></span> Previous</a>\n        <a href=\"quick.html\" class=\"btn btn-neutral float-right\" title=\"Quick Start\" accesskey=\"n\" rel=\"next\">Next <span class=\"fa fa-arrow-circle-right\" aria-hidden=\"true\"></span></a>\n    </div>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script> \n\n</body>\n</html>"
  },
  {
    "path": "docs/py-modindex.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Python Module Index &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n \n\n\n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"index.html\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a></li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"index.html\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"index.html\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Python Module Index</li>\n      <li class=\"wy-breadcrumbs-aside\">\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n\n   <h1>Python Module Index</h1>\n\n   <div class=\"modindex-jumpbox\">\n   <a href=\"#cap-m\"><strong>m</strong></a>\n   </div>\n\n   <table class=\"indextable modindextable\">\n     <tr class=\"pcap\"><td></td><td>&#160;</td><td></td></tr>\n     <tr class=\"cap\" id=\"cap-m\"><td></td><td>\n       <strong>m</strong></td><td></td></tr>\n     <tr>\n       <td><img src=\"_static/minus.png\" class=\"toggler\"\n              id=\"toggle-1\" style=\"display: none\" alt=\"-\" /></td>\n       <td>\n       <a href=\"api.html#module-mab2rec\"><code class=\"xref\">mab2rec</code></a></td><td>\n       <em></em></td></tr>\n     <tr class=\"cg-1\">\n       <td></td>\n       <td>&#160;&#160;&#160;\n       <a href=\"api.html#module-mab2rec.pipeline\"><code class=\"xref\">mab2rec.pipeline</code></a></td><td>\n       <em></em></td></tr>\n     <tr class=\"cg-1\">\n       <td></td>\n       <td>&#160;&#160;&#160;\n       <a href=\"api.html#module-mab2rec.visualization\"><code class=\"xref\">mab2rec.visualization</code></a></td><td>\n       <em></em></td></tr>\n   </table>\n\n\n           </div>\n          </div>\n          <footer>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script> \n\n</body>\n</html>"
  },
  {
    "path": "docs/quick.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" /><meta name=\"generator\" content=\"Docutils 0.17.1: http://docutils.sourceforge.net/\" />\n\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Quick Start &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"search.html\" />\n    <link rel=\"next\" title=\"Usage Examples\" href=\"examples.html\" />\n    <link rel=\"prev\" title=\"Installation\" href=\"installation.html\" /> \n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"index.html\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"search.html\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul class=\"current\">\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a></li>\n<li class=\"toctree-l1 current\"><a class=\"current reference internal\" href=\"#\">Quick Start</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#individual-recommender\">Individual Recommender</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#multiple-recommenders\">Multiple Recommenders</a></li>\n</ul>\n</li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a></li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"index.html\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"index.html\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Quick Start</li>\n      <li class=\"wy-breadcrumbs-aside\">\n            <a href=\"_sources/quick.rst.txt\" rel=\"nofollow\"> View page source</a>\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n  <section id=\"quick-start\">\n<span id=\"quick\"></span><h1>Quick Start<a class=\"headerlink\" href=\"#quick-start\" title=\"Permalink to this headline\"></a></h1>\n<section id=\"individual-recommender\">\n<h2>Individual Recommender<a class=\"headerlink\" href=\"#individual-recommender\" title=\"Permalink to this headline\"></a></h2>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"c1\"># Example of how to train an individual recommender to generate top-4 recommendations</span>\n\n<span class=\"c1\"># Import</span>\n<span class=\"kn\">from</span> <span class=\"nn\">mab2rec</span> <span class=\"kn\">import</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"kn\">from</span> <span class=\"nn\">mab2rec.pipeline</span> <span class=\"kn\">import</span> <span class=\"n\">train</span><span class=\"p\">,</span> <span class=\"n\">score</span>\n\n<span class=\"c1\"># LinGreedy recommender to select top-4 items with 10% random exploration</span>\n<span class=\"n\">rec</span> <span class=\"o\">=</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">LinGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mf\">0.1</span><span class=\"p\">),</span> <span class=\"n\">top_k</span><span class=\"o\">=</span><span class=\"mi\">4</span><span class=\"p\">)</span>\n\n<span class=\"c1\"># Train on (user, item, response) interactions in train data using user features</span>\n<span class=\"n\">train</span><span class=\"p\">(</span><span class=\"n\">rec</span><span class=\"p\">,</span> <span class=\"n\">data</span><span class=\"o\">=</span><span class=\"s1\">&#39;data/data_train.csv&#39;</span><span class=\"p\">,</span>\n      <span class=\"n\">user_features</span><span class=\"o\">=</span><span class=\"s1\">&#39;data/features_user.csv&#39;</span><span class=\"p\">)</span>\n\n<span class=\"c1\"># Score recommendations for users in test data. The output df holds</span>\n<span class=\"c1\"># user_id, item_id, score columns for every test user for top-k items</span>\n<span class=\"n\">df</span> <span class=\"o\">=</span> <span class=\"n\">score</span><span class=\"p\">(</span><span class=\"n\">rec</span><span class=\"p\">,</span> <span class=\"n\">data</span><span class=\"o\">=</span><span class=\"s1\">&#39;data/data_test.csv&#39;</span><span class=\"p\">,</span>\n           <span class=\"n\">user_features</span><span class=\"o\">=</span><span class=\"s1\">&#39;data/features_user.csv&#39;</span><span class=\"p\">)</span>\n</pre></div>\n</div>\n</section>\n<section id=\"multiple-recommenders\">\n<h2>Multiple Recommenders<a class=\"headerlink\" href=\"#multiple-recommenders\" title=\"Permalink to this headline\"></a></h2>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"c1\"># Example of how to benchmark multiple bandit algorithms to generate top-4 recommendations</span>\n\n<span class=\"kn\">from</span> <span class=\"nn\">mab2rec</span> <span class=\"kn\">import</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">,</span> <span class=\"n\">LearningPolicy</span>\n<span class=\"kn\">from</span> <span class=\"nn\">mab2rec.pipeline</span> <span class=\"kn\">import</span> <span class=\"n\">benchmark</span>\n<span class=\"kn\">from</span> <span class=\"nn\">jurity.recommenders</span> <span class=\"kn\">import</span> <span class=\"n\">BinaryRecoMetrics</span><span class=\"p\">,</span> <span class=\"n\">RankingRecoMetrics</span>\n\n<span class=\"c1\"># Recommenders (many more available)</span>\n<span class=\"n\">recommenders</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"s2\">&quot;Random&quot;</span><span class=\"p\">:</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">Random</span><span class=\"p\">()),</span>\n                <span class=\"s2\">&quot;Popularity&quot;</span><span class=\"p\">:</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">Popularity</span><span class=\"p\">()),</span>\n                <span class=\"s2\">&quot;LinGreedy&quot;</span><span class=\"p\">:</span> <span class=\"n\">BanditRecommender</span><span class=\"p\">(</span><span class=\"n\">LearningPolicy</span><span class=\"o\">.</span><span class=\"n\">LinGreedy</span><span class=\"p\">(</span><span class=\"n\">epsilon</span><span class=\"o\">=</span><span class=\"mf\">0.1</span><span class=\"p\">))}</span>\n\n<span class=\"c1\"># Column names for the response, user, and item id columns</span>\n<span class=\"n\">metric_params</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"s1\">&#39;click_column&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;score&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;user_id_column&#39;</span><span class=\"p\">:</span> <span class=\"s1\">&#39;user_id&#39;</span><span class=\"p\">,</span> <span class=\"s1\">&#39;item_id_column&#39;</span><span class=\"p\">:</span><span class=\"s1\">&#39;item_id&#39;</span><span class=\"p\">}</span>\n\n<span class=\"c1\"># Performance metrics for benchmarking (many more available)</span>\n<span class=\"n\">metrics</span> <span class=\"o\">=</span> <span class=\"p\">[]</span>\n<span class=\"k\">for</span> <span class=\"n\">top_k</span> <span class=\"ow\">in</span> <span class=\"p\">[</span><span class=\"mi\">3</span><span class=\"p\">,</span> <span class=\"mi\">5</span><span class=\"p\">,</span> <span class=\"mi\">10</span><span class=\"p\">]:</span>\n    <span class=\"n\">metrics</span><span class=\"o\">.</span><span class=\"n\">append</span><span class=\"p\">(</span><span class=\"n\">BinaryRecoMetrics</span><span class=\"o\">.</span><span class=\"n\">CTR</span><span class=\"p\">(</span><span class=\"o\">**</span><span class=\"n\">metric_params</span><span class=\"p\">,</span> <span class=\"n\">k</span><span class=\"o\">=</span><span class=\"n\">top_k</span><span class=\"p\">))</span>\n    <span class=\"n\">metrics</span><span class=\"o\">.</span><span class=\"n\">append</span><span class=\"p\">(</span><span class=\"n\">RankingRecoMetrics</span><span class=\"o\">.</span><span class=\"n\">NDCG</span><span class=\"p\">(</span><span class=\"o\">**</span><span class=\"n\">metric_params</span><span class=\"p\">,</span> <span class=\"n\">k</span><span class=\"o\">=</span><span class=\"n\">top_k</span><span class=\"p\">))</span>\n\n<span class=\"c1\"># Benchmarking with a collection of recommenders and metrics</span>\n<span class=\"c1\"># This returns two dictionaries;</span>\n<span class=\"c1\"># reco_to_results: recommendations for each algorithm on cross-validation data</span>\n<span class=\"c1\"># reco_to_metrics: evaluation metrics for each algorithm</span>\n<span class=\"n\">reco_to_results</span><span class=\"p\">,</span> <span class=\"n\">reco_to_metrics</span> <span class=\"o\">=</span> <span class=\"n\">benchmark</span><span class=\"p\">(</span><span class=\"n\">recommenders</span><span class=\"p\">,</span>\n                                             <span class=\"n\">metrics</span><span class=\"o\">=</span><span class=\"n\">metrics</span><span class=\"p\">,</span>\n                                             <span class=\"n\">train_data</span><span class=\"o\">=</span><span class=\"s2\">&quot;data/data_train.csv&quot;</span><span class=\"p\">,</span>\n                                             <span class=\"n\">cv</span><span class=\"o\">=</span><span class=\"mi\">5</span><span class=\"p\">,</span>\n                                             <span class=\"n\">user_features</span><span class=\"o\">=</span><span class=\"s2\">&quot;data/features_user.csv&quot;</span><span class=\"p\">)</span>\n</pre></div>\n</div>\n</section>\n</section>\n\n\n           </div>\n          </div>\n          <footer><div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"Footer\">\n        <a href=\"installation.html\" class=\"btn btn-neutral float-left\" title=\"Installation\" accesskey=\"p\" rel=\"prev\"><span class=\"fa fa-arrow-circle-left\" aria-hidden=\"true\"></span> Previous</a>\n        <a href=\"examples.html\" class=\"btn btn-neutral float-right\" title=\"Usage Examples\" accesskey=\"n\" rel=\"next\">Next <span class=\"fa fa-arrow-circle-right\" aria-hidden=\"true\"></span></a>\n    </div>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script> \n\n</body>\n</html>"
  },
  {
    "path": "docs/search.html",
    "content": "<!DOCTYPE html>\n<html class=\"writer-html5\" lang=\"en\" >\n<head>\n  <meta charset=\"utf-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Search &mdash; Mab2Rec 1.2.0 documentation</title>\n      <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n      <link rel=\"stylesheet\" href=\"_static/css/theme.css\" type=\"text/css\" />\n    \n  <!--[if lt IE 9]>\n    <script src=\"_static/js/html5shiv.min.js\"></script>\n  <![endif]-->\n  \n        <script data-url_root=\"./\" id=\"documentation_options\" src=\"_static/documentation_options.js\"></script>\n        <script src=\"_static/jquery.js\"></script>\n        <script src=\"_static/underscore.js\"></script>\n        <script src=\"_static/doctools.js\"></script>\n    <script src=\"_static/js/theme.js\"></script>\n    <script src=\"_static/searchtools.js\"></script>\n    <script src=\"_static/language_data.js\"></script>\n    <link rel=\"index\" title=\"Index\" href=\"genindex.html\" />\n    <link rel=\"search\" title=\"Search\" href=\"#\" /> \n</head>\n\n<body class=\"wy-body-for-nav\"> \n  <div class=\"wy-grid-for-nav\">\n    <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n      <div class=\"wy-side-scroll\">\n        <div class=\"wy-side-nav-search\" >\n            <a href=\"index.html\" class=\"icon icon-home\"> Mab2Rec\n          </a>\n<div role=\"search\">\n  <form id=\"rtd-search-form\" class=\"wy-form\" action=\"#\" method=\"get\">\n    <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n    <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n    <input type=\"hidden\" name=\"area\" value=\"default\" />\n  </form>\n</div>\n        </div><div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"Navigation menu\">\n              <ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"installation.html\">Installation</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"quick.html\">Quick Start</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"examples.html\">Usage Examples</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"contributing.html\">Contributing</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"api.html\">Mab2Rec Public API</a></li>\n</ul>\n\n        </div>\n      </div>\n    </nav>\n\n    <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\"><nav class=\"wy-nav-top\" aria-label=\"Mobile navigation menu\" >\n          <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n          <a href=\"index.html\">Mab2Rec</a>\n      </nav>\n\n      <div class=\"wy-nav-content\">\n        <div class=\"rst-content\">\n          <div role=\"navigation\" aria-label=\"Page navigation\">\n  <ul class=\"wy-breadcrumbs\">\n      <li><a href=\"index.html\" class=\"icon icon-home\"></a> &raquo;</li>\n      <li>Search</li>\n      <li class=\"wy-breadcrumbs-aside\">\n      </li>\n  </ul>\n  <hr/>\n</div>\n          <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n           <div itemprop=\"articleBody\">\n             \n  <noscript>\n  <div id=\"fallback\" class=\"admonition warning\">\n    <p class=\"last\">\n      Please activate JavaScript to enable the search functionality.\n    </p>\n  </div>\n  </noscript>\n\n  \n  <div id=\"search-results\">\n  \n  </div>\n\n           </div>\n          </div>\n          <footer>\n\n  <hr/>\n\n  <div role=\"contentinfo\">\n    <p>&#169; Copyright Copyright (C), FMR LLC.</p>\n  </div>\n\n  Built with <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> using a\n    <a href=\"https://github.com/readthedocs/sphinx_rtd_theme\">theme</a>\n    provided by <a href=\"https://readthedocs.org\">Read the Docs</a>.\n   \n\n</footer>\n        </div>\n      </div>\n    </section>\n  </div>\n  <script>\n      jQuery(function () {\n          SphinxRtdTheme.Navigation.enable(true);\n      });\n  </script>\n  <script>\n    jQuery(function() { Search.loadIndex(\"searchindex.js\"); });\n  </script>\n  \n  <script id=\"searchindexloader\"></script>\n   \n\n\n</body>\n</html>"
  },
  {
    "path": "docs/searchindex.js",
    "content": "Search.setIndex({docnames:[\"api\",\"contributing\",\"examples\",\"index\",\"installation\",\"quick\"],envversion:{\"sphinx.domains.c\":2,\"sphinx.domains.changeset\":1,\"sphinx.domains.citation\":1,\"sphinx.domains.cpp\":4,\"sphinx.domains.index\":1,\"sphinx.domains.javascript\":2,\"sphinx.domains.math\":2,\"sphinx.domains.python\":3,\"sphinx.domains.rst\":2,\"sphinx.domains.std\":2,sphinx:56},filenames:[\"api.rst\",\"contributing.rst\",\"examples.rst\",\"index.rst\",\"installation.rst\",\"quick.rst\"],objects:{\"\":[[0,0,0,\"-\",\"mab2rec\"]],\"mab2rec.BanditRecommender\":[[0,2,1,\"\",\"add_arm\"],[0,3,1,\"\",\"backend\"],[0,2,1,\"\",\"fit\"],[0,3,1,\"\",\"learning_policy\"],[0,3,1,\"\",\"mab\"],[0,3,1,\"\",\"n_jobs\"],[0,3,1,\"\",\"neighborhood_policy\"],[0,2,1,\"\",\"partial_fit\"],[0,2,1,\"\",\"predict\"],[0,2,1,\"\",\"predict_expectations\"],[0,2,1,\"\",\"recommend\"],[0,2,1,\"\",\"remove_arm\"],[0,3,1,\"\",\"seed\"],[0,2,1,\"\",\"set_arms\"],[0,3,1,\"\",\"top_k\"],[0,2,1,\"\",\"warm_start\"]],\"mab2rec.LearningPolicy\":[[0,1,1,\"\",\"EpsilonGreedy\"],[0,1,1,\"\",\"LinGreedy\"],[0,1,1,\"\",\"LinTS\"],[0,1,1,\"\",\"LinUCB\"],[0,1,1,\"\",\"Popularity\"],[0,1,1,\"\",\"Random\"],[0,1,1,\"\",\"Softmax\"],[0,1,1,\"\",\"ThompsonSampling\"],[0,1,1,\"\",\"UCB1\"]],\"mab2rec.LearningPolicy.EpsilonGreedy\":[[0,3,1,\"id0\",\"epsilon\"]],\"mab2rec.LearningPolicy.LinGreedy\":[[0,3,1,\"id1\",\"epsilon\"],[0,3,1,\"id2\",\"l2_lambda\"],[0,3,1,\"id3\",\"scale\"]],\"mab2rec.LearningPolicy.LinTS\":[[0,3,1,\"id4\",\"alpha\"],[0,3,1,\"id5\",\"l2_lambda\"],[0,3,1,\"id6\",\"scale\"]],\"mab2rec.LearningPolicy.LinUCB\":[[0,3,1,\"id7\",\"alpha\"],[0,3,1,\"id8\",\"l2_lambda\"],[0,3,1,\"id9\",\"scale\"]],\"mab2rec.LearningPolicy.Softmax\":[[0,3,1,\"id10\",\"tau\"]],\"mab2rec.LearningPolicy.ThompsonSampling\":[[0,3,1,\"id11\",\"binarizer\"]],\"mab2rec.LearningPolicy.UCB1\":[[0,3,1,\"id12\",\"alpha\"]],\"mab2rec.NeighborhoodPolicy\":[[0,1,1,\"\",\"Clusters\"],[0,1,1,\"\",\"KNearest\"],[0,1,1,\"\",\"LSHNearest\"],[0,1,1,\"\",\"Radius\"],[0,1,1,\"\",\"TreeBandit\"]],\"mab2rec.NeighborhoodPolicy.Clusters\":[[0,3,1,\"id13\",\"is_minibatch\"],[0,3,1,\"id14\",\"n_clusters\"]],\"mab2rec.NeighborhoodPolicy.KNearest\":[[0,3,1,\"id15\",\"k\"],[0,3,1,\"id16\",\"metric\"]],\"mab2rec.NeighborhoodPolicy.LSHNearest\":[[0,3,1,\"id17\",\"n_dimensions\"],[0,3,1,\"id18\",\"n_tables\"],[0,3,1,\"id19\",\"no_nhood_prob_of_arm\"]],\"mab2rec.NeighborhoodPolicy.Radius\":[[0,3,1,\"id20\",\"metric\"],[0,3,1,\"id21\",\"no_nhood_prob_of_arm\"],[0,3,1,\"id22\",\"radius\"]],\"mab2rec.NeighborhoodPolicy.TreeBandit\":[[0,3,1,\"id25\",\"tree_parameters\"]],\"mab2rec.pipeline\":[[0,4,1,\"\",\"benchmark\"],[0,4,1,\"\",\"score\"],[0,4,1,\"\",\"train\"]],\"mab2rec.visualization\":[[0,4,1,\"\",\"plot_inter_diversity_at_k\"],[0,4,1,\"\",\"plot_intra_diversity_at_k\"],[0,4,1,\"\",\"plot_metrics_at_k\"],[0,4,1,\"\",\"plot_num_items_per_recommendation\"],[0,4,1,\"\",\"plot_personalization_heatmap\"],[0,4,1,\"\",\"plot_recommended_counts\"],[0,4,1,\"\",\"plot_recommended_counts_by_item\"]],mab2rec:[[0,1,1,\"\",\"BanditRecommender\"],[0,1,1,\"\",\"LearningPolicy\"],[0,1,1,\"\",\"NeighborhoodPolicy\"],[0,0,0,\"-\",\"pipeline\"],[0,0,0,\"-\",\"visualization\"]]},objnames:{\"0\":[\"py\",\"module\",\"Python module\"],\"1\":[\"py\",\"class\",\"Python class\"],\"2\":[\"py\",\"method\",\"Python method\"],\"3\":[\"py\",\"attribute\",\"Python attribute\"],\"4\":[\"py\",\"function\",\"Python function\"]},objtypes:{\"0\":\"py:module\",\"1\":\"py:class\",\"2\":\"py:method\",\"3\":\"py:attribute\",\"4\":\"py:function\"},terms:{\"0\":[0,3,5],\"0008\":[],\"05\":0,\"1\":[0,3,5],\"10\":[0,3,5],\"100000\":0,\"1024m\":0,\"12345\":0,\"123456\":0,\"15\":0,\"17\":0,\"19\":3,\"2\":0,\"20\":0,\"2017\":0,\"2021\":3,\"21\":3,\"22\":3,\"25\":0,\"3\":[0,3,4,5],\"4\":[0,3,5],\"5\":[0,3,5],\"54d_yualvoa\":[],\"7\":[0,4],\"75\":0,\"8\":[1,3],\"9\":0,\"boolean\":0,\"case\":0,\"class\":0,\"default\":0,\"do\":[1,2],\"final\":0,\"float\":0,\"function\":[0,1,2],\"import\":[0,3,5],\"int\":0,\"new\":[0,1],\"public\":[1,3],\"return\":[0,3,5],\"true\":0,A:0,As:0,Be:1,For:0,If:[0,1,4],In:0,It:[0,3],No:0,Not:0,The:[0,3,4,5],Then:0,There:4,To:[0,4],With:1,_arm_:0,_top:0,aaai:3,accept:0,actual:0,actual_result:0,ad:[0,1],adam:0,add:[0,1],add_arm:0,adher:1,adjust:0,advanc:2,after:0,ag:0,algorithm:[0,3,5],alia:0,all:[0,1,3,4],alpha:0,alreadi:0,also:0,an:[0,1,2,3,5],ani:[0,1,4],api:[1,3],append:[3,5],appli:0,approach:0,approxim:0,ar:[0,4],argument:0,arm1:0,arm2:0,arm3:0,arm4:0,arm:0,arm_1:0,arm_2:0,arm_k:0,arm_to_featur:0,arm_to_threshold:0,arrai:0,artifici:3,assign:0,associ:0,assum:0,assumpt:0,avail:[3,5],averag:0,average_respons:0,awar:3,ax:0,axi:0,backend:0,band:0,bandit:[0,5],banditrecommend:[3,5],base:[0,3],baselin:2,batch:0,batch_siz:0,bdist_wheel:4,been:0,behavior:0,benchmark:[0,2,3,5],best:0,beta:0,between:0,binar:0,binari:0,binaryrecometr:[0,3,5],block:3,bool:0,bound1:0,bound:0,build:[0,2,3,4],built:3,cach:4,calcul:0,call:0,callabl:0,can:[0,4],cannot:0,captur:0,cast:0,catplot:0,cd:4,cdist:0,center:3,chang:1,choleski:0,choos:0,chosen:0,chunk:0,click_column:[3,5],clone:4,closest:0,cluster:0,code:0,coeffici:0,cold:0,collect:[3,5],collis:0,column:[0,3,5],com:4,commun:0,compat:0,comput:0,concis:1,concurr:0,confid:0,configur:[],confirm:4,conform:1,conserv:0,consist:0,constant:0,contain:0,context:[0,3],contextu:[0,3],contribut:3,control:0,convert:0,core:0,correspond:0,could:0,count:0,covari:0,coverag:1,cpu:0,creat:[0,2,3],cross:[0,2,3,5],csv:[0,3,5],ctr:[3,5],current:1,custom:[],cv:[0,3,5],d:0,data:[0,2,3,5],data_test:[3,5],data_train:[3,5],datafram:0,decis:0,decisiontreeclassifi:[],decisiontreeregressor:0,decomposit:0,decreas:0,def:0,default_se:0,defin:0,definit:0,degre:0,demonstr:2,denot:0,depend:0,deriv:0,design:3,detail:[1,2],determin:0,determinist:0,dev:[],develop:3,df:[3,5],dict:0,dictionari:[0,3,5],differ:0,dimens:0,dimension:0,dir:4,discov:4,dist:4,distanc:0,distance_quantil:0,distribut:0,divers:0,document:3,done:0,dure:0,dxd:0,e:0,each:[0,3,5],effect:0,effort:1,elig:0,elmachtoub:0,empti:0,end:1,engin:2,enhanc:3,ensur:0,epsilon:[0,3,5],epsilongreedi:0,estim:0,euclidean:0,evalu:[0,2,3,5],everi:[3,5],everybodi:1,exampl:[0,3,5],excel:[],except:0,exchang:0,exclud:0,excluded_arm:0,exist:[0,1],expect:0,experiment:3,explor:[0,3,5],extens:2,factor:0,fair:3,fals:0,featur:[0,1,2,3,5],features_us:[3,5],fidel:[3,4],field:0,figsiz:0,figur:0,file:0,first:1,fit:0,fix:1,flag:0,fold:0,folder:2,follow:[0,1,3],form:0,format:0,frac:0,frame:0,free:[0,3],from:[0,1,2,3,4,5],g:0,gener:[0,3,5],get_config:0,git:4,github:[1,3,4],give:[0,1,2],given:0,global:0,goe:0,good:0,greater:0,greedi:0,greedili:0,group:0,guarante:0,guidelin:2,ha:0,hash:0,have:[0,1],header:0,heatmap:0,heavili:3,higher:0,highest:0,histori:0,hold:[3,5],host:3,how:[0,3,5],http:4,hyperplan:0,i:0,i_1:0,i_2:0,i_d:0,i_q:0,icmla:3,ictai:3,id:[0,3,5],ident:0,ijait:3,implement:0,includ:[0,3,4],incomplet:1,incorpor:0,increas:0,index:3,individu:0,induc:0,infer:0,infin:0,initi:0,input:0,instal:3,instanti:0,integ:0,intellig:3,inter:0,interact:[3,5],intern:0,interpret:0,intra:0,introduct:3,intuit:1,invers:0,invest:3,is_minibatch:0,issu:1,item:[0,2,3,5],item_elig:0,item_featur:0,item_id:[0,3,5],item_id_col:0,item_id_column:[3,5],item_list:0,iter:0,its:0,job:0,joblib:0,json:0,jupyt:2,juriti:[0,3,5],k:[0,3,5],k_:0,k_list:0,keep:0,kei:0,kmean:0,knearest:0,kwarg:0,l2_lambda:0,lambda:0,latest:4,leaf:0,learn:0,learning_polici:0,learningpolici:[3,5],least:0,leav:0,length:0,less:0,level:0,leverag:0,librari:[0,1,3],likelihood:0,lingreedi:[0,3,5],lint:0,linucb:0,list:[0,4],list_of_arm:0,load:0,local:0,lock:0,log:0,logist:0,loki:0,lot:0,low:0,lshnearest:0,m:4,mab2rec:[4,5],mab:0,mabwis:[0,3],made:0,make:[0,1],manag:[],mani:[0,3,5],map:0,marek:0,master:4,match:0,matplotlib:0,matrix:0,max:0,maximum:0,mcnelli:0,mean:0,memori:0,method:[0,2],metric:[0,3,5],metric_param:[3,5],metric_result:0,mind:3,mine:3,minibatchkmean:0,miss:0,model:[0,2,3],modifi:0,modul:3,more:[0,3,5],most:0,mu:0,mu_i:0,multi:0,multipl:0,multipli:0,multiprocess:0,multivari:0,must:0,n:0,n_cluster:0,n_context_col:0,n_dimens:0,n_i:0,n_job:0,n_row:0,n_tabl:0,name:[0,3,5],nan:0,ndarrai:0,ndcg:[3,5],nearest:0,necessari:4,neg:0,neighbor:0,neighborhood:0,neighborhood_polici:0,neighborhoodpolici:3,nest:0,no_nhood_prob_of_arm:0,non:[0,3],none:[0,4],noreturn:0,normal:0,note:0,notebook:2,notic:0,np:0,num:0,num_run:0,number:0,numer:0,numpi:0,o:0,object:0,observ:0,obtain:0,oh:0,omit:1,one:0,onli:[0,1],onto:0,open:[1,3],oper:0,option:0,order:0,org:[],origin:4,other:0,otherwis:0,our:1,output:[0,3,5],over:0,overhead:0,overview:[2,3],p:0,packag:4,pairwise_dist:0,pairwise_distances_chunk:0,panda:0,parallel:0,paramet:0,parametr:[0,3],partial_fit:0,partit:0,pass:[0,1,4],path:0,pattern:3,pd:0,pep:[1,3],per:0,perform:[0,2,3,5],person:0,petrik:0,pickl:0,piec:1,pip:4,pipelin:[3,5],place:0,platform:4,pleas:1,plot:0,plot_inter_diversity_at_k:0,plot_intra_diversity_at_k:0,plot_metrics_at_k:0,plot_num_items_per_recommend:0,plot_personalization_heatmap:0,plot_recommended_count:0,plot_recommended_counts_by_item:0,plt:0,point:0,polici:[0,3],pool:0,popular:[0,3,5],posit:0,potenti:0,power:[0,3],practic:0,prebuilt:4,precis:0,predict:0,predict_expect:0,prefer:1,preprocess:0,present:[0,3],previou:0,print:0,probabl:0,problem:0,process:0,processor:0,progress:0,project:[0,1,4],promot:0,properli:1,proport:0,proportion:0,prototyp:0,provid:2,pull:4,py3:4,py:4,pypi:4,python:[0,3,4],quantil:0,question:1,radiu:0,rais:0,random:[0,3,5],randomli:0,rankingrecometr:[0,3,5],rapid:3,re:[0,1],rec:[0,3,5],receiv:0,reco_to_metr:[3,5],reco_to_result:[3,5],recommend:[0,2],recommendation_result:0,region:0,regress:0,regular:0,relev:1,reli:0,relplot:0,remov:0,remove_arm:0,repeat:0,repo:1,report:0,repres:0,represent:[0,3],request:1,requir:[0,2,3],respond:1,respons:[0,3,5],response_col:0,rest:1,result:0,return_scor:0,reward:0,ridg:0,robust:0,root:0,routin:0,row:0,run:[0,4],ryan:0,s:0,same:0,sampl:0,sample_s:0,save:0,save_fil:0,scale:0,scipi:0,score:[0,3,5],score_1:0,score_2:0,score_col:0,score_k:0,scratch:4,sdist:4,sechan:0,see:0,seed:0,select:[0,2,3,5],sensit:0,seq2pat:3,sequenti:[2,3],seri:0,serial:0,set:[0,1],set_arm:0,setup:3,setuptool:4,sever:3,should:[0,1,4],show:2,shown:0,sigma:0,sign:0,signatur:0,simhash:0,size:0,sklearn:0,smaller:0,sn:0,so:0,softmax:0,softwar:3,solv:0,some:[0,2],space:0,spatial:0,specif:0,specifi:0,speed:0,spock:[],sqrt:0,squar:0,standard:[1,3],standardscal:0,star:1,start:0,state:0,statu:0,str:0,strength:0,structur:2,subset:0,success:[0,4],suffer:0,sum:0,support:[0,3],sure:1,system:3,t:0,tabl:0,tau:0,temperatur:0,temporari:0,test:[0,1,2,3,5],test_data:0,text:3,textwis:3,than:0,thei:0,thi:[0,3,5],thing:3,thompson:0,thompsonsampl:0,thread:0,time:0,top:[0,3,5],top_k:[0,3,5],top_n_item:0,total:0,train:[0,2,3,5],train_data:[0,3,5],tree:0,tree_paramet:0,treebandit:0,treeheurist:0,trial:0,tune:0,tupl:0,tutori:2,two:[3,4,5],txt:4,type:[0,1],u_1:0,u_2:0,u_p:0,uai:0,ucb1:0,ucb:0,under:[0,2],uniform:0,uniformli:0,union:0,uniqu:0,unit:0,unittest:4,unstructur:2,untrain:0,up:[0,1],updat:0,upgrad:3,upon:0,upper:0,us:[0,1,2,3,4,5],usag:3,user:[0,2,3,5],user_featur:[0,3,5],user_features_dtyp:0,user_features_list:0,user_id:[0,3,5],user_id_col:0,user_id_column:[3,5],user_sample_s:0,user_to_clust:0,v:[],valid:[0,2,3,5],valu:0,varianc:0,vector:0,verbos:[0,1],veri:0,version:[0,4],versu:0,via:3,violat:0,visual:3,wa:4,wai:1,want:1,warm:0,warm_start:0,warm_start_dist:0,watch:[],we:[1,2],weight:0,welcom:1,wheel:4,when:[0,1],where:0,whether:0,which:0,whl:4,within:0,worker:0,working_memori:0,www:[],x:[0,4],x_i:0,y:0,you:[0,1,4],your:3,youtub:[],zero:0},titles:[\"Mab2Rec Public API\",\"Contributing\",\"Usage Examples\",\"Mab2Rec: Multi-Armed Bandits Recommender\",\"Installation\",\"Quick Start\"],titleterms:{\"public\":0,api:0,arm:3,bandit:3,banditrecommend:0,code:[1,3,4],content:3,contribut:1,document:1,exampl:2,indic:3,individu:[3,5],instal:4,learningpolici:0,librari:4,mab2rec:[0,3],multi:3,multipl:[3,5],neighborhoodpolici:0,option:4,pipelin:0,quick:[3,5],recommend:[3,5],requir:4,setup:4,sourc:[3,4],start:[3,5],tabl:3,test:4,upgrad:4,usag:2,visual:0,your:4}})"
  },
  {
    "path": "docsrc/Makefile",
    "content": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the environment for the first two.\nSPHINXOPTS    ?=\nSPHINXBUILD   ?= sphinx-build\nSOURCEDIR     = .\nBUILDDIR      = _build\n\n# Put it first so that \"make\" without argument is like \"make help\".\nhelp:\n\t@$(SPHINXBUILD) -M help \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n\n.PHONY: help Makefile\n\ngithub:\n\t@make html\n\t@cp -a _build/html/. ../docs\n\n# Catch-all target: route all unknown targets to Sphinx using the new\n# \"make mode\" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).\n%: Makefile\n\t@$(SPHINXBUILD) -M $@ \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n"
  },
  {
    "path": "docsrc/api.rst",
    "content": ".. _Mab2Rec API:\n\nMab2Rec Public API\n==================\n\n.. automodule:: mab2rec\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nBanditRecommender\n^^^^^^^^^^^^^^^^^\n\n.. autoclass:: mab2rec.BanditRecommender\n    :members:\n    :undoc-members:\n    :show-inheritance:\n\nLearningPolicy\n^^^^^^^^^^^^^^\n\n.. autoclass:: mab2rec.LearningPolicy\n    :members:\n    :undoc-members:\n\nNeighborhoodPolicy\n^^^^^^^^^^^^^^^^^^\n\n.. autoclass:: mab2rec.NeighborhoodPolicy\n    :members:\n    :undoc-members:\n\nPipeline\n^^^^^^^^\n\n.. automodule:: mab2rec.pipeline\n    :members:\n    :undoc-members:\n\nVisualization\n^^^^^^^^^^^^^\n\n.. automodule:: mab2rec.visualization\n    :members:\n    :undoc-members:\n"
  },
  {
    "path": "docsrc/conf.py",
    "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport sys\nsys.path.insert(0, os.path.abspath('.'))\nsys.path.append(os.path.join(os.path.dirname(__name__), '..'))\n\nwith open(os.path.join('..', 'mab2rec', '_version.py')) as fp:\n    exec(fp.read())\n\n# -- Project information -----------------------------------------------------\n\nproject = 'Mab2Rec'\ncopyright = __copyright__\nauthor = __author__\n\n# The short X.Y version\nversion = ''\n# The full version, including alpha/beta/rc tags\nrelease = __version__\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.doctest',\n    'sphinx.ext.napoleon',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.extlinks',\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\n# source_suffix = ['.rst', '.md']\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = None\n\n# Common links\nextlinks = {'repo': ('https://github.com/fidelity/mab2rec%s', None),\n            'docs': ('https://fidelity.github.io/mab2rec%s', None)}\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# -- Options for HTMLHelp output ---------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'Mab2Recdoc'\n\n# -- Options for LaTeX output ------------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (master_doc, 'Mab2Rec.tex', 'Mab2Rec Documentation',\n     'FMR LLC', 'manual'),\n]\n\n\n# -- Options for manual page output ------------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'mab2rec', 'Mab2Rec Documentation',\n     [author], 1)\n]\n\n\n# -- Options for Texinfo output ----------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (master_doc, 'Mab2Rec', 'Mab2Rec Documentation',\n     author, 'FMR LLC', 'One line description of project.',\n     'Miscellaneous'),\n]\n\n\n# -- Options for Epub output -------------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = project\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#\n# epub_identifier = ''\n\n# A unique identification for the text.\n#\n# epub_uid = ''\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = ['search.html']\n\n\n# -- Extension configuration -------------------------------------------------\n"
  },
  {
    "path": "docsrc/contributing.rst",
    "content": ".. _contributing:\n\nContributing\n============\n\nWe welcome contributions of all from everybody, and we will make an effort\nto respond to any questions and requests. Code is not the only way to make\na contribution!\n\nIf you end up using our library in a project, give us a star on GitHub!\n\nCode Contributions\n^^^^^^^^^^^^^^^^^^\n\n- With any piece of code, please adhere to PEP-8 standards.\n- If you're fixing an issue with an existing piece of code, please make sure all the tests pass, and there is no change in functionality.\n- If you want to add a new feature, please open up an issue first.\n- When adding a new feature, make sure you have relevant test coverage.\n- Any changes to the public API should conform to the current standards, be properly documented, typed, and be intuitive.\n\nDocumentation Contributions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Make sure you follow the standards set by the rest of the repo.\n- Be concise, but do not omit details. Verbose documentation is preferred to incomplete documentation.\n"
  },
  {
    "path": "docsrc/examples.rst",
    "content": ".. _examples:\n\nUsage Examples\n==============\n\nWe provide extensive tutorials in Jupyter notebooks under the :repo:`notebooks </tree/main/notebooks>` folder for guidelines on building recommenders, performing model selection, and evaluating performance:\n\n- :repo:`Data Overview </tree/main/notebooks/1_data_overview.ipynb>` provides an overview of data required to train recommender.\n- :repo:`Feature Engineering </tree/main/notebooks/2_feature_engineering.ipynb>` gives an overview of methods to create user and item features from structured, unstructured, and sequential data.\n- :repo:`Model Selection </tree/main/notebooks/3_model_selection.ipynb>` shows to do model selection by benchmarking recommenders using cross-validation.\n- :repo:`Evaluation </tree/main/notebooks/4_evaluation.ipynb>` benchmarks selected recommenders and baselines on test data with detailed evaluations.\n- :repo:`Advanced </tree/main/notebooks/5_advanced.ipynb>` demonstrates some advanced functionality.\n"
  },
  {
    "path": "docsrc/index.rst",
    "content": "Mab2Rec: Multi-Armed Bandits Recommender\n========================================\n\nMab2Rec is a Python library for building bandit-based recommendation algorithms. It supports **context-free**, **parametric**\nand **non-parametric** **contextual** bandit models powered by `MABWiser <https://github.com/fidelity/mabwiser>`_ and\nfairness and recommenders evaluations powered by `Jurity <https://github.com/fidelity/jurity>`_.\nIt supports `all bandit policies available in MABWiser <https://github.com/fidelity/mabwiser#available-bandit-policies>`_.\nThe library is designed with rapid experimentation in mind, follows the `PEP-8 standards <https://www.python.org/dev/peps/pep-0008>`_ and is tested heavily.\n\nMab2Rec and several of the open-source software it is built on is developed by the Artificial Intelligence Center at Fidelity Investments, including:\n\n* `MABWiser <https://github.com/fidelity/mabwiser>`_ to create multi-armed bandit recommendation algorithms (`IJAIT'21 <https://www.worldscientific.com/doi/abs/10.1142/S0218213021500214>`_, `ICTAI'19 <https://ieeexplore.ieee.org/document/8995418>`_).\n* `TextWiser <https://github.com/fidelity/textwiser>`_ to create item representations via text featurization (`AAAI'21 <https://ojs.aaai.org/index.php/AAAI/article/view/17814>`_).\n* `Selective <https://github.com/fidelity/selective>`_ to create user representations via feature selection.\n* `Seq2Pat <https://github.com/fidelity/seq2pat>`_ to enhance users representations via sequential pattern mining (`AAAI'22 <https://aaai.org/Conferences/AAAI-22/>`_).\n* `Jurity <https://github.com/fidelity/jurity>`_ to evaluate recommendations including fairness metrics (`ICMLA'21 <https://ieeexplore.ieee.org/abstract/document/9680169>`_).\n\nAn introduction to **content- and context-aware** recommender systems and an overview of the building blocks of the library is `presented at All Things Open 2021 <https://www.youtube.com/watch?v=54d_YUalvOA>`_.\n\n.. include:: quick.rst\n\nSource Code\n===========\nThe source code is hosted on :repo:`GitHub <>`.\n\n.. sidebar:: Contents\n\n   .. toctree::\n    :maxdepth: 2\n\n    installation\n    quick\n    examples\n    contributing\n    api\n\n\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n"
  },
  {
    "path": "docsrc/installation.rst",
    "content": ".. _installation:\n\nInstallation\n============\n\n.. admonition:: Installation Options\n\n\tThere are two options to install the library:\n\n\t1. Install from PyPI using the prebuilt wheel package (``pip install mab2rec``)\n\t2. Build from the source code\n\nRequirements\n------------\n\nThe library requires Python **3.7+**. The ``requirements.txt`` lists the necessary\npackages.\n\nSource Code\n-----------\n\nYou can build a wheel package on your platform from scratch using the source code:\n\n.. code-block:: python\n\n\tgit clone https://github.com/fidelity/mab2rec.git\n\tcd mab2rec\n\tpip install setuptools wheel # if wheel is not installed\n\tpython setup.py sdist bdist_wheel\n\tpip install dist/mab2rec-X.X.X-py3-none-any.whl\n\nTest Your Setup\n---------------\n\nTo confirm that cloning was successful, run the tests included in the project.\n\nAll tests should pass.\n\n.. code-block:: python\n\n\tgit clone https://github.com/fidelity/mab2rec.git\n\tcd mab2rec\n\tpython -m unittest discover tests\n\nUpgrade the Library\n-------------------\n\nTo upgrade to the latest version of the library, run ``pip install --upgrade mab2rec``.\n\nIf you installed from the source code:\n\n.. code-block:: python\n\n\tgit pull origin master\n\tpython setup.py sdist bdist_wheel\n\tpip install --upgrade --no-cache-dir dist/mab2rec-X.X.X-py3-none-any.whl\n"
  },
  {
    "path": "docsrc/make.bat",
    "content": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sphinx-build\r\n)\r\nset SOURCEDIR=.\r\nset BUILDDIR=_build\r\n\r\nif \"%1\" == \"\" goto help\r\n\r\n%SPHINXBUILD% >NUL 2>NUL\r\nif errorlevel 9009 (\r\n\techo.\r\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\r\n\techo.installed, then set the SPHINXBUILD environment variable to point\r\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\r\n\techo.may add the Sphinx directory to PATH.\r\n\techo.\r\n\techo.If you don't have Sphinx installed, grab it from\r\n\techo.http://sphinx-doc.org/\r\n\texit /b 1\r\n)\r\n\r\n%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\r\ngoto end\r\n\r\n:help\r\n%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\r\n\r\n:end\r\npopd\r\n"
  },
  {
    "path": "docsrc/quick.rst",
    "content": ".. _quick:\n\nQuick Start\n===========\n\nIndividual Recommender\n----------------------\n\n.. code-block:: python\n\n    # Example of how to train an individual recommender to generate top-4 recommendations\n\n    # Import\n    from mab2rec import BanditRecommender, LearningPolicy\n    from mab2rec.pipeline import train, score\n\n    # LinGreedy recommender to select top-4 items with 10% random exploration\n    rec = BanditRecommender(LearningPolicy.LinGreedy(epsilon=0.1), top_k=4)\n\n    # Train on (user, item, response) interactions in train data using user features\n    train(rec, data='data/data_train.csv',\n          user_features='data/features_user.csv')\n\n    # Score recommendations for users in test data. The output df holds\n    # user_id, item_id, score columns for every test user for top-k items\n    df = score(rec, data='data/data_test.csv',\n               user_features='data/features_user.csv')\n\nMultiple Recommenders\n---------------------\n\n.. code-block:: python\n\n    # Example of how to benchmark multiple bandit algorithms to generate top-4 recommendations\n\n    from mab2rec import BanditRecommender, LearningPolicy\n    from mab2rec.pipeline import benchmark\n    from jurity.recommenders import BinaryRecoMetrics, RankingRecoMetrics\n\n    # Recommenders (many more available)\n    recommenders = {\"Random\": BanditRecommender(LearningPolicy.Random()),\n                    \"Popularity\": BanditRecommender(LearningPolicy.Popularity()),\n                    \"LinGreedy\": BanditRecommender(LearningPolicy.LinGreedy(epsilon=0.1))}\n\n    # Column names for the response, user, and item id columns\n    metric_params = {'click_column': 'score', 'user_id_column': 'user_id', 'item_id_column':'item_id'}\n\n    # Performance metrics for benchmarking (many more available)\n    metrics = []\n    for top_k in [3, 5, 10]:\n        metrics.append(BinaryRecoMetrics.CTR(**metric_params, k=top_k))\n        metrics.append(RankingRecoMetrics.NDCG(**metric_params, k=top_k))\n\n    # Benchmarking with a collection of recommenders and metrics\n    # This returns two dictionaries;\n    # reco_to_results: recommendations for each algorithm on cross-validation data\n    # reco_to_metrics: evaluation metrics for each algorithm\n    reco_to_results, reco_to_metrics = benchmark(recommenders,\n                                                 metrics=metrics,\n                                                 train_data=\"data/data_train.csv\",\n                                                 cv=5,\n                                                 user_features=\"data/features_user.csv\")\n\n"
  },
  {
    "path": "docsrc/requirements.txt",
    "content": "sphinx\nsphinx_rtd_theme"
  },
  {
    "path": "mab2rec/__init__.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nfrom mabwiser.mab import LearningPolicy, NeighborhoodPolicy\nfrom .rec import BanditRecommender\n"
  },
  {
    "path": "mab2rec/_version.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\n__author__ = \"FMR LLC\"\n__email__ = \"opensource@fmr.com\"\n__version__ = \"1.3.1\"\n__copyright__ = \"Copyright (C), FMR LLC\"\n"
  },
  {
    "path": "mab2rec/pipeline.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nfrom copy import deepcopy\nfrom time import time\nfrom typing import Dict, List, Tuple, Union\n\nimport numpy as np\nimport pandas as pd\nfrom jurity.recommenders import CombinedMetrics, BinaryRecoMetrics, RankingRecoMetrics, DiversityRecoMetrics\nfrom sklearn.model_selection import GroupKFold\nfrom mabwiser.utils import check_true, Arm\n\nfrom mab2rec.rec import BanditRecommender\nfrom mab2rec.utils import Constants\nfrom mab2rec.utils import explode_recommendations, load_data, load_response_data, merge_user_features\nfrom mab2rec.utils import load_pickle, save_pickle\n\n\ndef train(recommender: BanditRecommender,\n          data: Union[str, pd.DataFrame],\n          user_features: Union[str, pd.DataFrame] = None,\n          user_features_list: Union[str, List[str]] = None,\n          user_features_dtypes: Union[str, Dict] = None,\n          item_features: Union[str, pd.DataFrame] = None,\n          item_list: Union[str, List[Arm]] = None,\n          item_eligibility: Union[str, pd.DataFrame] = None,\n          warm_start: bool = False,\n          warm_start_distance: float = None,\n          user_id_col: str = Constants.user_id,\n          item_id_col: str = Constants.item_id,\n          response_col: str = Constants.response,\n          batch_size: int = 100000,\n          save_file: Union[str, bool] = None) -> None:\n    \"\"\"\n    Trains Recommender.\n\n    Parameters\n    ----------\n    recommender : BanditRecommender\n        The recommender algorithm to be trained.\n        The recommender object is updated in-place.\n    data : Union[str, pd.DataFrame]\n        Training data.\n        Data should have a row for each training sample (user_id, item_id, response).\n        Column names should be consistent with user_id_col, item_id_col and response_col arguments.\n        CSV format with file header or Data Frame.\n    user_features : Union[str, pd.DataFrame], default=None\n        User features containing features for each user_id.\n        Each row should include user_id and list of features (user_id, u_1, u_2, ..., u_p).\n        CSV format with file header or Data Frame.\n    user_features_list : Union[str, List[str]], default=None\n        List of user features to use.\n        Must be a subset of features in (u_1, u_2, ... u_p).\n        If None, all the features in user_features are used.\n        CSV format with file header or List.\n    user_features_dtypes: Union[str, Dict], default=None\n        Data type for each user feature.\n        Maps each user feature name to valid data type.\n        If none, no data type casting is done upon load and data types or inferred by Pandas library.\n        JSON format or Dictionary.\n    item_features : Union[str, pd.DataFrame], default=None\n        Item features file containing features for each item_id.\n        Each row should include item_id and list of features (item_id, i_1, i_2, .... i_q).\n        CSV format with file header or Data Frame.\n    item_list : Union[str, List[Arm]], default=None\n        List of items to train.\n        If None, all the items in data are used.\n        CSV format with file header or List.\n    item_eligibility: Union[str, pd.DataFrame], default=None\n        Items each user is eligible for.\n        Not used during training.\n        CSV format with file header or Data Frame.\n    warm_start : bool, default=False\n        Whether to warm start untrained (cold) arms after training or not.\n    warm_start_distance : float, default=None\n        Warm start distance quantile.\n        Value between 0 and 1 used to determine if an item can be warm started or not using closest item.\n        All cold items will be warm started if 1 and none will be warm started if 0.\n        Must be specified if warm_start=True.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    response_col : str, default=Constants.response\n        Response column name.\n    batch_size : str, default=100000\n        Batch size used for chunking data.\n    save_file : Union[str, bool], default=None\n        File name to save recommender pickle.\n        If None, recommender is not saved to file.\n\n    Returns\n    -------\n    Returns nothing.\n    \"\"\"\n    _validate_recommender(recommender)\n    _validate_common_args(data, user_features, user_features_list, user_features_dtypes, item_features, item_list,\n                          item_eligibility, warm_start, warm_start_distance, user_id_col, item_id_col,\n                          response_col, batch_size)\n    _validate_save(save_file)\n\n    # Import data\n    train_data_df, item_list, user_features_df, \\\n        item_to_features, _ = load_data(data=data,\n                                        user_features=user_features,\n                                        user_features_list=user_features_list,\n                                        user_features_dtypes=user_features_dtypes,\n                                        item_features=item_features,\n                                        item_list=item_list,\n                                        item_eligibility=item_eligibility,\n                                        user_id_col=user_id_col,\n                                        item_id_col=item_id_col,\n                                        response_col=response_col)\n\n    # Initialize and set arms of recommender\n    recommender.set_arms(item_list)\n\n    # Loop through the data in batches and fit recommender\n    num_batches = max(1, len(train_data_df) // batch_size)\n    for df in np.array_split(train_data_df, num_batches):\n        if recommender.mab.is_contextual:\n            check_true(user_features_df is not None, ValueError(\"User features are required for contextual bandits.\"))\n            feature_cols = [c for c in user_features_df.columns if c != user_id_col]\n            df = merge_user_features(pd.DataFrame(df), user_features_df, user_id_col)\n            if recommender.mab._is_initial_fit:\n                recommender.partial_fit(df[item_id_col], df[response_col], df[feature_cols])\n            else:\n                recommender.fit(df[item_id_col], df[response_col], df[feature_cols])\n        else:\n            if recommender.mab._is_initial_fit:\n                recommender.partial_fit(df[item_id_col], df[response_col])\n            else:\n                recommender.fit(df[item_id_col], df[response_col])\n\n    # Warm start\n    if warm_start:\n        recommender.warm_start(item_to_features, warm_start_distance)\n\n    # Save file\n    if save_file is not None:\n        if isinstance(save_file, str):\n            os.makedirs(os.path.dirname(save_file), exist_ok=True)\n            save_pickle(recommender, save_file)\n        elif save_file:\n            save_pickle(recommender, \"recommender.pkl\")\n\n\ndef score(recommender: Union[str, BanditRecommender],\n          data: Union[str, pd.DataFrame],\n          user_features: Union[str, pd.DataFrame] = None,\n          user_features_list: Union[str, List[str]] = None,\n          user_features_dtypes: Union[str, Dict] = None,\n          item_features: Union[str, pd.DataFrame] = None,\n          item_list: Union[str, List[Arm]] = None,\n          item_eligibility: Union[str, pd.DataFrame] = None,\n          warm_start: bool = False,\n          warm_start_distance: float = None,\n          user_id_col: str = Constants.user_id,\n          item_id_col: str = Constants.item_id,\n          response_col: str = Constants.response,\n          batch_size: int = 100000,\n          save_file: Union[str, bool] = None) -> pd.DataFrame:\n    \"\"\"\n    Score Recommender.\n\n    Generates top-k recommendations for users in given data.\n\n    Parameters\n    ----------\n    recommender : Union[str, BanditRecommender]\n        The recommender algorithm to be scored.\n        Could be an instantiated BanditRecommender or file path of serialized recommender in pickle file.\n    data : Union[str, pd.DataFrame]\n        Training data.\n        Data should have a row for each training sample (user_id, item_id, response).\n        Column names should be consistent with user_id_col, item_id_col and response_col arguments.\n        CSV format with file header or Data Frame.\n    user_features : Union[str, pd.DataFrame], default=None\n        User features containing features for each user_id.\n        Each row should include user_id and list of features (user_id, u_1, u_2, ..., u_p).\n        CSV format with file header or Data Frame.\n    user_features_list : Union[str, List[str]], default=None\n        List of user features to use.\n        Must be a subset of features in (u_1, u_2, ... u_p).\n        If None, all the features in user_features are used.\n        CSV format with file header or List.\n    user_features_dtypes: Union[str, Dict], default=None\n        Data type for each user feature.\n        Maps each user feature name to valid data type.\n        If none, no data type casting is done upon load and data types or inferred by Pandas library.\n        JSON format or Dictionary.\n    item_features : Union[str, pd.DataFrame], default=None\n        Item features file containing features for each item_id.\n        Each row should include item_id and list of features (item_id, i_1, i_2, .... i_q).\n        CSV format with file header or Data Frame.\n    item_list : Union[str, List[Arm]], default=None\n        List of items to train.\n        If None, all the items in data are used.\n        CSV format with file header or List.\n    item_eligibility: Union[str, pd.DataFrame], default=None\n        Items each user is eligible for.\n        Used to generate excluded_arms lists.\n        If None, all the items can be evaluated for recommendation for each user.\n        CSV format with file header or Data Frame.\n    warm_start : bool, default=False\n        Whether to warm start untrained (cold) arms after training or not.\n    warm_start_distance : float, default=None\n        Warm start distance quantile.\n        Value between 0 and 1 used to determine if an item can be warm started or not using closest item.\n        All cold items will be warm started if 1 and none will be warm started if 0.\n        Must be specified if warm_start=True.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    response_col : str, default=Constants.response\n        Response column name.\n    batch_size : str, default=100000\n        Batch size used for chunking data.\n    save_file : str, default=None\n        File name to save recommender pickle.\n        If None, recommender is not saved to file.\n\n    Returns\n    -------\n    Scored recommendations.\n    \"\"\"\n    # Load recommender\n    if isinstance(recommender, str):\n        recommender = load_pickle(recommender)\n    _validate_recommender(recommender, is_fit=True)\n    _validate_common_args(data, user_features, user_features_list, user_features_dtypes, item_features,\n                          item_list, item_eligibility, warm_start, warm_start_distance, user_id_col, item_id_col,\n                          response_col, batch_size)\n    _validate_save(save_file)\n\n    # Import data\n    item_list_out = recommender.mab.arms if item_list is None else item_list\n    test_data_df, item_list_out, user_features_df, \\\n        item_to_features, excluded_df = load_data(data=data,\n                                                  user_features=user_features,\n                                                  user_features_list=user_features_list,\n                                                  user_features_dtypes=user_features_dtypes,\n                                                  item_features=item_features,\n                                                  item_list=item_list_out,\n                                                  item_eligibility=item_eligibility,\n                                                  user_id_col=user_id_col,\n                                                  item_id_col=item_id_col,\n                                                  response_col=response_col)\n    # Set arms to recommender\n    if item_list is not None:\n        recommender.set_arms(item_list_out)\n\n    # Warm start\n    if warm_start:\n        recommender.warm_start(item_to_features, warm_start_distance)\n\n    # Loop through users in batches and get recommendations\n    users = test_data_df[user_id_col].unique().tolist()\n    recommendations = []\n    scores = []\n    num_batches = max(1, len(users) // batch_size)\n    for users_of_batch in np.array_split(users, num_batches):\n\n        # Data frame of users to score\n        df = pd.DataFrame({user_id_col: users_of_batch})\n\n        # Merge user features and get feature column names\n        if user_features_df is not None:\n            df = merge_user_features(df, user_features_df, user_id_col)\n            feature_cols = [c for c in user_features_df.columns if c != user_id_col]\n            contexts = df[feature_cols].fillna(0)\n        else:\n            contexts = [[]] * len(df)\n\n        # Merge excluded item list\n        if item_eligibility is not None:\n            df = df.merge(excluded_df, how='left', on=user_id_col)\n            excluded_arms_batch = df[item_id_col].tolist()\n        else:\n            excluded_arms_batch = None\n\n        # Get recommendations\n        recs_of_batch, scores_of_batch = recommender.recommend(contexts, excluded_arms_batch, return_scores=True)\n        recommendations += recs_of_batch\n        scores += scores_of_batch\n\n    # Convert recommendations to data frame\n    df = pd.DataFrame(users, columns=[user_id_col])\n    df[item_id_col] = recommendations\n    df[Constants.score] = scores\n    df = explode_recommendations(df, user_id_col, [item_id_col, Constants.score])\n\n    # Save to csv\n    if save_file is not None:\n        if isinstance(save_file, str):\n            df.to_csv(save_file, index=False)\n        elif save_file:\n            df.to_csv(\"results.csv\", index=False)\n\n    return df\n\n\ndef benchmark(recommenders: Dict[str, BanditRecommender],\n              metrics: List[Union[BinaryRecoMetrics, RankingRecoMetrics]],\n              train_data: Union[str, pd.DataFrame],\n              test_data: Union[str, pd.DataFrame] = None,\n              cv: int = None,\n              user_features: Union[str, pd.DataFrame] = None,\n              user_features_list: Union[str, List[str]] = None,\n              user_features_dtypes: Union[str, Dict] = None,\n              item_features: Union[str, pd.DataFrame] = None,\n              item_list: Union[str, List[Arm]] = None,\n              item_eligibility: Union[str, pd.DataFrame] = None,\n              warm_start: bool = False,\n              warm_start_distance: float = None,\n              user_id_col: str = Constants.user_id,\n              item_id_col: str = Constants.item_id,\n              response_col: str = Constants.response,\n              batch_size: int = 100000,\n              verbose: bool = False) -> Union[Tuple[Dict[str, pd.DataFrame], Dict[str, Dict[str, float]]],\n                                              Tuple[List[Dict[str, pd.DataFrame]],\n                                                    List[Dict[str, Dict[str, float]]]]]:\n\n    \"\"\"\n    Benchmark Recommenders.\n\n    Benchmark a given set of recommender algorithms by training, scoring and evaluating each algorithm\n    If using cross-validation (cv) it benchmarks the algorithms on cv-many folds from the train data,\n    otherwise it trains on the train data and evaluates on the test data.\n\n    Parameters\n    ----------\n    recommenders : Dict[str, BanditRecommender]\n        The recommender algorithms to be benchmarked.\n        Dictionary with names (key) and recommender algorithms (value).\n    metrics : List[Union[BinaryRecoMetrics, RankingRecoMetrics]]\n        List of metrics used to evaluate recommendations.\n    train_data : Union[str, pd.DataFrame]\n        Training data used to train recommenders.\n        Data should have a row for each training sample (user_id, item_id, response).\n        Column names should be consistent with user_id_col, item_id_col and response_col arguments.\n        CSV format with file header or Data Frame.\n    test_data : Union[str, pd.DataFrame]\n        Test data used to generate recommendations.\n        Data should have a row for each training sample (user_id, item_id, response).\n        Column names should be consistent with user_id_col, item_id_col and response_col arguments.\n        CSV format with file header or Data Frame.\n    cv : int, default=None\n        Number of folds in the train data to use for cross-fold validation.\n        A grouped K-fold iterator is used to ensure that the same user is not contained in different folds.\n        Test data must be None when using cv.\n    user_features : Union[str, pd.DataFrame], default=None\n        User features containing features for each user_id.\n        Each row should include user_id and list of features (user_id, u_1, u_2, ..., u_p).\n        CSV format with file header or Data Frame.\n    user_features_list : Union[str, List[str]], default=None\n        List of user features to use.\n        Must be a subset of features in (u_1, u_2, ... u_p).\n        If None, all the features in user_features are used.\n        CSV format with file header or List.\n    user_features_dtypes: Union[str, Dict], default=None\n        Data type for each user feature.\n        Maps each user feature name to valid data type.\n        If none, no data type casting is done upon load and data types or inferred by Pandas library.\n        JSON format or Dictionary.\n    item_features : Union[str, pd.DataFrame], default=None\n        Item features file containing features for each item_id.\n        Each row should include item_id and list of features (item_id, i_1, i_2, .... i_q).\n        CSV format with file header or Data Frame.\n    item_list : Union[str, List[Arm]], default=None\n        List of items to train.\n        If None, all the items in data are used.\n        CSV format with file header or List.\n    item_eligibility: Union[str, pd.DataFrame], default=None\n        Items each user is eligible for.\n        Used to generate excluded_arms lists.\n        If None, all the items can be evaluated for recommendation for each user.\n        CSV format with file header or Data Frame.\n    warm_start : bool, default=False\n        Whether to warm start untrained (cold) arms after training or not.\n    warm_start_distance : float, default=None\n        Warm start distance quantile.\n        Value between 0 and 1 used to determine if an item can be warm started or not using closest item.\n        All cold items will be warm started if 1 and none will be warm started if 0.\n        Must be specified if warm_start=True.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    response_col : str, default=Constants.response\n        Response column name.\n    batch_size : str, default=100000\n        Batch size used for chunking data.\n    verbose : bool, default=False\n        Whether to print progress status or not.\n\n    Returns\n    -------\n    Tuple with recommendations and evaluation metrics for each algorithm.\n    The tuple values are lists of dictionaries if cross-validation is used, representing the results on each fold,\n    and individual dictionaries otherwise.\n    \"\"\"\n    _validate_recommender(recommenders)\n    _validate_common_args(train_data, user_features, user_features_list, user_features_dtypes, item_features,\n                          item_list, item_eligibility, warm_start, warm_start_distance, user_id_col,\n                          item_id_col, response_col, batch_size)\n    _validate_bench(recommenders, metrics, train_data, test_data, cv)\n\n    # Convert input arguments to dictionary\n    args = locals()\n    args.pop('cv')\n\n    if cv is None:\n        return _bench(**args)\n    else:\n\n        # Read data\n        if isinstance(train_data, str):\n            df = pd.read_csv(train_data)\n        else:\n            df = pd.DataFrame(train_data)\n\n        # Initialize lists to store recommendation results and metrics for each fold\n        recommendations_list = []\n        metrics_list = []\n\n        # Split data into cv folds and run benchmark\n        group_kfold = GroupKFold(n_splits=cv)\n        i = 1\n        for train_index, test_index in group_kfold.split(df, groups=df[user_id_col]):\n\n            if verbose:\n                print(f'CV Fold = {i} \\n')\n\n            # Set train/test data frames\n            args['train_data'] = df.iloc[train_index, :]\n            args['test_data'] = df.iloc[test_index, :]\n\n            # Run benchmark\n            recommendations, metrics = _bench(**args)\n\n            # Append\n            recommendations_list.append(recommendations)\n            metrics_list.append(metrics)\n\n            i += 1\n\n        return recommendations_list, metrics_list\n\n\ndef _bench(recommenders: Dict[str, BanditRecommender],\n           metrics: List[Union[BinaryRecoMetrics, RankingRecoMetrics]],\n           train_data: Union[str, pd.DataFrame],\n           test_data: Union[str, pd.DataFrame],\n           user_features: Union[str, pd.DataFrame] = None,\n           user_features_list: Union[str, List[str]] = None,\n           user_features_dtypes: Union[str, Dict] = None,\n           item_features: Union[str, pd.DataFrame] = None,\n           item_list: Union[str, List[str]] = None,\n           item_eligibility: Union[str, pd.DataFrame] = None,\n           warm_start: bool = False,\n           warm_start_distance: float = None,\n           user_id_col: str = Constants.user_id,\n           item_id_col: str = Constants.item_id,\n           response_col: str = Constants.response,\n           batch_size: int = 100000,\n           verbose: bool = False) -> Tuple[Dict[str, pd.DataFrame], Dict[str, Dict[str, float]]]:\n\n    # Import data\n    train_data_df, item_list, user_features_df, \\\n        item_to_features, _ = load_data(data=train_data,\n                                        user_features=user_features,\n                                        user_features_list=user_features_list,\n                                        user_features_dtypes=user_features_dtypes,\n                                        item_features=item_features,\n                                        item_list=item_list,\n                                        item_eligibility=item_eligibility,\n                                        user_id_col=user_id_col,\n                                        item_id_col=item_id_col,\n                                        response_col=response_col)\n    test_data_df = load_response_data(test_data, user_id_col, item_id_col, response_col)\n\n    recommendations = dict()\n    rec_metrics = dict()\n    for name, recommender in recommenders.items():\n        if verbose:\n            print(f'>>> {name}')\n            print('Running...')\n\n        # Copy recommender\n        rec = deepcopy(recommender)\n\n        # Train\n        t0 = time()\n        train(\n            recommender=rec,\n            data=train_data_df,\n            user_features=user_features_df,\n            item_features=item_features,\n            item_list=item_list,\n            warm_start=warm_start,\n            warm_start_distance=warm_start_distance,\n            user_id_col=user_id_col,\n            item_id_col=item_id_col,\n            response_col=response_col,\n            batch_size=batch_size,\n            save_file=None)\n\n        # Score\n        recommendations[name] = score(\n            recommender=rec,\n            data=test_data_df,\n            user_features=user_features_df,\n            item_features=item_features,\n            item_list=item_list,\n            item_eligibility=item_eligibility,\n            warm_start=warm_start,\n            warm_start_distance=warm_start_distance,\n            user_id_col=user_id_col,\n            item_id_col=item_id_col,\n            response_col=response_col,\n            batch_size=batch_size,\n            save_file=None)\n\n        # Evaluate\n        cm = CombinedMetrics(*metrics)\n        rec_metrics[name] = cm.get_score(test_data_df.rename(columns={response_col: Constants.score}),\n                                         recommendations[name])\n        if verbose:\n            print(f\"Done: {(time() - t0) / 60:.2f} minutes \\n\")\n\n    return recommendations, rec_metrics\n\n\ndef _validate_common_args(data, user_features, user_features_list, user_features_dtypes, item_features,\n                          item_list, item_eligibility, warm_start, warm_start_distance, user_id_col, item_id_col,\n                          response_col, batch_size):\n    # Train/test data\n    check_true(data is not None, ValueError(\"Data input cannot be none.\"))\n    check_true(isinstance(data, (str, pd.DataFrame)),\n               TypeError(\"Data should be string of filepath or data frame.\"))\n\n    # User features\n    if user_features is not None:\n        check_true(isinstance(user_features, (str, pd.DataFrame)),\n                   TypeError(\"User features should be string of filepath or data frame.\"))\n    if user_features_list is not None:\n        check_true(user_features is not None, ValueError(\"User features should be given if user list is specified.\"))\n        check_true(isinstance(user_features_list, (str, list)),\n                   TypeError(\"User features list should be string of filepath or list.\"))\n    if user_features_dtypes is not None:\n        check_true(user_features is not None, ValueError(\"User features should be given if user dtypes is specified.\"))\n        check_true(isinstance(user_features_dtypes, (str, dict)),\n                   TypeError(\"User features dtypes should be string of filepath or dictionary.\"))\n\n    # Item features\n    if item_features is not None:\n        check_true(isinstance(item_features, (str, pd.DataFrame)),\n                   TypeError(\"Item features should be string of filepath or data frame.\"))\n    if item_list is not None:\n        check_true(isinstance(item_list, (str, list)),\n                   TypeError(\"Item list should be string of filepath or list.\"))\n    if item_eligibility is not None:\n        check_true(isinstance(item_eligibility, (str, pd.DataFrame)),\n                   TypeError(\"Item eligibility should be string of filepath or data frame.\"))\n\n    # Warm start\n    check_true(isinstance(warm_start, bool), TypeError(\"Warm start flag should be boolean.\"))\n    if warm_start:\n        check_true(warm_start_distance is not None, ValueError(\"Warm start distance cannot be none.\"))\n        check_true(isinstance(warm_start_distance, float), TypeError(\"Warm start distance should be a float.\"))\n        check_true(isinstance(warm_start_distance, float), TypeError(\"Warm start distance should be a float.\"))\n        check_true(0 <= warm_start_distance <= 1, ValueError(\"Warm start distance should be between 0 and 1.\"))\n        check_true(item_features is not None, ValueError(\"Item features are required to warm start arms.\"))\n    else:\n        check_true(warm_start_distance is None, ValueError(\"Warm start distance should be none if warm start false.\"))\n\n    # IDs\n    check_true(isinstance(user_id_col, str), TypeError(\"User id should be a string.\"))\n    check_true(isinstance(item_id_col, str), TypeError(\"Item id should be a string.\"))\n    check_true(isinstance(response_col, str), TypeError(\"Response column should be a string.\"))\n\n    # Batch size\n    check_true(isinstance(batch_size, int), TypeError(\"Batch size should be an integer.\"))\n    check_true(batch_size > 0, ValueError(\"Batch size should be positive.\"))\n\n\ndef _validate_recommender(recommender, is_fit=False):\n    if not isinstance(recommender, dict):\n        recommender_dict = {\"\": recommender}\n    else:\n        recommender_dict = recommender\n    for rec in recommender_dict.values():\n        check_true(isinstance(rec, BanditRecommender), TypeError(\"Recommender should be a BanditRecommender instance.\"))\n        if is_fit:\n            check_true(rec.mab is not None, ValueError(\"Recommender has not been initialized.\"))\n            check_true(rec.mab._is_initial_fit, ValueError(\"Recommender has not been fit.\"))\n\n\ndef _validate_save(save_file):\n    if save_file is not None:\n        check_true(isinstance(save_file, (bool, str)), TypeError(\"Save file should be boolean or a string filepath.\"))\n\n\ndef _validate_bench(recommenders, metrics, train_data, test_data, cv):\n\n    # Recommenders\n    check_true(recommenders is not None, ValueError(\"Recommenders cannot be none.\"))\n    check_true(isinstance(recommenders, dict), TypeError(\"Recommenders should be given as a dictionary.\"))\n\n    # Metrics\n    check_true(isinstance(metrics, list), TypeError(\"Metrics should be given as a list.\"))\n    for v in metrics:\n        check_true(isinstance(v, (BinaryRecoMetrics.AUC,\n                                  BinaryRecoMetrics.CTR,\n                                  RankingRecoMetrics.Precision,\n                                  RankingRecoMetrics.Recall,\n                                  RankingRecoMetrics.NDCG,\n                                  RankingRecoMetrics.MAP,\n                                  DiversityRecoMetrics.InterListDiversity,\n                                  DiversityRecoMetrics.IntraListDiversity)),\n                   TypeError(\"Evaluation metric values must be BinaryRecoMetrics, RankingRecoMetrics, \"\n                             \"or DiversityRecoMetrics instances.\"))\n\n    # Train/test data\n    check_true(train_data is not None, ValueError(\"Train data cannot be none.\"))\n    check_true(isinstance(train_data, (str, pd.DataFrame)),\n               TypeError(\"Train data should be string of filepath or data frame.\"))\n    if test_data is not None:\n        check_true(isinstance(test_data, (str, pd.DataFrame)),\n                   TypeError(\"Test data should be string of filepath or data frame.\"))\n\n    # CV\n    if cv is not None:\n        check_true(isinstance(cv, int), TypeError(\"Cross-validation (cv) must be an integer.\"))\n        check_true(test_data is None, ValueError(\"Test data must be None when using Cross-validation (cv).\"))\n"
  },
  {
    "path": "mab2rec/rec.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nfrom typing import Dict, List, Tuple, Union\n\nimport numpy as np\nimport pandas as pd\nfrom mabwiser.mab import MAB, LearningPolicy, NeighborhoodPolicy\nfrom mabwiser.utils import Arm, Num, check_true\nfrom scipy.special import expit\n\nfrom mab2rec.utils import Constants\nfrom mab2rec._version import __author__, __email__, __version__, __copyright__\n\n__author__ = __author__\n__email__ = __email__\n__version__ = __version__\n__copyright__ = __copyright__\n\n\nclass BanditRecommender:\n    \"\"\"**Mab2Rec: Multi-Armed Bandit Recommender**\n\n    Mab2Rec is a library to support prototyping and building of bandit-based recommendation algorithms. It is powered\n    by MABWiser which supports **context-free**, **parametric** and **non-parametric** **contextual** bandit models.\n\n    Attributes\n    ----------\n\n    learning_policy :  MABWiser LearningPolicy\n        The learning policy.\n    neighborhood_policy : MABWiser NeighborhoodPolicy\n        The neighborhood policy.\n    top_k : int, default=10\n        The number of items to recommend.\n    seed : int, Constants.default_seed\n        The random seed to initialize the internal random number generator.\n    n_jobs : int\n        This is used to specify how many concurrent processes/threads should be used for parallelized routines.\n        Default value is set to 1.\n        If set to -1, all CPUs are used.\n        If set to -2, all CPUs but one are used, and so on.\n    backend : str, optional\n        Specify a parallelization backend implementation supported in the joblib library. Supported options are:\n        - “loky” used by default, can induce some communication and memory overhead when exchanging input and\n          output data with the worker Python processes.\n        - “multiprocessing” previous process-based backend based on multiprocessing.Pool. Less robust than loky.\n        - “threading” is a very low-overhead backend but it suffers from the Python Global Interpreter Lock if the\n          called function relies a lot on Python objects.\n        Default value is None. In this case the default backend selected by joblib will be used.\n    mab : MAB\n        The multi-armed bandit.\n\n    Examples\n    --------\n        >>> from mab2rec import BanditRecommender, LearningPolicy\n        >>> decisions = ['Arm1', 'Arm1', 'Arm3', 'Arm1', 'Arm2', 'Arm3']\n        >>> rewards = [0, 1, 1, 0, 1, 0]\n        >>> rec = BanditRecommender(LearningPolicy.EpsilonGreedy(epsilon=0.25), top_k=2)\n        >>> rec.fit(decisions, rewards)\n        >>> rec.recommend()\n        ['Arm2', 'Arm1']\n        >>> rec.add_arm('Arm4')\n        >>> rec.partial_fit(['Arm4'], [1])\n        >>> rec.recommend()[0]\n        ['Arm2', 'Arm4']\n\n        >>> from mab2rec import BanditRecommender, LearningPolicy, NeighborhoodPolicy\n        >>> decisions = ['Arm1', 'Arm1', 'Arm3', 'Arm1', 'Arm2', 'Arm3']\n        >>> rewards = [0, 1, 1, 0, 1, 0]\n        >>> contexts = [[0, 0, 0], [1, 0, 1], [0, 1, 1], [0, 0, 0], [1, 1, 1], [0, 1, 0]]\n        >>> rec = BanditRecommender(LearningPolicy.EpsilonGreedy(), NeighborhoodPolicy.KNearest(k=3), top_k=2)\n        >>> rec.fit(decisions, rewards, contexts)\n        >>> rec.recommend([[1, 1, 0], [1, 1, 1], [0, 1, 0]])\n        [['Arm2', 'Arm3'], ['Arm3', 'Arm2'], ['Arm3', 'Arm2']]\n\n        >>> from mab2rec import BanditRecommender, LearningPolicy\n        >>> decisions = ['Arm1', 'Arm1', 'Arm3', 'Arm1', 'Arm2', 'Arm3']\n        >>> rewards = [0, 1, 1, 0, 1, 0]\n        >>> contexts = [[0, 0, 0], [1, 0, 1], [0, 1, 1], [0, 0, 0], [1, 1, 1], [0, 1, 0]]\n        >>> rec = BanditRecommender(LearningPolicy.LinGreedy(epsilon=0.1), top_k=2)\n        >>> rec.fit(decisions, rewards, contexts)\n        >>> rec.recommend([[1, 1, 0], [1, 1, 1], [0, 1, 0]])\n        [['Arm2', 'Arm1'], ['Arm2', 'Arm1'], ['Arm2', 'Arm3']]\n        >>> arm_to_features = {'Arm1': [0, 1], 'Arm2': [0, 0], 'Arm3': [0, 0], 'Arm4': [0, 1]}\n        >>> rec.add_arm('Arm4')\n        >>> rec.warm_start(arm_to_features, distance_quantile=0.75)\n        >>> rec.recommend([[1, 1, 0], [1, 1, 1], [0, 1, 0]])\n        [['Arm2', 'Arm4'], ['Arm2', 'Arm4'], ['Arm2', 'Arm3']]\n    \"\"\"\n\n    def __init__(self, learning_policy: Union[LearningPolicy.EpsilonGreedy,\n                                              LearningPolicy.Popularity,\n                                              LearningPolicy.Random,\n                                              LearningPolicy.Softmax,\n                                              LearningPolicy.ThompsonSampling,\n                                              LearningPolicy.UCB1,\n                                              LearningPolicy.LinGreedy,\n                                              LearningPolicy.LinTS,\n                                              LearningPolicy.LinUCB],\n                 neighborhood_policy: Union[None,\n                                            NeighborhoodPolicy.LSHNearest,\n                                            NeighborhoodPolicy.Clusters,\n                                            NeighborhoodPolicy.KNearest,\n                                            NeighborhoodPolicy.Radius,\n                                            NeighborhoodPolicy.TreeBandit] = None,\n                 top_k: int = 10,\n                 seed: int = Constants.default_seed,\n                 n_jobs: int = 1,\n                 backend: str = None):\n        \"\"\"Initializes bandit recommender with the given arguments.\n\n        Validates the arguments and raises exception in case there are violations.\n\n        Parameters\n        ----------\n        learning_policy : LearningPolicy\n            The learning policy.\n        neighborhood_policy : NeighborhoodPolicy, default=None\n            The context policy.\n        top_k : int, default=10\n            The number of items to recommend.\n        seed : numbers.Rational, default=Constants.default_seed\n            The random seed to initialize the random number generator.\n            Default value is set to Constants.default_seed.value\n        top_k : int, default=10\n            The number of items to recommend.\n        n_jobs : int, default=1\n            This is used to specify how many concurrent processes/threads should be used for parallelized routines.\n            If set to -1, all CPUs are used.\n            If set to -2, all CPUs but one are used, and so on.\n        backend : str, default=None\n            Specify a parallelization backend implementation supported in the joblib library. Supported options are:\n            - “loky” used by default, can induce some communication and memory overhead when exchanging input and\n              output data with the worker Python processes.\n            - “multiprocessing” previous process-based backend based on multiprocessing.Pool. Less robust than loky.\n            - “threading” is a very low-overhead backend but it suffers from the Python Global Interpreter Lock if the\n              called function relies a lot on Python objects.\n            Default value is None. In this case the default backend selected by joblib will be used.\n        \"\"\"\n\n        # Set given arguments\n        self.learning_policy = learning_policy\n        self.neighborhood_policy = neighborhood_policy\n        self.top_k = top_k\n        self.seed = seed\n        self.n_jobs = n_jobs\n        self.backend = backend\n\n        # Validate that MAB can be instantiated with given arguments\n        self.mab = None\n        self._validate_mab_args()\n\n    def _init(self, arms: List[Union[Arm]]) -> None:\n        \"\"\"Initializes recommender with given list of arms.\n\n        Parameters\n        ----------\n        arms : List[Union[Arm]]\n            The list of all of the arms available for decisions.\n            Arms can be integers, strings, etc.\n\n        Returns\n        -------\n        Returns nothing\n        \"\"\"\n        self.mab = MAB(arms, self.learning_policy, self.neighborhood_policy, self.seed, self.n_jobs, self.backend)\n\n    def add_arm(self, arm: Arm, binarizer=None) -> None:\n        \"\"\"Adds an _arm_ to the list of arms.\n\n        Incorporates the arm into the learning and neighborhood policies with no training data.\n\n        Parameters\n        ----------\n        arm : Arm\n            The new arm to be added.\n        binarizer : Callable, default=None\n            The new binarizer function for Thompson Sampling.\n\n        Returns\n        -------\n        Returns nothing.\n        \"\"\"\n        if self.mab is None:\n            self._init([arm])\n        else:\n            self.mab.add_arm(arm, binarizer)\n\n    def fit(self, decisions: Union[List[Arm], np.ndarray, pd.Series],\n            rewards: Union[List[Num], np.ndarray, pd.Series],\n            contexts: Union[None, List[List[Num]], np.ndarray, pd.Series, pd.DataFrame] = None) -> None:\n        \"\"\"Fits the recommender the given *decisions*, their corresponding *rewards* and *contexts*, if any.\n        If the recommender arms has not been initialized using the `set_arms`, the recommender arms will be set\n        to the list of arms in *decisions*.\n\n        Validates arguments and raises exceptions in case there are violations.\n\n        This function makes the following assumptions:\n            - each decision corresponds to an arm of the bandit.\n            - there are no ``None``, ``Nan``, or ``Infinity`` values in the contexts.\n\n        Parameters\n        ----------\n         decisions : Union[List[Arm], np.ndarray, pd.Series]\n            The decisions that are made.\n         rewards : Union[List[Num], np.ndarray, pd.Series]\n            The rewards that are received corresponding to the decisions.\n         contexts : Union[None, List[List[Num]], np.ndarray, pd.Series, pd.DataFrame], default=None\n            The context under which each decision is made.\n\n        Returns\n        -------\n        Returns nothing.\n        \"\"\"\n        if self.mab is None:\n            self._init(np.unique(decisions).tolist())\n        self.mab.fit(decisions, rewards, contexts)\n\n    def partial_fit(self, decisions: Union[List[Arm], np.ndarray, pd.Series],\n                    rewards: Union[List[Num], np.ndarray, pd.Series],\n                    contexts: Union[None, List[List[Num]], np.ndarray, pd.Series, pd.DataFrame] = None) -> None:\n        \"\"\"Updates the recommender with the given *decisions*, their corresponding *rewards* and *contexts*, if any.\n\n        Validates arguments and raises exceptions in case there are violations.\n\n        This function makes the following assumptions:\n            - each decision corresponds to an arm of the bandit.\n            - there are no ``None``, ``Nan``, or ``Infinity`` values in the contexts.\n\n        Parameters\n        ----------\n         decisions : Union[List[Arm], np.ndarray, pd.Series]\n            The decisions that are made.\n         rewards : Union[List[Num], np.ndarray, pd.Series]\n            The rewards that are received corresponding to the decisions.\n         contexts : Union[None, List[List[Num]], np.ndarray, pd.Series, pd.DataFrame], default=None\n            The context under which each decision is made.\n\n        Returns\n        -------\n        Returns nothing.\n        \"\"\"\n        self._validate_mab(is_fit=True)\n        self.mab.partial_fit(decisions, rewards, contexts)\n\n    def predict(self, contexts: Union[None, List[List[Num]],\n                                      np.ndarray, pd.Series, pd.DataFrame] = None) -> Union[Arm, List[Arm]]:\n        \"\"\"Returns the \"best\" arm (or arms list if multiple contexts are given) based on the expected reward.\n\n        The definition of the *best* depends on the specified learning policy.\n        Contextual learning policies and neighborhood policies require contexts data in training.\n        In testing, they return the best arm given new context(s).\n\n        Parameters\n        ----------\n        contexts : Union[None, List[List[Num]], np.ndarray, pd.Series, pd.DataFrame], default=None\n            The context under which each decision is made.\n            If contexts is not ``None`` for context-free bandits, the predictions returned will be a\n            list of the same length as contexts.\n\n        Returns\n        -------\n        The recommended arm or recommended arms list.\n        \"\"\"\n        self._validate_mab(is_fit=True)\n        return self.mab.predict(contexts)\n\n    def predict_expectations(self, contexts: Union[None, List[List[Num]], np.ndarray, pd.Series, pd.DataFrame] = None) \\\n            -> Union[Dict[Arm, Num], List[Dict[Arm, Num]]]:\n        \"\"\"Returns a dictionary of arms (key) to their expected rewards (value).\n\n        Contextual learning policies and neighborhood policies require contexts data for expected rewards.\n\n        Parameters\n        ----------\n        contexts : Union[None, List[Num], List[List[Num]], np.ndarray, pd.Series, pd.DataFrame], default=None\n            The context for the expected rewards.\n            If contexts is not ``None`` for context-free bandits, the predicted expectations returned will be a\n            list of the same length as contexts.\n\n        Returns\n        -------\n        The dictionary of arms (key) to their expected rewards (value), or a list of such dictionaries.\n        \"\"\"\n        self._validate_mab(is_fit=True)\n        return self.mab.predict_expectations(contexts)\n\n    def recommend(self, contexts: Union[None, List[List[Num]], np.ndarray, pd.Series, pd.DataFrame] = None,\n                  excluded_arms: List[List[Arm]] = None, return_scores: bool = False, apply_sigmoid: bool = True) \\\n            -> Union[Union[List[Arm], Tuple[List[Arm], List[Num]],\n                     Union[List[List[Arm]], Tuple[List[List[Arm]], List[List[Num]]]]]]:\n        \"\"\"Generate _top-k_ recommendations based on the expected reward.\n\n        Recommend up to k arms with the highest predicted expectations.\n        For contextual bandits, only items not included in the excluded arms can be recommended.\n\n        Parameters\n        ----------\n        contexts : np.ndarray, default=None\n            The context under which each decision is made.\n            If contexts is not ``None`` for context-free bandits, the recommendations returned will be a\n            list of the same length as contexts.\n        excluded_arms : List[List[Arm]], default=None\n            List of list of arms to exclude from recommended arms.\n        return_scores : bool, default=False\n            Return score for each recommended item.\n        apply_sigmoid : bool, default=True\n            Whether to apply sigmoid transformation to scores before ranking.\n\n        Returns\n        -------\n        List of tuples of the form ([arm_1, arm_2, ..., arm_k], [score_1, score_2, ..., score_k])\n        \"\"\"\n        self._validate_mab(is_fit=True)\n        self._validate_get_rec(contexts, excluded_arms)\n\n        # Get predicted expectations\n        num_contexts = len(contexts) if contexts is not None else 1\n        if num_contexts == 1:\n            expectations = [self.mab.predict_expectations(contexts)]\n        else:\n            expectations = self.mab.predict_expectations(contexts)\n\n        # Take sigmoid of expectations so that values are between 0 and 1\n        if apply_sigmoid:\n            expectations = expit(pd.DataFrame(expectations)[self.mab.arms].values)\n        else:\n            expectations = pd.DataFrame(expectations)[self.mab.arms].values\n\n        # Create an exclusion mask, where exclusion_mask[context_ind][arm_ind] denotes if the arm with the\n        # index arm_ind was excluded for context with the index context_ind.\n        # The value will be True if it is excluded and those arms will not be returned as part of the results.\n        arm_to_index = {arm: arm_ind for arm_ind, arm in enumerate(self.mab.arms)}\n        exclude_mask = np.zeros((num_contexts, len(self.mab.arms)), dtype=bool)\n        if excluded_arms is not None:\n            for context_ind, excluded in enumerate(excluded_arms):\n                exclude_mask[context_ind][[arm_to_index[arm] for arm in excluded if arm in arm_to_index]] = True\n\n        # Set excluded item scores to -1, so they automatically get placed lower in best results\n        expectations[exclude_mask] = -1.\n\n        # Get best `top_k` results by sorting the expectations\n        arm_inds = np.flip(np.argsort(expectations)[:, -self.top_k:], axis=1)\n\n        # Get the list of top_k recommended items and corresponding expectations for each context\n        recommendations = [[]] * num_contexts\n        scores = [[]] * num_contexts\n        for context_ind in range(num_contexts):\n            recommendations[context_ind] = [self.mab.arms[arm_ind] for arm_ind in arm_inds[context_ind]\n                                            if not exclude_mask[context_ind, arm_ind]]\n            if return_scores:\n                scores[context_ind] = [expectations[context_ind, arm_ind] for arm_ind in arm_inds[context_ind]\n                                       if not exclude_mask[context_ind, arm_ind]]\n\n        # Return recommendations and scores\n        if return_scores:\n            if num_contexts > 1:\n                return recommendations, scores\n            else:\n                return recommendations[0], scores[0]\n        else:\n            if num_contexts > 1:\n                return recommendations\n            else:\n                return recommendations[0]\n\n    def remove_arm(self, arm: Arm) -> None:\n        \"\"\"Removes an _arm_ from the list of arms.\n\n        Parameters\n        ----------\n        arm : Arm\n            The existing arm to be removed.\n\n        Returns\n        -------\n        Returns nothing.\n        \"\"\"\n        self._validate_mab()\n        self.mab.remove_arm(arm)\n\n    def set_arms(self, arms: List[Arm], binarizer=None) -> None:\n        \"\"\"Initializes the recommender and sets the recommender with given list of arms.\n        Existing arms not in the given list of arms are removed and new arms are incorporated into the learning and\n        neighborhood policies with no training data.\n        If the recommender has already been initialized it will not be re-initialized.\n\n        Parameters\n        ----------\n        arms : List[Arm]\n            The new arm to be added.\n        binarizer : Callable, default=None\n            The new binarizer function for Thompson Sampling.\n\n        Returns\n        -------\n        Returns nothing.\n        \"\"\"\n\n        # Initialize mab\n        if self.mab is None:\n            self._init(arms)\n\n        # Remove arms\n        arms_to_remove = []\n        for existing_arm in self.mab.arms:\n            if existing_arm not in arms:\n                arms_to_remove.append(existing_arm)\n        for arm in arms_to_remove:\n            self.remove_arm(arm)\n\n        # Add arms\n        for new_arm in arms:\n            if new_arm not in self.mab.arms:\n                self.add_arm(new_arm, binarizer)\n\n    def warm_start(self, arm_to_features: Dict[Arm, List[Num]], distance_quantile: float = None) -> None:\n        \"\"\"Warm-start untrained (cold) arms of the multi-armed bandit.\n\n        Validates arguments and raises exceptions in case there are violations.\n\n        Parameters\n        ----------\n        arm_to_features : Dict[Arm, List[Num]]\n            Numeric representation for each arm.\n        distance_quantile : float, default=None\n            Value between 0 and 1 used to determine if an item can be warm started or not using closest item.\n            All cold items will be warm started if 1 and none will be warm started if 0.\n\n        Returns\n        -------\n        Returns nothing.\n        \"\"\"\n        self._validate_mab(is_fit=True)\n        self.mab.warm_start(arm_to_features, distance_quantile)\n\n    def _validate_mab_args(self):\n        _ = MAB([1], self.learning_policy, self.neighborhood_policy, self.seed, self.n_jobs, self.backend)\n        check_true(isinstance(self.top_k, int), ValueError(\"Top k should be an integer.\"))\n        check_true(self.top_k > 0, ValueError(\"Top k should be positive.\"))\n\n    def _validate_mab(self, is_fit=False):\n        check_true(self.mab is not None, ValueError(\"Recommender has not been initialized.\"))\n        if is_fit:\n            check_true(self.mab._is_initial_fit, ValueError(\"Recommender has not been fit.\"))\n\n    @staticmethod\n    def _validate_get_rec(contexts, excluded_arms):\n        if excluded_arms is not None:\n            check_true(contexts is not None,\n                       ValueError(\"Excluded arms should either be None, or a list of exclusion lists per context.\"))\n            check_true(len(excluded_arms) == len(contexts),\n                       ValueError(\"Excluded arms should either be None, or a list of exclusion lists per context.\"))\n"
  },
  {
    "path": "mab2rec/utils.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nimport json\nimport pickle\nfrom typing import Dict, List, NamedTuple, Union\n\nimport numpy as np\nimport pandas as pd\nfrom jurity.recommenders import BinaryRecoMetrics, RankingRecoMetrics\nfrom mabwiser.utils import Arm, Num\nfrom mabwiser.utils import check_true\n\n\nclass Constants(NamedTuple):\n    \"\"\"\n    Constant values used by the modules.\n    \"\"\"\n    default_seed = 12345\n    user_id = 'user_id'\n    item_id = 'item_id'\n    response = 'response'\n    score = 'score'\n\n\ndef explode_recommendations(df: pd.DataFrame, unique_col: str, explode_cols: List[str]):\n    \"\"\"Replicates the explode functionality in pandas 0.25 and later.\n\n    Assumes that there are two levels in the dataframe. The unique column is the first level, and it contains\n    de-duplicated values. The columns in explode_cols is the second level, where each of these columns contain a list\n    of values. Each column in explode_cols is assumed to contain a list of same length.\n\n    The output is the normalized dataframe where the lists are split into individual rows.\n    \"\"\"\n    # First, remove anything with 0 length\n    lens = df[explode_cols[0]].str.len()\n    df = df[lens != 0].reset_index(drop=True)\n    # Calculate lengths of the second level list of values\n    lens = df[explode_cols[0]].str.len()\n    # Repeat the unique column to get the same number of values as the second level\n    unique_vals = np.repeat(df[unique_col], lens.values)\n    cols = {unique_col: unique_vals.values}\n    # Concatenate all second level values to get a flattened list\n    cols.update({key: np.concatenate(df[key]) for key in explode_cols})\n    return pd.DataFrame(cols)\n\n\ndef concat_recommendations_list(recommendation_results_list: List[Dict[str, pd.DataFrame]]) -> Dict[str, pd.DataFrame]:\n    \"\"\"\n    Concatenates recommendation results split across multiple data frames into a single dataframe.\n\n    Parameters\n    ----------\n    recommendation_results_list: List[Dict[str, pd.DataFrame]]\n        List of dictionaries returned by benchmark function.\n\n    Returns\n    -------\n    Dictionary with recommendations by algorithm.\n    \"\"\"\n    recommendation_results_concat = dict()\n    for recommendation_results in recommendation_results_list:\n        for name, df in recommendation_results.items():\n            if name not in recommendation_results_concat:\n                recommendation_results_concat[name] = df\n            else:\n                recommendation_results_concat[name] = pd.concat((recommendation_results_concat[name], df))\n    return recommendation_results_concat\n\n\ndef default_metrics(top_k_values=None, user_id_col: str = Constants.user_id, item_id_col: str = Constants.item_id):\n    metric_params = {'click_column': Constants.score, 'user_id_column': user_id_col, 'item_id_column': item_id_col}\n    metrics = []\n    for k in top_k_values:\n        metrics.append(BinaryRecoMetrics.AUC(**metric_params, k=k))\n        metrics.append(BinaryRecoMetrics.CTR(**metric_params, k=k))\n        metrics.append(RankingRecoMetrics.Precision(**metric_params, k=k))\n        metrics.append(RankingRecoMetrics.Recall(**metric_params, k=k))\n        metrics.append(RankingRecoMetrics.NDCG(**metric_params, k=k))\n        metrics.append(RankingRecoMetrics.MAP(**metric_params, k=k))\n    return metrics\n\n\ndef load_data(data: Union[str, pd.DataFrame], user_features: Union[str, pd.DataFrame] = None,\n              user_features_list: Union[str, List[str]] = None, user_features_dtypes: Union[str, Dict] = None,\n              item_features: Union[str, pd.DataFrame] = None, item_list: Union[str, List[str]] = None,\n              item_eligibility: Union[str, pd.DataFrame] = None, user_id_col: str = Constants.user_id,\n              item_id_col: str = Constants.item_id, response_col: str = Constants.response):\n    \"\"\"\n    Import data.\n\n    Parameters\n    ----------\n    data: Union[str, pd.DataFrame]\n        Data should have a row for each sample (user_id, item_id, response).\n        Column names should be consistent with user_id_col, item_id_col and response_col arguments.\n        CSV format with file header or Data Frame.\n    user_features: Union[str, pd.DataFrame]\n        User features containing features for each user_id.\n        Each row should include user_id and list of features (user_id, u_1, u_2, ..., u_p).\n        CSV format with file header or Data Frame.\n    user_features_list: Union[str, List[str]]\n        List of user features to use.\n        Must be a subset of features in (u_1, u_2, ... u_p).\n        If None, all the features in user_features are used.\n        CSV format with file header or List.\n    user_features_dtypes: Union[str, Dict]\n        User features data types file with mappings of features to their dtypes upon loading.\n        Data should have a key, value pair for user feature, e.g., {\"feature_1\": \"float32\"}\n        The keys should be consistent with `user_features` file.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_features: Union[str, pd.DataFrame]\n        Item features file containing features for each item_id.\n        Each row should include item_id and list of features (item_id, i_1, i_2, .... i_q).\n        CSV format with file header or Data Frame.\n    item_eligibility: Union[str, pd.DataFrame], default=None\n        Items each user is eligible for.\n        Used to generate excluded_arms lists.\n        If None, all the items can be evaluated for recommendation for each user.\n        CSV format with file header or Data Frame.\n    item_list: List[Arm]\n        List of items.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    response_col : str, default=Constants.response\n        Response column name.\n\n    Returns\n    -------\n    Data frame with response data.\n    \"\"\"\n\n    # Response data\n    data_df = load_response_data(data, user_id_col, item_id_col, response_col)\n\n    # Item list\n    item_list = load_items(data_df, item_list, item_id_col)\n\n    # User features\n    if user_features is not None:\n        user_features_df = load_user_features(user_features, user_features_list, user_features_dtypes, user_id_col)\n    else:\n        user_features_df = None\n\n    # Item features\n    if item_features is not None:\n        item_to_features = load_item_features(item_features, item_list, item_id_col)\n    else:\n        item_to_features = None\n\n    # Item eligibility\n    if item_eligibility is not None:\n        excluded_df = load_excluded_items(item_eligibility, item_list, user_id_col, item_id_col)\n    else:\n        excluded_df = None\n\n    return data_df, item_list, user_features_df, item_to_features, excluded_df\n\n\ndef load_response_data(data: Union[str, pd.DataFrame], user_id_col: str = Constants.user_id,\n                       item_id_col: str = Constants.item_id, response_col: str = Constants.response) -> pd.DataFrame:\n    \"\"\"\n    Import response data.\n\n    Parameters\n    ----------\n    data: Union[str, pd.DataFrame]\n        Data should have a row for each sample (user_id, item_id, response).\n        Column names should be consistent with user_id_col, item_id_col and response_col arguments.\n        CSV format with file header or Data Frame.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    response_col : str, default=Constants.response\n        Response column name.\n\n    Returns\n    -------\n    Data frame with response data.\n    \"\"\"\n    df = load_data_frame(data)\n    check_true(user_id_col in df.columns, ValueError(f\"{user_id_col} not in data file.\"))\n    check_true(item_id_col in df.columns, ValueError(f\"{item_id_col} not in data file.\"))\n    check_true(response_col in df.columns, ValueError(f\"{response_col} not in data file.\"))\n    return df[[user_id_col, item_id_col, response_col]].astype({response_col: int})\n\n\ndef load_items(data_df: pd.DataFrame, item_list: Union[str, List[str]] = None, item_id_col: str = Constants.item_id):\n    \"\"\"\n    Import item list.\n\n    Parameters\n    ----------\n    data_df: pd.DataFrame\n        Data frame with response data.\n        Data should have a row for each sample (user_id, item_id, response).\n    item_list: Union[str, List[str]], default=None\n        List of items.\n        If None, the list of items in data_df are returned.\n        CSV format with file header or List.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n\n    Returns\n    -------\n    List of items.\n    \"\"\"\n    if item_list is None:\n        check_true(item_id_col in data_df.columns, ValueError(f\"{item_id_col} not in data file.\"))\n        return data_df[item_id_col].unique().tolist()\n    else:\n        return load_list(item_list)\n\n\ndef load_item_features(item_features: Union[str, pd.DataFrame], item_list: List[Arm],\n                       item_id_col: str = Constants.item_id) -> Dict[Arm, List[Num]]:\n    \"\"\"\n    Import item features.\n\n    Parameters\n    ----------\n    item_features: Union[str, pd.DataFrame]\n        Item features file containing features for each item_id.\n        Each row should include item_id and list of features (item_id, i_1, i_2, .... i_q).\n        CSV format with file header or Data Frame.\n    item_list: List[Arm]\n        List of items.\n    item_id_col: str\n        Item id column name.\n\n    Returns\n    -------\n    Dictionary mapping item features to each item.\n    \"\"\"\n    df = load_data_frame(item_features)\n    check_true(item_id_col in df.columns, ValueError(f\"{item_id_col} not in item features.\"))\n    check_true(len(df) == df[item_id_col].nunique(), ValueError(f\"Duplicate item ids in item features.\"))\n\n    # Convert from data frame to dictionary\n    item_to_features = df.set_index(item_id_col).T.to_dict(\"list\")\n\n    # Drop features for items not in item list\n    item_to_features = {item: features for item, features in item_to_features.items() if item in item_list}\n\n    # Raise error if features are missing for item in item list\n    for item in item_list:\n        if item not in item_to_features:\n            raise ValueError(f\"{item} not found in item features.\")\n\n    return item_to_features\n\n\ndef load_user_features(user_features: Union[str, pd.DataFrame], user_features_list: Union[str, List[str]] = None,\n                       user_features_dtypes: Union[str, Dict] = None,\n                       user_id_col: str = Constants.user_id) -> pd.DataFrame:\n    \"\"\"\n    Import user features.\n\n    Parameters\n    ----------\n    user_features: Union[str, pd.DataFrame]\n        User features containing features for each user_id.\n        Each row should include user_id and list of features (user_id, u_1, u_2, ..., u_p).\n        CSV format with file header or Data Frame.\n    user_features_list: Union[str, List[str]]\n        List of user features to use.\n        Must be a subset of features in (u_1, u_2, ... u_p).\n        If None, all the features in user_features are used.\n        CSV format with file header or List.\n    user_features_dtypes: Union[str, Dict]\n        User features data types file with mappings of features to their dtypes upon loading.\n        Data should have a key, value pair for user feature, e.g., {\"feature_1\": \"float32\"}\n        The keys should be consistent with `user_features` file.\n    user_id_col: str\n        User id column name.\n\n    Returns\n    -------\n    Data frame with user features.\n    \"\"\"\n    # User features data types\n    data_types = None\n    if user_features_dtypes is not None:\n        if isinstance(user_features_dtypes, str):\n            with open(user_features_dtypes, 'r') as f:\n                data_types = json.load(f)\n        else:\n            data_types = user_features_dtypes\n\n    # Load data\n    if isinstance(user_features, str):\n        df = pd.read_csv(user_features, dtype=data_types)\n    else:\n        df = pd.DataFrame(user_features)\n    check_true(user_id_col in df.columns, ValueError(f\"{user_id_col} not in user features.\"))\n    check_true(len(df) == df[user_id_col].nunique(), ValueError(f\"Duplicate user ids in user features.\"))\n\n    # Subset\n    if user_features_list is not None:\n        keep = [user_id_col] + load_list(user_features_list)\n        return df[keep]\n    else:\n        return df\n\n\ndef load_data_frame(data: Union[str, pd.DataFrame]) -> pd.DataFrame:\n    \"\"\"\n    Load file as data frame.\n\n    Parameters\n    ----------\n    data: Union[str, pd.DataFrame]\n        CSV file with header if string input, otherwise Data Frame.\n\n    Returns\n    -------\n    Data frame with user features.\n    \"\"\"\n    if isinstance(data, str):\n        return pd.read_csv(data)\n    elif isinstance(data, pd.DataFrame):\n        return data\n    else:\n        raise TypeError(\"Data must be string of filepath or data frame.\")\n\n\ndef load_excluded_items(item_eligibility: Union[str, pd.DataFrame], item_list: List[Arm],\n                        user_id_col: str = Constants.user_id, item_id_col: str = Constants.item_id) -> pd.DataFrame:\n    \"\"\"Convert eligibility data to excluded_arms list for each user_id.\n\n    Parameters\n    ----------\n    item_eligibility: Union[str, pd.DataFrame], default=None\n        Items each user is eligible for.\n        Used to generate excluded_arms lists.\n        If None, all the items can be evaluated for recommendation for each user.\n        CSV format with file header or Data Frame.\n    item_list: List\n        The list of all arms.\n    user_id_col: str\n        User id column name.\n    item_id_col: str\n        Item id column name.\n\n    Returns\n    -------\n    DataFrame with user id and list of list of arms to exclude from recommended arms.\n    \"\"\"\n\n    # Load data\n    df = load_data_frame(item_eligibility).copy()\n    check_true(user_id_col in df.columns, ValueError(user_id_col + ' missing from eligibility_data.'))\n    check_true(item_id_col in df.columns, ValueError(item_id_col + ' missing from eligibility_data.'))\n\n    # Create list of excluded items for each user.\n    df['excluded_arms'] = df.apply(lambda x: get_exclusion_list(item_list, x[item_id_col]), axis=1)\n    df.drop(item_id_col, axis=1, inplace=True)\n    df.columns = [user_id_col, item_id_col]\n    return df\n\n\ndef load_pickle(pickle_file: str):\n    \"\"\"\n    Returns the loaded pickle object.\n    \"\"\"\n    with open(pickle_file, 'rb') as infile:\n        return pickle.load(infile)\n\n\ndef load_list(data: Union[str, List]) -> List:\n    \"\"\"\n    Load file as list.\n\n    Parameters\n    ----------\n    data: Union[str, pd.DataFrame]\n        CSV file with header if string input, otherwise List.\n\n    Returns\n    -------\n    Data frame with user features.\n    \"\"\"\n    if isinstance(data, str):\n        return pd.read_csv(data).iloc[:, 0].tolist()\n    elif isinstance(data, list):\n        return data\n    else:\n        raise TypeError(\"Data must be string of filepath or list.\")\n\n\ndef get_exclusion_list(arms, eligible_list):\n    return list(set(arms).difference(set(eval(eligible_list))))\n\n\ndef print_interaction_stats(df: pd.DataFrame, user_id_col: str = Constants.user_id,\n                            item_id_col: str = Constants.item_id, response_col: str = Constants.response) -> None:\n    \"\"\"\n    Print number of rows, number of users, number of items in interaction data.\n\n    Parameters\n    ----------\n    df: pd.DataFrame\n        Interaction data frame with (user_id, item_id, response) in each row.\n    user_id_col: str\n        User id column name.\n    item_id_col: str\n        Item id column name.\n    response_col: str\n        Response column name.\n\n    Returns\n    -------\n    Returns nothing.\n    \"\"\"\n\n    print(f\"Number of rows: {len(df):,}\")\n    print(f\"Number of users: {df[user_id_col].nunique():,}\")\n    print(f\"Number of items: {df[item_id_col].nunique():,}\")\n    print(f\"Mean response rate: {df[response_col].mean():.4f}\\n\")\n\n\ndef merge_user_features(responses_df: pd.DataFrame, user_features_df: pd.DataFrame,\n                        user_id_col: str = Constants.user_id) -> pd.DataFrame:\n    \"\"\"\n    Merge responses and user features.\n\n    Parameters\n    ----------\n    responses_df : pd.DataFrame\n        Responses.\n    user_features_df : pd.DataFrame\n        User features.\n    user_id_col: str\n        User id column name.\n\n    Returns\n    -------\n    Data frame with merged responses and user features.\n    \"\"\"\n    # Subset features to only include users in response data and then merge\n    df = user_features_df[user_features_df[user_id_col].isin(responses_df[user_id_col].unique())]\n    return responses_df.merge(df, on=user_id_col, how=\"left\")\n\n\ndef save_json(obj, json_file) -> None:\n    \"\"\"\n    Save obj as json file.\n    \"\"\"\n    with open(json_file, 'w') as f:\n        json.dump(obj, f)\n\n\ndef save_pickle(obj, pickle_file) -> None:\n    \"\"\"\n    Save serializable object as pickle file.\n    \"\"\"\n    with open(pickle_file, 'wb') as fp:\n        pickle.dump(obj, fp)\n"
  },
  {
    "path": "mab2rec/visualization.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nfrom typing import Dict, List, Tuple, Union\n\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport seaborn as sns\nfrom jurity.recommenders import DiversityRecoMetrics\n\nfrom mab2rec.utils import Constants\nfrom mab2rec.utils import concat_recommendations_list\n\n\ndef plot_metrics_at_k(metric_results: Union[Dict[str, Dict[str, float]], List[Dict[str, Dict[str, float]]]], **kwargs):\n    \"\"\"\n    Plots recommendation metric values (y-axis) for different values of k (x-axis)\n    for each of the benchmark algorithms.\n\n    Parameters\n    ----------\n    metric_results : Union[Dict[str, Dict[str, float]], List[Dict[str, Dict[str, float]]]]\n        Nested-dictionary or list of dictionaries with evaluation results returned by benchmark function.\n    **kwargs\n        Other parameters passed to ``sns.catplot``.\n\n    Returns\n    -------\n    ax : matplotlib.axes.Axes\n        The plot with metric values.\n    \"\"\"\n\n    if not isinstance(metric_results, list):\n        metric_results_list = [metric_results]\n    else:\n        metric_results_list = metric_results\n\n    # Format data for plot\n    out = []\n    for metric_results in metric_results_list:\n        for algo_name, results in metric_results.items():\n            for metric_name, value in results.items():\n                d = {'algorithm': algo_name,\n                     'metric_name': metric_name.split('@')[0],\n                     'k': int(metric_name.split('@')[1]),\n                     'value': value}\n                out.append(d)\n    df = pd.DataFrame(out)\n\n    # Plot\n    ax = sns.catplot(x='k', y='value', col='metric_name', hue='algorithm', data=df, kind='point',\n                     sharey=False, **kwargs)\n    return ax\n\n\ndef plot_inter_diversity_at_k(recommendation_results: Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]],\n                              k_list: List[int], user_id_col: str = Constants.user_id,\n                              item_id_col: str = Constants.item_id, score_col: str = Constants.score,\n                              sample_size: float = None,  seed: int = Constants.default_seed,\n                              num_runs: int = 10, n_jobs: int = 1, working_memory: int = None, **kwargs):\n    \"\"\"\n    Plots recommendation metric values (y-axis) for different values of k (x-axis)\n    for each of the benchmark algorithms.\n\n    Parameters\n    ----------\n    recommendation_results : Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]]\n        Dictionary or list of dictionaries with recommendation results returned by benchmark function.\n    k_list : List[int]\n        List of top-k values to evaluate.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    score_col: str, default=Constants.score\n        Recommendation score column name.\n    sample_size: float, default=None\n        Proportion of users to randomly sample for evaluation.\n        If None, no sampling is performed.\n    seed : int, default=Constants.default_seed\n        The seed used to create random state.\n    num_runs: int\n        num_runs is used to report the approximation of Inter-List Diversity over multiple runs on smaller\n        samples of users, default=10, for a speed-up on evaluations. The sampling size is defined by\n        user_sample_size. The final result is averaged over the multiple runs.\n    n_jobs: int\n        Number of jobs to use for computation in parallel, leveraged by sklearn.metrics.pairwise_distances_chunked.\n        -1 means using all processors. Default=1.\n    working_memory: Union[int, None]\n        Maximum memory for temporary distance matrix chunks, leveraged by sklearn.metrics.pairwise_distances_chunked.\n        When None (default), the value of sklearn.get_config()['working_memory'], i.e. 1024M, is used.\n    **kwargs\n        Other parameters passed to ``sns.catplot``.\n\n    Returns\n    -------\n    ax : matplotlib.axes.Axes\n        The plot with metric values.\n    \"\"\"\n\n    if not isinstance(recommendation_results, list):\n        recommendation_results_list = [recommendation_results]\n    else:\n        recommendation_results_list = recommendation_results\n\n    # Calculate metrics\n    out = []\n    for recommendation_results in recommendation_results_list:\n        for algo_name, rec_df in recommendation_results.items():\n            for k in k_list:\n                metric = DiversityRecoMetrics.InterListDiversity(click_column=score_col, k=k,\n                                                                 user_id_column=user_id_col,\n                                                                 item_id_column=item_id_col,\n                                                                 user_sample_size=sample_size,\n                                                                 seed=seed,\n                                                                 num_runs=num_runs,\n                                                                 n_jobs=n_jobs,\n                                                                 working_memory=working_memory)\n                inter_list_diversity = metric.get_score(rec_df, rec_df)\n                d = {'algorithm': algo_name,\n                     'metric_name': 'Inter-list Diversity',\n                     'k': k,\n                     'value': inter_list_diversity}\n                out.append(d)\n    df = pd.DataFrame(out)\n\n    # Plot\n    ax = sns.catplot(x='k', y='value', col='metric_name', hue='algorithm', data=df, kind='point',\n                     sharey=False, **kwargs)\n\n    return ax\n\n\ndef plot_intra_diversity_at_k(recommendation_results: Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]],\n                              item_features: pd.DataFrame, k_list: List[int], user_id_col: str = Constants.user_id,\n                              item_id_col: str = Constants.item_id, score_col: str = Constants.score,\n                              sample_size: float = None,  seed: int = Constants.default_seed, n_jobs: int = 1,\n                              num_runs: int = 10, **kwargs):\n    \"\"\"\n    Plots recommendation metric values (y-axis) for different values of k (x-axis)\n    for each of the benchmark algorithms.\n\n    Parameters\n    ----------\n    recommendation_results : Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]]\n        Dictionary or list of dictionaries with recommendation results returned by benchmark function.\n    item_features : pd.DataFrame\n        Data frame with features for each item_id.\n    k_list : List[int]\n        List of top-k values to evaluate.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    score_col: str, default=Constants.score\n        Recommendation score column name.\n    sample_size: float, default=None\n        Proportion of users to randomly sample for evaluation.\n        If None, no sampling is performed.\n    seed : int, default=Constants.default_seed\n        The seed used to create random state.\n    num_runs: int\n        num_runs is used to report the approximation of Intra-List Diversity over multiple runs on smaller\n        samples of users, default=10, for a speed-up on evaluations. The sampling size is defined by\n        user_sample_size. The final result is averaged over the multiple runs.\n    n_jobs: int\n        Number of jobs to use for computation in parallel, leveraged by sklearn.metrics.pairwise_distances.\n        -1 means using all processors. Default=1.\n    **kwargs\n        Other parameters passed to ``sns.catplot``.\n\n    Returns\n    -------\n    ax : matplotlib.axes.Axes\n        The plot with metric values.\n    \"\"\"\n\n    if not isinstance(recommendation_results, list):\n        recommendation_results_list = [recommendation_results]\n    else:\n        recommendation_results_list = recommendation_results\n\n    # Calculate metrics\n    out = []\n    for recommendation_results in recommendation_results_list:\n        for algo_name, rec_df in recommendation_results.items():\n            for k in k_list:\n                metric = DiversityRecoMetrics.IntraListDiversity(item_features, click_column=score_col, k=k,\n                                                                 user_id_column=user_id_col,\n                                                                 item_id_column=item_id_col,\n                                                                 user_sample_size=sample_size,\n                                                                 seed=seed,\n                                                                 num_runs=num_runs,\n                                                                 n_jobs=n_jobs)\n                intra_list_diversity = metric.get_score(rec_df, rec_df)\n\n                d = {'algorithm': algo_name,\n                     'metric_name': 'Intra-list Diversity',\n                     'k': k,\n                     'value': intra_list_diversity}\n                out.append(d)\n    df = pd.DataFrame(out)\n\n    # Plot\n    ax = sns.catplot(x='k', y='value', col='metric_name', hue='algorithm', data=df, kind='point',\n                     sharey=False, **kwargs)\n\n    return ax\n\n\ndef plot_recommended_counts(recommendation_results: Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]],\n                            actual_results: pd.DataFrame, k: int, average_response: bool = False,\n                            user_id_col: str = Constants.user_id, item_id_col: str = Constants.item_id,\n                            response_col: str = Constants.response, **kwargs):\n    \"\"\"\n    Plots recommendation counts (y-axis) versus actual counts or average responses (x-axis) for each item.\n\n    Parameters\n    ----------\n    recommendation_results : Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]]\n        Dictionary or list of dictionaries with recommendation results returned by benchmark function.\n    actual_results : pd.DataFrame\n        Test data frame used to generate recommendations.\n        Data should have a row for each sample (user_id, item_id, response).\n    k : int\n        Top-k recommendations to evaluate.\n    average_response : bool, default=False\n        Whether to plot the average response/reward or not.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    response_col : str, default=Constants.response\n        Response column name.\n    **kwargs\n        Other parameters passed to ``sns.relplot``.\n\n    Returns\n    -------\n    ax : matplotlib.axes.Axes\n        The plot with recommended counts.\n    \"\"\"\n\n    # Concatenate recommendation results from different cv-folds\n    if isinstance(recommendation_results, list):\n        recommendation_results = concat_recommendations_list(recommendation_results)\n\n    # Actual\n    if average_response:\n        actual_counts = actual_results.groupby(item_id_col)[response_col].mean()\n    else:\n        actual_counts = actual_results.groupby(item_id_col).size()\n\n    # Recommended\n    out = []\n    for algo_name, rec_df in recommendation_results.items():\n        rec_sorted_df = rec_df.sort_values(Constants.score, ascending=False).groupby(user_id_col).head(k)\n        rec_counts = rec_sorted_df.groupby(item_id_col).size()\n\n        for item_id in rec_counts.index:\n\n            if item_id in actual_counts.index:\n                a_value = actual_counts[item_id]\n            else:\n                a_value = 0\n\n            out.append({'algorithm': algo_name,\n                        'item_id': item_id,\n                        'actual': a_value,\n                        'recommended': rec_counts[item_id]})\n    df = pd.DataFrame(out)\n\n    # Plot\n    g = sns.relplot(x='actual', y='recommended', col='algorithm', data=df, **kwargs)\n    if not average_response:\n        xy_max = max(df['actual'].max(), df['recommended'].max())\n        for ax in g.axes.flat:\n            ax.plot([0, xy_max], [0, xy_max], color=\"darkred\", linestyle=\"--\", alpha=0.5)\n    return g\n\n\ndef plot_recommended_counts_by_item(recommendation_results: Union[Dict[str, pd.DataFrame],\n                                                                  List[Dict[str, pd.DataFrame]]],\n                                    k: int, top_n_items: int = None, normalize: bool = False,\n                                    user_id_col: str = Constants.user_id, item_id_col: str = Constants.item_id,\n                                    **kwargs):\n    \"\"\"\n    Plots recommendation counts (y-axis) for different items (x-axis) for each of the benchmark algorithms. Only the\n    top_n_items with the most recommendations for each algorithm are shown.\n\n    Parameters\n    ----------\n    recommendation_results : Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]]\n        Dictionary or list of dictionaries with recommendation results returned by benchmark function.\n    k : int\n        Top-k recommendations to evaluate.\n    top_n_items : int, default=None\n        Top-n number of items based on number of recommendations to plot.\n    normalize : bool, default=False\n        Whether to normalize the counts per item to be proportions such that they add to 1.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    **kwargs\n        Other parameters passed to ``sns.catplot``.\n\n    Returns\n    -------\n    ax : matplotlib.axes.Axes\n        The plot with recommended counts by item.\n    \"\"\"\n\n    # Concatenate recommendation results from different cv-folds\n    if isinstance(recommendation_results, list):\n        recommendation_results = concat_recommendations_list(recommendation_results)\n\n    # Calculate metrics\n    out = []\n    for algo_name, rec_df in recommendation_results.items():\n\n        rec_sorted_df = rec_df.sort_values(Constants.score, ascending=False).groupby(user_id_col).head(k)\n        rec_counts = rec_sorted_df[item_id_col].value_counts(normalize=normalize)\n\n        rank = 0\n        for item_id, value in rec_counts.items():\n            out.append({'algorithm': algo_name,\n                        'k': k,\n                        'item_id': item_id,\n                        'rank': rank,\n                        'value': value})\n            rank += 1\n\n    df = pd.DataFrame(out)\n    if top_n_items is not None:\n        df = df[df['rank'] < top_n_items]\n    df.drop(columns='rank', inplace=True)\n\n    ax = sns.catplot(x='item_id', y='value', col='algorithm', data=df, kind='bar', color='grey', **kwargs)\n    ax.set_xticklabels([])\n\n    return ax\n\n\ndef plot_num_items_per_recommendation(recommendation_results: Union[Dict[str, pd.DataFrame],\n                                                                    List[Dict[str, pd.DataFrame]]],\n                                      actual_results: pd.DataFrame, normalize: bool = False,\n                                      user_id_col: str = Constants.user_id, **kwargs):\n    \"\"\"\n    Plots recommendation counts (y-axis) versus actual counts or average responses (x-axis) for each item.\n\n    Parameters\n    ----------\n    recommendation_results : Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]]\n        Dictionary or list of dictionaries with recommendation results returned by benchmark function.\n    actual_results : pd.DataFrame\n        Test data frame used to generate recommendations.\n        Data should have a row for each sample (user_id, item_id, response).\n    normalize : bool, default=False\n        Whether to normalize the number of items to be proportions such that they add to 1.\n    user_id_col: str\n        User id column name.\n        Default value is set to Constants.user_id\n    **kwargs\n        Other parameters passed to ``sns.catplot``.\n\n    Returns\n    -------\n    ax : matplotlib.axes.Axes\n        The plot with counts or proportions for\n        different number of items per recommendation.\n    \"\"\"\n\n    # Concatenate recommendation results from different cv-folds\n    if isinstance(recommendation_results, list):\n        recommendation_results = concat_recommendations_list(recommendation_results)\n\n    # Distinct users in actual results\n    users_df = pd.DataFrame(actual_results[user_id_col].unique(), columns=[user_id_col])\n\n    out = []\n    for algo_name, rec_df in recommendation_results.items():\n\n        # Merge recommendations for each user\n        df = users_df.merge(rec_df, on=user_id_col, how='left')\n\n        # Calculate distribution of number of items per recommendation\n        users_per_num_item = pd.value_counts(df.groupby(user_id_col).size(), normalize=normalize)\n        for num_items, value in users_per_num_item.items():\n            out.append({'algorithm': algo_name,\n                        'k': num_items,\n                        'value': value})\n    df = pd.DataFrame(out)\n\n    # Plot\n    ax = sns.catplot(x='k', y='value', col='algorithm', data=df, kind='bar', color='grey', **kwargs)\n\n    return ax\n\n\ndef plot_personalization_heatmap(recommendation_results: Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]],\n                                 user_to_cluster: Dict[Union[int, str], int], k: int,\n                                 user_id_col: str = Constants.user_id, item_id_col: str = Constants.item_id,\n                                 figsize: Tuple[int, int] = None, **kwargs):\n    \"\"\"\n    Plot heatmaps to visualize level of personalization, by calculating the distribution of recommendations\n    by item within different user clusters.\n\n    Parameters\n    ----------\n    recommendation_results : Union[Dict[str, pd.DataFrame], List[Dict[str, pd.DataFrame]]]\n        Dictionary or list of dictionaries with recommendation results returned by benchmark function.\n    user_to_cluster : Dict[Union[int, str], int]\n        Mapping from user_id to cluster.\n        Clusters could be derived from clustering algorithm such as KMeans or\n        defined based on specific user features (e.g. age bands)\n    k : int\n        Top-k recommendations to evaluate.\n    user_id_col : str, default=Constants.user_id\n        User id column name.\n    item_id_col : str, default=Constants.item_id\n        Item id column name.\n    figsize: Tuple[int, int], default=None\n        Figure size of heatmap set using plt.figure()\n    **kwargs\n        Other parameters passed to ``sns.catplot``.\n\n    Returns\n    -------\n    ax : matplotlib.axes.Axes\n        The plot with counts or proportions for\n        different number of items per recommendation.\n    \"\"\"\n\n    # Concatenate recommendation results from different cv-folds\n    if isinstance(recommendation_results, list):\n        recommendation_results = concat_recommendations_list(recommendation_results)\n\n    axes = dict()\n    for algo_name, rec_df in recommendation_results.items():\n\n        rec_sorted_df = rec_df.sort_values(Constants.score, ascending=False).groupby(user_id_col).head(k)\n        rec_sorted_df['cluster'] = rec_sorted_df[user_id_col].map(user_to_cluster)\n\n        # Calculate percentage of recommendations by item within each cluster\n        df = rec_sorted_df.groupby(['cluster', item_id_col]).size()\n        df = df.groupby(level=0, group_keys=False).apply(lambda x: x / float(x.sum())).reset_index()\n        df = df.pivot(index=item_id_col, columns='cluster').fillna(0)\n        df.columns = df.columns.droplevel()\n        df.sort_index(inplace=True)\n\n        # Plot\n        if figsize is not None:\n            plt.figure(figsize=figsize)\n        ax = sns.heatmap(df, **kwargs)\n        ax.set_title(algo_name)\n        ax.set_yticklabels([])\n        plt.show()\n        axes[algo_name] = ax\n\n    return axes\n"
  },
  {
    "path": "requirements.txt",
    "content": "numpy>=1.20.2\npandas>=1.1.0\nscikit-learn>=0.24.0\nscipy\nmatplotlib\nseaborn>=0.1.0\nmabwiser>=2.7.4\njurity>=1.3.2"
  },
  {
    "path": "scripts/data_prep/concat_files.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -eq 1 ]\nthen\n\techo \"Usage: `basename $0` <input_file_1> <input_file_2> ... \"\n\techo \"Description:\"\n\techo -e \"\\t Take multiple input files\"\n\techo -e \"\\t Concatenate the header from first file and concatenate files\"\n\techo -e \"\\t Return concatenated output file\"\n\techo -e \"\\t Assumption: Each file matching pattern has same header and structure\"\n\techo -e \"\\t Example run: ./`basename $0` responses_train.csv responses_test.csv > responses.csv\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\n\necho \">>> START $input\"\necho -e \"\\t Concatenate files\"\n\nfiles=($input)\n{ zcat files[1] | head -1 && \\\n    find $input -exec sh -c \"zcat -q -c {} | tail -n +2 -\" \\;\n      } | gzip - > $output\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "scripts/data_prep/concat_first_two_columns.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -ne 2 ]\nthen\n\techo \"Usage: `basename $0` <input.csv> <output.csv>\"\n\techo \"Description:\"\n\techo -e \"\\t Take an input csv file\"\n\techo -e \"\\t Concatenate the first two columns using an underscore \"\\_\" in between\"\n\techo -e \"\\t Return the output csv\"\n\techo -e \"\\t For example \\\"ip, event_date\\\" becomes \\\"ip_event_date\\ which serves as user_id\"\n\techo -e \"\\t Assumption: csv is comma (,) separated\"\n\techo -e \"\\t Example run: ./`basename $0` train.csv train_user_id.csv\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\n\necho \">>> START $input\"\necho -e \"\\t Concatenate first two columns\"\n\n# Replace the first occurence of \",\" in every row\n# Effectively, this ends up concataneting first two columns of a csv\nsed 's/,/_/' $input > $output\n\n# More programmatically\n# awk -F, '{print $1 \"_\" $2}' $input > $output\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "scripts/data_prep/insert_header.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -ne 3 ]\nthen\n\techo \"Usage: `basename $0` <input.csv> <output.csv> <new_header>\"\n\techo \"Description:\"\n\techo -e \"\\t Take an input csv file\"\n\techo -e \"\\t Insert the given header to the first line\"\n\techo -e \"\\t Return the output csv\"\n\techo -e \"\\t For example \\\"ip,event_date,tcm_id,response\\\" can be inserted to the first row\"\n\techo -e \"\\t Example run: ./`basename $0` headless.csv ip,event_date,content_id,response\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\nheader=$3\n\necho \">>> START $input\"\necho -e \"\\t Insert header $header\"\n\nsed \"1i $header\" $input > $output\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "scripts/data_prep/remove_columns.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -lt 3 ]\nthen\n\techo \"Usage: `basename $0` <input.csv> <output.csv> <column_index_1> [column_index_2] [column_index_3]\"\n\techo \"Description:\"\n\techo -e \"\\t Take an input csv file and at least 1 column index to drop\"\n\techo -e \"\\t Drop the given column\"\n\techo -e \"\\t Return the filtered output csv file\"\n\techo -e \"\\t Optionally, you can drop multiple columns, 2 or 3 columns\"\n\techo -e \"\\t Assumption: csv is comma (,) separated\"\n\techo -e \"\\t Assumption: indexing starts from 1\"\n\techo -e \"\\t Example run: ./`basename $0` train.csv train_without_ip_event_date.csv 1 2 (e.g., 1=ip and 2=event_date)\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\n\necho \">>> START $input\"\n\nif [ $# -eq 3 ]\nthen\n\tcolumn1=$3\n\n\t# Sort the data\n\techo -e \"\\t Drop column $column1\"\n\tcut --complement -d , -f $column1 $input > $output\nfi\n\n# Sort based on two columns\nif [ $# -eq 4 ]\nthen\n\tcolumn1=$3\n\tcolumn2=$4\n\n\t# Sort the data\n\techo -e \"\\t Drop columns: $column1 and $column2\"\n\tcut --complement -d , -f $column1,$column2 $input > $output\nfi\n\n# Sort based on three columns\nif [ $# -eq 5 ]\nthen\n\tcolumn1=$3\n\tcolumn2=$4\n\tcolumn3=$5\n\n\t# Sort the data\n\techo -e \"\\t Drop columns: $column1 and $column2 and $column3\"\n\tcut --complement -d , -f $column1,$column2,$column3 $input > $output\nfi\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "scripts/data_prep/remove_duplicate_lines.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -lt 2 ]\nthen\n\techo \"Usage: `basename $0` <input.csv> <output.csv> [column_index_1] [column_index_2] [column_index_3]\"\n\techo \"Description:\"\n\techo -e \"\\t Take an input csv file\"\n\techo -e \"\\t Removes duplicate lines. The entire line is treated as a string.\"\n\techo -e \"\\t Return the output csv\"\n\techo -e \"\\t Optionally, it can drop lines based on duplicate columns.\"\n\techo -e \"\\t Columns are treated as a string, and lines are dropped for repeated column values\"\n\techo -e \"\\t NOTICE: When column option is used, sorting is applied so the row order might change!\"\n\techo -e \"\\t NOTICE: That means, if you have a header, the header line will change its position!!!\"\n\techo -e \"\\t One can specificy 1, 2, or 3 columns\"\n\techo -e \"\\t Example run: ./`basename $0` train.csv train_no_duplicate.csv\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\n\necho \">>> START $input\"\necho -e \"\\t Remove duplicates.\"\n\nif [ $# -eq 2 ]\nthen\n\techo -e \"\\t Remove duplicates lines. The entire line is treated as a string.\"\n\tuniq $input > $output\nfi\n\nif [ $# -eq 3 ]\nthen\n\tcolumn1=$3\n\n\t# Sort the data\n\techo -e \"\\t Drop duplicates in column $column1\"\n\tsort -u -t, -k$column1,$column1 $input > $output\nfi\n\n# Remove duplicates based on two columns\nif [ $# -eq 4 ]\nthen\n\tcolumn1=$3\n\tcolumn2=$4\n\n\techo -e \"\\t Drop duplicates in columns: $column1 and $column2\"\n\tsort -u -t, -k$column1,$column1 -k$column2,$column2 $input > $output\nfi\n\n# Remove duplicates based on three columns\nif [ $# -eq 5 ]\nthen\n\tcolumn1=$3\n\tcolumn2=$4\n\tcolumn3=$5\n\n\techo -e \"\\t Drop duplicates in columns: $column1 and $column2 and $column3\"\n\tsort -u -t, -k$column1,$column1 -k$column2,$column2 -k$column3,$column3 $input > $output\nfi\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "scripts/data_prep/remove_empty_lines.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -ne 2 ]\nthen\n\techo \"Usage: `basename $0` <input.csv> <output.csv>\"\n\techo \"Description:\"\n\techo -e \"\\t Take an input csv file\"\n\techo -e \"\\t Remove the empty lines\"\n\techo -e \"\\t Return the output csv\"\n\techo -e \"\\t Example run: ./`basename $0` train.csv train_no_empty.csv\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\n\necho \">>> START $input\"\necho -e \"\\t Remove empty lines\"\n\nsed \"/^$/d\" $input > $output\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "scripts/data_prep/remove_header.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -ne 2 ]\nthen\n\techo \"Usage: `basename $0` <input.csv> <output.csv>\"\n\techo \"Description:\"\n\techo -e \"\\t Take an input csv file\"\n\techo -e \"\\t Remove the first line/header\"\n\techo -e \"\\t Return the output csv\"\n\techo -e \"\\t Example run: ./`basename $0` input.csv headless.csv\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\n\necho \">>> START $input\"\necho -e \"\\t Remove header\"\n\nsed \"1d\" $input > $output\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "scripts/data_prep/rename_header.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -ne 3 ]\nthen\n\techo \"Usage: `basename $0` <input.csv> <output.csv> <new_header>\"\n\techo \"Description:\"\n\techo -e \"\\t Take an input csv file\"\n\techo -e \"\\t Replace its header with the given header\"\n\techo -e \"\\t Return the output csv\"\n\techo -e \"\\t For example \\\"ip_event_date,tcm_id,response\\\" becomes \\\"user_id,content_id,response\\\"\"\n\techo -e \"\\t This is useful as mab2rec input\"\n\techo -e \"\\t Example run: ./`basename $0` train.csv train_mab2rec.csv user_id,content_id,response\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\nheader=$3\n\necho \">>> START $input\"\necho -e \"\\t Replace the header with $header\"\n\nsed \"1c $header\" $input > $output\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "scripts/data_prep/sort_except_header.sh",
    "content": "#!/bin/bash\n\nE_BADARGS=65\nif [ $# -lt 3 ]\nthen\n\techo \"Usage: `basename $0` <input.csv> <output.csv> <column_index_1> [column_index_2] [column_index_3]\"\n\techo \"Description:\"\n\techo -e \"\\t Take an input csv file and at least 1 column index to sort\"\n\techo -e \"\\t Sort the input based on the given column index\"\n\techo -e \"\\t Return the sorted output csv file\"\n\techo -e \"\\t Optionally, you can sort using multiple columns, 2 or 3 columns\"\n\techo -e \"\\t Assumption: indexing starts from 1\"\n\techo -e \"\\t Assumption: input csv has a header row\"\n\techo -e \"\\t Assumption: sorting is string sort, not numerical! For example: 1 and 10 will come before 2\"\n\t\techo -e \"\\t Sorting respects the header row. Header is not part of sorting\"\n\techo -e \"\\t Example run: ./`basename $0` train.csv train_sorted.csv 1 2 (e.g., 1=ip and 2=event_date)\"\n\texit $E_BADARGS\nfi\n\ninput=$1\noutput=$2\n\necho \">>> START $input\"\necho -e \"\\t Separate the header from the rest\"\n\n# Header of the data\nhead -n 1 $input > $input\\.header\n\n# Rest of the data\nsed '1d' $input > $input\\.headless\n\n# Sort based on a single column\nif [ $# -eq 3 ]\nthen\n\tcolumn1=$3\n\n\t# Sort the data\n\techo -e \"\\t Sort based on column $column1\"\n\tsort -t ',' -k$column1,$column1 -o $input\\.sorted $input\\.headless\nfi\n\n# Sort based on two columns\nif [ $# -eq 4 ]\nthen\n\tcolumn1=$3\n\tcolumn2=$4\n\n\t# Sort the data\n\techo -e \"\\t Sort based on columns: $column1 and $column2\"\n\tsort -t ',' -k$column1,$column1 -k$column2,$column2 -o $input\\.sorted $input\\.headless\nfi\n\n# Sort based on three columns\nif [ $# -eq 5 ]\nthen\n\tcolumn1=$3\n\tcolumn2=$4\n\tcolumn3=$5\n\n\t# Sort the data\n\techo -e \"\\t Sort based on columns: $column1 and $column2 and $column3\"\n\tsort -t ',' -k$column1,$column1 -k$column2,$column2 -k$column3,$column3 -o $input\\.sorted $input\\.headless\nfi\n\n# It is possible to do this in one line\n# But the above is more explicit\n# (head -n 2 input.csv && tail -n +3 input.csv  | sort) > output.csv\n\n# Reunite sorted data with the header\necho -e \"\\t Combine the header and sorted data together\"\ncat $input\\.header $input\\.sorted > $output\n\n# Remove temp files\necho -e \"\\t Remove temporary files\"\nrm $input\\.header $input\\.headless $input\\.sorted\n\necho \"<<< FINISH $output\"\n"
  },
  {
    "path": "setup.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\n\nimport setuptools\n\nwith open(\"README.md\", \"r\") as fh:\n    long_description = fh.read()\n\nwith open(\"requirements.txt\") as fh:\n    required = fh.read().splitlines()\n\nwith open(os.path.join('mab2rec', '_version.py')) as fp:\n    exec(fp.read())\n\nsetuptools.setup(\n    name=\"mab2rec\",\n    description=\"Mab2Rec: Multi-Armed Bandits Recommender\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    version=__version__,\n    author=__author__,\n    url=\"\",\n    packages=setuptools.find_packages(exclude=[\"*.tests\", \"*.tests.*\", \"tests.*\", \"tests\"]),\n    install_requires=required,\n    python_requires=\">=3.8\",\n    classifiers=[\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Operating System :: OS Independent\",\n    ],\n    project_urls={\n        \"Source\": \"https://github.com/fidelity/mab2rec\"\n    }\n)\n"
  },
  {
    "path": "tests/__init__.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n"
  },
  {
    "path": "tests/run_all.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nimport unittest\n\n# Test Directory\nstart_dir = '.'\n\n# Test Loader\nloader = unittest.TestLoader()\n\n# Test Suite\nsuite = loader.discover(start_dir)\n\n# Test Runner\nrunner = unittest.TextTestRunner()\n\n# Run the Suite\nrunner.run(suite)\n"
  },
  {
    "path": "tests/test_base.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nimport unittest\nfrom typing import Dict, List, Union, Optional\n\nimport pandas as pd\nimport numpy as np\nfrom mabwiser.utils import Arm, Num\n\nfrom mab2rec import BanditRecommender, LearningPolicy, NeighborhoodPolicy\n\n\nclass BaseTest(unittest.TestCase):\n\n    # A list of valid learning policies\n    lps = [LearningPolicy.EpsilonGreedy(),\n           LearningPolicy.EpsilonGreedy(epsilon=0),\n           LearningPolicy.EpsilonGreedy(epsilon=0.0),\n           LearningPolicy.EpsilonGreedy(epsilon=0.5),\n           LearningPolicy.EpsilonGreedy(epsilon=1),\n           LearningPolicy.EpsilonGreedy(epsilon=1.0),\n           LearningPolicy.Popularity(),\n           LearningPolicy.Random(),\n           LearningPolicy.Softmax(),\n           LearningPolicy.Softmax(tau=0.1),\n           LearningPolicy.Softmax(tau=0.5),\n           LearningPolicy.Softmax(tau=1),\n           LearningPolicy.Softmax(tau=1.0),\n           LearningPolicy.Softmax(tau=5.0),\n           LearningPolicy.ThompsonSampling(),\n           LearningPolicy.UCB1(),\n           LearningPolicy.UCB1(alpha=0),\n           LearningPolicy.UCB1(alpha=0.0),\n           LearningPolicy.UCB1(alpha=0.5),\n           LearningPolicy.UCB1(alpha=1),\n           LearningPolicy.UCB1(alpha=1.0),\n           LearningPolicy.UCB1(alpha=5)]\n\n    para_lps = [LearningPolicy.LinGreedy(epsilon=0, l2_lambda=1),\n                LearningPolicy.LinGreedy(epsilon=0.5, l2_lambda=1),\n                LearningPolicy.LinGreedy(epsilon=1, l2_lambda=1),\n                LearningPolicy.LinGreedy(epsilon=0, l2_lambda=0.5),\n                LearningPolicy.LinGreedy(epsilon=0.5, l2_lambda=0.5),\n                LearningPolicy.LinGreedy(epsilon=1, l2_lambda=0.5),\n                LearningPolicy.LinTS(alpha=0.00001, l2_lambda=1),\n                LearningPolicy.LinTS(alpha=0.5, l2_lambda=1),\n                LearningPolicy.LinTS(alpha=1, l2_lambda=1),\n                LearningPolicy.LinTS(alpha=0.00001, l2_lambda=0.5),\n                LearningPolicy.LinTS(alpha=0.5, l2_lambda=0.5),\n                LearningPolicy.LinTS(alpha=1, l2_lambda=0.5),\n                LearningPolicy.LinUCB(alpha=0, l2_lambda=1),\n                LearningPolicy.LinUCB(alpha=0.5, l2_lambda=1),\n                LearningPolicy.LinUCB(alpha=1, l2_lambda=1),\n                LearningPolicy.LinUCB(alpha=0, l2_lambda=0.5),\n                LearningPolicy.LinUCB(alpha=0.5, l2_lambda=0.5),\n                LearningPolicy.LinUCB(alpha=1, l2_lambda=0.5)]\n\n    # A list of valid context policies\n    nps = [NeighborhoodPolicy.LSHNearest(),\n           NeighborhoodPolicy.LSHNearest(n_dimensions=1),\n           NeighborhoodPolicy.KNearest(),\n           NeighborhoodPolicy.KNearest(k=3),\n           NeighborhoodPolicy.Radius(),\n           NeighborhoodPolicy.TreeBandit(),\n           NeighborhoodPolicy.Clusters(),\n           NeighborhoodPolicy.Clusters(n_clusters=3),\n           NeighborhoodPolicy.Clusters(is_minibatch=True),\n           NeighborhoodPolicy.Clusters(n_clusters=3, is_minibatch=True)]\n\n    @staticmethod\n    def predict(arms: List[Arm],\n                decisions: Union[List, np.ndarray, pd.Series],\n                rewards: Union[List, np.ndarray, pd.Series],\n                learning_policy: Union[LearningPolicy.EpsilonGreedy, LearningPolicy.Popularity, LearningPolicy.Random,\n                                       LearningPolicy.Softmax, LearningPolicy.ThompsonSampling, LearningPolicy.UCB1,\n                                       LearningPolicy.LinGreedy, LearningPolicy.LinTS, LearningPolicy.LinUCB],\n                neighborhood_policy: Union[None, NeighborhoodPolicy.Clusters, NeighborhoodPolicy.KNearest,\n                                           NeighborhoodPolicy.LSHNearest, NeighborhoodPolicy.Radius,\n                                           NeighborhoodPolicy.TreeBandit] = None,\n                context_history: Union[None, List[Num], List[List[Num]], np.ndarray, pd.DataFrame, pd.Series] = None,\n                contexts: Union[None, List[Num], List[List[Num]], np.ndarray, pd.DataFrame, pd.Series] = None,\n                apply_sigmoid: bool = True,\n                excluded_arms: List[List[Arm]] = None,\n                warm_start: bool = False,\n                arm_to_features: Dict[Arm, List[Num]] = None,\n                top_k: Optional[int] = 5,\n                seed: Optional[int] = 123456,\n                n_jobs: Optional[int] = 1,\n                backend: Optional[str] = None):\n        \"\"\"Sets up a Bandit Recommender and runs the given configuration.\n        \"\"\"\n\n        # Model\n        rec = BanditRecommender(learning_policy, neighborhood_policy, top_k, seed, n_jobs, backend)\n\n        # Initialize and train\n        rec._init(arms)\n        rec.fit(decisions, rewards, context_history)\n\n        # Warm-start\n        if warm_start:\n            rec.warm_start(arm_to_features, distance_quantile=0.5)\n\n        # Run\n        recommendations = rec.recommend(contexts, excluded_arms, return_scores=True, apply_sigmoid=apply_sigmoid)\n\n        return recommendations, rec\n\n    def assertListAlmostEqual(self, list1, list2):\n        \"\"\"\n        Asserts that floating values in the given lists (almost) equals to each other\n        \"\"\"\n        if not isinstance(list1, list):\n            list1 = list(list1)\n\n        if not isinstance(list2, list):\n            list2 = list(list2)\n\n        self.assertEqual(len(list1), len(list2))\n\n        for index, val in enumerate(list1):\n            self.assertAlmostEqual(val, list2[index])\n\n    @staticmethod\n    def is_compatible(lp, np):\n\n        # Special case for TreeBandit lp/np compatibility\n        if isinstance(np, NeighborhoodPolicy.TreeBandit):\n            return np._is_compatible(lp)\n\n        return True\n"
  },
  {
    "path": "tests/test_invalid.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nimport unittest\n\nimport pandas as pd\n\nfrom mab2rec import BanditRecommender, LearningPolicy, NeighborhoodPolicy\nfrom mab2rec.pipeline import train, score, benchmark\nfrom mab2rec.utils import Constants, default_metrics, load_item_features, load_data_frame, load_list\n\nTEST_DIR = os.path.dirname(os.path.abspath(__file__))\nROOT_DIR = TEST_DIR + os.sep + \"..\" + os.sep\n\n# Data files\ntrain_data = os.path.join(ROOT_DIR, \"data\", \"data_train.csv\")\ntest_data = os.path.join(ROOT_DIR, \"data\", \"data_test.csv\")\nuser_features = os.path.join(ROOT_DIR, \"data\", \"features_user.csv\")\nitem_features = os.path.join(ROOT_DIR, \"data\", \"features_item.csv\")\n\n# Evaluation metrics\nmetrics = default_metrics([3, 5, 10])\n\n\nclass InvalidTest(unittest.TestCase):\n\n    # =====================\n    # BanditRecommender\n    # =====================\n\n    def test_invalid_learning_policy(self):\n        with self.assertRaises(TypeError):\n            BanditRecommender(NeighborhoodPolicy.Radius(radius=12))\n\n    def test_invalid_neighborhood_policy(self):\n        with self.assertRaises(TypeError):\n            BanditRecommender(LearningPolicy.EpsilonGreedy(), LearningPolicy.Softmax())\n\n    def test_invalid_init_arms_int(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init(1)\n\n    def test_invalid_init_arms_tuple(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init(1, 2)\n\n    def test_invalid_add_arm_value(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init([1, 2])\n            rec.add_arm(1)\n\n    def test_invalid_remove_arm_value(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init([1, 2])\n            rec.remove_arm(3)\n\n    def test_invalid_remove_arm_no_init(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec.remove_arm(3)\n\n    def test_invalid_set_arms(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec.set_arms(None)\n\n    def test_invalid_partial_fit(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec.partial_fit([1, 1, 2, 2], [0, 1, 1, 1])\n\n    def test_invalid_partial_fit_with_init(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init([1, 2])\n            rec.partial_fit([1, 1, 2, 2], [0, 1, 1, 1])\n\n    def test_invalid_predict_not_fit(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init([1, 2])\n            _ = rec.predict()\n\n    def test_invalid_predict_expectations_not_fit(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init([1, 2])\n            _ = rec.predict_expectations()\n\n    def test_invalid_recommend_not_fit(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy(), top_k=2)\n            rec._init([1, 2])\n            _ = rec.recommend()\n\n    def test_invalid_recommend_no_contexts(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB(), top_k=2)\n            rec.fit([1, 1, 2, 2], [0, 1, 1, 1], [[0, 1, 2], [3, 1, 2], [0, 3, 1], [2, 1, 1]])\n            _ = rec.recommend()\n\n    def test_invalid_recommend_excluded_arms(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB(), top_k=2)\n            rec.fit([1, 1, 2, 2], [0, 1, 1, 1], [[0, 1, 2], [3, 1, 2], [0, 3, 1], [2, 1, 1]])\n            _ = rec.recommend(excluded_arms=[[1], [1]])\n\n    def test_invalid_recommend_excluded_arms_dim(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB(), top_k=2)\n            rec.fit([1, 1, 2, 2], [0, 1, 1, 1], [[0, 1, 2], [3, 1, 2], [0, 3, 1], [2, 1, 1]])\n            _ = rec.recommend(contexts=[[0, 1, 2]], excluded_arms=[[1], [1]])\n\n    def test_invalid_warm_start_not_fit(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            rec._init([1, 2, 3])\n            rec.warm_start(arm_to_features={1: [0.5, 0.5], 2: [1, 0.5], 3: [1, 0]}, distance_quantile=0.5)\n\n    def test_invalid_warm_start_missing_arm(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init([1, 2, 3])\n            rec.fit([1, 1, 2, 2, 3], [0, 1, 1, 1, 0])\n            rec.warm_start(arm_to_features={1: [0.5, 0.5], 2: [1, 0.5]}, distance_quantile=0.5)\n\n    def test_invalid_warm_start_unknown_arm(self):\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init([1, 2, 3])\n            rec.fit([1, 1, 2, 2, 3], [0, 1, 1, 1, 0])\n            rec.warm_start(arm_to_features={1: [0.5, 0.5], 2: [1, 0.5], 3: [1, 0], 4: [0, 1]}, distance_quantile=0.5)\n\n    def test_invalid_warm_start_distance(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            rec._init([1, 2, 3])\n            rec.fit([1, 1, 2, 2, 3], [0, 1, 1, 1, 0])\n            rec.warm_start(arm_to_features={1: [0.5, 0.5], 2: [1, 0.5], 3: [1, 0]}, distance_quantile=50)\n\n    # =====================\n    # Train\n    # =====================\n    \n    def test_train_invalid_recommender(self):\n        with self.assertRaises(TypeError):\n            rec = LearningPolicy.LinUCB()\n            train(rec, train_data, user_features)\n    \n    def test_train_invalid_data(self):\n        data = pd.read_csv(train_data)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            train(rec, data.values)\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            train(rec, data.rename(columns={Constants.user_id: \"user\"}))\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            train(rec, data.rename(columns={Constants.item_id: \"item\"}))\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            train(rec, data.rename(columns={Constants.item_id: \"click\"}))\n   \n    def test_train_invalid_user_features(self):\n        user_features_df = pd.read_csv(user_features)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features_df.values)\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features_df.rename(columns={Constants.user_id: \"user\"}))\n\n    def test_train_invalid_user_features_list(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, user_features_list=pd.Series([\"u1\", \"u2\"]))\n    \n    def test_train_invalid_user_features_dtypes(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, user_features_dtypes=[\"int8\", \"int8\"])\n    \n    def test_train_invalid_item_features(self):\n        item_features_df = pd.read_csv(item_features)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, item_features=item_features_df.values)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, item_features=list(item_features_df))\n    \n    def test_train_invalid_item_list(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, item_list=pd.Series([\"235\", \"313\", \"433\"]))\n    \n    def test_train_invalid_item_eligibility(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, item_eligibility=[[234], [456]])\n    \n    def test_train_invalid_warm_start(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, warm_start=1)\n    \n    def test_train_invalid_warm_start_distance(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, warm_start=True, warm_start_distance=50)\n    \n    def test_train_invalid_user_id_col(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, user_id_col=0)\n    \n    def test_train_invalid_item_id_col(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, item_id_col=1)\n    \n    def test_train_invalid_response_col(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, item_id_col=2)\n    \n    def test_train_invalid_batch_size(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, batch_size=\"1000\")\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, batch_size=-50)\n    \n    def test_train_invalid_save_file(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features, save_file=1)\n\n    # =====================\n    # Score\n    # =====================\n\n    def test_score_invalid_recommender(self):\n        with self.assertRaises(TypeError):\n            rec = LearningPolicy.LinUCB()\n            score(rec, train_data, user_features)\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            score(rec, train_data, user_features)\n\n    def test_score_invalid_data(self):\n        data = pd.read_csv(train_data)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            train(rec, data)\n            score(rec, data.values)\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            train(rec, data)\n            score(rec, data.rename(columns={Constants.user_id: \"user\"}))\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            train(rec, data)\n            score(rec, data.rename(columns={Constants.item_id: \"item\"}))\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n            train(rec, data)\n            score(rec, data.rename(columns={Constants.item_id: \"click\"}))\n\n    def test_score_invalid_user_features(self):\n        user_features_df = pd.read_csv(user_features)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features_df)\n            score(rec, train_data, user_features_df.values)\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features_df)\n            score(rec, train_data, user_features_df.rename(columns={Constants.user_id: \"user\"}))\n\n    def test_score_invalid_user_features_list(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, user_features_list=pd.Series([\"u1\", \"u2\"]))\n\n    def test_score_invalid_user_features_dtypes(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, user_features_dtypes=[\"int8\", \"int8\"])\n\n    def test_score_invalid_item_features(self):\n        item_features_df = pd.read_csv(item_features)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, item_features=item_features_df.values)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, item_features=list(item_features_df))\n\n    def test_score_invalid_item_list(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, item_list=pd.Series([\"235\", \"313\", \"433\"]))\n\n    def test_score_invalid_item_eligibility(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, item_eligibility=[[234], [456]])\n\n    def test_score_invalid_warm_start(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, warm_start=1)\n\n    def test_score_invalid_warm_start_distance(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, warm_start=True, warm_start_distance=50)\n\n    def test_score_invalid_user_id_col(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, user_id_col=0)\n\n    def test_score_invalid_item_id_col(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, item_id_col=1)\n\n    def test_score_invalid_response_col(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, item_id_col=2)\n\n    def test_score_invalid_batch_size(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, batch_size=\"1000\")\n        with self.assertRaises(ValueError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, batch_size=-50)\n\n    def test_score_invalid_save_file(self):\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data, user_features)\n            score(rec, train_data, user_features, save_file=1)\n\n    # =====================\n    # Benchmark\n    # =====================\n\n    def test_benchmark_invalid_recommender(self):\n        with self.assertRaises(TypeError):\n            rec = LearningPolicy.LinUCB()\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features)\n        with self.assertRaises(TypeError):\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features)\n        with self.assertRaises(TypeError):\n            rec = {\"LinUCB\": LearningPolicy.LinUCB()}\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features)\n\n    def test_benchmark_invalid_data(self):\n        train_data_df = pd.read_csv(train_data)\n        test_data_df = pd.read_csv(test_data)\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data_df.values, test_data, user_features=user_features)\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data_df.values, user_features=user_features)\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data, test_data, cv=5, user_features=user_features)\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data_df.rename(columns={Constants.user_id: \"user\"}),\n                      test_data, cv=5, user_features=user_features)\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data_df.rename(columns={Constants.item_id: \"item\"}),\n                      test_data, cv=5, user_features=user_features)\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data_df.rename(columns={Constants.response: \"click\"}),\n                      test_data, cv=5, user_features=user_features)\n\n    def test_benchmark_invalid_user_features(self):\n        user_features_df = pd.read_csv(user_features)\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features_df.values)\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data, test_data,\n                      user_features=user_features_df.rename(columns={Constants.user_id: \"user\"}))\n\n    def test_benchmark_invalid_user_features_list(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features,\n                      user_features_list=pd.Series([\"u1\", \"u2\"]))\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data, test_data, user_features_list=pd.Series([\"u1\", \"u2\"]))\n\n    def test_benchmark_invalid_user_features_dtypes(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features,\n                      user_features_dtypes=[\"int8\", \"int8\"])\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data, test_data, user_features_dtypes=[\"int8\", \"int8\"])\n\n    def test_benchmark_invalid_item_features(self):\n        item_features_df = pd.read_csv(item_features)\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features,\n                      item_features=item_features_df.values)\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features,\n                      item_features=list(item_features_df))\n\n    def test_benchmark_invalid_item_list(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features,\n                      item_list=pd.Series([\"235\", \"313\", \"433\"]))\n\n    def test_benchmark_invalid_item_eligibility(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features,\n                      item_eligibility=[[234], [456]])\n\n    def test_benchmark_invalid_warm_start(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features, warm_start=1)\n\n    def test_benchmark_invalid_warm_start_distance(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features, warm_start_distance=50)\n\n    def test_benchmark_invalid_warm_start_distance_value(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features,\n                      warm_start=True, warm_start_distance=50)\n\n    def test_benchmark_invalid_user_id_col(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features, user_id_col=0)\n\n    def test_benchmark_invalid_item_id_col(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features, item_id_col=1)\n\n    def test_benchmark_invalid_response_col(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features, response_col=2)\n\n    def test_benchmark_invalid_batch_size(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(ValueError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features, batch_size=-2)\n\n    def test_benchmark_invalid_save_file(self):\n        rec = {\"LinUCB\": BanditRecommender(LearningPolicy.LinUCB()),\n               \"Random\": BanditRecommender(LearningPolicy.Random())}\n        with self.assertRaises(TypeError):\n            benchmark(rec, metrics, train_data, test_data, user_features=user_features, output_dir=True)\n\n    # =====================\n    # Utils\n    # =====================\n\n    def test_utils_invalid_load_item_features(self):\n        item_features_df = pd.read_csv(item_features)\n        item_list = item_features_df[Constants.item_id].tolist()\n        item_list.append(\"new_id\")\n        with self.assertRaises(ValueError):\n            load_item_features(item_features_df, item_list)\n\n    def test_utils_invalid_load_data_frame(self):\n        item_features_df = pd.read_csv(item_features)\n        with self.assertRaises(TypeError):\n            load_data_frame(item_features_df.values)\n\n    def test_utils_invalid_load_list(self):\n        with self.assertRaises(TypeError):\n            load_list((1, 2, 3))\n"
  },
  {
    "path": "tests/test_pipeline.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nfrom copy import deepcopy\nimport json\nimport pickle\nimport os\nimport tempfile\nimport unittest\n\nimport pandas as pd\nfrom mabwiser.linear import _Linear\nfrom jurity.recommenders import DiversityRecoMetrics\n\nfrom mab2rec import BanditRecommender, LearningPolicy, NeighborhoodPolicy\nfrom mab2rec.pipeline import train, score, benchmark\nfrom mab2rec.utils import Constants, default_metrics, concat_recommendations_list\nfrom tests.test_base import BaseTest\n\nTEST_DIR = os.path.dirname(os.path.abspath(__file__))\nROOT_DIR = TEST_DIR + os.sep + \"..\" + os.sep\n\n# Data files\ntrain_data = os.path.join(ROOT_DIR, \"data\", \"data_train.csv\")\ntest_data = os.path.join(ROOT_DIR, \"data\", \"data_test.csv\")\nuser_features = os.path.join(ROOT_DIR, \"data\", \"features_user.csv\")\nitem_features = os.path.join(ROOT_DIR, \"data\", \"features_item.csv\")\n\nitem_eligibility = os.path.join(ROOT_DIR, \"data\", \"extended\", \"data_eligibility.csv\")\nuser_features_dtypes = os.path.join(ROOT_DIR, \"data\", \"extended\", \"features_user_dtypes.json\")\n\n# Import\ntrain_data_df = pd.read_csv(train_data)\ntest_data_df = pd.read_csv(test_data)\nuser_features_df = pd.read_csv(user_features)\nitem_features_df = pd.read_csv(item_features)\n\n\nclass TrainTest(BaseTest):\n\n    def test_learning_policies_train(self):\n        for lp in self.lps + self.para_lps:\n            rec = BanditRecommender(lp)\n            train(rec, train_data, user_features)\n            train(rec, train_data_df, user_features_df)\n\n    def test_neighborhood_policies_train(self):\n        for cp in self.nps:\n            rec = BanditRecommender(self.lps[0], cp)\n            train(rec, train_data_df, user_features_df)\n\n    def test_lingreedy_train(self):\n        rec = BanditRecommender(LearningPolicy.LinGreedy())\n        train(rec, train_data_df, user_features_df)\n        self.assertTrue(isinstance(rec.mab._imp, _Linear))\n        self.assertEqual(len(rec.mab._imp.arm_to_model), 201)\n        self.assertAlmostEqual(rec.mab._imp.arm_to_model[427].beta[0], 0.19919595422109415)\n        self.assertAlmostEqual(rec.mab._imp.arm_to_model[173].beta[0], -0.23409821140400933)\n\n    def test_train_twice(self):\n        # First train\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df)\n\n        # Second train\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df)\n\n        self.assertEqual(rec.mab._is_initial_fit, rec.mab._is_initial_fit)\n        self.assertEqual(rec.mab.learning_policy, rec.mab.learning_policy)\n\n    def test_learning_policies_warm_start(self):\n        item_list = train_data_df[Constants.item_id].unique().tolist()\n        train_item_list = [118, 125, 132, 173, 250, 275, 423, 427, 591, 751]  # Assume only 10 items in train data\n        train_df = train_data_df[train_data_df[Constants.item_id].isin(train_item_list)]\n        for lp in self.lps + self.para_lps:\n            rec = BanditRecommender(lp)\n            train(rec, train_df, user_features_df, item_list=item_list,\n                  item_features=item_features_df, warm_start=True, warm_start_distance=0.75)\n            self.assertEqual(rec.mab.arms, item_list)\n\n    def test_neighborhood_policies_warm_start(self):\n        item_list = train_data_df[Constants.item_id].unique().tolist()\n        train_item_list = [118, 125, 132, 173, 250, 275, 423, 427, 591, 751]  # Assume only 10 items in train data\n        train_df = train_data_df[train_data_df[Constants.item_id].isin(train_item_list)]\n        for cp in self.nps:\n            rec = BanditRecommender(self.lps[0], cp)\n            train(rec, train_df, user_features_df, item_list=item_list,\n                  item_features=item_features_df, warm_start=True, warm_start_distance=0.75)\n            self.assertEqual(rec.mab.arms, item_list)\n\n    def test_warm_start_twice(self):\n        item_list = train_data_df[Constants.item_id].unique().tolist()\n        train_item_list = [118, 125, 132, 173, 250, 275, 423, 427, 591, 751]  # Assume only 10 items in train data\n        train_df = train_data_df[train_data_df[Constants.item_id].isin(train_item_list)]\n\n        # First warm start\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_df, user_features_df, item_list=item_list,\n              item_features=item_features_df, warm_start=True, warm_start_distance=0.75)\n        self.assertEqual(rec.mab.arms, item_list)\n\n        # Second warm start\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_df, user_features_df, item_list=item_list,\n              item_features=item_features_df, warm_start=True, warm_start_distance=0.75)\n        self.assertEqual(rec.mab.arms, item_list)\n\n    def test_warm_start_input_change(self):\n        item_list = train_data_df[Constants.item_id].unique().tolist()\n        train_item_list = [118, 125, 132, 173, 250, 275, 423, 427, 591, 751]  # Assume only 10 items in train data\n        train_df = train_data_df[train_data_df[Constants.item_id].isin(train_item_list)]\n\n        # Copy inputs\n        train_df_copy = train_df.copy()\n        user_features_df_copy = user_features_df.copy()\n        item_list_copy = item_list.copy()\n        item_features_df_copy = item_features_df.copy()\n\n        # Train and warm start\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_df, user_features_df, item_list=item_list,\n              item_features=item_features_df, warm_start=True, warm_start_distance=0.75)\n\n        # Compare after\n        self.assertTrue(train_df.equals(train_df_copy))\n        self.assertTrue(user_features_df.equals(user_features_df_copy))\n        self.assertTrue(item_features_df.equals(item_features_df_copy))\n        self.assertEqual(item_list, item_list_copy)\n\n    def test_user_features_list(self):\n        user_features_list = [\"u1\", \"u2\", \"u3\", \"u4\", \"u5\"]  # Only use these user features\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df, user_features_list=user_features_list)\n        self.assertEqual(len(rec.mab._imp.arm_to_model[118].beta), len(user_features_list))\n\n    def test_user_features_list_csv(self):\n        with tempfile.TemporaryDirectory() as tmp_dir:\n            user_features_list = [\"u1\", \"u2\", \"u3\", \"u4\", \"u5\"]  # Only use these user features\n            user_features_list_csv = os.path.join(tmp_dir, \"user_features_list.csv\")\n            pd.DataFrame(user_features_list).to_csv(user_features_list_csv, index=False)\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data_df, user_features_df, user_features_list=user_features_list_csv)\n            self.assertEqual(len(rec.mab._imp.arm_to_model[118].beta), len(user_features_list))\n\n    def test_user_features_data_types(self):\n        with open(user_features_dtypes, 'r') as f:\n            data_types = json.load(f)\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df, user_features_dtypes=data_types)\n        self.assertTrue(rec.mab._is_initial_fit)\n\n    def test_user_features_data_types_json(self):\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df, user_features_dtypes=user_features_dtypes)\n        self.assertTrue(rec.mab._is_initial_fit)\n\n    def test_user_id_col_change(self):\n        train_data_df_update = train_data_df.rename(columns={\"user_id\": \"uid\"})\n        user_features_df_update = user_features_df.rename(columns={\"user_id\": \"uid\"})\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df_update, user_features_df_update, user_id_col=\"uid\")\n        self.assertTrue(rec.mab._is_initial_fit)\n\n    def test_item_id_col_change(self):\n        train_data_df_update = train_data_df.rename(columns={\"item_id\": \"iid\"})\n        item_features_df_update = item_features_df.rename(columns={\"item_id\": \"iid\"})\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df_update, user_features_df,\n              item_features=item_features_df_update, item_id_col=\"iid\")\n        self.assertTrue(rec.mab._is_initial_fit)\n\n    def test_response_col_change(self):\n        train_data_df_update = train_data_df.rename(columns={\"response\": \"ind\"})\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df_update, user_features_df, response_col=\"ind\")\n        self.assertTrue(rec.mab._is_initial_fit)\n\n    def test_batch_size_small(self):\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df, batch_size=1000)\n        self.assertTrue(rec.mab._is_initial_fit)\n        rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n        train(rec, train_data_df, batch_size=1000)\n        self.assertTrue(rec.mab._is_initial_fit)\n\n    def test_batch_size_large(self):\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df, batch_size=10000000)\n        self.assertTrue(rec.mab._is_initial_fit)\n\n    def test_save_file(self):\n        # Specified file name\n        with tempfile.TemporaryDirectory() as tmp_dir:\n            rec_pickle = os.path.join(tmp_dir, \"rec.pkl\")\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data_df, user_features_df, save_file=rec_pickle)\n            self.assertTrue(os.path.exists(rec_pickle))\n            with open(rec_pickle, 'rb') as f:\n                rec = pickle.load(f)\n            self.assertTrue(isinstance(rec, BanditRecommender))\n            self.assertTrue(rec.mab._is_initial_fit)\n\n    def test_save_file_true(self):\n        default_name = \"recommender.pkl\"\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df, save_file=True)\n        self.assertTrue(os.path.exists(default_name))\n        with open(default_name, 'rb') as f:\n            rec = pickle.load(f)\n        self.assertTrue(isinstance(rec, BanditRecommender))\n        self.assertTrue(rec.mab._is_initial_fit)\n        os.remove(default_name)\n\n\nclass ScoreTest(BaseTest):\n\n    def test_learning_policies_score(self):\n        for lp in self.lps + self.para_lps:\n\n            # Train\n            rec = BanditRecommender(lp)\n            train(rec, train_data_df, user_features=user_features_df)\n\n            # Score w Warm Start\n            df = score(rec, test_data_df.sample(100), user_features=user_features_df,\n                       item_list=test_data_df[Constants.item_id].tolist(), item_features=item_features_df,\n                       warm_start=True, warm_start_distance=0.75)\n            self.assertEqual(df.shape[1], 3)\n            self.assertEqual(df.ndim, 2)\n\n    def test_neighborhood_policies_score(self):\n        cp_prev = None\n        for cp in self.nps:\n            if cp_prev is not None and type(cp) == type(cp_prev):\n                cp_prev = deepcopy(cp)\n                continue\n            # Train\n            rec = BanditRecommender(self.lps[0], cp)\n            train(rec, train_data_df, user_features_df)\n\n            # Score w Warm Start\n            df = score(rec, test_data_df.sample(10), user_features_df,\n                       item_list=test_data_df[Constants.item_id].tolist(), item_features=item_features_df,\n                       warm_start=True, warm_start_distance=0.75)\n            self.assertEqual(df.shape[1], 3)\n            self.assertEqual(df.ndim, 2)\n            cp_prev = deepcopy(cp)\n\n    def test_lingreedy_score(self):\n        rec = BanditRecommender(LearningPolicy.LinGreedy(l2_lambda=1000))\n        train(rec, train_data_df, user_features_df)\n        df = score(rec, test_data_df, user_features_df)\n        score_dict = df.head().to_dict()\n        self.assertDictEqual(score_dict['user_id'], {0: 259, 1: 259, 2: 259, 3: 259, 4: 259})\n        self.assertDictEqual(score_dict['item_id'], {0: 50, 1: 127, 2: 313, 3: 56, 4: 174},)\n        self.assertDictEqual(score_dict['score'], {0: 0.5481800084403381, 1: 0.533300457736932, 2: 0.5318001465799647,\n                                                   3: 0.5313858071529368, 4: 0.531052100344854},)\n\n    def test_learning_policy_no_features(self):\n        rec = BanditRecommender(LearningPolicy.EpsilonGreedy())\n        train(rec, train_data_df)\n        df = score(rec, test_data_df)\n        self.assertEqual(df.shape[1], 3)\n        self.assertEqual(df.ndim, 2)\n\n    def test_load_from_pickle(self):\n        with tempfile.TemporaryDirectory() as tmp_dir:\n            rec_pickle = os.path.join(tmp_dir, \"rec.pkl\")\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data_df, user_features_df, save_file=rec_pickle)\n            df = score(rec_pickle, test_data_df, user_features_df)\n            self.assertEqual(df.shape[1], 3)\n            self.assertEqual(df.ndim, 2)\n\n    def test_eligible_items(self):\n        item_eligibility_df = pd.read_csv(item_eligibility)\n\n        # Train\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df)\n\n        # Score only eligible items\n        df = score(rec, test_data_df, user_features_df, item_eligibility=item_eligibility_df)\n        self.assertEqual(df.shape[1], 3)\n        self.assertEqual(df.ndim, 2)\n\n    def test_eligible_items_twice(self):\n        item_eligibility_df = pd.read_csv(item_eligibility)\n\n        # Train\n        rec = BanditRecommender(LearningPolicy.Random())\n        train(rec, data=train_data_df)\n\n        # Make recommendations that satisfy eligibility criteria\n        df_first = score(rec, data=test_data_df, item_eligibility=item_eligibility_df)\n\n        # Train again\n        rec = BanditRecommender(LearningPolicy.Random())\n        train(rec, data=train_data_df)\n\n        # Make recommendations that satisfy eligibility criteria\n        df_second = score(rec, data=test_data_df, item_eligibility=item_eligibility_df)\n\n        self.assertTrue(df_first.equals(df_second))\n\n    def test_batch_size_small(self):\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df)\n        df = score(rec, test_data_df, user_features_df, batch_size=1000)\n        self.assertEqual(df.shape[1], 3)\n        self.assertEqual(df.ndim, 2)\n\n    def test_batch_size_large(self):\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df)\n        df = score(rec, test_data_df, user_features_df, batch_size=10000000)\n        self.assertEqual(df.shape[1], 3)\n        self.assertEqual(df.ndim, 2)\n\n    def test_save_file(self):\n        with tempfile.TemporaryDirectory() as tmp_dir:\n            results_csv = os.path.join(tmp_dir, \"results.csv\")\n            rec = BanditRecommender(LearningPolicy.LinUCB())\n            train(rec, train_data_df, user_features_df)\n            score(rec, train_data_df, user_features_df, save_file=results_csv)\n            df = pd.read_csv(results_csv)\n            self.assertTrue(os.path.exists(results_csv))\n            self.assertTrue(isinstance(df, pd.DataFrame))\n            self.assertEqual(df.shape[1], 3)\n            self.assertEqual(df.ndim, 2)\n\n    def test_save_file_true(self):\n        default_name = \"results.csv\"\n        rec = BanditRecommender(LearningPolicy.LinUCB())\n        train(rec, train_data_df, user_features_df)\n        score(rec, train_data_df, user_features_df, save_file=True)\n        self.assertTrue(os.path.exists(default_name))\n        os.remove(default_name)\n\n\nclass BenchmarkTest(BaseTest):\n\n    recommenders = {\n        \"Random\": BanditRecommender(LearningPolicy.Random()),\n        \"LinUCB\": BanditRecommender(LearningPolicy.LinUCB(alpha=1.5)),\n        \"ClustersTS\": BanditRecommender(LearningPolicy.ThompsonSampling(), NeighborhoodPolicy.Clusters(n_clusters=10))\n    }\n    metrics = default_metrics(top_k_values=[3, 5, 10])\n\n    def test_benchmark(self):\n        recommenders = deepcopy(self.recommenders)\n        recommendations, rec_metrics = benchmark(recommenders, self.metrics, train_data, test_data,\n                                                 user_features=user_features_df)\n        self.assertEqual(recommendations.keys(), self.recommenders.keys())\n        self.assertEqual(rec_metrics.keys(), self.recommenders.keys())\n        self.assertTrue(isinstance(recommendations[\"Random\"], pd.DataFrame))\n        self.assertEqual(recommendations[\"Random\"].shape[1], 3)\n        self.assertEqual(recommendations[\"Random\"].ndim, 2)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"AUC(score)@3\"], 0.5154761904761904)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"CTR(score)@3\"], 0.2112676056338028)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"Precision@3\"], 0.04950495049504949)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"Recall@3\"], 0.00774496333427291)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"NDCG@3\"], 0.014186541542204544)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"MAP@3\"], 0.0286028602860286)\n        for rec in recommenders.values():\n            self.assertTrue(rec.mab is None)\n\n    @unittest.skip(\"operating system differences\")\n    def test_benchmark_cv(self):\n        recommenders = deepcopy(self.recommenders)\n        recommendations, rec_metrics = benchmark(recommenders, self.metrics, train_data, cv=3,\n                                                 user_features=user_features_df)\n        self.assertEqual(len(rec_metrics), 3)\n        self.assertAlmostEqual(rec_metrics[0][\"Random\"][\"AUC(score)@3\"], 0.5679790026246719)\n        self.assertAlmostEqual(rec_metrics[0][\"Random\"][\"CTR(score)@3\"], 0.2616279069767442)\n        self.assertAlmostEqual(rec_metrics[0][\"Random\"][\"Precision@3\"], 0.05208333333333333)\n        self.assertAlmostEqual(rec_metrics[0][\"Random\"][\"Recall@3\"], 0.016161228957922595)\n        self.assertAlmostEqual(rec_metrics[0][\"Random\"][\"NDCG@3\"], 0.023100096565199995)\n        self.assertAlmostEqual(rec_metrics[0][\"Random\"][\"MAP@3\"], 0.0398341049382716)\n\n        self.assertEqual(len(recommendations), 3)\n        self.assertTrue(isinstance(recommendations[0][\"Random\"], pd.DataFrame))\n        self.assertEqual(recommendations[0][\"Random\"].shape[1], 3)\n        self.assertEqual(recommendations[0][\"Random\"].ndim, 2)\n\n        recommendations = concat_recommendations_list(recommendations)\n        self.assertTrue(isinstance(recommendations[\"Random\"], pd.DataFrame))\n        self.assertEqual(recommendations[\"Random\"][Constants.user_id].nunique(),\n                         train_data_df[Constants.user_id].nunique())\n        self.assertEqual(recommendations[\"Random\"].shape[1], 3)\n\n        for rec in recommenders.values():\n            self.assertTrue(rec.mab is None)\n\n    def test_benchmark_diversity_metrics(self):\n        recommenders = deepcopy(self.recommenders)\n        metrics = []\n        metric_params = {'click_column': Constants.score,\n                         'user_id_column': Constants.user_id,\n                         'item_id_column': Constants.item_id}\n        for k in [3, 5]:\n            metrics.append(DiversityRecoMetrics.InterListDiversity(**metric_params, k=k,\n                                                                   user_sample_size=100))\n            metrics.append(DiversityRecoMetrics.IntraListDiversity(**metric_params, k=k,\n                                                                   user_sample_size=100,\n                                                                   item_features=item_features_df))\n\n        recommendations, rec_metrics = benchmark(recommenders, metrics, train_data, test_data,\n                                                 user_features=user_features_df)\n        self.assertEqual(recommendations.keys(), self.recommenders.keys())\n        self.assertEqual(rec_metrics.keys(), self.recommenders.keys())\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"Inter-List Diversity@3\"], 0.9856228956228957)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"Inter-List Diversity@5\"], 0.9749818181818182)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"Intra-List Diversity@3\"], 0.7602157694547105)\n        self.assertAlmostEqual(rec_metrics[\"Random\"][\"Intra-List Diversity@5\"], 0.7547351779782561)"
  },
  {
    "path": "tests/test_rec.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nfrom mab2rec import BanditRecommender, LearningPolicy, NeighborhoodPolicy\nfrom tests.test_base import BaseTest\n\n\nclass BanditRecommenderTest(BaseTest):\n\n    def test_init(self):\n        rec = BanditRecommender(LearningPolicy.UCB1())\n        rec._init([1, 2, 3])\n        self.assertTrue(rec.mab is not None)\n\n    def test_learning_policies(self):\n        for lp in self.lps:\n            self.predict(arms=[1, 2, 3],\n                         decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                         rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                         learning_policy=lp,\n                         contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                         top_k=2,\n                         seed=123456)\n\n    def test_parametric_learning_policies(self):\n        for lp in self.para_lps:\n            self.predict(arms=[1, 2, 3],\n                         decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                         rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                         learning_policy=lp,\n                         contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                         context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                          [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                          [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                          [0, 2, 1, 0, 0]],\n                         top_k=2,\n                         seed=123456)\n\n    def test_neighborhood_policies(self):\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                self.predict(arms=[1, 2, 3],\n                             decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                             rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                             learning_policy=lp,\n                             neighborhood_policy=cp,\n                             contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                             context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                              [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                              [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                              [0, 2, 1, 0, 0]],\n                             top_k=2,\n                             seed=123456)\n            for lp in self.para_lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                self.predict(arms=[1, 2, 3],\n                             decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                             rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                             learning_policy=lp,\n                             neighborhood_policy=cp,\n                             contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                             context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                              [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                              [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                              [0, 2, 1, 0, 0]],\n                             top_k=2,\n                             seed=123456)\n\n    def test_learning_policies_predict(self):\n        for lp in self.lps:\n            _, rec = self.predict(arms=[1, 2, 3],\n                                  decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                  rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                  learning_policy=lp,\n                                  top_k=2,\n                                  seed=123456)\n            rec.predict()\n            rec.predict_expectations()\n\n    def test_parametric_learning_policies_predict(self):\n        for lp in self.para_lps:\n            _, rec = self.predict(arms=[1, 2, 3],\n                                  decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                  rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                  learning_policy=lp,\n                                  contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                  context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                   [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                   [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                   [0, 2, 1, 0, 0]],\n                                  top_k=2,\n                                  seed=123456)\n            rec.predict([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n            rec.predict_expectations([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n\n    def test_neighborhood_policies_predict(self):\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                _, rec = self.predict(arms=[1, 2, 3],\n                                      decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                      rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                      learning_policy=lp,\n                                      neighborhood_policy=cp,\n                                      contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                      context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                       [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                       [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                       [0, 2, 1, 0, 0]],\n                                      top_k=2,\n                                      seed=123456)\n                rec.predict([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n                rec.predict_expectations([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n            for lp in self.para_lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                _, rec = self.predict(arms=[1, 2, 3],\n                                      decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                      rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                      learning_policy=lp,\n                                      neighborhood_policy=cp,\n                                      contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                      context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                       [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                       [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                       [0, 2, 1, 0, 0]],\n                                      top_k=2,\n                                      seed=123456)\n                rec.predict([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n                rec.predict_expectations([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n\n    def test_learning_policies_no_sigmoid(self):\n        for lp in self.lps:\n            self.predict(arms=[1, 2, 3],\n                         decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                         rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                         learning_policy=lp,\n                         contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                         apply_sigmoid=False,\n                         top_k=2,\n                         seed=123456)\n\n    def test_parametric_learning_policies_no_sigmoid(self):\n        for lp in self.para_lps:\n            self.predict(arms=[1, 2, 3],\n                         decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                         rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                         learning_policy=lp,\n                         contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                         context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                          [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                          [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                          [0, 2, 1, 0, 0]],\n                         apply_sigmoid=False,\n                         top_k=2,\n                         seed=123456)\n\n    def test_neighborhood_policies_recommend_no_sigmoid(self):\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                self.predict(arms=[1, 2, 3],\n                             decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                             rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                             learning_policy=lp,\n                             neighborhood_policy=cp,\n                             contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                             context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                              [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                              [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                              [0, 2, 1, 0, 0]],\n                             apply_sigmoid=False,\n                             top_k=2,\n                             seed=123456)\n            for lp in self.para_lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                self.predict(arms=[1, 2, 3],\n                             decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                             rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                             learning_policy=lp,\n                             neighborhood_policy=cp,\n                             contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                             context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                              [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                              [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                              [0, 2, 1, 0, 0]],\n                             apply_sigmoid=False,\n                             top_k=2,\n                             seed=123456)\n\n    def test_learning_policies_partial_fit(self):\n        for lp in self.lps:\n            _, rec = self.predict(arms=[1, 2, 3],\n                                  decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                  rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                  learning_policy=lp,\n                                  top_k=2,\n                                  seed=123456)\n            rec.partial_fit(decisions=[1, 1, 2], rewards=[0, 1, 0])\n\n    def test_parametric_learning_policies_partial_fit(self):\n        for lp in self.para_lps:\n            _, rec = self.predict(arms=[1, 2, 3],\n                                  decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                  rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                  learning_policy=lp,\n                                  contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                  context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                   [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                   [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                   [0, 2, 1, 0, 0]],\n                                  top_k=2,\n                                  seed=123456)\n            rec.partial_fit(decisions=[1, 1, 2], rewards=[0, 1, 0],\n                            contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n\n    def test_neighborhood_policies_partial_fit(self):\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                _, rec = self.predict(arms=[1, 2, 3],\n                                      decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                      rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                      learning_policy=lp,\n                                      neighborhood_policy=cp,\n                                      contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                      context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                       [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                       [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                       [0, 2, 1, 0, 0]],\n                                      top_k=2,\n                                      seed=123456)\n                rec.partial_fit(decisions=[1, 1, 2], rewards=[0, 1, 0],\n                                contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n            for lp in self.para_lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                _, rec = self.predict(arms=[1, 2, 3],\n                                      decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                      rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                      learning_policy=lp,\n                                      neighborhood_policy=cp,\n                                      contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                      context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                       [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                       [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                       [0, 2, 1, 0, 0]],\n                                      top_k=2,\n                                      seed=123456)\n                rec.partial_fit(decisions=[1, 1, 2], rewards=[0, 1, 0],\n                                contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [1, 2, 1, 1, 3]])\n\n    def test_learning_policies_warm_start(self):\n        for lp in self.lps:\n            self.predict(arms=[1, 2, 3, 4],\n                         decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                         rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                         learning_policy=lp,\n                         contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                         top_k=2,\n                         seed=123456,\n                         warm_start=True,\n                         arm_to_features={1: [0.5, 1], 2: [0, 1], 3: [0, 1], 4: [0.5, 1]})\n\n    def test_parametric_learning_policies_warm_start(self):\n        for lp in self.para_lps:\n            self.predict(arms=[1, 2, 3, 4],\n                         decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                         rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                         learning_policy=lp,\n                         contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                         context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                          [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                          [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                          [0, 2, 1, 0, 0]],\n                         top_k=2,\n                         seed=123456,\n                         warm_start=True,\n                         arm_to_features={1: [0.5, 1], 2: [0, 1], 3: [0, 1], 4: [0.5, 1]})\n\n    def test_neighborhood_policies_warm_start(self):\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                self.predict(arms=[1, 2, 3, 4],\n                             decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                             rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                             learning_policy=lp,\n                             neighborhood_policy=cp,\n                             contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                             context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                              [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                              [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                              [0, 2, 1, 0, 0]],\n                             top_k=2,\n                             seed=123456,\n                             warm_start=True,\n                             arm_to_features={1: [0.5, 1], 2: [0, 1], 3: [0, 1], 4: [0.5, 1]})\n            for lp in self.para_lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                self.predict(arms=[1, 2, 3, 4],\n                             decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                             rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                             learning_policy=lp,\n                             neighborhood_policy=cp,\n                             contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                             context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                              [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                              [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                              [0, 2, 1, 0, 0]],\n                             top_k=2,\n                             seed=123456,\n                             warm_start=True,\n                             arm_to_features={1: [0.5, 1], 2: [0, 1], 3: [0, 1], 4: [0.5, 1]})\n\n    def test_learning_policies_add_arm(self):\n        for lp in self.lps:\n            rec = BanditRecommender(lp)\n            rec._init(arms=[1, 2, 3])\n            rec.add_arm(4)\n            self.assertEqual(len(rec.mab.arms), 4)\n            self.assertTrue(4 in rec.mab.arms)\n            self.assertTrue(4 in rec.mab._imp.arm_to_expectation)\n        for lp in self.lps:\n            rec = BanditRecommender(lp)\n            rec.add_arm(4)\n            self.assertEqual(len(rec.mab.arms), 1)\n            self.assertTrue(4 in rec.mab.arms)\n            self.assertTrue(4 in rec.mab._imp.arm_to_expectation)\n\n    def test_parametric_learning_policies_add_arm(self):\n        for lp in self.para_lps:\n            rec = BanditRecommender(lp)\n            rec._init(arms=[1, 2, 3])\n            rec.add_arm(4)\n            self.assertEqual(len(rec.mab.arms), 4)\n            self.assertTrue(4 in rec.mab.arms)\n            self.assertTrue(4 in rec.mab._imp.arm_to_expectation)\n            self.assertTrue(4 in rec.mab._imp.arm_to_model)\n        for lp in self.para_lps:\n            rec = BanditRecommender(lp)\n            rec.add_arm(4)\n            self.assertEqual(len(rec.mab.arms), 1)\n            self.assertTrue(4 in rec.mab.arms)\n            self.assertTrue(4 in rec.mab._imp.arm_to_expectation)\n            self.assertTrue(4 in rec.mab._imp.arm_to_model)\n\n    def test_neighborhood_policies_add_arm(self):\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                rec = BanditRecommender(lp)\n                rec._init(arms=[1, 2, 3])\n                rec.add_arm(4)\n                self.assertEqual(len(rec.mab.arms), 4)\n                self.assertTrue(4 in rec.mab.arms)\n                self.assertTrue(4 in rec.mab._imp.arm_to_expectation)\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                rec = BanditRecommender(lp)\n                rec.add_arm(4)\n                self.assertEqual(len(rec.mab.arms), 1)\n                self.assertTrue(4 in rec.mab.arms)\n                self.assertTrue(4 in rec.mab._imp.arm_to_expectation)\n\n    def test_learning_policies_remove_arm(self):\n        for lp in self.lps:\n            rec = BanditRecommender(lp)\n            rec._init(arms=[1, 2, 3])\n            rec.remove_arm(3)\n            self.assertTrue(3 not in rec.mab.arms)\n            self.assertTrue(3 not in rec.mab._imp.arm_to_expectation)\n\n    def test_parametric_learning_policies_remove_arm(self):\n        for lp in self.para_lps:\n            rec = BanditRecommender(lp)\n            rec._init(arms=[1, 2, 3])\n            rec.remove_arm(3)\n            self.assertTrue(3 not in rec.mab.arms)\n            self.assertTrue(3 not in rec.mab._imp.arm_to_expectation)\n            self.assertTrue(3 not in rec.mab._imp.arm_to_model)\n\n    def test_neighborhood_policies_remove_arm(self):\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                rec = BanditRecommender(lp)\n                rec._init(arms=[1, 2, 3])\n                rec.remove_arm(3)\n                self.assertTrue(3 not in rec.mab.arms)\n                self.assertTrue(3 not in rec.mab._imp.arm_to_expectation)\n\n    def test_learning_policies_set_arms(self):\n        for lp in self.lps:\n            _, rec = self.predict(arms=[1, 2, 3, 4],\n                                  decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                  rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                  learning_policy=lp,\n                                  contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                  top_k=2,\n                                  seed=123456)\n            rec.set_arms([2, 5])\n            self.assertEqual(rec.mab.arms, [2, 5])\n            self.assertEqual(rec.mab._imp.arms, [2, 5])\n\n    def test_parametric_learning_policies_set_arms(self):\n        for lp in self.para_lps:\n            _, rec = self.predict(arms=[1, 2, 3],\n                                  decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                  rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                  learning_policy=lp,\n                                  contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                  context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                   [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                   [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                   [0, 2, 1, 0, 0]],\n                                  top_k=2,\n                                  seed=123456)\n            rec.set_arms([2, 5])\n            self.assertEqual(rec.mab.arms, [2, 5])\n            self.assertEqual(rec.mab._imp.arms, [2, 5])\n\n    def test_neighborhood_policies_set_arms(self):\n        for cp in self.nps:\n            for lp in self.lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                _, rec = self.predict(arms=[1, 2, 3],\n                                      decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                      rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                      learning_policy=lp,\n                                      neighborhood_policy=cp,\n                                      contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                      context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                       [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                       [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                       [0, 2, 1, 0, 0]],\n                                      top_k=2,\n                                      seed=123456)\n                rec.set_arms([2, 5])\n                self.assertEqual(rec.mab.arms, [2, 5])\n                self.assertEqual(rec.mab._imp.arms, [2, 5])\n            for lp in self.para_lps:\n                if not self.is_compatible(lp, cp):\n                    continue\n                _, rec = self.predict(arms=[1, 2, 3],\n                                      decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                      rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                      learning_policy=lp,\n                                      neighborhood_policy=cp,\n                                      contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                      context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                       [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                       [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                       [0, 2, 1, 0, 0]],\n                                      top_k=2,\n                                      seed=123456)\n                rec.set_arms([2, 5])\n                self.assertEqual(rec.mab.arms, [2, 5])\n                self.assertEqual(rec.mab._imp.arms, [2, 5])\n\n    def test_recommend_random(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.Random(),\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [1, 2])\n        self.assertListAlmostEqual(results[1], [0.6539649643958056, 0.5950330918093963])\n\n        # No scores\n        results = rec.recommend(return_scores=False)\n        self.assertEqual(results, [1, 2])\n\n    def test_recommend_random_w_empty_context(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.Random(),\n                                    contexts=[[]] * 5,\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[1, 2], [1, 2], [3, 2], [1, 3], [2, 3]])\n\n    def test_recommend_popularity(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.Popularity(),\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [3, 1])\n        self.assertListAlmostEqual(results[1], [0.6871905288086486, 0.5530453076346826])\n\n        # No scores\n        results = rec.recommend(return_scores=False)\n        self.assertEqual(results, [1, 3])\n\n    def test_recommend_popularity_w_empty_context(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.Popularity(),\n                                    contexts=[[]] * 5,\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[3, 1], [1, 3], [3, 1], [3, 1], [3, 1]])\n\n    def test_recommend_greedy(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.EpsilonGreedy(epsilon=0),\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [1, 3])\n        self.assertListAlmostEqual(results[1], [0.6607563687658172, 0.6456563062257954])\n\n        # No scores\n        results = rec.recommend(return_scores=False)\n        self.assertEqual(results, [1, 3])\n\n    def test_recommend_greedy_eps(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.EpsilonGreedy(epsilon=0.5),\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [1, 3])\n        self.assertListAlmostEqual(results[1], [0.6607563687658172, 0.6456563062257954])\n\n        # No scores\n        results = rec.recommend(return_scores=False)\n        self.assertEqual(results, [2, 3])\n\n    def test_recommend_greedy_w_empty_context(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.EpsilonGreedy(epsilon=0.5),\n                                    contexts=[[]] * 5,\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[1, 3], [1, 2], [3, 1], [1, 3], [1, 3]])\n\n    def test_recommend_softmax(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.Softmax(),\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [3, 1])\n        self.assertListAlmostEqual(results[1], [0.6927815920738961, 0.5465755461646858])\n\n        # No scores\n        results = rec.recommend(return_scores=False)\n        self.assertEqual(results, [2, 3])\n\n    def test_recommend_softmax_w_empty_context(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.Softmax(),\n                                    contexts=[[]] * 5,\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[3, 1], [2, 3], [3, 2], [3, 2], [3, 1]])\n\n    def test_recommend_ucb(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.UCB1(),\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [1, 3])\n        self.assertListAlmostEqual(results[1], [0.8705286139301878, 0.8263110445099603])\n\n        # No scores\n        results = rec.recommend(return_scores=False)\n        self.assertEqual(results, [1, 3])\n\n    def test_recommend_ucb_alpha(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.UCB1(alpha=10),\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [2, 1])\n        self.assertListAlmostEqual(results[1], [0.9999997430210213, 0.9999978636449579])\n\n        # No scores\n        results = rec.recommend(return_scores=False)\n        self.assertEqual(results, [2, 1])\n\n    def test_recommend_ucb_w_empty_context(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.UCB1(),\n                                    contexts=[[]] * 5,\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[1, 3], [1, 3], [1, 3], [1, 3], [1, 3]])\n\n    def test_recommend_ts(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.ThompsonSampling(),\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [1, 2])\n        self.assertListAlmostEqual(results[1], [0.6378726378265008, 0.5875821922391576])\n\n        # No scores\n        results = rec.recommend(return_scores=False)\n        self.assertEqual(results, [3, 1])\n\n    def test_recommend_ts_w_empty_context(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.ThompsonSampling(),\n                                    contexts=[[]] * 5,\n                                    neighborhood_policy=None,\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[1, 3], [3, 1], [1, 3], [3, 2], [1, 2]])\n\n    def test_recommend_lin_greedy(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.LinGreedy(epsilon=0.5),\n                                    neighborhood_policy=None,\n                                    contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                    context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                     [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                     [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                     [0, 2, 1, 0, 0]],\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[3, 1], [2, 3]])\n        self.assertListAlmostEqual(results[1][0], [0.6504125435586658, 0.5240639631785098])\n        self.assertListAlmostEqual(results[1][1], [0.7221703184615302, 0.7121913829791641])\n\n        # No scores\n        results = rec.recommend([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]], return_scores=False)\n        self.assertEqual(results, [[2, 3], [2, 1]])\n\n    def test_recommend_lin_ucb(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.LinUCB(alpha=1.25),\n                                    neighborhood_policy=None,\n                                    contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                    context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                     [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                     [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                     [0, 2, 1, 0, 0]],\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[3, 2], [1, 3]])\n        self.assertListAlmostEqual(results[1][0], [0.8355754378823774, 0.8103388262282213])\n        self.assertListAlmostEqual(results[1][1], [0.8510415343853225, 0.8454457789037026])\n\n        # No scores\n        results = rec.recommend([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]], return_scores=False)\n        self.assertEqual(results, [[3, 2], [1, 3]])\n\n    def test_recommend_lin_ts(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.LinTS(),\n                                    neighborhood_policy=None,\n                                    contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                    context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                     [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                     [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                     [0, 2, 1, 0, 0]],\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[3, 2], [1, 3]])\n        self.assertListAlmostEqual(results[1][0], [0.6393327956234724, 0.6113795857188596])\n        self.assertListAlmostEqual(results[1][1], [0.9231640190086698, 0.9093145340785204])\n\n        # No scores\n        results = rec.recommend([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]], return_scores=False)\n        self.assertEqual(results, [[3, 1], [1, 3]])\n\n    def test_recommend_clusters_ts(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.ThompsonSampling(),\n                                    neighborhood_policy=NeighborhoodPolicy.Clusters(),\n                                    contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                    context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                     [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                     [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                     [0, 2, 1, 0, 0]],\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[2, 1], [1, 3]])\n        self.assertListAlmostEqual(results[1][0], [0.6470729583134509, 0.6239486262002204])\n        self.assertListAlmostEqual(results[1][1], [0.7257397617770284, 0.6902019029795886])\n\n        # No scores\n        results = rec.recommend([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]], return_scores=False)\n        self.assertEqual(results, [[2, 3], [1, 3]])\n\n    def test_recommend_radius_ts(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.ThompsonSampling(),\n                                    neighborhood_policy=NeighborhoodPolicy.Radius(radius=5),\n                                    contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                    context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                     [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                     [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                     [0, 2, 1, 0, 0]],\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[1, 3], [3, 2]])\n        self.assertListAlmostEqual(results[1][0], [0.6853064650518793, 0.5794087793326232])\n        self.assertListAlmostEqual(results[1][1], [0.6171485591737581, 0.6039485772665535])\n\n        # No scores\n        results = rec.recommend([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]], return_scores=False)\n        self.assertEqual(results, [[3, 1], [2, 1]])\n\n    def test_recommend_knn_ts(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.ThompsonSampling(),\n                                    neighborhood_policy=NeighborhoodPolicy.KNearest(k=2),\n                                    contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                    context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                     [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                     [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                     [0, 2, 1, 0, 0]],\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[2, 1], [1, 3]])\n        self.assertListAlmostEqual(results[1][0], [0.6470729583134509, 0.6239486262002204])\n        self.assertListAlmostEqual(results[1][1], [0.7257397617770284, 0.7239071840518659])\n\n        # No scores\n        results = rec.recommend([[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]], return_scores=False)\n        self.assertEqual(results, [[3, 2], [1, 3]])\n\n    def test_recommend_lin_ucb_excluded(self):\n        results, rec = self.predict(arms=[1, 2, 3],\n                                    decisions=[1, 1, 1, 2, 2, 3, 3, 3, 3, 3],\n                                    rewards=[0, 1, 1, 0, 0, 0, 0, 1, 1, 1],\n                                    learning_policy=LearningPolicy.LinUCB(alpha=1.25),\n                                    neighborhood_policy=None,\n                                    contexts=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1]],\n                                    context_history=[[0, 1, 2, 3, 5], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0],\n                                                     [0, 2, 2, 3, 5], [1, 3, 1, 1, 1], [0, 0, 0, 0, 0],\n                                                     [0, 1, 4, 3, 5], [0, 1, 2, 4, 5], [1, 2, 1, 1, 3],\n                                                     [0, 2, 1, 0, 0]],\n                                    excluded_arms=[[3], [3]],\n                                    top_k=2,\n                                    seed=123456)\n        self.assertEqual(results[0], [[2, 1], [1, 2]])\n        self.assertListAlmostEqual(results[1][0], [0.8103388262282213, 0.7882460646490305])\n\n    def test_recommend_exclusion_replace(self):\n        results, rec = self.predict(arms=[1, 2, 3, 4, 5],\n                                    decisions=[1, 2, 3, 4, 5],\n                                    rewards=[0.9, 0.8, 0.7, 0.6, 0.5],\n                                    learning_policy=LearningPolicy.EpsilonGreedy(epsilon=0.),\n                                    neighborhood_policy=None,\n                                    contexts=[[1, 2], [1, 2]],\n                                    excluded_arms=[[], [1]],\n                                    top_k=4)\n\n        self.assertListEqual(results[0][0], [1, 2, 3, 4])\n        self.assertListEqual(results[0][1], [2, 3, 4, 5])\n"
  },
  {
    "path": "tests/test_visualization.py",
    "content": "# -*- coding: utf-8 -*-\n# Copyright FMR LLC <opensource@fidelity.com>\n# SPDX-License-Identifier: Apache-2.0\n\nfrom unittest.mock import patch\nimport os\n\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport seaborn as sns\nfrom sklearn.cluster import KMeans\n\nfrom mab2rec import BanditRecommender, LearningPolicy, NeighborhoodPolicy\nfrom mab2rec.pipeline import benchmark\nfrom mab2rec.visualization import (plot_inter_diversity_at_k, plot_intra_diversity_at_k, plot_metrics_at_k,\n                                   plot_num_items_per_recommendation, plot_recommended_counts,\n                                   plot_recommended_counts_by_item, plot_personalization_heatmap)\nfrom mab2rec.utils import default_metrics, print_interaction_stats\nfrom tests.test_base import BaseTest\n\nTEST_DIR = os.path.dirname(os.path.abspath(__file__))\nROOT_DIR = TEST_DIR + os.sep + \"..\" + os.sep\n\n# Data files\ntrain_data = os.path.join(ROOT_DIR, \"data\", \"data_train.csv\")\ntest_data = os.path.join(ROOT_DIR, \"data\", \"data_test.csv\")\nuser_features = os.path.join(ROOT_DIR, \"data\", \"features_user.csv\")\nitem_features = os.path.join(ROOT_DIR, \"data\", \"features_item.csv\")\n\nitem_eligibility = os.path.join(ROOT_DIR, \"data\", \"extended\", \"data_eligibility.csv\")\nuser_features_dtypes = os.path.join(ROOT_DIR, \"data\", \"extended\", \"features_user_dtypes.json\")\n\n# Import\ntrain_data_df = pd.read_csv(train_data)\ntest_data_df = pd.read_csv(test_data)\nuser_features_df = pd.read_csv(user_features)\nitem_features_df = pd.read_csv(item_features)\n\n\nclass VisualizationTest(BaseTest):\n\n    recommenders = {\n        \"Random\": BanditRecommender(LearningPolicy.Random()),\n        \"LinUCB\": BanditRecommender(LearningPolicy.LinUCB(alpha=1.5)),\n        \"ClustersTS\": BanditRecommender(LearningPolicy.ThompsonSampling(), NeighborhoodPolicy.Clusters(n_clusters=10))\n    }\n    metrics = default_metrics(top_k_values=[3, 5, 10])\n    recommendations, rec_metrics = benchmark(recommenders, metrics, train_data, test_data,\n                                             user_features=user_features_df)\n    recommendations_cv, rec_metrics_cv = benchmark(recommenders, metrics, train_data, cv=3,\n                                                   user_features=user_features_df)\n\n    @patch(\"mab2rec.visualization.plt.show\")\n    def test_plot_metrics_at_k(self, mock_show):\n        plot_metrics_at_k(self.rec_metrics)\n        plot_metrics_at_k(self.rec_metrics_cv)\n        plt.close()\n\n    @patch(\"mab2rec.visualization.plt.show\")\n    def test_plot_inter_diversity_at_k(self, mock_show):\n        plot_inter_diversity_at_k(self.recommendations, k_list=[3, 5, 10])\n        plot_inter_diversity_at_k(self.recommendations_cv, k_list=[3, 5, 10])\n        plt.close()\n\n    @patch(\"mab2rec.visualization.plt.show\")\n    def test_plot_intra_diversity_at_k(self, mock_show):\n        plot_intra_diversity_at_k(self.recommendations, item_features_df, k_list=[3, 5, 10])\n        plot_intra_diversity_at_k(self.recommendations_cv, item_features_df, k_list=[3, 5, 10])\n        plt.close()\n\n    @patch(\"mab2rec.visualization.plt.show\")\n    def test_plot_recommended_counts(self, mock_show):\n        plot_recommended_counts(self.recommendations, test_data_df, k=3, alpha=0.7, average_response=False)\n        plot_recommended_counts(self.recommendations, test_data_df, k=3, alpha=0.7, average_response=True)\n        plot_recommended_counts(self.recommendations_cv, test_data_df, k=3, alpha=0.7, average_response=False)\n        plt.close()\n\n    @patch(\"mab2rec.visualization.plt.show\")\n    def test_plot_recommended_counts_by_item(self, mock_show):\n        plot_recommended_counts_by_item(self.recommendations, k=3, top_n_items=15, normalize=False)\n        plot_recommended_counts_by_item(self.recommendations, k=3, top_n_items=15, normalize=True)\n        plot_recommended_counts_by_item(self.recommendations_cv, k=3, top_n_items=15, normalize=False)\n        plt.close()\n\n    @patch(\"mab2rec.visualization.plt.show\")\n    def test_plot_num_items_per_recommendation(self, mock_show):\n        plot_num_items_per_recommendation(self.recommendations, test_data_df, normalize=False)\n        plot_num_items_per_recommendation(self.recommendations, test_data_df, normalize=True)\n        plot_num_items_per_recommendation(self.recommendations_cv, test_data_df, normalize=False)\n        plt.close()\n\n    @patch(\"mab2rec.visualization.plt.show\")\n    def test_plot_personalization_heatmap(self, mock_show):\n        # Create clusters based on user features\n        X = user_features_df.iloc[:, 1:]\n        kmeans = KMeans(n_clusters=5, n_init=10, random_state=1652)\n        kmeans.fit(X)\n        user_clusters = dict(zip(user_features_df['user_id'], kmeans.labels_))\n        cmap = sns.diverging_palette(220, 10, as_cmap=True)\n        plot_personalization_heatmap(self.recommendations, user_clusters, k=3, cmap=cmap, vmax=0.2, figsize=(5, 5))\n        plot_personalization_heatmap(self.recommendations_cv, user_clusters, k=3, cmap=cmap, vmax=0.2, figsize=(5, 5))\n        plt.close()\n\n    @patch(\"mab2rec.utils.print\")\n    def test_print_interaction_stats(self, mock_show):\n        print_interaction_stats(train_data_df)\n"
  }
]